:root {
    --receipt-logo-brand-filter: invert(61%) sepia(89%) saturate(1887%) hue-rotate(165deg) brightness(101%) contrast(97%);
    --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;
}

@media (max-width: 680px) {
    .receipt-modal-actions {
        justify-content: center;
    }
}

body.modal-open {
    overflow: hidden;
}

.apartment-edit-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.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,
.apartment-edit-modal__footer {
    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__footer {
    border-bottom: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 0 0 1.1rem 1.1rem;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.86rem 1.1rem 1rem;
}

.receipt-modal-actions {
    justify-content: center;
    flex-wrap: wrap;
}

.receipt-share-card {
    width: min(100%, 680px);
    margin: 0 auto;
}

.receipt-share-head {
    display: flex;
    flex-direction: column;
    gap: 0.22rem;
}

.receipt-share-title {
    margin: 0;
    font-size: 1.1rem;
}

.receipt-share-subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.receipt-share-line {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.4rem 0;
    border-bottom: 1px dashed rgba(148, 163, 184, 0.24);
}

.receipt-share-line span {
    color: var(--muted);
}

.receipt-share-line strong {
    color: var(--text);
}

.receipt-share-note {
    margin-top: 0.8rem;
}

.receipt-share-note span {
    color: var(--muted);
    font-size: 0.82rem;
}

.receipt-share-note p {
    margin: 0.35rem 0 0;
    padding: 0.55rem 0.65rem;
    border-radius: 0.62rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(148, 163, 184, 0.08);
    color: var(--text);
}

.receipt-share-actions {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: center;
}

.receipt-share-actions--single {
    flex-direction: column;
    align-items: stretch;
    max-width: 18rem;
    margin-left: auto;
    margin-right: auto;
}

.receipt-share-actions--single .sites-hero-add-btn {
    width: 100%;
    justify-content: center;
}

@media print {
    @page {
        size: auto;
        margin: 8mm;
    }

    body {
        background: #ffffff !important;
    }

    main.container {
        max-width: none !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .receipt-share-actions {
        display: none !important;
    }

    .receipt-brand-logo-wrap {
        border-color: #d4e3ef !important;
        background: #ffffff !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .receipt-brand-logo {
        filter: var(--receipt-logo-brand-filter) !important;
        opacity: 0.96;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .receipt-brand-title {
        color: #114067 !important;
    }

    .receipt-modal-body {
        background: #ffffff !important;
        border-top-color: #d4e3ef !important;
        border-bottom-color: #d4e3ef !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .receipt-line span {
        color: #5e738c !important;
    }

    .receipt-line strong {
        color: #122840 !important;
    }

    .receipt-brand-sub {
        color: #7e99b3 !important;
    }
}

.swal-share-popup {
    border-radius: 1rem !important;
    border: 1px solid rgba(3, 169, 244, 0.22) !important;
    background: linear-gradient(165deg, rgba(15, 25, 43, 0.98), rgba(10, 18, 32, 0.98)) !important;
}

.swal-share-popup .swal2-title {
    color: #eaf3ff !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em;
}

.swal-share-popup .swal2-close {
    color: rgba(180, 204, 225, 0.9) !important;
}

.swal-share-popup .swal2-close:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(3, 169, 244, 0.45);
    border-radius: 0.45rem;
}

.swal-share-popup .swal2-close:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

.share-popup-actions {
    display: grid;
    gap: 0.5rem;
}

.share-popup-btn {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 0.72rem;
    padding: 0.56rem 0.68rem;
    background: rgba(148, 163, 184, 0.1);
    color: #dbeafe;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

.share-popup-btn--ghost:hover {
    background: rgba(148, 163, 184, 0.18);
}

.share-popup-btn--primary {
    border-color: rgba(3, 169, 244, 0.46);
    background: rgba(3, 169, 244, 0.22);
    color: #eaf8ff;
}

.share-popup-btn--primary:hover {
    background: rgba(3, 169, 244, 0.3);
}

.share-popup-url-wrap {
    position: relative;
    width: 100%;
}

.share-popup-url-input {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 0.72rem;
    background: rgba(148, 163, 184, 0.08);
    color: #dbeafe;
    font-size: 0.74rem;
    padding: 0.56rem 2.1rem 0.56rem 0.68rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.share-popup-url-copy {
    position: absolute;
    top: 50%;
    right: 0.38rem;
    transform: translateY(-50%);
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(148, 163, 184, 0.34);
    background: rgba(148, 163, 184, 0.14);
    color: #e1effc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}

.share-popup-url-copy:hover {
    background: rgba(3, 169, 244, 0.24);
    border-color: rgba(3, 169, 244, 0.48);
}

.share-popup-url-copy:active {
    transform: translateY(-50%) scale(0.96);
}

.share-popup-url-copy:focus-visible {
    outline: 2px solid rgba(3, 169, 244, 0.65);
    outline-offset: 1px;
}

body.theme-light .swal-share-popup,
html.theme-light-preload .swal-share-popup {
    border-color: #cde3f3 !important;
    background: linear-gradient(165deg, #ffffff, #f4f9ff) !important;
}

body.theme-light .swal-share-popup .swal2-title,
html.theme-light-preload .swal-share-popup .swal2-title {
    color: #122235 !important;
}

body.theme-light .swal-share-popup .swal2-close,
html.theme-light-preload .swal-share-popup .swal2-close {
    color: #4f6780 !important;
}

body.theme-light .swal-share-popup .swal2-close:hover,
html.theme-light-preload .swal-share-popup .swal2-close:hover {
    color: #0c4a70 !important;
    background: rgba(3, 169, 244, 0.1) !important;
}

body.theme-light .share-popup-btn,
html.theme-light-preload .share-popup-btn {
    border-color: #d1e1ef;
    background: #f4f8fc;
    color: #3a5169;
}

body.theme-light .share-popup-btn--ghost:hover,
html.theme-light-preload .share-popup-btn--ghost:hover {
    background: #e9f2fa;
}

body.theme-light .share-popup-btn--primary,
html.theme-light-preload .share-popup-btn--primary {
    border-color: rgba(3, 169, 244, 0.36);
    background: rgba(3, 169, 244, 0.14);
    color: #0c6f9f;
}

body.theme-light .share-popup-url-input,
html.theme-light-preload .share-popup-url-input {
    border-color: #d1e1ef;
    background: #f4f8fc;
    color: #3a5169;
}

body.theme-light .share-popup-url-copy,
html.theme-light-preload .share-popup-url-copy {
    border-color: #c5d9ea;
    background: #e8f1f9;
    color: #3f5d78;
}

body.theme-light .share-popup-url-copy:hover,
html.theme-light-preload .share-popup-url-copy:hover {
    background: rgba(3, 169, 244, 0.16);
    border-color: rgba(3, 169, 244, 0.42);
}

.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__grid > .units-optional-wrap {
    grid-column: 1 / -1;
    margin-bottom: 0;
}

.apartment-edit-modal__subscriptions-fields {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
    gap: 0.58rem;
}

.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__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,
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);
}

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

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

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

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

body.theme-light .apartment-edit-modal__close:hover,
html.theme-light-preload .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,
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;
    font-size: 0.78rem;
    font-weight: 500;
}

body.theme-light .apartment-edit-modal__grid,
html.theme-light-preload .apartment-edit-modal__grid {
    background: #ffffff;
}

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

body.theme-light .apartment-edit-modal__grid .auth-input::placeholder,
html.theme-light-preload .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,
html.theme-light-preload .apartment-edit-modal__grid .auth-input:focus,
html.theme-light-preload .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,
html.theme-light-preload .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,
html.theme-light-preload .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,
html.theme-light-preload .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,
html.theme-light-preload .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,
html.theme-light-preload .apartment-edit-modal__footer {
    background: #eef5fc;
}

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

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

body.theme-light .apartment-edit-modal[data-user-edit-modal="true"] .apartment-edit-modal__dialog,
html.theme-light-preload .apartment-edit-modal[data-user-edit-modal="true"] .apartment-edit-modal__dialog {
    background: linear-gradient(170deg, #ffffff, #f6fbff);
}

body.theme-light .apartment-edit-modal[data-user-edit-modal="true"] .apartment-edit-modal__grid,
html.theme-light-preload .apartment-edit-modal[data-user-edit-modal="true"] .apartment-edit-modal__grid {
    background: #ffffff;
}

body.theme-light .apartment-edit-modal[data-user-edit-modal="true"] .apartment-edit-modal__grid .auth-input,
body.theme-light .apartment-edit-modal[data-user-edit-modal="true"] .apartment-edit-modal__grid .custom-select-trigger,
html.theme-light-preload .apartment-edit-modal[data-user-edit-modal="true"] .apartment-edit-modal__grid .auth-input,
html.theme-light-preload .apartment-edit-modal[data-user-edit-modal="true"] .apartment-edit-modal__grid .custom-select-trigger {
    background: #ffffff;
    border-color: #c9deef;
    color: #3e5469;
}

body.theme-light .apartment-edit-modal[data-user-edit-modal="true"] .apartment-edit-modal__label,
html.theme-light-preload .apartment-edit-modal[data-user-edit-modal="true"] .apartment-edit-modal__label {
    color: #627a92;
}

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);
}

.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);
}

