:root {
  --brand: #00ed00;
  --brand-deep: #00b83a;
  --brand-tint: #d8ffd1;
  --brand-soft: rgba(0, 237, 0, 0.12);
  --ink: #0f1720;
  --ink-soft: #5c6874;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #f8f8f2;
  --line: rgba(15, 23, 32, 0.12);
  --shadow: 0 24px 80px rgba(12, 21, 18, 0.18);
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Plus Jakarta Sans", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(0, 237, 0, 0.2), transparent 24%),
    radial-gradient(circle at bottom right, rgba(182, 201, 169, 0.4), transparent 28%),
    linear-gradient(135deg, #f6f8f1 0%, #e7ece3 52%, #d5ddd6 100%);
}

button,
input,
textarea {
  font: inherit;
}

.login-shell,
.admin-shell {
  min-height: 100vh;
  padding: 24px;
}

.login-shell {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
}

.login-shell--compact {
  justify-content: center;
}

.login-panel,
.showcase-card,
.admin-card,
.stat-card {
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow);
}

.login-panel,
.admin-card,
.stat-card {
  background: var(--surface);
}

.login-panel,
.showcase-card,
.admin-card {
  border-radius: var(--radius-xl);
}

.login-panel,
.admin-card {
  padding: 18px;
}

.brand-mark {
  display: inline-flex;
  gap: 10px;
  margin-bottom: 28px;
}

.brand-mark span {
  display: block;
  width: 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--brand), var(--brand-deep));
}

.brand-mark span:nth-child(1) {
  height: 18px;
}

.brand-mark span:nth-child(2) {
  height: 28px;
}

.brand-mark span:nth-child(3) {
  height: 22px;
}

.eyebrow,
.showcase-label,
.stat-label {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.68rem;
  color: var(--ink-soft);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  max-width: 11ch;
}

h2 {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
}

h3 {
  font-size: 0.96rem;
}

.intro,
.showcase-card p,
.admin-intro,
.pill-card p,
.user-card span,
.empty-state,
.log-empty {
  color: var(--ink-soft);
  line-height: 1.65;
}

.intro {
  margin: 12px 0 20px;
  max-width: 42ch;
  font-size: 0.95rem;
}

.login-form,
.stack-form {
  display: grid;
  gap: 12px;
}

.login-form label,
.stack-form label,
.group-selector legend {
  font-size: 0.88rem;
  font-weight: 600;
}

.login-form input,
.stack-form input,
.stack-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.city-autocomplete {
  position: relative;
}

.city-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 10;
  display: none;
  padding: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 23, 32, 0.08);
  box-shadow: 0 20px 40px rgba(15, 23, 32, 0.12);
}

.city-dropdown--open {
  display: grid;
  gap: 6px;
}

.city-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.city-option:hover {
  background: rgba(0, 237, 0, 0.08);
}

.city-option strong,
.city-option span {
  display: block;
}

.city-option strong {
  font-size: 0.9rem;
}

.city-option span {
  font-size: 0.76rem;
  color: var(--ink-soft);
}

.login-form input:focus,
.stack-form input:focus,
.stack-form textarea:focus {
  border-color: rgba(0, 184, 58, 0.55);
  box-shadow: 0 0 0 5px rgba(0, 237, 0, 0.12);
  transform: translateY(-1px);
}

.login-form button,
.stack-form button,
.secondary-button,
.ghost-button {
  margin-top: 8px;
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 650;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.login-form button,
.stack-form button {
  color: #08110a;
  background: linear-gradient(135deg, #9bf58e 0%, var(--brand) 45%, #bcff93 100%);
  box-shadow: 0 16px 30px rgba(0, 184, 58, 0.24);
}

.login-form button:hover,
.stack-form button:hover,
.secondary-button:hover,
.text-link:hover,
.ghost-button:hover {
  transform: translateY(-2px);
  filter: saturate(1.05);
}

.secondary-button {
  color: var(--surface-strong);
  background: rgba(17, 25, 35, 0.9);
  box-shadow: 0 12px 24px rgba(15, 23, 32, 0.16);
}

.ghost-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  box-shadow: 0 8px 18px rgba(15, 23, 32, 0.08);
}

.ghost-button--danger {
  color: #7b1d1d;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  filter: none;
}

.text-link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transition: transform 180ms ease, color 180ms ease;
}

