:root{
  --navy-950:#050505;
  --navy-900:#111111;
  --navy-800:#1C1C1C;
  --navy-700:#2A2A2A;
  /* Hazard yellow — the single, flat brand accent. */
  --gold-700:#F4CC12;
  --gold-600:#F4CC12;
  --gold-500:#F4CC12;
  --gold-400:#F4CC12;
  --gold-50:#FFFBE6;
  --bg:#F7F7F4;
  --card:#FFFFFF;
  --border:#E5E5DF;
  --ink-900:#171717;
  --ink-600:#5F5F5A;
  --ink-400:#8A8A83;
  --green-600:#178A4C;
  --green-50:#E9F8EF;
  --amber-600:#B5790B;
  --amber-50:#FDF3E1;
  --red-600:#C2372A;
  --red-50:#FCEAE8;
}
html[data-theme="dark"]{
  color-scheme:dark;
  --navy-950:#030303;
  --navy-900:#090909;
  --navy-800:#151515;
  --navy-700:#242424;
  --bg:#050505;
  --card:#171717;
  --border:#30302D;
  --ink-900:#F7F7F2;
  --ink-600:#C2C2BA;
  --ink-400:#8D8D86;
  --green-600:#55D98A;
  --green-50:#123525;
  --amber-600:#F0B94C;
  --amber-50:#39310E;
  --red-600:#FF786D;
  --red-50:#3A1D1D;
}
*{font-family:'Satoshi',ui-sans-serif,system-ui,sans-serif;}
body{background:var(--bg);color:var(--ink-900);}
html[data-theme="dark"] body{background:linear-gradient(160deg,#0D0D0D 0%,#030303 72%) fixed;}
.font-display{font-family:'Satoshi',sans-serif;font-weight:700;letter-spacing:-0.01em;}

/* Sidebar */
#sidebar{background:#fff;border-right:1px solid var(--border);overflow:hidden;}
.sidebar-nav{scrollbar-width:none;-ms-overflow-style:none;}
.sidebar-nav::-webkit-scrollbar{display:none;}
.nav-link{display:flex;align-items:center;gap:.65rem;padding:.55rem .85rem;border-radius:10px;color:var(--ink-600);font-size:.86rem;font-weight:500;transition:background .15s, color .15s;}
.nav-link:hover{background:var(--gold-50);color:var(--ink-900);}
.nav-link.active{background:rgba(244,204,18,.16);box-shadow:inset 3px 0 0 var(--gold-500);color:var(--gold-400);}
.nav-link.active svg{stroke:var(--gold-400);}
html:not([data-theme="dark"]) .nav-link.active{color:#6B5700;}
html:not([data-theme="dark"]) .nav-link.active svg{stroke:#6B5700;}
.nav-section-label{color:var(--ink-400);font-size:.68rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;padding:.9rem .85rem .3rem;}
.sidebar-brand-mark{width:38px;height:38px;border-radius:10px;background:#080808;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 14px rgba(244,204,18,.28);overflow:hidden;}
.sidebar-brand-mark img{width:100%;height:100%;object-fit:cover;display:block;}
.login-brand-mark{width:56px;height:56px;border-radius:14px;}

/* Cards */
.card{background:var(--card);border:1px solid var(--border);border-radius:14px;box-shadow:0 1px 2px rgba(16,24,40,.04);}
.card-title-accent{position:relative;padding-left:.75rem;}
.card-title-accent::before{content:"";position:absolute;left:0;top:2px;bottom:2px;width:3px;border-radius:3px;background:var(--gold-500);}
.quick-action:hover{border-color:var(--gold-500);background:var(--gold-50);}

/* Badges */
.badge{display:inline-flex;align-items:center;gap:.3rem;padding:.22rem .62rem;border-radius:999px;font-size:.72rem;font-weight:600;}
.badge-green{background:var(--green-50);color:var(--green-600);}
.badge-amber{background:var(--amber-50);color:var(--amber-600);}
.badge-red{background:var(--red-50);color:var(--red-600);}
.badge-gray{background:#F1F1EF;color:var(--ink-600);}
.badge-gold{background:var(--gold-50);color:var(--gold-600);}

/* Buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;font-weight:600;font-size:.85rem;border-radius:10px;padding:.55rem 1rem;transition:all .15s;}
.btn-primary{background:var(--navy-900);color:#fff;}
.btn-primary:hover{background:var(--navy-800);}
.btn-gold{background:var(--gold-500);color:#2E2700;box-shadow:0 5px 12px rgba(244,204,18,.22);}
.btn-gold:hover{background:#FFD920;box-shadow:0 7px 16px rgba(244,204,18,.3);transform:translateY(-1px);}
.btn-outline{background:#fff;color:var(--ink-900);border:1px solid var(--border);}
.btn-outline:hover{background:#FAFAF8;}
.btn-ghost{color:var(--ink-600);}
.btn-ghost:hover{background:#F1F1EF;}
.btn-danger{background:var(--red-50);color:var(--red-600);}

/* Inputs */
.input, select.input, textarea.input{width:100%;border:1px solid var(--border);border-radius:10px;padding:.55rem .75rem;font-size:.86rem;background:#fff;color:var(--ink-900);}
.input:focus, select.input:focus, textarea.input:focus{outline:none;border-color:var(--gold-500);box-shadow:0 0 0 3px rgba(244,204,18,.24);}
label.field-label{font-size:.78rem;font-weight:600;color:var(--ink-600);margin-bottom:.3rem;display:block;}

/* Table */
table.data-table{width:100%;border-collapse:separate;border-spacing:0;font-size:.84rem;}
table.data-table thead th{text-align:left;font-size:.7rem;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--ink-400);padding:.7rem .85rem;border-bottom:1px solid var(--border);white-space:nowrap;}
table.data-table thead th.text-right{text-align:right;}
table.data-table tbody td{padding:.75rem .85rem;border-bottom:1px solid var(--border);color:var(--ink-900);white-space:nowrap;}
table.data-table tbody tr:hover{background:#FAFAF8;}
table.data-table tbody tr:last-child td{border-bottom:none;}

/* Scrollbar */
::-webkit-scrollbar{height:8px;width:8px;}
::-webkit-scrollbar-thumb{background:#D8D5CC;border-radius:8px;}

/* Toast */
#toast-container{position:fixed;top:1rem;right:1rem;z-index:9999;display:flex;flex-direction:column;gap:.6rem;}
.toast{min-width:260px;background:var(--navy-900);color:#fff;padding:.75rem 1rem;border-radius:10px;font-size:.84rem;font-weight:500;box-shadow:0 8px 24px rgba(0,0,0,.2);display:flex;align-items:center;gap:.55rem;animation:toastIn .2s ease;}
.toast.success{border-left:3px solid var(--green-600);}
.toast.error{border-left:3px solid var(--red-600);}
.toast.info{border-left:3px solid var(--gold-500);}
@keyframes toastIn{from{opacity:0;transform:translateY(-8px);}to{opacity:1;transform:translateY(0);}}

/* Modal */
.modal-overlay{position:fixed;inset:0;background:rgba(15,23,42,.5);z-index:9998;display:flex;align-items:center;justify-content:center;padding:1rem;}
.modal-overlay.hidden{display:none !important;}
.modal-box{background:#fff;border-radius:16px;max-width:520px;width:100%;max-height:90vh;overflow-y:auto;box-shadow:0 20px 60px rgba(0,0,0,.25);}

/* Misc */
.divider-gold{height:2px;background:var(--gold-500);}
.stat-icon{width:42px;height:42px;border-radius:11px;display:flex;align-items:center;justify-content:center;}
.voucher-auth-sign,.voucher-stamp-wrap,.voucher-status-wrap{min-height:112px;display:flex;flex-direction:column;justify-content:flex-end;}
.scribble-sign{font-family:cursive;font-size:1.75rem;line-height:1;color:var(--navy-900);transform:rotate(-7deg);margin:0 auto 1.2rem;opacity:.82;}
.digital-stamp{width:92px;height:92px;border:2px solid var(--gold-600);border-radius:50%;margin:0 auto 1rem;display:flex;align-items:center;justify-content:center;position:relative;color:var(--gold-600);background:rgba(255,249,219,.7);box-shadow:inset 0 0 0 4px rgba(244,204,18,.22);}
.digital-stamp::before{content:"";position:absolute;inset:9px;border:1px dashed var(--gold-600);border-radius:50%;opacity:.75;}
.stamp-mark{width:42px;height:42px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:rgba(244,204,18,.16);}
.stamp-ring-text{position:absolute;left:0;right:0;text-align:center;font-size:.48rem;font-weight:800;letter-spacing:.09em;}
.stamp-top{top:13px;}
.stamp-bottom{bottom:13px;}
.invoice-status-stamp{width:max-content;max-width:100%;margin:0 auto 1rem;padding:.5rem .9rem;border:2px solid currentColor;border-radius:6px;font-size:.78rem;font-weight:900;letter-spacing:.12em;text-transform:uppercase;transform:rotate(-8deg);background:rgba(255,255,255,.55);}
.invoice-status-stamp.status-completed{color:var(--green-600);box-shadow:0 0 0 3px rgba(23,138,76,.12) inset;}
.invoice-status-stamp.status-pending,.invoice-status-stamp.status-partial{color:var(--gold-600);box-shadow:0 0 0 3px rgba(244,204,18,.2) inset;}

.settings-tab{color:var(--ink-600);}
.settings-tab.active{background:var(--navy-900);color:#fff;}
.settings-tab:not(.active):hover{background:#F1F1EF;}

.profile-trigger:hover{background:#F1F1EF;}
.profile-dropdown{opacity:0;visibility:hidden;transform:translateY(-4px);transition:opacity .15s ease,transform .15s ease,visibility .15s;z-index:60;}
.profile-menu:hover .profile-dropdown,.profile-menu:focus-within .profile-dropdown{opacity:1;visibility:visible;transform:translateY(0);}

/* Theme toggle and dark surfaces */
.theme-toggle .theme-moon{display:none;}
html[data-theme="dark"] .theme-toggle .theme-sun{display:none;}
html[data-theme="dark"] .theme-toggle .theme-moon{display:block;}
html[data-theme="dark"] #sidebar{background:linear-gradient(180deg,#0B0B0B 0%,#030303 100%);border-right-color:#202020;}
html[data-theme="dark"] #sidebar .nav-link{color:#C8C8C0;}
html[data-theme="dark"] #sidebar .nav-link:hover{background:rgba(244,204,18,.09);color:#fff;}
html[data-theme="dark"] #sidebar .nav-link.active{color:var(--gold-400);}
html[data-theme="dark"] #sidebar .nav-section-label{color:#777770;}
html:not([data-theme="dark"]) #sidebar .text-white{color:var(--ink-900) !important;}
html:not([data-theme="dark"]) #sidebar .text-white\/60{color:var(--ink-400) !important;}
html:not([data-theme="dark"]) #sidebar .border-white\/10{border-color:var(--border) !important;}
html[data-theme="dark"] #header{background:#111;}
html[data-theme="dark"] .bg-white{background-color:var(--card) !important;}
html[data-theme="dark"] .card,html[data-theme="dark"] .modal-box{box-shadow:0 10px 28px rgba(0,0,0,.18);}
html[data-theme="dark"] .modal-box{background:var(--card);color:var(--ink-900);border:1px solid var(--border);}
html[data-theme="dark"] .btn-outline{background:var(--card);color:var(--ink-900);}
html[data-theme="dark"] .btn-outline:hover,html[data-theme="dark"] .btn-ghost:hover,html[data-theme="dark"] .profile-trigger:hover{background:#262626;}
html[data-theme="dark"] .input,html[data-theme="dark"] select.input,html[data-theme="dark"] textarea.input{background:#0D0D0D;color:var(--ink-900);}
html[data-theme="dark"] select.input option{background:#171717;color:var(--ink-900);}
html[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator{filter:invert(1);opacity:.75;}
html[data-theme="dark"] table.data-table tbody tr:hover{background:#202020;}
html[data-theme="dark"] .quick-action:hover{border-color:var(--gold-500);background:rgba(244,204,18,.12);color:var(--ink-900);}
html[data-theme="dark"] .modal-overlay{background:rgba(1,5,10,.72);}
html[data-theme="dark"] ::-webkit-scrollbar-thumb{background:#3A3A36;}
html[data-theme="dark"] .badge-gray{background:#2A2A28;color:#D4D4CC;}
html[data-theme="dark"] .badge-gold{background:rgba(244,204,18,.18);color:#FFE15A;border:1px solid rgba(244,204,18,.32);}
html[data-theme="dark"] .settings-tab:not(.active):hover{background:#262626;}

/* Function checklist cards must stay on the dark surface even when utility CSS
   is generated after this stylesheet. */
html[data-theme="dark"] .condition-card{background:#171717 !important;border-color:#30302D;color:var(--ink-900);}

/* Muhurtham headers use a dark gold tint instead of the light paper swatch. */
html[data-theme="dark"] .muhurtham-month-header{background:rgba(244,204,18,.10) !important;}
html[data-theme="dark"] .muhurtham-month-header .badge-gold{background:rgba(244,204,18,.16);color:#FFE15A;}

.muhurtham-date-badge{
  display:inline-flex;
  width:52px;
  height:52px;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:1px;
  border-radius:14px;
  background:var(--gold-50);
  color:#6b5700;
  line-height:1;
}
.muhurtham-date-day{
  font-size:20px;
  font-weight:700;
  letter-spacing:-.02em;
}
.muhurtham-date-month{
  font-size:10px;
  font-weight:800;
  letter-spacing:.03em;
}
html[data-theme="dark"] .muhurtham-date-badge{
  background:rgba(244,204,18,.14);
  color:#ffe15a;
}

/* Reservations calendar */
.reservation-calendar-cell{position:relative;padding:.375rem;cursor:pointer;border:1px solid var(--border);border-radius:.5rem;background:var(--card);transition:border-color .15s,background-color .15s,box-shadow .15s;}
.reservation-calendar-cell:hover{border-color:var(--gold-500);background:#fffdf3;}
.reservation-calendar-cell.is-muhurtham{background:#fff9df;border-color:#eadb92;}
.reservation-calendar-cell.is-selected{border-color:var(--gold-500);box-shadow:0 0 0 2px var(--gold-500);}
.calendar-day-number{display:inline-flex;align-items:center;justify-content:center;min-width:1.25rem;height:1.25rem;font-size:11px;font-weight:700;}
.calendar-day-number.is-today{border-radius:999px;background:var(--gold-500);color:#2e2700;}
.calendar-event-chip{margin-bottom:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:4px;padding:2px 4px;color:#fff;font-size:10px;font-weight:600;line-height:1.25;}
.calendar-legend-dot{width:.625rem;height:.625rem;flex:none;border-radius:999px;}
.event-wedding{background:#c9a227;}
.event-puberty{background:#178a4c;}
.event-reception{background:#b5790b;}
.event-engagement{background:#26354d;}
.event-other{background:#686862;}
.calendar-view-toggle{padding:.375rem .75rem;background:var(--card);color:var(--ink-600);font-size:.75rem;font-weight:600;transition:background-color .15s,color .15s;}
.calendar-view-toggle + .calendar-view-toggle{border-left:1px solid var(--border);}
.calendar-view-toggle:hover{background:var(--gold-50);color:var(--ink-900);}
.calendar-view-toggle.is-active{background:var(--gold-500);color:#2e2700;}
html[data-theme="dark"] .reservation-calendar-cell{background:#111;border-color:#343430;}
html[data-theme="dark"] .reservation-calendar-cell:hover{background:#1e1c12;border-color:#d7b814;}
html[data-theme="dark"] .reservation-calendar-cell.is-muhurtham{background:rgba(244,204,18,.09);border-color:rgba(244,204,18,.34);}
html[data-theme="dark"] .reservation-calendar-cell.is-selected{border-color:#f4cc12;box-shadow:0 0 0 2px #f4cc12;}
html[data-theme="dark"] .event-wedding{background:#a88409;}
html[data-theme="dark"] .event-puberty{background:#147a45;}
html[data-theme="dark"] .event-reception{background:#9b6508;}
html[data-theme="dark"] .event-engagement{background:#40577a;}
html[data-theme="dark"] .event-other{background:#5d5d58;}
html[data-theme="dark"] .calendar-view-toggle{background:#111;color:var(--ink-600);}
html[data-theme="dark"] .calendar-view-toggle:hover{background:#27230f;color:#fff;}
html[data-theme="dark"] .calendar-view-toggle.is-active{background:#f4cc12;color:#2e2700;}
html[data-theme="dark"] .reservation-calendar-card select.input{background-color:#0d0d0d;border-color:#3a3a35;color:#f7f7f2;}
html[data-theme="dark"] .reservation-calendar-card .btn-outline{background:#111;border-color:#3a3a35;}
html[data-theme="dark"] .reservation-calendar-card .btn-outline:hover{background:#27230f;border-color:#d7b814;}

/* Receipts remain paper-white in dark mode so preview, print and PDF match. */
html[data-theme="dark"] :is(#voucherReceipt,#voucherSheet){
  --card:#FFFFFF;
  --border:#E5E5DF;
  --ink-900:#171717;
  --ink-600:#5F5F5A;
  --ink-400:#777770;
  --navy-900:#111111;
  --green-600:#178A4C;
  --amber-600:#B5790B;
  --red-600:#C2372A;
  background:#FFFFFF;
  border-color:#E5E5DF;
  color:#171717;
  box-shadow:0 18px 45px rgba(0,0,0,.38);
}
html[data-theme="dark"] :is(#voucherReceipt,#voucherSheet) .scribble-sign{color:#111111;opacity:.82;}
html[data-theme="dark"] :is(#voucherReceipt,#voucherSheet) .digital-stamp{background:rgba(255,249,219,.7);}
html[data-theme="dark"] :is(#voucherReceipt,#voucherSheet) .stamp-mark{background:rgba(244,204,18,.16);}
html[data-theme="dark"] :is(#voucherReceipt,#voucherSheet) .invoice-status-stamp{background:rgba(255,255,255,.55);}
html[data-theme="dark"] :is(#voucherReceipt,#voucherSheet) .text-\[var\(--green-600\)\]{color:#178A4C;}
html[data-theme="dark"] :is(#voucherReceipt,#voucherSheet) .text-\[var\(--red-600\)\]{color:#C2372A;}
html[data-theme="dark"] :is(#voucherReceipt,#voucherSheet) table.data-table tbody tr:hover{background:#FAFAF8;}

@media print{
  #sidebar,#header,.no-print{display:none !important;}
  #main-content{margin:0 !important;padding:0 !important;}
  body{background:#fff;}
}
