:root {
    --bg: #0b1220;
    --surface: #111a2e;
    --text: #e5edf7;
    --muted: #9fb0c8;
    --primary: #03a9f4;
    --primary-color: #03a9f4;
    --primary-hover: #29b6f6;
    --primary-soft: rgba(3, 169, 244, 0.12);
    --primary-border: rgba(3, 169, 244, 0.45);
    --border: #22314a;
    --border-color: #22314a;
    --primary-gradient: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 55%, #0284c7 100%);
    --footer-height: 58px;
}

body.theme-light,
html.theme-light-preload {
    --bg: #f3f8fd;
    --surface: #ffffff;
    --text: #152235;
    --muted: #5f738d;
    --primary-soft: rgba(3, 169, 244, 0.1);
    --primary-border: rgba(3, 169, 244, 0.28);
    --border: #d4e5f4;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: min(1100px, 92%);
    margin: 0 auto;
}

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 0;
    margin-top: auto;
    min-height: var(--footer-height);
    padding: 1rem 0 1.15rem;
}

main.container {
    flex: 1;
    width: 100%;
    max-width: 100%;
    margin: 0;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.brand {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
}

nav a {
    color: var(--text);
    text-decoration: none;
}

.login-center-wrap {
    min-height: calc(100vh - 170px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 0;
}

.login-card {
    position: relative;
    overflow: visible;
    width: min(100%, 460px);
    background: linear-gradient(160deg, rgba(17, 26, 46, 0.94), rgba(11, 22, 40, 0.9));
    border: 0;
    box-shadow: 0 18px 42px rgba(1, 10, 20, 0.5);
    backdrop-filter: blur(6px);
}

.login-card::before {
    content: "";
    position: absolute;
    left: 0.8rem;
    top: 1rem;
    bottom: 1rem;
    width: 2px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(3, 169, 244, 0.78), rgba(3, 169, 244, 0.08));
}


.login-logo-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 0.8rem;
}

.login-center-wrap-with-outside-logo {
    flex-direction: column;
    justify-content: center;
    gap: 0.7rem;
}

.login-logo-wrap-outside {
    margin-bottom: 0;
}

.login-logo {
    width: 76px;
    height: 76px;
    object-fit: contain;
    filter: invert(61%) sepia(89%) saturate(1887%) hue-rotate(165deg) brightness(101%) contrast(97%);
    opacity: 0.95;
}

.login-title {
    color: var(--text);
}

.login-subtitle {
    color: var(--muted);
}

.setup-card {
    position: relative;
}

.setup-subtitle {
    margin-top: 0.38rem;
    margin-bottom: 0.9rem;
}

.setup-card .auth-input {
    background: #0d1729;
    border-color: #30435f;
    color: #e6f0fb;
}

.setup-card .auth-input::placeholder {
    color: #7f98b6;
}

.setup-card .auth-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(3, 169, 244, 0.2);
}

.setup-card .auth-input:-webkit-autofill,
.setup-card .auth-input:-webkit-autofill:hover,
.setup-card .auth-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #e6f0fb;
    box-shadow: 0 0 0 1000px #0d1729 inset;
    -webkit-box-shadow: 0 0 0 1000px #0d1729 inset;
    transition: background-color 9999s ease-in-out 0s;
}

.setup-step-badge {
    position: absolute;
    right: 0.9rem;
    top: 0.9rem;
    padding: 0.2rem 0.58rem;
    border-radius: 999px;
    background: rgb(9 79 111 / 22%);
    color: #dff5ff;
    border: 0;
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.auth-label {
    color: #c7d5e8;
}

.auth-input {
    width: 100%;
    border-radius: 0.75rem;
    border: 1px solid #30435f;
    background: #0d1729;
    color: #e6f0fb;
    padding: 0.55rem 0.75rem 0.55rem 2.3rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input::placeholder {
    color: #7f98b6;
}

.auth-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(3, 169, 244, 0.2);
}

body:not(.theme-light) .auth-input:-webkit-autofill,
body:not(.theme-light) .auth-input:-webkit-autofill:hover,
body:not(.theme-light) .auth-input:-webkit-autofill:focus,
body:not(.theme-light) .custom-select-trigger:-webkit-autofill,
body:not(.theme-light) .custom-select-trigger:-webkit-autofill:hover,
body:not(.theme-light) .custom-select-trigger:-webkit-autofill:focus {
    -webkit-text-fill-color: #e6f0fb;
    transition: background-color 9999s ease-out 0s;
    box-shadow: inset 0 0 0 1000px #0d1729;
}

.auth-input-with-toggle {
    padding-right: 2.45rem;
}

.auth-input-plain {
    padding-left: 0.75rem;
}

.auth-select {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #7fa2c6 50%),
        linear-gradient(135deg, #7fa2c6 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 2px),
        calc(100% - 12px) calc(50% - 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 2rem;
    font-weight: 500;
    line-height: 1.35;
}

.auth-select:invalid {
    color: #8aa2be;
}

.setup-mode-logo-wrap {
    display: flex;
    justify-content: center;
}

.setup-mode-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
    filter: invert(61%) sepia(89%) saturate(1887%) hue-rotate(165deg) brightness(101%) contrast(97%);
    opacity: 0.95;
}

.setup-mode-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.setup-mode-card {
    display: block;
    cursor: pointer;
    position: relative;
}

.setup-mode-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.setup-mode-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    min-height: 150px;
    padding: 0.9rem 0.7rem;
    border-radius: 0.95rem;
    background: color-mix(in srgb, var(--surface) 72%, #0b1528 28%);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.setup-mode-check-badge {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--primary) 18%, #ffffff 12%);
    color: #ffffff;
    font-size: 0.67rem;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.setup-mode-title {
    color: var(--text);
    font-size: 0.86rem;
    font-weight: 600;
    text-align: center;
}

.setup-mode-desc {
    color: var(--muted);
    font-size: 0.73rem;
    text-align: center;
    line-height: 1.4;
}

.setup-mode-icon-badge {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--surface) 86%, #ffffff 14%);
    color: #ffffff;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--border) 72%, #ffffff 28%);
    transition: box-shadow 0.25s ease, transform 0.2s ease, background 0.2s ease;
}

.setup-mode-card:hover .setup-mode-icon-badge {
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 38%, transparent), 0 0 12px rgba(3, 169, 244, 0.2);
    transform: translateY(-1px);
}

.setup-mode-input:checked + .setup-mode-content {
    background: color-mix(in srgb, var(--surface) 84%, var(--primary) 16%);
    box-shadow: 0 8px 20px rgba(3, 169, 244, 0.16);
}

.setup-mode-input:checked + .setup-mode-content .setup-mode-icon-badge {
    background: color-mix(in srgb, var(--primary) 22%, var(--surface));
    color: #ffffff;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 45%, transparent), 0 0 12px rgba(3, 169, 244, 0.22);
}

.setup-mode-input:checked + .setup-mode-content .setup-mode-check-badge {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 42%, transparent), 0 0 10px rgba(3, 169, 244, 0.2);
}

.users-add-card .setup-mode-grid {
    margin-bottom: 0.35rem;
}

.users-add-step {
    display: none;
    gap: 0.7rem;
}

.users-add-step.is-active {
    display: grid;
}

.users-add-card .setup-mode-content {
    border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--border));
    background: color-mix(in srgb, #0f1f35 72%, var(--surface) 28%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.users-add-card .setup-mode-card:hover .setup-mode-content {
    border-color: color-mix(in srgb, var(--primary) 36%, var(--border));
    box-shadow: 0 8px 18px rgba(3, 169, 244, 0.14);
}

.users-add-card .setup-mode-input:checked + .setup-mode-content {
    border-color: color-mix(in srgb, var(--primary) 48%, transparent);
    background: color-mix(in srgb, var(--surface) 80%, var(--primary) 20%);
    box-shadow: 0 10px 24px rgba(3, 169, 244, 0.2);
}

.users-add-card .setup-mode-icon-badge i,
.users-add-card .setup-mode-check-badge i {
    color: #ffffff;
}

