/* ─────────────────────────── Mlima Moto · Theme ───────────────────────────
   Cream + butter-yellow + ink palette. Glass cards with reduced opacity over
   a soft gradient background with floating yellow blobs.
─────────────────────────────────────────────────────────────────────────── */

:root {
  --cream:        #f5efe1;
  --cream-soft:   #faf6ec;
  --cream-deep:   #ece4d2;
  --butter:       #f4d35e;
  --butter-soft:  #fde68a;
  --butter-deep:  #d4a82a;
  --ink:          #0f1115;
  --ink-700:      #1f242c;
  --ink-500:      #4b5363;
  --ink-300:      #8a93a3;
  --line:         rgba(15, 17, 21, 0.08);
  --line-soft:    rgba(15, 17, 21, 0.05);
  --surface:      rgba(255, 255, 255, 0.72);
  --surface-hi:   rgba(255, 255, 255, 0.92);
  --surface-ink:  rgba(15, 17, 21, 0.92);
  --shadow-sm:    0 1px 2px rgba(15, 17, 21, 0.04);
  --shadow:       0 4px 14px rgba(15, 17, 21, 0.05), 0 18px 40px rgba(15, 17, 21, 0.05);
  --shadow-lg:    0 8px 30px rgba(15, 17, 21, 0.08), 0 30px 60px rgba(244, 211, 94, 0.08);
  --r-xs: 10px;
  --r-sm: 14px;
  --r:    20px;
  --r-lg: 26px;
  --r-pill: 999px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: 'Poppins', -apple-system, system-ui, sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

body {
  background:
    radial-gradient(circle at 8% 12%, rgba(244, 211, 94, 0.32), transparent 38%),
    radial-gradient(circle at 92% 88%, rgba(244, 211, 94, 0.22), transparent 42%),
    radial-gradient(circle at 78% 18%, rgba(253, 230, 138, 0.30), transparent 35%),
    linear-gradient(180deg, var(--cream-soft) 0%, var(--cream) 60%, var(--cream-deep) 100%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button, input, select, textarea { font-family: inherit; }

/* ─────────────────────────── Shell ─────────────────────────── */
.app-shell { display: flex; min-height: 100vh; }
.app-main  { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-content { padding: 22px 28px 60px; flex: 1; }

/* ─────────────────────────── Sidebar ─────────────────────────── */
.app-sidebar {
  width: 248px; flex: none;
  padding: 22px 14px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-right: 1px solid var(--line-soft);
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
  display: flex; flex-direction: column;
}
.app-sidebar::-webkit-scrollbar { width: 6px; }
.app-sidebar::-webkit-scrollbar-thumb { background: rgba(15, 17, 21, 0.12); border-radius: 3px; }

.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 10px 18px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 14px;
}
.brand-logo {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, var(--butter) 0%, var(--butter-deep) 100%);
  display: grid; place-items: center;
  color: var(--ink); font-weight: 800; font-size: 18px;
  box-shadow: 0 6px 14px rgba(244, 211, 94, 0.35);
}
.brand-logo-img { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.brand-name { font-weight: 700; font-size: 15px; color: var(--ink); letter-spacing: -.01em; }
.brand-sub  { font-size: 10.5px; color: var(--amber, #f59e0b); margin-top: 1px; font-weight: 500; }

.nav-group { margin-bottom: 16px; }
.nav-group-label {
  font-size: 9.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--ink-300);
  padding: 0 12px 6px;
}
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; margin: 1px 0; border-radius: 12px;
  color: var(--ink-500); font-size: 13px; font-weight: 500;
  transition: all .16s ease;
  position: relative;
}
.nav-link i { font-size: 16px; opacity: .85; }
.nav-link:hover { background: rgba(244, 211, 94, 0.18); color: var(--ink); }
.nav-link.active {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 6px 16px rgba(15, 17, 21, 0.18);
}
.nav-link.active i { color: var(--butter); opacity: 1; }
.nav-new-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--butter);
  margin-left: auto; box-shadow: 0 0 0 4px rgba(244, 211, 94, 0.25);
}

.sidebar-foot {
  margin-top: auto;
  padding: 14px 12px 4px;
  font-size: 10.5px;
  color: var(--ink-300);
  border-top: 1px solid var(--line-soft);
}

/* ─────────────────────────── Header ─────────────────────────── */
.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-soft);
  position: sticky; top: 0; z-index: 20;
}
.page-title { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.page-subtitle { margin: 2px 0 0; font-size: 12px; color: var(--ink-500); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line-soft);
  color: var(--ink-500);
  cursor: pointer; transition: all .15s ease;
  position: relative;
}
.icon-btn:hover { background: var(--butter-soft); color: var(--ink); transform: translateY(-1px); }
.icon-btn i { font-size: 16px; }
.icon-btn .dot {
  position: absolute; top: 8px; right: 9px;
  width: 7px; height: 7px; border-radius: 50%;
  background: #ef4444; border: 2px solid #fff;
}

