:root {
    --app-text: #565b5e;
    --app-accent: #228bdf;
    --app-hover: #f0f5fa;
    --app-border: #e3e9ef;
    --app-muted: #64748b;
}
html[data-theme="dark"] {
    --app-text: #c8d1dc;
    --app-accent: #52c8ec;
    --app-hover: #242c3e;
    --app-border: #465166;
    --app-muted: #b1bfce;
}
body { font-family: Arial, sans-serif; }
.toolbar { display: flex; align-items: center; justify-content: flex-end; min-height: 70px; padding: 0 24px; gap: 24px; }
.header-context { display: flex; align-items: center; gap: 28px; min-width: 0; margin-right: auto; color: #fff; }
.context-item { display: flex; flex-direction: column; min-width: 0; }
.context-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; opacity: .85; }
.context-item strong { font-size: 13px; font-weight: 500; max-width: 260px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.theme-picker, .logout-form { display: flex; align-items: center; margin: 0; flex-shrink: 0; }
.theme-switch { display: inline-flex; position: relative; margin: 0; cursor: pointer; padding: 5px 0; }
.theme-checkbox { position: absolute; width: 1px; height: 1px; opacity: 0; }
.theme-track { position: relative; display: flex; align-items: center; justify-content: space-between; width: 64px; height: 32px; padding: 0 8px; border-radius: 20px; background: #202a3b; color: #e7eef7; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.theme-track > i { font-size: 17px; z-index: 1; }
.theme-track > i:first-child { color: #78521a; }
.theme-thumb { position: absolute; width: 26px; height: 26px; border-radius: 50%; background: #fff3d7; left: 3px; top: 3px; transition: transform .18s ease; }
.theme-checkbox:checked + .theme-track .theme-thumb { transform: translateX(32px); background: #d9ebff; }
.theme-checkbox:checked + .theme-track > i:first-child { color: #e7eef7; }
.theme-checkbox:checked + .theme-track > i:nth-child(2) { color: #243e67; }
.theme-checkbox:focus-visible + .theme-track { outline: 3px solid var(--app-accent); outline-offset: 3px; }
.logout-button { border: 1px solid rgba(255,255,255,.35); border-radius: 6px; background: transparent; color: #fff; padding: 7px 12px; display: flex; gap: 6px; align-items: center; }
.logout-button:hover { background: rgba(255,255,255,.12); }
.logout-button i { font-size: 19px; }
.toolbar .button-menu-mobile { display: none; margin-right: auto; }
body.fixed-left .side-menu.left { height: calc(100dvh - 70px); bottom: 0; margin-bottom: 0; padding-bottom: 24px; overflow-y: auto; overscroll-behavior: contain; }
#sidebar-menu .menu-title { padding-top: 22px; }
.navigation-group summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 22px 12px 28px; color: var(--app-text); border-left: 2px solid transparent; cursor: pointer; }
.navigation-group summary::-webkit-details-marker { display: none; }
.navigation-group summary > i { font-size: 18px; width: 20px; flex-shrink: 0; }
.navigation-group summary .group-arrow { margin-left: auto; font-size: 18px; width: auto; }
.navigation-group[open] .group-arrow { transform: rotate(90deg); }
.navigation-group summary:hover, .navigation-group summary.active { background: var(--app-hover); border-left-color: var(--app-accent); color: var(--app-accent); }
#sidebar-menu .navigation-group[open] > ul { display: block; padding-bottom: 8px; }
#sidebar-menu .navigation-group > ul > li > a { padding: 9px 18px 9px 62px; line-height: 1.45; color: var(--app-text); white-space: normal; }
#sidebar-menu .navigation-group > ul > li > a:hover,
#sidebar-menu .navigation-group > ul > li > a.active { color: var(--app-accent); background: var(--app-hover); }
.content-page > .content { min-height: calc(100vh - 150px); }
.content-page .footer { position: static; }
.page-title { margin-bottom: 24px; }
.section-caption { margin: 0 0 4px; }
.feature-card { min-height: 180px; }
.feature-card i { font-size: 28px; }
.skip-link { position: fixed; top: -100px; left: 15px; z-index: 2000; background: #fff; color: #222; padding: 12px; }
.skip-link:focus { top: 5px; }
a:focus-visible, button:focus-visible, select:focus-visible, summary:focus-visible, input:focus-visible { outline: 3px solid var(--app-accent) !important; outline-offset: 3px; }
.login-page { min-height: 100vh; }
.login-appearance { position: absolute; top: 22px; right: 26px; }
.wrapper-page { width: min(440px, calc(100% - 32px)); margin: 0 auto; padding-top: clamp(80px, 12vh, 130px); padding-bottom: 28px; }
.login-brand { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 28px; font-weight: 700; color: var(--app-accent); margin-bottom: 26px; }
.login-brand i { font-size: 34px; }
.login-card { padding: 32px; border-radius: 10px; }
.login-card h1 { font-size: 24px; line-height: 1.3; margin: 0 0 12px; }
.login-intro { color: var(--app-muted); margin-bottom: 26px; }
.login-card label { font-weight: 500; color: var(--app-text); }
.login-input { position: relative; }
.login-input > i { position: absolute; left: 13px; top: 11px; font-size: 21px; color: var(--app-muted); }
.login-input > input { height: 44px; padding-left: 42px; border-radius: 5px; }
.login-submit { margin-top: 26px; padding: 11px 16px; border-radius: 5px; }
.login-submit > i { margin-left: 8px; }
.demo-notice { margin: 24px 0 0; padding-top: 18px; border-top: 1px solid var(--app-border); color: var(--app-muted); font-size: 12px; line-height: 1.6; }
.login-footer { text-align: center; color: var(--app-muted); font-size: 12px; }
@media (min-width: 768px) and (max-width: 1050px) {
    .toolbar { gap: 14px; padding: 0 14px; }
    .header-context { gap: 14px; }
    .context-item strong { max-width: 140px; }
}
@media (max-width: 767px) {
    .topbar .topbar-left { width: 60px !important; }
    .logo span { display: none; }
    .toolbar { padding: 0 10px; gap: 12px; min-height: 112px; flex-wrap: wrap; justify-content: flex-end; align-content: center; }
    .toolbar .button-menu-mobile { display: block; width: 32px; height: 42px; line-height: 42px; margin: 0 auto 0 0; order: 0; }
    .header-context { order: 3; flex-basis: 100%; gap: 16px; margin: 0; padding: 0 0 8px; }
    .context-item { flex: 1; }
    .context-item strong { max-width: 100%; font-size: 12px; }
    .context-label { font-size: 9px; }
    .logout-button { padding: 5px 8px; }
    .logout-button span { font-size: 12px; }
    body.fixed-left .side-menu.left { top: 112px; height: calc(100dvh - 112px); }
    .left.side-menu { display: none; }
    .menu-open .left.side-menu { display: block; width: min(290px, calc(100vw - 32px)); }
    .content-page > .content { margin-top: 112px; padding: 20px 10px; }
    .login-card { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
    .theme-thumb { transition: none; }
}
