:root {
  --ink: #16231C;
  --paper: #FFFFFF;
  --surface: #F3F5F1;
  --primary: #1F6E5C;
  --primary-dark: #164F42;
  --accent: #C98A2B;
  --accent-dark: #A66F1F;
  --border: #DEE4DE;
  --danger: #B3432D;
  --success-bg: #E7F2EC;
  --success-text: #1F6E5C;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--ink);
  background: var(--surface);
}

h1, h2, h3, h4, .display-font {
  font-family: 'Fraunces', Georgia, serif;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.section-title {
  border-left: 4px solid var(--primary);
  padding-left: 0.75rem;
  margin: 2.5rem 0 1.25rem;
  font-size: 1.4rem;
  font-weight: 600;
}
.section-title:first-of-type { margin-top: 0.5rem; }

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

.btn-gold {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-gold:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }

.card-flat {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.table-wrap {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow-x: auto;
}
.table-wrap table { margin-bottom: 0; }
.table-wrap thead th {
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  font-weight: 600;
  white-space: nowrap;
}

.pill {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}
.pill-amber { background: #FBF0DC; color: #8A5A0B; }
.pill-blue { background: #E4EBF2; color: #33546E; }
.pill-green { background: var(--success-bg); color: var(--success-text); }

.alert-success {
  background: var(--success-bg);
  border: 1px solid var(--primary);
  color: var(--primary-dark);
}

.table-wrap td { vertical-align: middle; }

.dash-shell { display: flex; flex-direction: column; min-height: 100vh; }
@media (min-width: 768px) { .dash-shell { flex-direction: row; } }

.dash-sidebar { background: #101B2D; color: #fff; padding: 1rem 1.25rem; }
@media (min-width: 768px) {
  .dash-sidebar { width: 250px; flex-shrink: 0; min-height: 100vh; position: sticky; top: 0; }
}

.dash-brand { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem; }
.dash-brand-icon {
  width: 40px; height: 40px; border-radius: 10px; background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif; font-weight: 600; color: #fff; flex-shrink: 0;
}
.dash-brand-text { line-height: 1.2; }
.dash-brand-text .name { font-weight: 600; }
.dash-brand-text .sub { font-size: .78rem; color: #8FA0B8; }

.dash-nav { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .25rem; }
@media (min-width: 768px) { .dash-nav { flex-direction: column; overflow: visible; } }
.dash-nav a {
  color: #B7C4D6; padding: .55rem .85rem; border-radius: 8px; text-decoration: none;
  white-space: nowrap; font-size: .9rem;
}
.dash-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }

.dash-main { flex: 1; padding: 1.25rem; min-width: 0; }
.dash-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 1.5rem; flex-wrap: wrap; gap: .75rem;
}
.dash-header h1 { font-size: 1.5rem; margin-bottom: .2rem; }
.dash-header p { color: #6B7A72; margin: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.1rem; display: flex; align-items: center; gap: .85rem; }
.stat-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.stat-icon.green { background: var(--success-bg); color: var(--primary); }
.stat-icon.blue { background: #E4EBF2; color: #33546E; }
.stat-icon.amber { background: #FBF0DC; color: #8A5A0B; }
.stat-value { font-family: 'Fraunces', serif; font-size: 1.5rem; font-weight: 600; line-height: 1; }
.stat-label { color: #6B7A72; font-size: .82rem; }

/* --- Polish layer: depth, motion, focus states --- */
.btn {
  border-radius: .55rem;
  font-weight: 600;
  padding: .55rem 1.1rem;
  transition: all .15s ease;
}
.btn-brand:hover, .btn-gold:hover { transform: translateY(-1px); box-shadow: 0 4px 10px -4px rgba(16,35,28,.25); }
.btn-outline-secondary, .btn-outline-danger {
  border-radius: .55rem;
  transition: all .15s ease;
}
.btn-outline-secondary:hover, .btn-outline-danger:hover { transform: translateY(-1px); }

.form-control, .form-select {
  border-radius: .55rem;
  border: 1px solid var(--border);
  padding: .55rem .8rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31,110,92,.15);
}

.card-flat, .stat-card {
  box-shadow: 0 1px 2px rgba(16,35,28,.04), 0 6px 16px -8px rgba(16,35,28,.10);
  transition: box-shadow .2s ease, transform .2s ease;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px -4px rgba(16,35,28,.15); }

.table-wrap {
  box-shadow: 0 1px 2px rgba(16,35,28,.04), 0 6px 16px -8px rgba(16,35,28,.08);
  border: none;
}
.table-wrap thead th {
  text-transform: uppercase;
  font-size: .72rem;
  letter-spacing: .03em;
  color: #6B7A72;
  font-weight: 600;
}
.table-wrap tbody tr { transition: background .12s ease; }
.table-wrap tbody tr:hover { background: var(--surface); }

.dash-brand-icon {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 3px 8px -2px rgba(31,110,92,.5);
}

.dash-nav a {
  display: flex; align-items: center; gap: .55rem;
  transition: background .15s ease, color .15s ease, padding-left .15s ease;
  border-left: 3px solid transparent;
}
.dash-nav a:hover { background: rgba(255,255,255,.08); color: #fff; border-left-color: var(--accent); padding-left: 1rem; }

.pill { transition: transform .12s ease; }
