/* ============================================================
   KINDRED IMPACT — Stylesheet
   Palette: Deep Teal + Warm Cream + Gold
   Fonts: Cormorant Garamond (display) + DM Sans (body)
   ============================================================ */

:root {
  --teal-900: #0D2B2A;
  --teal-800: #143D3B;
  --teal-700: #1B5452;
  --teal-500: #2D7A76;
  --teal-300: #5AADA9;
  --teal-100: #C8ECEA;
  --gold:     #C9A84C;
  --gold-lt:  #E8CF82;
  --cream:    #FFFBF2;
  --cream-dk: #F5F0E4;
  --sand:     #E8DFC8;
  --text:     #1A1A1A;
  --text-med: #4A4A4A;
  --text-lt:  #7A7A7A;
  --red:      #C0392B;
  --green:    #27AE60;
  --orange:   #E67E22;
  --sidebar-w: 260px;
  --radius:    10px;
  --shadow:    0 2px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
}

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

html, body {
  height: 100%;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  background: var(--cream);
  color: var(--text);
}

/* ── APP SHELL ── */
.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--teal-900);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand-icon {
  font-size: 22px;
  color: var(--gold);
  flex-shrink: 0;
}

.brand-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--cream);
  letter-spacing: .02em;
}

.brand-sub {
  font-size: 10px;
  color: var(--teal-300);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-top: 1px;
}

.sidebar-org {
  font-size: 11px;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 12px 20px 8px;
}

.nav-list {
  list-style: none;
  padding: 4px 10px;
  flex: 1;
}

.nav-list li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 7px;
  color: rgba(255,255,255,.65);
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  transition: background .15s, color .15s;
}

.nav-list li a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-list li a.active { background: var(--teal-700); color: #fff; font-weight: 500; }
.nav-list li a.active .ni { color: var(--gold); }

.ni { font-size: 15px; opacity: .8; }
.nav-divider { height: 1px; background: rgba(255,255,255,.08); margin: 10px 4px; }

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--teal-500);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-name { font-size: 13px; color: #fff; font-weight: 500; }
.user-role { font-size: 11px; color: var(--teal-300); text-transform: capitalize; }

.logout-btn {
  display: block;
  text-align: center;
  padding: 7px;
  border-radius: 6px;
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.55);
  text-decoration: none;
  font-size: 12px;
  transition: background .15s, color .15s;
}
.logout-btn:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ── MAIN CONTENT ── */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.page-header {
  padding: 24px 32px 0;
  border-bottom: 1px solid var(--sand);
  background: var(--cream);
}

.page-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 600;
  color: var(--teal-900);
  padding-bottom: 16px;
  letter-spacing: -.01em;
}

.page-body {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px;
}

/* ── CARDS ── */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
}

.card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--teal-800);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--cream-dk);
}

/* ── STAT GRID ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border-left: 3px solid var(--teal-500);
}

.stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-lt); margin-bottom: 6px; }
.stat-value { font-family: 'Cormorant Garamond', serif; font-size: 32px; font-weight: 600; color: var(--teal-800); }
.stat-sub   { font-size: 11px; color: var(--text-lt); margin-top: 4px; }

/* ── TABLES ── */
.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }
thead tr { border-bottom: 2px solid var(--sand); }
th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-lt);
  font-weight: 500;
  padding: 0 12px 10px;
}
td {
  padding: 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--cream-dk);
  color: var(--text-med);
  vertical-align: middle;
}
tbody tr:hover { background: var(--cream); }
tbody tr:last-child td { border-bottom: none; }

/* ── BADGES ── */
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .03em;
}
.badge-green  { background: #D5F5E3; color: #1E8449; }
.badge-orange { background: #FDEBD0; color: #A04000; }
.badge-red    { background: #FADBD8; color: #922B21; }
.badge-blue   { background: #D6EAF8; color: #1A5276; }
.badge-gray   { background: #EAECEE; color: #626567; }
.badge-gold   { background: #FEF9E7; color: #9A7D0A; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: opacity .15s, transform .1s;
}
.btn:hover { opacity: .88; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--teal-700); color: #fff; }
.btn-gold    { background: var(--gold); color: #fff; }
.btn-outline { background: transparent; border: 1.5px solid var(--sand); color: var(--text-med); }
.btn-danger  { background: var(--red); color: #fff; }
.btn-sm { padding: 5px 12px; font-size: 12px; }

.btn-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* ── FORMS ── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }

label { font-size: 12px; font-weight: 500; color: var(--text-med); letter-spacing: .02em; }

input[type=text], input[type=email], input[type=password],
input[type=date], input[type=number], select, textarea {
  padding: 9px 12px;
  border: 1.5px solid var(--sand);
  border-radius: 7px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--text);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(45,122,118,.1);
}
textarea { resize: vertical; min-height: 90px; }

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-med);
}
.checkbox-row input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--teal-700); }

/* ── ALERTS ── */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 20px;
}
.alert-success { background: #D5F5E3; color: #1E8449; border-left: 3px solid var(--green); }
.alert-error   { background: #FADBD8; color: #922B21; border-left: 3px solid var(--red); }
.alert-warn    { background: #FDEBD0; color: #A04000; border-left: 3px solid var(--orange); }

/* ── URGENT CARD ── */
.urgent-list { display: flex; flex-direction: column; gap: 10px; }
.urgent-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px;
  background: var(--cream);
  border-radius: 8px;
  border-left: 3px solid var(--gold);
}
.urgent-item.red-border { border-left-color: var(--red); }
.urgent-name { font-weight: 500; font-size: 13px; color: var(--teal-800); }
.urgent-meta { font-size: 12px; color: var(--text-lt); margin-top: 2px; }

/* ── DEGREE BUBBLES ── */
.degree-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  font-weight: 600;
  font-size: 12px;
  background: var(--teal-100);
  color: var(--teal-700);
  flex-shrink: 0;
}

/* ── LOGIN PAGE ── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--teal-900);
  background-image: radial-gradient(ellipse at 30% 50%, rgba(45,122,118,.3) 0%, transparent 60%),
                    radial-gradient(ellipse at 70% 20%, rgba(201,168,76,.15) 0%, transparent 50%);
}

.login-box {
  background: var(--cream);
  border-radius: 16px;
  padding: 48px 44px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}

.login-brand {
  text-align: center;
  margin-bottom: 32px;
}

.login-brand .brand-icon { font-size: 32px; color: var(--gold); display: block; margin-bottom: 10px; }

.login-brand h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 600;
  color: var(--teal-900);
}

.login-brand p { font-size: 13px; color: var(--text-lt); margin-top: 4px; }

.login-form { display: flex; flex-direction: column; gap: 16px; }

.login-form input {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
}

.login-submit {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  background: var(--teal-700);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background .15s;
}
.login-submit:hover { background: var(--teal-500); }

.login-error {
  background: #FADBD8;
  color: #922B21;
  border-radius: 7px;
  padding: 10px 14px;
  font-size: 13px;
  text-align: center;
}

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-lt);
}
.empty-state .empty-icon { font-size: 36px; margin-bottom: 12px; opacity: .4; }
.empty-state p { font-size: 14px; }

/* ── UTILITY ── */
.text-gold  { color: var(--gold); }
.text-teal  { color: var(--teal-700); }
.text-red   { color: var(--red); }
.text-muted { color: var(--text-lt); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.bold { font-weight: 600; }
.italic { font-style: italic; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 768px) { .two-col { grid-template-columns: 1fr; } }