body.theme-light .users-add-card .setup-mode-content {
    background: color-mix(in srgb, #ffffff 88%, #eaf5fb 12%);
    border-color: color-mix(in srgb, var(--primary) 24%, #d7e5ef);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

body.theme-light .users-add-card .setup-mode-card:hover .setup-mode-content {
    border-color: color-mix(in srgb, var(--primary) 42%, #c9dce9);
    box-shadow: 0 10px 22px rgba(3, 169, 244, 0.12);
}

body.theme-light .users-add-card .setup-mode-input:checked + .setup-mode-content {
    background: color-mix(in srgb, #ffffff 82%, var(--primary) 18%);
    border-color: color-mix(in srgb, var(--primary) 56%, #b8d7e9);
    box-shadow: 0 12px 24px rgba(3, 169, 244, 0.18);
}

body.theme-light .users-add-card .setup-mode-title {
    color: #334155;
}

body.theme-light .users-add-card .setup-mode-desc {
    color: #64748b;
}

body.theme-light .users-add-card .setup-mode-icon-badge {
    background: color-mix(in srgb, #ffffff 86%, #dff2fb 14%);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 30%, #d2e4ef);
}

body.theme-light .users-add-card .setup-mode-icon-badge i {
    color: var(--primary);
}

body.theme-light .users-add-card .setup-mode-check-badge {
    background: color-mix(in srgb, var(--primary) 76%, #ffffff 24%);
}

@media (max-width: 680px) {
    .users-add-card .setup-mode-grid {
        grid-template-columns: 1fr;
    }
}

.input-with-icon {
    position: relative;
}

body:not(.theme-light) .users-add-card .auth-input,
body:not(.theme-light) .users-add-card .custom-select-trigger,
body:not(.theme-light) .apartments-add-card .auth-input,
body:not(.theme-light) .apartments-add-card .custom-select-trigger,
body:not(.theme-light) .sites-add-card .auth-input,
body:not(.theme-light) .sites-add-card .custom-select-trigger,
body:not(.theme-light) .apartment-edit-modal__grid .auth-input,
body:not(.theme-light) .apartment-edit-modal__grid .custom-select-trigger {
    background: #0d1729;
    color: #e6f0fb;
    border-color: #30435f;
}

body:not(.theme-light) .users-add-card .auth-input::placeholder,
body:not(.theme-light) .apartments-add-card .auth-input::placeholder,
body:not(.theme-light) .sites-add-card .auth-input::placeholder,
body:not(.theme-light) .apartment-edit-modal__grid .auth-input::placeholder {
    color: #7f98b6;
}

.input-icon {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    opacity: 0.82;
    font-size: 0.9rem;
    pointer-events: none;
}

.custom-select-wrap {
    position: relative;
}

.custom-select-native {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.custom-select-trigger {
    width: 100%;
    min-height: 38px;
    border-radius: 0.75rem;
    border: 1px solid #30435f;
    background: #0d1729;
    color: #e6f0fb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.55rem 0.8rem 0.55rem 2.3rem;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.custom-select-label.is-placeholder {
    color: #8aa2be;
}

.custom-select-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.custom-select-label-icon {
    color: var(--primary);
    font-size: 0.74rem;
    opacity: 0.9;
}

.custom-select-caret {
    font-size: 0.7rem;
    color: #9fc5e5;
    transition: transform 0.2s ease;
}

.custom-select-wrap.is-open .custom-select-trigger {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(3, 169, 244, 0.2);
}

.custom-select-wrap.is-open .custom-select-caret {
    transform: rotate(180deg);
}

.custom-select-menu {
    position: absolute;
    top: calc(100% + 0.45rem);
    left: 0;
    right: 0;
    border-radius: 0.85rem;
    border: 1px solid rgba(3, 169, 244, 0.24);
    background: #0d1729;
    box-shadow: 0 14px 30px rgba(1, 10, 20, 0.46);
    z-index: 80;
    max-height: 240px;
    overflow-y: auto;
    display: none;
}

.custom-select-wrap.is-open .custom-select-menu {
    display: block;
}

.custom-select-option {
    width: 100%;
    border: 0;
    background: transparent;
    color: #e6f0fb;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.8rem;
    font-size: 0.82rem;
    cursor: pointer;
}

.custom-select-option-icon {
    color: var(--primary);
    opacity: 0.88;
    font-size: 0.72rem;
}

.custom-select-option-text {
    flex: 1;
    min-width: 0;
}

.custom-select-option.has-divider {
    border-top: 1px solid rgba(159, 197, 229, 0.16);
}

.custom-select-option:hover {
    background: rgba(3, 169, 244, 0.12);
}

.custom-select-option.is-selected {
    background: rgba(3, 169, 244, 0.16);
}

.custom-select-option.is-disabled {
    color: #8aa2be;
    cursor: default;
    background: transparent;
}

body.theme-light .custom-select-trigger {
    border-color: #c9deef;
    background: #ffffff;
    color: #152235;
}

body.theme-light .custom-select-label.is-placeholder {
    color: #7b8ea4;
}

body.theme-light .custom-select-caret {
    color: #6d86a2;
}

body.theme-light .custom-select-wrap.is-open .custom-select-trigger {
    box-shadow: 0 0 0 3px rgba(3, 169, 244, 0.16);
}

body.theme-light .custom-select-menu {
    border-color: rgba(3, 169, 244, 0.2);
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(15, 34, 60, 0.18);
}

body.theme-light .custom-select-option {
    color: #152235;
}

body.theme-light .custom-select-option.has-divider {
    border-top-color: rgba(3, 169, 244, 0.12);
}

body.theme-light .custom-select-option:hover {
    background: rgba(3, 169, 244, 0.08);
}

body.theme-light .custom-select-option.is-selected {
    background: rgba(3, 169, 244, 0.12);
}

.email-suggest {
    position: absolute;
    top: calc(100% + 0.45rem);
    left: 0;
    right: 0;
    z-index: 100;
    border: 1px solid var(--primary-border);
    border-radius: 0.75rem;
    background: #0f1a2e;
    box-shadow: 0 10px 24px rgba(1, 10, 20, 0.38);
    overflow: hidden;
}

.email-suggest.hidden {
    display: none;
}

.email-suggest-item {
    width: 100%;
    border: 0;
    border-bottom: 1px solid rgba(3, 169, 244, 0.12);
    background: transparent;
    color: #cfe4fa;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.83rem;
    padding: 0.55rem 0.75rem;
    cursor: pointer;
}

.email-suggest-icon {
    color: var(--primary);
    font-size: 0.72rem;
    opacity: 0.9;
}

.email-suggest-item:last-child {
    border-bottom: 0;
}

.email-suggest-item:hover {
    background: var(--primary-soft);
    color: #e8f6ff;
}

body.theme-light .email-suggest {
    border-color: rgba(3, 169, 244, 0.2);
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(15, 34, 60, 0.16);
}

body.theme-light .email-suggest-item {
    border-bottom-color: rgba(3, 169, 244, 0.12);
    color: #1f3347;
}

body.theme-light .email-suggest-item:hover {
    background: rgba(3, 169, 244, 0.1);
    color: #0f2234;
}

body.theme-light .email-suggest-icon {
    color: var(--primary);
    opacity: 0.95;
}

.password-toggle-btn {
    position: absolute;
    right: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--primary);
    opacity: 0.9;
    cursor: pointer;
    padding: 0;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.password-toggle-btn .hidden {
    display: none;
}

.setup-password-meter,
.setup-password-match {
    width: 100%;
    height: 4px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--border) 80%, transparent);
    overflow: hidden;
}

.setup-password-meter__bar,
.setup-password-match__bar {
    display: block;
    height: 100%;
    width: 0;
    transition: width 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.setup-password-note {
    margin: 0;
    font-size: 0.74rem;
    color: var(--muted);
}

.setup-password-meter.is-inactive {
    display: none;
}

.setup-password-match.is-inactive {
    display: none;
}

.setup-password-meter.is-weak .setup-password-meter__bar {
    width: 33%;
    background: #ef4444;
}

.setup-password-meter.is-medium .setup-password-meter__bar {
    width: 66%;
    background: #f59e0b;
}

.setup-password-meter.is-strong .setup-password-meter__bar {
    width: 100%;
    background: #22c55e;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.45);
}

.setup-password-match.is-match .setup-password-match__bar {
    width: 100%;
    background: #22c55e;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.45);
}

.setup-password-match.is-no-match .setup-password-match__bar {
    width: 100%;
    background: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.35);
}

.setup-password-note.is-success {
    color: #86efac;
}

.setup-password-note.is-error {
    color: #fca5a5;
}

.dashboard-shell {
    min-height: calc(100vh - var(--footer-height));
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 0;
    margin-top: 0;
    transition: grid-template-columns 0.42s ease;
}

.dashboard-fullbleed {
    width: 100%;
    max-width: 100%;
    min-height: calc(100vh - var(--footer-height));
    margin-left: 0;
    margin-right: 0;
    overflow-x: clip;
}

.dashboard-sidebar {
    width: 250px;
    min-height: calc(100vh - var(--footer-height));
    background: linear-gradient(180deg, rgba(14, 24, 42, 0.96), rgba(10, 19, 36, 0.94));
    border-radius: 0;
    border: 0;
    border-left: 0;
    border-top: 0;
    border-bottom: 0;
    padding: 1.05rem 0.92rem;
    box-shadow: inset -1px 0 0 rgba(159, 197, 229, 0.08), 0 12px 30px rgba(1, 10, 20, 0.32);
    transition: width 0.42s ease, padding 0.42s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.62rem;
    color: #d9f3ff;
    font-weight: 600;
    margin-bottom: 1.08rem;
    padding: 0.42rem 0.5rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.sidebar-brand i {
    color: var(--primary);
}

.sidebar-brand-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: invert(61%) sepia(89%) saturate(1887%) hue-rotate(165deg) brightness(101%) contrast(97%);
}

.sidebar-brand-text {
    color: #dbe9f8;
    white-space: nowrap;
    font-size: 0.92rem;
    letter-spacing: 0.01em;
    transition: opacity 0.28s ease;
}

.sidebar-nav {
    display: grid;
    gap: 0.26rem;
}

.sidebar-divider {
    height: 1px;
    background: linear-gradient(90deg, rgba(3, 169, 244, 0.02), rgba(3, 169, 244, 0.2), rgba(3, 169, 244, 0.02));
    margin: 0.5rem 0 0.6rem;
}

.sidebar-section-title {
    margin: 0.24rem 0 0.18rem;
    padding: 0 0.4rem;
    font-size: 0.63rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #7f96b1;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.58rem;
    min-height: 2.15rem;
    padding: 0.5rem 0.5rem;
    border-radius: 0.72rem;
    color: #b7cbe2;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-label {
    white-space: nowrap;
    transition: opacity 0.28s ease;
}

.sidebar-nav a i {
    color: var(--primary);
    width: 1.25rem;
    min-width: 1.25rem;
    height: 1.25rem;
    border-radius: 0.42rem;
    background: rgba(3, 169, 244, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    text-align: center;
}

.sidebar-nav a:hover,
.sidebar-nav a.is-active {
    background: rgba(3, 169, 244, 0.16);
    color: #eaf6ff;
    transform: translateX(1px);
}

.sidebar-nav a.is-active {
    position: relative;
    box-shadow: none;
}

.dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.dashboard-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    background: rgba(17, 26, 46, 0.9);
    border: 0;
    border-radius: 0;
    padding: 0.82rem 1.75rem 0.82rem 1.15rem;
    box-shadow: none;
    border-top: 0;
    border-right: 0;
}

.topbar-spacer {
    flex: 1;
    min-width: 0;
}

.dashboard-topnav {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.dashboard-topnav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    height: 36px;
    padding: 0 0.72rem;
    border: 1px solid transparent;
    border-radius: 0.72rem;
    background: transparent;
    color: #bfd4eb;
    text-decoration: none;
    font-size: 0.81rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.dashboard-topnav-link i {
    color: var(--primary);
    font-size: 0.76rem;
}

.dashboard-topnav-link:hover,
.dashboard-topnav-link:focus-visible,
.dashboard-topnav-link.is-active {
    background: rgba(3, 169, 244, 0.14);
    border-color: rgba(3, 169, 244, 0.28);
    color: #eaf7ff;
    outline: none;
}

.dashboard-topnav-dropdown {
    position: relative;
}

.dashboard-topnav-link--toggle {
    border: 1px solid rgba(3, 169, 244, 0.18);
    background: rgba(3, 169, 244, 0.06);
}

.dashboard-topnav-link--toggle i:last-child {
    color: #9fd4ed;
    font-size: 0.67rem;
    transition: transform 0.2s ease;
}

.dashboard-topnav-dropdown.is-open .dashboard-topnav-link--toggle i:last-child {
    transform: rotate(180deg);
}

.dashboard-topnav-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.45rem);
    left: 0;
    min-width: 190px;
    padding: 0.4rem;
    border-radius: 0.84rem;
    border: 1px solid rgba(3, 169, 244, 0.24);
    background: rgba(13, 23, 41, 0.98);
    box-shadow: 0 12px 22px rgba(1, 10, 20, 0.44);
    z-index: 65;
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.dashboard-topnav-dropdown.is-open .dashboard-topnav-dropdown-menu {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.dashboard-topnav-dropdown-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    border-radius: 0.66rem;
    color: #dff1ff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.53rem 0.62rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.dashboard-topnav-dropdown-link i {
    color: var(--primary);
    width: 14px;
    text-align: center;
}

.dashboard-topnav-dropdown-link:hover,
.dashboard-topnav-dropdown-link:focus-visible {
    background: rgba(3, 169, 244, 0.2);
    color: #ffffff;
    outline: none;
}

body.theme-light .dashboard-topnav-link {
    color: #27415f;
}

body.theme-light .dashboard-topnav-link:hover,
body.theme-light .dashboard-topnav-link:focus-visible,
body.theme-light .dashboard-topnav-link.is-active {
    color: #152235;
}

body.theme-light .dashboard-topnav-link--toggle {
    background: rgba(3, 169, 244, 0.08);
    border-color: rgba(3, 169, 244, 0.22);
}

body.theme-light .dashboard-topnav-dropdown-menu {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(3, 169, 244, 0.2);
    box-shadow: 0 12px 20px rgba(21, 34, 53, 0.14);
}

body.theme-light .dashboard-topnav-dropdown-link {
    color: #1d334c;
}

body.theme-light .dashboard-topnav-dropdown-link:hover,
body.theme-light .dashboard-topnav-dropdown-link:focus-visible {
    background: rgba(3, 169, 244, 0.12);
}

body.theme-light .dashboard-sidebar {
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    box-shadow: inset -1px 0 0 rgba(3, 169, 244, 0.1), 0 10px 22px rgba(21, 34, 53, 0.08);
}

body.theme-light .sidebar-brand-text {
    color: #60758f;
}

body.theme-light .sidebar-section-title {
    color: #6f86a1;
}

body.theme-light .sidebar-nav a {
    color: #2d4764;
}

body.theme-light .sidebar-nav a:hover,
body.theme-light .sidebar-nav a.is-active {
    background: rgba(3, 169, 244, 0.14);
    color: #152235;
}

body.theme-light .dashboard-topbar {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(3, 169, 244, 0.18);
    box-shadow: 0 8px 18px rgba(21, 34, 53, 0.08);
}

body.theme-light .topbar-menu-btn {
    background: rgba(3, 169, 244, 0.1);
    color: var(--primary);
}

body.theme-light .topbar-menu-btn:hover {
    background: rgba(3, 169, 244, 0.16);
}

body.theme-light .header-icon-btn {
    background: rgba(3, 169, 244, 0.1);
    color: #1d445e;
}

body.theme-light .header-icon-btn:hover {
    background: rgba(3, 169, 244, 0.16);
}

body.theme-light .topbar-user-btn {
    background: #ffffff;
    border-color: rgba(3, 169, 244, 0.24);
    color: #152235;
}

body.theme-light .topbar-user-dropdown.is-open .topbar-user-btn {
    box-shadow: 0 0 0 3px rgba(3, 169, 244, 0.14);
}

body.theme-light .user-avatar {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.5);
}

body.theme-light .status-dot {
    border-color: #ffffff;
}

body.theme-light .desktop-user-name {
    color: #5f738d;
}

body.theme-light .topbar-user-dropdown:hover .desktop-user-name {
    color: #445a74;
}

body.theme-light .user-chevron {
    color: #4e6883;
}

body.theme-light .dashboard-hero,
body.theme-light .dashboard-card {
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(21, 34, 53, 0.08);
}

body.theme-light .dashboard-hero h1,
body.theme-light .dashboard-card h2 {
    color: #152235;
}

body.theme-light .dashboard-card p {
    color: #38516d;
}

.topbar-menu-btn {
    border: 0;
    background: rgba(159, 176, 200, 0.14);
    color: #d9f3ff;
    width: 38px;
    height: 36px;
    border-radius: 0.65rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease;
}

.topbar-menu-btn:hover {
    background: rgba(159, 176, 200, 0.24);
}

.topbar-user-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-right: 0.9rem;
    min-width: 0;
    flex-shrink: 0;
}

.header-icon-btn {
    border: 0;
    background: rgba(159, 176, 200, 0.14);
    color: #d9f3ff;
    width: 36px;
    height: 36px;
    border-radius: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.header-icon-btn:hover {
    background: rgba(159, 176, 200, 0.26);
    transform: translateY(-1px);
}

.theme-toggle-btn i {
    transition: color 0.2s ease;
}

body.theme-light .theme-toggle-btn .fa-sun {
    color: #facc15;
}

.theme-toggle-btn:hover .fa-sun {
    color: #facc15;
}

.theme-toggle-btn:hover .fa-moon {
    color: var(--primary);
}

.topbar-user-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 0.8rem;
    border: 1px solid color-mix(in srgb, var(--primary) 32%, var(--border));
    background: color-mix(in srgb, var(--surface) 86%, #1a2338 14%);
    color: #eef6ff;
    height: 38px;
    padding: 0 0.74rem 0 0.42rem;
    font-size: 0.79rem;
    cursor: pointer;
    min-width: 0;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.topbar-user-btn:hover {
    border-color: color-mix(in srgb, var(--primary) 46%, var(--border));
    background: color-mix(in srgb, var(--surface) 80%, #1d2a44 20%);
}

.topbar-user-dropdown.is-open .topbar-user-btn {
    border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
    box-shadow: 0 0 0 3px rgba(3, 169, 244, 0.18);
}

.topbar-user-dropdown:hover .topbar-user-btn {
    box-shadow: 0 0 0 2px rgba(3, 169, 244, 0.14), 0 6px 16px rgba(3, 169, 244, 0.18);
}

.user-avatar {
    position: relative;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: var(--primary-gradient);
    color: #dff5ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.60rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.status-dot {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #22c55e;
    border: 2px solid var(--surface);
}

.desktop-user-name {
    max-width: 130px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    font-size: 0.8rem;
    color: #f2f8ff;
    opacity: 0.82;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.topbar-user-dropdown:hover .desktop-user-name {
    opacity: 1;
}

.user-chevron {
    transition: transform 0.22s ease;
    color: #9fd4ed;
    font-size: 0.72rem;
}

.topbar-user-dropdown.is-open .user-chevron {
    transform: rotate(180deg);
}

.topbar-user-menu {
    position: absolute;
    right: 0.15rem;
    top: calc(100% + 0.45rem);
    width: 290px;
    min-width: 290px;
    background: rgba(13, 23, 41, 0.98);
    border: 0;
    border-radius: 1rem;
    padding: 0;
    box-shadow: 0 20px 44px rgba(1, 10, 20, 0.52), 0 6px 18px rgba(1, 10, 20, 0.35);
    z-index: 40;
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    display: grid;
    gap: 0;
    overflow: hidden;
    isolation: isolate;
}

.topbar-user-menu::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(180deg, rgba(3, 169, 244, 0.08), rgba(3, 169, 244, 0.3));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
}

.topbar-user-menu-head {
    display: flex;
    align-items: center;
    gap: 0.58rem;
    border-radius: 0;
    border: 0;
    border-bottom: 1px solid rgba(3, 169, 244, 0.18);
    background: linear-gradient(135deg, rgba(3, 169, 244, 0.16), rgba(3, 169, 244, 0.05));
    padding: 0.72rem 0.72rem 0.62rem;
}

.topbar-user-menu-avatar {
    position: relative;
    width: 48px;
    height: 48px;
    min-width: 48apx;
    border-radius: 10px;
    background: var(--primary-gradient);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.topbar-user-menu-head-info {
    min-width: 0;
    flex: 1;
}

.topbar-user-menu-name {
    font-size: 0.79rem;
    font-weight: 700;
    color: #f3f9ff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-user-menu-email {
    margin-top: 0.2rem;
    font-size: 0.68rem;
    color: #9fb9d3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-user-menu-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.35rem;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    border: 1px solid var(--primary-border);
    background: var(--primary-soft);
    color: #cfeeff;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    width: fit-content;
}

.topbar-user-menu-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #22c55e;
}

.topbar-user-dropdown.is-open .topbar-user-menu {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

body.theme-light .topbar-user-menu {
    background: #ffffff;
    border: 0;
    box-shadow: 0 16px 30px rgba(21, 34, 53, 0.16);
}

body.theme-light .topbar-user-menu::before {
    background: linear-gradient(180deg, rgba(3, 169, 244, 0.06), rgba(3, 169, 244, 0.22));
}

body.theme-light .topbar-user-menu-head {
    background: linear-gradient(135deg, rgba(3, 169, 244, 0.14), rgba(3, 169, 244, 0.05));
    border-bottom-color: rgba(3, 169, 244, 0.16);
}

body.theme-light .topbar-user-menu-avatar {
    color: #ffffff;
}

body.theme-light .topbar-user-menu-name {
    color: #152235;
}

body.theme-light .topbar-user-menu-email {
    color: #5f738d;
}

body.theme-light .topbar-user-menu-badge {
    color: #0b5f84;
}

body.theme-light .user-menu-link {
    background: #f3f8fd;
    color: #152235;
}

body.theme-light .user-menu-link:hover {
    background: rgba(3, 169, 244, 0.12);
}

body.theme-light .user-menu-logout {
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.16), rgba(248, 113, 113, 0.08));
    color: #152235;
}

body.theme-light .user-menu-logout:hover {
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.24), rgba(248, 113, 113, 0.14));
}

.admin-mobile-dropdown {
    display: none;
}

.user-menu-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    background: linear-gradient(135deg, rgba(3, 169, 244, 0.12), rgba(3, 169, 244, 0.04));
    color: #ffffff;
    border-radius: 0 0 0.95rem 0.95rem;
    padding: 0.52rem 0.68rem;
    font-size: 0.79rem;
    font-weight: 600;
    transition: background 0.2s ease;
    min-height: 38px;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

.user-menu-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    background: #121b2d;
    color: #ffffff;
    border-radius: 0;
    padding: 0.52rem 0.68rem;
    font-size: 0.79rem;
    font-weight: 600;
    transition: background 0.2s ease, border-radius 0.2s ease;
    min-height: 36px;
    margin-left: 0.32rem;
    margin-right: 0.32rem;
    margin-top: 0.2rem;
    margin-bottom: 0.2rem;
}

.user-menu-link i {
    width: 1.45rem;
    min-width: 1.45rem;
    height: 1.45rem;
    text-align: center;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.42rem;
    background: rgba(255, 255, 255, 0.05);
}

.user-menu-link:hover {
    background: rgba(3, 169, 244, 0.22);
    border-radius: 0.58rem;
}

.topbar-user-menu .user-menu-link + .user-menu-link {
    position: relative;
}

.topbar-user-menu .user-menu-link + .user-menu-link::before {
    content: "";
    position: absolute;
    top: -0.2rem;
    left: 0.68rem;
    right: 0.68rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(3, 169, 244, 0.24), transparent);
}

.user-menu-divider {
    height: 1px;
    background: rgba(3, 169, 244, 0.16);
    margin: 0.2rem 0 0.15rem;
}

.topbar-user-menu-bottom {
    margin-top: 0.2rem;
    border-top: 1px solid rgba(3, 169, 244, 0.16);
    display: block;
    padding: 0;
}

.user-menu-logout span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.user-menu-theme {
    display: none;
    align-items: center;
    gap: 0.55rem;
    border: none;
    background: #223048;
    color: #ffffff;
    border-radius: 0;
    padding: 0.52rem 0.68rem;
    font-size: 0.79rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.user-menu-theme:hover {
    background: rgba(3, 169, 244, 0.22);
}

.user-menu-logout i {
    color: #f87171;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.45rem;
    min-width: 1.45rem;
    height: 1.45rem;
    border-radius: 0.42rem;
    background: rgba(248, 113, 113, 0.14);
}

.user-menu-logout:hover {
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.24), rgba(248, 113, 113, 0.12));
}

body:not(.theme-light) .user-menu-logout {
    background: linear-gradient(135deg, rgba(3, 169, 244, 0.1), rgba(3, 169, 244, 0.03));
}

.admin-mobile-dropdown__head {
    display: flex;
    align-items: flex-start;
    padding: 0.62rem 0.68rem 0.58rem;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(3, 169, 244, 0.16);
    background: linear-gradient(135deg, rgba(3, 169, 244, 0.14), rgba(3, 169, 244, 0.05));
}

.admin-mobile-dropdown__user {
    min-width: 0;
    flex: 1;
}

.admin-user-dropdown__avatar {
    position: relative;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: var(--primary-gradient);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
}

.admin-mobile-dropdown__name {
    font-size: 0.83rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-mobile-dropdown__email {
    margin-top: 0.16rem;
    font-size: 0.68rem;
    color: #9fb9d3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-mobile-dropdown__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.32rem;
    padding: 0.14rem 0.48rem;
    border-radius: 999px;
    border: 1px solid var(--primary-border);
    background: var(--primary-soft);
    color: #cfeeff;
    font-size: 0.62rem;
    font-weight: 700;
    width: fit-content;
}

.admin-mobile-dropdown__badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #22c55e;
}

.admin-mobile-menu-nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.28rem;
}

.admin-mobile-menu-item {
    width: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    border: 0;
    border-radius: 0.58rem;
    background: #223048;
    color: #fff;
    padding: 0.52rem 0.68rem;
    font-size: 0.79rem;
    font-weight: 600;
    cursor: pointer;
    min-width: 0;
    height: 36px;
    box-sizing: border-box;
    overflow: hidden;
    transition: background 0.2s ease, color 0.2s ease;
}

.admin-mobile-menu-item > span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-mobile-menu-item i {
    width: 14px;
    min-width: 14px;
    text-align: center;
    flex-shrink: 0;
    color: var(--primary);
}

.admin-mobile-menu-theme {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr) 110px;
    column-gap: 0.55rem;
    align-items: center;
}