.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #e6f0fb;
    box-shadow: 0 0 0 1000px #0d1729 inset !important;
    transition: background-color 9999s ease-in-out 0s;
    border: 1px solid #30435f;
}

/* Tailwind CDN preflight strips native date UI; restore picker */
.auth-input-du-date[type='date'],
.auth-input-du-date[type='month'],
.auth-input-du-date[type='datetime-local'] {
    -webkit-appearance: auto;
    appearance: auto;
    min-block-size: 2.625rem;
    color-scheme: dark;
    padding-inline-end: 0.65rem;
}

body.theme-light .auth-input-du-date[type='date'],
body.theme-light .auth-input-du-date[type='month'],
body.theme-light .auth-input-du-date[type='datetime-local'] {
    color-scheme: light;
}

.auth-input-du-date[type='date']::-webkit-calendar-picker-indicator,
.auth-input-du-date[type='month']::-webkit-calendar-picker-indicator {
    opacity: 0.92;
    cursor: pointer;
    padding-inline: 0.2rem;
}

.auth-input-du-no-spin[type='number'] {
    -moz-appearance: textfield;
}

.auth-input-du-no-spin[type='number']::-webkit-outer-spin-button,
.auth-input-du-no-spin[type='number']::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

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

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

.auth-select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    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;
}

.auth-select option {
    background: #0d1729;
    color: #e6f0fb;
}

.auth-select option:disabled {
    color: #7f98b6;
}

body.theme-light .auth-select option {
    background: #ffffff;
    color: #152235;
}

body.theme-light .auth-input:-webkit-autofill,
body.theme-light .auth-input:-webkit-autofill:hover,
body.theme-light .auth-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #1f3347;
    box-shadow: 0 0 0 1000px #ffffff inset !important;
    border: 1px solid rgba(3, 169, 244, 0.24);
}

.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);
}

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

.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.55rem;
    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;
    margin-right: 0.18rem;
}

.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,
html.theme-light-preload .email-suggest {
    background: var(--surface);
    border-color: var(--primary-border);
    box-shadow: 0 10px 28px rgba(15, 58, 90, 0.14);
}

body.theme-light .email-suggest-item,
html.theme-light-preload .email-suggest-item {
    color: var(--text);
    border-bottom-color: rgba(3, 169, 244, 0.16);
}

body.theme-light .email-suggest-item:hover,
html.theme-light-preload .email-suggest-item:hover {
    background: var(--primary-soft);
    color: var(--text);
}

body.theme-light .email-suggest-item strong,
html.theme-light-preload .email-suggest-item strong {
    color: var(--primary);
    font-weight: 600;
}

body.theme-light .email-suggest-icon,
html.theme-light-preload .email-suggest-icon {
    color: var(--primary);
    opacity: 1;
}

.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;
    width: 100%;
    max-width: none;
    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-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, transform 0.28s ease, opacity 0.22s 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;
    width: 100%;
    min-width: 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;
    width: 100%;
    min-width: 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;
}

/* Desktop: tema | bildirim | kullanıcı */
.topbar-user-dropdown .desktop-theme-toggle {
    order: 1;
}

.topbar-user-dropdown .topbar-notification-btn {
    order: 2;
}

.topbar-user-dropdown .topbar-user-btn {
    order: 3;
}

.topbar-notification-btn {
    position: relative;
}

.topbar-notification-badge {
    position: absolute;
    top: 1px;
    right: 1px;
    min-width: 15px;
    height: 15px;
    padding: 0 4px;
    border-radius: 999px;
    background: #f43f5e;
    color: #ffffff;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 15px;
    text-align: center;
    pointer-events: none;
    box-shadow: 0 0 0 1px rgba(13, 23, 41, 0.45);
}

body.theme-light .topbar-notification-badge {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.75);
}

.topbar-notification-dropdown {
    position: absolute;
    top: calc(100% + 0.42rem);
    right: 0;
    width: min(320px, calc(100vw - 2.4rem));
    border-radius: 0.92rem;
    border: 1px solid rgba(3, 169, 244, 0.22);
    background: rgba(13, 23, 41, 0.98);
    box-shadow: 0 22px 48px rgba(1, 10, 20, 0.55), 0 10px 20px rgba(1, 10, 20, 0.28);
    z-index: 80;
    display: none;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.topbar-notification-dropdown.is-open {
    display: block;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.topbar-notification-dropdown__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.68rem 0.92rem;
    border-bottom: 1px solid rgba(3, 169, 244, 0.18);
    font-size: 0.81rem;
    font-weight: 700;
    color: #eaf4ff;
}

.topbar-notification-dropdown__count {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary);
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: rgba(3, 169, 244, 0.14);
}

.topbar-notification-dropdown__body {
    padding: 0.85rem 0.92rem;
    max-height: min(260px, 52vh);
    overflow-y: auto;
}

.topbar-notification-dropdown__empty,
.topbar-notification-dropdown__hint {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.46;
    color: #9fb0c8;
}

.topbar-notification-btn--has-notes:focus-visible {
    outline-offset: 2px;
}

body.theme-light .topbar-notification-dropdown {
    background: #ffffff;
    border-color: rgba(3, 169, 244, 0.2);
    box-shadow: 0 22px 40px rgba(24, 60, 112, 0.18);
}

body.theme-light .topbar-notification-dropdown__head {
    color: #152235;
    border-bottom-color: rgba(3, 169, 244, 0.14);
}

body.theme-light .topbar-notification-dropdown__empty,
body.theme-light .topbar-notification-dropdown__hint {
    color: #5f738d;
}

.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);
}

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

.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-content--units-page {
    align-content: start;
}

@media (max-width: 820px) {
    .dashboard-content.dashboard-content--units-page {
        padding-left: 0;
        padding-right: 0;
        padding-top: 0;
        padding-bottom: 1rem;
        gap: 0.62rem;
    }

    .dashboard-content--units-page > *:not(.units-period-banner--page-slot) {
        margin-left: 0.85rem;
        margin-right: 0.85rem;
    }
}

@media (min-width: 821px) {
    .dashboard-content.dashboard-content--units-page {
        padding: 1rem;
    }
}

.dashboard-hero.units-page-hero-desktop {
    display: none;
}

.units-period-banner--embedded {
    display: none;
}

@media (min-width: 768px) {
    .dashboard-hero.units-page-hero-desktop {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.8rem;
    }

    .units-period-banner--page-slot {
        display: none !important;
    }

    .units-period-banner--embedded {
        display: block !important;
    }
}

.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;
}

.panel-hero-modern {
    padding: 0.95rem 1rem;
    background: linear-gradient(155deg, rgba(16, 30, 52, 0.95), rgba(10, 21, 38, 0.95));
    border: 1px solid rgba(3, 169, 244, 0.22);
    box-shadow: 0 12px 26px rgba(2, 10, 24, 0.28);
    border-radius: 0.78rem;
    position: relative;
}

.panel-hero-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
}

.panel-hero-date {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.18rem 0.52rem;
    border-radius: 0.62rem;
    border: 1px solid var(--primary-border);
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 600;
}

.panel-hero-welcome {
    margin-top: 0.34rem;
    font-size: 0.86rem;
    color: #dbe7f5;
    font-weight: 600;
}

.panel-hero-role {
    margin: 0.44rem 0 0;
    display: inline-flex;
    align-items: center;
    gap: 0.36rem;
    color: #bfe7fb;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 0.22rem 0.56rem;
    border-radius: 0.6rem;
    border: 1px solid rgba(3, 169, 244, 0.32);
    background: rgba(3, 169, 244, 0.12);
}

.panel-hero-meta {
    display: flex;
    align-items: center;
    gap: 0.46rem;
    flex-wrap: wrap;
}

.panel-hero-mode {
    margin-top: 0.46rem;
    display: flex;
    align-items: center;
    gap: 0.38rem;
    color: var(--muted);
    font-size: 0.78rem;
    width: 100%;
}

.panel-hero-contact-list {
    margin-top: 0.52rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.46rem;
}

.panel-hero-contact-item {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    padding: 0.24rem 0.56rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(148, 163, 184, 0.1);
    color: #c7d9eb;
    font-size: 0.74rem;
    font-weight: 500;
}

.panel-hero-contact-item i {
    color: var(--primary);
    font-size: 0.72rem;
}

.panel-mobile-header {
    display: none;
}