.user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 5px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-pill);
  cursor: pointer; transition: all .15s ease;
}
.user-chip:hover { background: var(--butter-soft); }
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink); color: var(--butter);
  font-size: 12.5px; font-weight: 700;
}
.user-chip-name { font-size: 12.5px; font-weight: 600; color: var(--ink); }

.hamburger { display: none; }
@media (max-width: 991px) {
  .hamburger { display: grid; }
  .app-sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 100;
    transform: translateX(-100%); transition: transform .25s ease;
  }
  .app-sidebar.open { transform: translateX(0); box-shadow: 0 0 60px rgba(0,0,0,.25); }
  .app-content { padding: 16px 14px 60px; }
  .app-header { padding: 12px 14px; }
}

/* ─────────────────────────── Cards / Panels ─────────────────────────── */
.panel {
  background: var(--surface);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  transition: transform .2s, box-shadow .2s;
}
.panel:hover { box-shadow: var(--shadow-lg); }
.panel--ink {
  background: var(--ink);
  border-color: rgba(255,255,255,0.06);
  color: #fff;
}
.panel--ink * { color: inherit; }
.panel--butter {
  background: linear-gradient(135deg, var(--butter) 0%, var(--butter-soft) 100%);
  border-color: transparent;
}
.panel--flush { padding: 0; overflow: hidden; }

.panel-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px; margin-bottom: 14px;
}
.panel-title {
  margin: 0; font-size: 14.5px; font-weight: 700;
  display: flex; align-items: center; gap: 8px; color: var(--ink);
}
.panel--ink .panel-title { color: #fff; }
.panel-title i { color: var(--butter-deep); }
.panel--ink .panel-title i { color: var(--butter); }
.panel-sub { margin: 2px 0 0; font-size: 11.5px; color: var(--ink-500); }
.panel--ink .panel-sub { color: rgba(255,255,255,0.6); }
.panel-link {
  font-size: 12px; font-weight: 600; color: var(--ink-500);
  display: inline-flex; align-items: center; gap: 4px;
}
.panel-link:hover { color: var(--ink); }

/* ─────────────────────────── Buttons / Pills ─────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: all .15s ease;
}
.btn-ink     { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-700); transform: translateY(-1px); }
.btn-butter  { background: var(--butter); color: var(--ink); }
.btn-butter:hover { background: var(--butter-deep); transform: translateY(-1px); }
.btn-ghost   { background: rgba(255,255,255,0.7); color: var(--ink); border-color: var(--line-soft); }
.btn-ghost:hover { background: #fff; }
.btn-danger  { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 600;
  background: rgba(15,17,21,0.06); color: var(--ink);
}
.pill-butter   { background: var(--butter); color: var(--ink); }
.pill-success  { background: #d1fadf; color: #03734a; }
.pill-warning  { background: #fef3c7; color: #92400e; }
.pill-info     { background: #dbeafe; color: #1d4ed8; }
.pill-danger   { background: #fee2e2; color: #b91c1c; }
.pill-ink      { background: var(--ink); color: var(--butter); }

/* ─────────────────────────── Forms ─────────────────────────── */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 760px) { .form-grid { grid-template-columns: 1fr; } }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label, .form-label {
  font-size: 11.5px; font-weight: 600; color: var(--ink-500);
  text-transform: uppercase; letter-spacing: .04em;
}
.form-control, .form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 10px 14px;
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 13.5px; color: var(--ink);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  border-color: var(--butter-deep);
  box-shadow: 0 0 0 4px rgba(244, 211, 94, 0.18);
}
.form-field textarea { min-height: 88px; resize: vertical; }

/* ─────────────────────────── Tables ─────────────────────────── */
.tbl {
  width: 100%; border-collapse: collapse;
}
.tbl th {
  text-align: left;
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-500); padding: 12px 16px;
  background: rgba(15,17,21,0.025); border-bottom: 1px solid var(--line-soft);
}
.tbl td {
  padding: 12px 16px; border-bottom: 1px solid var(--line-soft);
  font-size: 13px; vertical-align: middle;
}
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: rgba(244, 211, 94, 0.08); }
.tbl a { font-weight: 600; }