.admin-theme-toggle__label {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: inherit;
    font-weight: inherit;
}

.admin-theme-toggle__control {
    display: grid;
    grid-template-columns: 34px 38px 34px;
    column-gap: 0.4rem;
    align-items: center;
    margin-left: auto;
    flex-shrink: 0;
    width: 110px;
    min-width: 110px;
    max-width: 110px;
    padding-inline: 0.12rem;
    justify-self: end;
}

.admin-theme-toggle__mode {
    font-size: 0.64rem;
    color: #9fb0c8;
    font-weight: 600;
    width: 34px;
    text-align: center;
    white-space: nowrap;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.admin-theme-toggle__mode--light {
    color: var(--primary);
    opacity: 1;
}

body.theme-light .admin-theme-toggle__mode--light {
    color: #9fb0c8;
    opacity: 0.72;
}

body.theme-light .admin-theme-toggle__mode--dark {
    color: var(--primary);
    opacity: 1;
}

body:not(.theme-light) .admin-theme-toggle__mode--dark {
    opacity: 0.72;
}

.admin-theme-toggle__track {
    width: 38px;
    height: 18px;
    border-radius: 999px;
    background: rgba(159, 176, 200, 0.28);
    position: relative;
    justify-self: center;
}

.admin-theme-toggle__knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: #ffffff;
    color: var(--primary);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.26);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, color 0.2s ease;
}

