/* ============================================================
   DWSS Booking System — design system
   Themed to the standard template (Template.html / OpenClaw OS):
   dark glassy surfaces, #FF6B00 accent, Inter, tinted pills.
   ============================================================ */
:root {
  color-scheme: dark;
  --bg: #060608;
  --bg-soft: #0a0a0a;
  --nav: #111111;
  --surface: #141414;
  --primary: #FF6B00;
  --primary-dark: #E05E00;
  --primary-light: rgba(255, 107, 0, 0.12);
  --accent: #10B981;
  --accent-light: rgba(16, 185, 129, 0.12);
  --info: #3B82F6;
  --ink: #ffffff;
  --ink-soft: #e5e5e5;
  --muted: #999999;
  --muted-strong: #aaaaaa;
  --line: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.12);
  --danger: #EF4444;
  --warning: #F59E0B;
  --link: #FF8A3D;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 107, 0, 0.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; }
a:hover { color: #FFB27A; text-decoration: none; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: 1.8rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }
.container { width: 94%; max-width: 1760px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 980px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; align-items: center; gap: .5rem; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.text-center { text-align: center; }

::selection { background: rgba(255, 107, 0, 0.3); }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 2px; }

/* --- Navbar: glassy floating pill (template style) --- */
.navbar {
  position: sticky; top: 12px; z-index: 50;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  width: 82%; max-width: 1700px;
  margin: 12px auto 0;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}
@media (max-width: 860px) { .navbar { width: 94%; } }
.navbar-inner { display: flex; align-items: center; gap: .75rem; height: 60px; padding: 0 20px; }
.brand { font-weight: 800; font-size: 1rem; color: var(--ink); display: flex; align-items: center; gap: .55rem; letter-spacing: 0.01em; }
.brand:hover { color: var(--ink); }
.brand .logo {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, #FF9A50, var(--primary));
  color: #fff; display: grid; place-items: center; font-weight: 800;
  box-shadow: 0 0 16px rgba(255, 107, 0, 0.35);
}
.nav-links { display: flex; gap: .2rem; margin-left: .5rem; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  padding: 7px 16px; border-radius: 8px; color: #999; font-weight: 500; font-size: 14px;
  white-space: nowrap; transition: all .2s ease;
}
.nav-links a:hover { color: #fff; background: rgba(255, 255, 255, 0.04); }
.nav-links a.active { color: #fff; background: rgba(255, 107, 0, 0.12); border: 1px solid rgba(255, 107, 0, 0.2); }
.nav-actions { display: flex; gap: .5rem; align-items: center; }

/* --- Buttons: orange pill primary + ghost (template style) --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  border: none; border-radius: 9999px; padding: 9px 20px;
  font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none;
  background: var(--primary); color: #fff;
  transition: opacity .2s ease, transform .1s ease, border-color .2s, background .2s;
}
.btn:hover { opacity: 0.85; color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-lg { padding: 13px 26px; font-size: 15px; }
.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 9999px; }
.btn-outline {
  background: rgba(255, 255, 255, 0.03); color: #e5e5e5; border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-outline:hover { border-color: rgba(255, 107, 0, 0.4); color: #fff; background: rgba(255, 255, 255, 0.05); opacity: 1; }
.btn-outline-dark {
  background: rgba(255, 255, 255, 0.03); color: #e5e5e5; border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-outline-dark:hover { border-color: rgba(255, 107, 0, 0.4); color: #fff; background: rgba(255, 255, 255, 0.05); opacity: 1; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { opacity: .85; }
.btn-success { background: var(--accent); }
.btn-success:hover { opacity: .85; }
.btn-ghost-danger { background: rgba(239, 68, 68, 0.08); color: #F87171; border: 1px solid rgba(239, 68, 68, 0.25); }
.btn-ghost-danger:hover { background: rgba(239, 68, 68, 0.15); color: #FCA5A5; border-color: rgba(239, 68, 68, 0.4); opacity: 1; }

/* --- Cards --- */
.card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  padding: 1.2rem;
}
.card + .card { margin-top: 1rem; }
.card-title { font-weight: 700; font-size: 1.02rem; margin-bottom: .4rem; }

/* --- Pickable cards (wizard steps) --- */
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .8rem; }
.pick {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 1rem; cursor: pointer;
  transition: border-color .15s, transform .2s, box-shadow .2s;
}
.pick:hover { border-color: rgba(255, 107, 0, 0.35); transform: translateY(-2px); box-shadow: var(--shadow); }
.pick.selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.18), 0 0 24px rgba(255, 107, 0, 0.12); }
.pick .pick-title { font-weight: 700; }
.pick .pick-sub { color: var(--muted); font-size: .85rem; }
.pick .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .4rem; }

