/* Общие стили CRM */

/* ----- Компактная шапка ----- */
.app-navbar {
    --app-nav-pad-y: 0.35rem;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
}

.app-navbar .container-fluid {
    gap: 0.5rem;
}

.app-navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
    max-width: min(42vw, 18rem);
    margin-right: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
}

.app-navbar-brand > i {
    flex: 0 0 auto;
    font-size: 1.1rem;
}

.app-navbar-brand-text {
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-navbar-nav {
    gap: 0.1rem;
}

.app-navbar-nav > .nav-item > .nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.12rem;
    padding: 0.35rem 0.45rem;
    min-width: 3.4rem;
    line-height: 1.15;
    font-size: 0.72rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.78);
    white-space: nowrap;
    border-radius: 0.45rem;
    text-align: center;
}

.app-navbar-nav > .nav-item > .nav-link > i {
    font-size: 1.05rem;
    line-height: 1;
    opacity: 0.92;
}

.app-navbar-nav > .nav-item > .nav-link:hover,
.app-navbar-nav > .nav-item > .nav-link:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.app-navbar-nav > .nav-item > .nav-link.active {
    color: #fff;
    font-weight: 650;
    background: rgba(255, 255, 255, 0.14);
}

.app-navbar-user {
    margin-left: 0.35rem;
}

.app-navbar-user > .nav-link {
    flex-direction: row !important;
    gap: 0.35rem !important;
    min-width: 0 !important;
    padding-left: 0.55rem !important;
    padding-right: 0.55rem !important;
    white-space: nowrap;
}

