/* KKA Portal theme overrides. */
:root{--accent:var(--forest);--bg:var(--paper);--surface:var(--white);--surface-2:var(--soft);--text:var(--ink);--text-muted:var(--muted);--border:var(--line);--input-bg:var(--white);--input-border:#cbd6cf;--focus:#b9d2c3}
html[data-theme="light"]{color-scheme:light}html[data-theme="dark"]{color-scheme:dark;--ink:#edf4ef;--forest:#63a995;--forest-2:#78b9a7;--paper:#0d1411;--line:#2d3a34;--muted:#a9b8b0;--white:#151e1a;--soft:#1b2722;--warning:#e7b866;--success:#6fd29a;--accent:#78b9a7;--input-bg:#111915;--input-border:#3a4942;--focus:#77b7a4}
html[data-theme="dark"] body{background:var(--paper);color:var(--ink)}html[data-theme="dark"] .portal-main h1,html[data-theme="dark"] .portal-main h2,html[data-theme="dark"] .stats strong{color:var(--ink)}html[data-theme="dark"] .stats p,html[data-theme="dark"] .eyebrow{color:var(--muted)}
html[data-theme="dark"] .sidebar{background:#102a22}html[data-theme="dark"] .sidebar a{color:#bfd3ca}html[data-theme="dark"] .sidebar a.active,html[data-theme="dark"] .sidebar a:hover{background:#234d40;color:#fff}html[data-theme="dark"] .desktop-note{background:#1b4136;border-color:#365d50}html[data-theme="dark"] .desktop-note span{color:#bfd7cc}
html[data-theme="dark"] .stats article,html[data-theme="dark"] .panel{background:var(--white);border-color:var(--line);box-shadow:0 10px 30px rgba(0,0,0,.25)}html[data-theme="dark"] .user,html[data-theme="dark"] .secondary,html[data-theme="dark"] .row button{background:#19231f;color:var(--ink);border-color:var(--line)}html[data-theme="dark"] .user:hover,html[data-theme="dark"] .secondary:hover,html[data-theme="dark"] .row button:hover{background:#22302a;border-color:#42544b}html[data-theme="dark"] .primary{background:#367763;color:#fff}html[data-theme="dark"] .primary:hover{background:#438b75}
html[data-theme="dark"] .row,html[data-theme="dark"] td,html[data-theme="dark"] th{border-color:var(--line)}html[data-theme="dark"] .row p,html[data-theme="dark"] td small{color:var(--muted)}html[data-theme="dark"] .file-icon{color:#f0bd91;background:#4a3021}html[data-theme="dark"] .success{color:#92e5b3;background:#183c2b}html[data-theme="dark"] .neutral{color:#c4d0ca;background:#29352f}
html[data-theme="dark"] .form-grid input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{background:var(--input-bg)!important;color:var(--ink)!important;border-color:var(--input-border)!important}html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#82948b}html[data-theme="dark"] .form-grid input:focus,html[data-theme="dark"] select:focus,html[data-theme="dark"] textarea:focus{outline-color:var(--focus);border-color:var(--accent)!important}
html[data-theme="dark"] .modal-backdrop{background:rgba(0,0,0,.72)}html[data-theme="dark"] .modal{background:#151e1a;border-color:var(--line);box-shadow:0 24px 70px rgba(0,0,0,.5)}html[data-theme="dark"] .modal-close{color:var(--muted)}html[data-theme="dark"] .profile-dropdown{background:#151e1a;border-color:var(--line);box-shadow:0 18px 45px rgba(0,0,0,.45)}html[data-theme="dark"] .profile-dropdown button{color:var(--ink)}html[data-theme="dark"] .profile-dropdown button:hover{background:var(--soft);color:#d9eee3}html[data-theme="dark"] .profile-divider{background:var(--line)}
html[data-theme="dark"] .profile-card,html[data-theme="dark"] .profile-details div,html[data-theme="dark"] .manage-status{background:var(--soft);border-color:var(--line)}html[data-theme="dark"] .manage-section{border-color:var(--line)}html[data-theme="dark"] .danger,html[data-theme="dark"] .danger-warning{background:#321d1a;border-color:#75483f;color:#f2b0a5}html[data-theme="dark"] .danger:hover{background:#42231f}html[data-theme="dark"] .danger-warning p{color:#e7b8af}
html[data-theme="dark"] .manual-grid,html[data-theme="dark"] .manual-summary,html[data-theme="dark"] .uploader-summary,html[data-theme="dark"] .documents-ui-note{background:var(--soft);border-color:var(--line)}html[data-theme="dark"] .manual-grid select,html[data-theme="dark"] .upload-destination select{background:var(--input-bg);color:var(--ink);border-color:var(--input-border)}html[data-theme="dark"] .manual-file,html[data-theme="dark"] .upload-item{background:var(--white);border-color:var(--line);box-shadow:0 4px 14px rgba(0,0,0,.16)}
html[data-theme="dark"] .drop-zone{background:linear-gradient(180deg,#18251f,#121a16);border-color:#43564d}html[data-theme="dark"] .drop-zone:hover,html[data-theme="dark"] .drop-zone.dragover{background:#1d3028;border-color:#6baf9b}html[data-theme="dark"] .drop-icon,html[data-theme="dark"] .upload-file-icon{background:#1c2923;border-color:var(--line);color:#86c3b0;box-shadow:none}html[data-theme="dark"] .documents-ui-badge{color:#9bd2bf;background:#19352d;border-color:#315247}
html[data-theme="dark"] .manual-client-search-input,html[data-theme="dark"] .client-search-bar input{background:var(--input-bg);color:var(--ink);border-color:var(--input-border)}html[data-theme="dark"] .manual-client-results{background:#151e1a;border-color:var(--line);box-shadow:0 16px 36px rgba(0,0,0,.48)}html[data-theme="dark"] .manual-client-result{color:var(--ink)}html[data-theme="dark"] .manual-client-result:hover{background:var(--soft)}html[data-theme="dark"] .manual-client-selected{background:var(--soft);border-color:var(--line)}
html[data-theme="dark"] .review-card{background:var(--white);border-color:var(--line);box-shadow:0 7px 22px rgba(0,0,0,.18)}html[data-theme="dark"] .review-meta>div,html[data-theme="dark"] .review-empty{background:var(--soft);border-color:var(--line)}html[data-theme="dark"] .review-form select,html[data-theme="dark"] .review-form input{background:var(--input-bg);color:var(--ink);border-color:var(--input-border)}
html[data-theme="dark"] .audit-panel{background:var(--white);border-color:var(--line)}html[data-theme="dark"] .audit-filters input,html[data-theme="dark"] .audit-filters select{background:var(--soft);color:var(--ink);border-color:var(--line)}html[data-theme="dark"] .audit-table tbody tr:hover{background:var(--soft)}html[data-theme="dark"] .audit-entity{background:var(--soft);border-color:var(--line)}html[data-theme="dark"] .audit-table td,html[data-theme="dark"] .audit-table th{color:var(--ink);border-color:var(--line)}html[data-theme="dark"] .audit-table time,html[data-theme="dark"] .audit-table td small{color:var(--muted)}
html[data-theme="dark"] .message,html[data-theme="dark"] .form-message{color:#e7b866}html[data-theme="dark"] a{color:#83c0ad}html[data-theme="dark"] option{background:#151e1a;color:#edf4ef}html[data-theme="dark"] input[type="checkbox"],html[data-theme="dark"] input[type="radio"]{accent-color:#63a995}html[data-theme="dark"] ::selection{background:#2f6655;color:#fff}
html[data-theme="dark"] .login-shell{background:radial-gradient(circle at 50% 0%,#18372e 0%,#0d1411 52%,#09100d 100%)}html[data-theme="dark"] .login-card{background:#151e1a;border-color:#2d3d35;box-shadow:0 24px 70px rgba(0,0,0,.48)}html[data-theme="dark"] .login-brand{color:#82c4b1}html[data-theme="dark"] .login-brand small{color:#9db7ad}html[data-theme="dark"] .login-card h1{color:#edf4ef}html[data-theme="dark"] .login-card input{background:#111915;color:#edf4ef;border-color:#3a4942}html[data-theme="dark"] .password-toggle{color:#9cafa7}html[data-theme="dark"] .password-toggle:hover,html[data-theme="dark"] .password-toggle[aria-pressed="true"]{background:#20342c;color:#8bc9b5}html[data-theme="dark"] .login-card .secondary{background:#19231f;color:#dbe8e1;border-color:#3a4942}
#theme-toggle{position:fixed;right:18px;bottom:18px;z-index:1000;border:1px solid var(--line);background:var(--white);color:var(--ink);border-radius:999px;padding:9px 13px;font:700 12px Inter,ui-sans-serif,system-ui,sans-serif;cursor:pointer;box-shadow:0 6px 20px rgba(0,0,0,.12)}#theme-toggle:hover{background:var(--soft)}@media(max-width:700px){#theme-toggle{right:12px;bottom:12px}}