/* ─────────────────────────── Flash messages ─────────────────────────── */
.flash-area { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.flash {
  padding: 11px 16px; border-radius: 12px; font-size: 13px; font-weight: 500;
  border: 1px solid var(--line-soft);
  background: rgba(255,255,255,0.85);
}
.flash-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.flash-error   { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.flash-info    { background: #fef9c3; border-color: var(--butter-soft); color: #713f12; }

/* ─────────────────────────── Login ─────────────────────────── */
.login-shell {
  min-height: 100vh; display: grid; place-items: center;
  padding: 30px;
}
.login-card {
  width: 100%; max-width: 880px;
  display: grid; grid-template-columns: 1.1fr 1fr;
  background: var(--surface-hi);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  min-height: 520px;
}
@media (max-width: 760px) { .login-card { grid-template-columns: 1fr; } }
.login-hero {
  background:
    radial-gradient(circle at 30% 20%, rgba(244, 211, 94, 0.85), transparent 60%),
    linear-gradient(135deg, var(--ink) 0%, var(--ink-700) 100%);
  color: #fff; padding: 40px 36px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.login-hero::after {
  content: ""; position: absolute; right: -60px; bottom: -60px;
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 211, 94, 0.25), transparent 70%);
}
.login-hero h1 { font-size: 28px; margin: 0 0 10px; line-height: 1.15; }
.login-hero h1 span { color: var(--butter); }
.login-hero p { font-size: 13.5px; color: rgba(255,255,255,0.78); margin: 0; }
.login-form { padding: 40px 36px; display: flex; flex-direction: column; justify-content: center; }
.login-form h2 { font-size: 22px; font-weight: 700; margin: 0 0 6px; }
.login-form > p { color: var(--ink-500); margin: 0 0 22px; font-size: 13px; }

/* ─────────────────────────── Hero / welcome ─────────────────────────── */
.welcome-row {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; margin-bottom: 18px;
}
@media (max-width: 1100px) { .welcome-row { grid-template-columns: 1fr; } }
.welcome-card {
  display: flex; align-items: center; gap: 22px;
  padding: 22px 26px;
}
.welcome-avatar {
  width: 92px; height: 92px; border-radius: 50%;
  background: linear-gradient(135deg, var(--butter) 0%, var(--butter-deep) 100%);
  display: grid; place-items: center;
  font-size: 30px; font-weight: 800; color: var(--ink);
  box-shadow: 0 10px 24px rgba(244, 211, 94, 0.35);
  flex: none;
  border: 4px solid #fff;
}
.welcome-card h1 { font-size: 26px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.welcome-card p  { margin: 4px 0 0; color: var(--ink-500); font-size: 13px; }
.welcome-stats { display: flex; gap: 22px; margin-top: 12px; }
.welcome-stat-label { font-size: 10px; text-transform: uppercase; color: var(--ink-300); letter-spacing: .07em; font-weight: 700; }
.welcome-stat-value { font-size: 18px; font-weight: 700; color: var(--ink); }

/* KPI tiles row */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
@media (max-width: 1100px) { .kpi-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .kpi-row { grid-template-columns: 1fr; } }
.kpi {
  background: var(--surface);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.kpi-icon {
  width: 36px; height: 36px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--cream-deep); color: var(--ink);
  margin-bottom: 10px;
}
.kpi--accent .kpi-icon { background: var(--butter); color: var(--ink); }
.kpi-label { font-size: 10.5px; color: var(--ink-500); text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
.kpi-value { font-size: 26px; font-weight: 800; color: var(--ink); margin-top: 3px; line-height: 1.05; }
.kpi-foot  { font-size: 11.5px; color: var(--ink-500); margin-top: 4px; }

/* Dashboard grids */
.row-2-1   { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; margin-bottom: 18px; }
.row-1-1   { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.row-1-1-1 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; margin-bottom: 18px; }
@media (max-width: 1100px) {
  .row-2-1, .row-1-1, .row-1-1-1 { grid-template-columns: 1fr; }
}

.chart-box { position: relative; height: 280px; }
.chart-box--md { height: 220px; }
.chart-box--sm { height: 160px; }

/* Foundation school progress ring */
.ring-card { display: flex; flex-direction: column; align-items: center; padding: 24px; }
.ring-wrap {
  width: 180px; height: 180px; position: relative;
  margin-bottom: 16px;
}
.ring-center {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 32px; font-weight: 800; color: var(--ink);
}
.ring-center small { display: block; font-size: 11px; font-weight: 600; color: var(--ink-500); text-transform: uppercase; letter-spacing: .06em; }

/* Onboarding-style task card */
.task-card { padding: 18px 20px; }
.task-list { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 12px; }
.task-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
}
.task-icon {
  width: 32px; height: 32px; border-radius: 10px; flex: none;
  display: grid; place-items: center; font-size: 14px;
  background: rgba(244, 211, 94, 0.15); color: var(--butter);
}
.task-meta { flex: 1; min-width: 0; }
.task-title { font-size: 13px; font-weight: 600; color: #fff; }
.task-sub { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 2px; }
.task-check {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--butter); color: var(--ink);
  font-size: 12px; font-weight: 700;
}
.task-check.empty { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.3); }

/* Compact list items */
.list-row {
  display: grid; grid-template-columns: 38px 1fr auto; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--line-soft);
  align-items: center;
}
.list-row:last-child { border-bottom: none; }
.list-icon {
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--cream-deep); color: var(--ink);
  display: grid; place-items: center; font-size: 16px;
}
.list-title { font-size: 13px; font-weight: 600; color: var(--ink); }
.list-sub   { font-size: 11px; color: var(--ink-500); margin-top: 2px; }
.list-meta  { font-size: 12px; color: var(--ink-500); white-space: nowrap; }

