/* ATEB tizimi uchun WAVE (Frest) ustidan qo'shimcha stillar */
.card .card-title {
    text-transform: none;
}

.main-menu.menu-light .navigation > li > a {
    white-space: normal;
    display: flex;
    align-items: flex-start;
    line-height: 1.35;
}

.main-menu.menu-light .navigation > li > a > i {
    flex: none;
    margin-top: 0.1rem;
}

.main-menu.menu-light .navigation > li > a .menu-title {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.main-menu .navigation .navigation-header span {
    white-space: normal;
}

.main-menu .navigation > li.disabled > a {
    opacity: 0.5;
    cursor: not-allowed;
}

.dropdown-user form .dropdown-item {
    cursor: pointer;
}

.dropdown-language form .dropdown-item {
    cursor: pointer;
}

.crud-toolbar .form-control {
    width: auto;
    min-width: 200px;
}

.crud-toolbar .has-icon-left .form-control {
    min-width: 260px;
}

/* Sidebar brand */
.main-menu .navbar-header .navbar-brand {
    display: flex;
    align-items: center;
    margin-top: 1.1rem;
}

.main-menu .navbar-header .brand-logo img {
    height: 36px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.main-menu .navbar-header .brand-logo .bx {
    font-size: 2rem;
    line-height: 1;
}

.main-menu .navbar-header .brand-text {
    font-size: 1.45rem;
    line-height: 1;
    padding-left: 0.6rem;
}

/* Login page */
.auth-page {
    background: #f3f4fb;
}

.auth-wrapper {
    display: flex;
    min-height: 100vh;
}

.auth-brand {
    position: relative;
    flex: 0 0 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    color: #fff;
    text-align: center;
    background: radial-gradient(circle at 25% 20%, #24305e 0%, #131729 60%) center / cover no-repeat;
    overflow: hidden;
}

.auth-brand-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(19, 23, 41, 0.55) 0%, rgba(19, 23, 41, 0.9) 100%);
}

.auth-brand-content,
.auth-organization {
    position: relative;
    z-index: 1;
}

.auth-brand-content {
    max-width: 460px;
}

.auth-logo {
    height: 120px;
    width: auto;
    max-width: 320px;
    object-fit: contain;
    margin-bottom: 1.75rem;
}

/* The brand logo is navy and red: it sits on a white plate on the dark panel */
.auth-logo-plate {
    background: #fff;
    border-radius: 1rem;
    padding: 1rem 1.25rem;
}

.auth-logo-icon {
    width: 112px;
    height: 112px;
    margin: 0 auto 1.75rem;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(90, 141, 238, 0.15);
    box-shadow: 0 0 0 1px rgba(90, 141, 238, 0.35), 0 20px 50px rgba(90, 141, 238, 0.25);
}

.auth-logo-icon .bx {
    font-size: 4.5rem;
    color: #5a8dee;
}

.auth-title {
    color: #fff;
    font-size: 2.4rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.auth-description {
    color: rgba(255, 255, 255, 0.72);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 0;
}

.auth-organization {
    position: absolute;
    bottom: 2rem;
    left: 0;
    right: 0;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.95rem;
}

.auth-form-side {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4.5rem 1.5rem 3rem;
}

.auth-language {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 0.75rem;
    padding: 2.5rem 2.25rem;
    box-shadow: 0 10px 40px rgba(25, 42, 70, 0.08);
}

.auth-card-header {
    margin-bottom: 1.75rem;
}

.auth-card-brand {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #5a8dee;
}

.auth-card-brand img {
    max-height: 40px;
    margin-right: 0.6rem;
}

.auth-card-brand .bx {
    font-size: 2rem;
    margin-right: 0.5rem;
}

.auth-card .form-control-position {
    line-height: 3.1rem;
}

.auth-footer {
    margin: 2rem 0 0;
    font-size: 0.9rem;
}

@media (max-width: 767.98px) {
    .auth-brand {
        display: none;
    }
}

.balance-total {
    font-size: 1.05rem;
    white-space: nowrap;
}

.cursor-pointer {
    cursor: pointer;
}

.receipts-table td,
.receipts-table th {
    padding: 0.75rem 1rem;
}

/* Header: keep the page title and breadcrumbs on one line */
.header-navbar .bookmark-wrapper,
.header-navbar .main-bread,
.header-navbar .breadcrumb-wrapper {
    min-width: 0;
}

.header-navbar .main-bread {
    flex-wrap: nowrap;
    align-items: center;
}

.header-navbar .content-header-title {
    white-space: nowrap;
}

.header-navbar .breadcrumb-wrapper {
    overflow: hidden;
}

.header-navbar .breadcrumb {
    flex-wrap: nowrap;
    white-space: nowrap;
}

.header-navbar .breadcrumb-item.active {
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-navbar .navbar-collapse {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
}

.header-navbar .bookmark-wrapper {
    flex: 1 1 auto;
    overflow: hidden;
}

.header-navbar .navbar-nav.float-right {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    flex-direction: row;
}

/* Reports */
.report-table th,
.report-table td {
    padding: 0.5rem 0.75rem;
    vertical-align: middle;
}

.report-table .report-group th {
    background: #f2f4f8;
}

/* Printing: only the report/document itself */
.print-only {
    display: none;
}

@media print {
    @page {
        size: A4 landscape;
        margin: 12mm;
    }

    .main-menu, .header-navbar, .header-navbar-shadow, .footer, .no-print, .alert, #crud-modal {
        display: none !important;
    }

    .print-only {
        display: block;
    }

    body, .app-content, .content-wrapper {
        background: #fff !important;
    }

    .app-content.content {
        margin: 0 !important;
        padding: 0 !important;
    }

    .card {
        box-shadow: none !important;
        border: 0 !important;
    }

    .table-responsive {
        overflow: visible !important;
    }

    .report-table {
        font-size: 11px;
    }

    body, .card-title, .text-muted, .report-table th, .report-table td {
        color: #000 !important;
    }

    .report-table th, .report-table td {
        border-color: #000 !important;
    }
}

/* Dashboard cards */
.dashboard-stat {
    display: block;
    transition: box-shadow 0.2s;
}

.dashboard-stat:hover {
    box-shadow: 0 6px 24px rgba(25, 42, 70, 0.15);
}

.dashboard-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(90, 141, 238, 0.12);
    color: #5a8dee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex: none;
}

/* Object statuses: the colours of the complex map legend */
:root {
    --status-empty: #ffffff;
    --status-rent: #28c76f;
    --status-cadastre: #ea5455;
    --status-investor_full: #2f6fed;
    --status-investor_balance: #7367f0;
    --status-administration: #ffb400;
}

.status-badge {
    display: inline-block;
    padding: .2rem .6rem;
    border-radius: 1rem;
    font-size: .8rem;
    font-weight: 500;
    white-space: nowrap;
    color: #fff;
}

.status-badge.status-empty { color: #475f7b; background: #fff; box-shadow: inset 0 0 0 1px #475f7b; }
.status-badge.status-rent { background: var(--status-rent); }
.status-badge.status-cadastre { background: var(--status-cadastre); }
.status-badge.status-investor_full { background: var(--status-investor_full); }
.status-badge.status-investor_balance { background: var(--status-investor_balance); }
.status-badge.status-administration { background: var(--status-administration); color: #3a3a3a; }

/* Long texts (comments) can be made taller by the user */
textarea.form-control { resize: vertical; min-height: 4.5rem; }

/* Tables inside cards: room at the card edges, a quiet header, comfortable rows */
.card > .table-responsive > .table,
.card > .card-content > .table-responsive > .table,
.card .chart-table > .table {
    margin-bottom: 0;
}

.card .table thead th {
    background: #f7f9fc;
    border-top: 0;
    border-bottom: 1px solid #e9edf2;
    color: #6b7a90;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .04em;
    padding-top: .75rem;
    padding-bottom: .75rem;
    vertical-align: middle;
}

.card .table td {
    border-top: 1px solid #f0f2f6;
    padding-top: .65rem;
    padding-bottom: .65rem;
    vertical-align: middle;
}

.card .table th:first-child,
.card .table td:first-child {
    padding-left: 1.5rem;
}

.card .table th:last-child,
.card .table td:last-child {
    padding-right: 1.5rem;
}

.card .table tfoot th {
    background: #fafbfd;
    border-top: 1px solid #e9edf2;
    color: #304156;
}

.card .table-hover tbody tr:hover {
    background: #f6f9ff;
}

.card .table .badge-light-primary {
    font-weight: 500;
    letter-spacing: .02em;
}

/* Stat tiles of the list pages: a big number, a label, a coloured icon */
.stat-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.stat-tile {
    display: flex;
    flex-direction: row; /* .card is a column */
    align-items: center;
    text-align: left;
    gap: 1rem;
    margin: 0;
    padding: 1.1rem 1.35rem;
    color: inherit;
    border-left: 4px solid transparent;
    transition: transform .15s, box-shadow .15s;
}

.stat-tile:hover {
    color: inherit;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(26, 43, 76, .1);
}

.stat-tile.active { border-left-color: #5a8dee; }

.stat-tile-icon {
    flex: 0 0 3rem;
    height: 3rem;
    border-radius: .8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-tile-icon.primary { background: rgba(90, 141, 238, .14); color: #5a8dee; }
.stat-tile-icon.warning { background: rgba(253, 172, 65, .16); color: #e08b0b; }
.stat-tile-icon.secondary { background: rgba(71, 95, 123, .1); color: #475f7b; }
.stat-tile-icon.danger { background: rgba(255, 91, 92, .14); color: #e04848; }
.stat-tile-icon.success { background: rgba(57, 218, 138, .16); color: #1f9d5c; }
.stat-tile-value { font-size: 1.6rem; font-weight: 600; color: #304156; line-height: 1.2; white-space: nowrap; }
.stat-tile-label { color: #727e8c; font-size: .85rem; }

/* Filter forms: labels above the fields, buttons aligned with the fields */
.filter-card .form-group { margin-bottom: 1rem; }
.filter-card label { white-space: nowrap; }

/* The sidebar never scrolls sideways (long titles wrap) */
.main-menu .main-menu-content { overflow-x: hidden; }
.main-menu .navigation li a .menu-title { white-space: normal; }