.admin-theme-toggle__knob-icon {
    position: absolute;
    font-size: 0.52rem;
    line-height: 1;
}

.admin-theme-toggle__knob-icon--light {
    opacity: 1;
}

.admin-theme-toggle__knob-icon--dark {
    opacity: 0;
}

body.theme-light .admin-theme-toggle__knob {
    transform: translateX(0);
    color: #facc15;
}

body:not(.theme-light) .admin-theme-toggle__knob {
    transform: translateX(20px);
    color: var(--primary);
}

body.theme-light .admin-theme-toggle__knob-icon--light {
    opacity: 1;
}

body.theme-light .admin-theme-toggle__knob-icon--dark {
    opacity: 0;
}

body:not(.theme-light) .admin-theme-toggle__knob-icon--light {
    opacity: 0;
}

body:not(.theme-light) .admin-theme-toggle__knob-icon--dark {
    opacity: 1;
}

.admin-mobile-menu-divider {
    height: 1px;
    background: rgba(3, 169, 244, 0.18);
    margin: 0.2rem 0 0.15rem;
}

.admin-mobile-menu-item:hover {
    background: rgba(3, 169, 244, 0.18);
}

.admin-mobile-menu-item:focus-visible {
    outline: 2px solid rgba(3, 169, 244, 0.55);
    outline-offset: 1px;
}

