/* ================================================================
   VIDYAGO — app.css
   Global tokens + dashboard layout + shared components.
   Do NOT duplicate any of these in page-level CSS.
================================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

/* ================================================================
   DESIGN TOKENS
================================================================ */
:root {
  /* Typography */
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;

  /* Brand — green */
  --forest: #0a2e1e;
  --forest2: #0d3d28;
  --forest3: #071a10;

  /* Brand — teal */
  --teal: #00a693;
  --teal-lt: #00c4ae;
  --teal-dim: #e6faf7;
  --teal-mid: rgba(0, 166, 147, 0.15);

  /* Brand — gold */
  --gold: #e6a800;
  --gold-lt: #f5c842;
  --gold-dim: #fef9e6;

  /* Surfaces */
  --bg: #ffffff;
  --surface: #f4f8f6;
  --surface2: #eef4f1;
  --border: #e4ece8;
  --border-dk: #d0ddd8;

  /* Text */
  --ink: #0d1f17;
  --ink2: #1f3329;
  --body: #374151;
  --muted: #5a7066;
  --muted-lt: #8fa89e;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(10, 46, 30, 0.06), 0 1px 2px rgba(10, 46, 30, 0.04);
  --shadow-md: 0 4px 16px rgba(10, 46, 30, 0.08), 0 2px 6px rgba(10, 46, 30, 0.05);
  --shadow-lg: 0 16px 48px rgba(10, 46, 30, 0.12), 0 4px 12px rgba(10, 46, 30, 0.06);

  /* Radii */
  --r-xs: 5px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-2xl: 28px;

  /* Status */
  --green: #16a34a;
  --green-bg: #f0fdf4;
  --green-border: #bbf7d0;
  --red: #dc2626;
  --red-bg: #fef2f2;
  --red-border: #fecaca;
  --amber: #d97706;
  --amber-bg: #fffbeb;
  --amber-border: #fde68a;
  --blue: #2563eb;
  --blue-bg: #eff6ff;
  --blue-border: #bfdbfe;

  /* Dashboard */
  --sb-bg: #071a10;
  --sb-width: 240px;
  --sb-item-h: 38px;
  --sb-text: rgba(255, 255, 255, 0.50);
  --sb-text-hover: rgba(255, 255, 255, 0.88);
  --sb-active-bg: rgba(0, 166, 147, 0.16);
  --sb-active-txt: #00c4ae;
  --sb-section-clr: rgba(255, 255, 255, 0.22);
  --tb-h: 56px;
  --tb-bg: #ffffff;
  --tb-border: #e4ece8;
  --page-bg: #f4f8f6;
  --card-bg: #ffffff;
  --card-border: #e4ece8;
  --card-radius: 10px;
  --card-shadow: 0 1px 3px rgba(10, 46, 30, 0.06);

  /* Spacing */
  --gap-xs: 8px;
  --gap-sm: 12px;
  --gap: 16px;
  --gap-md: 20px;
  --gap-lg: 24px;
  --gap-xl: 32px;
  --gap-2xl: 48px;

  /* Public nav height */
  --nav-h: 64px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* DM Serif Display only has weight 400 — never set font-weight on headings */
h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  color: var(--ink);
}

.font-display {
  font-family: var(--font-display) !important;
}

.font-body {
  font-family: var(--font-body) !important;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
}

input,
select,
textarea {
  font-family: var(--font-body);
  font-size: 14px;
}

/* ================================================================
   LOGO
================================================================ */
.vg-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  user-select: none;
  flex-shrink: 0;
}

.vg-logo__mark {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.vg-logo__word {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--forest);
  letter-spacing: -0.2px;
  line-height: 1;
}

.vg-logo__word em {
  font-style: italic;
  color: var(--teal);
}

.vg-logo--sm .vg-logo__mark {
  width: 28px;
  height: 28px;
}

.vg-logo--sm .vg-logo__word {
  font-size: 16px;
}

.vg-logo--lg .vg-logo__mark {
  width: 48px;
  height: 48px;
}

.vg-logo--lg .vg-logo__word {
  font-size: 26px;
}

.vg-logo--inv .vg-logo__word {
  color: #fff;
}

.vg-logo--inv .vg-logo__word em {
  color: var(--teal-lt);
}

/* ================================================================
   DASHBOARD SHELL
================================================================ */
.vg-shell {
  display: grid;
  grid-template-columns: var(--sb-width) 1fr;
  grid-template-rows: var(--tb-h) 1fr;
  grid-template-areas: "sidebar topbar" "sidebar content";
  min-height: 100vh;
}

