/* KGC shared theme — one palette for the public site and the admin portal.
   Light = cream/brown/gold. Dark = deep brown/gold. Toggle: theme.js (saved in the browser). */
:root{
  --t-bg:#FDF8F0; --t-surface:#FFFFFF; --t-surface2:#F5EDD8; --t-border:#E6D8B8;
  --t-text:#3D2810; --t-heading:#3D2810; --t-label:#5C3210; --t-muted:#75603F;
  --t-accent:#C9A84C; --t-accent-light:#E8D090; --t-accent-text:#7A5C0E; --t-on-accent:#3D1F05;
  --t-nav:#3D2810;
  --t-fg-rgb:61,40,16; --t-bg-rgb:253,248,240;
  --t-shadow:0 4px 24px rgba(92,61,30,.13); --t-shadow-lg:0 8px 40px rgba(92,61,30,.18);
  color-scheme:light;
}
html[data-theme="dark"]{
  --t-bg:#15100B; --t-surface:#201812; --t-surface2:#2B2118; --t-border:#3C2E20;
  --t-text:#EDE3D0; --t-heading:#F6ECD6; --t-label:#DCCDAE; --t-muted:#B8A484;
  --t-accent:#C9A84C; --t-accent-light:#E8D090; --t-accent-text:#DDBE62; --t-on-accent:#2A1706;
  --t-nav:#0E0A06;
  --t-fg-rgb:237,227,208; --t-bg-rgb:21,16,11;
  --t-shadow:0 4px 24px rgba(0,0,0,.45); --t-shadow-lg:0 8px 40px rgba(0,0,0,.55);
  color-scheme:dark;
}

/* ---- Messages (same look on every page) ---- */
.alert-success,.msg{background:#F0FAF4;border-color:#6fcf97;color:#1a6b3c}
.alert-error,.err,.error{background:#FFF5F5;border-color:#fc8181;color:#b42323}
html[data-theme="dark"] .alert-success,html[data-theme="dark"] .msg{background:rgba(46,160,100,.14);border-color:rgba(111,207,151,.45);color:#86e0ad}
html[data-theme="dark"] .alert-error,html[data-theme="dark"] .err,html[data-theme="dark"] .error{background:rgba(220,53,69,.14);border-color:rgba(252,129,129,.45);color:#ff9a9a}

/* ---- Status badges ---- */
.badge-completed,.badge-done,.badge-ok{background:#D4EDDA;color:#155724}
.badge-ongoing,.badge-inprogress,.badge-reset{background:#FFF3CD;color:#7a5400}
.badge-upcoming{background:#CCE5FF;color:#004085}
.badge-blocked{background:#F8D7DA;color:#721C24}
.badge-todo,.badge-employee{background:#E2E3E5;color:#383D41}
.btn-del,.del-btn{color:#b42323}
html[data-theme="dark"] .badge-completed,html[data-theme="dark"] .badge-done,html[data-theme="dark"] .badge-ok{background:rgba(46,204,113,.16);color:#7fe0a8;border-color:rgba(46,204,113,.4)}
html[data-theme="dark"] .badge-ongoing,html[data-theme="dark"] .badge-inprogress,html[data-theme="dark"] .badge-reset,html[data-theme="dark"] .badge-admin{background:rgba(243,156,18,.16);color:#f5c15a;border-color:rgba(243,156,18,.4)}
html[data-theme="dark"] .badge-upcoming,html[data-theme="dark"] .badge-manager{background:rgba(52,152,219,.16);color:#7cc0f0;border-color:rgba(52,152,219,.4)}
html[data-theme="dark"] .badge-blocked{background:rgba(220,53,69,.16);color:#ff9a9a}
html[data-theme="dark"] .badge-todo,html[data-theme="dark"] .badge-employee{background:rgba(255,255,255,.08);color:#cfc6b4;border-color:rgba(255,255,255,.15)}
html[data-theme="dark"] .badge-secretary{background:rgba(46,204,113,.16);color:#7fe0a8;border-color:rgba(46,204,113,.4)}
html[data-theme="dark"] .btn-del,html[data-theme="dark"] .del-btn{color:#ff9a9a}
html[data-theme="dark"] .alert-banner{background:rgba(220,53,69,.14);color:#ff9a9a;border-color:rgba(252,129,129,.45)}

/* ---- Form controls in dark mode ---- */
html[data-theme="dark"] input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]):not([type=submit]):not([type=button]),
html[data-theme="dark"] select,html[data-theme="dark"] textarea{background:var(--t-bg);color:var(--t-text);border-color:var(--t-border)}
html[data-theme="dark"] input:focus,html[data-theme="dark"] select:focus,html[data-theme="dark"] textarea:focus{background:var(--t-surface2);border-color:var(--t-accent)}
html[data-theme="dark"] ::placeholder{color:var(--t-muted);opacity:.75}
html[data-theme="dark"] select option{background:var(--t-surface);color:var(--t-text)}

/* ---- Dark mode toggle ---- */
.kgc-theme-btn{display:inline-flex;align-items:center;gap:.5rem;cursor:pointer;font:inherit;font-size:.85rem;background:none;border:0;padding:0;color:rgba(255,255,255,.6)}
.kgc-theme-btn:hover{color:#E8D090}
.sidebar-footer .kgc-theme-wrap{margin-top:.6rem}
.kgc-theme-fab{position:fixed;right:1rem;bottom:1rem;z-index:1500;width:46px;height:46px;border-radius:50%;border:1px solid var(--t-border);background:var(--t-surface);color:var(--t-text);box-shadow:var(--t-shadow);font-size:1.25rem;line-height:1;display:flex;align-items:center;justify-content:center;cursor:pointer}
.kgc-theme-fab:hover{border-color:var(--t-accent)}
body.kgc-has-wa .kgc-theme-fab{bottom:6.2rem}
@media print{.kgc-theme-fab,.kgc-theme-wrap{display:none!important}}