.admin-mobile-menu-item--logout i {
    color: #f87171;
}

.admin-mobile-menu-item--logout:hover {
    background: rgba(248, 113, 113, 0.26);
}

.admin-mobile-menu-item--logout {
    border-radius: 0.58rem;
}

body.theme-light .admin-mobile-dropdown {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(3, 169, 244, 0.16);
    box-shadow: 0 12px 20px rgba(21, 34, 53, 0.14);
}

body.theme-light .admin-mobile-dropdown__head {
    border-bottom-color: rgba(3, 169, 244, 0.16);
    background: linear-gradient(135deg, rgba(3, 169, 244, 0.14), rgba(3, 169, 244, 0.05));
}

body.theme-light .admin-mobile-dropdown__name {
    color: #152235;
}

body.theme-light .admin-mobile-dropdown__email {
    color: #5f738d;
}

body.theme-light .admin-mobile-dropdown__badge {
    color: #0b5f84;
}

body.theme-light .admin-mobile-menu-item {
    background: #f3f8fd;
    color: #152235;
}

body.theme-light .admin-mobile-menu-item:hover {
    background: rgba(3, 169, 244, 0.12);
}

body.theme-light .admin-mobile-menu-divider {
    background: rgba(3, 169, 244, 0.16);
}

body.theme-light .admin-mobile-menu-item--logout {
    background: rgba(248, 113, 113, 0.1);
}

body.theme-light .admin-mobile-menu-item--logout:hover {
    background: rgba(248, 113, 113, 0.16);
}

.dashboard-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    padding: 1rem;
}

.dashboard-hero {
    grid-column: 1 / -1;
    background: rgba(17, 26, 46, 0.88);
    border: 0;
    border-radius: 1rem;
    padding: 0.85rem 1rem;
}

.dashboard-hero h1 {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 600;
}

.dashboard-hero p {
    margin: 0.28rem 0 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.dashboard-card {
    background: rgba(17, 26, 46, 0.88);
    border: 0;
    border-radius: 1rem;
    padding: 1rem;
}

.dashboard-card h2 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.dashboard-card p {
    margin: 0.35rem 0;
    color: #d0e1f2;
    font-size: 0.88rem;
}

.dashboard-shell.sidebar-collapsed {
    grid-template-columns: 76px 1fr;
}

.dashboard-shell.sidebar-collapsed .sidebar-brand-text,
.dashboard-shell.sidebar-collapsed .nav-label,
.dashboard-shell.sidebar-collapsed .sidebar-section-title,
.dashboard-shell.sidebar-collapsed .sidebar-divider {
    opacity: 0;
    visibility: hidden;
    width: 0;
    overflow: hidden;
    transition-delay: 0s;
}

.dashboard-shell:not(.sidebar-collapsed) .sidebar-brand-text,
.dashboard-shell:not(.sidebar-collapsed) .nav-label,
.dashboard-shell:not(.sidebar-collapsed) .sidebar-section-title,
.dashboard-shell:not(.sidebar-collapsed) .sidebar-divider {
    transition-delay: 0.14s;
}

.dashboard-shell.sidebar-collapsed .dashboard-sidebar {
    width: 76px;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.dashboard-shell.sidebar-collapsed .sidebar-nav a {
    justify-content: center;
}

.toast-center-host {
    position: fixed;
    left: 50%;
    top: 4.7rem;
    transform: translateX(-50%);
    z-index: 9999;
    width: min(92vw, 420px);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast-box {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.72rem 0.85rem;
    border-radius: 0.8rem;
    border: 0;
    box-shadow: 0 10px 24px rgba(1, 10, 20, 0.38);
    backdrop-filter: blur(6px);
}

.toast-error {
    background: rgba(220, 38, 38, 0.11);
    color: #ffe1e1;
}

.toast-success {
    background: rgba(34, 197, 94, 0.11);
    color: #dcfce7;
}

.toast-info {
    background: rgba(3, 169, 244, 0.12);
    color: #dff5ff;
}

.toast-main {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.toast-icon {
    margin-top: 0;
    opacity: 0.95;
    font-size: 0.9rem;
}

.toast-text {
    font-size: 0.84rem;
    line-height: 1.45;
}

.toast-close {
    border: 0;
    background: transparent;
    color: inherit;
    opacity: 0.9;
    cursor: pointer;
    padding: 0;
    font-size: 0.9rem;
}

.apartments-empty-state,
.sites-empty-state {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    text-align: center;
}

.apartments-empty-icon,
.sites-empty-icon {
    font-size: 2rem;
    color: rgba(3, 169, 244, 0.55);
}

.apartments-empty-state p,
.sites-empty-state p {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 600;
    color: #9fb0c8;
}

body.theme-light .apartments-empty-state p,
body.theme-light .sites-empty-state p {
    color: rgba(15, 23, 42, 0.68);
}

.apartments-hero,
.sites-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.apartments-hero-actions,
.sites-hero-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

@media (max-width: 1100px) {
    .apartments-hero,
    .sites-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .apartments-hero-actions,
    .sites-hero-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .apartments-search-wrap,
    .sites-search-wrap {
        width: 100%;
        min-width: 0;
    }

    .apartments-hero-add-btn,
    .sites-hero-add-btn {
        width: 100%;
    }
}

.apartments-search-wrap,
.sites-search-wrap {
    position: relative;
    width: min(280px, 40vw);
}

.apartments-search-icon,
.sites-search-icon {
    position: absolute;
    left: 0.72rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.78rem;
    color: #7f98b6;
}

.apartments-search-input,
.sites-search-input {
    width: 100%;
    height: 36px;
    border-radius: 0.85rem;
    border: 1px solid #30435f;
    background: #0d1729;
    color: #e6f0fb;
    padding: 0 0.75rem 0 2rem;
    font-size: 0.8rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.apartments-search-input::placeholder,
.sites-search-input::placeholder {
    color: #7f98b6;
}

.apartments-search-input:focus,
.sites-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(3, 169, 244, 0.16);
}

.apartments-hero-add-btn,
.sites-hero-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    height: 36px;
    padding: 0 0.9rem;
    border: 0;
    border-radius: 0.95rem;
    background: var(--primary);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.apartments-hero-add-btn i,
.sites-hero-add-btn i,
.apartments-hero-add-btn span,
.sites-hero-add-btn span {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.apartments-hero-add-btn:hover,
.sites-hero-add-btn:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 16px rgba(3, 169, 244, 0.28);
}

.apartments-add-card,
.sites-add-card {
    grid-column: 1 / -1;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
    pointer-events: none;
    transition: max-height 0.28s ease, opacity 0.2s ease, padding 0.2s ease;
}

.apartments-add-card.is-open,
.sites-add-card.is-open {
    max-height: 980px;
    opacity: 1;
    padding-top: 1rem;
    padding-bottom: 1rem;
    pointer-events: auto;
    overflow: visible;
}

.apartments-add-card .custom-select-wrap,
.sites-add-card .custom-select-wrap {
    z-index: 1;
}

.apartments-add-card .custom-select-wrap.is-open,
.sites-add-card .custom-select-wrap.is-open {
    z-index: 140;
}

.apartments-add-card .custom-select-menu,
.sites-add-card .custom-select-menu {
    scrollbar-width: thin;
    scrollbar-color: rgba(3, 169, 244, 0.45) rgba(16, 26, 44, 0.85);
}

.apartments-add-card .custom-select-menu::-webkit-scrollbar,
.sites-add-card .custom-select-menu::-webkit-scrollbar {
    width: 8px;
}

.apartments-add-card .custom-select-menu::-webkit-scrollbar-track,
.sites-add-card .custom-select-menu::-webkit-scrollbar-track {
    background: rgba(16, 26, 44, 0.85);
    border-radius: 999px;
}

.apartments-add-card .custom-select-menu::-webkit-scrollbar-thumb,
.sites-add-card .custom-select-menu::-webkit-scrollbar-thumb {
    background: rgba(3, 169, 244, 0.45);
    border-radius: 999px;
}

.apartments-add-card .custom-select-menu::-webkit-scrollbar-thumb:hover,
.sites-add-card .custom-select-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(3, 169, 244, 0.62);
}

body.theme-light .apartments-hero-add-btn,
body.theme-light .sites-hero-add-btn {
    background: var(--primary);
    color: #f7fcff;
}

body.theme-light .apartments-search-input,
body.theme-light .sites-search-input {
    border-color: #c9deef;
    background: #ffffff;
    color: #152235;
}

body.theme-light .apartments-search-input::placeholder,
body.theme-light .sites-search-input::placeholder {
    color: #7b8ea4;
}

body.theme-light .apartments-search-icon,
body.theme-light .sites-search-icon {
    color: rgba(21, 34, 53, 0.58);
}

body.theme-light .apartments-add-card .custom-select-menu,
body.theme-light .sites-add-card .custom-select-menu {
    scrollbar-color: rgba(3, 169, 244, 0.42) #e9f2fb;
}

body.theme-light .apartments-add-card .custom-select-menu::-webkit-scrollbar-track,
body.theme-light .sites-add-card .custom-select-menu::-webkit-scrollbar-track {
    background: #e9f2fb;
}

body.theme-light .apartments-add-card .custom-select-menu::-webkit-scrollbar-thumb,
body.theme-light .sites-add-card .custom-select-menu::-webkit-scrollbar-thumb {
    background: rgba(3, 169, 244, 0.42);
}

body.theme-light .apartments-add-card .custom-select-menu::-webkit-scrollbar-thumb:hover,
body.theme-light .sites-add-card .custom-select-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(3, 169, 244, 0.58);
}

.apartments-search-empty,
.sites-search-empty {
    margin: 0.62rem 0 0;
    font-size: 0.82rem;
    color: var(--muted);
}

.apartments-name-cell,
.sites-name-cell {
    color: #d2e3f3;
}

.apartments-name-main {
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.25;
    color: #d2e3f3;
}

.sites-name-main {
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.25;
    color: #d2e3f3;
}

.apartment-site-badge {
    margin-top: 0.3rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border-radius: 999px;
    padding: 0.16rem 0.48rem;
    font-size: 0.66rem;
    font-weight: 600;
    line-height: 1;
}

.apartment-site-badge i {
    font-size: 0.58rem;
    opacity: 0.9;
}

.apartment-site-badge.is-linked {
    background: rgba(3, 169, 244, 0.14);
    color: #8bd9ff;
}

.apartment-site-badge.is-empty {
    background: rgba(148, 163, 184, 0.16);
    color: #b8c6d6;
}

.apartment-manager-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    border-radius: 999px;
    padding: 0.2rem 0.58rem;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.apartment-manager-badge i {
    font-size: 0.58rem;
    opacity: 0.94;
}

.users-license-token-text {
    max-width: 168px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.users-license-copy-btn {
    border: 0;
    background: transparent;
    color: currentColor;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.18rem;
    height: 1.18rem;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.88;
    transition: background 0.14s ease, opacity 0.14s ease;
}

.users-license-copy-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    opacity: 1;
}

.users-license-copy-btn:focus-visible {
    outline: 2px solid rgba(3, 169, 244, 0.55);
    outline-offset: 1px;
}

.apartment-manager-badge.is-assigned {
    background: rgba(3, 169, 244, 0.15);
    color: #8bd9ff;
    border: 1px solid rgba(3, 169, 244, 0.28);
}

.apartment-manager-badge.is-empty {
    background: rgba(148, 163, 184, 0.15);
    color: #b8c6d6;
    border: 1px solid rgba(148, 163, 184, 0.24);
}

.user-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    border-radius: 999px;
    padding: 0.2rem 0.58rem;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
    white-space: nowrap;
}

.user-role-badge i {
    font-size: 0.58rem;
    opacity: 0.94;
}

.user-role-badge.role-1 {
    background: rgba(3, 169, 244, 0.15);
    color: #8bd9ff;
    border-color: rgba(3, 169, 244, 0.28);
}

.user-role-badge.role-2 {
    background: rgba(249, 115, 22, 0.16);
    color: #fdba74;
    border-color: rgba(249, 115, 22, 0.28);
}

.user-role-badge.role-3 {
    background: rgba(16, 185, 129, 0.16);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.28);
}