/* ================================================================
   SIDEBAR
================================================================ */
.vg-sidebar {
  grid-area: sidebar;
  background: var(--sb-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sb-width);
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  z-index: 200;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.vg-sidebar::-webkit-scrollbar {
  display: none;
}

.sb-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  height: var(--tb-h);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  text-decoration: none;
}

.sb-brand__mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.sb-brand__word {
  font-family: var(--font-display);
  font-size: 18px;
  color: #fff;
  letter-spacing: -0.2px;
  line-height: 1;
}

.sb-brand__word em {
  font-style: italic;
  color: var(--teal-lt);
}

.sb-school {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.sb-school__row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.sb-school__logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
  overflow: hidden;
  flex-shrink: 0;
}

.sb-school__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sb-school__name {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.sb-school__role {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 10px;
  display: inline-block;
}

.sb-school__role--admin {
  background: var(--teal-dim);
  color: var(--teal-lt);
}

.sb-school__role--teacher {
  background: var(--gold-dim);
  color: var(--gold-lt);
}

.sb-nav {
  flex: 1;
  padding: 10px 0;
}

.sb-section {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--sb-section-clr);
  padding: 14px 16px 5px;
  font-family: var(--font-body);
}

.sb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  height: var(--sb-item-h);
  margin: 1px 6px;
  border-radius: 7px;
  color: var(--sb-text);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  transition: background .15s, color .15s;
  position: relative;
  white-space: nowrap;
  text-decoration: none;
}

.sb-item i {
  font-size: 15px;
  width: 18px;
  flex-shrink: 0;
  text-align: center;
}

.sb-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--sb-text-hover);
}

.sb-item.active {
  background: var(--sb-active-bg);
  color: var(--sb-active-txt);
  font-weight: 600;
}

.sb-item.active::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  background: var(--teal-lt);
  border-radius: 0 3px 3px 0;
}

.sb-badge {
  margin-left: auto;
  background: var(--teal);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  font-family: var(--font-body);
}

.sb-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 10px 6px;
  flex-shrink: 0;
}

.sb-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 8px;
  transition: background .15s;
  cursor: pointer;
  text-decoration: none;
}

.sb-user:hover {
  background: rgba(255, 255, 255, 0.05);
}

.sb-user__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--teal-dim);
  border: 1px solid rgba(255, 255, 255, 0.1);
  object-fit: cover;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--teal-lt);
  overflow: hidden;
}

.sb-user__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sb-user__name {
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.sb-user__logout {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.28);
  flex-shrink: 0;
  transition: color .15s;
}

.sb-user:hover .sb-user__logout {
  color: var(--red);
}

/* ================================================================
   TOPBAR
================================================================ */
.vg-topbar {
  grid-area: topbar;
  position: sticky;
  top: 0;
  height: var(--tb-h);
  background: var(--tb-bg);
  border-bottom: 1px solid var(--tb-border);
  display: flex;
  align-items: center;
  padding: 0 var(--gap-lg);
  gap: var(--gap-sm);
  z-index: 100;
}

.tb-page-title {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--forest);
  letter-spacing: -0.3px;
  flex: 1;
}

.tb-page-title span {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 8px;
}

.tb-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--page-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--r-sm);
  padding: 0 12px;
  height: 34px;
  width: 220px;
  transition: border-color .2s, box-shadow .2s;
}

.tb-search i {
  color: var(--muted-lt);
  font-size: 14px;
  flex-shrink: 0;
}

.tb-search input {
  background: none;
  border: none;
  outline: none;
  font-size: 13px;
  color: var(--ink);
  width: 100%;
  font-family: var(--font-body);
}

.tb-search input::placeholder {
  color: var(--muted-lt);
}

.tb-search:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-mid);
}

.tb-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--card-border);
  color: var(--muted);
  font-size: 16px;
  transition: background .15s, color .15s;
  position: relative;
  flex-shrink: 0;
}

.tb-icon-btn:hover {
  background: var(--page-bg);
  color: var(--ink);
}

.tb-notif-dot {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  border: 1.5px solid #fff;
}

.tb-school {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 6px;
  background: var(--page-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--r-sm);
}

.tb-school__logo {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  object-fit: cover;
  background: var(--teal-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--teal);
  overflow: hidden;
  flex-shrink: 0;
}

.tb-school__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tb-school__name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink2);
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-body);
}

.tb-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--teal-dim);
  border: 1.5px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--teal);
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
}

.tb-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ================================================================
   CONTENT AREA
================================================================ */
.vg-content {
  grid-area: content;
  padding: var(--gap-lg);
  overflow-y: auto;
  min-height: 0;
}

.page-header {
  margin-bottom: var(--gap-lg);
}

.page-header__title {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--forest);
  letter-spacing: -0.3px;
  margin-bottom: 3px;
}

