* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f7f3;
    color: #1f2a24;
}

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

.sidebar {
    width: 270px;
    background: #173d2b;
    color: #fff;
    padding: 22px;
    position: fixed;
    inset: 0 auto 0 0;
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 28px;
}

.brand-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: #d9ead3;
    color: #173d2b;
    display: grid;
    place-items: center;
    font-weight: 800;
}

.brand h1 {
    margin: 0;
    font-size: 20px;
}

.brand p {
    margin: 3px 0 0;
    opacity: .8;
    font-size: 13px;
}

nav a {
    display: block;
    color: #eaf5ee;
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 8px;
    font-weight: 600;
}

nav a:hover,
nav a.active {
    background: #2d6a4f;
}

.main {
    margin-left: 270px;
    padding: 24px;
    width: calc(100% - 270px);
}

.topbar {
    background: #fff;
    border-radius: 18px;
    padding: 18px 22px;
    box-shadow: 0 8px 24px rgba(0,0,0,.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.topbar h2 {
    margin: 0;
    font-size: 26px;
}

.topbar p {
    margin: 5px 0 0;
    color: #607064;
}

.refresh,
.btn,
button {
    border: 0;
    background: #2d6a4f;
    color: #fff;
    padding: 10px 16px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
}

.btn.primary {
    background: #1b5e20;
}

.filter {
    background: #fff;
    border-radius: 16px;
    padding: 14px;
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 18px;
    box-shadow: 0 8px 24px rgba(0,0,0,.05);
}

.filter input,
.filter select,
.form input,
.form select {
    border: 1px solid #d6dfd8;
    border-radius: 10px;
    padding: 10px 12px;
    min-width: 150px;
}

.form {
    display: grid;
    gap: 10px;
    max-width: 520px;
}

.form label {
    font-weight: 700;
    color: #34493b;
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.card {
    background: #fff;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 8px 24px rgba(0,0,0,.06);
    border-left: 6px solid #2d6a4f;
}

.card span {
    display: block;
    color: #657267;
    font-size: 14px;
    margin-bottom: 8px;
}

.card strong {
    font-size: 24px;
}

.card small {
    display: block;
    margin-top: 6px;
    color: #657267;
}

.card.success {
    border-left-color: #2e7d32;
}

.card.warning {
    border-left-color: #f9a825;
}

.card.danger {
    border-left-color: #c62828;
}

.panel {
    background: #fff;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 8px 24px rgba(0,0,0,.06);
    margin-bottom: 18px;
}

.panel h3 {
    margin-top: 0;
}

.grid2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.grid2 div {
    background: #f4f7f3;
    padding: 14px;
    border-radius: 12px;
}

.grid2 span {
    display: block;
    color: #657267;
    margin-bottom: 5px;
}

.table-wrap {
    overflow: auto;
    max-height: 70vh;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th {
    position: sticky;
    top: 0;
    background: #d9ead3;
    z-index: 1;
}

th,
td {
    border: 1px solid #dce5de;
    padding: 9px 10px;
    vertical-align: top;
}

tbody tr:nth-child(even) {
    background: #f8fbf8;
}

.empty {
    text-align: center;
    color: #7a877d;
    padding: 24px;
}

.badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: #e8f5e9;
    color: #1b5e20;
    font-weight: 700;
    white-space: nowrap;
}

.alert {
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 18px;
}

.alert.success {
    background: #e8f5e9;
    color: #1b5e20;
}

.alert.error {
    background: #ffebee;
    color: #b71c1c;
}

pre {
    white-space: pre-wrap;
}

@media (max-width: 1000px) {
    .sidebar {
        position: static;
        width: 100%;
    }

    .layout {
        display: block;
    }

    .main {
        margin-left: 0;
        width: 100%;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .filter {
        flex-wrap: wrap;
    }

    .grid2 {
        grid-template-columns: 1fr;
    }
}

.small-note {
    margin-top: -4px;
    font-size: 13px;
}

table input {
    width: 100%;
    border: 1px solid #d6dfd8;
    border-radius: 8px;
    padding: 8px 10px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 16px;
    border-radius: 12px;
    background: #b42318;
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
}

.logout-btn:hover {
    filter: brightness(0.95);
}

.report-description {
    margin: 10px 0 14px 0;
    line-height: 1.6;
}

.report-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    clear: both;
    position: relative;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 10px 18px;
    border-radius: 10px;
    background: #1f6f4a;
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
}

.download-btn:hover {
    filter: brightness(0.95);
}

.report-card .report-text {
    display: block !important;
    margin: 12px 0 18px 0 !important;
    line-height: 1.6 !important;
    clear: both !important;
}

.report-card .report-button-row {
    display: block !important;
    margin-top: 18px !important;
    clear: both !important;
}

.report-card .report-download-btn {
    display: inline-flex !important;
    position: static !important;
    margin: 0 !important;
}

.table-link {
    color: #0b5f3a;
    font-weight: 700;
    text-decoration: none;
}

.table-link:hover {
    text-decoration: underline;
}

.mini-badge {
    display: inline-flex;
    margin-left: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.mini-badge.danger {
    background: #fee2e2;
    color: #991b1b;
}

.back-link {
    display: inline-flex;
    align-items: center;
    margin-bottom: 14px;
    color: #0b5f3a;
    font-weight: 700;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

.detail-title {
    margin: 8px 0 16px 0;
}

.money-cell {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

/* JAMI qatoridagi raqamlar ham bir xil o'ng tomonga tekislansin */
tfoot th:not(:first-child):not(:last-child) {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

.row-number {
    width: 48px;
    min-width: 48px;
    text-align: center;
    white-space: nowrap;
}

.small-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 10px;
    background: #26734d;
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.small-btn:hover {
    background: #1f5f40;
}

.user-chip {
    display: grid;
    gap: 2px;
    min-width: 170px;
    padding: 8px 12px;
    border: 1px solid #d6dfd8;
    border-radius: 12px;
    background: #f4f7f3;
    color: #173d2b;
    line-height: 1.2;
}

.user-chip b {
    font-size: 13px;
}

.user-chip span {
    font-size: 12px;
    color: #607064;
}

.bank-login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: #eef4ef;
}

.bank-login-wrap {
    width: 100%;
    max-width: 460px;
    padding: 20px;
}

.bank-login-card {
    background: #ffffff;
    border-radius: 22px;
    padding: 28px;
    box-shadow: 0 16px 45px rgba(15, 23, 42, .10);
}

.bank-login-logo {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: #d9ead3;
    color: #173d2b;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 22px;
    margin-bottom: 18px;
}

.bank-login-card h1 {
    margin: 0 0 8px 0;
    font-size: 25px;
}

.bank-login-card p {
    margin: 0 0 18px 0;
    color: #607064;
    line-height: 1.5;
}

.bank-login-form {
    max-width: none;
}

.bank-login-form input {
    width: 100%;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 14px;
}

.user-admin-form {
    max-width: none;
}

.checkbox-field {
    display: flex;
    align-items: end;
}

.check-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #173d2b;
}

.check-line input {
    width: auto;
}

.users-table input,
.users-table select {
    width: 100%;
    min-width: 130px;
    height: 36px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    padding: 0 9px;
    background: #ffffff;
}

.small-btn {
    height: 36px;
    padding: 0 14px;
    border: 0;
    border-radius: 9px;
    background: #166534;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.small-btn:hover {
    background: #14532d;
}

.muted {
    color: #64748b;
    font-size: 13px;
}

@media (max-width: 900px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}