.feedback {
  min-height: 24px;
  margin: 4px 0 0;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.field-note {
  margin: -2px 0 2px;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.login-showcase {
  display: flex;
  justify-content: center;
}

.showcase-card {
  position: relative;
  overflow: hidden;
  max-width: 580px;
  min-height: 420px;
  padding: 42px;
  background:
    linear-gradient(180deg, rgba(15, 23, 32, 0.92) 0%, rgba(24, 36, 41, 0.88) 100%);
  color: #f5f8f2;
}

.showcase-card::before,
.showcase-card::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.showcase-card::before {
  width: 280px;
  height: 280px;
  top: -80px;
  right: -60px;
  background: radial-gradient(circle, rgba(0, 237, 0, 0.34) 0%, transparent 68%);
}

.showcase-card::after {
  width: 220px;
  height: 220px;
  bottom: -80px;
  left: -60px;
  background: radial-gradient(circle, rgba(219, 255, 196, 0.22) 0%, transparent 70%);
}

.showcase-card > * {
  position: relative;
  z-index: 1;
}

.showcase-card p {
  max-width: 34ch;
  color: rgba(245, 248, 242, 0.82);
}

.admin-shell {
  display: grid;
  gap: 18px;
}

.layout-shell {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  width: 100%;
  max-width: 80%;
}

.layout-content {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.app-view {
  display: none;
  gap: 18px;
}

.app-view--active {
  display: grid;
}

.sidebar-nav {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 20px;
  min-height: calc(100vh - 48px);
  padding: 22px 18px 18px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(0, 237, 0, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(16, 23, 30, 0.98) 0%, rgba(18, 27, 35, 0.96) 100%);
  color: #f3f7f2;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    0 24px 70px rgba(7, 12, 16, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.sidebar-brand strong,
.sidebar-user strong {
  display: block;
  font-size: 1rem;
}

.sidebar-user span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(243, 247, 242, 0.62);
}

.sidebar-brand {
  padding: 6px 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand .eyebrow {
  color: rgba(214, 225, 217, 0.52);
}

.sidebar-brand strong {
  font-size: 1.22rem;
  letter-spacing: -0.02em;
  color: #f7fbf4;
}

.sidebar-menu {
  display: grid;
  gap: 10px;
  align-content: start;
}

.sidebar-link {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border-radius: 16px;
  color: rgba(243, 247, 242, 0.9);
  background: rgba(255, 255, 255, 0.02);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.92rem;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.sidebar-link:hover {
  transform: translateX(3px);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.sidebar-link--active {
  background: linear-gradient(135deg, rgba(0, 237, 0, 0.16) 0%, rgba(0, 184, 58, 0.08) 100%);
  color: #f6fff4;
  border-color: rgba(110, 255, 126, 0.24);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.sidebar-link--button {
  font: inherit;
}

.sidebar-user {
  margin-top: auto;
  padding: 16px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.sidebar-user strong {
  font-size: 0.98rem;
  line-height: 1.4;
  color: #ffffff;
  word-break: break-word;
}

.sidebar-logout {
  margin-top: 14px;
  width: 100%;
  border: 1px solid rgba(255, 113, 113, 0.18);
  background: rgba(143, 27, 27, 0.18);
  color: #ffb4b4;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.sidebar-logout:hover {
  transform: translateY(-1px);
  background: rgba(143, 27, 27, 0.28);
  border-color: rgba(255, 113, 113, 0.26);
}

.admin-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

.admin-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-chip {
  min-width: 280px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 12px 28px rgba(15, 23, 32, 0.08);
}

.admin-chip span,
.admin-chip strong {
  display: block;
}

.admin-chip span {
  margin-bottom: 4px;
  color: var(--ink-soft);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.stats-grid,
.admin-grid,
.listing-grid,
.app-grid {
  display: grid;
  gap: 18px;
}

.stats-grid {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.admin-grid,
.listing-grid {
  grid-template-columns: repeat(2, minmax(280px, 1fr));
}

.listing-grid--single {
  grid-template-columns: minmax(280px, 780px);
}

.app-grid {
  grid-template-columns: minmax(540px, 1.5fr) minmax(320px, 0.9fr);
  align-items: start;
}

.app-side-column {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 24px;
  min-width: 0;
}

.stat-card {
  border-radius: var(--radius-lg);
  padding: 24px;
}

.stat-value {
  font-size: clamp(2rem, 4vw, 3rem);
}

.card-head,
.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}

.section-title-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

#corporamaAccountPassword {
  letter-spacing: 0.02em;
}

.card-head {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(15, 23, 32, 0.07);
}

.card-head .eyebrow {
  margin-bottom: 4px;
}

/* Side column : cards plus sobres et compactes */
.app-side-column .admin-card {
  padding: 16px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.88) 0%, rgba(246, 250, 244, 0.84) 100%);
}

.app-side-column .card-head {
  margin-bottom: 14px;
  padding-bottom: 12px;
}

.app-side-column h2 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.form-section {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(15, 23, 32, 0.08);
}

.form-row {
  display: grid;
  gap: 12px;
}

.form-row--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.app-main-card,
.history-card,
.pill-card,
.metric-box,
.log-console {
  min-width: 0;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 32, 0.08);
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

.status-badge--queued {
  background: rgba(15, 23, 32, 0.08);
  color: var(--ink-soft);
}

.status-badge--running {
  background: var(--brand-soft);
  color: #0b5115;
}

.status-badge--completed {
  background: rgba(73, 184, 128, 0.14);
  color: #155b3b;
}

.group-selector {
  margin: 8px 0 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.62);
}

.group-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.group-option {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}

.group-option input {
  width: auto;
  margin: 0;
}

/* ── Listes ─────────────────────────────── */
.pill-list,
.user-list,
.history-list {
  display: grid;
  gap: 10px;
}

/* ── Carte utilisateur ──────────────────── */
.pill-card,
.user-card {
  border-radius: var(--radius-md);
  padding: 14px 16px;
  border: 1px solid rgba(15, 23, 32, 0.07);
  background: rgba(255, 255, 255, 0.72);
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.pill-card:hover {
  box-shadow: 0 6px 18px rgba(15, 23, 32, 0.08);
  transform: translateY(-1px);
}

.pill-card strong,
.user-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.pill-card p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.user-card-head {
  margin-bottom: 12px;
}

.user-group-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tiny-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(0, 237, 0, 0.14) 0%, rgba(0, 184, 58, 0.1) 100%);
  border: 1px solid rgba(0, 184, 58, 0.22);
  color: #0b5115;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tiny-pill.muted {
  background: rgba(15, 23, 32, 0.06);
  border-color: rgba(15, 23, 32, 0.1);
  color: var(--ink-soft);
}

/* ── Métriques ETA ──────────────────────── */
.log-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.metric-box {
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92) 0%, rgba(245, 250, 243, 0.82) 100%);
  border: 1px solid rgba(15, 23, 32, 0.07);
  transition: box-shadow 180ms ease;
}

.metric-box span,
.metric-box strong {
  display: block;
}

.metric-box span {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  margin-bottom: 6px;
  font-weight: 600;
}

.metric-box strong {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
}

.log-meta .metric-box:first-child strong {
  color: #0b5115;
}

/* ── Console de logs ────────────────────── */
.log-console {
  min-height: 220px;
  max-height: 380px;
  overflow: auto;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, #0d1520 0%, #111e2b 100%);
  color: #d4edda;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 8px 24px rgba(8, 14, 22, 0.18);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.log-console::-webkit-scrollbar {
  width: 4px;
}

.log-console::-webkit-scrollbar-track {
  background: transparent;
}

.log-console::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 99px;
}

.log-entry {
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.log-entry:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}

.log-entry span {
  display: inline-block;
  margin-bottom: 3px;
  font-size: 0.67rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(0, 237, 0, 0.55);
  font-weight: 600;
}

.log-entry p,
.log-empty {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: #c8e6cc;
}

.log-empty {
  color: rgba(200, 220, 205, 0.45);
  font-style: italic;
}

/* ── Cartes historique ──────────────────── */
.history-card {
  border-radius: var(--radius-md);
  padding: 14px 16px;
  border: 1px solid rgba(15, 23, 32, 0.08);
  background: rgba(255, 255, 255, 0.72);
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.history-card:hover {
  box-shadow: 0 6px 20px rgba(15, 23, 32, 0.08);
  transform: translateY(-1px);
}

.history-card-head,
.history-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.history-card-head {
  align-items: start;
  margin-bottom: 8px;
}

.history-card-head strong {
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.history-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.history-card-head p,
.history-detail,
.history-meta span {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.history-meta {
  margin-bottom: 6px;
  font-size: 0.76rem;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.history-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid transparent;
  letter-spacing: 0.02em;
}

.history-status--queued {
  color: #495463;
  background: rgba(89, 102, 119, 0.1);
  border-color: rgba(89, 102, 119, 0.16);
}

.history-status--running {
  color: #0b5115;
  background: rgba(0, 237, 0, 0.12);
  border-color: rgba(0, 184, 58, 0.2);
}

.history-status--completed {
  color: #155b3b;
  background: rgba(73, 184, 128, 0.14);
  border-color: rgba(73, 184, 128, 0.24);
}

.history-status--stopped {
  color: #7a5208;
  background: rgba(225, 179, 74, 0.14);
  border-color: rgba(225, 179, 74, 0.26);
}

.history-status--error {
  color: #7b1d1d;
  background: rgba(190, 52, 52, 0.1);
  border-color: rgba(190, 52, 52, 0.2);
}

.history-replay {
  margin-top: 0;
  flex-shrink: 0;
  white-space: nowrap;
}

.history-download,
.history-resume {
  margin-top: 0;
  text-decoration: none;
}

/* Boutons d'action dans les cartes historique */
.history-actions .ghost-button {
  font-size: 0.78rem;
  padding: 7px 11px;
  margin-top: 0;
}

#recentHistoryList .history-card:nth-child(n + 3) {
  display: none;
}

/* Cartes récentes : plus compactes */
#recentHistoryList .history-card {
  padding: 12px 14px;
}

#recentHistoryList .history-card-head {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 8px;
}

#recentHistoryList .history-actions {
  justify-content: flex-start;
}