/* Empty state */
.empty {
  text-align: center; padding: 36px 18px; color: var(--ink-500);
}
.empty i { font-size: 36px; color: var(--butter-deep); display: block; margin-bottom: 8px; }
.empty h4 { font-size: 14px; font-weight: 600; margin: 0 0 4px; color: var(--ink); }
.empty p { font-size: 12px; margin: 0; }

/* Page header (lists) */
.page-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-bottom: 18px; flex-wrap: wrap;
}
.page-head h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.page-head p  { margin: 4px 0 0; color: var(--ink-500); font-size: 13px; }

/* Search bar */
.search-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-pill);
  width: 100%; max-width: 320px;
}
.search-bar input {
  border: none; background: transparent; outline: none;
  flex: 1; font-size: 13px; padding: 4px 0;
}
.search-bar i { color: var(--ink-300); }

/* Member card grid */
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.member-card {
  background: var(--surface);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  padding: 18px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; transition: all .18s;
}
.member-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.member-photo {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, var(--butter) 0%, var(--butter-deep) 100%);
  display: grid; place-items: center;
  font-size: 26px; font-weight: 700; color: var(--ink);
  margin-bottom: 12px; border: 3px solid #fff;
  box-shadow: 0 6px 14px rgba(244,211,94,0.3);
  overflow: hidden;
}
.member-photo img { width: 100%; height: 100%; object-fit: cover; }
.member-name { font-size: 14px; font-weight: 700; color: var(--ink); }
.member-meta { font-size: 11.5px; color: var(--ink-500); margin-top: 3px; }
.member-tags { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-top: 10px; }

/* Pagination */
.pager {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 18px 0 4px;
}
.pager a, .pager span {
  display: grid; place-items: center;
  min-width: 32px; height: 32px; padding: 0 10px;
  border-radius: 10px; font-size: 12.5px; font-weight: 600;
  background: rgba(255,255,255,0.7); color: var(--ink-500);
  border: 1px solid var(--line-soft);
}
.pager .current { background: var(--ink); color: var(--butter); border-color: var(--ink); }

/* Bootstrap dropdown override (for tweaks) */
.dropdown-menu {
  border-radius: 14px !important; border: 1px solid var(--line-soft) !important;
  box-shadow: var(--shadow) !important; padding: 6px !important;
  font-size: 13px;
}
.dropdown-item { border-radius: 8px !important; padding: 8px 12px !important; }
.dropdown-item:hover { background: var(--butter-soft) !important; }

/* Misc utilities */
.muted { color: var(--ink-500); }
.tnum  { font-variant-numeric: tabular-nums; }
.text-end { text-align: right; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 14px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 14px; }
.gap-2 { gap: 8px; } .gap-3 { gap: 14px; }
.flex { display: flex; } .flex-1 { flex: 1; } .items-center { align-items: center; }
.justify-between { justify-content: space-between; } .justify-end { justify-content: flex-end; }
