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

:root {
  --navy: #0f172a;
  --green: #32cd32;
  --bg: #f8fafc;
  --panel: #ffffff;
  --line: #eef2f7;
  --muted: #94a3b8;
  --text: #334155;
  --danger: #ef4444;
  --warning: #d97706;
  --success: #059669;
  --blue: #2563eb;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "Plus Jakarta Sans", "Segoe UI", Arial, sans-serif;
}
a { color: var(--navy); font-weight: 800; text-decoration: none; }
button, input, select, textarea { font: inherit; }
input, select, textarea {
  width: 100%;
  border: 1px solid #e5edf6;
  border-radius: 16px;
  padding: 14px 16px;
  color: var(--navy);
  background: #f8fafc;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(15, 23, 42, .28);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(15, 23, 42, .06);
}
textarea { min-height: 128px; resize: vertical; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }

.app-body { overflow: hidden; }
.sidebar-overlay,
.mobile-menu-button,
.sidebar-close {
  display: none;
}
.app-shell {
  display: flex;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
}
.sidebar {
  width: 256px;
  background: var(--navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid #1e293b;
}
.sidebar.desktop-sidebar { display: flex !important; }
.sidebar.mobile-sidebar { display: none !important; }
.brand {
  min-height: 132px;
  padding: 24px;
  border-bottom: 1px solid #1e293b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}
.brand-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.brand strong {
  display: block;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .04em;
}
.brand strong em {
  color: var(--green);
  font-style: normal;
}
.brand span {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  box-shadow: 0 12px 26px rgba(0, 0, 0, .2);
}
.brand-mark img { width: 80%; height: 80%; object-fit: contain; }
.brand-mark.large {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border-radius: 18px;
  box-shadow: inset 0 2px 10px rgba(15, 23, 42, .04);
}
.nav {
  flex: 1;
  padding: 24px 16px;
  display: grid;
  align-content: start;
  gap: 4px;
  overflow-y: auto;
}
.nav a {
  color: #d1d5db;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 50px;
  padding: 14px 16px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.nav a.active {
  background: rgba(255, 255, 255, .1);
  border-left: 4px solid var(--green);
  color: #fff;
}
.nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav-icon {
  width: 20px;
  color: var(--green);
  font-size: 14px;
  text-align: center;
}
.logout-form { padding: 16px; border-top: 1px solid #1e293b; }
.logout-form button {
  width: 100%;
  border: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  color: #f87171;
  background: transparent;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 900;
}
.logout-form button:hover { background: rgba(127, 29, 29, .28); }

.main {
  flex: 1;
  min-width: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f8fafc;
}
.topbar {
  height: 80px;
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 0 32px;
  background: rgba(255, 255, 255, .84);
  border-bottom: 1px solid #e5e7eb;
  backdrop-filter: blur(12px);
}
.topbar-title {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.topbar h1 {
  margin: 0;
  color: var(--navy);
  font-size: 21px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
}
.eyebrow {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.user-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px 9px 16px;
  border: 1px solid #eef2f7;
  border-radius: 18px;
  background: #f8fafc;
}
.user-pill div { text-align: right; }
.user-pill strong {
  display: block;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}
.user-pill span:not(.avatar) {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}
.avatar {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: var(--navy);
  border: 2px solid #fff;
  box-shadow: 0 6px 14px rgba(15, 23, 42, .16);
}
.content-area {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
  display: block;
}

.panel, .stat-card, .login-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
}
.panel { padding: 24px; margin-bottom: 24px; }
.panel.narrow { max-width: 900px; margin-left: auto; margin-right: auto; overflow: hidden; }
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.panel h2 {
  margin: 0;
  color: var(--navy);
  font-size: 18px;
  font-weight: 900;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.master-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}
.welcome-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  padding: 24px 28px;
  border: 1px solid #eef2f7;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
}
.welcome-panel h2 {
  margin: 4px 0 6px;
  color: var(--navy);
  font-size: 28px;
  line-height: 1.15;
  font-weight: 900;
}
.welcome-panel span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.welcome-panel > p {
  max-width: 520px;
  margin: 0;
  color: #475569;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
  text-align: right;
}
.master-stat-card {
  min-height: 145px;
  padding: 20px;
  border: 1px solid #eef2f7;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}
.master-stat-card p {
  margin: 12px 0 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.master-stat-card h3 {
  margin: 0;
  color: var(--navy);
  font-size: 26px;
  line-height: 1;
  font-weight: 900;
}
.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 18px;
}
.stat-icon.blue { background: #eff6ff; color: #2563eb; }
.stat-icon.amber { background: #fffbeb; color: #d97706; }
.stat-icon.emerald { background: #ecfdf5; color: #059669; }
.stat-icon.indigo { background: #eef2ff; color: #4f46e5; }

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  gap: 32px;
  margin-bottom: 32px;
}
.chart-panel, .team-panel, .running-panel {
  border-radius: 24px;
}
.chart-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.chart-heading h3,
.team-panel h3,
.running-header h3 {
  margin: 0;
  color: var(--navy);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.chart-dots {
  display: flex;
  gap: 8px;
}
.chart-dots span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--navy);
}
.chart-dots span + span { background: var(--green); }
.chart-canvas-wrap { height: 256px; }
.team-panel {
  display: flex;
  flex-direction: column;
}
.team-list {
  flex: 1;
  display: grid;
  gap: 12px;
  margin: 24px 0;
}
.team-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 18px;
  transition: border-color .2s ease, background .2s ease;
}
.team-item:hover {
  border-color: #eef2f7;
  background: #f8fafc;
}
.team-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  box-shadow: 0 10px 18px rgba(15, 23, 42, .18);
  font-size: 12px;
  font-weight: 900;
}
.team-item p {
  margin: 0;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
}
.team-item span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.team-add {
  width: 100%;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px dashed #dbe3ef;
  border-radius: 14px;
  background: #f8fafc;
  color: var(--navy);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.running-panel {
  padding: 0;
  overflow: hidden;
}
.running-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid #eef2f7;
  background: rgba(248, 250, 252, .55);
}
.running-header span {
  padding: 5px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  box-shadow: 0 6px 14px rgba(15, 23, 42, .04);
}
.master-table-wrap {
  border: 0;
  border-radius: 0;
}
.table-id {
  display: block;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
}
.table-sub {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.text-right { text-align: right; }
.row-action {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  color: var(--navy);
  background: #f8fafc;
  box-shadow: 0 4px 10px rgba(15, 23, 42, .04);
  transition: background .2s ease, color .2s ease;
}
.row-action:hover {
  background: var(--navy);
  color: #fff;
}
.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}
.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.danger-box {
  margin-top: 18px;
  padding: 18px;
  border: 1px dashed #fecaca;
  border-radius: 20px;
  background: #fff7f7;
}
.button.danger {
  background: #fee2e2;
  color: #991b1b;
}
.button.danger:hover {
  background: #fecaca;
}
.pagination {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.pagination a {
  min-width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #e5edf6;
  border-radius: 12px;
  background: #fff;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
}
.pagination a.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.row-actions form {
  margin: 0;
}
.inline-edit {
  margin: 0;
}
td input,
td select {
  min-width: 150px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}
.stat-card {
  min-height: 132px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.stat-card strong {
  display: block;
  margin-top: 10px;
  color: var(--navy);
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
}
.button {
  border: 0;
  border-radius: 16px;
  padding: 13px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.button:hover { transform: translateY(-1px); }
.button.primary {
  color: #fff;
  background: var(--navy);
  box-shadow: 0 14px 28px rgba(15, 23, 42, .18);
}
.button.primary:hover { background: #1e293b; }
.button.secondary { color: var(--navy); background: #f1f5f9; }
.alert {
  padding: 14px 18px;
  border-radius: 18px;
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 800;
}
.alert.success { background: #dcfce7; color: #166534; }
.alert.error { background: #fee2e2; color: #991b1b; }

.table-wrap {
  overflow-x: auto;
  border-radius: 20px;
  border: 1px solid #f1f5f9;
}
table { width: 100%; border-collapse: collapse; min-width: 760px; background: #fff; }
th {
  color: var(--muted);
  font-size: 10px;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .16em;
  background: #f8fafc;
  font-weight: 900;
}
th, td { border-bottom: 1px solid #f1f5f9; padding: 18px 20px; }
td { font-size: 13px; font-weight: 700; color: #475569; }
tr:hover td { background: #f8fafc; }
.empty { text-align: center; color: var(--muted); padding: 32px; }
.badge {
  display: inline-flex;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.badge.draft { background: #f1f5f9; color: #64748b; }
.badge.diajukan { background: #dbeafe; color: #1d4ed8; }
.badge.review { background: #fef3c7; color: var(--warning); }
.badge.revisi { background: #ffedd5; color: #c2410c; }
.badge.disetujui { background: #dcfce7; color: var(--success); }
.badge.ditolak { background: #fee2e2; color: var(--danger); }
.badge.selesai { background: #ede9fe; color: #6d28d9; }

.filter-bar, .upload-box {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 12px;
  margin-bottom: 18px;
}
.filter-bar.log-filter {
  grid-template-columns: repeat(5, minmax(130px, 1fr)) auto auto;
}
.filter-bar.request-filter,
.filter-bar.document-filter {
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto auto;
}
.filter-bar.request-filter input[type="search"],
.filter-bar.document-filter input[type="search"] {
  grid-column: span 2;
}
.upload-box {
  grid-template-columns: repeat(4, 1fr) auto;
  padding: 18px;
  background: #f8fafc;
  border: 1px dashed #dbe3ef;
  border-radius: 20px;
}
.form-stack, .form-grid { display: grid; gap: 18px; }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label span {
  display: block;
  margin: 0 0 8px 4px;
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.field-error {
  display: block;
  margin: 7px 0 0 4px;
  color: #dc2626;
  font-size: 11px;
  font-weight: 800;
}
.span-2 { grid-column: span 2; }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; }
.input-icon { position: relative; }
.input-icon i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}
.input-icon input { padding-left: 46px; }

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  gap: 24px;
}
.side-stack { display: grid; gap: 24px; align-content: start; }
.detail-list { display: grid; gap: 14px; margin: 0; }
.detail-list div { padding: 0 0 14px; border-bottom: 1px solid #f1f5f9; }
.detail-list dt { color: var(--muted); font-weight: 900; font-size: 10px; text-transform: uppercase; letter-spacing: .14em; }
.detail-list dd { margin: 6px 0 0; color: #334155; font-weight: 700; line-height: 1.6; }
.review-box {
  margin-top: 22px;
  padding: 18px;
  border: 1px dashed #dbe3ef;
  border-radius: 20px;
  background: #f8fafc;
  display: grid;
  gap: 14px;
}
.qr-panel { text-align: center; }
.qr-image {
  display: block;
  width: 184px;
  max-width: 100%;
  height: auto;
  margin: 14px auto;
  padding: 18px;
  border: 4px solid #f8fafc;
  border-radius: 26px;
  background: #fff;
  box-shadow: inset 0 2px 12px rgba(15, 23, 42, .04);
}
.qr-panel a { display: block; overflow-wrap: anywhere; font-size: 11px; color: #64748b; }
.mini-row, .note-card {
  border: 1px solid #f1f5f9;
  border-radius: 18px;
  padding: 14px;
  margin-top: 10px;
  background: #f8fafc;
}
.mini-row { display: flex; justify-content: space-between; gap: 10px; }
.muted { color: var(--muted); font-weight: 700; }
.timeline { display: grid; gap: 14px; }
.timeline div { position: relative; padding-left: 28px; }
.timeline span {
  position: absolute;
  left: 0;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px #dcfce7;
}
.timeline p { margin: 0; color: var(--navy); font-weight: 800; }
.timeline small { color: var(--muted); font-weight: 700; }

.guest-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: var(--navy);
}
.login-card {
  width: 100%;
  max-width: 430px;
  padding: 32px;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .34);
  animation: fadeIn .35s ease-out;
}
.login-brand { text-align: center; margin-bottom: 22px; }
.login-brand h1 {
  margin: 0;
  color: var(--navy);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -.02em;
}
.login-brand h1 span { color: var(--green); }
.login-brand .eyebrow { margin-top: 7px; }
.demo-box {
  margin-top: 18px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 18px;
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.demo-box strong { color: var(--navy); font-weight: 900; }
.error-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.error-card { max-width: 420px; text-align: center; padding: 32px; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 1024px) {
  .sidebar.desktop-sidebar {
    display: flex !important;
    position: relative;
    transform: none !important;
  }
  .sidebar.mobile-sidebar,
  .mobile-menu-button,
  .sidebar-close,
  .sidebar-overlay {
    display: none !important;
  }
}

@media (max-width: 1180px) {
  .stat-grid, .master-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .filter-bar, .upload-box { grid-template-columns: 1fr 1fr; }
  .content-area { padding: 24px; }
  .topbar { padding: 0 24px; }
}

@media (max-width: 1023px) {
  .app-body {
    overflow: hidden;
  }
  .app-body.sidebar-open {
    overflow: hidden;
  }
  .app-shell {
    display: flex;
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
  }
  .sidebar.desktop-sidebar {
    display: none !important;
  }
  .sidebar.mobile-sidebar {
    display: flex !important;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    width: min(82vw, 288px);
    height: 100vh;
    transform: translateX(-105%);
    transition: transform .28s cubic-bezier(.4, 0, .2, 1);
    box-shadow: 24px 0 80px rgba(15, 23, 42, .38);
  }
  .sidebar-open .mobile-sidebar {
    transform: translateX(0);
  }
  .sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: block;
    background: rgba(0, 0, 0, .6);
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(4px);
    transition: opacity .2s ease;
  }
  .sidebar-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }
  .brand {
    min-height: 82px;
    padding: 18px 20px;
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
  .brand-main {
    flex-direction: row;
    align-items: center;
    min-width: 0;
  }
  .brand strong {
    font-size: 15px;
  }
  .sidebar-close {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 12px;
    color: #cbd5e1;
    background: rgba(255, 255, 255, .06);
    cursor: pointer;
  }
  .nav {
    padding: 18px 14px;
    display: grid;
    grid-template-columns: 1fr;
  }
  .nav a {
    min-height: 48px;
    border-radius: 14px;
  }
  .main {
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
  }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: auto;
    min-height: 70px;
    padding: 14px 18px;
  }
  .mobile-menu-button {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 14px;
    color: var(--navy);
    background: #f1f5f9;
    cursor: pointer;
  }
  .topbar-title {
    flex: 1;
  }
  .topbar h1 {
    font-size: 18px;
  }
  .eyebrow {
    font-size: 9px;
    letter-spacing: .12em;
  }
  .user-pill {
    padding: 8px;
  }
  .user-pill div {
    display: none;
  }
  .content-area {
    flex: 1;
    padding: 18px;
    overflow-y: auto;
  }
  .stat-grid, .master-stat-grid, .form-grid, .filter-bar, .upload-box, .detail-grid {
    grid-template-columns: 1fr;
  }
  .span-2 { grid-column: auto; }
  .dashboard-grid {
    gap: 18px;
    margin-bottom: 18px;
  }
  .welcome-panel {
    align-items: flex-start;
    flex-direction: column;
  }
  .welcome-panel > p {
    max-width: none;
    text-align: left;
  }
  .master-stat-grid {
    gap: 14px;
    margin-bottom: 18px;
  }
  .master-stat-card {
    min-height: 112px;
    padding: 18px;
  }
  .chart-canvas-wrap {
    height: 220px;
  }
  .panel {
    padding: 18px;
    border-radius: 20px;
    margin-bottom: 18px;
  }
  .running-panel {
    padding: 0;
  }
  .running-header {
    padding: 16px 18px;
  }
  .table-wrap {
    margin-left: -2px;
    margin-right: -2px;
    border-radius: 16px;
  }
  th, td {
    padding: 14px 16px;
  }
  .upload-box {
    padding: 14px;
  }
}

@media (max-width: 520px) {
  .content-area {
    padding: 14px;
  }
  .topbar {
    padding: 12px 14px;
  }
  .avatar,
  .mobile-menu-button {
    width: 40px;
    height: 40px;
  }
  .panel-header,
  .form-actions,
  .mini-row,
  .running-header,
  .chart-heading {
    display: grid;
    gap: 12px;
  }
  .panel-header {
    align-items: start;
  }
  .button { width: 100%; }
  .master-stat-card {
    min-height: 104px;
  }
  .master-stat-card h3,
  .stat-card strong {
    font-size: 24px;
  }
  .chart-canvas-wrap {
    height: 190px;
  }
  .team-item {
    align-items: flex-start;
  }
  input, select, textarea {
    min-height: 46px;
    border-radius: 14px;
    padding: 12px 14px;
  }
  table {
    min-width: 680px;
  }
  .login-card {
    padding: 24px;
    border-radius: 24px;
  }
}

@media (max-width: 380px) {
  .topbar h1 {
    font-size: 16px;
  }
  .eyebrow {
    display: none;
  }
  .content-area {
    padding: 12px;
  }
  .welcome-panel {
    padding: 18px;
    border-radius: 18px;
  }
  .welcome-panel h2 {
    font-size: 22px;
  }
  .panel {
    padding: 15px;
  }
  .running-panel {
    padding: 0;
  }
  .master-stat-card p,
  .chart-heading h3,
  .team-panel h3,
  .running-header h3 {
    letter-spacing: .06em;
  }
}