@media (max-width: 820px) {
    .panel-mobile-header {
        display: block;
        margin: 0 0 0.2rem;
        padding: 0.88rem 0.82rem 0.74rem;
        border-radius: 0 0 0.88rem 0.88rem;
        border: 1px solid rgba(3, 169, 244, 0.25);
        background: linear-gradient(145deg, rgba(18, 92, 226, 0.9), rgba(3, 169, 244, 0.9));
        box-shadow: 0 12px 28px rgba(2, 19, 45, 0.3);
    }

    .panel-mobile-header__top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.6rem;
    }

    .panel-mobile-header__mode-badge {
        display: inline-flex;
        align-items: center;
        gap: 0.3rem;
        padding: 0.2rem 0.52rem;
        border-radius: 999px;
        border: 1px solid rgba(232, 245, 255, 0.34);
        background: rgba(231, 244, 255, 0.16);
        color: rgba(241, 248, 255, 0.96);
        font-size: 0.66rem;
        font-weight: 600;
    }

    .panel-mobile-header__date {
        color: rgba(227, 241, 255, 0.92);
        font-size: 0.68rem;
        font-weight: 600;
    }

    .panel-mobile-header__welcome {
        margin: 0.42rem 0 0;
        color: rgba(226, 241, 255, 0.88);
        font-size: 0.76rem;
        text-align: center;
    }

    .panel-mobile-header__name {
        margin: 0.12rem 0 0;
        color: #ffffff;
        font-size: 1.2rem;
        font-weight: 700;
        letter-spacing: 0.01em;
        text-align: center;
    }

    .panel-mobile-header__badges {
        margin-top: 0.52rem;
        display: flex;
        justify-content: center;
        gap: 0.42rem;
    }

    .panel-mobile-header__badge {
        display: inline-flex;
        align-items: center;
        gap: 0.28rem;
        padding: 0.2rem 0.5rem;
        border-radius: 999px;
        border: 1px solid rgba(232, 245, 255, 0.34);
        background: rgba(231, 244, 255, 0.16);
        color: #f5fbff;
        font-size: 0.68rem;
        font-weight: 600;
    }

    .panel-mobile-header__stats-row {
        margin-top: 0.62rem;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    /* Swiper slides use flex row; force label above value */
    .panel-mobile-header__stat {
        position: relative;
        border-radius: 0.62rem;
        border: 1px solid rgba(231, 244, 255, 0.28);
        background: rgba(231, 244, 255, 0.12);
        padding: 0.72rem 0.5rem 0.74rem;
        padding-top: 0.92rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.42rem;
        text-align: center;
        min-height: 76px;
    }

    .panel-mobile-header__stat-link {
        position: absolute;
        top: 0.42rem;
        right: 0.42rem;
        z-index: 1;
        width: 1.75rem;
        height: 1.75rem;
        border-radius: 0.42rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        border: 1px solid rgba(255, 255, 255, 0.42);
        background: rgba(255, 255, 255, 0.18);
        color: rgba(255, 255, 255, 0.98);
        text-decoration: none;
        transition: background 0.18s ease, border-color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
    }

    .panel-mobile-header__stat-link:hover {
        background: rgba(255, 255, 255, 0.28);
        border-color: rgba(255, 255, 255, 0.55);
    }

    .panel-mobile-header__stat-link:active {
        transform: scale(0.96);
    }

    .panel-mobile-header__stat-link:focus-visible {
        outline: 2px solid #ffffff;
        outline-offset: 2px;
    }

    .panel-mobile-header__stat-link-icon {
        font-size: 0.62rem;
        line-height: 1;
        opacity: 0.92;
        margin-left: 0.06rem;
    }

    .panel-mobile-header__stat-link[aria-current="page"] {
        opacity: 0.7;
    }

    .panel-mobile-header__stat-body {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.45rem;
    }

    .panel-mobile-header__stat-icon {
        font-size: 1rem;
        color: rgba(232, 245, 255, 0.95);
        line-height: 1;
        opacity: 0.92;
    }

    .panel-mobile-header__stat-label {
        display: block;
        color: rgba(227, 241, 255, 0.88);
        font-size: 0.62rem;
        line-height: 1.2;
    }

    .panel-mobile-header__stat-value {
        display: block;
        color: #ffffff;
        font-size: 1.05rem;
        font-weight: 700;
        line-height: 1.15;
    }

    .panel-hero-modern {
        display: none;
    }
}