.history-error {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(126, 21, 21, 0.05);
  border: 1px solid rgba(126, 21, 21, 0.1);
}

.history-error summary {
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  color: #7b1d1d;
  user-select: none;
}

.history-error pre {
  margin: 8px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.74rem;
  color: #5b1414;
  line-height: 1.5;
}

.empty-state {
  margin: 0;
  padding: 12px 0;
}

@media (max-width: 1120px) {
  .layout-shell,
  .app-grid,
  .admin-grid,
  .listing-grid,
  .listing-grid--single {
    grid-template-columns: 1fr;
  }

  /* Sidebar devient une top bar sticky sur mobile */
  .admin-shell {
    padding: 0 0 24px;
  }

  .layout-shell {
    gap: 0;
  }

  .layout-content {
    padding: 16px;
  }

  .sidebar-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    min-height: auto;
    padding: 10px 16px;
    border-radius: 0;
  }

  .sidebar-brand {
    flex: 1;
    padding: 0;
    border: none;
  }

  .sidebar-brand .eyebrow {
    display: none;
  }

  .sidebar-brand strong {
    font-size: 1rem;
  }

  .sidebar-menu {
    display: flex;
    flex-direction: row;
    gap: 6px;
    align-items: center;
  }

  .sidebar-link {
    min-height: 36px;
    padding: 6px 12px;
    font-size: 0.82rem;
    width: auto;
  }

  .sidebar-user {
    margin-top: 0;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    display: flex;
    align-items: center;
  }

  .sidebar-user > span,
  .sidebar-user > strong {
    display: none;
  }

  .sidebar-logout {
    margin-top: 0;
    white-space: nowrap;
    font-size: 0.76rem;
    padding: 6px 10px;
  }

  .app-side-column {
    position: static;
  }
}

@media (max-width: 980px) {
  .admin-hero,
  .admin-topbar,
  .section-title-row {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 640px) {
  .login-shell,
  .admin-shell {
    padding: 14px;
  }

  .login-panel,
  .showcase-card,
  .admin-card {
    padding: 18px;
    border-radius: 20px;
  }

  .stats-grid,
  .form-row--2,
  .log-meta {
    grid-template-columns: 1fr;
  }

  .admin-chip {
    min-width: 0;
  }

  .form-actions {
    flex-direction: column;
  }
}
