:root { --surface: #fff; --chart-text: #718079; --chart-grid: #edf1ee; --chart-green: #18796a; }
.brand.brand-logo { flex-direction: column; align-items: flex-start; gap: 7px; }
.brand-logo img { display: block; width: 156px; height: auto; max-width: 100%; padding: 6px; background: #fff; border-radius: 6px; }
.brand-caption { font-size: 9px; font-weight: 600; letter-spacing: 2px; color: var(--muted); padding-left: 6px; }
.login-story .brand-caption { color: #c0d9c9; }
@media(max-width:850px) { .sidebar .brand-logo img { width: 125px; } .sidebar .brand-caption { display: none; } }
.theme-toggle { position: fixed; right: 28px; bottom: 22px; z-index: 30; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); color: var(--ink); padding: 10px 16px; box-shadow: 0 3px 15px #0002; font-size: 12px; }
.theme-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; transition: background-color .35s ease, color .35s ease, border-color .35s ease, box-shadow .2s ease; }
.theme-toggle:hover { box-shadow: 0 5px 20px #0003; }
.theme-icon { display: inline-block; font-size: 18px; line-height: 1; transition: transform .4s ease; }
html[data-theme="dark"] .theme-icon { transform: rotate(180deg); }
.signout-form { margin-top: 12px; width: 100%; }
.signout { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 44px; margin: 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--canvas); color: var(--ink); font-size: 12px; font-weight: 600; transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease; }
.signout:hover { background: #fff0ea; border-color: #e6b8a7; color: #a5442b; }
.signout:active { transform: translateY(1px); }
html[data-theme="dark"] .signout:hover { background: #4b3029; border-color: #825447; color: #ffc4ac; }
html.theme-transition, html.theme-transition *, html.theme-transition *::before, html.theme-transition *::after { transition: background-color .4s ease, color .4s ease, border-color .4s ease, box-shadow .4s ease, fill .4s ease, stroke .4s ease; }
html.theme-transition .theme-icon { transition: transform .4s ease; }
@media (prefers-reduced-motion: reduce) {
    html.theme-transition, html.theme-transition *, html.theme-transition *::before, html.theme-transition *::after, .theme-toggle, .theme-icon, .signout { transition: none; }
    .signout:active { transform: none; }
}
.agent-search-field { position: relative; }
.agent-search-hint { display: block; margin-top: 6px; font-size: 10px; color: var(--muted); font-weight: 400; }
.agent-suggestions { position: absolute; top: 62px; right: 0; width: max(100%, 280px); max-width: 85vw; max-height: 280px; overflow-y: auto; padding: 6px; margin: 0; list-style: none; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: 0 8px 24px #0002; z-index: 20; }
.agent-suggestions[hidden] { display: none; }
.agent-suggestions li { padding: 9px; font-size: 12px; cursor: pointer; font-weight: 400; border-radius: 4px; color: var(--ink); }
.agent-suggestions li:hover, .agent-suggestions li[aria-selected="true"] { background: var(--canvas); }
.search-summary { margin: 0 0 16px; font-size: 12px; color: var(--ink); }
.filters { overflow: visible; }
.import-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 220px; }
.import-actions form { margin: 0; }
.danger-button { color: #a5442b; border-color: #e6b8a7; }
.danger-button:hover { background: #fff0ea; border-color: #c67b61; }
html[data-theme="dark"] .danger-button { color: #ffc4ac; border-color: #825447; }
html[data-theme="dark"] .danger-button:hover { background: #4b3029; }
html[data-theme="dark"] { color-scheme: dark; --ink: #e2eee8; --muted: #a6b9af; --green: #7acbb2; --line: #344b40; --canvas: #14251e; --surface: #1d3027; --chart-text: #b3c7bb; --chart-grid: #354b40; --chart-green: #74cbb1; }
html[data-theme="dark"] :is(.sidebar,.panel,.kpi,.login-layout,input,select,.secondary,.access-badge) { background: var(--surface); color: var(--ink); }
html[data-theme="dark"] .topbar { background: #192b22; color: var(--muted); }
html[data-theme="dark"] :is(label,.kpi>div,.sidebar nav a,.sidebar-note,.method-note strong) { color: var(--muted); }
html[data-theme="dark"] :is(input,select,td,th,.report-picker,.file-label) { border-color: var(--line); }
html[data-theme="dark"] :is(th,.tag,.file-label,.inset-note,.metric-symbol,.avatar) { background: #253d31; color: #c1d9ca; }
html[data-theme="dark"] :is(.sidebar nav a.active,.sidebar nav a:hover,tbody tr:hover,.secondary:hover) { background: #2b493b; color: #c6eddd; }
html[data-theme="dark"] .kpi.primary { background: #245e4b; color: #f0fff7; }
html[data-theme="dark"] :is(.button,.brand-mark) { background: #287f65; color: #fff; border-color: #469e81; }
html[data-theme="dark"] .button:hover { background: #359577; }
html[data-theme="dark"] .secondary { background: #263f32; color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] :is(.sheet-badge,.upload-art,.notice) { background: #254332; color: #b9e9cd; border-color: #416c52; }
html[data-theme="dark"] :is(.notice.error,.metric-symbol.negative) { background: #4b3029; color: #ffc4ac; border-color: #825447; }
html[data-theme="dark"] .metric-symbol.positive { background: #284c3c; color: #b9e9cd; }
html[data-theme="dark"] .login-story { background: #133d30; }
@media(max-width:600px) { .theme-toggle { right: 14px; bottom: 12px; } .content { padding-bottom: 70px; } }

.password-field{position:relative;display:block;width:100%}
.login-form .password-field input{width:100%;padding-right:68px}
.password-toggle{position:absolute;right:8px;top:50%;transform:translateY(-50%);height:32px;min-width:48px;padding:0 8px;border:0;border-radius:6px;background:transparent;color:var(--ink);font-size:12px;font-weight:600}
.password-toggle:hover{background:var(--canvas)}

/* Account management cards */
.user-directory { margin-top: 28px; }
.user-directory .section-heading p { margin: 7px 0 0; }
.user-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.user-card { margin: 0; overflow: hidden; }
.user-card-header { display: flex; align-items: flex-start; gap: 12px; padding: 22px; border-bottom: 1px solid var(--line); }
.user-card-header .avatar { flex-shrink: 0; margin: 0; width: 42px; height: 42px; }
.user-card-identity { min-width: 0; flex: 1; }
.user-card-identity h3 { margin: 0 0 5px; font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
.user-card-identity p { margin: 0 0 8px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.user-status { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 20px; font-size: 10px; font-weight: 600; white-space: nowrap; background: var(--canvas); color: var(--muted); }
.user-status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.user-status-active { color: var(--green); }
.user-card-body { display: grid; gap: 12px; padding: 18px; }
.user-action-box { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.user-action-box summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; cursor: pointer; list-style: none; font-size: 13px; font-weight: 600; }
.user-action-box summary::-webkit-details-marker { display: none; }
.user-action-box summary:hover { background: var(--canvas); }
.user-action-box summary:focus-visible { outline: 2px solid var(--green); outline-offset: -3px; }
.user-action-box summary small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); margin-top: 5px; }
.disclosure-icon { font-size: 18px; color: var(--muted); }
.user-action-box[open] .disclosure-icon { transform: rotate(45deg); }
.user-action-box[open] summary { border-bottom: 1px solid var(--line); }
.user-password-form { display: grid; gap: 14px; padding: 16px; }
.user-password-form input { width: 100%; margin-top: 7px; }
.user-password-form p { margin: 0; line-height: 1.6; }
.user-password-form .button { justify-self: start; }
.user-access-box { padding: 16px; background: var(--canvas); }
.user-access-box h4 { font-size: 13px; margin: 0 0 6px; }
.user-access-box p { font-size: 11px; color: var(--muted); line-height: 1.6; margin: 0; }
.user-access-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.user-access-buttons form { margin: 0; }
.user-card .button { min-height: 38px; }
.user-delete-box { border-color: #e6b8a7; }
.user-delete-box summary { color: #a5442b; }
.user-delete-confirm { padding: 16px; }
.user-delete-confirm p { margin: 0 0 14px; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.user-delete-box .danger-button { background: #fff0ea; color: #a5442b; border-color: #e6b8a7; }
.user-self-note { font-size: 11px; line-height: 1.7; color: var(--muted); padding: 4px 6px; }
html[data-theme="dark"] .user-delete-box { border-color: #825447; }
html[data-theme="dark"] .user-delete-box summary { color: #ffc4ac; }
html[data-theme="dark"] .user-delete-box .danger-button { background: #4b3029; color: #ffc4ac; border-color: #825447; }
@media (max-width: 1150px) { .user-card-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .user-card-header { padding: 16px; gap: 9px; flex-wrap: wrap; } .user-card-body { padding: 12px; } .user-card-identity { flex-basis: calc(100% - 55px); } .user-status { margin-left: 51px; } .user-access-buttons { flex-direction: column; } .user-access-buttons .button { width: 100%; } }

.user-directory-filters { display: flex; align-items: flex-end; gap: 14px; padding: 18px; margin-bottom: 18px; flex-wrap: wrap; }
.user-directory-filters label:first-child { flex: 1; min-width: 180px; }
.user-directory-filters label { min-width: 150px; }
.user-directory-filters input, .user-directory-filters select { width: 100%; margin-top: 7px; }
.user-directory-filters .text-link { padding: 12px 0; }
.user-directory-pagination { margin-top: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
@media (max-width: 600px) { .user-directory-filters label { flex-basis: 100%; } .user-directory-pagination { gap: 12px; flex-wrap: wrap; } }