body.theme-light .panel-mobile-header,
html.theme-light-preload .panel-mobile-header {
    border-color: rgba(3, 169, 244, 0.28);
    background: linear-gradient(145deg, #2b7be8, #03a9f4);
    box-shadow: 0 12px 24px rgba(24, 60, 112, 0.2);
}

body.theme-light .panel-mobile-header__mode-badge,
html.theme-light-preload .panel-mobile-header__mode-badge {
    border-color: rgba(231, 244, 255, 0.48);
    background: rgba(231, 244, 255, 0.2);
}

body.theme-light .panel-hero-welcome {
    color: #2f4157;
}

body.theme-light .panel-hero-modern,
html.theme-light-preload .panel-hero-modern {
    background: linear-gradient(160deg, #f7fbff, #eef6fc);
    border-color: #c9deee;
    box-shadow: 0 12px 24px rgba(15, 35, 56, 0.12);
}

body.theme-light .panel-hero-role,
html.theme-light-preload .panel-hero-role {
    color: #0e6a9a;
    border-color: rgba(3, 169, 244, 0.28);
    background: rgba(3, 169, 244, 0.11);
}

body.theme-light .panel-hero-contact-item,
html.theme-light-preload .panel-hero-contact-item {
    border-color: #d2e2ef;
    background: #f5f9fd;
    color: #516b85;
}

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

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

.apartment-metric-card {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    grid-column: 1 / -1;
    padding: 0.85rem 1rem;
}

.apartment-metric-icon {
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: var(--primary-soft);
    border: 1px solid var(--primary-border);
}

.apartment-metric-label {
    margin: 0;
    color: var(--muted);
    font-size: 0.74rem;
}

.apartment-metric-value {
    margin: 0.12rem 0 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.apartments-search-wrap {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 210px;
    padding: 0.45rem 0.7rem;
    border-radius: 0.8rem;
    border: 1px solid var(--primary-border);
    background: var(--panel);
}

.apartments-search-icon {
    color: var(--muted);
    font-size: 0.75rem;
}

.apartments-search-input {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 0.82rem;
    outline: none;
}

.units-pay-filter-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.42rem;
    margin: 0 0 0.82rem;
    grid-column: 1 / -1;
}

.units-pay-filter-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.38rem 0.76rem;
    border-radius: 999px;
    font-size: 0.73rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1px solid rgba(148, 163, 184, 0.32);
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.units-pay-filter-pill:hover {
    border-color: rgba(3, 169, 244, 0.42);
    color: var(--text);
}

.units-pay-filter-pill:focus-visible {
    outline: 2px solid rgba(3, 169, 244, 0.55);
    outline-offset: 2px;
}

.units-pay-filter-pill.is-active {
    border-color: var(--primary-border);
    background: var(--primary-soft);
    color: var(--primary);
    box-shadow: 0 0 0 1px rgba(3, 169, 244, 0.12);
}

body.theme-light .units-pay-filter-pill {
    border-color: #d7e6f3;
    background: #fafcfe;
    color: #5f738d;
}

body.theme-light .units-pay-filter-pill:hover {
    border-color: rgba(3, 169, 244, 0.4);
    color: #3e5469;
}

body.theme-light .units-pay-filter-pill.is-active {
    border-color: var(--primary-border);
    background: rgba(3, 169, 244, 0.1);
    color: var(--primary);
}

/* Daireler: genis ekranda tablo, mobilde kart. Ayni div .units-list-mobile.unit-pay-cards-root;
   .unit-pay-cards-root tek basina olmasin: sonra gelen display:grid, display:none ezerdi. */
.units-list-desktop {
    display: none;
}

.units-list-mobile.unit-pay-cards-root {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.72rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

@media (min-width: 821px) {
    .units-list-desktop {
        display: block !important;
    }

    .units-list-mobile.unit-pay-cards-root {
        display: none !important;
    }
}

@media (min-width: 620px) and (max-width: 820px) {
    .units-list-mobile.unit-pay-cards-root {
        grid-template-columns: repeat(auto-fill, minmax(304px, 1fr));
        gap: 0.82rem;
    }

    .units-list-mobile.unit-pay-cards-root.unit-pay-cards-root--modern {
        gap: 0.78rem;
    }
}

.unit-pay-card {
    --card-radius: 0.92rem;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 124px;
    border-radius: var(--card-radius);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(2, 19, 45, 0.14);
}

body.theme-light .unit-pay-card {
    background: #ffffff;
    border-color: #d9e8f5;
    box-shadow: 0 10px 28px rgba(15, 52, 90, 0.08);
}

/* Daireler mobil liste — modern kutular (accent cubuk + satir yapisi) */
.units-list-mobile.unit-pay-cards-root.unit-pay-cards-root--modern {
    gap: 0.76rem;
}

.unit-pay-card.unit-pay-card--modern {
    --card-radius: 14px;
    min-height: 0;
    flex-direction: row;
    align-items: stretch;
    border-radius: var(--card-radius);
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 6px 20px rgba(2, 19, 45, 0.12);
}

body.theme-light .unit-pay-card.unit-pay-card--modern {
    background: linear-gradient(180deg, #ffffff 0%, #fafcfe 98%);
    border-color: rgba(215, 230, 245, 0.92);
    box-shadow: 0 10px 28px rgba(15, 52, 90, 0.085);
}

.unit-pay-card--modern .unit-pay-card__accent {
    flex: 0 0 5px;
    width: 5px;
    align-self: stretch;
    margin: 0;
    padding: 0;
    border-radius: 0;
}

.unit-pay-card--modern[data-pay-stripe='paid'] .unit-pay-card__accent {
    background: linear-gradient(180deg, #4ade80 0%, #22c55e 48%, #16a34a 100%);
}

.unit-pay-card--modern[data-pay-stripe='pending'] .unit-pay-card__accent {
    background: linear-gradient(180deg, #fb923c 0%, #ea580c 100%);
}

.unit-pay-card--modern[data-pay-stripe='overdue'] .unit-pay-card__accent {
    background: linear-gradient(180deg, #f97373 0%, #dc2626 96%);
}

.unit-pay-card--modern[data-pay-stripe='none'] .unit-pay-card__accent {
    background: linear-gradient(180deg, #94a3b8 0%, #64748b 100%);
}

.unit-pay-card__body.unit-pay-card__body--modern {
    flex: 1;
    min-width: 0;
    padding: 0.74rem 0.74rem 0.66rem;
    display: flex;
    flex-direction: column;
    gap: 0.58rem;
}

.unit-pay-card__modern-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.unit-pay-card__modern-resident {
    display: flex;
    align-items: flex-start;
    gap: 0.62rem;
}

.unit-pay-card--modern .unit-pay-card__avatar {
    flex: 0 0 auto;
    width: 2.55rem;
    height: 2.55rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    background: rgba(3, 169, 244, 0.12);
    border: 1px solid rgba(3, 169, 244, 0.28);
    color: var(--primary);
}

body.theme-light .unit-pay-card--modern .unit-pay-card__avatar {
    background: rgba(3, 169, 244, 0.1);
    border-color: rgba(3, 169, 244, 0.24);
}

.unit-pay-card__resident-core {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.26rem;
}

.unit-pay-card__name-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.38rem;
}

.unit-pay-card__person-name {
    font-size: 0.87rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.01em;
}

body.theme-light .unit-pay-card__person-name {
    color: #152235;
}

.unit-pay-card__phone {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.71rem;
    color: rgba(226, 232, 240, 0.75);
}

body.theme-light .unit-pay-card__phone {
    color: rgba(21, 34, 53, 0.48);
}

.unit-pay-card__phone .fa-solid {
    color: rgba(3, 169, 244, 0.78);
}

.unit-pay-card__phone--muted {
    font-style: italic;
    opacity: 0.76;
}

.unit-pay-card__modern-amount {
    flex-shrink: 0;
    margin-left: auto;
    align-self: flex-start;
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--text);
    line-height: 1.1;
}

.unit-pay-card__modern-curr {
    font-size: 0.74rem;
    font-weight: 700;
    margin-left: 0.12rem;
    opacity: 0.92;
}

.unit-pay-card__meta-note {
    margin: 0;
    padding: 0;
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0.025em;
}

.unit-pay-card__modern-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.42rem;
    row-gap: 0.52rem;
    margin-top: 0.1rem;
}

.unit-pay-card__btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.08rem;
    padding: 0 0.9rem;
    border-radius: 0.72rem;
    border: none;
    background: var(--primary);
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.045em;
    cursor: pointer;
    transition:
        background 0.16s ease,
        filter 0.14s ease,
        transform 0.14s ease;
}

.unit-pay-card__btn-primary:hover {
    background: var(--primary-hover);
}

.unit-pay-card__btn-primary:active {
    filter: brightness(0.94);
}

.unit-pay-card__btn-primary:focus-visible {
    outline: 2px solid rgba(3, 169, 244, 0.55);
    outline-offset: 2px;
}

.unit-pay-card__btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.32rem;
    min-height: 2.08rem;
    padding: 0 0.74rem;
    border-radius: 0.72rem;
    border: 1px solid rgba(3, 169, 244, 0.45);
    background: transparent;
    color: var(--primary);
    font-size: 0.74rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition:
        border-color 0.16s ease,
        background 0.16s ease,
        color 0.14s ease;
}

.unit-pay-card__btn-outline:hover {
    border-color: var(--primary-border);
    background: rgba(3, 169, 244, 0.08);
}

.unit-pay-card__btn-outline:focus-visible {
    outline: 2px solid rgba(3, 169, 244, 0.55);
    outline-offset: 2px;
}

body.theme-light .unit-pay-card__btn-outline {
    border-color: rgba(13, 123, 179, 0.35);
    color: #0d7bb3;
}

.unit-pay-card__icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 0.7rem;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition:
        border-color 0.16s ease,
        color 0.14s ease,
        background 0.14s ease;
}

.unit-pay-card__icon-btn:hover {
    border-color: rgba(3, 169, 244, 0.45);
    color: var(--primary);
}

.unit-pay-card__icon-btn:focus-visible {
    outline: 2px solid rgba(3, 169, 244, 0.55);
    outline-offset: 2px;
}

.unit-pay-card__icon-btn--del:hover {
    border-color: rgba(239, 68, 68, 0.5);
    color: #f87171;
}

.unit-pay-card__progress-track {
    height: 4px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    overflow: hidden;
}

.unit-pay-card__progress-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    transition: width 0.3s ease;
}

.unit-pay-card__progress-fill--paid {
    background: linear-gradient(90deg, #22c55e, #15803d);
}

.unit-pay-card__progress-fill--pending {
    background: linear-gradient(90deg, #fb923c, #ea580c);
}

.unit-pay-card__progress-fill--overdue {
    background: linear-gradient(90deg, #f87171, #991b1b);
}

.unit-pay-card__progress-fill--none {
    background: rgba(148, 163, 184, 0.4);
}

.unit-pay-card__side-index {
    flex: 0 0 auto;
    align-self: center;
    padding: 0.35rem 0 0.35rem 0.62rem;
}

.unit-pay-card__idx-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.18rem;
    min-width: 2.65rem;
    padding: 0.36rem 0.62rem;
    border-radius: 8px;
    border: 1px solid rgba(3, 169, 244, 0.28);
    background: rgba(3, 169, 244, 0.12);
    color: var(--primary);
}

.unit-pay-card__idx-icon {
    display: block;
    font-size: 0.62rem;
    line-height: 1;
    opacity: 0.92;
}

.unit-pay-card__idx-num {
    font-size: 0.76rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    line-height: 1;
}

body.theme-light .unit-pay-card__idx-badge {
    background: rgba(3, 169, 244, 0.1);
    border-color: rgba(3, 169, 244, 0.24);
    color: #0d7bb3;
}

.unit-pay-card__body {
    flex: 1;
    min-width: 0;
    padding: 0.68rem 0.52rem 0.52rem 0.52rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.unit-pay-card__topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.unit-pay-card__title {
    margin: 0;
    max-width: 100%;
    min-width: 0;
    line-height: 1.25;
}

.unit-pay-card__title-label {
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--text);
    display: block;
    min-width: 0;
    word-break: break-word;
}

body.theme-light .unit-pay-card__title-label {
    color: #152235;
}

.unit-pay-card__pill {
    display: inline-flex;
    align-items: center;
    gap: 0.26rem;
    padding: 0.12rem 0.42rem;
    border-radius: 999px;
    font-size: 0.58rem;
    font-weight: 700;
    white-space: nowrap;
}

.unit-pay-card__pill--due {
    background: linear-gradient(145deg, #f87171 0%, #dc2626 48%, #b91c1c 100%);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.28);
}

body.theme-light .unit-pay-card__pill--due {
    background: linear-gradient(145deg, #fb7185 0%, #ef4444 45%, #dc2626 100%);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.32);
}

.unit-pay-card__pill--ok {
    background: linear-gradient(145deg, #4ade80 0%, #22c55e 48%, #15803d 100%);
    border: 1px solid rgba(255, 255, 255, 0.26);
    color: #f0fdf4;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.28);
}

body.theme-light .unit-pay-card__pill--ok {
    background: linear-gradient(145deg, #6ee7b7 0%, #34d399 42%, #16a34a 100%);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
    box-shadow: 0 2px 10px rgba(22, 163, 74, 0.3);
}

.unit-pay-card__pill--none {
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: var(--muted);
}

.unit-pay-card__people {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.unit-pay-card__chip {
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    border: 1px solid var(--primary-border);
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 0.72rem;
}

.unit-pay-card__chip--vacant {
    gap: 0.35rem;
    width: auto !important;
    height: auto !important;
    padding: 0.28rem 0.55rem 0.3rem;
    background: rgba(148, 163, 184, 0.09);
    border-color: rgba(148, 163, 184, 0.35);
    color: var(--muted);
    font-size: 0.66rem;
}

body.theme-light .unit-pay-card__chip--vacant {
    background: rgba(15, 34, 53, 0.04);
    border-color: rgba(15, 34, 53, 0.1);
}

.unit-pay-card__chip--vacant i {
    opacity: 0.82;
    font-size: 0.74rem;
}

.unit-pay-card__chip-role {
    font-weight: 600;
    letter-spacing: 0.04em;
}

.unit-pay-card__chip--filled {
    gap: 0.35rem;
    width: auto !important;
    height: auto !important;
    max-width: 100%;
    padding: 0.26rem 0.45rem;
    min-height: 2.15rem;
}

.unit-pay-card__chip-stack {
    display: flex;
    flex-direction: column;
    gap: 0.06rem;
    align-items: flex-start;
    min-width: 0;
}

.unit-pay-card__chip-name {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text);
    max-width: 148px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.unit-pay-card__chip-kind {
    font-size: 0.52rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.unit-pay-card__chip-kind--owner {
    text-transform: none;
    letter-spacing: 0.02em;
}

body.theme-light .unit-pay-card__chip-kind {
    color: rgba(21, 34, 53, 0.52);
}

.unit-pay-card__chip--muted {
    opacity: 0.52;
}

.unit-pay-card__dues-badge {
    margin-top: auto;
}

.unit-pay-card__dues-badge-inner {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.12rem;
    padding: 0.3rem 0.52rem;
    border-radius: 8px;
    border: 1px solid rgba(3, 169, 244, 0.22);
    background: rgba(3, 169, 244, 0.08);
}

.unit-pay-card__dues-badge-top {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
}

.unit-pay-card__dues-badge-top > .fa-solid {
    font-size: 0.76rem;
    color: var(--primary);
    opacity: 0.92;
}

.unit-pay-card__dues-badge-amount {
    font-size: 0.78rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.015em;
    color: var(--text);
}

.unit-pay-card__dues-badge-curr {
    font-weight: 700;
    opacity: 0.88;
}

.unit-pay-card__dues-badge-caption {
    font-size: 0.52rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--muted) 94%, transparent);
}

body.theme-light .unit-pay-card__dues-badge-inner {
    background: rgba(3, 169, 244, 0.07);
    border-color: rgba(3, 169, 244, 0.2);
}

.unit-pay-card__rail {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    flex: 0 0 3.2rem;
    min-width: 3.05rem;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    overflow: hidden;
    border-top-right-radius: calc(var(--card-radius) - 1px);
    border-bottom-right-radius: calc(var(--card-radius) - 1px);
}

body.theme-light .unit-pay-card__rail {
    border-left-color: rgba(3, 169, 244, 0.18);
}

.unit-pay-card__rail-seg {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0;
    padding: 0.26rem 0.2rem;
    border: 0;
    border-radius: 0;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    color: #ffffff;
    font-size: 0.52rem;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.18s ease, filter 0.16s ease, transform 0.12s ease;
}

.unit-pay-card__rail-seg + .unit-pay-card__rail-seg {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

body.theme-light .unit-pay-card__rail-seg + .unit-pay-card__rail-seg {
    border-top-color: rgba(255, 255, 255, 0.35);
}

.unit-pay-card__rail-seg--pay {
    background: var(--primary);
    border-top-right-radius: calc(var(--card-radius) - 1px);
}

.unit-pay-card__rail-seg--pay:hover {
    background: var(--primary-hover);
    filter: saturate(1.06);
}

.unit-pay-card__rail-seg--pay:active {
    filter: brightness(0.96);
}

.unit-pay-card__rail-seg--pay:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: -2px;
}

.unit-pay-card__rail-seg--edit {
    background: #0288d1;
}

.unit-pay-card__rail-seg--edit:hover {
    background: #0277bd;
    filter: saturate(1.04);
}

.unit-pay-card__rail-seg--edit:active {
    filter: brightness(0.96);
}

.unit-pay-card__rail-seg--edit:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: -2px;
}

.unit-pay-card__rail-seg--del {
    padding: 0;
    background: #b71c1c;
    border-bottom-right-radius: calc(var(--card-radius) - 1px);
}

.unit-pay-card__rail-seg--del:hover {
    background: #c62828;
    filter: saturate(1.05);
}

.unit-pay-card__rail-seg--del:active {
    filter: brightness(0.96);
}

.unit-pay-card__rail-delbtn {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0.26rem 0.2rem;
    border: 0;
    border-radius: 0;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    color: inherit;
    font: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    cursor: pointer;
    transition: inherit;
}

.unit-pay-card__rail-delbtn:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: -2px;
}

.unit-pay-card__rail-ic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 0.38rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.38);
    font-size: 0.72rem;
}

.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);
}

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

.apartments-add-card {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: -0.35rem;
    transition: max-height 0.34s ease, opacity 0.22s ease, margin-top 0.22s ease, padding 0.22s ease;
}

.apartments-add-card.is-open {
    max-height: 1200px;
    opacity: 1;
    padding-top: 1rem;
    padding-bottom: 1rem;
    margin-top: 0;
    overflow: visible;
}

.apartments-add-card .custom-select-wrap {
    position: relative;
}

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

.units-optional-wrap {
    border: 1px solid var(--border);
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

.units-optional-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.68rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.units-optional-toggle:hover {
    background: rgba(3, 169, 244, 0.08);
}

.units-optional-caret {
    transition: transform 0.2s ease;
    color: var(--muted);
}

.units-optional-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0 0.8rem;
    transition: max-height 0.24s ease, opacity 0.2s ease, padding 0.2s ease;
}

.units-optional-wrap.is-open .units-optional-content {
    max-height: 420px;
    opacity: 1;
    padding: 0 0.8rem 0.72rem;
}

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

.units-optional-note {
    margin: 0.2rem 0 0.9rem;
    color: var(--muted);
    font-size: 0.74rem;
}

@media (max-width: 680px) {
    .units-optional-note {
        text-align: center;
        margin-bottom: 1.05rem;
    }
}

body.theme-light .apartments-add-card .auth-input {
    border-color: #c9deef;
    background: #ffffff;
    color: #152235;
    box-shadow: 0 4px 14px rgba(15, 34, 60, 0.06);
}

body.theme-light .apartments-add-card .auth-input-with-toggle {
    background: #ffffff;
    color: #152235;
}

body.theme-light .apartments-add-card .auth-input::placeholder {
    color: #9aaec4;
}

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

body.theme-light .apartments-add-card .input-icon {
    color: #4c6178;
}

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

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

body.theme-light .units-optional-wrap {
    background: rgba(3, 169, 244, 0.04);
    border-color: #d7e6f3;
}

body.theme-light .units-optional-toggle:hover {
    background: rgba(3, 169, 244, 0.07);
}

body.theme-light .apartment-settings-card .auth-input {
    border-color: #c9deef;
    background: #ffffff;
    color: #152235;
    box-shadow: 0 4px 14px rgba(15, 34, 60, 0.06);
}

body.theme-light .apartment-settings-card .auth-input::placeholder {
    color: #9aaec4;
}

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

body.theme-light .apartment-settings-card .input-icon {
    color: #4c6178;
}

body.theme-light .apartment-settings-card .auth-input:disabled {
    background: #f3f7fb;
    color: #5f738d;
    border-color: #d6e3f0;
    box-shadow: none;
}

.apartments-search-empty {
    margin-top: 0.7rem;
    color: var(--muted);
    font-size: 0.82rem;
}

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

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

.expense-title-cell,
.expense-amount-cell,
.expense-date-cell {
    color: #afc5db;
    font-size: 0.79rem;
    font-weight: 600;
}

.user-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    border-radius: 999px;
    padding: 0.2rem 0.58rem;
    border: 1px solid transparent;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.01em;
    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);
}

