/* =====================================================================
   AJNIFM Leave Management System — Design System
   One stylesheet, shared by the Program Director portal (/admin) and
   the Participant portal (/usr). Every page includes this file and
   nothing else custom, so the look stays identical everywhere.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@400;500;600;700;800&family=Source+Serif+4:opsz,wght@8..60,600;8..60,700&display=swap');

:root {
  /* ---- Palette: "Leave Register" — deep register-green + warm brass ---- */
  --ink:            #1c2621;
  --ink-soft:       #33403a;
  --muted:          #5c675f;
  --canvas:         #f7f6f1;
  --canvas-dim:     #efece2;
  --surface:        #ffffff;
  --border:         #e3e0d4;
  --border-strong:  #cfcabb;

  --primary:        #163b2d;
  --primary-dark:   #0d271c;
  --primary-darker: #081b13;
  --primary-tint:   #e6ede8;
  --primary-tint-2: #d3e0d8;

  --accent:         #bd6f26;
  --accent-dark:    #98591d;
  --accent-tint:    #f7ecdc;

  --success:        #1f7a4d;
  --success-tint:   #e1f3e8;
  --danger:         #a23b2e;
  --danger-tint:    #f8e6e2;
  --info:           #2f5b78;
  --info-tint:      #e3edf3;
  --warning:        #9a6a12;
  --warning-tint:   #faf0da;
  --neutral:        #6b716c;
  --neutral-tint:   #ecebe5;

  --radius-lg:      16px;
  --radius:         10px;
  --radius-sm:      7px;
  --shadow-sm:      0 1px 2px rgba(20, 30, 24, .06);
  --shadow-md:      0 6px 20px rgba(20, 30, 24, .08);
  --shadow-lg:      0 18px 40px rgba(20, 30, 24, .18);

  --font-ui:   'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Source Serif 4', Georgia, 'Times New Roman', serif;
}

/* ---------------------------------------------------------------------
   Base
   --------------------------------------------------------------------- */
* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  font-family: var(--font-ui);
  font-size: 15px;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-ui);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.01em;
}

.font-display { font-family: var(--font-display); font-weight: 600; }

small, .small { color: var(--muted); }

code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  background: var(--canvas-dim);
  padding: .1rem .35rem;
  border-radius: 4px;
  color: var(--primary-dark);
}

hr.lms-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

::selection { background: var(--primary-tint-2); }

/* ---------------------------------------------------------------------
   Scrollbar (subtle, webkit only — progressive enhancement)
   --------------------------------------------------------------------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* =====================================================================
   APP SHELL — admin (icon rail + topbar)
   ===================================================================== */
.lms-shell { display: flex; min-height: 100vh; }

.lms-rail {
  width: 248px;
  flex-shrink: 0;
  background: var(--primary);
  color: #eef3ef;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  transition: margin-left .2s ease;
  z-index: 40;
}

.lms-rail-brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: 1.35rem 1.25rem 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  color: #fff;
}
.lms-rail-brand .mark {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  color: #241505;
  flex-shrink: 0;
}
.lms-rail-brand .word { line-height: 1.15; }
.lms-rail-brand .word strong { display: block; font-size: 14.5px; font-weight: 800; letter-spacing: .01em; }
.lms-rail-brand .word span { display: block; font-size: 11.5px; color: rgba(255,255,255,.65); font-weight: 500; }

.lms-rail-section {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: rgba(255,255,255,.4);
  padding: 1.1rem 1.25rem .35rem;
  font-weight: 700;
}

.lms-rail nav { padding-bottom: 1.5rem; }

.lms-rail a.rail-link {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .58rem 1.25rem;
  color: rgba(255,255,255,.78);
  font-size: 13.8px;
  font-weight: 500;
  border-left: 3px solid transparent;
  position: relative;
}
.lms-rail a.rail-link i { width: 18px; text-align: center; font-size: 14px; opacity: .9; }
.lms-rail a.rail-link:hover {
  background: rgba(255,255,255,.06);
  color: #fff;
  text-decoration: none;
}
.lms-rail a.rail-link.active {
  background: rgba(255,255,255,.1);
  border-left-color: var(--accent);
  color: #fff;
  font-weight: 600;
}
.lms-rail a.rail-link .badge-count {
  margin-left: auto;
  background: var(--accent);
  color: #241505;
  font-size: 10.5px;
  font-weight: 700;
  padding: .1rem .4rem;
  border-radius: 20px;
  min-width: 18px;
  text-align: center;
}