.apartments-no-cell,
.sites-no-cell {
    color: #8ea2ba;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.apartments-city-cell,
.apartments-district-cell,
.sites-city-cell,
.sites-district-cell {
    color: #abc2d8;
    font-size: 0.78rem;
    font-weight: 600;
}

body.theme-light .apartments-no-cell,
body.theme-light .sites-no-cell {
    color: #72859d;
}

body.theme-light .apartments-name-main {
    color: #4b5563;
}

body.theme-light .sites-name-main {
    color: #4b5563;
}

body.theme-light .apartments-city-cell,
body.theme-light .apartments-district-cell,
body.theme-light .sites-city-cell,
body.theme-light .sites-district-cell {
    color: #5f738d;
}

body.theme-light .apartment-site-badge.is-linked {
    background: rgba(3, 169, 244, 0.12);
    color: #0f6ea2;
}

body.theme-light .apartment-site-badge.is-empty {
    background: rgba(148, 163, 184, 0.2);
    color: #5c6f84;
}

body.theme-light .apartment-manager-badge.is-assigned {
    background: rgba(3, 169, 244, 0.12);
    color: #0f6ea2;
    border-color: rgba(3, 169, 244, 0.24);
}

body.theme-light .apartment-manager-badge.is-empty {
    background: rgba(148, 163, 184, 0.19);
    color: #5c6f84;
    border-color: rgba(148, 163, 184, 0.26);
}

body.theme-light .users-license-copy-btn:hover {
    background: rgba(3, 169, 244, 0.12);
}

body.theme-light .user-role-badge.role-1 {
    background: rgba(3, 169, 244, 0.12);
    color: #0f6ea2;
    border-color: rgba(3, 169, 244, 0.24);
}

body.theme-light .user-role-badge.role-2 {
    background: rgba(249, 115, 22, 0.14);
    color: #b45309;
    border-color: rgba(249, 115, 22, 0.26);
}

body.theme-light .user-role-badge.role-3 {
    background: rgba(16, 185, 129, 0.13);
    color: #0f766e;
    border-color: rgba(16, 185, 129, 0.24);
}

.apartments-actions,
.sites-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    flex-wrap: wrap;
}

.apartment-list-row,
.site-list-row {
    transition: background 0.22s ease;
}

body.modal-open {
    overflow: hidden;
}

.apartment-edit-modal {
    position: fixed;
    inset: 0;
    z-index: 170;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.apartment-edit-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 10, 20, 0.46);
    backdrop-filter: blur(6px);
}

.apartment-edit-modal__dialog {
    position: relative;
    width: min(760px, 100%);
    border-radius: 1.1rem;
    border: 0;
    background: linear-gradient(165deg, rgba(16, 26, 44, 0.98), rgba(11, 20, 35, 0.97));
    box-shadow: 0 24px 52px rgba(2, 8, 23, 0.52);
    overflow: visible;
}

.apartment-edit-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    padding: 1rem 1.1rem 0.85rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(10, 18, 32, 0.92);
    border-radius: 1.1rem 1.1rem 0 0;
}

.apartment-edit-modal__title-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.62rem;
    min-width: 0;
}

.apartment-edit-modal__icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.68rem;
    background: rgba(3, 169, 244, 0.17);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
}

.apartment-edit-modal__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #eaf3ff;
    letter-spacing: 0.01em;
}

.apartment-edit-modal__subtitle {
    margin: 0.12rem 0 0;
    font-size: 0.74rem;
    color: #9eb8d2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.apartment-edit-modal__close {
    border: 0;
    width: 1.95rem;
    height: 1.95rem;
    border-radius: 0.62rem;
    background: rgba(148, 163, 184, 0.14);
    color: #d7e5f5;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.apartment-edit-modal__close:hover {
    background: rgba(148, 163, 184, 0.24);
    color: #ffffff;
}

.apartment-edit-modal__form {
    display: grid;
}

.apartment-edit-modal__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.58rem;
    padding: 1rem 1.1rem 0.95rem;
    background: #0f1a2d;
}

.apartment-edit-modal__field {
    display: grid;
    gap: 0.38rem;
    margin-bottom: 0.22rem;
}

.apartment-edit-modal__field--full {
    grid-column: 1 / -1;
}

.apartment-edit-modal__field--half {
    grid-column: span 1;
}

.apartment-edit-modal__label {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #b8cce3;
}

.apartment-edit-modal__label i {
    color: var(--primary);
    font-size: 0.72rem;
}

.apartment-edit-modal__grid .auth-input,
.apartment-edit-modal__grid .custom-select-trigger {
    min-height: 42px;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0;
    color: #d8e6f5;
    border-color: #30435f;
    background: #0d1729;
}

.apartment-edit-modal__grid .custom-select-label {
    font-size: 0.78rem;
    font-weight: 500;
}

.apartment-edit-modal__grid .custom-select-option {
    font-size: 0.78rem;
}

.apartment-edit-modal__field .input-icon {
    color: var(--primary);
}

.apartment-edit-modal__field .custom-select-wrap {
    z-index: 1;
}

.apartment-edit-modal__field .custom-select-wrap.is-open {
    z-index: 180;
}

.apartment-edit-modal__field .custom-select-menu {
    scrollbar-width: thin;
    scrollbar-color: rgba(3, 169, 244, 0.45) rgba(16, 26, 44, 0.85);
}

.apartment-edit-modal__field .custom-select-menu::-webkit-scrollbar {
    width: 8px;
}

.apartment-edit-modal__field .custom-select-menu::-webkit-scrollbar-track {
    background: rgba(16, 26, 44, 0.85);
    border-radius: 999px;
}

.apartment-edit-modal__field .custom-select-menu::-webkit-scrollbar-thumb {
    background: rgba(3, 169, 244, 0.45);
    border-radius: 999px;
}

.apartment-edit-modal__field .custom-select-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(3, 169, 244, 0.62);
}

