@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Open+Sans:wght@600;700;800&display=swap');

:root {
  /* Palet Resmi SMAN 1 Pundong (web.sman1pundong.sch.id) */
  --brand-blue: #01438f;
  --brand-blue-hover: #01336e;
  --brand-blue-soft: #eef4fc;
  --brand-amber: #ff9b24;
  --brand-amber-soft: #fff7ed;
  --ink: #12173d;
  --ink-secondary: #364152;
  --muted: #697586;
  --bg: #f7f9fb;
  --surface: #ffffff;
  --surface-muted: #f4f6f9;
  --border: #e3e8ef;
  --border-strong: #cdd5df;
  --success: #0f766e;
  --success-soft: #ecfdf5;
  --danger: #b91c1c;
  --danger-soft: #fef2f2;
  --warning: #b45309;
  --warning-soft: #fff7ed;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(18, 23, 61, 0.06), 0 1px 2px rgba(18, 23, 61, 0.04);
  --shadow-card: 0 10px 30px rgba(43, 56, 88, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Open Sans', 'Inter', sans-serif;
  color: var(--ink);
}

/* Header / Topbar */
.topbar {
  background: var(--surface);
  border-top: 3px solid var(--brand-blue);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.brand-logo {
  height: 40px;
  width: auto;
  display: block;
  object-fit: contain;
}

.brand-divider {
  width: 1px;
  height: 24px;
  background: var(--border-strong);
}

.brand-page {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-pill {
  position: relative;
  padding: 8px 13px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-secondary);
  text-decoration: none;
  transition: background 0.16s ease, color 0.16s ease;
}

.nav-pill:hover {
  background: var(--surface-muted);
  color: var(--brand-blue);
}

.nav-pill.active {
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
}

.nav-pill.active::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-amber);
}

.nav-login-btn {
  padding: 8px 15px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  background: var(--brand-blue);
  color: #fff;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.12s ease;
}

.nav-login-btn:hover {
  background: var(--brand-blue-hover);
}

.nav-toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
  color: var(--ink);
  align-items: center;
  justify-content: center;
}

.nav-user-wrap {
  position: relative;
}

.nav-user-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 6px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.83rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.nav-user-btn:hover {
  border-color: var(--brand-blue);
  background: var(--surface-muted);
}

.nav-user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--brand-blue);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.nav-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 210px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  padding: 6px;
  z-index: 60;
}

.nav-dropdown-meta {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.nav-dropdown-meta strong {
  display: block;
  font-size: 0.86rem;
}

.nav-dropdown-meta span {
  font-size: 0.76rem;
  color: var(--muted);
}

.nav-dropdown a,
.nav-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: none;
  background: transparent;
  border-radius: 7px;
  font-size: 0.84rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}

.nav-dropdown a:hover,
.nav-dropdown button:hover {
  background: var(--surface-muted);
}

.nav-dropdown button.danger {
  color: var(--danger);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 6px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
}

.password-toggle:hover {
  color: var(--brand-blue);
}

/* Containers */
.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 20px 56px;
  flex: 1;
}

.container-narrow {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding: 24px 16px 56px;
  flex: 1;
}

/* Editorial Landing Grid */
.landing-layout {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 22px;
  align-items: start;
}

.editorial-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: var(--shadow-card);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand-blue);
  margin-bottom: 10px;
}

.eyebrow::before {
  content: '';
  width: 18px;
  height: 3px;
  border-radius: 2px;
  background: var(--brand-amber);
}

.editorial-title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  line-height: 1.22;
  margin: 0 0 12px;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.editorial-desc {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 560px;
}

.primary-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
}

.directory-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.directory-item {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.directory-item h3 {
  margin: 0 0 4px;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--ink);
}

.directory-item p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Info Board Sidebar */
.info-board {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--brand-amber);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.info-board-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.info-board-header h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.info-date {
  font-size: 0.78rem;
  color: var(--muted);
}

.kv-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.kv-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-size: 0.88rem;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border);
}

.kv-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.kv-label {
  color: var(--muted);
}

.kv-val {
  font-weight: 600;
  color: var(--ink);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.guide-list {
  margin: 0;
  padding-left: 18px;
  font-size: 0.85rem;
  color: var(--ink-secondary);
}

.guide-list li {
  margin-bottom: 6px;
}

.guide-box {
  background: var(--brand-amber-soft);
  border: 1px solid #fed7aa;
  border-radius: var(--radius-sm);
  padding: 14px;
}

.guide-box-title {
  font-size: 0.82rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--ink);
}

/* Cards & Grids */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand-blue);
  border-radius: var(--radius);
  padding: 15px 16px;
  box-shadow: var(--shadow);
}

.stat-box .label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.stat-box .value {
  font-size: 1.6rem;
  font-weight: 700;
  margin-top: 4px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.subtitle {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--brand-blue);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-blue-hover);
}

.btn-success {
  background: var(--brand-blue);
  color: #fff;
}

.btn-success:hover {
  background: var(--brand-blue-hover);
}

.btn-amber {
  background: var(--brand-amber);
  color: var(--ink);
}

.btn-outline {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  background: var(--surface-muted);
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

.btn-danger {
  background: var(--surface);
  color: var(--danger);
  border-color: #fecaca;
}

.btn-danger:hover {
  background: var(--danger-soft);
}

.btn-sm {
  padding: 6px 11px;
  font-size: 0.8rem;
  border-radius: 7px;
}

.btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.btn-block {
  width: 100%;
}

/* Forms */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--ink-secondary);
  margin-bottom: 5px;
}

input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.93rem;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(1, 67, 143, 0.12);
}

input:disabled {
  background: var(--surface-muted);
  color: var(--muted);
}

/* Badges & Alerts */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-neutral { background: var(--surface-muted); color: var(--ink-secondary); }