.site-list-row.is-primary-manager-row {
    background: rgba(3, 169, 244, 0.08);
}

.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);
}

.user-role-badge.role-4 {
    background: rgba(168, 85, 247, 0.14);
    color: #ddd6fe;
    border-color: rgba(168, 85, 247, 0.32);
}

.user-role-badge.role-5 {
    background: rgba(251, 146, 60, 0.15);
    color: #fed7aa;
    border-color: rgba(251, 146, 60, 0.32);
}

.user-role-badge.role-6 {
    background: rgba(148, 163, 184, 0.12);
    color: #94a3b8;
    border-color: rgba(148, 163, 184, 0.28);
}

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

.firms-service-cell {
    vertical-align: top;
    word-break: break-word;
    max-width: 26rem;
}

.firms-col-name-plain.sites-name-main {
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.35;
}

.firms-contact-cell {
    vertical-align: middle;
    min-width: 0;
    max-width: 22rem;
}

.firms-contact-inline {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.42rem 0.65rem;
    min-width: 0;
}

.firms-contact-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    padding: 0.24rem 0.52rem;
    border-radius: 999px;
    border: 1px solid rgba(3, 169, 244, 0.28);
    background: rgba(3, 169, 244, 0.1);
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.28;
    color: var(--text);
    text-decoration: none;
    word-break: break-word;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease;
}

.firms-contact-badge:hover {
    background: rgba(3, 169, 244, 0.16);
    border-color: rgba(3, 169, 244, 0.45);
}

.firms-contact-badge:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.firms-contact-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.42rem;
    height: 1.42rem;
    border-radius: 999px;
    background: rgba(3, 169, 244, 0.14);
    border: 1px solid rgba(3, 169, 244, 0.32);
    font-size: 0.7rem;
    color: var(--primary);
}

.firms-contact-badge--mail .firms-contact-badge-icon i {
    font-size: 0.72rem;
}

.firms-contact-badge--phone.firms-contact-badge .fa-whatsapp {
    font-size: 0.76rem;
    color: #25d366;
}

body.theme-light .firms-contact-badge {
    background: rgba(3, 169, 244, 0.08);
    border-color: rgba(3, 169, 244, 0.24);
    color: #152235;
}

body.theme-light .firms-contact-badge:hover {
    background: rgba(3, 169, 244, 0.14);
    border-color: rgba(3, 169, 244, 0.38);
}

