:root{--bg:#F7F8FA;--card:#fff;--line:#E5E7EB;--text:#1F2937;--muted:#6B7280;--accent:#2563EB;--danger:#B91C1C;--ok:#15803D}*{box-sizing:border-box}body{margin:0;background:var(--bg);font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;color:var(--text)}a{text-decoration:none;color:inherit}.main{min-height:calc(100vh - 58px)}.topbar{height:58px;display:flex;align-items:center;gap:22px;padding:0 22px;background:rgba(255,255,255,.92);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:5;backdrop-filter:blur(10px)}.brand{font-weight:800;letter-spacing:.02em}.brand-dot{display:inline-block;width:10px;height:10px;border-radius:50%;background:var(--accent);margin-right:8px}.topbar nav{display:flex;gap:4px;flex:1}.topbar nav a{padding:9px 12px;border-radius:12px;color:#374151;font-size:14px}.topbar nav a:hover{background:#EEF2FF}.userbox{font-size:13px;color:var(--muted)}.userbox a{margin-left:10px;color:var(--accent)}.login-wrap{min-height:100vh;display:grid;place-items:center;padding:20px}.login-card{width:min(430px,100%);background:var(--card);padding:34px;border:1px solid var(--line);border-radius:28px;box-shadow:0 24px 60px rgba(31,41,55,.08)}.logo-mark{width:64px;height:64px;border-radius:20px;background:#EEF2FF;color:var(--accent);display:grid;place-items:center;font-weight:900;margin-bottom:18px}.login-card h1{font-size:24px;line-height:1.2;margin:0 0 8px}.login-card p{margin:0 0 24px;color:var(--muted)}label{display:block;font-size:13px;font-weight:650;color:#374151;margin:10px 0 6px}input,select,textarea{width:100%;border:1px solid var(--line);border-radius:13px;background:#fff;padding:11px 12px;font:inherit;outline:none}textarea{min-height:90px}input:focus,select:focus,textarea:focus{border-color:#93C5FD;box-shadow:0 0 0 4px #DBEAFE}button,.primary,.secondary,.primary-link{border:0;border-radius:13px;padding:11px 14px;font-weight:750;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px}button,.primary,.primary-link{background:var(--accent);color:white}.secondary{background:#EEF2FF;color:#1D4ED8}.danger{background:var(--danger)!important}.alert,.success,.empty{padding:13px 14px;border-radius:14px;margin:12px 0}.alert{background:#FEF2F2;color:#991B1B}.success{background:#ECFDF5;color:#065F46}.empty{background:#fff;border:1px dashed var(--line);color:var(--muted)}small{color:var(--muted)}.calendar-shell{height:calc(100vh - 58px);display:flex;flex-direction:column;padding:18px;gap:12px}.hero-row{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.hero-row h1{font-size:23px;margin:0}.hero-row p{margin:5px 0 0;color:var(--muted)}.kpis{display:flex;gap:10px;flex-wrap:wrap}.kpis span{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:10px 13px;font-size:13px;color:var(--muted)}.kpis b{color:var(--text);font-size:18px}.toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;background:var(--card);border:1px solid var(--line);border-radius:20px;padding:10px}.toolbar button{background:#fff;color:#374151;border:1px solid var(--line);padding:9px 12px}.toolbar button.active{background:var(--accent);color:white}.toolbar select,.toolbar input{width:auto;min-width:140px;padding:9px 10px}.calendar-title{font-weight:800;font-size:18px;padding:0 4px}.calendar-grid{flex:1;min-height:0;background:var(--card);border:1px solid var(--line);border-radius:24px;overflow:hidden;display:block}.month-grid{display:grid;width:100%;height:100%;grid-template-columns:repeat(7,1fr);grid-template-rows:auto repeat(6,minmax(80px,1fr))}.dow{background:#F9FAFB;color:var(--muted);font-size:12px;font-weight:800;text-transform:uppercase;padding:10px;border-right:1px solid var(--line);border-bottom:1px solid var(--line)}.daycell{border-right:1px solid var(--line);border-bottom:1px solid var(--line);padding:8px;overflow:hidden;cursor:pointer}.daycell:hover{background:#F8FAFC}.daynum{font-size:13px;font-weight:800;margin-bottom:5px}.muted-day{color:#B6BDC8;background:#FAFAFA}.event-chip{display:block;margin:3px 0;padding:4px 6px;border-radius:9px;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#111827;border-left:4px solid var(--accent);background:#F3F4F6}.event-chip.pending{opacity:.72;border-style:dashed;background:repeating-linear-gradient(45deg,#fff,#fff 6px,#F3F4F6 6px,#F3F4F6 12px)}.more{font-size:12px;color:var(--accent);font-weight:800;margin-top:4px}.week-grid,.day-grid{display:grid;grid-template-columns:70px repeat(7,1fr);overflow:auto}.day-grid{grid-template-columns:80px 1fr}.time-col,.week-head{background:#F9FAFB;border-right:1px solid var(--line);border-bottom:1px solid var(--line);padding:9px;font-size:12px;color:var(--muted);font-weight:750}.slot{min-height:54px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);padding:4px}.slot-event{border-radius:12px;padding:7px 8px;margin:3px;background:#F3F4F6;border-left:4px solid var(--accent);font-size:12px}.drawer{position:fixed;right:-430px;top:0;height:100vh;width:min(430px,96vw);background:#fff;border-left:1px solid var(--line);box-shadow:-20px 0 60px rgba(31,41,55,.14);z-index:10;transition:.24s;padding:22px;overflow:auto}.drawer.open{right:0}.drawer-close{float:right;background:#F3F4F6;color:#111827}.drawer h2{margin-top:20px}.drawer-item{border:1px solid var(--line);border-radius:18px;padding:14px;margin:12px 0}.drawer-item.pending{background:repeating-linear-gradient(45deg,#fff,#fff 8px,#F8FAFC 8px,#F8FAFC 16px)}.form-page{padding:22px;max-width:1180px;margin:0 auto}.form-page h1{font-size:24px}.card-form,.admin-card{background:#fff;border:1px solid var(--line);border-radius:24px;padding:18px;margin:14px 0}.compact{padding:14px}.grid2{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.grid4{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.data{width:100%;border-collapse:collapse;background:#fff;border:1px solid var(--line);border-radius:18px;overflow:hidden;margin-top:14px}.data th,.data td{border-bottom:1px solid var(--line);padding:10px;text-align:left;font-size:14px}.data th{background:#F9FAFB;color:#4B5563}.admin-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.admin-card h3{margin:0 0 8px}.admin-card input,.admin-card select{margin-bottom:8px}.list-cards{display:grid;gap:12px}.list-card{background:#fff;border:1px solid var(--line);border-radius:20px;padding:16px}.list-card.pending{border-left:5px solid #D97706}.list-card h3{margin:0;display:flex;justify-content:space-between;gap:12px}.list-card p{margin:8px 0}.inline-actions{display:flex;gap:8px;align-items:center;margin-top:12px}.inline-actions input{max-width:280px}@media(max-width:760px){.topbar{height:auto;align-items:flex-start;flex-direction:column;padding:12px}.topbar nav{overflow:auto;width:100%;padding-bottom:3px}.main{min-height:auto}.calendar-shell{height:auto;min-height:calc(100vh - 100px);padding:10px}.hero-row{flex-direction:column}.toolbar{position:sticky;top:0;z-index:3}.toolbar select,.toolbar input{width:100%}.month-grid{grid-template-columns:1fr}.dow{display:none}.daycell{min-height:110px}.grid2,.grid3,.grid4,.admin-grid{grid-template-columns:1fr}.week-grid{grid-template-columns:60px repeat(3,190px)}.userbox{width:100%}}
/* refinement patch: admin + scheduler */
.page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:12px}.page-head h1{margin:0;font-size:25px}.page-head p{margin:5px 0 0;color:var(--muted)}
.admin-page{max-width:1280px}.admin-card{min-height:238px;box-shadow:0 16px 40px rgba(31,41,55,.035);transition:.18s}.admin-card:hover{transform:translateY(-1px);box-shadow:0 20px 55px rgba(31,41,55,.06)}.admin-card h3{font-size:17px}.admin-card p{font-size:12px;color:var(--muted);margin:0 0 12px;min-height:30px}.check-row{display:flex!important;align-items:center;gap:10px;margin:10px 0!important;padding:9px 10px;border:1px solid var(--line);border-radius:12px;background:#F9FAFB;font-size:13px}.check-row input{width:16px!important;height:16px;margin:0!important;box-shadow:none}.check-row span{line-height:1.2}.color-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:6px 0 8px;padding:8px 10px;border:1px solid var(--line);border-radius:12px;background:#F9FAFB}.color-row span{font-size:13px;font-weight:650;color:#374151}.color-row input[type=color]{width:64px;height:34px;padding:2px;border-radius:10px;margin:0}.admin-card button{margin-top:6px}
.daytop{display:flex;justify-content:space-between;align-items:center;margin-bottom:4px}.holiday-badge{font-size:10px;border-radius:999px;padding:2px 6px;background:#E5E7EB;color:#374151;font-weight:800}.holiday-name{font-size:11px;color:#6B7280;margin:-1px 0 4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.weekend-day,.closed-holiday-day{background:#F1F3F5!important}.restricted-holiday-day{background:#FFF7ED!important}.weekend-head,.weekend-slot{background:#F3F4F6!important}.closed-holiday-day .holiday-badge{background:#D1D5DB}.restricted-holiday-day .holiday-badge{background:#FED7AA;color:#9A3412}
.scheduler-page{padding:18px;max-width:1500px;margin:0 auto}.scheduler-head{align-items:center}.scheduler-layout{display:grid;grid-template-columns:minmax(420px,1fr) minmax(520px,0.9fr);gap:16px;align-items:start}.scheduler-left{display:grid;grid-template-columns:1fr;gap:16px}.mini-card,.day-agenda-card,.scheduler-form{background:#fff;border:1px solid var(--line);border-radius:24px;padding:16px;box-shadow:0 18px 50px rgba(31,41,55,.04)}.mini-toolbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.mini-toolbar button{width:38px;height:34px;padding:0;background:#F3F4F6;color:#111827}.mini-toolbar b{font-size:16px}.mini-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}.mini-dow{text-align:center;font-size:11px;color:var(--muted);font-weight:800;padding:4px}.mini-day{min-height:54px;border:1px solid var(--line);background:#fff;color:#111827;border-radius:14px;padding:6px;display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative}.mini-day:hover{border-color:#93C5FD;background:#EFF6FF}.mini-day.selected{background:#2563EB!important;color:#fff;border-color:#2563EB;box-shadow:0 8px 24px rgba(37,99,235,.22)}.mini-day small{font-size:10px;color:inherit;opacity:.85;margin-top:1px}.mini-day em{position:absolute;right:7px;top:7px;width:6px;height:6px;border-radius:50%;background:#9CA3AF}.mini-muted{opacity:.42}.mini-weekend,.mini-closed{background:#F1F3F5}.mini-rh{background:#FFF7ED}.legend-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px;font-size:12px;color:var(--muted)}.legend{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:5px;vertical-align:-1px}.legend.closed{background:#D1D5DB}.legend.restricted{background:#FED7AA}.legend.pending{background:repeating-linear-gradient(45deg,#fff,#fff 3px,#CBD5E1 3px,#CBD5E1 6px);border:1px solid #CBD5E1}.agenda-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.agenda-head h2{font-size:18px;margin:0}.agenda-head p{margin:4px 0 0;color:var(--muted);font-size:13px}.day-agenda-list{display:grid;gap:9px;margin-top:12px;max-height:380px;overflow:auto;padding-right:4px}.agenda-item{border:1px solid var(--line);border-left:4px solid var(--accent);border-radius:15px;padding:10px;background:#F9FAFB;display:grid;gap:3px}.agenda-item.pending{background:repeating-linear-gradient(45deg,#fff,#fff 8px,#F3F4F6 8px,#F3F4F6 16px)}.agenda-item b{font-size:13px}.agenda-item span{font-size:13px}.agenda-item small{font-size:12px;color:var(--muted)}.scheduler-form{position:sticky;top:76px}.form-section-title{font-size:16px;font-weight:850;margin-bottom:10px}.date-summary{background:#EFF6FF;color:#1D4ED8;border:1px solid #BFDBFE;border-radius:14px;padding:11px 12px;margin:12px 0;font-weight:800}.quick-times{display:flex;gap:7px;flex-wrap:wrap;margin:8px 0 10px}.quick-times button{background:#F3F4F6;color:#111827;border:1px solid var(--line);font-size:12px;padding:8px 10px}.quick-times button:hover{background:#E5E7EB}.soft-warning,.hard-warning{border-radius:14px;padding:10px 12px;margin:8px 0;font-size:13px;font-weight:700}.soft-warning{background:#FFF7ED;color:#9A3412;border:1px solid #FED7AA}.hard-warning{background:#FEF2F2;color:#991B1B;border:1px solid #FECACA}
@media(max-width:1050px){.scheduler-layout{grid-template-columns:1fr}.scheduler-form{position:static}}@media(max-width:760px){.page-head,.scheduler-head{flex-direction:column}.mini-day{min-height:46px;border-radius:11px}.scheduler-page{padding:10px}.day-agenda-list{max-height:none}.admin-card p{min-height:auto}}
/* update 04: CRUD admin + Monday calendar polish */
.drawer-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.admin-tabs{display:flex;gap:8px;flex-wrap:wrap;position:sticky;top:58px;z-index:4;background:rgba(247,248,250,.94);backdrop-filter:blur(10px);padding:10px 0;margin-bottom:12px}.admin-tabs a{background:#fff;border:1px solid var(--line);border-radius:999px;padding:9px 13px;font-size:13px;font-weight:800;color:#374151}.admin-tabs a:hover{background:#EEF2FF;color:#1D4ED8}.crud-section{background:#fff;border:1px solid var(--line);border-radius:26px;padding:18px;margin:16px 0 22px;box-shadow:0 18px 50px rgba(31,41,55,.04);scroll-margin-top:118px}.crud-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-end;margin-bottom:12px}.crud-head h2{margin:0;font-size:20px}.crud-head p{margin:4px 0 0;color:var(--muted);font-size:13px}.crud-form{display:grid;grid-template-columns:180px minmax(220px,1fr) auto auto;gap:9px;align-items:center;background:#F9FAFB;border:1px solid var(--line);border-radius:18px;padding:12px;margin-bottom:12px}.crud-form.wide{grid-template-columns:180px repeat(4,minmax(130px,1fr)) auto auto}.crud-form input,.crud-form select{margin:0}.crud-form .check-row{margin:0!important;background:#fff;height:44px}.row-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.row-actions form{display:inline}.row-actions button{padding:8px 10px;font-size:12px}.inactive-row{opacity:.58;background:#FAFAFA}.color-dot{display:inline-block;width:14px;height:14px;border-radius:50%;margin-right:8px;vertical-align:-2px;border:1px solid rgba(0,0,0,.08)}.data tr:hover td{background:#F8FAFC}.week-head small{font-size:10px;color:#6B7280;font-weight:800}.closed-holiday-day{background:#F1F3F5!important;color:#4B5563}.closed-holiday-day:hover{background:#E9ECEF!important}.weekend-slot,.weekend-head{background:#F1F3F5!important}.mini-closed,.mini-weekend{background:#F1F3F5!important;color:#4B5563}.mini-closed.selected,.mini-weekend.selected{background:#2563EB!important;color:#fff!important}
@media(max-width:1000px){.crud-form,.crud-form.wide{grid-template-columns:1fr}.admin-tabs{top:0}.crud-section{scroll-margin-top:70px}}
/* update 05: commitment details + HoD availability */
.availability-layout{display:grid;grid-template-columns:420px 1fr;gap:16px;align-items:start}.availability-form{position:sticky;top:78px}.inline-filter{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.inline-filter input{width:auto}.multi-select{min-height:128px}.availability-chip{background:#F1F3F5!important;color:#374151!important;border-color:#CBD5E1!important}.event-chip.availability-chip{font-weight:850;border-left-color:#9CA3AF!important}.detail-layout{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:16px;align-items:start}.detail-title-row{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}.detail-title-row h2{display:inline;margin:0 0 0 8px;font-size:22px}.type-pill{display:inline-block;width:16px;height:16px;border-radius:50%;vertical-align:1px}.status-badge{display:inline-flex;border-radius:999px;padding:7px 10px;font-size:12px;font-weight:900;background:#E5E7EB;color:#374151}.status-badge.pending{background:#FEF3C7;color:#92400E}.status-badge.approved{background:#DCFCE7;color:#166534}.status-badge.cancelled,.status-badge.rejected{background:#FEE2E2;color:#991B1B}.detail-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin:18px 0}.detail-grid>div{background:#F9FAFB;border:1px solid var(--line);border-radius:15px;padding:12px}.detail-grid label,.detail-note label{margin:0 0 5px;color:var(--muted);font-size:12px}.detail-grid b{font-size:14px}.detail-note{background:#F9FAFB;border:1px solid var(--line);border-radius:15px;padding:12px;margin:12px 0}.detail-note p{margin:0}.participant-list{display:flex;gap:8px;flex-wrap:wrap}.participant-list span{background:#EEF2FF;color:#1D4ED8;border-radius:999px;padding:8px 10px;font-weight:800;font-size:13px}.detail-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-top:18px}.detail-actions form{display:inline-flex;margin:0}.agenda-item{cursor:pointer}.agenda-item.availability-chip{cursor:default}@media(max-width:1050px){.availability-layout,.detail-layout{grid-template-columns:1fr}.availability-form{position:static}.detail-grid{grid-template-columns:1fr}}
.premium-login{
  min-height:calc(100vh - 64px);
  background:
    radial-gradient(circle at 15% 20%, rgba(37,99,235,.12), transparent 28%),
    radial-gradient(circle at 85% 80%, rgba(14,165,233,.10), transparent 30%),
    linear-gradient(135deg,#f8fafc,#eef2f7);
}

.premium-card{
  width:430px;
  padding:34px;
  border-radius:28px;
  background:rgba(255,255,255,.88);
  backdrop-filter:blur(18px);
  border:1px solid rgba(226,232,240,.95);
  box-shadow:0 30px 80px rgba(15,23,42,.12);
}

.premium-logo{
  width:56px;
  height:56px;
  border-radius:18px;
  background:linear-gradient(135deg,#2563eb,#38bdf8);
  color:#fff;
}

.premium-card h1{
  font-size:25px;
  line-height:1.15;
  margin:18px 0 8px;
  color:#0f172a;
}

.premium-card p{
  color:#64748b;
  margin-bottom:26px;
}

.premium-card input{
  height:46px;
  border-radius:14px;
  background:#f8fafc;
}

.premium-card button{
  width:100%;
  height:46px;
  border-radius:14px;
  margin-top:10px;
  font-weight:700;
  background:linear-gradient(135deg,#2563eb,#1d4ed8);
}

.login-help{
  margin-top:18px;
  padding:12px 14px;
  border-radius:16px;
  background:#f8fafc;
  font-size:12px;
  color:#64748b;
}
/* Premium Calendar Dashboard */

.premium-dashboard {
  min-height: calc(100vh - 58px);
  padding: 28px;
  background:
    radial-gradient(circle at 8% 8%, rgba(37,99,235,.09), transparent 28%),
    radial-gradient(circle at 92% 18%, rgba(14,165,233,.08), transparent 28%),
    linear-gradient(135deg,#f8fafc,#eef2f7);
}

.dashboard-hero {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 20px;
  margin-bottom: 18px;
}

.eyebrow {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(37,99,235,.10);
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 12px;
}

.dashboard-hero h1 {
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -.8px;
  margin: 0 0 8px;
  color: #0f172a;
  font-weight: 900;
}

.dashboard-hero p {
  max-width: 720px;
  margin: 0;
  color: #64748b;
  font-size: 14px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.hero-chip {
  min-width: 116px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.86);
  border: 1px solid #e5e7eb;
  color: #64748b;
  font-size: 12px;
  box-shadow: 0 10px 30px rgba(15,23,42,.05);
}

.hero-chip strong {
  display: block;
  color: #0f172a;
  font-size: 22px;
  margin-top: 2px;
}

.hero-chip.warning strong {
  color: #b45309;
}

.hero-primary {
  height: 48px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg,#2563eb,#1d4ed8);
  color: #fff !important;
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(37,99,235,.24);
}

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

.calendar-command-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 24px;
  background: rgba(255,255,255,.86);
  border: 1px solid #e5e7eb;
  box-shadow: 0 18px 45px rgba(15,23,42,.06);
  margin-bottom: 18px;
}

.view-switch {
  display: flex;
  gap: 6px;
  background: #f1f5f9;
  padding: 5px;
  border-radius: 18px;
}

.view-switch button {
  border: 0;
  background: transparent;
  padding: 10px 15px;
  border-radius: 14px;
  color: #475569;
  font-weight: 800;
}

.view-switch button.active {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 8px 20px rgba(37,99,235,.22);
}

.filter-strip {
  display: flex;
  gap: 8px;
  flex: 1;
}

.filter-strip input,
.filter-strip select {
  height: 44px;
  border-radius: 15px;
  border: 1px solid #dbe3ee;
  background: #fff;
  padding: 0 12px;
  min-width: 160px;
  color: #0f172a;
}

.filter-strip select {
  flex: 1;
}

.calendar-board {
  border-radius: 28px;
  background: rgba(255,255,255,.88);
  border: 1px solid #e5e7eb;
  box-shadow: 0 26px 70px rgba(15,23,42,.08);
  overflow: hidden;
}

.calendar-board-head {
  min-height: 72px;
  padding: 18px 22px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background:
    linear-gradient(180deg,rgba(255,255,255,.92),rgba(248,250,252,.88));
}

.calendar-title {
  font-size: 20px;
  font-weight: 900;
  color: #0f172a;
}

.calendar-note {
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
}

.legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.dot.approved { background: #2563eb; }
.dot.pending { background: #f59e0b; }
.dot.holiday { background: #cbd5e1; }

.premium-calendar-grid {
  border: 0;
  background: #fff;
}

.premium-calendar-grid .cal-head {
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.premium-calendar-grid .cal-cell {
  min-height: 118px;
  background: #fff;
  border-color: #edf2f7;
  transition: background .15s ease, transform .15s ease;
}

.premium-calendar-grid .cal-cell:hover {
  background: #f8fbff;
}

.premium-calendar-grid .cal-cell.weekend,
.premium-calendar-grid .cal-cell.closed-holiday {
  background:
    repeating-linear-gradient(
      -45deg,
      #f1f5f9,
      #f1f5f9 8px,
      #e9eef5 8px,
      #e9eef5 16px
    );
}

.premium-calendar-grid .cal-date {
  font-size: 13px;
  font-weight: 900;
  color: #0f172a;
}

.premium-calendar-grid .event {
  border: 0;
  border-left: 4px solid #2563eb;
  border-radius: 12px;
  padding: 5px 7px;
  margin-top: 5px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(37,99,235,.08);
}

.premium-calendar-grid .event.pending {
  background: #fffbeb;
  color: #92400e;
  border-left-color: #f59e0b;
  border-style: dashed;
}

.premium-calendar-grid .event.availability {
  background: #f1f5f9;
  color: #334155;
  border-left-color: #64748b;
}

.dashboard-footer-note {
  margin-top: 12px;
  text-align: right;
  color: #64748b;
  font-size: 12px;
}

.premium-drawer {
  border-left: 1px solid #e5e7eb;
  box-shadow: -30px 0 80px rgba(15,23,42,.12);
}

@media (max-width: 900px) {
  .premium-dashboard {
    padding: 14px;
  }

  .dashboard-hero,
  .calendar-command-bar,
  .calendar-board-head {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-strip {
    flex-direction: column;
  }

  .filter-strip input,
  .filter-strip select {
    width: 100%;
  }

  .dashboard-hero h1 {
    font-size: 25px;
  }

  .premium-calendar-grid .cal-cell {
    min-height: 92px;
  }
}
/* Make dashboard use full screen height */
.premium-dashboard{
  min-height: calc(100vh - 58px);
  height: calc(100vh - 58px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dashboard-hero{
  flex-shrink: 0;
}

.calendar-command-bar{
  flex-shrink: 0;
}

.calendar-board{
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.calendar-board-head{
  flex-shrink: 0;
}

.premium-calendar-grid{
  flex: 1;
  min-height: 0;
}

.premium-calendar-grid .cal-cell{
  min-height: unset !important;
  height: auto;
}

/* Month grid fills available height */
.premium-calendar-grid.month-grid{
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: 1fr;
}

/* Hide footer note from dashboard */
.dashboard-footer-note{
  display:none;
}

/* Update 07: Hideable Sidebar Navigation */
body{overflow:hidden;}
.app-shell{
  height:100vh;
  width:100vw;
  display:grid;
  grid-template-columns:248px minmax(0,1fr);
  background:
    radial-gradient(circle at 8% 8%, rgba(37,99,235,.07), transparent 28%),
    linear-gradient(135deg,#f8fafc,#eef2f7);
  transition:grid-template-columns .22s ease;
}
.sidebar{
  height:100vh;
  padding:14px 12px;
  background:rgba(255,255,255,.90);
  border-right:1px solid #e5e7eb;
  backdrop-filter:blur(18px);
  box-shadow:10px 0 35px rgba(15,23,42,.04);
  display:flex;
  flex-direction:column;
  gap:14px;
  z-index:30;
  overflow:hidden;
}
.sidebar-brand{
  display:grid;
  grid-template-columns:42px 1fr 38px;
  gap:10px;
  align-items:center;
  padding:7px;
  border-radius:20px;
  background:#f8fafc;
  border:1px solid #eef2f7;
}
.sidebar-logo{
  width:42px;height:42px;border-radius:15px;
  display:grid;place-items:center;
  color:#fff;font-weight:900;
  background:linear-gradient(135deg,#2563eb,#38bdf8);
  box-shadow:0 12px 28px rgba(37,99,235,.20);
}
.sidebar-title strong{display:block;color:#0f172a;font-size:15px;letter-spacing:.02em;}
.sidebar-title span{display:block;color:#64748b;font-size:11px;margin-top:2px;white-space:nowrap;}
.sidebar-toggle{
  width:36px;height:36px;padding:0;border-radius:13px;
  background:#fff;color:#0f172a;border:1px solid #e5e7eb;
}
.sidebar-nav{display:grid;gap:6px;}
.sidebar-nav a,.sidebar-help button{
  width:100%;
  height:44px;
  display:flex;
  align-items:center;
  gap:11px;
  border-radius:16px;
  padding:0 12px;
  color:#475569;
  font-size:13px;
  font-weight:800;
  background:transparent;
  border:0;
  justify-content:flex-start;
}
.sidebar-nav a:hover,.sidebar-help button:hover{background:#f1f5f9;color:#1d4ed8;}
.sidebar-nav a.active{
  color:#fff;
  background:linear-gradient(135deg,#2563eb,#1d4ed8);
  box-shadow:0 12px 28px rgba(37,99,235,.22);
}
.nav-ico{
  width:24px;min-width:24px;height:24px;
  border-radius:9px;
  display:grid;place-items:center;
  background:rgba(15,23,42,.06);
  font-size:13px;
}
.sidebar-nav a.active .nav-ico{background:rgba(255,255,255,.20);}
.sidebar-help{margin-top:auto;}
.help-panel{
  display:none;
  margin:6px 6px 0;
  padding:12px;
  border-radius:16px;
  background:#f8fafc;
  border:1px solid #e5e7eb;
  color:#475569;
  font-size:12px;
  line-height:1.45;
}
.help-panel.open{display:block;}
.sidebar-user{
  display:flex;align-items:center;gap:10px;
  padding:10px;
  border-radius:18px;
  background:#f8fafc;
  border:1px solid #e5e7eb;
}
.user-avatar{
  width:36px;height:36px;border-radius:14px;
  display:grid;place-items:center;
  background:#e0edff;color:#1d4ed8;font-weight:900;
}
.user-meta{min-width:0;}
.user-meta strong{display:block;font-size:12px;color:#0f172a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:150px;}
.user-meta span{display:block;font-size:11px;color:#64748b;margin-top:2px;}
.app-main{
  height:100vh;
  overflow:auto;
  position:relative;
  min-width:0;
}
.desktop-userline{
  position:absolute;
  top:10px;right:18px;
  display:flex;gap:10px;align-items:center;
  color:#64748b;font-size:12px;
  z-index:6;
}
.desktop-userline a{color:#2563eb;font-weight:800;}
.mobile-topbar{display:none;}
.sidebar-backdrop{display:none;}

/* collapsed sidebar */
.app-shell.sidebar-collapsed{grid-template-columns:72px minmax(0,1fr);}
.app-shell.sidebar-collapsed .sidebar{padding:14px 9px;}
.app-shell.sidebar-collapsed .sidebar-brand{grid-template-columns:42px;justify-content:center;padding:7px 5px;}
.app-shell.sidebar-collapsed .sidebar-title,
.app-shell.sidebar-collapsed .nav-text,
.app-shell.sidebar-collapsed .user-meta,
.app-shell.sidebar-collapsed .help-panel{display:none!important;}
.app-shell.sidebar-collapsed .sidebar-toggle{position:absolute;top:20px;left:46px;width:28px;height:28px;font-size:11px;box-shadow:0 8px 20px rgba(15,23,42,.10);}
.app-shell.sidebar-collapsed .sidebar-nav a,
.app-shell.sidebar-collapsed .sidebar-help button{justify-content:center;padding:0;}
.app-shell.sidebar-collapsed .sidebar-user{justify-content:center;padding:8px 4px;}

/* dashboard uses full space with sidebar */
.app-main .premium-dashboard{
  height:100vh!important;
  min-height:100vh!important;
  padding:18px 18px 12px!important;
}
.app-main .calendar-board{min-height:0!important;}
.app-main .premium-calendar-grid.month-grid{grid-auto-rows:1fr!important;}

@media(max-width:900px){
  body{overflow:auto;}
  .app-shell{display:block;height:auto;min-height:100vh;}
  .mobile-topbar{
    height:54px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 14px;
    background:rgba(255,255,255,.92);
    backdrop-filter:blur(16px);
    border-bottom:1px solid #e5e7eb;
    position:sticky;top:0;z-index:25;
  }
  .mobile-topbar button{width:38px;height:38px;padding:0;border-radius:13px;}
  .mobile-topbar a{color:#2563eb;font-weight:800;font-size:12px;}
  .sidebar{
    position:fixed;
    top:0;left:-280px;
    width:260px;
    transition:left .22s ease;
  }
  .app-shell.mobile-sidebar-open .sidebar{left:0;}
  .sidebar-modal-open .sidebar-backdrop{display:block;position:fixed;inset:0;background:rgba(15,23,42,.28);z-index:20;}
  .app-main{height:auto;min-height:calc(100vh - 54px);overflow:visible;}
  .desktop-userline{display:none;}
  .app-main .premium-dashboard{height:auto!important;min-height:calc(100vh - 54px)!important;padding:12px!important;overflow:visible!important;}
}
/* Admin page layout fix after sidebar */
.main-content,
.app-main,
.content,
.page-content {
  min-width: 0;
  width: 100%;
}

/* Admin page should scroll normally */
.admin-page,
.admin-shell,
.master-shell {
  height: auto !important;
  min-height: calc(100vh - 24px);
  overflow: visible !important;
}

/* Keep admin cards inside visible page */
.admin-page .card,
.admin-shell .card,
.master-shell .card {
  max-width: 100%;
  overflow: hidden;
}

/* Master tables should not disappear/cut */
.admin-page table,
.admin-shell table,
.master-shell table {
  width: 100%;
}

/* If table is wide, scroll inside card */
.table-responsive,
.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
}

/* Prevent tabs/menus from getting cut */
.master-tabs,
.admin-tabs,
.tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  padding: 10px 0;
}
/* Smart Sync UI */
.sync-toast{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:9999;
  background:#0f172a;
  color:#fff;
  padding:10px 14px;
  border-radius:14px;
  box-shadow:0 18px 45px rgba(15,23,42,.22);
  font-size:13px;
  font-weight:800;
  opacity:0;
  transform:translateY(10px);
  pointer-events:none;
  transition:.22s ease;
}
.sync-toast.show{opacity:1;transform:translateY(0)}
.sync-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border-radius:999px;
  padding:6px 10px;
  background:#f8fafc;
  border:1px solid #e5e7eb;
  color:#64748b;
  font-size:11px;
  font-weight:800;
}
.sync-badge:before{
  content:"";
  width:7px;
  height:7px;
  border-radius:50%;
  background:#22c55e;
}

/* Timeline week/day: proportional vertical event blocks with overlap columns */
.timeline-week-grid{
  height:100%;
  display:grid;
  grid-template-columns:72px repeat(7, minmax(120px, 1fr));
  grid-template-rows:42px 1fr;
  overflow:auto;
  background:#fff;
}
.timeline-day-grid{
  height:100%;
  display:grid;
  grid-template-columns:80px 1fr;
  overflow:auto;
  background:#fff;
}
.timeline-corner,.timeline-head{
  background:#F9FAFB;
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
}
.timeline-head{
  padding:9px 10px;
  font-size:12px;
  color:#374151;
  font-weight:850;
  cursor:pointer;
}
.timeline-head small{font-size:10px;color:#6B7280;font-weight:800}
.timeline-timecol{
  position:relative;
  background:#F9FAFB;
  border-right:1px solid var(--line);
}
.timeline-time{
  height:60px;
  padding:6px 8px;
  border-bottom:1px solid var(--line);
  color:#6B7280;
  font-size:11px;
  font-weight:750;
  text-align:right;
}
.timeline-day{
  position:relative;
  min-height:900px;
  border-right:1px solid var(--line);
  overflow:hidden;
  background:#fff;
}
.timeline-day.single{min-height:900px}
.timeline-line{
  position:absolute;
  left:0;
  right:0;
  height:1px;
  background:#EEF2F7;
  pointer-events:none;
}
.timeline-event{
  position:absolute;
  z-index:2;
  overflow:hidden;
  border-left:4px solid var(--accent);
  border-radius:10px;
  padding:6px 7px;
  background:#F3F4F6;
  color:#111827;
  font-size:11px;
  line-height:1.2;
  box-shadow:0 4px 12px rgba(15,23,42,.06);
  cursor:pointer;
}
.timeline-event:hover{box-shadow:0 8px 22px rgba(15,23,42,.12);transform:translateY(-1px)}
.timeline-event b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:850}
.timeline-event span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#4B5563;margin-top:2px}
.timeline-event.pending{
  opacity:.82;
  background:repeating-linear-gradient(45deg,#fff,#fff 6px,#F3F4F6 6px,#F3F4F6 12px);
  border-style:dashed;
}
.timeline-availability{
  position:absolute;
  z-index:3;
  height:22px;
  overflow:hidden;
  border-left:4px solid #64748B;
  border-radius:9px;
  padding:4px 7px;
  background:#F1F5F9;
  color:#334155;
  font-size:11px;
  box-shadow:0 3px 10px rgba(15,23,42,.05);
}
@media(max-width:900px){
  .timeline-week-grid{grid-template-columns:62px repeat(7, 180px)}
  .timeline-day-grid{grid-template-columns:64px minmax(520px,1fr)}
  .timeline-time{height:58px;font-size:10px}
  .timeline-day{min-height:870px}
}

/* update 13: dedicated mobile-friendly login + mobile web UI */
.mobile-login-subtitle{display:none}
.mobile-only{display:none!important}
.device-mobile .mobile-topbar strong{font-size:14px;letter-spacing:.01em}
@media(max-width:760px){
  html,body{width:100%;max-width:100%;overflow-x:hidden;background:#f8fafc;}
  body{font-size:15px;-webkit-text-size-adjust:100%;}
  input,select,textarea,button{font-size:16px;} /* prevents Android/iOS zoom on focus */
  .desktop-login-subtitle{display:none!important}
  .mobile-login-subtitle{display:block!important;margin-bottom:22px!important}
  .mobile-only{display:initial!important}
  .login-wrap.premium-login{min-height:100svh;padding:18px;background:linear-gradient(180deg,#eef6ff 0%,#f8fafc 45%,#ffffff 100%);display:flex;align-items:center;justify-content:center;}
  .premium-card{width:100%;max-width:420px;border-radius:30px;padding:28px 22px 22px;box-shadow:0 22px 55px rgba(15,23,42,.14);border-color:rgba(219,234,254,.95)}
  .premium-logo{width:52px;height:52px;border-radius:18px;margin-bottom:12px}
  .premium-card h1{font-size:28px;line-height:1.06;margin:14px 0 8px;letter-spacing:-.6px}
  .premium-card label{font-size:12px;text-transform:uppercase;letter-spacing:.05em;color:#64748b;margin-top:14px}
  .premium-card input{height:52px;border-radius:17px;background:#fff;border-color:#dbeafe;padding:0 15px}
  .premium-card button{height:52px;border-radius:17px;margin-top:16px;font-size:16px}
  .login-help{text-align:center;border-radius:18px;background:#f1f5f9;line-height:1.35}

  .premium-dashboard{padding:12px!important;background:linear-gradient(180deg,#eef6ff 0%,#f8fafc 38%,#ffffff 100%)}
  .dashboard-hero{display:block;margin-bottom:12px}
  .dashboard-hero .eyebrow{font-size:11px;margin-bottom:8px}
  .dashboard-hero h1{font-size:24px;letter-spacing:-.4px;margin-bottom:6px}
  .dashboard-hero p{font-size:12px;line-height:1.35}
  .hero-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;justify-content:stretch;margin-top:12px}
  .hero-chip{min-width:0;padding:10px 11px;border-radius:17px;font-size:11px;box-shadow:0 8px 22px rgba(15,23,42,.05)}
  .hero-chip strong{font-size:20px}
  .hero-primary{grid-column:1/-1;height:48px;justify-content:center;border-radius:17px}

  .calendar-command-bar{display:block;padding:10px;border-radius:22px;margin-bottom:12px;position:sticky;top:54px;z-index:18;background:rgba(255,255,255,.94);backdrop-filter:blur(14px)}
  .view-switch{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;padding:4px;border-radius:16px;margin-bottom:8px}
  .view-switch button{min-width:0;padding:10px 6px;border-radius:13px;font-size:12px}
  .filter-strip{display:grid;grid-template-columns:1fr 1fr;gap:7px;max-height:220px;overflow:auto}
  .filter-strip input,.filter-strip select{width:100%;min-width:0;height:42px;border-radius:14px;font-size:13px;padding:0 9px}
  .filter-strip #datePicker{grid-column:1/-1}
  .calendar-board{border-radius:22px;box-shadow:0 16px 40px rgba(15,23,42,.08)}
  .calendar-board-head{min-height:50px;padding:12px 14px}
  .calendar-title{font-size:16px}
  .premium-calendar-grid{min-height:calc(100svh - 330px);border-radius:0;border-left:0;border-right:0}

  /* mobile month becomes agenda-style cards instead of tiny 7-column desktop calendar */
  .month-grid{display:block;height:auto;min-height:0;background:#f8fafc;padding:8px}
  .month-grid .dow{display:none!important}
  .daycell{border:1px solid #e5e7eb!important;border-radius:18px;margin:0 0 8px;min-height:auto;background:#fff;padding:11px;box-shadow:0 6px 18px rgba(15,23,42,.04)}
  .daycell.muted-day{display:none}
  .daytop{align-items:center}
  .daynum{font-size:15px}
  .holiday-name{white-space:normal;font-size:12px;margin:3px 0 5px}
  .event-chip{font-size:12px;padding:7px 8px;border-radius:12px;margin:5px 0;white-space:normal;line-height:1.25}
  .more{font-size:12px}

  .drawer{width:100vw;right:-100vw;border-left:0;border-radius:24px 24px 0 0;top:10vh;height:90vh;padding:18px;box-shadow:0 -18px 60px rgba(15,23,42,.22)}
  .drawer.open{right:0}
  .drawer-close{position:sticky;top:0;float:none;width:42px;height:42px;margin-left:auto;display:flex}
  .drawer-item{border-radius:18px;padding:13px}
  .drawer-actions{display:grid;grid-template-columns:1fr;gap:8px}
  .drawer-actions a,.drawer-actions button{width:100%}

  .form-page,.scheduler-page{padding:12px;max-width:100%;background:linear-gradient(180deg,#eef6ff 0%,#f8fafc 38%,#ffffff 100%)}
  .page-head,.scheduler-head{display:block;margin-bottom:10px}
  .page-head h1{font-size:23px;letter-spacing:-.3px}
  .page-head p{font-size:12px;line-height:1.35}
  .page-head .secondary{width:100%;margin-top:10px}
  .scheduler-layout{display:flex;flex-direction:column;gap:12px}
  .scheduler-left{display:flex;flex-direction:column;gap:12px;width:100%}
  .mini-card,.day-agenda-card,.scheduler-form,.card-form,.admin-card{border-radius:22px;padding:14px;box-shadow:0 12px 32px rgba(15,23,42,.06)}
  .mini-toolbar button{width:44px;height:40px;border-radius:14px}
  .mini-grid{gap:5px}
  .mini-day{min-height:42px;border-radius:13px}
  .agenda-head{display:block}
  .agenda-head .secondary{width:100%;margin-top:8px}
  .agenda-item{border-radius:16px;padding:10px;margin-bottom:7px}
  .scheduler-form{width:100%}
  .form-section-title{font-size:13px;margin-top:4px}
  .grid2,.grid3,.grid4,.admin-grid{display:grid;grid-template-columns:1fr!important;gap:10px}
  .quick-times{display:grid;grid-template-columns:1fr 1fr;gap:7px}
  .quick-times button{width:100%;padding:10px 6px;border-radius:14px;font-size:12px}
  .multi-select{min-height:180px;font-size:15px;border-radius:16px}
  .scheduler-form .primary{width:100%;height:52px;border-radius:17px;font-size:16px;margin-top:8px;position:sticky;bottom:8px;z-index:8;box-shadow:0 14px 30px rgba(37,99,235,.25)}
  .date-summary{border-radius:16px}
  .soft-warning,.hard-warning{border-radius:15px;font-size:13px}

  .data{display:block;overflow-x:auto;border-radius:18px;white-space:nowrap}
  .inline-actions{display:grid;grid-template-columns:1fr;gap:8px}
  .inline-actions input,.inline-actions button,.inline-actions a{max-width:none;width:100%}
  .list-card h3{display:block;font-size:16px}
}

@media(max-width:420px){
  .hero-actions{grid-template-columns:1fr 1fr}
  .filter-strip{grid-template-columns:1fr}
  .quick-times{grid-template-columns:1fr}
  .premium-card h1{font-size:26px}
}