.alert {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  font-size: 0.88rem;
  font-weight: 500;
  border: 1px solid transparent;
}

.alert-info { background: var(--brand-blue-soft); color: var(--brand-blue); border-color: #cfe0f7; }
.alert-success { background: var(--success-soft); color: var(--success); border-color: #bbf7d0; }
.alert-danger { background: var(--danger-soft); color: var(--danger); border-color: #fecaca; }
.alert-warning { background: var(--warning-soft); color: var(--warning); border-color: #fed7aa; }

.section-kicker {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-blue);
  margin: 16px 0 8px;
}

/* Camera Frame */
.camera-box {
  position: relative;
  width: 100%;
  background: var(--ink);
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  max-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}

.camera-box video,
.camera-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

/* Underline Tabs */
.tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  padding: 10px 14px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.88rem;
  font-family: inherit;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.tab-btn:hover {
  color: var(--ink);
}

.tab-btn.active {
  color: var(--brand-blue);
  border-bottom-color: var(--brand-blue);
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
  font-variant-numeric: tabular-nums;
}

th, td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

th {
  background: var(--surface-muted);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
}

tbody tr:hover {
  background: var(--surface-muted);
}

tbody tr:last-child td {
  border-bottom: none;
}

.thumb {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid var(--border);
}

code {
  background: var(--surface-muted);
  color: var(--ink);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 0.83em;
}

.avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--brand-blue);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.footer {
  text-align: center;
  padding: 16px;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: var(--surface);
}

/* Attendance Charts */
.chart-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.chart-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: center;
}

.chart-donut-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.chart-donut-svg {
  flex-shrink: 0;
}

.chart-legend {
  flex: 1;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
}

.chart-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex-shrink: 0;
}

.chart-legend-label {
  flex: 1;
  color: var(--ink-secondary);
}

.chart-legend-val {
  color: var(--ink);
}

.chart-bars-wrap {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}

.chart-sub {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-secondary);
  margin-bottom: 10px;
}

.chart-bars-row {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 112px;
}

.chart-bar-col {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.chart-bar-top-val {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
}

.chart-bar-track,
.chart-bar-stack-track {
  width: 100%;
  max-width: 24px;
  flex: 1;
  background: #e9eef5;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.chart-bar-fill {
  width: 100%;
  border-radius: 6px 6px 0 0;
  transition: height 0.25s ease;
}

.chart-bar-label {
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.chart-mini-note {
  margin-top: 8px;
  font-size: 0.74rem;
  color: var(--muted);
}

@media (max-width: 720px) {
  .chart-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Integrated Smart System / Satu Data Showcase */
.sd-showcase {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--brand-blue);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-card);
  margin-top: 22px;
}

.sd-showcase.sd-compact {
  margin-top: 0;
  padding: 18px;
}

.sd-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.sd-title {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--ink);
}

.sd-subtitle {
  margin: 4px 0 0;
  font-size: 0.87rem;
  color: var(--muted);
}

.sd-agenda-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--brand-blue-soft);
  border: 1px solid #d5e4f7;
  border-radius: 10px;
  padding: 9px 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.sd-agenda-tag {
  background: var(--brand-amber);
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

.sd-agenda-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 0.81rem;
  color: var(--ink-secondary);
}

.sd-agenda-item em {
  font-style: normal;
  color: var(--brand-blue);
  font-weight: 600;
  margin-left: 4px;
}

.sd-filter-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.sd-filter-pill {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sd-filter-pill:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

.sd-filter-pill.active {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #fff;
}

.sd-apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  gap: 12px;
}

.sd-apps-grid-compact {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.sd-app-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-muted);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.sd-app-card:hover {
  transform: translateY(-2px);
  background: var(--surface);
  border-color: var(--brand-blue);
  box-shadow: 0 8px 20px rgba(1, 67, 143, 0.1);
}

.sd-app-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sd-app-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sd-app-card:hover .sd-app-icon {
  background: var(--brand-blue);
  color: #fff;
}

.sd-app-cat {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--brand-blue);
  background: #e7effa;
  padding: 3px 8px;
  border-radius: 999px;
}

.sd-app-body h4 {
  margin: 0 0 4px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.sd-app-body p {
  margin: 0;
  font-size: 0.79rem;
  color: var(--muted);
  line-height: 1.4;
}

.sd-app-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-blue);
}

.portal-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.portal-mode-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.portal-mode-btn.active {
  background: var(--brand-blue);
  color: #fff;
}

.hidden {
  display: none !important;
}

@media (max-width: 820px) {
  .landing-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
  }
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 10px;
    margin-top: 6px;
    border-top: 1px solid var(--border);
    gap: 4px;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-pill.active::after {
    display: none;
  }
  .nav-user-btn {
    width: 100%;
    justify-content: space-between;
    border-radius: 8px;
    padding: 8px 12px;
  }
  .nav-dropdown {
    position: static;
    box-shadow: none;
    margin-top: 4px;
  }
  .nav-login-btn {
    text-align: center;
  }
}

@media (max-width: 600px) {
  .directory-grid {
    grid-template-columns: 1fr;
  }
  .editorial-panel {
    padding: 22px 18px;
  }
  .topbar-inner {
    padding: 10px 14px;
  }
  .brand-logo {
    height: 32px;
  }
  .brand-divider,
  .brand-page {
    display: none;
  }
}

.toast-banner {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  max-width: 420px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
  border: 1px solid transparent;
  background: #ffffff;
  color: var(--ink);
}
.toast-banner.toast-success {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}
.toast-banner.toast-danger {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}
.toast-banner.toast-info,
.toast-banner.toast-warning {
  background: #eff6ff;
  color: #1e40af;
  border-color: #bfdbfe;
}