.lms-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.lms-topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: .85rem 1.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 30;
}
.lms-topbar .lms-crumb {
  font-size: 13px;
  color: var(--muted);
}
.lms-topbar .lms-crumb strong { color: var(--ink); font-weight: 600; }
.lms-topbar .lms-crumb .sep { margin: 0 .4rem; opacity: .5; }

.lms-rail-toggle {
  display: none;
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 18px;
  padding: .2rem .4rem;
}

.lms-user-chip {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .35rem .6rem .35rem .35rem;
  border-radius: 30px;
  border: 1px solid var(--border);
  background: var(--canvas);
  cursor: pointer;
  font-size: 13.5px;
  color: var(--ink);
}
.lms-user-chip .avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary-tint-2);
  color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
}

.lms-content { padding: 1.6rem 1.75rem 3rem; flex: 1; }

/* =====================================================================
   APP SHELL — participant (header + horizontal tab bar; lighter)
   ===================================================================== */
.lms-p-header {
  background: var(--primary);
  color: #fff;
}
.lms-p-header .row-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem 1.75rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.lms-p-brand { display: flex; align-items: center; gap: .65rem; color: #fff; }
.lms-p-brand:hover { color: #fff; text-decoration: none; }
.lms-p-brand .mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--accent); color: #241505;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.lms-p-brand .word strong { display: block; font-size: 13.5px; font-weight: 800; }
.lms-p-brand .word span { display: block; font-size: 10.8px; color: rgba(255,255,255,.65); }

.lms-p-tabs {
  display: flex;
  gap: .25rem;
  padding: 0 1.35rem;
  overflow-x: auto;
}
.lms-p-tabs a {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .75rem .9rem;
  color: rgba(255,255,255,.68);
  font-size: 13.6px;
  font-weight: 600;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.lms-p-tabs a:hover { color: #fff; text-decoration: none; }
.lms-p-tabs a.active { color: #fff; border-bottom-color: var(--accent); }

.lms-p-body { padding: 1.6rem 1.75rem 3rem; max-width: 1180px; margin: 0 auto; width: 100%; }

/* =====================================================================
   Footer
   ===================================================================== */
.lms-footer {
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
  padding: 1.25rem 1rem 2rem;
}

/* =====================================================================
   Cards
   ===================================================================== */
.lms-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.4rem;
}
.lms-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.4rem;
  border-bottom: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-top-left-radius: var(--radius-lg);
}
.lms-card-header h2, .lms-card-header h3 {
  font-size: 15.5px;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: .55rem;
}
.lms-card-header h2 i, .lms-card-header h3 i { color: var(--accent-dark); font-size: 14px; }
.lms-card-header .meta { font-size: 12.5px; color: var(--muted); }
.lms-card-body { padding: 1.4rem; }
.lms-card-body.tight { padding: 0; }
.lms-card-footer {
  padding: .85rem 1.4rem;
  border-top: 1px solid var(--border);
  font-size: 12.8px;
  color: var(--muted);
}

/* KPI tiles */
.lms-kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.3rem;
  display: flex;
  align-items: flex-start;
  gap: .9rem;
  box-shadow: var(--shadow-sm);
  height: 100%;
}
.lms-kpi .icon {
  width: 42px; height: 42px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0;
}
.lms-kpi .icon.tone-primary { background: var(--primary-tint); color: var(--primary); }
.lms-kpi .icon.tone-accent  { background: var(--accent-tint);  color: var(--accent-dark); }
.lms-kpi .icon.tone-success { background: var(--success-tint); color: var(--success); }
.lms-kpi .icon.tone-info    { background: var(--info-tint);    color: var(--info); }
.lms-kpi .icon.tone-danger  { background: var(--danger-tint);  color: var(--danger); }
.lms-kpi .num { font-size: 25px; font-weight: 800; line-height: 1.1; color: var(--ink); }
.lms-kpi .label { font-size: 12.6px; color: var(--muted); font-weight: 600; margin-top: .15rem; }
.lms-kpi a.stretched-link::after { content: ""; position: absolute; inset: 0; }
.lms-kpi { position: relative; }

/* =====================================================================
   Buttons
   ===================================================================== */
.btn {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 13.6px;
  border-radius: var(--radius-sm);
  padding: .5rem 1rem;
  border: 1px solid transparent;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}
.btn-primary {
  background: var(--primary); border-color: var(--primary); color: #fff;
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--primary-dark); border-color: var(--primary-dark); color: #fff;
}
.btn-accent {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.btn-accent:hover, .btn-accent:focus { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-outline-primary {
  color: var(--primary); border-color: var(--border-strong); background: #fff;
}
.btn-outline-primary:hover { background: var(--primary-tint); border-color: var(--primary); color: var(--primary-dark); }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover { background: #175f3d; border-color: #175f3d; color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #832f24; border-color: #832f24; color: #fff; }
.btn-outline-danger { color: var(--danger); border-color: #e3b3ac; background: #fff; }
.btn-outline-danger:hover { background: var(--danger-tint); border-color: var(--danger); color: var(--danger); }
.btn-outline-secondary { color: var(--ink-soft); border-color: var(--border-strong); background: #fff; }
.btn-outline-secondary:hover { background: var(--canvas-dim); }
.btn-light { background: var(--canvas-dim); border-color: var(--canvas-dim); color: var(--ink); }
.btn-sm { font-size: 12.4px; padding: .3rem .65rem; }
.btn i { margin-right: .35rem; }
.btn-icon-only i { margin-right: 0; }

/* =====================================================================
   Status badges
   ===================================================================== */
.lms-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: 11.6px;
  font-weight: 700;
  padding: .28rem .62rem;
  border-radius: 30px;
  text-transform: uppercase;
  letter-spacing: .02em;
  white-space: nowrap;
}
.lms-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.lms-badge.st-pending   { background: var(--info-tint);    color: var(--info); }
.lms-badge.st-approved  { background: var(--success-tint); color: var(--success); }
.lms-badge.st-rejected  { background: var(--danger-tint);  color: var(--danger); }
.lms-badge.st-withdrawn { background: var(--neutral-tint);  color: var(--neutral); }
.lms-badge.st-cancel_req{ background: var(--accent-tint);  color: var(--accent-dark); }
.lms-badge.st-cancelled { background: var(--neutral-tint);  color: var(--neutral); }
.lms-badge.st-active    { background: var(--success-tint); color: var(--success); }
.lms-badge.st-inactive  { background: var(--neutral-tint);  color: var(--neutral); }

/* =====================================================================
   Tables
   ===================================================================== */
.table.lms-table {
  background: var(--surface);
  margin-bottom: 0;
}
.table.lms-table thead th {
  font-size: 11.3px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  border-top: none;
  background: var(--canvas);
  padding: .7rem .9rem;
  white-space: nowrap;
}
.table.lms-table tbody td {
  padding: .68rem .9rem;
  font-size: 13.6px;
  vertical-align: middle;
  border-top: 1px solid var(--border);
  color: var(--ink-soft);
}
.table.lms-table tbody tr:hover { background: var(--canvas); }
.table.lms-table .num { font-variant-numeric: tabular-nums; text-align: right; }

/* DataTables cosmetic alignment with our tokens */
div.dataTables_wrapper div.dataTables_filter input,
div.dataTables_wrapper div.dataTables_length select {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: .3rem .55rem;
}
div.dataTables_wrapper div.dataTables_paginate .paginate_button.current {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
  border-radius: 6px;
}
div.dataTables_wrapper div.dataTables_paginate .paginate_button {
  border-radius: 6px;
  font-size: 12.8px;
}
table.dataTable thead th { position: relative; }

/* =====================================================================
   Forms
   ===================================================================== */
label {
  font-weight: 600;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: .3rem;
}
label .req { color: var(--danger); margin-left: .15rem; }
.form-control, select.form-control, textarea.form-control {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: .5rem .7rem;
  font-size: 13.8px;
  color: var(--ink);
  background: #fff;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-tint);
}
.form-text.hint { font-size: 12px; color: var(--muted); }
.lms-field { margin-bottom: 1.05rem; }
.lms-form-section {
  border-top: 1px solid var(--border);
  margin-top: 1.4rem;
  padding-top: 1.1rem;
}
.lms-form-section .section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: .9rem;
}
.custom-control-input:checked ~ .custom-control-label::before {
  background-color: var(--primary); border-color: var(--primary);
}

/* Balance / quota readout inline with a select */
.lms-balance-hint {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: 12.3px;
  color: var(--muted);
  margin-top: .35rem;
}
.lms-balance-hint strong { color: var(--ink); }
.lms-balance-hint.low { color: var(--danger); }

/* =====================================================================
   Alerts / flash messages
   ===================================================================== */
.lms-alert {
  border-radius: var(--radius);
  padding: .85rem 1.1rem;
  font-size: 13.6px;
  border: 1px solid transparent;
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  margin-bottom: 1.2rem;
}
.lms-alert i { margin-top: .15rem; }
.lms-alert.success { background: var(--success-tint); color: #145536; border-color: #bfe3cd; }
.lms-alert.danger  { background: var(--danger-tint);  color: #7a2d22; border-color: #eac2bc; }
.lms-alert.info    { background: var(--info-tint);    color: #234258; border-color: #c3d8e5; }
.lms-alert.warning { background: var(--warning-tint); color: #6e4c0d; border-color: #eeddb0; }

/* =====================================================================
   Login / landing split-screen
   ===================================================================== */
.lms-auth-wrap { min-height: 100vh; display: flex; }
.lms-auth-brand {
  flex: 1 1 44%;
  background: linear-gradient(165deg, var(--primary-darker), var(--primary) 60%, #1f4a38);
  color: #fff;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.lms-auth-brand::after {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 85% 15%, rgba(189,111,38,.25), transparent 45%),
                    radial-gradient(circle at 10% 90%, rgba(255,255,255,.06), transparent 40%);
  pointer-events: none;
}
.lms-auth-brand .top { position: relative; z-index: 1; }
.lms-auth-brand .mid { position: relative; z-index: 1; max-width: 420px; }
.lms-auth-brand .mid h1 {
  font-family: var(--font-display);
  color: #fff;
  font-size: 2.3rem;
  line-height: 1.2;
  margin-bottom: .9rem;
}
.lms-auth-brand .mid p { color: rgba(255,255,255,.78); font-size: 14.5px; line-height: 1.6; }
.lms-auth-brand .steps { position: relative; z-index: 1; display: flex; gap: 1.6rem; flex-wrap: wrap; }
.lms-auth-brand .steps .step { font-size: 12.6px; color: rgba(255,255,255,.72); display: flex; align-items: center; gap: .5rem; }
.lms-auth-brand .steps .step b { color: #fff; background: rgba(255,255,255,.14); width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }
.lms-auth-brand .brandmark { display: flex; align-items: center; gap: .7rem; }
.lms-auth-brand .brandmark .mark {
  width: 42px; height: 42px; border-radius: 11px; background: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 19px; color: #241505;
}
.lms-auth-brand .brandmark strong { display: block; font-size: 15.5px; font-weight: 800; }
.lms-auth-brand .brandmark span { display: block; font-size: 11.5px; color: rgba(255,255,255,.68); }

.lms-auth-form {
  flex: 1 1 56%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  padding: 2.5rem;
}
.lms-auth-form .box { width: 100%; max-width: 380px; }
.lms-auth-form .box h2 { font-size: 1.5rem; margin-bottom: .3rem; }
.lms-auth-form .box .sub { color: var(--muted); font-size: 13.6px; margin-bottom: 1.6rem; }
.lms-auth-form .switch-role {
  margin-top: 1.6rem; text-align: center; font-size: 13px; color: var(--muted);
}

@media (max-width: 900px) {
  .lms-auth-brand { display: none; }
  .lms-auth-form { flex: 1 1 100%; }
}

/* =====================================================================
   Landing / role chooser
   ===================================================================== */
.lms-landing-hero {
  background: var(--primary);
  color: #fff;
  padding: 3.2rem 1.5rem 4.2rem;
  text-align: center;
}
.lms-landing-hero .eyebrow {
  font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--accent); font-weight: 700; display: block; margin-bottom: .7rem;
}
.lms-landing-hero h1 {
  font-family: var(--font-display);
  color: #fff; font-size: 2.4rem; max-width: 640px; margin: 0 auto .7rem;
}
.lms-landing-hero p { color: rgba(255,255,255,.78); max-width: 560px; margin: 0 auto; font-size: 15px; }

.lms-role-cards { margin-top: -2.6rem; padding: 0 1.5rem 3rem; }
.lms-role-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.9rem;
  height: 100%;
}
.lms-role-card .role-icon {
  width: 50px; height: 50px; border-radius: 13px;
  background: var(--primary-tint); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 21px;
  margin-bottom: 1rem;
}
.lms-role-card h4 { font-size: 1.15rem; margin-bottom: .5rem; }
.lms-role-card p { color: var(--muted); font-size: 13.8px; margin-bottom: 1.3rem; }

.lms-howitworks { padding: 0 1.5rem 4rem; }
.lms-howitworks .step-card { text-align: center; padding: 1rem; }
.lms-howitworks .step-num {
  width: 34px; height: 34px; border-radius: 50%; background: var(--accent-tint); color: var(--accent-dark);
  display: flex; align-items: center; justify-content: center; font-weight: 800; margin: 0 auto .8rem;
}
.lms-howitworks h6 { font-size: 13.8px; font-weight: 700; }
.lms-howitworks p { font-size: 12.8px; color: var(--muted); }

/* =====================================================================
   Timeline (status history)
   ===================================================================== */
.lms-timeline { list-style: none; margin: 0; padding: 0; }
.lms-timeline li {
  position: relative;
  padding: 0 0 1.15rem 1.9rem;
  border-left: 2px solid var(--border);
  margin-left: 8px;
}
.lms-timeline li:last-child { border-color: transparent; padding-bottom: 0; }
.lms-timeline li::before {
  content: "";
  position: absolute; left: -7px; top: 2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--primary); border: 2px solid var(--surface); box-shadow: 0 0 0 2px var(--border);
}
.lms-timeline .when { font-size: 11.8px; color: var(--muted); }
.lms-timeline .what { font-size: 13.6px; font-weight: 600; color: var(--ink); margin: .1rem 0; }
.lms-timeline .who  { font-size: 12.4px; color: var(--muted); }

/* =====================================================================
   Quota grid (admin)
   ===================================================================== */
.lms-quota-table th, .lms-quota-table td { text-align: center; }
.lms-quota-table th:first-child, .lms-quota-table td:first-child { text-align: left; }
.lms-quota-cell {
  width: 64px;
  text-align: center;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: .25rem;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.lms-quota-cell:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint); }
.lms-quota-cell.dirty { border-color: var(--accent); background: var(--accent-tint); }

/* =====================================================================
   Empty states
   ===================================================================== */
.lms-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--muted);
}
.lms-empty i { font-size: 30px; color: var(--border-strong); margin-bottom: .9rem; display: block; }
.lms-empty h4 { color: var(--ink-soft); font-size: 15px; margin-bottom: .35rem; }
.lms-empty p { font-size: 13px; margin-bottom: 1rem; }

/* =====================================================================
   Misc utility
   ===================================================================== */
.lms-muted { color: var(--muted); }
.lms-tag {
  display: inline-block; font-size: 11.5px; font-weight: 700; padding: .15rem .5rem;
  border-radius: 6px; background: var(--canvas-dim); color: var(--ink-soft);
}
.lms-avatar-lg {
  width: 64px; height: 64px; border-radius: 16px;
  background: var(--primary-tint); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800;
}
.lms-page-title { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .8rem; margin-bottom: 1.3rem; }
.lms-page-title h1 { font-size: 1.4rem; margin: 0; }
.lms-page-title .sub { color: var(--muted); font-size: 13px; margin-top: .15rem; }

.modal-content { border-radius: var(--radius-lg); border: 1px solid var(--border); }
.modal-header { border-bottom: 1px solid var(--border); }
.modal-header .modal-title { font-weight: 700; font-size: 16px; }
.modal-footer { border-top: 1px solid var(--border); }

/* Responsive: collapse the admin rail off-canvas on small screens */
@media (max-width: 992px) {
  .lms-rail-toggle { display: inline-flex; align-items: center; }
  .lms-rail {
    position: fixed; left: 0; top: 0; z-index: 100;
    margin-left: -248px;
    box-shadow: var(--shadow-lg);
  }
  .lms-rail.open { margin-left: 0; }
  .lms-rail-scrim {
    display: none; position: fixed; inset: 0; background: rgba(10,15,12,.45); z-index: 90;
  }
  .lms-rail-scrim.show { display: block; }
  .lms-content, .lms-p-body { padding-left: 1.1rem; padding-right: 1.1rem; }
  .lms-topbar { padding: .85rem 1.1rem; }
}

@media print {
  .lms-rail, .lms-topbar, .lms-p-header, .lms-footer, .no-print { display: none !important; }
  .lms-content, .lms-p-body { padding: 0; }
  body { background: #fff; }
}