.page-header__sub {
  font-size: 13px;
  color: var(--muted);
  font-family: var(--font-body);
}

.page-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ================================================================
   CARDS
================================================================ */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
}

.card-body {
  padding: var(--gap);
}

.card-header {
  padding: 12px var(--gap);
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-header__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  font-family: var(--font-body);
}

.card-footer {
  padding: 11px var(--gap);
  border-top: 1px solid var(--card-border);
  font-size: 13px;
  color: var(--muted);
  font-family: var(--font-body);
}

/* ================================================================
   STAT TILES
================================================================ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--gap);
  margin-bottom: var(--gap-lg);
}

.stat-tile {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  padding: 14px var(--gap);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
}

.stat-tile::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 0 0 var(--card-radius) var(--card-radius);
  opacity: .6;
}

.stat-tile--teal::after {
  background: var(--teal);
}

.stat-tile--gold::after {
  background: var(--gold);
}

.stat-tile--green::after {
  background: var(--green);
}

.stat-tile--blue::after {
  background: var(--blue);
}

.stat-tile--red::after {
  background: var(--red);
}

.stat-tile__icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.stat-tile__icon--teal {
  background: var(--teal-mid);
  color: var(--teal);
}

.stat-tile__icon--gold {
  background: var(--gold-dim);
  color: var(--gold);
}

.stat-tile__icon--green {
  background: rgba(22, 163, 74, 0.12);
  color: var(--green);
}

.stat-tile__icon--blue {
  background: rgba(37, 99, 235, 0.10);
  color: var(--blue);
}

.stat-tile__icon--red {
  background: rgba(220, 38, 38, 0.10);
  color: var(--red);
}

.stat-tile__val {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 2px;
}

.stat-tile__lbl {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .4px;
  font-family: var(--font-body);
}

.stat-tile__change {
  font-size: 11px;
  font-weight: 600;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-body);
}

.stat-tile__change--up {
  color: var(--green);
}

.stat-tile__change--down {
  color: var(--red);
}

.stat-tile__change--neu {
  color: var(--muted);
}

/* ================================================================
   TABLE
================================================================ */
.vg-table-wrap {
  overflow-x: auto;
}

.vg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-family: var(--font-body);
}

.vg-table thead th {
  background: var(--page-bg);
  padding: 9px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--card-border);
  font-family: var(--font-body);
}

.vg-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--card-border);
  color: var(--ink2);
  vertical-align: middle;
}

.vg-table tbody tr:last-child td {
  border-bottom: none;
}

.vg-table tbody tr:hover td {
  background: var(--surface);
}

/* ================================================================
   BADGES
================================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  font-family: var(--font-body);
}

.badge--green {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green-border);
}

.badge--red {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red-border);
}

.badge--amber {
  background: var(--amber-bg);
  color: var(--amber);
  border: 1px solid var(--amber-border);
}

.badge--blue {
  background: var(--blue-bg);
  color: var(--blue);
  border: 1px solid var(--blue-border);
}

.badge--teal {
  background: var(--teal-dim);
  color: var(--teal);
  border: 1px solid var(--teal-mid);
}

.badge--gold {
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid rgba(230, 168, 0, 0.3);
}

/* ================================================================
   BUTTONS
================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s;
  white-space: nowrap;
  font-family: var(--font-body);
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn i {
  font-size: 14px;
}

.btn-primary {
  background: var(--forest);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--forest2);
  box-shadow: var(--shadow-md);
  color: #fff;
}

.btn-teal {
  background: var(--teal);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-teal:hover {
  background: #008f7e;
  box-shadow: var(--shadow-md);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--ink2);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--surface);
  border-color: var(--border-dk);
}

.btn-danger {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red-border);
}

.btn-danger:hover {
  background: #fee2e2;
}

.btn-gold {
  background: var(--gold-lt);
  color: var(--forest);
  box-shadow: 0 2px 8px rgba(230, 168, 0, 0.3);
}

.btn-gold:hover {
  background: #ffe066;
  color: var(--forest);
}

.btn-sm {
  padding: 5px 11px;
  font-size: 12.5px;
  border-radius: var(--r-xs);
}

.btn-sm i {
  font-size: 12px;
}

/* ================================================================
   ACTION ICON BUTTONS  (.act-icon)
   Used in table rows: edit, delete, view, etc.
================================================================ */
.act-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--r-xs);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  text-decoration: none;
  flex-shrink: 0;
  transition: transform .12s, box-shadow .15s, background .15s;
}

.act-icon:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.act-icon:active {
  transform: translateY(0);
  box-shadow: none;
}

.act-icon--amber {
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  color: var(--amber);
}