.apartment-edit-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.86rem 1.1rem 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(10, 18, 32, 0.92);
    border-radius: 0 0 1.1rem 1.1rem;
}

.apartment-edit-modal__btn {
    border: 0;
    border-radius: 0.65rem;
    min-height: 2.15rem;
    padding: 0 0.92rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.apartment-edit-modal__btn:hover {
    transform: translateY(-1px);
}

.apartment-edit-modal__btn--ghost {
    background: rgba(148, 163, 184, 0.15);
    color: #dbe7f4;
}

.apartment-edit-modal__btn--ghost:hover {
    background: rgba(148, 163, 184, 0.24);
}

.apartment-edit-modal__btn--primary {
    background: var(--primary);
    color: #ffffff;
}

.apartment-edit-modal__btn--primary:hover {
    background: var(--primary-hover);
}

body.theme-light .apartment-edit-modal__dialog {
    background: linear-gradient(170deg, #ffffff, #f6fbff);
    box-shadow: 0 26px 56px rgba(15, 23, 42, 0.2);
}

body.theme-light .apartment-edit-modal__header,
body.theme-light .apartment-edit-modal__footer {
    border-color: #d7e6f3;
    background: #eef5fc;
}

body.theme-light .apartment-edit-modal__title {
    color: #12243b;
}

body.theme-light .apartment-edit-modal__subtitle {
    color: #5f738d;
}

body.theme-light .apartment-edit-modal__close {
    background: rgba(148, 163, 184, 0.18);
    color: #43566c;
}

body.theme-light .apartment-edit-modal__close:hover {
    background: rgba(148, 163, 184, 0.26);
    color: #23374c;
}

body.theme-light .apartment-edit-modal__grid .auth-input,
body.theme-light .apartment-edit-modal__grid .custom-select-trigger {
    border-color: #c9deef;
    background: #ffffff;
    color: #3e5469;
    font-size: 0.78rem;
    font-weight: 500;
}

body.theme-light .apartment-edit-modal__label {
    color: #627a92;
}

body.theme-light .apartment-edit-modal__grid .auth-input::placeholder {
    color: #7b8ea4;
}

body.theme-light .apartment-edit-modal__grid .auth-input:focus,
body.theme-light .apartment-edit-modal__grid .custom-select-wrap.is-open .custom-select-trigger {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(3, 169, 244, 0.14);
}

body.theme-light .apartment-edit-modal__field .custom-select-menu {
    scrollbar-color: rgba(3, 169, 244, 0.42) #e9f2fb;
}

body.theme-light .apartment-edit-modal__field .custom-select-menu::-webkit-scrollbar-track {
    background: #e9f2fb;
}

body.theme-light .apartment-edit-modal__field .custom-select-menu::-webkit-scrollbar-thumb {
    background: rgba(3, 169, 244, 0.42);
}

body.theme-light .apartment-edit-modal__field .custom-select-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(3, 169, 244, 0.58);
}

body.theme-light .apartment-edit-modal__footer {
    background: #eef5fc;
}

body.theme-light .apartment-edit-modal__btn--ghost {
    background: rgba(148, 163, 184, 0.18);
    color: #41556b;
}

body.theme-light .apartment-edit-modal__btn--ghost:hover {
    background: rgba(148, 163, 184, 0.28);
}

html.theme-light-preload .apartment-edit-modal__dialog {
    background: linear-gradient(170deg, #ffffff, #f6fbff);
    box-shadow: 0 26px 56px rgba(15, 23, 42, 0.2);
}

html.theme-light-preload .apartment-edit-modal__header,
html.theme-light-preload .apartment-edit-modal__footer {
    border-color: #d7e6f3;
    background: #eef5fc;
}

html.theme-light-preload .apartment-edit-modal__title {
    color: #12243b;
}

html.theme-light-preload .apartment-edit-modal__subtitle,
html.theme-light-preload .apartment-edit-modal__label {
    color: #627a92;
}

html.theme-light-preload .apartment-edit-modal__grid .auth-input,
html.theme-light-preload .apartment-edit-modal__grid .custom-select-trigger {
    border-color: #c9deef;
    background: #ffffff;
    color: #3e5469;
}

.apartment-action-btn,
.site-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-height: 1.85rem;
    width: 1.95rem;
    min-width: 1.95rem;
    padding: 0;
    border-radius: 0.55rem;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.apartment-action-btn i,
.site-action-btn i {
    font-size: 0.76rem;
}

.apartment-action-btn:hover,
.site-action-btn:hover {
    transform: translateY(-1px);
}

.btn-edit {
    background: #ffffff;
    color: #152235;
    border: 1px solid var(--border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.btn-edit:hover {
    background: #f8fbff;
    border-color: #c3d8ea;
}

.btn-delete {
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(239, 68, 68, 0.34);
}

.btn-delete:hover {
    background: #dc2626;
}

.btn-phone {
    display: none;
    background: rgba(34, 197, 94, 0.62);
    color: #ffffff;
    border: 1px solid rgba(34, 197, 94, 0.76);
    box-shadow: 0 2px 6px rgba(22, 163, 74, 0.34);
}

.btn-phone:hover {
    background: rgba(34, 197, 94, 0.74);
}

.site-action-btn.btn-phone.is-open {
    background: rgba(22, 163, 74, 0.78);
    border-color: rgba(22, 163, 74, 0.9);
}

body.theme-light .btn-phone {
    background: rgba(34, 197, 94, 0.66);
    color: #ffffff;
    border-color: rgba(34, 197, 94, 0.82);
}

body.theme-light .btn-phone:hover {
    background: rgba(34, 197, 94, 0.8);
}

.user-phone-menu {
    position: fixed;
    z-index: 95;
    width: 138px;
    transform: translateY(-100%);
    border-radius: 12px;
    padding: 0.36rem;
    background: #111d31;
    border: 1px solid rgba(3, 169, 244, 0.28);
    box-shadow: 0 16px 32px rgba(2, 10, 24, 0.42);
}

.user-phone-menu__item {
    display: flex;
    align-items: center;
    gap: 0.42rem;
    width: 100%;
    border-radius: 8px;
    padding: 0.42rem 0.5rem;
    font-size: 0.74rem;
    font-weight: 600;
    color: #dbeaf7;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease;
}

.user-phone-menu__item:hover {
    background: rgba(3, 169, 244, 0.18);
}

.user-phone-menu__item.is-whatsapp {
    color: #86efac;
}

body.theme-light .user-phone-menu {
    background: #ffffff;
    border-color: rgba(3, 169, 244, 0.24);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.18);
}

body.theme-light .user-phone-menu__item {
    color: #1f3347;
}

body.theme-light .user-phone-menu__item:hover {
    background: rgba(3, 169, 244, 0.12);
}

.swal-popup {
    border-radius: 16px !important;
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    box-shadow: 0 24px 60px rgba(2, 10, 24, 0.35) !important;
}

.swal-title {
    color: var(--text) !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
}

.swal-text {
    color: var(--muted) !important;
    font-size: 0.92rem !important;
}

.swal-btn {
    border: 0;
    border-radius: 10px;
    font-weight: 600;
    padding: 0.6rem 1rem;
    min-width: 110px;
    transition: all 0.18s ease;
}

.swal-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.swal-btn-danger {
    background: #ef4444;
    color: #ffffff;
}

.swal-btn-danger:hover {
    background: #dc2626;
}

.swal-btn-cancel {
    background: var(--surface-soft);
    color: var(--text);
    border: 1px solid var(--border);
}

.swal-btn-cancel:hover {
    border-color: var(--primary-border);
}

body:not(.theme-light) .btn-edit {
    background: rgba(3, 169, 244, 0.14);
    color: #dff4ff;
    border-color: rgba(3, 169, 244, 0.42);
    box-shadow: 0 3px 10px rgba(2, 52, 84, 0.26);
}

body:not(.theme-light) .btn-edit:hover {
    background: rgba(3, 169, 244, 0.24);
}

.apartment-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.5rem;
    min-height: 1.35rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    border: 1px solid transparent;
    box-shadow: var(--shadow-sm);
}

.apartment-status-badge.is-active {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.2);
}

.apartment-status-badge.is-pending {
    background: rgba(251, 146, 60, 0.14);
    color: #fdba74;
    border-color: rgba(251, 146, 60, 0.24);
}

.apartment-status-badge.is-passive {
    background: rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, 0.26);
}

.apartment-status-badge.is-banned {
    background: rgba(239, 68, 68, 0.14);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.24);
}

body.theme-light .apartment-status-badge.is-active {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border-color: rgba(16, 185, 129, 0.22);
}

body.theme-light .apartment-status-badge.is-pending {
    background: rgba(251, 146, 60, 0.12);
    color: #c2410c;
    border-color: rgba(251, 146, 60, 0.22);
}

body.theme-light .apartment-status-badge.is-passive {
    background: rgba(148, 163, 184, 0.14);
    color: #475569;
    border-color: rgba(148, 163, 184, 0.24);
}

body.theme-light .apartment-status-badge.is-banned {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.22);
}

body.theme-light .apartments-add-card .auth-label,
body.theme-light .sites-add-card .auth-label {
    color: #4f647d;
}

body.theme-light .apartments-add-card .auth-input,
body.theme-light .sites-add-card .auth-input {
    border-color: #c9deef;
    background: #ffffff;
    color: #152235;
}