body.theme-light .firms-contact-badge-icon {
    background: rgba(3, 169, 244, 0.1);
}

.firms-list-row th,
.firms-list-row td {
    vertical-align: top;
}

.firms-list-row td.firms-col-name,
.firms-list-row td.firms-contact-cell {
    vertical-align: middle;
}

@media (max-width: 680px) {
    .firms-service-cell {
        max-width: none;
        font-size: 0.8rem;
    }

    .firms-contact-cell {
        display: none;
    }

    thead .firms-col-contact {
        display: none;
    }
}

.site-action-btn {
    display: inline-flex;
    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;
    cursor: pointer;
}

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

.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);
}

.apartment-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    border: 1px solid transparent;
}

.apartment-status-badge.is-active {
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
}

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

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

body.theme-light .expense-title-cell,
body.theme-light .expense-amount-cell,
body.theme-light .expense-date-cell,
html.theme-light-preload .expense-title-cell,
html.theme-light-preload .expense-amount-cell,
html.theme-light-preload .expense-date-cell {
    color: #627892;
}

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 .site-list-row.is-primary-manager-row {
    background: rgba(3, 169, 244, 0.09);
}

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);
}

body.theme-light .user-role-badge.role-4 {
    background: rgba(168, 85, 247, 0.1);
    color: #7c3aed;
    border-color: rgba(168, 85, 247, 0.26);
}

body.theme-light .user-role-badge.role-5 {
    background: rgba(251, 146, 60, 0.11);
    color: #c2410c;
    border-color: rgba(251, 146, 60, 0.26);
}

body.theme-light .user-role-badge.role-6 {
    background: rgba(148, 163, 184, 0.12);
    color: #64748b;
    border-color: rgba(148, 163, 184, 0.28);
}

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);
}

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

.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);
}

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

.dashboard-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.5rem;
    padding: 1.1rem 0.8rem;
    border-radius: 0.9rem;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.dashboard-empty-state-soft {
    min-height: 220px;
    gap: 0.7rem;
    background: transparent;
    border: 0;
    padding: 0.6rem 0.4rem;
}

.dashboard-empty-icon {
    width: 2.2rem;
    height: 2.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid var(--primary-border);
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 0.9rem;
}

.dashboard-empty-state p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
}

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

body.theme-light .dashboard-empty-state-soft .dashboard-empty-icon {
    background: rgba(3, 169, 244, 0.08);
    border-color: rgba(3, 169, 244, 0.2);
}

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

.apartment-settings-card {
    grid-column: 1 / -1;
}

.units-period-banner {
    margin-bottom: 1rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, #0277bd 100%);
    color: #f0f9ff;
    padding: 0.75rem 0.55rem 0.85rem;
    box-shadow: 0 10px 28px rgba(3, 169, 244, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.units-period-banner__toolbar {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.35rem;
}

.units-period-banner__edge-btn {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
    flex-shrink: 0;
}

.units-period-banner__edge-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
}

.units-period-banner__edge-btn:active:not(:disabled) {
    transform: scale(0.97);
}

.units-period-banner__edge-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.units-period-banner__edge-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.units-period-banner__year-strip {
    position: relative;
    flex-shrink: 0;
    z-index: 10;
}

.units-period-banner__year-strip.is-open {
    z-index: 55;
}

.units-period-banner__year-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin: 0;
    padding: 0.2rem 0.42rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(0, 0, 0, 0.12);
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.units-period-banner__year-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.28);
}

.units-period-banner__year-toggle:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.units-period-banner__year-caret {
    font-size: 0.62rem;
    opacity: 0.88;
    transition: transform 0.2s ease;
}

.units-period-banner__year-strip.is-open .units-period-banner__year-caret {
    transform: rotate(-180deg);
}

.units-period-banner__year-label {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    min-width: 2.5rem;
    text-align: center;
}

.units-period-banner__year-menu {
    position: absolute;
    left: 0;
    top: calc(100% + 6px);
    z-index: 2;
    min-width: 5.75rem;
    max-height: min(11.5rem, 42vh);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding: 0.38rem;
    margin: 0;
    border-radius: 0.72rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(8, 20, 40, 0.98);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.32);
    scrollbar-width: thin;
    scrollbar-color: rgba(3, 169, 244, 0.48) rgba(12, 24, 44, 0.92);
}

.units-period-banner__year-menu::-webkit-scrollbar {
    width: 8px;
}

.units-period-banner__year-menu::-webkit-scrollbar-track {
    background: rgba(12, 24, 44, 0.92);
    border-radius: 999px;
}

.units-period-banner__year-menu::-webkit-scrollbar-thumb {
    background: rgba(3, 169, 244, 0.48);
    border-radius: 999px;
}

.units-period-banner__year-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(3, 169, 244, 0.65);
}

.units-period-banner__year-option {
    display: block;
    width: 100%;
    padding: 0.4rem 0.62rem;
    border-radius: 0.52rem;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
    color: rgba(240, 249, 255, 0.92);
    text-decoration: none;
    transition: background 0.12s ease, color 0.12s ease;
}

.units-period-banner__year-option:hover {
    background: rgba(255, 255, 255, 0.08);
}

.units-period-banner__year-option:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.55);
    outline-offset: 1px;
}

.units-period-banner__year-option.is-active {
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
}

body.theme-light .units-period-banner__year-menu,
html.theme-light-preload .units-period-banner__year-menu {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18);
    scrollbar-color: rgba(3, 169, 244, 0.42) #e9f2fb;
}

body.theme-light .units-period-banner__year-option,
html.theme-light-preload .units-period-banner__year-option {
    color: #1e293b;
}

body.theme-light .units-period-banner__year-option:hover,
html.theme-light-preload .units-period-banner__year-option:hover {
    background: rgba(3, 169, 244, 0.1);
}

body.theme-light .units-period-banner__year-option.is-active,
html.theme-light-preload .units-period-banner__year-option.is-active {
    background: var(--primary);
    border-color: transparent;
    color: #ffffff;
}

body.theme-light .units-period-banner__year-option.is-active:hover,
html.theme-light-preload .units-period-banner__year-option.is-active:hover {
    background: var(--primary-hover);
    color: #ffffff;
}

body.theme-light .units-period-banner__year-menu::-webkit-scrollbar-track,
html.theme-light-preload .units-period-banner__year-menu::-webkit-scrollbar-track {
    background: #e9f2fb;
}

body.theme-light .units-period-banner__year-menu::-webkit-scrollbar-thumb,
html.theme-light-preload .units-period-banner__year-menu::-webkit-scrollbar-thumb {
    background: rgba(3, 169, 244, 0.42);
}

body.theme-light .units-period-banner__year-menu::-webkit-scrollbar-thumb:hover,
html.theme-light-preload .units-period-banner__year-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(3, 169, 244, 0.58);
}

body.theme-light .units-period-banner__year-toggle,
html.theme-light-preload .units-period-banner__year-toggle {
    border-color: rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.18);
}

body.theme-light .units-period-banner__year-toggle:hover,
html.theme-light-preload .units-period-banner__year-toggle:hover {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.55);
}

.units-period-month-shell {
    min-width: 0;
    position: relative;
}

.units-period-month-mask {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.units-period-month-mask::-webkit-scrollbar {
    display: none;
}

.units-period-month-list {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.32rem;
    padding: 0.15rem 0.4rem;
    min-height: 2.35rem;
}

.units-period-month-chip {
    flex: 0 0 auto;
    scroll-snap-align: center;
    padding: 0.38rem 0.58rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    border: 1px solid transparent;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}

.units-period-month-chip:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.15);
}

.units-period-month-chip:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.units-period-month-chip.is-active {
    background: #fff;
    color: #0f172a;
    font-weight: 700;
    border-color: rgba(255, 255, 255, 0.65);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.units-period-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.units-period-summary__item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.units-period-summary__k {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.68);
}

.units-period-summary__v {
    font-size: 0.82rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.units-period-summary__v--pos {
    color: #c8f7dc;
}

.units-period-summary__v--neg {
    color: #ffd4d4;
}

.units-period-summary__v--neutral {
    color: #fff;
}

.units-period-banner__title-block {
    margin-bottom: 0.62rem;
}

.units-period-banner__title-main {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.96);
    line-height: 1.2;
}

@supports not (font-weight: 650) {
    .units-period-banner__title-main {
        font-weight: 600;
    }
}

.units-period-banner__title-count {
    margin: 0.22rem 0 0;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.62);
    line-height: 1.25;
}

.units-period-banner__title-count-num {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.92);
}

.units-period-banner__title-meta {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.4rem;
    margin: 0.28rem 0 0;
    font-size: 0.76rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.35;
    max-width: 100%;
}

.units-period-banner__title-meta-icon {
    flex: 0 0 auto;
    margin-top: 0.06rem;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.88);
    opacity: 0.9;
}

.units-period-banner__title-meta-text {
    flex: 1 1 auto;
    min-width: 0;
}

