:root {
  --bg:        #f7f3e9;
  --surface:   #f0e9e0;
  --fg:        #5c2d3f;
  --accent:    #0f3b3a;
  --border:    #7a4254;
  --muted:     #a88792;
  --white:     #ffffff;
  --danger:    #c0392b;
  --success:   #1a6b4a;
  --warning:   #b7770d;
  --info:      #1a4a6b;

  --font-head: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Cambria', Georgia, serif;
  --font-mono: 'Consolas', 'Courier New', monospace;

  --radius:    8px;
  --radius-lg: 16px;
  --shadow:    0 2px 12px rgba(15,59,58,0.10);
  --shadow-lg: 0 8px 32px rgba(15,59,58,0.16);

  --nav-w:     240px;
  --header-h:  56px;
  --transition: 0.18s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

button {
  cursor: pointer;
  font-family: var(--font-head);
  border: none;
  border-radius: var(--radius);
  transition: opacity var(--transition), background var(--transition);
}
button:hover { opacity: 0.88; }
button:disabled { opacity: 0.45; cursor: not-allowed; }

input, textarea, select {
  font-family: var(--font-body);
  font-size: 0.95rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--fg);
  padding: 0.5rem 0.75rem;
  outline: none;
  transition: border-color var(--transition);
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }

/* ── Layout ── */
#app { display: flex; width: 100%; min-height: 100vh; }

/* ── Sidebar ── */
#sidebar {
  width: var(--nav-w);
  min-height: 100vh;
  background: var(--accent);
  color: var(--white);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
}
#sidebar .brand {
  padding: 1.25rem 1rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
#sidebar .brand .logo-text {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.04em;
}
#sidebar .brand .sub {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.55);
  margin-top: 2px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
#sidebar nav { flex: 1; padding: 0.75rem 0; }
#sidebar nav a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 1rem;
  color: rgba(255,255,255,0.78);
  font-family: var(--font-head);
  font-size: 0.88rem;
  border-left: 3px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
}
#sidebar nav a:hover,
#sidebar nav a.active {
  color: var(--white);
  background: rgba(255,255,255,0.08);
  border-left-color: var(--bg);
}
#sidebar nav a .icon { font-size: 1.1rem; width: 1.4rem; text-align: center; }
#sidebar .sidebar-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.4);
}

/* ── Main content ── */
#main {
  margin-left: var(--nav-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
#topbar {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
}
#topbar h1 {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--fg);
  flex: 1;
}
.page-content { flex: 1; padding: 1.5rem; }

/* ── Cards ── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.card-title {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius);
}
.btn-primary   { background: var(--accent); color: var(--white); }
.btn-secondary { background: var(--surface); color: var(--fg); border: 1.5px solid var(--border); }
.btn-danger    { background: var(--danger); color: var(--white); }
.btn-ghost     { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.btn-sm        { padding: 0.3rem 0.75rem; font-size: 0.8rem; }
.btn-icon      { padding: 0.4rem; border-radius: 50%; background: transparent; color: var(--muted); }
.btn-icon:hover { background: var(--surface); color: var(--fg); }

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-head);
}
.badge-success { background: #d4edda; color: var(--success); }
.badge-danger  { background: #f8d7da; color: var(--danger); }
.badge-warning { background: #fff3cd; color: var(--warning); }
.badge-info    { background: #d1ecf1; color: var(--info); }
.badge-muted   { background: var(--surface); color: var(--muted); }

/* ── Toast ── */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast {
  min-width: 260px;
  max-width: 380px;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-size: 0.85rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  animation: slideIn 0.2s ease;
}
.toast-success { background: #d4edda; color: var(--success); border-left: 4px solid var(--success); }
.toast-error   { background: #f8d7da; color: var(--danger);  border-left: 4px solid var(--danger); }
.toast-warning { background: #fff3cd; color: var(--warning); border-left: 4px solid var(--warning); }
.toast-info    { background: #d1ecf1; color: var(--info);    border-left: 4px solid var(--info); }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,59,58,0.45);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.75rem;
  min-width: 340px;
  max-width: 600px;
  width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
}
.modal-title {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* ── Spinner ── */
.spinner {
  width: 1.4rem; height: 1.4rem;
  border: 3px solid var(--surface);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--muted); border-radius: 3px; }

/* ── Utilities ── */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.w-full { width: 100%; }
.text-muted { color: var(--muted); font-size: 0.85rem; }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }
.font-mono { font-family: var(--font-mono); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } #sidebar { display: none; } #main { margin-left: 0; } }
// v1787150832