/* --- Forms --- */
label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .3rem; color: var(--ink-soft); }
input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=date], input[type=time], input[type=number], input[type=color], select, textarea {
  width: 100%; padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-sm);
  font: inherit; color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}
input::placeholder, textarea::placeholder { color: #666; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.12);
}
select option { background: #141414; }
textarea { resize: vertical; min-height: 70px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.form-grid .full { grid-column: 1 / -1; }
.form-note { font-size: .82rem; color: var(--muted); margin-top: .25rem; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .2rem .6rem; }

/* --- Typeahead (customer search) --- */
.typeahead { position: relative; }
.typeahead-menu {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 60;
  background: #111114; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  max-height: 280px; overflow-y: auto; display: none;
}
.typeahead-menu.open { display: block; }
.typeahead-item {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: transparent; border: none; border-bottom: 1px solid var(--line);
  padding: 9px 12px; color: var(--ink); font: inherit;
}
.typeahead-item:last-child { border-bottom: none; }
.typeahead-item.active { background: rgba(255, 107, 0, 0.1); }
.typeahead-item .ti-name { display: block; font-weight: 600; font-size: .9rem; }
.typeahead-item .ti-count {
  font-size: .68rem; font-weight: 700; color: var(--primary);
  background: rgba(255, 107, 0, 0.1); border: 1px solid rgba(255, 107, 0, 0.2);
  padding: 1px 8px; border-radius: 20px; margin-left: 4px; vertical-align: 1px;
}
.typeahead-item .ti-sub { display: block; font-size: .78rem; color: var(--muted); }
.typeahead-empty { padding: 10px 12px; font-size: .82rem; color: var(--muted); }

/* --- Email preview (notifications admin) --- */
.email-preview {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .8rem 1rem;
  margin-bottom: .6rem;
  white-space: pre-wrap;
  font-size: .9rem;
  line-height: 1.5;
}

/* --- Visual template editor (notifications admin) --- */
.notif-editor {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  min-height: 46px;
  font: inherit;
  color: var(--ink);
  outline: none;
  line-height: 1.6;
}
.notif-editor:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.12); }
.notif-editor-subject { min-height: 42px; }
.notif-editor-body { min-height: 150px; white-space: pre-wrap; }
.ph-chip {
  display: inline-block;
  background: rgba(255, 107, 0, 0.12);
  color: #FFB27A;
  border: 1px solid rgba(255, 107, 0, 0.3);
  border-radius: 6px;
  padding: 0 7px;
  margin: 0 1px;
  font-size: .85em;
  font-weight: 600;
  cursor: default;
}

