:root {
  --bg: #f4efe7;
  --panel: rgba(255, 255, 255, 0.88);
  --text: #132321;
  --muted: #5e6d69;
  --line: rgba(19, 35, 33, 0.08);
  --accent: #0f766e;
  --accent-strong: #0a4f4a;
  --accent-soft: #d6f3ee;
  --sun: #f3a712;
  --danger: #c54f45;
  --success: #2d8f60;
  --shadow-lg: 0 28px 70px rgba(24, 42, 40, 0.15);
  --shadow-md: 0 18px 48px rgba(24, 42, 40, 0.1);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(243, 167, 18, 0.18), transparent 24%),
    linear-gradient(180deg, #fbf7f1 0%, #f1e8dd 100%);
  font-family: "Manrope", sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.admin-shell { display: grid; grid-template-columns: 290px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 28px;
  background: rgba(19, 35, 33, 0.92); color: #f6fbfa; backdrop-filter: blur(24px);
}
.brand { display: flex; align-items: center; gap: 14px; margin-bottom: 30px; }
.brand-mark {
  width: 52px; height: 52px; border-radius: 18px;
  background: linear-gradient(135deg, #f3a712, #0f766e);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}
.brand-text strong, .section-title, .panel-card h3, .page-title h1, .stat-card strong, .login-card h1 {
  font-family: "Space Grotesk", sans-serif;
}
.brand-text small, .sidebar-note, .muted, .table-muted { color: rgba(246, 251, 250, 0.7); }
.nav-links { display: grid; gap: 10px; margin-top: 24px; }
.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px;
  color: rgba(246, 251, 250, 0.82); transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}
.nav-link:hover, .nav-link.is-active {
  color: #fff; background: linear-gradient(135deg, rgba(243, 167, 18, 0.24), rgba(15, 118, 110, 0.38)); transform: translateX(4px);
}
.nav-icon {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.08); font-size: 14px; font-weight: 800;
}
.main-content { padding: 30px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 24px; }
.page-title h1 { margin: 0; font-size: clamp(2rem, 4vw, 3.1rem); line-height: 0.95; }
.page-title p { margin: 10px 0 0; color: #5e6d69; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.pill, .status-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.8); color: var(--muted); box-shadow: var(--shadow-md);
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); }
.layout-grid { display: grid; gap: 20px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.stat-card, .panel-card, .table-card, .form-card, .highlight-card {
  border: 1px solid rgba(255, 255, 255, 0.55); background: var(--panel); box-shadow: var(--shadow-lg); backdrop-filter: blur(18px);
}
.stat-card { padding: 20px; border-radius: var(--radius-lg); display: grid; gap: 16px; animation: rise 520ms ease both; }
.stat-card strong { font-size: 2rem; }
.stat-card span, .stat-card small { color: #5e6d69; }
.grid-two { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr); gap: 20px; }
.panel-card, .table-card, .form-card, .highlight-card { border-radius: var(--radius-xl); padding: 24px; }
.panel-card h3, .table-card h3, .form-card h3, .highlight-card h3 { margin: 0 0 10px; font-size: 1.3rem; }
.panel-header, .table-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.kpi-list, .mini-list { display: grid; gap: 14px; }
.kpi-item, .mini-item {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 16px;
  border-radius: 18px; background: rgba(255, 255, 255, 0.68); border: 1px solid var(--line);
}
.bar-chart { display: grid; align-items: end; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; height: 220px; }
.bar-chart figure { margin: 0; display: grid; gap: 10px; align-items: end; justify-items: center; }
.bar-chart .bar {
  width: 100%; border-radius: 18px 18px 8px 8px; min-height: 20px;
  background: linear-gradient(180deg, #0f766e 0%, #0a4f4a 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.bar-chart figcaption { font-size: 0.84rem; color: var(--muted); }
.bar-chart strong { font-size: 0.88rem; }
.flash { margin-bottom: 18px; padding: 14px 18px; border-radius: 18px; box-shadow: var(--shadow-md); }
.flash.success { background: rgba(45, 143, 96, 0.12); color: #1e6f4b; }
.flash.error { background: rgba(197, 79, 69, 0.12); color: #8e322b; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 14px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table th { color: var(--muted); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; }
.table-thumb {
  width: 58px; height: 58px; border-radius: 16px; object-fit: cover;
  background: linear-gradient(135deg, #d9ebe7, #fbf1dd); border: 1px solid var(--line);
}
.badge {
  display: inline-flex; align-items: center; justify-content: center; padding: 7px 12px;
  border-radius: 999px; font-size: 0.82rem; font-weight: 700;
}
.badge.active, .badge.success { background: rgba(45, 143, 96, 0.14); color: #1e6f4b; }
.badge.inactive, .badge.warning { background: rgba(243, 167, 18, 0.18); color: #8f5c00; }
.badge.danger { background: rgba(197, 79, 69, 0.14); color: #8e322b; }
.table-actions, .inline-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn, .btn-link, .icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.btn { padding: 12px 16px; border-radius: 16px; font-weight: 700; }
.btn:hover, .icon-btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, #0f766e, #125b55); color: #fff; box-shadow: 0 18px 30px rgba(15, 118, 110, 0.22); }
.btn-secondary { background: rgba(255, 255, 255, 0.92); color: var(--text); border: 1px solid var(--line); }
.btn-danger { background: rgba(197, 79, 69, 0.12); color: #8e322b; }
.btn-link { background: transparent; color: var(--accent-strong); padding: 0; }
.icon-btn { width: 44px; height: 44px; border-radius: 14px; background: rgba(255, 255, 255, 0.92); border: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 700; }
.field input, .field select, .field textarea {
  width: 100%; padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(19, 35, 33, 0.12);
  background: rgba(255, 255, 255, 0.9); color: var(--text); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.field textarea { min-height: 110px; resize: vertical; }
.details-card { margin-top: 12px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.6); }
.details-card summary { list-style: none; cursor: pointer; padding: 14px 18px; font-weight: 700; }
.details-card summary::-webkit-details-marker { display: none; }
.details-content { padding: 0 18px 18px; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 26px; }
.login-card {
  width: min(1080px, 100%); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  overflow: hidden; border-radius: 36px; box-shadow: var(--shadow-lg); background: rgba(255, 255, 255, 0.82); backdrop-filter: blur(24px);
}
.login-aside {
  padding: 42px; color: #f8fffe;
  background: radial-gradient(circle at 20% 20%, rgba(243, 167, 18, 0.48), transparent 24%),
    radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.18), transparent 12%),
    linear-gradient(145deg, #123531 0%, #0f766e 100%);
}
.login-hero { max-width: 520px; }
.eyebrow {
  display: inline-flex; padding: 9px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.12);
  font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.14em;
}
.login-hero h2 { margin: 18px 0 14px; font-family: "Space Grotesk", sans-serif; font-size: clamp(2rem, 4vw, 3.7rem); line-height: 0.95; }
.login-list { display: grid; gap: 14px; margin-top: 24px; }
.login-list div { padding: 14px 16px; border-radius: 18px; background: rgba(255, 255, 255, 0.1); }
.login-form { padding: 42px; }
.login-form form { display: grid; gap: 16px; margin-top: 26px; }
.login-form .btn { width: 100%; margin-top: 6px; }
.login-meta { margin-top: 18px; color: var(--muted); font-size: 0.92rem; }
.mobile-toggle { display: none; }
@keyframes rise { from { opacity: 0; transform: translateY(18px);} to { opacity: 1; transform: translateY(0);} }
@media (max-width: 1160px) {
  .stats-grid, .grid-two, .login-card { grid-template-columns: 1fr; }
  .bar-chart { height: 180px; }
}
@media (max-width: 920px) {
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; width: min(320px, 86vw); transform: translateX(-100%);
    transition: transform 220ms ease; z-index: 30;
  }
  .sidebar.is-open { transform: translateX(0); }
  .mobile-toggle { display: inline-flex; }
  .main-content { padding: 18px; }
  .topbar { flex-direction: column; align-items: stretch; }
}
@media (max-width: 720px) {
  .form-grid, .stats-grid { grid-template-columns: 1fr; }
  .panel-card, .table-card, .form-card, .highlight-card, .login-form, .login-aside { padding: 20px; }
  .data-table { display: block; overflow-x: auto; }
}