.units-period-banner__extras {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: 0.65rem;
    padding-top: 0.72rem;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.units-period-banner .units-period-banner__search-wrap {
    width: 100%;
    min-width: 0;
    border-radius: 0.82rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(7, 18, 36, 0.35);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.units-period-banner .units-period-banner__search-input {
    color: rgba(240, 249, 255, 0.98);
}

.units-period-banner .units-period-banner__search-input::placeholder {
    color: rgba(255, 255, 255, 0.42);
}

.units-period-banner .units-period-banner__search-wrap .apartments-search-icon {
    color: rgba(255, 255, 255, 0.78);
}

.units-period-banner .units-period-banner__search-wrap:focus-within {
    border-color: rgba(255, 255, 255, 0.38);
    background: rgba(5, 14, 30, 0.45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 0 2px rgba(255, 255, 255, 0.12);
}

body.theme-light .units-period-banner .units-period-banner__search-wrap,
html.theme-light-preload .units-period-banner .units-period-banner__search-wrap {
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 4px 14px rgba(2, 40, 70, 0.12);
}

body.theme-light .units-period-banner .units-period-banner__search-input,
html.theme-light-preload .units-period-banner .units-period-banner__search-input {
    color: #0f172a;
}

body.theme-light .units-period-banner .units-period-banner__search-input::placeholder,
html.theme-light-preload .units-period-banner .units-period-banner__search-input::placeholder {
    color: rgba(15, 23, 42, 0.42);
}

body.theme-light .units-period-banner .units-period-banner__search-wrap .apartments-search-icon,
html.theme-light-preload .units-period-banner .units-period-banner__search-wrap .apartments-search-icon {
    color: var(--primary);
}

body.theme-light .units-period-banner .units-period-banner__search-wrap:focus-within,
html.theme-light-preload .units-period-banner .units-period-banner__search-wrap:focus-within {
    border-color: rgba(3, 169, 244, 0.55);
    box-shadow: 0 0 0 2px rgba(3, 169, 244, 0.2);
}

.sites-hero-add-btn.sites-hero-add-btn--units-banner {
    width: 100%;
    justify-content: center;
    border-radius: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.sites-hero-add-btn.sites-hero-add-btn--units-banner:hover {
    background: rgba(255, 255, 255, 0.26);
    border-color: rgba(255, 255, 255, 0.45);
}

.sites-hero-add-btn.sites-hero-add-btn--units-banner:active {
    transform: scale(0.99);
}

.sites-hero-add-btn.sites-hero-add-btn--units-banner:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

body.theme-light .units-period-banner {
    background: linear-gradient(135deg, #03a9f4 0%, #039be5 100%);
    box-shadow: 0 10px 26px rgba(3, 169, 244, 0.2);
}

@media (max-width: 820px) {
    .units-period-banner--page-slot {
        margin-left: 0;
        margin-right: 0;
        margin-top: 0;
        border-radius: 0 0 0.88rem 0.88rem;
        border-left: 0;
        border-right: 0;
        border-top: 0;
        padding: 0.88rem 0.82rem 0.85rem;
        box-shadow: 0 12px 28px rgba(2, 19, 45, 0.28);
        background: linear-gradient(145deg, rgba(18, 92, 226, 0.92), rgba(3, 169, 244, 0.92));
    }

    body.theme-light .units-period-banner--page-slot,
    html.theme-light-preload .units-period-banner--page-slot {
        background: linear-gradient(135deg, #03a9f4 0%, #0288d1 100%);
        box-shadow: 0 12px 26px rgba(3, 136, 209, 0.28);
    }
}

@media (max-width: 640px) {
    .units-period-summary {
        grid-template-columns: 1fr;
    }

    .units-period-banner__toolbar {
        grid-template-columns: auto auto minmax(0, 1fr) auto;
    }
}

.units-list {
    display: grid;
    gap: 0.6rem;
}

.unit-list-item {
    border: 1px solid var(--border);
    border-radius: 0.85rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
}

.unit-list-head {
    margin-bottom: 0.45rem;
}

.unit-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: var(--primary-soft);
    border: 1px solid var(--primary-border);
    color: var(--text);
    font-size: 0.76rem;
    font-weight: 600;
}

.unit-person-row {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.35rem;
}

.unit-person-label {
    color: var(--muted);
    font-size: 0.76rem;
}

.unit-person-name {
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 500;
}

.unit-phone-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    background: rgba(3, 169, 244, 0.14);
    border: 1px solid rgba(3, 169, 244, 0.28);
    color: #bfe9ff;
    font-size: 0.72rem;
    line-height: 1.2;
    white-space: nowrap;
}

.unit-subscriptions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.55rem;
}

.unit-subscription-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    border: 1px solid rgba(148, 163, 184, 0.28);
    color: #dbe7f5;
    font-size: 0.72rem;
    line-height: 1.2;
}

.log-action-text {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.45;
    font-weight: 500;
}

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

.activity-badge i {
    font-size: 0.58rem;
    opacity: 0.95;
}

.activity-badge--login {
    background: rgba(16, 185, 129, 0.17);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.32);
}

.activity-badge--logout {
    background: rgba(239, 68, 68, 0.85);
    color: #ffffff;
    border-color: rgba(239, 68, 68, 0.92);
}

body.theme-light .log-action-text,
html.theme-light-preload .log-action-text {
    color: #61758e;
}

body.theme-light .activity-badge--login,
html.theme-light-preload .activity-badge--login {
    background: rgba(16, 185, 129, 0.14);
    color: #0f766e;
    border-color: rgba(16, 185, 129, 0.26);
}

body.theme-light .activity-badge--logout,
html.theme-light-preload .activity-badge--logout {
    background: rgba(220, 38, 38, 0.88);
    color: #ffffff;
    border-color: rgba(220, 38, 38, 0.94);
}

.receipt-modal-dialog {
    width: min(680px, 100%);
}

.receipt-modal-body {
    position: relative;
    padding: 1rem 1.1rem 1.05rem;
    background: linear-gradient(170deg, rgba(8, 24, 44, 0.97), rgba(7, 18, 34, 0.97));
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 0.85rem;
    padding-left: 2.35rem;
}

.receipt-file-strip {
    position: absolute;
    left: 0.64rem;
    top: 0.78rem;
    bottom: 0.78rem;
    width: 0.9rem;
    border-right: 1px dashed rgba(148, 163, 184, 0.46);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 0.06rem 0;
}

.receipt-file-hole {
    width: 0.46rem;
    height: 0.46rem;
    border-radius: 999px;
    background: rgba(3, 10, 22, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.receipt-brand-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding-bottom: 0.3rem;
    margin-bottom: 0.06rem;
}

.receipt-brand-left {
    display: inline-flex;
    align-items: center;
    gap: 0.52rem;
}

.receipt-brand-copy {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    line-height: 1.02;
}

.receipt-brand-logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0.18rem;
    border-radius: 0.52rem;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.98);
    line-height: 0;
}

.receipt-brand-logo {
    width: 2.45rem;
    height: 2.45rem;
    display: block;
    border-radius: 0.42rem;
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    object-fit: contain;
    filter: var(--receipt-logo-brand-filter);
    opacity: 0.96;
}

.receipt-brand-title {
    margin: 0;
    color: #dff3ff;
    font-weight: 800;
    letter-spacing: 0.02em;
    font-size: 0.92rem;
    line-height: 1.08;
}

.receipt-brand-sub {
    margin: 0;
    color: #9bb5cb;
    font-size: 0.7rem;
    font-weight: 500;
    line-height: 1.05;
}

.receipt-brand-date {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    line-height: 1;
    border-radius: 999px;
    white-space: nowrap;
    padding: 0.16rem 0.56rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #9fc2dd;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.22);
}

.receipt-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.46rem 0;
    border-bottom: 1px dashed rgba(148, 163, 184, 0.24);
}

.receipt-line:last-of-type {
    border-bottom: 0;
}

.receipt-line span {
    color: #9cb3ca;
    font-size: 0.75rem;
}

.receipt-line strong {
    color: #e9f4ff;
    font-size: 0.78rem;
    font-weight: 700;
    text-align: right;
}

.receipt-notes {
    margin-top: 0.8rem;
}

.receipt-notes span {
    display: inline-flex;
    align-items: center;
    font-size: 0.73rem;
    color: #9cb3ca;
    margin-bottom: 0.28rem;
}

.receipt-notes p {
    margin: 0;
    color: #d8e8f7;
    font-size: 0.75rem;
    line-height: 1.45;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(148, 163, 184, 0.08);
    border-radius: 0.62rem;
    padding: 0.56rem 0.62rem;
}

.receipt-tear-line {
    position: relative;
    margin-top: 0.72rem;
    margin-bottom: 0.72rem;
    border-top: 1px dashed rgba(148, 163, 184, 0.48);
    border-bottom: 1px dashed rgba(148, 163, 184, 0.18);
    padding: 0.4rem 0;
    text-align: center;
}

.receipt-tear-text {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    color: #8fb2ce;
    font-size: 0.68rem;
    font-weight: 600;
    background: rgba(9, 26, 48, 0.86);
    padding: 0 0.48rem;
}

.receipt-tear-notch {
    position: absolute;
    top: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #0f1a2d;
    transform: translateY(-50%);
    border: 1px solid rgba(148, 163, 184, 0.22);
}

.receipt-tear-notch--left {
    left: -5px;
}

.receipt-tear-notch--right {
    right: -5px;
}