/* --- Alerts / flash (dark tints) --- */
.alert { padding: .8rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-weight: 500; font-size: .9rem; }
.alert-success { background: rgba(16, 185, 129, 0.1); color: #6EE7B7; border: 1px solid rgba(16, 185, 129, 0.25); }
.alert-error { background: rgba(239, 68, 68, 0.1); color: #FCA5A5; border: 1px solid rgba(239, 68, 68, 0.25); }
.alert-warn { background: rgba(245, 158, 11, 0.1); color: #FCD34D; border: 1px solid rgba(245, 158, 11, 0.25); }

/* --- Badges (status) — tinted pills --- */
.badge {
  display: inline-block; padding: 2px 11px; border-radius: 20px;
  font-size: .74rem; font-weight: 700; white-space: nowrap;
  background: rgba(255, 255, 255, 0.06); color: #bbb;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.badge-pending  { background: rgba(245, 158, 11, 0.1);  color: #FBBF24; border-color: rgba(245, 158, 11, 0.25); }
.badge-approved { background: rgba(16, 185, 129, 0.1);   color: #34D399; border-color: rgba(16, 185, 129, 0.25); }
.badge-rejected { background: rgba(239, 68, 68, 0.1);    color: #F87171; border-color: rgba(239, 68, 68, 0.25); }
.badge-cancelled{ background: rgba(148, 163, 184, 0.12); color: #94A3B8; border-color: rgba(148, 163, 184, 0.25); }
.badge-finished { background: rgba(59, 130, 246, 0.1);   color: #60A5FA; border-color: rgba(59, 130, 246, 0.25); }

/* --- Tables --- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .55rem .7rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table th {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); background: rgba(255, 255, 255, 0.03);
}
.table tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* --- Calendar grid --- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { font-size: .74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; text-align: center; padding: .3rem 0; }
.cal-cell {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  min-height: 96px; padding: .3rem;
  grid-row: 2;
}
.cal-cell.empty { background: transparent; border-color: transparent; }
.cal-daynum { font-size: .8rem; font-weight: 700; color: var(--muted); margin-bottom: .25rem; }
.cal-cell.today .cal-daynum { color: var(--primary); }
.cal-appt {
  display: block; border-radius: 7px; padding: .22rem .4rem; margin-bottom: 3px;
  color: #fff; font-size: .72rem; font-weight: 600; cursor: pointer; line-height: 1.3;
  border: none; width: 100%; text-align: left;
}
.cal-appt:hover { filter: brightness(1.15); color: #fff; }
.cal-appt .t { display: block; opacity: .92; font-weight: 500; }
.legend { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; margin-top: 1rem; font-size: .85rem; color: var(--muted); }
.legend .dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; margin-right: .35rem; vertical-align: -1px; }

/* --- Modal --- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.65); backdrop-filter: blur(6px);
  z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: #111114; border: 1px solid var(--line-strong);
  border-radius: 16px; max-width: 480px; width: 100%;
  max-height: 85vh; overflow-y: auto; padding: 1.4rem;
  box-shadow: var(--shadow-lg);
}
.modal h3 { margin-bottom: .9rem; }
.modal .close-x { float: right; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--muted); line-height: 1; }
.detail-row { display: flex; gap: .6rem; padding: .35rem 0; border-bottom: 1px dashed rgba(255, 255, 255, 0.08); font-size: .92rem; }
.detail-row .k { flex: 0 0 110px; color: var(--muted); font-weight: 600; }

/* --- Wizard --- */
.wizard { display: grid; grid-template-columns: 1fr 320px; gap: 1.2rem; align-items: start; }
.wizard-main {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  padding: 1.4rem;
}
.wizard-side { position: sticky; top: 88px; }
@media (max-width: 860px) { .wizard { grid-template-columns: 1fr; } .wizard-side { position: static; } }

.steps { display: flex; gap: .25rem; margin-bottom: 1.4rem; overflow-x: auto; padding-bottom: 2px; }
.step {
  flex: 1; min-width: 90px; text-align: center; padding: .5rem .3rem; border-radius: 8px;
  font-size: .76rem; font-weight: 600; color: var(--muted); background: rgba(255, 255, 255, 0.03); white-space: nowrap;
}
.step .n {
  display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.12); color: #fff; font-size: .72rem; margin-right: .3rem;
}
.step.active { background: rgba(255, 107, 0, 0.12); color: #FFB27A; }
.step.active .n { background: var(--primary); box-shadow: 0 0 12px rgba(255, 107, 0, 0.5); }
.step.done { background: rgba(16, 185, 129, 0.1); color: #6EE7B7; }
.step.done .n { background: var(--accent); }

.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.slot-btn {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  padding: .55rem .5rem;
  font-weight: 600; font-size: .88rem; cursor: pointer; color: var(--ink);
  transition: border-color .15s, background .15s;
}
.slot-btn:hover { border-color: rgba(255, 107, 0, 0.4); }
.slot-btn.selected { border-color: var(--primary); background: rgba(255, 107, 0, 0.12); color: #FFB27A; }
.slot-btn:disabled { opacity: .35; cursor: not-allowed; }
.slot-btn .staff { display: block; font-weight: 500; font-size: .75rem; color: var(--muted); }

.repeat-box {
  margin-top: 1rem; padding: .9rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
}

.mini-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 1rem; }
.mini-cal .mc-dow { font-size: .7rem; text-align: center; color: var(--muted); font-weight: 700; padding: .2rem 0; }
.mc-day {
  border: 1px solid transparent; background: rgba(255, 255, 255, 0.03);
  border-radius: 8px; padding: .45rem 0; cursor: pointer;
  font-weight: 600; color: var(--ink); font-size: .85rem;
  transition: background .15s, border-color .15s;
}
.mc-day:hover { background: rgba(255, 107, 0, 0.1); border-color: rgba(255, 107, 0, 0.3); }
.mc-day.selected { background: var(--primary); color: #fff; box-shadow: 0 0 16px rgba(255, 107, 0, 0.4); }
.mc-day:disabled { color: #3a3a3a; cursor: not-allowed; background: transparent; }
.mc-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; font-weight: 700; }
.mc-nav button {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px; padding: .2rem .6rem; cursor: pointer; color: var(--ink-soft);
}
.mc-nav button:disabled { opacity: .4; cursor: not-allowed; }

/* --- Hero / home --- */
.hero {
  background:
    radial-gradient(ellipse 60% 90% at 20% 0%, rgba(255, 107, 0, 0.16), transparent 60%),
    radial-gradient(ellipse 50% 80% at 90% 10%, rgba(59, 130, 246, 0.08), transparent 60%),
    linear-gradient(180deg, #0d0d10 0%, var(--bg) 100%);
  color: var(--ink);
  padding: 3.4rem 0 2.8rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2rem;
}
.hero h1 { font-size: 2.2rem; margin-bottom: .4rem; }
.hero p { opacity: .85; font-size: 1.05rem; max-width: 640px; color: var(--muted-strong); }
.hero .btn { background: linear-gradient(135deg, #FF9A50, var(--primary)); box-shadow: 0 8px 30px rgba(255, 107, 0, 0.3); }
.hero .btn:hover { opacity: .9; }
.stat-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.4rem; }
.stat {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .7rem 1.1rem;
}
.stat b { font-size: 1.2rem; display: block; }
.stat span { font-size: .8rem; opacity: .7; color: var(--muted); }

/* --- Account --- */
.appt-card { display: flex; gap: 1rem; align-items: flex-start; }
.appt-card .when { flex: 0 0 130px; }
.appt-card .when b { display: block; }
.appt-card .when .t { color: var(--muted); font-size: .9rem; }

/* --- Footer --- */
.footer { margin-top: 3rem; border-top: 1px solid var(--line); padding: 1.4rem 0; color: var(--muted); font-size: .85rem; }

/* --- Misc --- */
.empty-state { text-align: center; color: var(--muted); padding: 2.4rem 1rem; }
.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em;
  background: rgba(255, 255, 255, 0.06); padding: .1rem .35rem; border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
hr { border: none; border-top: 1px solid var(--line); margin: 1.2rem 0; }
.success-check {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(16, 185, 129, 0.12); color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  display: grid; place-items: center; font-size: 2rem; margin: 0 auto 1rem;
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.2);
}
.admin-tabs { display: flex; gap: .25rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.admin-tabs a {
  padding: 6px 14px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted-strong); font-weight: 600; font-size: .84rem;
  transition: all .2s ease;
}
.admin-tabs a.active { background: rgba(255, 107, 0, 0.12); border-color: rgba(255, 107, 0, 0.25); color: #fff; }
.admin-tabs a:hover { color: #fff; border-color: rgba(255, 107, 0, 0.3); }

/* --- Stat cards (gradient-border, template style) --- */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.stat-card {
  position: relative; border-radius: 16px; padding: 1px;
  background: linear-gradient(135deg, var(--primary), var(--primary) 40%, transparent 90%);
  box-shadow: 0 0 20px rgba(255, 107, 0, 0.07), 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: transform .3s ease, box-shadow .3s ease;
}
.stat-card:nth-child(2) { background: linear-gradient(135deg, #10B981, #10B981 40%, transparent 90%); box-shadow: 0 0 20px rgba(16,185,129,0.07), 0 4px 16px rgba(0,0,0,0.3); }
.stat-card:nth-child(3) { background: linear-gradient(135deg, #3B82F6, #3B82F6 40%, transparent 90%); box-shadow: 0 0 20px rgba(59,130,246,0.07), 0 4px 16px rgba(0,0,0,0.3); }
.stat-card:nth-child(4) { background: linear-gradient(135deg, #F59E0B, #F59E0B 40%, transparent 90%); box-shadow: 0 0 20px rgba(245,158,11,0.07), 0 4px 16px rgba(0,0,0,0.3); }
.stat-card:nth-child(5) { background: linear-gradient(135deg, #EC4899, #EC4899 40%, transparent 90%); box-shadow: 0 0 20px rgba(236,72,153,0.07), 0 4px 16px rgba(0,0,0,0.3); }
.stat-card:nth-child(6) { background: linear-gradient(135deg, #7C3AED, #7C3AED 40%, transparent 90%); box-shadow: 0 0 20px rgba(124,58,237,0.07), 0 4px 16px rgba(0,0,0,0.3); }
.stat-card:hover { transform: translateY(-3px); }
.stat-card > * {
  position: relative; z-index: 1;
  background: linear-gradient(170deg, #131317 0%, #0c0c10 100%);
  border-radius: 15px; padding: 14px 16px;
}
.stat-card b { font-size: 1.4rem; display: block; }
.stat-card span { font-size: .74rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

/* --- Calendar timeline (week/day views) --- */
.cal-timeline { display: flex; gap: 6px; align-items: stretch; }
.tl-times { flex: 0 0 52px; position: relative; }
.tl-time { height: 30px; font-size: .72rem; color: var(--muted); text-align: right; padding-right: 6px; transform: translateY(-7px); }
.tl-day {
  flex: 1; min-width: 120px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm); overflow: hidden;
}
.tl-day-head { display: flex; justify-content: space-between; align-items: center; padding: .3rem .5rem; border-bottom: 1px solid var(--line); font-size: .82rem; }
.tl-add { color: var(--primary); font-weight: 800; text-decoration: none; padding: 0 .3rem; }
.tl-area { position: relative; height: 540px; }
.tl-chip {
  position: absolute; left: 3px; right: 3px; border-radius: 8px; padding: .2rem .45rem;
  background: linear-gradient(135deg, #FF8A3D, var(--primary));
  color: #fff; font-size: .75rem; line-height: 1.35;
  display: block; overflow: hidden; cursor: grab; text-decoration: none; z-index: 2;
  box-shadow: 0 4px 14px rgba(255, 107, 0, 0.25);
}
.tl-chip:hover { filter: brightness(1.1); color: #fff; text-decoration: none; }
.tl-chip b { display: block; font-size: .72rem; }
.tl-chip .muted { color: rgba(255, 255, 255, 0.85); }
.tl-chip.dragging { opacity: .5; }
.tl-area.drop-target { background: rgba(255, 107, 0, 0.08); }

/* --- Chart bars --- */
.bar-row { display: flex; align-items: center; gap: .6rem; margin-bottom: .45rem; font-size: .88rem; }
.bar-label { flex: 0 0 230px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { flex: 1; background: rgba(255, 255, 255, 0.05); border-radius: 999px; height: 14px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary), #FF9A50); border-radius: 999px; }
.bar-val { flex: 0 0 110px; text-align: right; color: var(--muted); font-weight: 600; }
.chart-days { display: flex; align-items: flex-end; gap: 4px; height: 140px; overflow-x: auto; padding-top: .5rem; }
.chart-day { flex: 0 0 26px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.chart-bar { width: 100%; background: linear-gradient(180deg, #FF9A50, var(--primary)); border-radius: 4px 4px 0 0; min-height: 2px; }
.chart-label { font-size: .65rem; color: var(--muted); margin-top: .2rem; }

/* --- Calendar cell quick-add --- */
.cal-add { display: block; text-align: center; color: var(--muted); font-size: .95rem; font-weight: 800; text-decoration: none; }
.cal-add:hover { color: var(--primary); }
.cal-daynum a { color: var(--muted); text-decoration: none; }
.cal-daynum a:hover { color: var(--primary); }

/* --- Leave / away indicators (public calendar) --- */
.leave-banner { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: 1rem; font-size: .88rem; }
.cal-away { background: rgba(245, 158, 11, 0.06); border-color: rgba(245, 158, 11, 0.25); }
.cal-away-tag {
  display: inline-block; font-size: .62rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .05em; color: #FBBF24;
  background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 4px; padding: 0 4px; margin-bottom: 3px;
}

/* --- Admin calendar: leave blocks (drag/stretch) --- */
.cal-leave {
  position: relative;
  grid-row: 2;
  display: flex; align-items: center; gap: .4rem;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 8px;
  padding: .25rem .5rem;
  z-index: 5;
  color: #FBBF24; font-size: .78rem; font-weight: 700;
  min-height: 26px;
}
.cal-leave-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.cal-leave-del {
  background: none; border: none; color: #FBBF24; cursor: pointer;
  font-size: .9rem; line-height: 1; padding: 0 2px; opacity: .7;
}
.cal-leave-del:hover { opacity: 1; }
.cal-leave-grip {
  cursor: col-resize; user-select: none; opacity: .5; font-size: .7rem; padding: 0 2px;
}
.cal-leave-grip:hover { opacity: 1; }
.cal-cell.cal-selecting { background: rgba(255, 107, 0, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 107, 0, 0.4); }

/* --- Help page --- */
.help-search { width: 100%; max-width: 360px; }
.help-layout { display: grid; grid-template-columns: 250px 1fr; gap: 1.4rem; align-items: start; margin-top: 1rem; }
@media (max-width: 860px) { .help-layout { grid-template-columns: 1fr; } }
.help-nav {
  position: sticky; top: 88px;
  display: flex; flex-direction: column; gap: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  max-height: calc(100vh - 110px); overflow-y: auto;
}
.help-nav-group { display: flex; flex-direction: column; gap: 2px; }
.help-nav-group b { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 4px; }
.help-nav-group a { color: var(--ink-soft); font-size: .88rem; padding: 4px 8px; border-radius: 6px; }
.help-nav-group a:hover { background: rgba(255, 107, 0, 0.1); color: #fff; }
.help-content h2 { margin-top: 1.4rem; border-bottom: 1px solid var(--line); padding-bottom: .4rem; }
.help-content section:first-child h2 { margin-top: 0; }
.help-topic {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .9rem 1.1rem;
  margin-bottom: .6rem;
  scroll-margin-top: 90px;
}
.help-topic h3 { margin-bottom: .35rem; font-size: 1rem; }
.help-topic ol { margin: .3rem 0 .6rem; padding-left: 1.3rem; }
.help-topic li { margin-bottom: .2rem; }
.help-topic p:last-child { margin-bottom: 0; }