body.theme-light .apartments-add-card .auth-input::placeholder,
body.theme-light .sites-add-card .auth-input::placeholder {
    color: #7b8ea4;
}

body.theme-light .apartments-add-card .auth-input:focus,
body.theme-light .sites-add-card .auth-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(3, 169, 244, 0.16);
}

body.theme-light .apartments-add-card .input-icon,
body.theme-light .sites-add-card .input-icon {
    color: var(--primary);
    opacity: 0.9;
}

.apartments-add-card .auth-select,
.sites-add-card .auth-select {
    -webkit-appearance: none;
    appearance: none;
    background-color: #0d1729;
    background-image:
        linear-gradient(45deg, transparent 50%, #9fc5e5 50%),
        linear-gradient(135deg, #9fc5e5 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 2px),
        calc(100% - 12px) calc(50% - 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 2rem;
    border-color: #30435f;
    color: #e6f0fb;
}

.apartments-add-card .auth-select:focus,
.sites-add-card .auth-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(3, 169, 244, 0.2);
}

.apartments-add-card .auth-select option,
.sites-add-card .auth-select option {
    background: #0d1729;
    color: #e6f0fb;
}

.apartments-add-card .auth-select option:disabled,
.sites-add-card .auth-select option:disabled {
    color: #8aa2be;
}

body.theme-light .apartments-add-card .auth-select,
body.theme-light .sites-add-card .auth-select {
    background-color: #ffffff;
    background-image:
        linear-gradient(45deg, transparent 50%, #6d86a2 50%),
        linear-gradient(135deg, #6d86a2 50%, transparent 50%);
    border-color: #c9deef;
    color: #152235;
}

body.theme-light .apartments-add-card .auth-select:focus,
body.theme-light .sites-add-card .auth-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(3, 169, 244, 0.16);
}

body.theme-light .apartments-add-card .auth-select option,
body.theme-light .sites-add-card .auth-select option {
    background: #ffffff;
    color: #152235;
}

body.theme-light .toast-box {
    box-shadow: 0 10px 24px rgba(15, 34, 60, 0.14);
}

body.theme-light .toast-error {
    background: rgba(239, 68, 68, 0.14);
    color: #7f1d1d;
}

body.theme-light .toast-success {
    background: rgba(34, 197, 94, 0.14);
    color: #14532d;
}

body.theme-light .toast-info {
    background: rgba(3, 169, 244, 0.14);
    color: #0c4a6e;
}

.site-footer .container {
    text-align: center;
}

.site-footer p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--muted);
}

.footer-note {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    letter-spacing: 0.01em;
}

.footer-copy,
.footer-rights {
    color: #8fa2bb;
}

.footer-divider {
    color: #7084a0;
}

.site-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.site-footer a:hover {
    color: var(--primary-hover);
}

.hero,
.auth,
.not-found {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    margin-top: 1.25rem;
}

.cards {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
}

.auth-form {
    display: grid;
    gap: 0.75rem;
    max-width: 420px;
}

input,
button,
.btn {
    border-radius: 8px;
    border: 1px solid var(--border);
    padding: 0.65rem 0.75rem;
    font: inherit;
}

button,
.btn {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.alert {
    padding: 0.75rem;
    border: 1px solid var(--primary-border);
    background: var(--primary-soft);
    border-radius: 8px;
    color: var(--primary);
    margin-bottom: 1rem;
}

@media (max-width: 680px) {
    .container {
        width: 100%;
        margin: 0;
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }

    .dashboard-shell.dashboard-fullbleed {
        width: calc(100% + 1.8rem);
        max-width: none;
        margin-left: -0.9rem;
        margin-right: -0.9rem;
    }

    .login-center-wrap {
        min-height: calc(100vh - 150px);
        padding: 1rem 0;
    }

    .login-center-wrap-with-outside-logo {
        gap: 0.5rem;
    }

    .login-card {
        width: 100%;
        border-radius: 1rem;
        padding: 1rem 0.95rem;
    }

    .login-card::before {
        left: 0.6rem;
        top: 0.8rem;
        bottom: 0.8rem;
    }

    .login-logo {
        width: 64px;
        height: 64px;
    }

    .login-title {
        font-size: 1.35rem;
    }

    .auth-input {
        min-height: 44px;
        font-size: 0.95rem;
    }

    .password-toggle-btn {
        min-width: 32px;
        min-height: 32px;
    }

    .email-suggest {
        max-height: 190px;
        overflow-y: auto;
    }

    .site-footer p {
        font-size: 0.74rem;
    }

    .footer-note {
        gap: 0.28rem;
    }

    body.has-dashboard-shell .site-footer {
        display: none;
    }

    .dashboard-shell {
        grid-template-columns: 1fr;
        gap: 0;
        position: relative;
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    .dashboard-sidebar {
        position: fixed;
        top: 48px;
        left: 0;
        bottom: 0;
        width: 235px;
        z-index: 55;
        border-right: 1px solid rgba(3, 169, 244, 0.18);
        border-bottom: 0;
        transform: translateX(-100%);
        transition: transform 0.36s ease;
        padding-top: 0.9rem;
        padding-bottom: 0.9rem;
    }

    .dashboard-shell.sidebar-open .dashboard-sidebar {
        transform: translateX(0);
    }

    .dashboard-main {
        order: 1;
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    .dashboard-topbar {
        position: sticky;
        top: 0;
        left: 0;
        right: 0;
        z-index: 60;
    }

    .topbar-menu-btn {
        display: inline-flex;
    }

    .topbar-user-dropdown {
        margin-right: 0;
        min-width: 0;
        max-width: calc(100vw - 1.8rem);
    }

    .dashboard-topnav {
        display: none;
    }

    .desktop-theme-toggle {
        display: none;
    }

    .user-menu-theme {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .user-menu-theme .admin-theme-toggle__label {
        flex: 0 0 auto;
        min-width: auto;
        margin-right: auto;
    }

    .user-menu-theme .admin-theme-toggle__control {
        transform: translateX(-6px);
    }

    .dashboard-topbar {
        padding: 0.66rem 0.45rem;
        justify-content: space-between;
        width: 100%;
        max-width: 100%;
        margin: 0;
        box-sizing: border-box;
    }

    .topbar-user-btn {
        min-width: 0;
        width: auto;
        min-height: 36px;
        min-width: 42px;
        justify-content: center;
        padding-left: 0.42rem;
        padding-right: 0.42rem;
    }

    .desktop-user-name,
    .user-chevron {
        display: none;
    }

    .topbar-user-btn .user-avatar {
        flex: 0 0 auto;
    }

    .desktop-user-menu {
        display: grid;
    }

    .admin-mobile-dropdown {
        position: absolute;
        right: 0.4rem;
        left: auto;
        top: calc(100% + 0.45rem);
        width: min(290px, calc(100vw - 1.2rem));
        max-width: calc(100vw - 1.2rem);
        display: block;
        background: rgba(13, 23, 41, 0.98);
        border: 1px solid rgba(3, 169, 244, 0.18);
        border-radius: 1rem;
        padding: 0;
        box-shadow: 0 20px 44px rgba(1, 10, 20, 0.52), 0 6px 18px rgba(1, 10, 20, 0.35);
        z-index: 45;
        box-sizing: border-box;
        overflow-x: hidden;
        overflow-y: auto;
        max-height: min(65vh, 420px);
        overscroll-behavior: contain;
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
        transform-origin: top right;
        pointer-events: none;
        transition: opacity 0.2s ease, transform 0.2s ease;
    }

    .dashboard-content {
        grid-template-columns: 1fr;
        padding: 0.85rem;
    }

    .apartments-hero,
    .sites-hero {
        flex-direction: column;
        align-items: stretch;
        gap: 0.7rem;
    }

    .apartments-hero > div,
    .sites-hero > div {
        min-width: 0;
    }

    .apartments-hero-actions,
    .sites-hero-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .apartments-search-wrap,
    .sites-search-wrap {
        width: 100%;
    }

    .apartments-hero-add-btn,
    .sites-hero-add-btn {
        width: 100%;
        min-width: 0;
        justify-content: center;
    }

    .apartments-actions,
    .sites-actions {
        flex-wrap: nowrap;
        gap: 0.34rem;
    }

    .apartments-name-cell,
    .sites-name-cell {
        font-size: 0.78rem;
        font-weight: 600;
        letter-spacing: 0.01em;
        color: #60758d;
    }

    .apartments-name-main,
    .sites-name-main {
        font-size: 0.78rem;
    }

    body.theme-light .apartments-name-cell,
    body.theme-light .sites-name-cell {
        color: #5f7388;
    }

    .apartments-col-city,
    .apartments-col-district,
    .apartments-col-manager,
    .users-col-no,
    .users-col-phone,
    .users-col-mail,
    .sites-col-city,
    .sites-col-district,
    .sites-col-status,
    .sites-col-manager {
        display: none;
    }

    .apartments-col-no,
    .apartments-no-cell {
        display: none;
    }

    .btn-phone {
        display: inline-flex;
    }

    .apartment-edit-modal {
        padding: 0.7rem;
    }

    .apartment-edit-modal__dialog {
        max-height: 92vh;
        overflow: visible;
    }

    .apartment-edit-modal__grid {
        grid-template-columns: 1fr;
    }

    .apartment-edit-modal__field--half {
        grid-column: 1 / -1;
    }
}