.act-icon--amber:hover {
  background: #fef3c7;
  color: var(--amber);
}

.act-icon--red {
  background: var(--red-bg);
  border: 1px solid var(--red-border);
  color: var(--red);
}

.act-icon--red:hover {
  background: #fee2e2;
  color: var(--red);
}

.act-icon--teal {
  background: var(--teal-dim);
  border: 1px solid var(--teal-mid);
  color: var(--teal);
}

.act-icon--teal:hover {
  background: #ccf5ef;
  color: var(--teal);
}

.act-icon--blue {
  background: var(--blue-bg);
  border: 1px solid var(--blue-border);
  color: var(--blue);
}

.act-icon--blue:hover {
  background: #dbeafe;
  color: var(--blue);
}

.act-icon--green {
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  color: var(--green);
}

.act-icon--green:hover {
  background: #dcfce7;
  color: var(--green);
}

/* Action buttons group wrapper */
.act-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Row ID badge ── */
.row-id {
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted-lt);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 8px;
  white-space: nowrap;
  display: inline-block;
}

/* ================================================================
   FORMS
================================================================ */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  margin-bottom: 6px;
  font-family: var(--font-body);
}

.form-input {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  font-size: 13.5px;
  color: var(--ink);
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
  font-family: var(--font-body);
}

.form-input:focus {
  background: var(--bg);
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-mid);
}

.form-input::placeholder {
  color: var(--muted-lt);
}

select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%235a7066' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

textarea.form-input {
  resize: vertical;
  min-height: 80px;
}

.form-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  font-family: var(--font-body);
}

.form-error {
  font-size: 12px;
  color: var(--red);
  margin-top: 4px;
  font-family: var(--font-body);
}

.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--muted-lt);
  pointer-events: none;
}

.input-wrap .form-input {
  padding-left: 34px;
}

/* ================================================================
   ALERTS
================================================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 16px;
  font-family: var(--font-body);
}

.alert i {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.alert-error {
  background: var(--red-bg);
  border: 1px solid var(--red-border);
  color: #b91c1c;
}

.alert-success {
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  color: #166534;
}

.alert-warning {
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  color: #92400e;
}

.alert-info {
  background: var(--blue-bg);
  border: 1px solid var(--blue-border);
  color: #1e40af;
}

/* ================================================================
   AVATAR
================================================================ */
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--teal-dim);
  color: var(--teal);
  font-family: var(--font-body);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-sm {
  width: 26px;
  height: 26px;
  font-size: 10px;
}

.avatar-lg {
  width: 44px;
  height: 44px;
  font-size: 16px;
}

/* ================================================================
   UTILITIES
================================================================ */
.divider {
  border: none;
  border-top: 1px solid var(--card-border);
  margin: 16px 0;
}

.text-muted {
  color: var(--muted) !important;
}

.text-green {
  color: var(--green) !important;
}

.text-red {
  color: var(--red) !important;
}

.text-amber {
  color: var(--amber) !important;
}

.text-teal {
  color: var(--teal) !important;
}

.text-gold {
  color: var(--gold) !important;
}

.text-forest {
  color: var(--forest) !important;
}

.text-body {
  color: var(--body) !important;
}

.fw-400 {
  font-weight: 400 !important;
}

.fw-500 {
  font-weight: 500 !important;
}

.fw-600 {
  font-weight: 600 !important;
}

.fw-700 {
  font-weight: 700 !important;
}

.fs-12 {
  font-size: 12px !important;
}

.fs-13 {
  font-size: 13px !important;
}

.fs-15 {
  font-size: 15px !important;
}

.d-flex {
  display: flex !important;
}

.align-center {
  align-items: center !important;
}

.justify-between {
  justify-content: space-between !important;
}

.flex-1 {
  flex: 1 !important;
}

.flex-shrink-0 {
  flex-shrink: 0 !important;
}

.gap-8 {
  gap: 8px !important;
}

.gap-12 {
  gap: 12px !important;
}

.gap-16 {
  gap: 16px !important;
}

.mt-auto {
  margin-top: auto !important;
}

.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.w-full {
  width: 100% !important;
}

/* ================================================================
   SCROLLBAR
================================================================ */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-dk);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted-lt);
}

/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 768px) {
  :root {
    --sb-width: 0px;
  }

  .vg-shell {
    grid-template-columns: 1fr;
    grid-template-areas: "topbar" "content";
  }

  .vg-sidebar {
    transform: translateX(-100%);
    transition: transform .25s ease;
    width: 240px;
  }

  .vg-sidebar.open {
    transform: translateX(0);
  }

  .vg-content {
    padding: var(--gap);
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tb-search {
    display: none;
  }
}

@media (max-width: 480px) {
  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }
}