:root {
  --forest: #0d3b2e;
  --forest-mid: #145c43;
  --leaf: #1f8a56;
  --gold: #c4a35a;
  --cream: #f3f6f1;
  --ink: #1c2b24;
  --muted: #5d6f66;
  --sidebar: 268px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Source Sans 3", system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
}
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar);
  background: linear-gradient(180deg, #0b2f25 0%, #0f4634 55%, #145c43 100%);
  color: #e7f3ec;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 1.1rem 0.85rem;
}
.brand { display: flex; gap: 0.75rem; align-items: center; padding: 0.4rem 0.55rem 1.1rem; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px;
  background: rgba(196,163,90,.18); color: var(--gold);
  display: grid; place-items: center; font-size: 1.35rem;
}
.brand small { display: block; color: #b7d0c4; font-size: .75rem; }
.side-nav { display: flex; flex-direction: column; gap: .2rem; flex: 1; }
.side-nav a {
  color: #d7ebe2; text-decoration: none; padding: .55rem .7rem; border-radius: 10px;
  display: flex; gap: .55rem; align-items: center; font-weight: 500;
}
.side-nav a:hover, .side-nav a.active { background: rgba(255,255,255,.1); color: #fff; }
.side-foot a { color: #b7d0c4; text-decoration: none; padding: .5rem .7rem; display: block; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  background: var(--forest);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1.4rem;
}
.topbar-kicker { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.topbar-title {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.25rem;
  margin: 0;
}
.topbar-right { display: flex; align-items: center; gap: 1rem; }
.notify-bell { color: #fff; position: relative; font-size: 1.25rem; }
.notify-bell .badge {
  position: absolute; top: -8px; right: -10px;
  background: #e5533d; font-size: .65rem;
}
.user-chip { display: flex; align-items: center; gap: .6rem; }
.user-chip small { display: block; color: #c5ddd2; font-size: .75rem; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--gold); color: #1c2b24;
  display: grid; place-items: center; font-weight: 700;
}
.content { padding: 1.25rem 1.4rem 2rem; flex: 1; }
.app-footer { padding: .7rem 1.4rem; color: var(--muted); font-size: .85rem; }
.stat-card {
  background: #fff; border: 0; border-radius: 16px;
  box-shadow: 0 8px 24px rgba(13,59,46,.06);
  padding: 1rem 1.1rem;
  height: 100%;
}
.stat-card .k { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.stat-card .n { font-size: 1.85rem; font-weight: 700; color: var(--forest); }
.stat-card .hint { color: var(--muted); font-size: .8rem; }
.panel {
  background: #fff; border-radius: 16px; box-shadow: 0 8px 24px rgba(13,59,46,.06);
  padding: 1.15rem 1.2rem;
}
.panel h2, .panel h3 { font-size: 1.05rem; margin-bottom: 1rem; }
.pill { display: inline-block; border-radius: 999px; padding: .15rem .55rem; font-size: .75rem; font-weight: 600; }
.pill-ok { background: #e4f6ea; color: #146c43; }
.pill-warn { background: #fff4d6; color: #8a6a12; }
.pill-danger { background: #fde8e6; color: #b42318; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid #d5e4db; }
.timeline li { padding: 0 0 1rem 1.1rem; position: relative; }
.timeline li::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: var(--leaf); position: absolute; left: -6px; top: .35rem;
}
.auth-body {
  min-height: 100vh;
  background:
    linear-gradient(120deg, rgba(13,59,46,.88), rgba(20,92,67,.72)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cpath fill='%23ffffff10' d='M80 10c20 30 50 30 70 10-10 40-10 70 10 90-30 10-50 40-70 40s-40-30-70-40c20-20 20-50 10-90 20 20 50 20 70-10z'/%3E%3C/svg%3E");
  display: grid; place-items: center; padding: 1.5rem;
}
.auth-card {
  width: min(440px, 100%);
  background: #fff; border-radius: 20px; padding: 2rem;
  box-shadow: 0 24px 60px rgba(0,0,0,.18);
}
.auth-card h1 { font-family: "Source Serif 4", Georgia, serif; color: var(--forest); }
.btn-forest { background: var(--forest-mid); color: #fff; border: 0; }
.btn-forest:hover { background: var(--forest); color: #fff; }
.btn-gold { background: var(--gold); color: #1c2b24; border: 0; font-weight: 600; }
.table > :not(caption) > * > * { vertical-align: middle; }
.sidebar-canvas { background: #0b2f25; }
.form-label { font-weight: 600; color: #345046; font-size: .88rem; }
.empty { color: var(--muted); padding: 1.5rem; text-align: center; }
.progress-sla { height: 8px; }
@media (max-width: 991px) {
  .topbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: .5rem .75rem;
    padding: .75rem 1rem;
  }
  .topbar-right { gap: .45rem; }
  .user-chip div:nth-child(2) { max-width: 42vw; }
  .user-chip strong, .user-chip small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .content { padding: 1rem .9rem 1.5rem; }
  .mobile-form .form-control,
  .mobile-form .form-select,
  .mobile-form .form-control-lg,
  .mobile-form .form-select-lg {
    min-height: 48px;
    font-size: 16px;
  }
  .stat-card .n { font-size: 1.45rem; }
}