.receipt-footnote {
    margin: 0.68rem 0 0;
    color: #8ca8bf;
    font-size: 0.66rem;
    text-align: center;
}

body.theme-light .receipt-modal-body,
html.theme-light-preload .receipt-modal-body {
    background: linear-gradient(170deg, #ffffff, #f3f8fc);
    border-top-color: #d4e3ef;
    border-bottom-color: #d4e3ef;
}

body.theme-light .receipt-file-strip,
html.theme-light-preload .receipt-file-strip {
    border-right-color: #c8dbea;
}

body.theme-light .receipt-file-hole,
html.theme-light-preload .receipt-file-hole {
    background: #ffffff;
    border-color: #d3e3ef;
}

body.theme-light .receipt-line,
html.theme-light-preload .receipt-line {
    border-bottom-color: #d7e5f0;
}

body.theme-light .receipt-line span,
html.theme-light-preload .receipt-line span {
    color: #5e738c;
}

body.theme-light .receipt-line strong,
html.theme-light-preload .receipt-line strong {
    color: #122840;
}

body.theme-light .receipt-brand-title,
html.theme-light-preload .receipt-brand-title {
    color: #114067;
}

body.theme-light .receipt-brand-sub,
html.theme-light-preload .receipt-brand-sub {
    color: #7e99b3;
}

body.theme-light .receipt-brand-logo-wrap,
html.theme-light-preload .receipt-brand-logo-wrap {
    border-color: rgba(148, 163, 184, 0.35);
    background: #ffffff;
}

body.theme-light .receipt-brand-logo,
html.theme-light-preload .receipt-brand-logo {
    filter: var(--receipt-logo-brand-filter);
    opacity: 0.96;
}

body[data-receipt-paper='true'] .receipt-brand-logo,
html.theme-light-preload body[data-receipt-paper='true'] .receipt-brand-logo {
    filter: var(--receipt-logo-brand-filter);
    opacity: 0.96;
}

body.theme-light .receipt-brand-date,
html.theme-light-preload .receipt-brand-date {
    color: #68849e;
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.28);
}

.receipt-modal-body.is-exporting {
    background: #ffffff;
    border-color: #cde3f3;
    box-shadow: none !important;
}

.receipt-modal-body.is-exporting .receipt-brand-title {
    color: #114067;
}

.receipt-modal-body.is-exporting .receipt-brand-sub,
.receipt-modal-body.is-exporting .receipt-line span,
.receipt-modal-body.is-exporting .receipt-notes span {
    color: #5b7691;
}

.receipt-modal-body.is-exporting .receipt-line strong,
.receipt-modal-body.is-exporting .receipt-notes p {
    color: #1d334e;
}

.receipt-modal-body.is-exporting .receipt-brand-logo {
    filter: var(--receipt-logo-brand-filter);
    opacity: 0.96;
}

body.theme-light .receipt-notes span,
html.theme-light-preload .receipt-notes span {
    color: #5e738c;
}

body.theme-light .receipt-notes p,
html.theme-light-preload .receipt-notes p {
    color: #324b66;
    border-color: #d4e3ef;
    background: #f7fbff;
}

body.theme-light .receipt-tear-line,
html.theme-light-preload .receipt-tear-line {
    border-top-color: #c8dbea;
    border-bottom-color: #dbe8f2;
}

body.theme-light .receipt-tear-text,
html.theme-light-preload .receipt-tear-text {
    color: #5a7892;
    background: #f5f9fd;
}

body.theme-light .receipt-tear-notch,
html.theme-light-preload .receipt-tear-notch {
    background: #f6fbff;
    border-color: #d2e2ef;
}

body.theme-light .receipt-footnote,
html.theme-light-preload .receipt-footnote {
    color: #6d849c;
}

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

    .apartments-hero-actions {
        width: 100%;
        flex-direction: column;
    }

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

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

    .users-col-no,
    .users-col-phone,
    .users-col-mail {
        display: none;
    }

    .logs-col-no,
    .logs-col-action {
        display: none;
    }

    .receipt-modal-body {
        padding: 0.88rem 0.88rem 0.94rem;
        padding-left: 2.18rem;
    }

    .receipt-line {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.2rem;
    }

    .receipt-line strong {
        text-align: left;
    }

    .expenses-col-no,
    .expenses-col-title,
    .expenses-col-date {
        display: none;
    }

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

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

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

    .panel-hero-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .panel-hero-modern {
        padding: 0.9rem 0.85rem;
        border-radius: 0.68rem;
    }

    .panel-hero-date {
        position: absolute;
        top: 0.62rem;
        right: 0.62rem;
        margin: 0;
        font-size: 0.66rem;
        padding: 0.16rem 0.46rem;
    }

    .panel-hero-head h1 {
        padding-right: 7.2rem;
    }

    .panel-hero-meta {
        margin-top: 0.08rem;
    }

    .panel-hero-contact-list {
        width: 100%;
        flex-direction: column;
        gap: 0.34rem;
    }

    .panel-hero-contact-item {
        width: 100%;
        justify-content: flex-start;
        border-radius: 0.7rem;
    }
}

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

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

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

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

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

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

.panel-stat-card {
    min-height: 126px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.panel-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(2, 19, 45, 0.22);
}

.panel-stat-card:active {
    transform: translateY(-2px);
    transition-duration: 0.14s;
}

body.theme-light .panel-stat-card:hover {
    box-shadow: 0 14px 32px rgba(24, 60, 112, 0.14);
}

.panel-stat-card--kasa.panel-stat-card:hover {
    box-shadow: 0 14px 32px rgba(3, 169, 244, 0.18), 0 8px 22px rgba(2, 19, 45, 0.16);
}

body.theme-light .panel-stat-card--kasa.panel-stat-card:hover {
    box-shadow: 0 14px 32px rgba(3, 169, 244, 0.14), 0 12px 28px rgba(24, 60, 112, 0.1);
}

@media (prefers-reduced-motion: reduce) {
    .panel-stat-card {
        transition: box-shadow 0.18s ease;
    }

    .panel-stat-card:hover,
    .panel-stat-card:active {
        transform: none;
    }
}

.expenses-total-card {
    grid-column: 1 / -1;
}


.panel-stat-head {
    display: flex;
    align-items: center;
    gap: 0.48rem;
    margin-bottom: 0.3rem;
}

.panel-stat-icon {
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 0.62rem;
    border: 1px solid var(--primary-border);
    background: var(--primary-soft);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
}

.panel-stat-card--kasa {
    position: relative;
    border-color: rgba(3, 169, 244, 0.28);
    background: linear-gradient(145deg, rgba(3, 169, 244, 0.12), rgba(3, 169, 244, 0.04));
    box-shadow: 0 8px 22px rgba(2, 19, 45, 0.18);
}

.panel-stat-emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 0.72rem;
    font-size: 1.28rem;
    line-height: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(3, 169, 244, 0.22);
    box-shadow: 0 1px 10px rgba(3, 169, 244, 0.12);
}

body.theme-light .panel-stat-card--kasa {
    background: linear-gradient(145deg, rgba(243, 252, 255, 1), rgba(237, 248, 255, 1));
    border-color: rgba(3, 169, 244, 0.22);
    box-shadow: 0 10px 24px rgba(24, 60, 112, 0.1);
}

body.theme-light .panel-stat-emoji {
    background: #ffffff;
    border-color: rgba(3, 169, 244, 0.24);
    box-shadow: 0 2px 10px rgba(3, 169, 244, 0.12);
}

.panel-stat-value--negative {
    color: #fda4af;
}

body.theme-light .panel-stat-value--negative {
    color: #dc2626;
}

.panel-stat-value {
    margin: 0.15rem 0 0;
    font-size: 1.22rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--text);
}

.panel-stat-sub {
    margin: 0.3rem 0 0;
    font-size: 0.76rem;
    color: var(--muted);
}

.panel-stat-sub--expense {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.panel-stat-sub--expense strong {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--text);
    font-weight: 700;
}

body.theme-light .panel-stat-value {
    color: #152235;
}

body.theme-light .panel-stat-sub {
    color: #5f738d;
}

.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.sidebar-collapsed .dashboard-sidebar {
    width: 76px;
    min-width: 76px;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    transform: none;
    opacity: 1;
    pointer-events: auto;
}

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

.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;
}

.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;
}

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

body.theme-light .toast-error {
    background: rgba(248, 113, 113, 0.16);
    color: #7f1d1d;
}

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

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

.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;
}

.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: rgba(148, 163, 184, 0.16);
    color: var(--text);
    border: 1px solid var(--border);
}

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

.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;
    }

    .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;
    }

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

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

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

    .dashboard-topnav {
        display: none;
    }

    /* Tema seçimi kullanıcı menüsünde; mobilde gereksiz tekrar gösterme */
    .dashboard-topbar .topbar-user-dropdown .desktop-theme-toggle {
        display: none !important;
    }

    /* Mobil: bildirim | kullanıcı */
    .topbar-user-dropdown .topbar-notification-btn {
        order: 1;
    }

    .topbar-user-dropdown .topbar-user-btn {
        order: 2;
    }

    .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.9rem 0.66rem 0.6rem;
        justify-content: space-between;
    }

    .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;
    }
}