.app-navbar-user-name {
    max-width: 7.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* На очень широких экранах — чуть просторнее */
@media (min-width: 1400px) {
    .app-navbar-nav > .nav-item > .nav-link {
        font-size: 0.78rem;
        padding: 0.4rem 0.55rem;
        min-width: 3.75rem;
    }

    .app-navbar-brand {
        max-width: 22rem;
        font-size: 1rem;
    }
}

/* Свёрнутое меню (гамбургер): обычный список */
@media (max-width: 1199.98px) {
    .app-navbar-nav {
        gap: 0.15rem;
        padding-top: 0.5rem;
        padding-bottom: 0.35rem;
    }

    .app-navbar-nav > .nav-item > .nav-link {
        flex-direction: row;
        justify-content: flex-start;
        gap: 0.55rem;
        min-width: 0;
        padding: 0.55rem 0.75rem;
        font-size: 0.95rem;
        text-align: left;
    }

    .app-navbar-nav > .nav-item > .nav-link > i {
        font-size: 1.1rem;
        width: 1.25rem;
        text-align: center;
    }

    .app-navbar-user {
        margin-left: 0;
        margin-top: 0.25rem;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        padding-top: 0.35rem;
    }

    .app-navbar-user-name {
        max-width: none;
    }

    .app-navbar-brand {
        max-width: calc(100% - 3.5rem);
    }
}

/* Режим просмотра (роль user) — скрыть действия изменения */
body.role-readonly a[href*="page=create_"],
body.role-readonly a[href*="page=edit_"],
body.role-readonly [data-bs-target="#paymentModal"],
body.role-readonly [data-bs-target="#utilityModal"],
body.role-readonly .auth-write,
body.role-readonly .cal2-event-btn,
body.role-readonly .cal-pay-btn {
    display: none !important;
}

body.role-readonly .tax-cell {
    pointer-events: none;
    cursor: default;
}

body.role-readonly .tax-cell-placeholder {
    visibility: hidden;
}

body.role-readonly form[method="post"] button[type="submit"],
body.role-readonly form[method="post"] input[type="submit"] {
    display: none !important;
}

/* Страница входа */
.login-body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(1200px 600px at 10% -10%, #dbeafe 0%, transparent 55%),
        radial-gradient(900px 500px at 100% 0%, #e2e8f0 0%, transparent 50%),
        #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.login-wrap {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: #fff;
    border: 1px solid #e8ecf0;
    border-radius: 1rem;
    padding: 1.75rem 1.5rem 1.5rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.login-brand {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1.25rem;
}

.login-brand > i {
    font-size: 1.75rem;
    color: #0f172a;
}

.login-app {
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.2;
}

.login-sub {
    color: #64748b;
    font-size: 0.85rem;
}

.card {
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.table thead th {
    white-space: nowrap;
    font-weight: 600;
    color: #495057;
}

.table-hover tbody tr:hover {
    background-color: #f6f8fa;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

/* Статусы оплат в календаре.
   Специфичность должна бить Bootstrap `.table>:not(caption)>*>* { color: ... }`. */
.table > :not(caption) > * > .payment-status-paid {
    color: #198754;
    font-weight: 600;
}

.table > :not(caption) > * > .payment-status-today {
    color: #d39e00;
    font-weight: 600;
}

.table > :not(caption) > * > .payment-status-overdue {
    color: #dc3545;
    font-weight: 600;
}

.table > :not(caption) > * > .payment-status-upcoming {
    color: #212529;
}

.table > :not(caption) > * > .payment-status-none {
    color: #6c757d;
}

.table > :not(caption) > * > .payment-status-paid .payment-date,
.table > :not(caption) > * > .payment-status-today .payment-date,
.table > :not(caption) > * > .payment-status-overdue .payment-date,
.table > :not(caption) > * > .payment-status-upcoming .payment-date,
.table > :not(caption) > * > .payment-status-none .payment-date {
    display: block;
    font-size: 0.8125rem;
    font-weight: 400;
    opacity: 0.85;
    color: inherit;
}

.payment-cell .btn-mark-paid {
    padding: 0;
    font-size: 0.8125rem;
    vertical-align: baseline;
}

.meta-lines {
    margin-top: 0.2rem;
    font-size: 0.75rem;
    line-height: 1.35;
    color: #6c757d;
}

.payment-history details {
    font-size: 0.8125rem;
}

.payment-history summary {
    cursor: pointer;
    color: #0d6efd;
    list-style: none;
    user-select: none;
}

.payment-history summary::-webkit-details-marker {
    display: none;
}

.payment-history summary::before {
    content: '▸ ';
    display: inline-block;
    transition: transform 0.15s ease;
}

.payment-history details[open] summary::before {
    transform: rotate(90deg);
}

.payment-history-list {
    margin: 0.4rem 0 0;
    padding: 0;
    list-style: none;
    max-width: 280px;
}

.payment-history-list li {
    padding: 0.35rem 0;
    border-top: 1px solid #eee;
    line-height: 1.3;
    color: #495057;
}

.payment-history-list li:first-child {
    border-top: none;
    padding-top: 0;
}

/* Тестовая доска платежей (owners/tenants *_calendar_test) */
.cal-test-banner {
    border: 1px dashed #f59e0b;
    background: #fffbeb;
    color: #92400e;
}

.cal-board-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.cal-board-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.cal-chip {
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
}

.cal-chip.is-active {
    border-color: #0f172a;
    background: #0f172a;
    color: #fff;
}

.cal-chip.is-overdue.is-active { background: #b91c1c; border-color: #b91c1c; }
.cal-chip.is-today.is-active { background: #b45309; border-color: #b45309; }
.cal-chip.is-upcoming.is-active { background: #334155; border-color: #334155; }
.cal-chip.is-paid.is-active { background: #15803d; border-color: #15803d; }

.cal-chip-n {
    display: inline-block;
    min-width: 1.25rem;
    margin-left: 0.2rem;
    opacity: 0.85;
}

.cal-board-search {
    position: relative;
    min-width: min(100%, 18rem);
}

.cal-board-search .bi-search {
    position: absolute;
    left: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.cal-board-search .form-control {
    padding-left: 2rem;
}

.cal-board-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cal-row {
    background: #fff;
    border: 1px solid #e8ecf0;
    border-radius: 0.85rem;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    border-left: 4px solid #cbd5e1;
}

.cal-row.is-overdue { border-left-color: #dc2626; }
.cal-row.is-today { border-left-color: #d97706; }
.cal-row.is-upcoming { border-left-color: #64748b; }
.cal-row.is-paid { border-left-color: #16a34a; }

.cal-row-main {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1rem 0.35rem;
}

.cal-row-title {
    font-weight: 700;
    font-size: 1.02rem;
}

.cal-row-title a,
.cal-row-party a {
    color: inherit;
    text-decoration: none;
}

.cal-row-title a:hover,
.cal-row-party a:hover {
    text-decoration: underline;
}

.cal-row-sub {
    font-size: 0.82rem;
    color: #64748b;
}

.cal-row-party {
    margin-top: 0.35rem;
    font-weight: 600;
}

.cal-row-meta {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.15rem;
}

.cal-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: flex-start;
}

.cal-row-blocks {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    padding: 0.35rem 1rem 0.85rem;
}

.cal-pay {
    border: 1px solid #eef2f6;
    border-radius: 0.65rem;
    padding: 0.65rem 0.75rem;
    background: #f8fafc;
    min-height: 100%;
}

.cal-pay.is-overdue { background: #fef2f2; border-color: #fecaca; }
.cal-pay.is-today { background: #fffbeb; border-color: #fde68a; }
.cal-pay.is-paid { background: #f0fdf4; border-color: #bbf7d0; }
.cal-pay.is-upcoming { background: #f8fafc; }

.cal-pay-head {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    align-items: flex-start;
    margin-bottom: 0.35rem;
}

.cal-pay-kind {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.cal-pay-badge {
    font-size: 0.75rem;
    font-weight: 700;
    text-align: right;
}

.cal-pay.is-overdue .cal-pay-badge { color: #b91c1c; }
.cal-pay.is-today .cal-pay-badge { color: #b45309; }
.cal-pay.is-paid .cal-pay-badge { color: #15803d; }

.cal-pay-amount {
    font-size: 1.05rem;
    font-weight: 750;
    line-height: 1.2;
}

.cal-pay-note,
.cal-pay-due {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 0.15rem;
}

.cal-pay-btn {
    margin-top: 0.55rem;
    background: #0f172a;
    color: #fff;
    border: 0;
}

.cal-pay-btn:hover {
    background: #1e293b;
    color: #fff;
}

.cal-row-foot {
    border-top: 1px solid #f1f5f9;
    padding: 0.55rem 1rem 0.7rem;
    background: #fcfcfd;
}

.cal-history {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    align-items: baseline;
    font-size: 0.8rem;
}

.cal-history-more summary {
    cursor: pointer;
    color: #2563eb;
    list-style: none;
}

.cal-history-more summary::-webkit-details-marker { display: none; }

@media (max-width: 992px) {
    .cal-row-blocks {
        grid-template-columns: 1fr;
    }
}

/* Test2: календарь-таблица (объекты × дни месяца) */
.cal2-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.cal2-month-nav {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.cal2-month-title {
    font-size: 1.1rem;
    font-weight: 700;
    min-width: 10rem;
    text-align: center;
    text-transform: capitalize;
}

.cal2-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.9rem;
    font-size: 0.78rem;
    color: #64748b;
}

.cal2-dot {
    display: inline-block;
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 999px;
    margin-right: 0.3rem;
    vertical-align: middle;
    background: #cbd5e1;
}

.cal2-dot.is-overdue { background: #dc2626; }
.cal2-dot.is-today { background: #d97706; }
.cal2-dot.is-upcoming { background: #64748b; }
.cal2-dot.is-paid { background: #16a34a; }

.cal2-search-wrap {
    min-width: min(100%, 16rem);
}

.cal2-matrix-wrap {
    background: #fff;
    border: 1px solid #e8ecf0;
    border-radius: 1rem;
    overflow: auto;
    max-height: min(78vh, 820px);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.cal2-matrix {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.82rem;
}

.cal2-matrix thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 700;
    color: #64748b;
    text-align: center;
    padding: 0.55rem 0.15rem;
}

.cal2-corner {
    left: 0;
    z-index: 4 !important;
    min-width: 10.5rem;
    max-width: 12rem;
    width: 11rem;
    text-align: left !important;
    padding: 0.4rem 0.55rem !important;
    color: #0f172a !important;
    border-right: 1px solid #e2e8f0;
    font-size: 0.72rem;
}

.cal2-dayhead {
    min-width: 1.85rem;
    width: 1.85rem;
    font-size: 0.7rem;
    padding: 0.4rem 0.1rem !important;
}

.cal2-dayhead.is-weekend {
    color: #94a3b8;
}

.cal2-dayhead.is-today-date {
    color: #0f172a;
    background: #e2e8f0;
}

.cal2-entity-cell {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #f1f5f9;
    text-align: left;
    vertical-align: middle;
    min-width: 10.5rem;
    max-width: 12rem;
    width: 11rem;
    padding: 0.35rem 0.55rem;
    font-weight: 400;
    box-shadow: 4px 0 8px -6px rgba(15, 23, 42, 0.12);
}

.cal2-row.is-overdue .cal2-entity-cell { box-shadow: inset 3px 0 0 #dc2626, 4px 0 8px -6px rgba(15, 23, 42, 0.12); }
.cal2-row.is-today .cal2-entity-cell { box-shadow: inset 3px 0 0 #d97706, 4px 0 8px -6px rgba(15, 23, 42, 0.12); }
.cal2-row.is-upcoming .cal2-entity-cell { box-shadow: inset 3px 0 0 #64748b, 4px 0 8px -6px rgba(15, 23, 42, 0.12); }
.cal2-row.is-paid .cal2-entity-cell { box-shadow: inset 3px 0 0 #16a34a, 4px 0 8px -6px rgba(15, 23, 42, 0.12); }

.cal2-entity-title {
    font-weight: 700;
    font-size: 0.78rem;
    line-height: 1.2;
}

.cal2-entity-title a {
    color: inherit;
    text-decoration: none;
}

.cal2-entity-title a:hover {
    text-decoration: underline;
}

.cal2-entity-sub,
.cal2-entity-who {
    font-size: 0.68rem;
    color: #64748b;
    line-height: 1.2;
}

.cal2-entity-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.3rem;
    margin-top: 0.12rem;
    font-size: 0.66rem;
    font-weight: 600;
    color: #475569;
}

.cal2-cell {
    border-bottom: 1px solid #f1f5f9;
    border-left: 1px solid #f8fafc;
    padding: 0.1rem;
    vertical-align: middle;
    text-align: center;
    background: #fff;
    min-width: 1.85rem;
    height: 2.15rem;
}

.cal2-cell.is-weekend {
    background: #fafbfc;
}

.cal2-cell.is-today-date {
    background: #f1f5f9;
}

.cal2-cell.has-events.tone-overdue { background: #fef2f2; }
.cal2-cell.has-events.tone-today { background: #fff7ed; }
.cal2-cell.has-events.tone-holiday,
.cal2-cell.has-events.tone-upcoming { background: #f1f5f9; }
.cal2-cell.has-events.tone-paid { background: #f0fdf4; }

.cal2-cell-btn {
    appearance: none;
    border: 0;
    background: transparent;
    width: 100%;
    height: 100%;
    min-height: 1.85rem;
    border-radius: 0.35rem;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cal2-cell-btn:hover {
    background: rgba(15, 23, 42, 0.06);
}

.cal2-cell.tone-overdue .cal2-cell-marks { color: #b91c1c; }
.cal2-cell.tone-today .cal2-cell-marks { color: #b45309; }
.cal2-cell.tone-paid .cal2-cell-marks { color: #15803d; }
.cal2-cell.tone-upcoming .cal2-cell-marks,
.cal2-cell.tone-holiday .cal2-cell-marks { color: #475569; }

.cal2-cell-marks {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1;
}

.cal2-event {
    border: 1px solid #e8ecf0;
    border-radius: 0.85rem;
    border-left: 4px solid #cbd5e1;
    padding: 0.85rem 1rem;
    margin-bottom: 0.75rem;
    background: #fff;
}

.cal2-event.is-overdue { border-left-color: #dc2626; background: #fef2f2; }
.cal2-event.is-today { border-left-color: #d97706; background: #fff7ed; }
.cal2-event.is-upcoming,
.cal2-event.is-holiday { border-left-color: #64748b; background: #f8fafc; }
.cal2-event.is-paid { border-left-color: #16a34a; background: #f0fdf4; }

.cal2-event-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.35rem 0.75rem;
    margin-bottom: 0.35rem;
}

.cal2-event-kind {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.cal2-event-status {
    font-size: 0.82rem;
    font-weight: 700;
}

.cal2-event.is-overdue .cal2-event-status { color: #b91c1c; }
.cal2-event.is-today .cal2-event-status { color: #b45309; }
.cal2-event.is-paid .cal2-event-status { color: #15803d; }

.cal2-event-place {
    font-weight: 700;
    font-size: 1.02rem;
}

.cal2-event-place a {
    color: inherit;
    text-decoration: none;
}

.cal2-event-place a:hover {
    text-decoration: underline;
}

.cal2-event-meta {
    font-size: 0.85rem;
    color: #475569;
    margin-top: 0.15rem;
}

.cal2-event-amount {
    margin-top: 0.45rem;
    font-size: 1.1rem;
    font-weight: 750;
}

.cal2-event-btn {
    margin-top: 0.65rem;
    background: #0f172a;
    color: #fff;
    border: 0;
}

.cal2-event-btn:hover {
    background: #1e293b;
    color: #fff;
}

@media (max-width: 768px) {
    .cal2-corner,
    .cal2-entity-cell {
        min-width: 8.5rem;
        max-width: 9.5rem;
        width: 9rem;
    }

    .cal2-dayhead,
    .cal2-cell {
        min-width: 1.55rem;
        width: 1.55rem;
    }
}


/* Главная: мониторинг */
.dash-hero {
    align-items: flex-end;
    margin-bottom: 1.25rem;
}

.dash-hero-eyebrow {
    font-size: .75rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 600;
    margin-bottom: .2rem;
}

.dash-hero-title {
    font-size: clamp(1.6rem, 2.2vw, 2rem);
    font-weight: 700;
    letter-spacing: -.02em;
    color: #0f172a;
    margin: 0 0 .25rem;
}

.dash-hero-lead {
    color: #64748b;
    font-size: .95rem;
}

.dash-mode-pill {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .4rem .7rem;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    font-size: .8rem;
    font-weight: 600;
}

.dash-status-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .75rem;
}

@media (max-width: 1199.98px) {
    .dash-status-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
    .dash-status-strip { grid-template-columns: 1fr 1fr; }
}

.dash-status-chip {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    padding: .9rem 1rem;
    border-radius: 1rem;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

a.dash-status-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
    border-color: #cbd5e1;
    color: inherit;
}

.dash-status-chip.is-danger {
    background: linear-gradient(160deg, #fff 40%, #fef2f2);
    border-color: #fecaca;
}

.dash-status-chip.is-warn {
    background: linear-gradient(160deg, #fff 40%, #fffbeb);
    border-color: #fde68a;
}

.dash-status-chip.is-ok {
    background: linear-gradient(160deg, #fff 40%, #f0fdf4);
    border-color: #bbf7d0;
}

.dash-status-chip.is-neutral {
    background: linear-gradient(160deg, #fff 35%, #f8fafc);
}

.dash-status-label {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #64748b;
    font-weight: 600;
}

.dash-status-value {
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.1;
    color: #0f172a;
}

.dash-status-chip.is-danger .dash-status-value { color: #b91c1c; }
.dash-status-chip.is-warn .dash-status-value { color: #b45309; }

.dash-status-meta {
    font-size: .78rem;
    color: #64748b;
}

.dash-section-kicker {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #64748b;
    font-weight: 700;
    margin-bottom: .75rem;
}

.dash-today-card,
.dash-remain-card,
.dash-portfolio-card,
.dash-chart-card,
.dash-watch-card,
.dash-kpi {
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    overflow: hidden;
}

.dash-today-card-active {
    border-color: #f59e0b;
    background: linear-gradient(180deg, #fffbeb 0%, #fff 42%);
}

.dash-today-card-ok {
    background: linear-gradient(180deg, #f0fdf4 0%, #fff 40%);
}

.dash-today-ok {
    color: #166534;
    font-weight: 600;
    padding: .35rem 0;
}

.dash-today-col-head {
    font-weight: 700;
    margin-bottom: .6rem;
}

.dash-today-list,
.dash-mini-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dash-today-list li {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    padding: .55rem 0;
    border-top: 1px solid #f1f5f9;
}

.dash-today-list li:first-child { border-top: 0; }

.dash-today-title {
    font-weight: 600;
    color: #0f172a;
    text-decoration: none;
}

.dash-today-title:hover { color: #0369a1; }

.dash-today-sub {
    font-size: .8rem;
    color: #64748b;
}

.dash-today-amt {
    font-weight: 700;
    white-space: nowrap;
}

.dash-today-empty,
.dash-mini-empty {
    color: #94a3b8;
    font-size: .9rem;
}

.dash-remain-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.dash-remain-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: .75rem;
    border-top: 1px solid #e2e8f0;
    font-size: .9rem;
}

.dash-progress-row {
    display: flex;
    justify-content: space-between;
    font-size: .8rem;
    color: #64748b;
    margin-bottom: .25rem;
}

.dash-progress-bar {
    height: .45rem;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.dash-progress-bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.dash-progress-bar i.is-in { background: #16a34a; }
.dash-progress-bar i.is-out { background: #dc2626; }

.dash-port-block {
    background: #f8fafc;
    border-radius: .85rem;
    padding: .75rem .8rem;
    min-height: 100%;
    border: 1px solid #eef2f7;
}

.dash-port-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    font-weight: 700;
    font-size: .9rem;
    margin-bottom: .55rem;
    color: #0f172a;
}

.dash-mini-item {
    padding: .45rem 0;
    border-top: 1px solid #e2e8f0;
}

.dash-mini-item:first-child { border-top: 0; }

.dash-mini-link {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    text-decoration: none;
    color: inherit;
}

.dash-mini-link:hover .dash-mini-title { color: #0369a1; }

.dash-mini-title { font-weight: 600; font-size: .88rem; }
.dash-mini-sub { font-size: .75rem; color: #64748b; }
.dash-mini-detail { font-size: .75rem; color: #92400e; }
.dash-mini-item.is-critical .dash-mini-detail { color: #b91c1c; }
.dash-mini-more { font-size: .75rem; color: #94a3b8; padding-top: .35rem; }

.dash-chart-wrap {
    position: relative;
    width: 100%;
    min-height: 160px;
}

.dash-chart-card .card-body {
    padding: 1.15rem 1.25rem;
}

.dash-kpi-accent {
    background: linear-gradient(165deg, #f8fafc, #fff);
}

.dash-kpi .card-body {
    padding: 1.1rem 1.25rem;
}

.dash-kpi-alert {
    outline: 1px solid rgba(220, 53, 69, 0.35);
}

.dash-overdue-card {
    border: 1px solid #e8ecf0;
}

.dash-overdue-card-alert {
    border-color: rgba(220, 53, 69, 0.45);
    background: rgba(220, 53, 69, 0.04);
    box-shadow: 0 0 0 1px rgba(220, 53, 69, 0.08);
}

.docs-watch-card {
    border: 1px solid #e8ecf0;
}

.docs-watch-card .card-header {
    border-bottom: 1px solid #eef1f4;
}

.docs-watch-card-ok {
    border-color: rgba(25, 135, 84, 0.35);
    background: rgba(25, 135, 84, 0.04);
}

.docs-watch-card-alert {
    border-color: rgba(220, 53, 69, 0.4);
    background: rgba(220, 53, 69, 0.03);
}

.docs-watch-ok {
    display: flex;
    align-items: center;
    color: #146c43;
    font-weight: 600;
}

.docs-watch-ok i {
    color: #198754;
    font-size: 1.15rem;
}

.docs-watch-col-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 0.55rem;
}

.docs-watch-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.docs-watch-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid #eef1f4;
    border-radius: 0.55rem;
    background: #fff;
}

.docs-watch-item.is-critical {
    border-left: 3px solid #dc2626;
    background: rgba(220, 38, 38, 0.04);
}

.docs-watch-item.is-missing {
    border-left: 3px solid #d97706;
    background: rgba(217, 119, 6, 0.05);
}

.docs-watch-item.is-warn {
    border-left: 3px solid #eab308;
    background: rgba(234, 179, 8, 0.06);
}

.docs-watch-title {
    font-weight: 650;
    color: #1f2937;
    text-decoration: none;
}

.docs-watch-title:hover {
    color: #0f172a;
    text-decoration: underline;
}

.docs-watch-sub {
    font-size: 0.78rem;
    color: #6b7280;
    margin-top: 0.1rem;
}

.docs-watch-detail {
    font-size: 0.78rem;
    font-weight: 600;
    margin-top: 0.3rem;
}

.docs-watch-item.is-critical .docs-watch-detail { color: #b91c1c; }
.docs-watch-item.is-missing .docs-watch-detail { color: #b45309; }
.docs-watch-item.is-warn .docs-watch-detail { color: #a16207; }
.docs-watch-item.is-neutral {
    border-left: 3px solid #94a3b8;
    background: #fff;
}
.docs-watch-item.is-neutral .docs-watch-detail { color: #475569; }

.dash-plan-notes {
    padding: 0.65rem 0.85rem;
    background: #f8fafc;
    border: 1px solid #eef1f4;
    border-radius: 0.5rem;
}

.dash-plan-notes ul {
    padding-left: 1.1rem;
}

.settings-card {
    border: 0;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
    border-radius: 0.85rem;
}

.settings-card .card-header {
    border-bottom: 1px solid #eef1f4;
}

.settings-form .form-label {
    font-weight: 600;
    font-size: 0.875rem;
}

.dash-watch-table tbody tr.dash-row-today {
    background-color: rgba(255, 193, 7, 0.12);
}

.dash-watch-table tbody tr.dash-row-util-window {
    background-color: rgba(255, 243, 205, 0.72);
}

.dash-watch-table tbody tr.dash-row-util-day {
    background-color: rgba(255, 215, 64, 0.55);
}

.dash-watch-table tbody tr.dash-row-util-window.dash-row-overdue,
.dash-watch-table tbody tr.dash-row-util-day.dash-row-overdue {
    background-color: rgba(220, 53, 69, 0.1);
    box-shadow: inset 4px 0 0 rgba(255, 193, 7, 0.85);
}

.dash-watch-table tr.dash-watch-section td {
    padding: 0.45rem 0.75rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6c757d;
    background: #f3f5f7;
    border-top: 1px solid #e6ebf0;
    border-bottom: 1px solid #e6ebf0;
}

.dash-watch-table td.payment-status-overdue,
.dash-watch-table td.payment-status-today,
.dash-watch-table td.payment-status-upcoming,
.dash-watch-table td.payment-status-paid,
.dash-watch-table td.payment-status-none {
    font-weight: 600;
}

.dash-watch-table td.payment-status-overdue { color: #dc3545; }
.dash-watch-table td.payment-status-today { color: #d39e00; }
.dash-watch-table td.payment-status-paid { color: #198754; }
.dash-watch-table td.payment-status-upcoming { color: #212529; }
.dash-watch-table td.payment-status-none { color: #6c757d; }

.dash-watch-table td .payment-date {
    display: block;
    font-size: 0.8125rem;
    font-weight: 400;
    opacity: 0.85;
    color: inherit;
}

.dash-watch-table .dash-col-object {
    max-width: 220px;
    font-size: 0.875rem;
    line-height: 1.3;
}

.dash-watch-table .dash-col-amount {
    min-width: 7.5rem;
    font-size: 1rem;
}

/* Календарь аренды */
.rent-cal-card .card-header {
    border-bottom: 1px solid #eef1f4;
}

.rent-cal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 0.85rem;
    align-items: center;
    font-size: 0.75rem;
    color: #6b7280;
}

.rent-cal-leg {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.rent-cal-leg-sides {
    gap: 0.4rem;
    margin-left: 0.15rem;
    padding-left: 0.65rem;
    border-left: 1px solid #e5e7eb;
}

.rent-cal-side-tag {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: 0.3rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.rent-cal-side-out {
    background: rgba(185, 28, 28, 0.1);
    color: #b91c1c;
}

.rent-cal-side-in {
    background: rgba(4, 120, 87, 0.1);
    color: #047857;
}

.rent-cal-dot {
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #9ca3af;
    flex: 0 0 auto;
}

.rent-cal-dot-paid,
.rent-cal-mark.is-paid .rent-cal-dot { background: #16a34a; }
.rent-cal-dot-unpaid,
.rent-cal-mark.is-unpaid .rent-cal-dot { background: #eab308; }
.rent-cal-dot-overdue,
.rent-cal-mark.is-overdue .rent-cal-dot { background: #dc2626; }

.rent-cal-head,
.rent-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.4rem;
}

.rent-cal-wd {
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #9ca3af;
    padding: 0.15rem 0 0.45rem;
}

.rent-cal-day {
    min-height: 5.6rem;
    margin: 0;
    padding: 0.45rem 0.4rem 0.4rem;
    border: 1px solid #e8ecf0;
    border-radius: 0.65rem;
    background: #fff;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    cursor: default;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.rent-cal-day.is-outside {
    background: #f8fafc;
    border-color: transparent;
    opacity: 0.45;
}

.rent-cal-day.is-today {
    border-color: #2563eb;
    background: linear-gradient(180deg, #eff6ff 0%, #ffffff 62%);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.22), 0 2px 10px rgba(37, 99, 235, 0.12);
}

.rent-cal-day.is-today.has-events:not([disabled]):hover {
    border-color: #1d4ed8;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.28), 0 4px 14px rgba(37, 99, 235, 0.16);
}

.rent-cal-daytop {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.25rem;
    min-width: 0;
}

.rent-cal-num {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
}

.rent-cal-today-label {
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #1d4ed8;
    background: rgba(37, 99, 235, 0.12);
    border-radius: 999px;
    padding: 0.12rem 0.35rem;
    line-height: 1.1;
    white-space: nowrap;
}

.rent-cal-day.is-outside .rent-cal-num {
    color: #9ca3af;
}

.rent-cal-day.is-today .rent-cal-num {
    color: #1d4ed8;
    font-size: 0.95rem;
}

.rent-cal-day.has-events:not([disabled]) {
    cursor: pointer;
}

.rent-cal-day.has-events:not([disabled]):hover {
    border-color: #94a3b8;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    background: #fcfdff;
}

.rent-cal-day:disabled {
    cursor: default;
}

.rent-cal-marks {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-top: auto;
    min-width: 0;
}

.rent-cal-mark {
    display: flex;
    align-items: center;
    gap: 0.28rem;
    min-width: 0;
    padding: 0.12rem 0.28rem;
    border-radius: 0.35rem;
    font-size: 0.68rem;
    font-weight: 650;
    line-height: 1.15;
}

.rent-cal-mark-out.is-paid { background: rgba(22, 163, 74, 0.1); color: #15803d; }
.rent-cal-mark-out.is-unpaid { background: rgba(234, 179, 8, 0.16); color: #a16207; }
.rent-cal-mark-out.is-overdue { background: rgba(220, 38, 38, 0.12); color: #b91c1c; }

.rent-cal-mark-in.is-paid { background: rgba(22, 163, 74, 0.1); color: #15803d; }
.rent-cal-mark-in.is-unpaid { background: rgba(234, 179, 8, 0.16); color: #a16207; }
.rent-cal-mark-in.is-overdue { background: rgba(220, 38, 38, 0.12); color: #b91c1c; }

.rent-cal-sum {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.rent-cal-modal-section + .rent-cal-modal-section {
    margin-top: 1.1rem;
}

.rent-cal-modal-h {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.55rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid #eef1f4;
}

.rent-cal-modal-h span {
    font-size: 0.9rem;
    letter-spacing: 0;
    text-transform: none;
    font-variant-numeric: tabular-nums;
}

.rent-cal-modal-h-out { color: #b91c1c; }
.rent-cal-modal-h-in { color: #047857; }

.rent-cal-empty {
    font-size: 0.85rem;
    color: #9ca3af;
    font-style: italic;
    padding: 0.35rem 0;
}

.rent-cal-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 0.75rem;
    border: 1px solid #eef1f4;
    border-radius: 0.55rem;
    margin-bottom: 0.45rem;
    background: #fff;
}

.rent-cal-item.is-paid { border-left: 3px solid #16a34a; }
.rent-cal-item.is-unpaid { border-left: 3px solid #eab308; }
.rent-cal-item.is-overdue { border-left: 3px solid #dc2626; }

.rent-cal-item-title {
    font-weight: 650;
    color: #1f2937;
    font-size: 0.92rem;
}

.rent-cal-item-sub {
    font-size: 0.78rem;
    color: #6b7280;
    margin-top: 0.1rem;
}

.rent-cal-item-status {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.35rem;
}

.rent-cal-item.is-paid .rent-cal-item-status { color: #15803d; }
.rent-cal-item.is-unpaid .rent-cal-item-status { color: #a16207; }
.rent-cal-item.is-overdue .rent-cal-item-status { color: #b91c1c; }

.rent-cal-item-side {
    text-align: right;
    flex: 0 0 auto;
}

.rent-cal-item-amount {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.rent-cal-item-remain {
    font-size: 0.72rem;
    color: #6b7280;
    margin-top: 0.15rem;
}

@media (max-width: 767.98px) {
    .rent-cal-day {
        min-height: 4.4rem;
        padding: 0.3rem 0.25rem;
        border-radius: 0.45rem;
    }
    .rent-cal-num { font-size: 0.75rem; }
    .rent-cal-today-label {
        font-size: 0.5rem;
        padding: 0.08rem 0.28rem;
    }
    .rent-cal-day.is-today .rent-cal-num { font-size: 0.82rem; }
    .rent-cal-mark {
        font-size: 0.58rem;
        padding: 0.08rem 0.18rem;
    }
    .rent-cal-sum { max-width: 100%; }
    .rent-cal-head,
    .rent-cal-grid { gap: 0.25rem; }
}

/* План на 5 дней */
.dash-day-row > [class*="col"] {
    display: flex;
}

.dash-day-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e8ecf0;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.dash-day-today {
    border-color: #f0c94d;
    box-shadow: 0 0 0 1px rgba(240, 201, 77, 0.35), 0 1px 2px rgba(16, 24, 40, 0.04);
}

.dash-day-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.7rem 0.85rem 0.65rem;
    border-bottom: 1px solid #eef1f4;
    background: #fafbfc;
}

.dash-day-today .dash-day-head {
    background: #fff8e6;
    border-bottom-color: #f5e6b3;
}

.dash-day-label {
    font-size: 0.95rem;
    font-weight: 650;
    color: #1f2937;
    letter-spacing: -0.01em;
}

.dash-day-date {
    font-size: 0.8rem;
    color: #6b7280;
    font-variant-numeric: tabular-nums;
}

.dash-day-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    flex: 1 1 auto;
    min-height: 8rem;
}

.dash-day-col {
    padding: 0.65rem 0.7rem 0.75rem;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dash-day-col-out {
    background: #fff;
    border-right: 1px solid #eef1f4;
}

.dash-day-col-in {
    background: #fff;
}

.dash-day-col-title {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.45rem;
}

.dash-day-col-out .dash-day-col-title { color: #c0392b; }
.dash-day-col-in .dash-day-col-title { color: #1e7a45; }

.dash-day-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.dash-day-list.is-collapsed .dash-day-extra {
    display: none;
}

.dash-day-list li {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.4rem;
    min-width: 0;
}

.dash-day-more {
    margin-top: 0.45rem;
    padding: 0.2rem 0.45rem;
    border: 1px dashed #d0d7de;
    border-radius: 0.35rem;
    background: #f8fafc;
    color: #4b5563;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    width: 100%;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.dash-day-more:hover {
    background: #eef2f7;
    border-color: #b6c2cf;
    color: #1f2937;
}

.dash-day-more.is-open {
    border-style: solid;
    background: #fff;
}

.dash-day-meta {
    min-width: 0;
    flex: 1 1 auto;
}

.dash-day-place {
    display: block;
    font-size: 0.75rem;
    line-height: 1.25;
    color: #1f2937;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-day-who {
    display: block;
    font-size: 0.68rem;
    line-height: 1.2;
    color: #6b7280;
    margin-top: 0.1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-day-amt {
    flex: 0 0 auto;
    font-size: 0.72rem;
    font-weight: 650;
    line-height: 1.25;
    color: #374151;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    text-align: right;
}

.dash-day-empty {
    font-size: 0.75rem;
    color: #9ca3af;
    font-style: italic;
    margin-top: 0.15rem;
}

.dash-day-foot {
    margin-top: auto;
    padding: 0.55rem 0.85rem 0.45rem;
    border-top: 1px solid #eef1f4;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dash-day-sum {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.dash-day-sum strong {
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
    font-weight: 650;
}

.dash-day-diff {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.2rem;
    padding: 0.35rem 0.5rem;
    border-radius: 0.4rem;
    font-size: 0.75rem;
}

.dash-day-diff strong {
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.dash-day-diff-plus {
    background: rgba(25, 135, 84, 0.1);
    color: #146c43;
}

.dash-day-diff-minus {
    background: rgba(220, 53, 69, 0.1);
    color: #b02a37;
}

.dash-day-actions {
    padding: 0 0.85rem 0.75rem;
    background: #f8fafc;
}

.dash-tg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.38rem 0.65rem;
    border: 1px solid #d8dee6;
    border-radius: 0.4rem;
    background: #fff;
    color: #3a4a5c;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.dash-tg-btn i {
    font-size: 0.85rem;
    color: #2aabee;
}

.dash-tg-btn:hover:not(:disabled) {
    background: #f0f7fc;
    border-color: #9ec9e8;
    color: #1e3a52;
    box-shadow: 0 1px 2px rgba(42, 171, 238, 0.12);
}

.dash-tg-btn:disabled,
.dash-tg-btn.is-sending {
    opacity: 0.7;
    cursor: wait;
}

.dash-tg-rent-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.dash-tg-rent-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.42rem 0.75rem;
    border: 1px solid #d8dee6;
    border-radius: 0.4rem;
    background: #fff;
    color: #3a4a5c;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.dash-tg-rent-btn i {
    font-size: 0.85rem;
    color: #2aabee;
}

.dash-tg-rent-btn:hover:not(:disabled) {
    background: #f0f7fc;
    border-color: #9ec9e8;
    color: #1e3a52;
    box-shadow: 0 1px 2px rgba(42, 171, 238, 0.12);
}

.dash-tg-rent-btn:disabled,
.dash-tg-rent-btn.is-sending {
    opacity: 0.7;
    cursor: wait;
}

/* Карточка объекта: выравнивание блоков по горизонтали */
.prop-board {
    display: grid;
    grid-template-columns: repeat(var(--prop-cols, 2), minmax(0, 1fr));
    gap: 0.85rem 1rem;
    align-items: stretch;
}

.prop-board-col {
    min-width: 0;
    display: flex;
}

.prop-board-col > .prop-side {
    width: 100%;
}

.prop-side-block .card-body {
    height: 100%;
}

.prop-side .card-header {
    border-bottom: 1px solid #eef1f4;
}

.prop-util-panel {
    border-radius: 0.45rem;
    padding: 0.65rem 0.75rem;
}

.prop-panel-paid {
    background: rgba(25, 135, 84, 0.14);
}

.prop-panel-window {
    background: rgba(255, 193, 7, 0.22);
}

.prop-panel-overdue {
    background: rgba(220, 53, 69, 0.14);
}

.prop-panel-idle {
    background: rgba(13, 110, 253, 0.05);
}

@media (max-width: 991.98px) {
    .prop-board {
        grid-template-columns: 1fr;
    }
}

.prop-kv {
    display: flex;
    align-items: baseline;
    gap: 0;
    padding: 0.28rem 0;
    font-size: 0.875rem;
    line-height: 1.35;
}

.prop-kv > span {
    display: flex;
    flex: 1 1 auto;
    align-items: baseline;
    min-width: 0;
    color: #6b7280;
}

/* Точечный лидер между подписью и значением */
.prop-kv > span::after {
    content: '';
    flex: 1 1 auto;
    border-bottom: 1px dotted #c5ccd6;
    margin-left: 0.45rem;
    margin-right: 0.45rem;
    min-width: 0.75rem;
    transform: translateY(-0.3em);
}

.prop-kv > strong {
    flex: 0 1 auto;
    max-width: 62%;
    text-align: right;
    font-weight: 600;
    color: #1f2937;
    word-break: break-word;
}

.prop-kv-warn {
    margin: 0.1rem -0.35rem;
    padding: 0.28rem 0.35rem;
    border-radius: 0.35rem;
    background: rgba(234, 179, 8, 0.16);
}

.prop-kv-warn > span,
.prop-kv-warn > strong {
    color: #92400e;
}

.prop-kv-danger {
    margin: 0.1rem -0.35rem;
    padding: 0.28rem 0.35rem;
    border-radius: 0.35rem;
    background: rgba(220, 38, 38, 0.12);
}

.prop-kv-danger > span,
.prop-kv-danger > strong {
    color: #b91c1c;
}

@media (max-width: 575.98px) {
    .prop-kv > strong {
        max-width: 58%;
    }
}

.prop-status {
    font-size: 0.9rem;
}

.prop-rent-table th,
.prop-rent-table td {
    vertical-align: top;
    font-size: 0.875rem;
}

.prop-rent-cell {
    border-radius: 0.45rem;
    padding: 0.55rem 0.65rem;
    min-height: 100%;
}

.prop-rent-cell-sum {
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    color: #1f2937;
}

.prop-rent-cell-of {
    font-weight: 500;
    color: #6b7280;
}

.prop-rent-cell-badge {
    display: inline-block;
    margin-top: 0.2rem;
    font-size: 0.68rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.prop-rent-cell-paid {
    background: rgba(25, 135, 84, 0.14);
}

.prop-rent-cell-paid .prop-rent-cell-badge {
    color: #146c43;
}

.prop-rent-cell-soon {
    background: rgba(255, 193, 7, 0.22);
}

.prop-rent-cell-soon .prop-rent-cell-badge {
    color: #9a7b00;
}

.prop-rent-cell-overdue {
    background: rgba(220, 53, 69, 0.14);
}

.prop-rent-cell-overdue .prop-rent-cell-badge {
    color: #b02a37;
}

.prop-rent-cell-open {
    background: rgba(13, 110, 253, 0.06);
}

.prop-rent-cell-preview {
    background: transparent;
}

.prop-pay-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.7rem;
    border: none;
    border-radius: 999px;
    background: linear-gradient(180deg, #4dabf7 0%, #228be6 100%);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    box-shadow: 0 1px 2px rgba(34, 139, 230, 0.28);
    transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.prop-pay-btn:hover,
.prop-pay-btn:focus {
    color: #fff;
    filter: brightness(1.05);
    box-shadow: 0 2px 6px rgba(34, 139, 230, 0.35);
}

.prop-pay-btn:active {
    transform: translateY(1px);
}

.prop-pay-btn i {
    font-size: 0.85rem;
}

.prop-rent-preview {
    opacity: 0.55;
    background: #f8fafc;
}

.prop-rent-preview-note {
    margin-top: 0.2rem;
    font-size: 0.68rem;
    font-weight: 500;
    color: #6b7280;
    letter-spacing: 0.01em;
}

/* Тосты для AJAX-действий */
.app-toast-host {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    width: min(360px, calc(100vw - 2rem));
    pointer-events: none;
}

.app-toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 0.95rem;
    border-radius: 0.7rem;
    color: #fff;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.22);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.app-toast.is-in {
    opacity: 1;
    transform: translateY(0);
}

.app-toast.is-out {
    opacity: 0;
    transform: translateY(8px);
}

.app-toast-success { background: #198754; }
.app-toast-danger { background: #dc3545; }
.app-toast-warning { background: #d97706; }
.app-toast-info { background: #0d6efd; }

.app-toast-msg {
    font-size: 0.92rem;
    line-height: 1.35;
}

.app-toast-close {
    border: 0;
    background: transparent;
    color: inherit;
    opacity: 0.85;
    font-size: 1.2rem;
    line-height: 1;
    padding: 0;
}

.app-toast-close:hover {
    opacity: 1;
}

/* Drive-like документы на карточке объекта */
.drive-docs {
    border: 1px solid #e8ecf1;
    border-radius: 0.65rem;
    background: linear-gradient(180deg, #fbfcfd 0%, #f4f7fa 100%);
    overflow: hidden;
}

.drive-docs-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    border: 0;
    background: transparent;
    text-align: left;
}

.drive-docs-toggle:hover {
    background: rgba(15, 23, 42, 0.03);
}

.drive-docs-toggle-left,
.drive-docs-toggle-right {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.drive-docs-toggle-left .bi {
    color: #f4b400;
    font-size: 1.15rem;
}

.drive-docs-title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6c757d;
}

.drive-docs-count {
    min-width: 1.4rem;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    background: #e9eef5;
    color: #495057;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}

.drive-docs-toggle-label {
    font-size: 0.8rem;
    color: #6c757d;
}

.drive-docs-chevron {
    transition: transform 0.2s ease;
    color: #6c757d;
}

.drive-docs.is-open .drive-docs-chevron {
    transform: rotate(180deg);
}

.drive-docs-body {
    padding: 0 0.85rem 0.85rem;
    border-top: 1px solid #eef1f4;
}

.drive-docs-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.65rem 0 0.45rem;
}

.drive-toolbar-left,
.drive-toolbar-right,
.gdocs-toolbar-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.drive-toolbar-left,
.gdocs-toolbar-left {
    flex: 1 1 auto;
}

.drive-up-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    border: 0;
    border-radius: 999px;
    padding: 0.28rem 0.7rem 0.28rem 0.4rem;
    background: #fff;
    color: #343a40;
    font-weight: 600;
    font-size: 0.8125rem;
    box-shadow: inset 0 0 0 1px #d7dee7;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.drive-up-btn .bi {
    font-size: 1.15rem;
    line-height: 1;
}

.drive-up-btn:hover:not(:disabled),
.drive-up-btn:focus-visible:not(:disabled) {
    background: #e7f1ff;
    color: #0d6efd;
    box-shadow: inset 0 0 0 1px #b6d4fe;
}

.drive-up-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.drive-open-prop-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 0;
    border-radius: 999px;
    padding: 0.28rem 0.75rem;
    background: #fff;
    color: #0b5ed7;
    font-weight: 600;
    font-size: 0.8125rem;
    text-decoration: none;
    box-shadow: inset 0 0 0 1px #b6d4fe;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.drive-open-prop-btn:hover {
    background: #e7f1ff;
    color: #0a58ca;
    box-shadow: inset 0 0 0 1px #9ec5fe;
}

.drive-tile-tip {
    position: fixed;
    z-index: 1080;
    max-width: min(320px, calc(100vw - 16px));
    padding: 0.7rem 0.85rem;
    border-radius: 0.65rem;
    background: #212529;
    color: #f8f9fa;
    box-shadow: 0 10px 28px rgba(33, 37, 41, 0.28);
    pointer-events: none;
}

.drive-tile-tip-title {
    font-weight: 650;
    font-size: 0.88rem;
    line-height: 1.3;
    word-break: break-word;
    margin-bottom: 0.35rem;
}

.drive-tile-tip-line {
    font-size: 0.75rem;
    line-height: 1.35;
    color: rgba(248, 249, 250, 0.78);
    word-break: break-word;
}

.drive-tile-tip-line + .drive-tile-tip-line {
    margin-top: 0.15rem;
}

.drive-view-toggle {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem;
    border-radius: 0.55rem;
    background: #e9eef4;
    gap: 0.1rem;
}

.drive-view-btn {
    border: 0;
    background: transparent;
    color: #6c757d;
    border-radius: 0.4rem;
    padding: 0.28rem 0.45rem;
    line-height: 1;
}

.drive-view-btn:hover {
    color: #212529;
    background: rgba(255, 255, 255, 0.55);
}

.drive-view-btn.is-active {
    background: #fff;
    color: #0d6efd;
    box-shadow: 0 1px 2px rgba(33, 37, 41, 0.08);
}

/* Плитки как в проводнике Windows — рядом, с переносом */
.drive-docs-list.is-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: flex-start;
    align-items: stretch;
    gap: 0.55rem;
    max-height: none;
}

.drive-docs-list.is-grid .drive-empty {
    flex: 1 1 100%;
    width: 100%;
}

.drive-docs-list.is-grid .drive-tile {
    flex: 0 0 112px;
    width: 112px;
    max-width: 112px;
}

.drive-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-radius: 0.7rem;
    background: #fff;
    box-shadow: inset 0 0 0 1px #eef1f4;
    transition: box-shadow 0.15s ease, background 0.15s ease;
}

.drive-tile:hover {
    background: #f8fafc;
    box-shadow: inset 0 0 0 1px #d7e3f4;
}

.drive-tile-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: center;
    padding: 0.85rem 0.55rem 0.65rem;
    min-height: 7.5rem;
}

.drive-tile-icon {
    font-size: 2.35rem;
    line-height: 1;
}

.drive-tile-folder .drive-tile-icon {
    color: #f4b400;
}

.gdocs-virtual-row.drive-tile .drive-tile-icon {
    color: #4c6ef5;
}

.gdocs-virtual-row.drive-tile .drive-tile-icon .bi-buildings,
.gdocs-virtual-row.drive-tile .drive-tile-icon .bi-building {
    color: #364fc7;
}

.gdocs-virtual-row.drive-tile .drive-tile-icon .bi-people-fill,
.gdocs-virtual-row.drive-tile .drive-tile-icon .bi-person-fill {
    color: #0b7285;
}

.drive-tile-name {
    font-weight: 600;
    font-size: 0.82rem;
    color: #212529;
    width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    line-height: 1.25;
}

.drive-tile-meta {
    font-size: 0.68rem;
    color: #868e96;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.drive-tile-count {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    min-width: 1.4rem;
    padding: 0.1rem 0.35rem;
    border-radius: 999px;
    background: #eef2f7;
    color: #5c6770;
    font-size: 0.68rem;
    font-weight: 650;
    text-align: center;
}

.drive-tile-actions {
    position: absolute;
    top: 0.3rem;
    left: 0.3rem;
    display: flex;
    gap: 0.1rem;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.drive-tile:hover .drive-tile-actions,
.drive-tile:focus-within .drive-tile-actions {
    opacity: 1;
}

.drive-tile-actions .drive-row-ren,
.drive-tile-actions .drive-row-del,
.drive-tile-actions .drive-row-dl {
    padding: 0.3rem;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 2px rgba(33, 37, 41, 0.08);
}

.drive-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem;
    min-width: 0;
    font-size: 0.82rem;
}

.drive-crumb {
    border: 0;
    background: transparent;
    color: #0d6efd;
    padding: 0;
    font-weight: 500;
}

.drive-crumb.is-current {
    color: #212529;
    font-weight: 600;
    pointer-events: none;
}

.drive-crumb-sep {
    color: #adb5bd;
    padding: 0 0.1rem;
}

.drive-docs-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
    max-height: 280px;
    overflow: auto;
}

.drive-empty {
    padding: 1.1rem 0.75rem;
    text-align: center;
    color: #6c757d;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.65);
    border-radius: 0.5rem;
    border: 1px dashed #d7dee7;
}

/* --- Глобальная страница Документы --- */
.gdocs-header {
    align-items: flex-end;
}

.gdocs-shell {
    background: linear-gradient(180deg, #f7f9fc 0%, #eef2f7 100%);
    border-radius: 1rem;
    overflow: hidden;
}

.gdocs-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.72);
    border-bottom: 1px solid #e6ebf1;
}

.gdocs-toolbar-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.gdocs-search {
    position: relative;
    min-width: min(100%, 280px);
}

.gdocs-search .bi {
    position: absolute;
    left: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    color: #8b95a1;
    pointer-events: none;
}

.gdocs-search .form-control {
    padding-left: 2rem;
    background: #fff;
    border-color: #d7dee7;
}

.gdocs-body {
    padding: 1rem;
}

.gdocs-list.drive-docs-list {
    max-height: none;
    min-height: 280px;
    margin-bottom: 1rem;
}

.gdocs-list.drive-docs-list.is-grid {
    max-height: none;
}

.gdocs-row-count {
    flex: 0 0 auto;
    min-width: 1.75rem;
    margin-right: 0.65rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: #eef2f7;
    color: #5c6770;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}

.gdocs-virtual-row .drive-row-icon {
    color: #4c6ef5;
}

.gdocs-virtual-row .drive-row-icon .bi-buildings,
.gdocs-virtual-row .drive-row-icon .bi-building {
    color: #364fc7;
}

.gdocs-virtual-row .drive-row-icon .bi-people-fill,
.gdocs-virtual-row .drive-row-icon .bi-person-fill {
    color: #0b7285;
}

.gdocs-upload {
    margin-top: 0.25rem;
}

@media (max-width: 768px) {
    .gdocs-toolbar {
        align-items: stretch;
    }

    .gdocs-toolbar-right {
        width: 100%;
    }

    .gdocs-search {
        flex: 1 1 auto;
        min-width: 0;
    }
}

.drive-row {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    width: 100%;
    border: 0;
    border-radius: 0.5rem;
    background: #fff;
    text-align: left;
    padding: 0;
    box-shadow: inset 0 0 0 1px #eef1f4;
}

.drive-row-folder .drive-row-open,
.drive-row-open {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 0.55rem 0.65rem;
}

.drive-row-folder .drive-row-open:hover,
.drive-row-open:hover {
    background: rgba(13, 110, 253, 0.05);
}

.drive-row-icon {
    flex: 0 0 auto;
    width: 1.6rem;
    text-align: center;
    font-size: 1.25rem;
    line-height: 1;
}

.drive-row-folder .drive-row-icon {
    color: #f4b400;
}

.doc-icon-pdf { color: #d94841; }
.doc-icon-image { color: #2f9e44; }
.doc-icon-word { color: #1c7ed6; }
.doc-icon-excel { color: #2f9e44; }
.doc-icon-heic { color: #e67700; }
.doc-icon-file { color: #868e96; }

.drive-row-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.drive-row-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.drive-row-meta {
    font-size: 0.75rem;
    color: #868e96;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.drive-row-dl,
.drive-row-ren,
.drive-row-del {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: #6c757d;
    padding: 0.55rem 0.55rem;
    line-height: 1;
    text-decoration: none;
    border-radius: 0.4rem;
    transition: color 0.15s ease, background 0.15s ease;
}

.drive-row-dl:hover,
.drive-row-ren:hover {
    color: #0d6efd;
    background: rgba(13, 110, 253, 0.08);
}

.drive-row-del:hover {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.08);
}

.doc-delete-modal .doc-delete-icon {
    width: 3.25rem;
    height: 3.25rem;
    margin: 0 auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    font-size: 1.35rem;
}

.doc-delete-modal .modal-title {
    font-weight: 650;
    font-size: 1.05rem;
}

.drive-dropzone {
    position: relative;
    border: 1.5px dashed #c5d0dc;
    border-radius: 0.7rem;
    background: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.drive-dropzone:hover,
.drive-dropzone.is-dragover {
    border-color: #0d6efd;
    background: rgba(13, 110, 253, 0.06);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.08);
}

.drive-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.drive-dropzone-inner {
    pointer-events: none;
    padding: 1.1rem 0.9rem;
    text-align: center;
}

.drive-dropzone-inner .bi {
    font-size: 1.6rem;
    color: #0d6efd;
}

.drive-dropzone-title {
    font-weight: 600;
    margin-top: 0.25rem;
}

.drive-dropzone-sub {
    font-size: 0.78rem;
    color: #6c757d;
    margin-top: 0.15rem;
}

.drive-upload-extra {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    align-items: center;
}

/* Полноэкранный просмотр документа */
body.doc-viewer-open {
    overflow: hidden;
}

.doc-viewer[hidden] {
    display: none !important;
}

.doc-viewer {
    position: fixed;
    inset: 0;
    z-index: 1080;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 1rem;
}

.doc-viewer-shell {
    width: min(1100px, 100%);
    background: #111827;
    border-radius: 0.85rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.doc-viewer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: #1f2937;
    color: #f8fafc;
}

.doc-viewer-bar-left,
.doc-viewer-bar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.doc-viewer-icon {
    font-size: 1.4rem;
}

.doc-viewer-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: min(55vw, 520px);
}

.doc-viewer-meta {
    font-size: 0.75rem;
    color: #9ca3af;
}

.doc-viewer-stage {
    flex: 1;
    min-height: min(78vh, 820px);
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.04), transparent 45%),
        #0b1220;
    padding: 0.75rem;
}

.doc-viewer-frame {
    width: 100%;
    height: min(78vh, 820px);
    border: 0;
    border-radius: 0.35rem;
    background: #fff;
}

.doc-viewer-image {
    max-width: 100%;
    max-height: min(78vh, 820px);
    object-fit: contain;
    border-radius: 0.35rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.doc-viewer-fallback {
    text-align: center;
    color: #e5e7eb;
    padding: 2rem 1rem;
}

.doc-viewer-fallback .bi {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.75rem;
}

@media (max-width: 576px) {
    .drive-upload-extra {
        grid-template-columns: 1fr;
    }

    .doc-viewer {
        padding: 0;
    }

    .doc-viewer-shell {
        border-radius: 0;
    }

    .doc-viewer-name {
        max-width: 42vw;
    }
}

.pay-history {
    margin-top: 0.55rem;
    padding-top: 0.45rem;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.prop-rent-cell .pay-history {
    margin-top: 0.45rem;
    padding-top: 0.4rem;
}

.pay-history-item {
    padding: 0.35rem 0;
    font-size: 0.78rem;
    line-height: 1.35;
}

.pay-history-item + .pay-history-item {
    border-top: 1px dashed rgba(15, 23, 42, 0.08);
}

.pay-history-item.is-latest {
    padding-top: 0;
}

.pay-history-sum {
    color: #1f2937;
    font-variant-numeric: tabular-nums;
}

.pay-history-label {
    color: #4b5563;
    font-weight: 600;
}

.pay-history-dot {
    color: #9ca3af;
    margin: 0 0.15rem;
}

.pay-history-meta {
    color: #6b7280;
    margin-top: 0.1rem;
}

.pay-history-note {
    color: #374151;
    margin-top: 0.2rem;
    word-break: break-word;
    font-style: italic;
}

.pay-history .js-pay-more {
    font-size: 0.75rem;
    color: #64748b;
    text-decoration: none;
}

.pay-history .js-pay-more:hover {
    color: #0d6efd;
}

.util-history-panel {
    max-height: 220px;
    overflow: auto;
    border: 1px solid #eef1f4;
    border-radius: 0.45rem;
    background: #f8fafc;
    padding: 0.55rem 0.75rem;
}

.util-history-item {
    padding: 0.45rem 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.8125rem;
}

.util-history-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.util-history-item:first-child {
    padding-top: 0;
}

.dash-day-diff-zero {
    background: #eef1f4;
    color: #4b5563;
}

/* ������ ��������� */
.reg-card {
    border: 1px solid #e8ecf0;
    border-radius: 0.85rem;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.reg-table {
    font-size: 0.875rem;
}

.reg-table thead th {
    background: #f8fafc;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border-bottom: 1px solid #e8ecf0;
    white-space: nowrap;
    padding: 0.75rem 0.85rem;
    vertical-align: middle;
}

.reg-table tbody td {
    padding: 0.7rem 0.85rem;
    border-color: #eef1f4;
    vertical-align: top;
}

.reg-row-group-start td.reg-num,
.reg-row-group-start td.reg-addr {
    background: #fcfdff;
    border-right: 1px solid #eef1f4;
}

.reg-num {
    width: 2.5rem;
    text-align: center;
    font-weight: 700;
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
}

.reg-addr {
    min-width: 11rem;
    max-width: 16rem;
}

.reg-addr-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.reg-addr-link:hover .reg-addr-name,
.reg-addr-link:hover .reg-addr-line {
    color: #1d4ed8;
    text-decoration: underline;
}

.reg-addr-name {
    display: block;
    font-weight: 650;
    color: #1f2937;
    line-height: 1.25;
}

.reg-addr-line {
    display: block;
    color: #64748b;
    font-size: 0.8rem;
    margin-top: 0.15rem;
    line-height: 1.3;
}

.reg-role {
    display: inline-block;
    padding: 0.18rem 0.45rem;
    border-radius: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.reg-role.is-owner {
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

.reg-role.is-tenant {
    background: rgba(4, 120, 87, 0.1);
    color: #047857;
}

.reg-docs {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-width: 12rem;
}

.reg-doc-title {
    font-weight: 650;
    color: #1f2937;
    line-height: 1.2;
}

.reg-doc-range {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 0.12rem;
    line-height: 1.3;
}

.reg-doc-badge {
    font-weight: 700;
    margin-left: 0.15rem;
}

.reg-doc.is-warn {
    padding: 0.25rem 0.4rem;
    margin: -0.25rem -0.4rem;
    border-radius: 0.35rem;
    background: rgba(234, 179, 8, 0.14);
}

.reg-doc.is-warn .reg-doc-title,
.reg-doc.is-warn .reg-doc-range,
.reg-doc.is-warn .reg-doc-badge {
    color: #92400e;
}

.reg-doc.is-danger {
    padding: 0.25rem 0.4rem;
    margin: -0.25rem -0.4rem;
    border-radius: 0.35rem;
    background: rgba(220, 38, 38, 0.1);
}

.reg-doc.is-danger .reg-doc-title,
.reg-doc.is-danger .reg-doc-range,
.reg-doc.is-danger .reg-doc-badge {
    color: #b91c1c;
}

.reg-name a {
    font-weight: 650;
    color: #1f2937;
    text-decoration: none;
}

.reg-name a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.reg-phone a {
    color: #334155;
    text-decoration: none;
    white-space: nowrap;
}

.reg-phone a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.reg-amount {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: #1f2937;
}

.reg-day {
    color: #475569;
    font-weight: 600;
}

.reg-addr .sticky-mini-row,
.reg-name .sticky-mini-row {
    margin-top: 0.4rem;
}

.reg-table .sticky-mini {
    max-width: 11rem;
    font-size: 0.72rem;
    line-height: 1.25;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
}

@media (max-width: 991.98px) {
    .reg-table {
        font-size: 0.8125rem;
    }
    .reg-addr {
        min-width: 9rem;
    }
}

/* ����� */
.archive-banner {
    border: 1px solid rgba(100, 116, 139, 0.35);
    background: #f8fafc;
    color: #334155;
}

.archive-list-card {
    border: 1px solid #e8ecf0;
    border-radius: 0.85rem;
    overflow: hidden;
}

.archive-table thead th {
    background: #f8fafc;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #64748b;
    border-bottom: 1px solid #e8ecf0;
}

.archive-table td {
    vertical-align: top;
    font-size: 0.875rem;
}

.archive-comment {
    max-width: 18rem;
    color: #64748b;
}

/* Налог на имущество */
.tax-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.tax-swatch,
.tax-color-btn {
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 0.35rem;
    border: 1px solid rgba(15, 23, 42, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex: 0 0 auto;
}

.tax-swatch.is-none,
.tax-color-btn.is-none {
    background:
        linear-gradient(45deg, #fff 46%, #ef4444 46%, #ef4444 54%, #fff 54%),
        #fff;
}

.tax-color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.tax-color-btn {
    padding: 0;
    cursor: pointer;
    background-clip: padding-box;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.tax-color-btn:hover {
    transform: scale(1.08);
}

.tax-color-btn.is-active {
    outline: none;
    border-color: #0f172a;
    box-shadow:
        0 0 0 2px #fff,
        0 0 0 4px #0f172a;
    transform: scale(1.12);
    z-index: 1;
}

.tax-color-btn.is-active::after {
    content: "✓";
    font-size: 0.85rem;
    font-weight: 800;
    color: #0f172a;
    text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 2px #fff;
    line-height: 1;
}

.tax-color-preview {
    margin-top: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
    padding: 0.65rem 0.75rem;
    min-height: 3.2rem;
    background: #fcfcfd;
    transition: background 0.12s ease, color 0.12s ease;
}

.tax-color-preview-label {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.2rem;
}

.tax-color-preview-sample {
    font-weight: 700;
    font-size: 0.92rem;
}

.tax-table-card {
    border: 1px solid #e8ecf0;
    border-radius: 0.85rem;
    overflow: hidden;
    background: #fff;
}

.tax-table-card.is-archived {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.tax-table-card.is-archived .tax-addr-cell,
.tax-table-card.is-archived .tax-cell {
    opacity: 0.92;
}

.tax-table {
    --tax-year-min: 8.5rem;
}

.tax-table thead th {
    background: #f8fafc;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #64748b;
    border-bottom: 1px solid #e8ecf0;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 2;
}

.tax-col-addr {
    min-width: 14rem;
    position: sticky;
    left: 0;
    z-index: 3;
    background: #f8fafc;
}

.tax-col-year {
    min-width: var(--tax-year-min);
}

.tax-addr-cell {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #fff;
    min-width: 14rem;
    max-width: 18rem;
    vertical-align: top;
}

.tax-table-card.is-archived .tax-addr-cell {
    background: #f8fafc;
}

.tax-addr-link {
    font-weight: 650;
    color: #0f172a;
    text-decoration: none;
}

.tax-addr-link:hover {
    text-decoration: underline;
}

.tax-addr-sub {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 0.15rem;
}

.tax-addr-badge {
    display: inline-block;
    margin-top: 0.35rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    background: #e2e8f0;
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
}

.tax-year-cell {
    border-left: 1px solid #eef2f6;
}

.tax-cell {
    width: 100%;
    min-height: 4.6rem;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 0.55rem 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    cursor: pointer;
    transition: box-shadow 0.12s ease, background 0.12s ease;
}

.tax-cell:hover,
.tax-cell:focus-visible {
    box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.45);
    outline: none;
    z-index: 1;
    position: relative;
}

.tax-cell.is-empty {
    background: #fcfcfd;
}

.tax-table-card.is-archived .tax-cell.is-empty {
    background: #f1f5f9;
}

.tax-cell-placeholder {
    color: #cbd5e1;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1;
}

.tax-cell-amount {
    font-weight: 700;
    font-size: 0.92rem;
    line-height: 1.2;
}

.tax-cell-comment {
    font-size: 0.78rem;
    line-height: 1.25;
    opacity: 0.92;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tax-cell-meta {
    margin-top: auto;
    font-size: 0.68rem;
    opacity: 0.75;
    line-height: 1.2;
}

@media (max-width: 992px) {
    .tax-table {
        --tax-year-min: 7.5rem;
    }
    .tax-col-addr,
    .tax-addr-cell {
        min-width: 11rem;
        max-width: 13rem;
    }
}

/* Примечания и стикеры */
.prop-notes-block .form-control {
    background: #fffdf5;
    border-color: #e8dfc8;
}

.prop-notes-readonly {
    white-space: pre-wrap;
    background: #fffdf5;
    border: 1px dashed #e8dfc8;
    border-radius: .5rem;
    padding: .6rem .75rem;
    font-size: .9rem;
}

.rent-terms-history .rent-terms-note {
    margin-top: .15rem;
    color: #64748b;
    font-style: italic;
}

.sticker-board-list {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: flex-start;
}

.sticky-note {
    position: relative;
    width: 9.2rem;
    min-height: 6.5rem;
    padding: 1.1rem .7rem .55rem;
    border-radius: .15rem .35rem .35rem .2rem;
    box-shadow:
        2px 3px 0 rgba(15, 23, 42, .06),
        0 10px 18px rgba(15, 23, 42, .12);
    transform: rotate(-1.5deg);
    font-family: "Segoe Print", "Comic Sans MS", "Chalkboard SE", cursive;
    line-height: 1.25;
}

.sticky-note:nth-child(2n) { transform: rotate(1.8deg); }
.sticky-note:nth-child(3n) { transform: rotate(-2.4deg); }
.sticky-note:nth-child(4n) { transform: rotate(1.1deg); }
.sticky-note:nth-child(5n) { transform: rotate(-0.8deg); }

.sticky-note.is-yellow { background: linear-gradient(180deg, #fff7a8 0%, #ffe566 100%); }
.sticky-note.is-pink { background: linear-gradient(180deg, #ffd0e2 0%, #ff9ec0 100%); }
.sticky-note.is-green { background: linear-gradient(180deg, #d7f7c8 0%, #a8e87a 100%); }
.sticky-note.is-blue { background: linear-gradient(180deg, #d4ecff 0%, #9fd0ff 100%); }
.sticky-note.is-orange { background: linear-gradient(180deg, #ffe0b8 0%, #ffb86b 100%); }

.sticky-note-tape {
    position: absolute;
    top: -0.35rem;
    left: 50%;
    width: 2.4rem;
    height: .55rem;
    transform: translateX(-50%) rotate(-2deg);
    background: rgba(255, 255, 255, .45);
    border: 1px solid rgba(255, 255, 255, .55);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
}

.sticky-note-date {
    font-size: .72rem;
    opacity: .75;
    margin-bottom: .25rem;
    font-family: system-ui, sans-serif;
    font-weight: 600;
}

.sticky-note-body {
    font-size: .92rem;
    color: #3f2f12;
    word-break: break-word;
}

.sticky-note-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: .35rem;
    font-family: system-ui, sans-serif;
}

.sticky-note-actions .btn-link {
    padding: 0;
    font-size: .72rem;
    text-decoration: none;
}

.sticker-color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}

.sticker-color-option {
    position: relative;
    width: 1.85rem;
    height: 1.85rem;
    margin: 0;
    cursor: pointer;
}

.sticker-color-option input {
    position: absolute;
    opacity: 0;
}

.sticker-color-option span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: .35rem;
    border: 2px solid transparent;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .15);
}

.sticker-color-option input:checked + span {
    outline: 2px solid #0f172a;
    outline-offset: 2px;
}

.sticker-color-option.is-yellow span { background: #ffe566; }
.sticker-color-option.is-pink span { background: #ff9ec0; }
.sticker-color-option.is-green span { background: #a8e87a; }
.sticker-color-option.is-blue span { background: #9fd0ff; }
.sticker-color-option.is-orange span { background: #ffb86b; }

.sticky-mini-row {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    margin-top: .35rem;
}

.sticky-mini {
    display: inline-block;
    max-width: 8.5rem;
    padding: .12rem .35rem;
    border-radius: .15rem;
    font-size: .68rem;
    line-height: 1.2;
    font-weight: 600;
    color: #3f2f12;
    box-shadow: 1px 1px 0 rgba(15, 23, 42, .12);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transform: rotate(-1deg);
}

.sticky-mini.is-yellow { background: #ffe566; }
.sticky-mini.is-pink { background: #ff9ec0; }
.sticky-mini.is-green { background: #a8e87a; }
.sticky-mini.is-blue { background: #9fd0ff; }
.sticky-mini.is-orange { background: #ffb86b; }

.cal2-entity-cell .sticky-mini-row {
    margin-top: .3rem;
}
