* {
    box-sizing: border-box;
}

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

.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 420px;
}

.brand-panel {
    background: linear-gradient(135deg, #102a43, #243b53);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 70px;
}

.logo {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: white;
    color: #102a43;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    font-weight: 800;
    margin-bottom: 24px;
}

.logo.small {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 24px;
    margin: 0;
}

.brand-panel h1 {
    font-size: 52px;
    margin: 0 0 16px;
}

.brand-panel p {
    font-size: 18px;
    max-width: 520px;
    line-height: 1.6;
    color: #d9e2ec;
}

.auth-card {
    background: white;
    padding: 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: -12px 0 35px rgba(15, 23, 42, 0.08);
}

.auth-card h2 {
    font-size: 28px;
    margin: 0 0 26px;
}

label {
    display: block;
    margin: 14px 0 7px;
    font-weight: 700;
}

input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 15px;
}

button {
    width: 100%;
    border: 0;
    padding: 14px;
    border-radius: 12px;
    background: #102a43;
    color: white;
    font-size: 16px;
    font-weight: 700;
    margin-top: 22px;
    cursor: pointer;
}

button:hover {
    background: #243b53;
}

.register-link {
    margin-top: 22px;
    text-align: center;
    display: grid;
    gap: 8px;
}

.register-link a {
    color: #0f766e;
    font-weight: 700;
    text-decoration: none;
}

.flash-wrap {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 10;
    display: grid;
    gap: 10px;
}

.flash {
    padding: 13px 18px;
    border-radius: 12px;
    background: #e2e8f0;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

.flash.success {
    background: #dcfce7;
    color: #166534;
}

.flash.error {
    background: #fee2e2;
    color: #991b1b;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 310px 1fr;
}

.sidebar {
    background: #102a43;
    color: white;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.side-brand {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 32px;
}

.side-brand h2 {
    margin: 0;
    font-size: 23px;
}

.side-brand p {
    margin: 4px 0 0;
    color: #bcccdc;
    font-size: 13px;
}

nav {
    display: grid;
    gap: 8px;
}

nav a, .logout {
    color: #d9e2ec;
    text-decoration: none;
    padding: 13px 14px;
    border-radius: 12px;
    font-weight: 700;
}

nav a:hover, nav a.active {
    background: #243b53;
    color: white;
}

.logout {
    margin-top: auto;
    background: rgba(255,255,255,0.08);
    text-align: center;
}

.content {
    padding: 32px;
}

.topbar {
    background: white;
    border-radius: 18px;
    padding: 24px 28px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    margin-bottom: 26px;
}

.topbar h1 {
    margin: 0 0 8px;
}

.topbar p {
    margin: 0;
    color: #64748b;
}

.placeholder-card {
    background: white;
    border-radius: 18px;
    padding: 28px;
    min-height: 360px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.placeholder-card h2 {
    margin-top: 0;
}

.empty-state {
    margin-top: 34px;
    border: 2px dashed #cbd5e1;
    border-radius: 18px;
    padding: 36px;
    display: grid;
    gap: 10px;
    color: #475569;
    background: #f8fafc;
}

@media (max-width: 900px) {
    .auth-page, .app-shell {
        grid-template-columns: 1fr;
    }

    .brand-panel {
        padding: 36px;
    }

    .brand-panel h1 {
        font-size: 38px;
    }

    .sidebar {
        min-height: auto;
    }
}

.section-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.section-header h2 { margin: 0 0 8px; }
.section-header p { margin: 0; color: #64748b; }

.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.btn-primary { background: #102a43; color: white; padding: 13px 18px; }
.btn-primary:hover { background: #243b53; }
.btn-secondary { background: #e2e8f0; color: #102a43; padding: 10px 14px; }
.btn-secondary:hover { background: #cbd5e1; }

.table-wrap {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
}

table { width: 100%; border-collapse: collapse; background: white; }
th, td { text-align: left; padding: 15px 16px; border-bottom: 1px solid #e2e8f0; }
th { background: #f8fafc; color: #475569; font-size: 14px; }
tr:last-child td { border-bottom: 0; }

.badge {
    display: inline-block;
    padding: 6px 10px;
    background: #eef2ff;
    color: #3730a3;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
}

.form-card { max-width: 760px; }
.account-form { max-width: 560px; }

select {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 15px;
    background: white;
}

@media (max-width: 700px) {
    .section-header { flex-direction: column; }
    .btn-primary, .btn-secondary { width: 100%; }
}

.button-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.actions-cell {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.actions-cell form { margin: 0; }

.btn-danger {
    border: 0;
    cursor: pointer;
    background: #fee2e2;
    color: #991b1b;
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 700;
}

.btn-danger:hover { background: #fecaca; }

.info-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 20px;
    color: #334155;
}

.sub-title {
    margin: 18px 0 12px;
    color: #102a43;
}

.data-form {
    display: grid;
    gap: 18px;
    max-width: 680px;
}

.data-form label {
    display: grid;
    gap: 8px;
    font-weight: 700;
    color: #334155;
}

.data-form input,
.data-form select {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 15px;
    background: white;
}

.wide-card { width: 100%; }

.trial-table th,
.trial-table td {
    text-align: center;
    white-space: nowrap;
}

.trial-table th:nth-child(2),
.trial-table td:nth-child(2) {
    text-align: left;
    min-width: 220px;
}

.num-cell {
    text-align: right !important;
    font-variant-numeric: tabular-nums;
}

tfoot td {
    background: #f8fafc;
}

@media (max-width: 700px) {
    .button-row { width: 100%; }
    .button-row .btn-primary,
    .button-row .btn-secondary { width: 100%; }
}

/* v4 alignment fixes */
.trial-table { table-layout: fixed; width: 100%; }
.trial-table .col-no { width: 8%; }
.trial-table .col-name { width: 28%; }
.trial-table .col-money { width: 8%; }
.trial-table thead th { text-align: center !important; vertical-align: middle; }
.trial-table thead tr:first-child th[colspan="2"] { border-bottom: 1px solid #e2e8f0; }
.trial-table th, .trial-table td { padding-left: 14px; padding-right: 14px; }
.actions-cell { display: flex; gap: 10px; align-items: center; flex-wrap: nowrap; }
.actions-cell form { margin: 0; display: inline-flex; align-items: center; }
.actions-cell .btn-secondary, .actions-cell .btn-danger { height: 42px; min-width: 92px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.actions-cell .btn-danger { width: auto; margin-top: 0; }

/* v5 journal entry and trial-balance number alignment */
.data-form textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 15px;
    background: white;
    resize: vertical;
    font-family: inherit;
}

.trial-table .num-cell {
    text-align: center !important;
    font-variant-numeric: tabular-nums;
}

.trial-table thead th {
    text-align: center !important;
}

.trial-table tfoot td {
    text-align: center;
}

/* v6 date filters and centered amount cells */
.filter-form {
    display: flex;
    align-items: end;
    gap: 14px;
    flex-wrap: wrap;
    margin: 18px 0 22px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #f8fafc;
}

.filter-form label {
    display: grid;
    gap: 8px;
    font-weight: 700;
    color: #334155;
}

.filter-form input,
.filter-form select {
    min-width: 190px;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 15px;
    background: white;
}

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

.trial-table .num-cell,
.trial-table tfoot .num-cell {
    text-align: center !important;
    padding-left: 8px;
    padding-right: 8px;
}

/* v8 Excel import and DD/MM/YY date inputs */
.import-form {
    display: grid;
    grid-template-columns: 1fr minmax(220px, 320px) auto;
    gap: 14px;
    align-items: center;
    margin: 0 0 22px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #f8fafc;
}

.import-form div {
    display: grid;
    gap: 4px;
    color: #334155;
}

.import-form span {
    color: #64748b;
    font-size: 13px;
}

.import-form input[type="file"] {
    background: white;
    padding: 10px 12px;
}

.import-btn {
    width: auto;
    margin-top: 0;
    padding: 13px 18px;
}

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

    .import-btn {
        width: 100%;
    }
}

/* v9 requested fixes */
.date-control {
    display: grid;
    grid-template-columns: minmax(170px, 1fr) 48px;
    gap: 8px;
    align-items: center;
}

.date-control .date-text,
.date-control .date-picker {
    width: 100%;
    height: 46px;
    margin: 0;
}

.date-control .date-picker {
    min-width: 48px;
    padding: 8px;
    cursor: pointer;
}

.filter-date-control {
    grid-template-columns: 190px 48px;
}

.filter-actions {
    align-items: end;
    height: 70px;
}

.filter-actions .btn-primary,
.filter-actions .btn-secondary,
.filter-actions .btn-success {
    height: 46px;
    min-width: 92px;
    padding: 0 16px;
    line-height: 1;
    border: 0;
    cursor: pointer;
    font-size: 15px;
}

.btn-success {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    white-space: nowrap;
    background: #dcfce7;
    color: #166534;
}

.btn-success:hover { background: #bbf7d0; }

.journal-table .num-cell {
    text-align: center !important;
    font-variant-numeric: tabular-nums;
}

.trial-table .account-name-cell {
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.35;
}

.trial-table td,
.trial-table th {
    overflow: hidden;
}

@media (max-width: 700px) {
    .date-control,
    .filter-date-control {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        height: auto;
        width: 100%;
    }

    .filter-actions .btn-primary,
    .filter-actions .btn-secondary,
    .filter-actions .btn-success {
        width: 100%;
    }
}

/* v10 journal edit/delete menu and period filters */
.period-filter-form {
    align-items: end;
}

.period-filter-form > label {
    margin: 0;
}

.filter-button {
    height: 46px;
    min-width: 92px;
    width: auto;
    margin-top: 0;
    padding: 0 16px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.journal-table {
    table-layout: fixed;
}

.journal-table th,
.journal-table td {
    vertical-align: middle;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.journal-table .actions-col,
.journal-table .kebab-cell {
    width: 70px;
    text-align: center !important;
    overflow: visible;
}

.journal-table .description-cell,
.journal-table .account-name-cell {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.kebab-cell {
    position: relative;
}

.kebab-menu {
    position: relative;
    display: inline-block;
}

.kebab-menu summary {
    list-style: none;
    width: 36px;
    height: 32px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 800;
    color: #102a43;
    background: #e2e8f0;
    user-select: none;
}

.kebab-menu summary::-webkit-details-marker {
    display: none;
}

.kebab-menu[open] summary {
    background: #cbd5e1;
}

.kebab-dropdown {
    position: absolute;
    right: 0;
    top: 38px;
    z-index: 20;
    min-width: 140px;
    display: grid;
    gap: 4px;
    padding: 8px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
}

.kebab-dropdown a,
.kebab-dropdown button {
    width: 100%;
    margin: 0;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #102a43;
    text-align: left;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

.kebab-dropdown a:hover,
.kebab-dropdown button:hover {
    background: #f1f5f9;
}

.kebab-dropdown form {
    margin: 0;
}

@media (max-width: 700px) {
    .filter-button {
        width: 100%;
    }
}

/* v11 compact page actions and modals */
.compact-header {
    align-items: center;
    margin-bottom: 22px;
}

.compact-header h2 {
    margin: 0;
}

.page-actions {
    display: flex;
    justify-content: flex-end;
    position: relative;
}

.page-action-menu {
    position: relative;
}

.page-action-menu summary {
    list-style: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
    height: 44px;
    padding: 0 18px;
    border-radius: 12px;
    background: #102a43;
    color: white;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
}

.page-action-menu summary::-webkit-details-marker {
    display: none;
}

.page-action-menu[open] summary {
    background: #243b53;
}

.page-action-dropdown {
    position: absolute;
    right: 0;
    top: 52px;
    z-index: 30;
    min-width: 220px;
    display: grid;
    gap: 5px;
    padding: 8px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

.page-action-dropdown a,
.page-action-dropdown button {
    width: 100%;
    margin: 0;
    padding: 11px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #102a43;
    text-align: left;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}


.page-action-dropdown form {
    margin: 0;
}

.page-action-dropdown form button {
    display: block;
}

.page-action-dropdown a:hover,
.page-action-dropdown button:hover {
    background: #f1f5f9;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.42);
}

.modal-backdrop.open {
    display: flex;
}

.modal-card {
    width: min(520px, 100%);
    background: white;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.modal-header h3 {
    margin: 0;
    color: #102a43;
}

.modal-close {
    width: 38px;
    height: 38px;
    margin: 0;
    padding: 0;
    border-radius: 12px;
    background: #e2e8f0;
    color: #102a43;
    font-size: 24px;
    line-height: 1;
}

.modal-close:hover {
    background: #cbd5e1;
}

.modal-form {
    display: grid;
    gap: 16px;
}

.modal-form label {
    display: grid;
    gap: 8px;
    margin: 0;
    color: #334155;
}

.modal-form input[type="text"],
.modal-form input[type="file"] {
    width: 100%;
}

.modal-form .btn-primary {
    width: 100%;
    margin-top: 0;
}

.modal-note {
    margin: 0;
    color: #64748b;
    line-height: 1.45;
}

@media (max-width: 700px) {
    .compact-header {
        align-items: stretch;
    }

    .page-actions,
    .page-action-menu,
    .page-action-menu summary {
        width: 100%;
    }

    .page-action-dropdown {
        left: 0;
        right: auto;
        width: 100%;
    }
}

/* v12 journal amount symmetry and contragent table */
.journal-table .amount-col {
    width: 150px;
    min-width: 150px;
    max-width: 150px;
    text-align: center !important;
    padding-left: 10px;
    padding-right: 10px;
    font-variant-numeric: tabular-nums;
}

.contragent-table {
    table-layout: fixed;
    width: 100%;
}

.contragent-table th,
.contragent-table td {
    vertical-align: middle;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.contragent-table th:nth-child(1),
.contragent-table td:nth-child(1) { width: 30%; }
.contragent-table th:nth-child(2),
.contragent-table td:nth-child(2) { width: 16%; }
.contragent-table th:nth-child(3),
.contragent-table td:nth-child(3) { width: 14%; }
.contragent-table th:nth-child(4),
.contragent-table td:nth-child(4) { width: 15%; }
.contragent-table th:nth-child(5),
.contragent-table td:nth-child(5) { width: 12%; }
.contragent-table th:nth-child(6),
.contragent-table td:nth-child(6) { width: 13%; }


/* v15 journal sub-sections and export polish */
.inline-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin: 12px 0 16px;
}

.inline-actions .btn-primary {
    width: auto;
    min-width: 170px;
    text-align: center;
}

.journal-table {
    width: 100%;
}

.journal-table .journal-date-col { width: 12%; }
.journal-table .journal-account-col { width: 24%; }
.journal-table .journal-desc-col { width: 20%; }
.journal-table .journal-number-col { width: 13%; }
.journal-table .journal-name-col { width: 27%; }
.journal-table .journal-type-col { width: 11%; }
.journal-table .journal-extra-col { width: 18%; }
.journal-table .journal-amount-col { width: 13%; }
.journal-table .journal-actions-col { width: 6%; }

.journal-table .amount-col,
.journal-table td.amount-col,
.journal-table th.amount-col {
    text-align: center !important;
    vertical-align: middle;
    font-variant-numeric: tabular-nums;
}

.journal-table td,
.journal-table th {
    overflow: hidden;
}


/* v16 invoice PDF import */
.invoice-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 18px;
}

.invoice-choice-card {
    display: grid;
    gap: 10px;
    min-height: 150px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #f8fafc;
    color: #102a43;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
}

.invoice-choice-card:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
}

.invoice-choice-card strong {
    font-size: 22px;
}

.invoice-choice-card span {
    color: #64748b;
    line-height: 1.45;
}

.invoice-list-table,
.invoice-detail-table {
    table-layout: fixed;
    width: 100%;
}

.invoice-list-table th,
.invoice-list-table td,
.invoice-detail-table th,
.invoice-detail-table td {
    vertical-align: middle;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.invoice-list-table th:nth-child(1),
.invoice-list-table td:nth-child(1) { width: 13%; }
.invoice-list-table th:nth-child(2),
.invoice-list-table td:nth-child(2) { width: 13%; }
.invoice-list-table th:nth-child(3),
.invoice-list-table td:nth-child(3) { width: 25%; }
.invoice-list-table th:nth-child(4),
.invoice-list-table td:nth-child(4) { width: 18%; }
.invoice-list-table th:nth-child(5),
.invoice-list-table td:nth-child(5) { width: 9%; text-align: center !important; }
.invoice-list-table th:nth-child(6),
.invoice-list-table td:nth-child(6) { width: 15%; }
.invoice-list-table th:nth-child(7),
.invoice-list-table td:nth-child(7) { width: 7%; }

.invoice-detail-table th,
.invoice-detail-table td {
    text-align: center;
    font-size: 13px;
}

.invoice-detail-table th:nth-child(2),
.invoice-detail-table td:nth-child(2),
.invoice-detail-table th:nth-child(4),
.invoice-detail-table td:nth-child(4) {
    text-align: center;
    min-width: 220px;
    white-space: normal;
}

.invoice-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(230px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #f8fafc;
    color: #334155;
}

@media (max-width: 900px) {
    .invoice-choice-grid,
    .invoice-summary {
        grid-template-columns: 1fr;
    }
}

.invoice-detail-table td,
.invoice-detail-table th {
    text-align: center !important;
}

.muted-small {
    display: inline-block;
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

/* v22 Məlumatlar siyahı görünüşü və düzəliş modalı */
.info-page-card {
    min-height: auto;
}

.info-list {
    display: grid;
    gap: 12px;
}

.info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #f8fafc;
}

.info-row > div {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.info-label {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.info-row strong {
    color: #102a43;
    font-size: 16px;
    overflow-wrap: anywhere;
}

.info-row small {
    color: #64748b;
}

.edit-icon-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    margin: 0;
    padding: 0;
    border-radius: 12px;
    background: #e0f2fe;
    color: #075985;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.edit-icon-btn:hover {
    background: #bae6fd;
}

select,
.modal-form select {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 15px;
    background: white;
}

/* Tarix kontrolunda manual xana ayrıca qalır, kalendar isə ayrıca kiçik kvadrat kimi görünür */
.date-control .date-picker {
    width: 48px;
    min-width: 48px;
    max-width: 48px;
    height: 46px;
    padding: 0;
    color: transparent !important;
    font-size: 16px;
    text-indent: 0;
    overflow: hidden;
    background-color: white;
    cursor: pointer;
    line-height: 46px;
}

.date-control .date-picker::-webkit-datetime-edit,
.date-control .date-picker::-webkit-datetime-edit-fields-wrapper,
.date-control .date-picker::-webkit-datetime-edit-text,
.date-control .date-picker::-webkit-datetime-edit-month-field,
.date-control .date-picker::-webkit-datetime-edit-day-field,
.date-control .date-picker::-webkit-datetime-edit-year-field {
    opacity: 0;
    color: transparent;
}

.date-control .date-picker::-webkit-calendar-picker-indicator {
    display: block;
    cursor: pointer;
    opacity: 1;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
}

/* v24 calendar fix: manual date field + visible calendar icon button only */
.date-control {
    position: relative;
    grid-template-columns: minmax(170px, 1fr) 48px !important;
}

.date-control::after {
    content: "📅";
    grid-column: 2;
    grid-row: 1;
    width: 48px;
    height: 46px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #fff;
    color: #0f2f4a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    pointer-events: none;
    box-sizing: border-box;
    z-index: 2;
}

.date-control .date-picker {
    grid-column: 2;
    grid-row: 1;
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    height: 46px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: transparent !important;
    opacity: 0 !important;
    cursor: pointer;
    z-index: 3;
    position: relative;
}

.date-control .date-picker::-webkit-datetime-edit,
.date-control .date-picker::-webkit-datetime-edit-fields-wrapper,
.date-control .date-picker::-webkit-datetime-edit-text,
.date-control .date-picker::-webkit-datetime-edit-month-field,
.date-control .date-picker::-webkit-datetime-edit-day-field,
.date-control .date-picker::-webkit-datetime-edit-year-field,
.date-control .date-picker::-webkit-inner-spin-button,
.date-control .date-picker::-webkit-clear-button {
    display: none !important;
    opacity: 0 !important;
    color: transparent !important;
}

.date-control .date-picker::-webkit-calendar-picker-indicator {
    width: 48px !important;
    height: 46px !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 0 !important;
    cursor: pointer;
}

/* v27 payments / bank statement polish */
.mb-24 { margin-bottom: 24px; }
.sub-section-title { margin-top: 22px; }
.small-btn {
    min-height: 34px;
    padding: 8px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.bank-statement-table th,
.bank-statement-table td,
.bank-row-table th,
.bank-row-table td {
    text-align: center;
    vertical-align: middle;
}
.bank-row-table .account-name-cell,
.bank-statement-table .account-name-cell {
    text-align: center;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}
.bank-row-table .num-cell,
.bank-statement-table .num-cell {
    text-align: center !important;
}

/* v28 bank statement import polish */
td.inline-actions {
    margin: 0;
    justify-content: center;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
td.inline-actions form { margin: 0; }
.purpose-cell {
    min-width: 220px;
    max-width: 360px;
    white-space: normal;
    overflow-wrap: anywhere;
}
.bank-row-table th,
.bank-row-table td {
    text-align: center;
    vertical-align: middle;
}
.bank-row-table .account-name-cell,
.bank-row-table .purpose-cell {
    text-align: center;
}

/* v30 bank statement compact view and aligned actions */
.bank-statement-table td,
.bank-statement-table th {
    padding: 8px 10px;
    line-height: 1.25;
}

.bank-row-table {
    table-layout: fixed;
    width: 100%;
}

.bank-row-table th,
.bank-row-table td {
    padding: 6px 8px !important;
    font-size: 12px;
    line-height: 1.22;
    vertical-align: middle;
}

.bank-row-table th:nth-child(1),
.bank-row-table td:nth-child(1) { width: 8%; }
.bank-row-table th:nth-child(2),
.bank-row-table td:nth-child(2) { width: 10%; }
.bank-row-table th:nth-child(3),
.bank-row-table td:nth-child(3) { width: 9%; }
.bank-row-table th:nth-child(4),
.bank-row-table td:nth-child(4) { width: 13%; }
.bank-row-table th:nth-child(5),
.bank-row-table td:nth-child(5) { width: 10%; }
.bank-row-table th:nth-child(6),
.bank-row-table td:nth-child(6) { width: 8%; }
.bank-row-table th:nth-child(7),
.bank-row-table td:nth-child(7) { width: 18%; }
.bank-row-table th:nth-child(8),
.bank-row-table td:nth-child(8) { width: 9%; }
.bank-row-table th:nth-child(9),
.bank-row-table td:nth-child(9) { width: 10%; }
.bank-row-table th:nth-child(10),
.bank-row-table td:nth-child(10) { width: 5%; }

.purpose-cell {
    min-width: 0 !important;
    max-width: none !important;
}

.purpose-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 2.6em;
    text-align: left;
}

.bank-action-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.bank-action-cell form {
    margin: 0;
}

.bank-action-cell .small-btn {
    width: 58px;
    min-width: 58px;
    min-height: 34px;
    margin: 0;
}

/* v35 bulk selection and compact invoice/bank lists */
.bulk-action-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
}
.select-col {
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    text-align: center !important;
}
.select-col input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}
.bulk-select-table th,
.bulk-select-table td {
    vertical-align: middle;
}
.invoice-list-table.bulk-select-table th,
.invoice-list-table.bulk-select-table td {
    text-align: center;
}
.invoice-list-table.bulk-select-table .account-name-cell {
    text-align: center;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}
/* Qaimə siyahısında fayl sütunu çıxarıldığı üçün sətirlər qısa və sabit qalsın */
.invoice-list-table.bulk-select-table th:nth-child(1),
.invoice-list-table.bulk-select-table td:nth-child(1) { width: 4% !important; }
.invoice-list-table.bulk-select-table th:nth-child(2),
.invoice-list-table.bulk-select-table td:nth-child(2) { width: 11% !important; }
.invoice-list-table.bulk-select-table th:nth-child(3),
.invoice-list-table.bulk-select-table td:nth-child(3) { width: 12% !important; }
.invoice-list-table.bulk-select-table th:nth-child(4),
.invoice-list-table.bulk-select-table td:nth-child(4) { width: 24% !important; }
.invoice-list-table.bulk-select-table th:nth-child(5),
.invoice-list-table.bulk-select-table td:nth-child(5) { width: 17% !important; }
.invoice-list-table.bulk-select-table th:nth-child(6),
.invoice-list-table.bulk-select-table td:nth-child(6) { width: 8% !important; }
.invoice-list-table.bulk-select-table th:nth-child(7),
.invoice-list-table.bulk-select-table td:nth-child(7) { width: 18% !important; }
.invoice-list-table.bulk-select-table th:nth-child(8),
.invoice-list-table.bulk-select-table td:nth-child(8) { width: 6% !important; }

.bank-statement-table.bulk-select-table th:nth-child(1),
.bank-statement-table.bulk-select-table td:nth-child(1) { width: 5% !important; }
.bank-statement-table.bulk-select-table th:nth-child(2),
.bank-statement-table.bulk-select-table td:nth-child(2) { width: 18% !important; }
.bank-statement-table.bulk-select-table th:nth-child(3),
.bank-statement-table.bulk-select-table td:nth-child(3),
.bank-statement-table.bulk-select-table th:nth-child(4),
.bank-statement-table.bulk-select-table td:nth-child(4),
.bank-statement-table.bulk-select-table th:nth-child(5),
.bank-statement-table.bulk-select-table td:nth-child(5) { width: 14% !important; }
.bank-statement-table.bulk-select-table th:nth-child(6),
.bank-statement-table.bulk-select-table td:nth-child(6) { width: 21% !important; }

/* v36 invoice date/compact table alignment */
.invoice-list-table th,
.invoice-list-table td,
.invoice-detail-table th,
.invoice-detail-table td {
    text-align: center !important;
    vertical-align: middle !important;
}
.invoice-list-table .nowrap-cell,
.invoice-detail-table .nowrap-cell {
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
}
.invoice-list-table .account-name-cell,
.invoice-detail-table .account-name-cell {
    text-align: center !important;
}
.invoice-list-table.bulk-select-table th:nth-child(1),
.invoice-list-table.bulk-select-table td:nth-child(1) { width: 4%; }
.invoice-list-table.bulk-select-table th:nth-child(2),
.invoice-list-table.bulk-select-table td:nth-child(2) { width: 11%; }
.invoice-list-table.bulk-select-table th:nth-child(3),
.invoice-list-table.bulk-select-table td:nth-child(3) { width: 12%; }
.invoice-list-table.bulk-select-table th:nth-child(4),
.invoice-list-table.bulk-select-table td:nth-child(4) { width: 25%; }
.invoice-list-table.bulk-select-table th:nth-child(5),
.invoice-list-table.bulk-select-table td:nth-child(5) { width: 16%; }
.invoice-list-table.bulk-select-table th:nth-child(6),
.invoice-list-table.bulk-select-table td:nth-child(6) { width: 24%; }
.invoice-list-table.bulk-select-table th:nth-child(7),
.invoice-list-table.bulk-select-table td:nth-child(7) { width: 8%; }

/* v38 qaimə siyahısı: seriya-nömrə və avtomatik müxabirləşmə sütunlarının səliqəli hizalanması */
.tidy-invoice-table {
    table-layout: fixed !important;
    width: 100% !important;
}
.tidy-invoice-table col.col-select { width: 4%; }
.tidy-invoice-table col.col-date { width: 10%; }
.tidy-invoice-table col.col-voen { width: 11%; }
.tidy-invoice-table col.col-company { width: 22%; }
.tidy-invoice-table col.col-invoice-no { width: 18%; }
.tidy-invoice-table col.col-auto-entry { width: 28%; }
.tidy-invoice-table col.col-actions { width: 7%; }
.tidy-invoice-table th,
.tidy-invoice-table td {
    text-align: center !important;
    vertical-align: middle !important;
    padding: 13px 10px !important;
}
.tidy-invoice-table .invoice-no-head,
.tidy-invoice-table .auto-entry-head {
    line-height: 1.25;
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
}
.tidy-invoice-table .invoice-no-cell {
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    font-weight: 700;
}
.tidy-invoice-table .auto-entry-cell {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    line-height: 1.35;
    min-width: 0;
}
.tidy-invoice-table .auto-entry-cell .muted-small {
    display: block;
    margin-top: 6px;
    line-height: 1.3;
}
.tidy-invoice-table .kebab-cell {
    overflow: visible !important;
    white-space: nowrap !important;
}
@media (max-width: 1200px) {
    .tidy-invoice-table {
        min-width: 1120px;
    }
}

/* v39 qaimələr: ödəniş və qalıq sütunları */
.tidy-invoice-table col.col-select { width: 4% !important; }
.tidy-invoice-table col.col-date { width: 9% !important; }
.tidy-invoice-table col.col-voen { width: 10% !important; }
.tidy-invoice-table col.col-company { width: 18% !important; }
.tidy-invoice-table col.col-invoice-no { width: 15% !important; }
.tidy-invoice-table col.col-auto-entry { width: 22% !important; }
.tidy-invoice-table col.col-payment { width: 7% !important; }
.tidy-invoice-table col.col-balance { width: 7% !important; }
.tidy-invoice-table col.col-actions { width: 8% !important; }
.tidy-invoice-table .num-cell {
    text-align: center !important;
    white-space: nowrap !important;
}

/* v39 bank çıxarışı: Excel tipli filtr və təyinat düzəlişi */
.bank-filter-row th {
    padding: 6px 6px !important;
    background: #f8fafc !important;
}
.bank-filter-row input {
    width: 100%;
    min-width: 0;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    padding: 7px 8px;
    font-size: 12px;
    text-align: center;
    outline: none;
    background: #fff;
}
.bank-filter-row input:focus {
    border-color: #7aa7d9;
    box-shadow: 0 0 0 3px rgba(122, 167, 217, .18);
}
.purpose-edit-form {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}
.purpose-edit-form textarea {
    width: 100%;
    min-height: 42px;
    max-height: 80px;
    resize: vertical;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    padding: 7px 8px;
    font-size: 12px;
    line-height: 1.25;
    outline: none;
}
.purpose-edit-form textarea:focus {
    border-color: #7aa7d9;
    box-shadow: 0 0 0 3px rgba(122, 167, 217, .18);
}
.mini-btn {
    min-height: 34px !important;
    padding: 7px 10px !important;
    white-space: nowrap !important;
    font-size: 12px !important;
}
.filterable-bank-table {
    table-layout: fixed;
    min-width: 1280px;
}
.filterable-bank-table th,
.filterable-bank-table td {
    vertical-align: middle !important;
    text-align: center !important;
}
.filterable-bank-table .purpose-cell {
    text-align: left !important;
}


/* v40 bank row detail cleanup: no note column, modal purpose editing */
.filterable-bank-table.bank-row-table {
    min-width: 1180px;
}
.filterable-bank-table.bank-row-table th:nth-child(1),
.filterable-bank-table.bank-row-table td:nth-child(1) { width: 8%; }
.filterable-bank-table.bank-row-table th:nth-child(2),
.filterable-bank-table.bank-row-table td:nth-child(2) { width: 10%; }
.filterable-bank-table.bank-row-table th:nth-child(3),
.filterable-bank-table.bank-row-table td:nth-child(3) { width: 9%; }
.filterable-bank-table.bank-row-table th:nth-child(4),
.filterable-bank-table.bank-row-table td:nth-child(4) { width: 14%; }
.filterable-bank-table.bank-row-table th:nth-child(5),
.filterable-bank-table.bank-row-table td:nth-child(5) { width: 10%; }
.filterable-bank-table.bank-row-table th:nth-child(6),
.filterable-bank-table.bank-row-table td:nth-child(6) { width: 8%; }
.filterable-bank-table.bank-row-table th:nth-child(7),
.filterable-bank-table.bank-row-table td:nth-child(7) { width: 24%; }
.filterable-bank-table.bank-row-table th:nth-child(8),
.filterable-bank-table.bank-row-table td:nth-child(8) { width: 8%; }
.filterable-bank-table.bank-row-table th:nth-child(9),
.filterable-bank-table.bank-row-table td:nth-child(9) { width: 9%; }
.purpose-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}
.purpose-text-full {
    flex: 1;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.35;
}
.icon-edit-btn {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 10px;
    background: #e8f1fb;
    color: #0f2f4f;
    cursor: pointer;
    font-weight: 800;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.icon-edit-btn:hover {
    background: #d6e8fb;
}
.purpose-modal-card textarea {
    width: 100%;
    min-height: 150px;
    resize: vertical;
    border: 1px solid #dbe4ef;
    border-radius: 12px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    outline: none;
}
.purpose-modal-card textarea:focus {
    border-color: #7aa7d9;
    box-shadow: 0 0 0 3px rgba(122, 167, 217, .18);
}

.mini-separator {
    border: 0;
    border-top: 1px solid #e5e7eb;
    margin: 6px 0;
}

.bank-row-table .purpose-display {
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.bank-row-table .purpose-text-full {
    flex: 1;
}

.bank-row-table td,
.bank-row-table th {
    vertical-align: middle;
}

/* v43 ƏDV bəyannaməsi - qaimə-fakturalar hesabatı */
.report-summary-line {
    margin: 14px 0 18px;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: #334155;
}
.report-summary-line span {
    color: #64748b;
    font-weight: 700;
}
.vat-report-table {
    table-layout: fixed;
    width: 100%;
}
.vat-report-table th,
.vat-report-table td {
    text-align: center !important;
    vertical-align: middle !important;
    padding: 10px 12px;
    line-height: 1.25;
}
.vat-report-table th:nth-child(1),
.vat-report-table td:nth-child(1) { width: 10%; }
.vat-report-table th:nth-child(2),
.vat-report-table td:nth-child(2) { width: 12%; }
.vat-report-table th:nth-child(3),
.vat-report-table td:nth-child(3) { width: 28%; }
.vat-report-table th:nth-child(4),
.vat-report-table td:nth-child(4) { width: 20%; }
.vat-report-table th:nth-child(5),
.vat-report-table td:nth-child(5),
.vat-report-table th:nth-child(6),
.vat-report-table td:nth-child(6) { width: 15%; }
.vat-report-table .company-cell {
    white-space: normal;
    overflow-wrap: anywhere;
}
.vat-report-table .invoice-no-cell {
    font-weight: 700;
}
.vat-report-table tfoot td {
    font-weight: 800;
    background: #f1f5f9;
}
@media (max-width: 1180px) {
    .vat-report-table { min-width: 980px; }
    .report-summary-line { flex-direction: column; align-items: flex-start; }
}

/* v44 collapsible sidebar and Azerbaijani font polish */
:root {
    --app-font: "Segoe UI", "Noto Sans", "DejaVu Sans", Arial, Helvetica, sans-serif;
}

html, body, button, input, select, textarea, table, th, td, a, summary {
    font-family: var(--app-font) !important;
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}

body {
    letter-spacing: -0.01em;
}

.app-shell {
    grid-template-columns: 310px minmax(0, 1fr);
    transition: grid-template-columns .22s ease;
}

.content {
    min-width: 0;
    transition: padding .22s ease;
}

.sidebar {
    min-width: 0;
    overflow: hidden;
    transition: width .22s ease, padding .22s ease;
}

.side-brand {
    position: relative;
    gap: 12px;
}

.brand-text {
    min-width: 0;
    flex: 1;
}

.brand-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.sidebar-toggle {
    width: 34px;
    height: 34px;
    min-width: 34px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 11px;
    background: rgba(255,255,255,.12);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.sidebar-toggle:hover {
    background: rgba(255,255,255,.22);
}

.collapsed-toggle {
    display: none;
}

nav a,
.logout {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    overflow: hidden;
}

.nav-icon {
    width: 24px;
    min-width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
}

.nav-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-shell.sidebar-collapsed {
    grid-template-columns: 88px minmax(0, 1fr);
}

.app-shell.sidebar-collapsed .sidebar {
    padding: 24px 14px;
    align-items: center;
}

.app-shell.sidebar-collapsed .side-brand {
    width: 100%;
    justify-content: center;
    margin-bottom: 28px;
}

.app-shell.sidebar-collapsed .logo.small {
    margin: 0 auto;
}

.app-shell.sidebar-collapsed .brand-text {
    display: none;
}

.app-shell.sidebar-collapsed .collapsed-toggle {
    display: inline-flex;
    position: absolute;
    right: -3px;
    top: 5px;
    width: 28px;
    height: 28px;
    min-width: 28px;
    font-size: 20px;
    border-radius: 9px;
}

.app-shell.sidebar-collapsed nav {
    width: 100%;
    justify-items: center;
}

.app-shell.sidebar-collapsed nav a,
.app-shell.sidebar-collapsed .logout {
    width: 54px;
    min-width: 54px;
    height: 50px;
    padding: 0;
    justify-content: center;
    border-radius: 14px;
}

.app-shell.sidebar-collapsed .logout {
    margin-left: auto;
    margin-right: auto;
}

.app-shell.sidebar-collapsed .nav-text {
    display: none;
}

.app-shell.sidebar-collapsed .nav-icon {
    font-size: 20px;
}

.app-shell.sidebar-collapsed .content {
    padding-left: 28px;
    padding-right: 32px;
}

@media (max-width: 900px) {
    .app-shell,
    .app-shell.sidebar-collapsed {
        grid-template-columns: 1fr;
    }
    .app-shell.sidebar-collapsed .sidebar {
        align-items: stretch;
        padding: 18px;
    }
    .app-shell.sidebar-collapsed .brand-text,
    .app-shell.sidebar-collapsed .nav-text {
        display: block;
    }
    .app-shell.sidebar-collapsed nav a,
    .app-shell.sidebar-collapsed .logout {
        width: 100%;
        justify-content: flex-start;
        padding: 13px 14px;
    }
    .app-shell.sidebar-collapsed .collapsed-toggle {
        display: none;
    }
}


/* v46 invoice table alignment, page back button and sidebar invoice submenu */
.page-actions-with-back {
    align-items: center;
    gap: 10px;
}
.page-back-button {
    height: 44px;
    min-width: 86px;
    padding: 0 16px !important;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.nav-group {
    border-radius: 12px;
}
.nav-group > summary {
    list-style: none;
    color: #d9e2ec;
    text-decoration: none;
    padding: 13px 14px;
    border-radius: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    cursor: pointer;
    user-select: none;
    overflow: hidden;
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary:hover,
.nav-group.active > summary {
    background: #243b53;
    color: white;
}
.nav-arrow {
    margin-left: auto;
    color: #bcccdc;
    font-size: 15px;
    transition: transform .18s ease;
}
.nav-group[open] .nav-arrow { transform: rotate(180deg); }
.nav-submenu {
    display: grid;
    gap: 4px;
    margin: 5px 0 6px 28px;
}
.nav-submenu a {
    min-height: 40px;
    padding: 9px 12px;
    font-size: 14px;
    border-radius: 10px;
}
.nav-submenu .nav-icon {
    width: 20px;
    min-width: 20px;
    height: 20px;
    font-size: 15px;
}

.app-shell.sidebar-collapsed .nav-group > summary {
    justify-content: center;
    padding: 12px 8px;
    width: 58px;
}
.app-shell.sidebar-collapsed .nav-group .nav-text,
.app-shell.sidebar-collapsed .nav-arrow {
    display: none;
}
.app-shell.sidebar-collapsed .nav-submenu {
    margin: 6px 0 6px;
    justify-items: center;
}
.app-shell.sidebar-collapsed .nav-submenu a {
    justify-content: center;
    width: 58px;
    padding: 9px 8px;
}

.tidy-invoice-table {
    table-layout: fixed !important;
    width: 100% !important;
}
.tidy-invoice-table col.col-select { width: 4% !important; }
.tidy-invoice-table col.col-date { width: 9% !important; }
.tidy-invoice-table col.col-voen { width: 10% !important; }
.tidy-invoice-table col.col-company { width: 21% !important; }
.tidy-invoice-table col.col-invoice-no { width: 16% !important; }
.tidy-invoice-table col.col-auto-entry { width: 22% !important; }
.tidy-invoice-table col.col-payment { width: 6% !important; }
.tidy-invoice-table col.col-balance { width: 6% !important; }
.tidy-invoice-table col.col-actions { width: 6% !important; }
.tidy-invoice-table th,
.tidy-invoice-table td {
    text-align: center !important;
    vertical-align: middle !important;
    padding: 12px 10px !important;
    overflow: hidden !important;
}
.tidy-invoice-table .company-cell {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 0;
}
.tidy-invoice-table .invoice-no-cell,
.tidy-invoice-table .invoice-no-head {
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
    font-weight: 800;
}
.tidy-invoice-table .auto-entry-cell,
.tidy-invoice-table .auto-entry-head {
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
    line-height: 1.35;
}
.tidy-invoice-table .auto-entry-cell {
    font-size: 14px;
}
.tidy-invoice-table .muted-small {
    font-size: 12px;
    line-height: 1.35;
}
.tidy-invoice-table .kebab-cell {
    overflow: visible !important;
}
.tidy-invoice-table .kebab-menu summary {
    margin: 0 auto;
}
@media (max-width: 1250px) {
    .tidy-invoice-table { min-width: 1120px; }
}

.archive-map-table select,
.archive-map-table input {
    width: 100%;
    min-height: 40px;
    border: 1px solid #d8e0ea;
    border-radius: 12px;
    padding: 8px 10px;
    font: inherit;
    background: #fff;
}
.archive-map-table td,
.archive-map-table th {
    vertical-align: middle;
}
.archive-map-form .form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 18px;
}

.journal-cell-center { text-align: center; vertical-align: middle; }
.journal-modal-text { white-space: pre-wrap; line-height: 1.7; font-family: inherit; background: #f7fafc; border: 1px solid #dce6f1; border-radius: 14px; padding: 14px; color: #0f2740; }
.vat-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 18px 0; }
.info-row-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #dce6f1; border-radius: 16px; padding: 16px; background: #fff; }
.info-row-card span { display: block; color: #58708a; font-size: 13px; margin-top: 4px; }
.summary-value { font-weight: 800; font-size: 20px; white-space: nowrap; }
.wide-modal-card { max-width: 980px; width: min(980px, 94vw); }
.vat-report-table th, .vat-report-table td { text-align: center; vertical-align: middle; }
.vat-report-table .company-cell { min-width: 210px; }

/* v49: ƏDV cədvəllərində sütunların bir-birinə girməsinin qarşısı */
.inline-filter-card {
    display: grid;
    grid-template-columns: repeat(6, minmax(130px, 1fr));
    gap: 12px;
    align-items: end;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px;
    margin: 12px 0 18px;
}
.inline-filter-card label {
    margin: 0;
    font-size: 13px;
}
.inline-filter-card input,
.inline-filter-card select {
    margin-top: 6px;
    min-height: 42px;
}
.inline-filter-card .compact-submit {
    margin-top: 0;
    min-height: 42px;
    padding: 10px 14px;
}
.vat-report-table.wide-vat-report-table {
    min-width: 1500px;
    table-layout: fixed;
}
.vat-report-table.wide-vat-report-table th,
.vat-report-table.wide-vat-report-table td {
    text-align: center;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vat-report-table.wide-vat-report-table th:nth-child(1),
.vat-report-table.wide-vat-report-table td:nth-child(1) { width: 110px; }
.vat-report-table.wide-vat-report-table th:nth-child(2),
.vat-report-table.wide-vat-report-table td:nth-child(2) { width: 135px; }
.vat-report-table.wide-vat-report-table th:nth-child(3),
.vat-report-table.wide-vat-report-table td:nth-child(3) { width: 260px; }
.vat-report-table.wide-vat-report-table th:nth-child(4),
.vat-report-table.wide-vat-report-table td:nth-child(4) { width: 220px; }
.vat-report-table.wide-vat-report-table th:nth-child(n+5),
.vat-report-table.wide-vat-report-table td:nth-child(n+5) { width: 130px; }
.vat-report-table.wide-vat-report-table .company-cell {
    white-space: nowrap;
}
.vat-report-table.wide-vat-report-table .invoice-no-cell {
    font-weight: 800;
}
.link-like-detail {
    width: auto;
    margin: 12px 0 8px;
    padding: 0;
    background: transparent;
    color: #2563eb;
    font-size: 14px;
    font-weight: 700;
    border-radius: 0;
}
.link-like-detail:hover {
    background: transparent;
    text-decoration: underline;
    color: #1d4ed8;
}
.vat-detail-tables {
    margin-top: 10px;
    display: grid;
    gap: 14px;
}
.vat-detail-tables h3 {
    margin: 12px 0 0;
    font-size: 18px;
}
.vat-detail-summary-table {
    min-width: 720px;
}
.vat-detail-summary-table th,
.vat-detail-summary-table td {
    text-align: center;
    vertical-align: middle;
}
@media (max-width: 1100px) {
    .inline-filter-card {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
    }
}

/* v50: ƏDV filter tarix ikonları, export button və detallı bax düzəlişləri */
.vat-inline-filter {
    grid-template-columns: minmax(250px, 1.25fr) minmax(250px, 1.25fr) minmax(150px, .8fr) minmax(160px, .9fr) minmax(190px, 1fr) 120px 135px !important;
    align-items: end;
}
.vat-inline-filter .date-control {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 48px !important;
    gap: 8px;
}
.vat-inline-filter .date-control .date-text {
    min-width: 0;
}
.vat-inline-filter .date-control::after {
    grid-column: 2;
    grid-row: 1;
}
.vat-export-btn {
    height: 42px;
    min-height: 42px;
    margin-top: 0;
    padding: 0 16px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}
.vat-detail-tables[hidden] {
    display: none !important;
}
.link-like-detail {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: auto !important;
}
@media (max-width: 1300px) {
    .vat-inline-filter {
        grid-template-columns: repeat(2, minmax(230px, 1fr)) !important;
    }
    .vat-export-btn,
    .vat-inline-filter .compact-submit {
        width: 100%;
    }
}

/* v51: ƏDV bəyannaməsi səhifəsində daşma və simmetriya düzəlişi */
.placeholder-card,
.wide-card {
    max-width: 100%;
    overflow: hidden;
}

.table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

.vat-inline-filter.inline-filter-card {
    display: flex !important;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding: 14px;
}

.vat-inline-filter.inline-filter-card label {
    flex: 1 1 165px;
    min-width: 0;
}

.vat-inline-filter.inline-filter-card label:nth-of-type(1),
.vat-inline-filter.inline-filter-card label:nth-of-type(2) {
    flex: 1.2 1 220px;
}

.vat-inline-filter.inline-filter-card label:nth-of-type(5) {
    flex: 1.1 1 180px;
}

.vat-inline-filter .date-control {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 46px !important;
    gap: 8px;
    width: 100%;
    max-width: 100%;
}

.vat-inline-filter .date-control .date-text,
.vat-inline-filter .date-control .date-picker {
    min-width: 0;
    height: 44px;
}

.vat-inline-filter .date-control .date-picker {
    width: 46px;
    max-width: 46px;
    padding: 0;
}

.vat-inline-filter .compact-submit,
.vat-inline-filter .vat-export-btn {
    flex: 0 0 128px;
    width: 128px !important;
    max-width: 128px;
    height: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0 12px;
}

.vat-inline-filter .vat-export-btn {
    flex-basis: 138px;
    width: 138px !important;
    max-width: 138px;
}

.vat-report-table.wide-vat-report-table {
    min-width: 1420px;
    width: 1420px;
    table-layout: fixed;
}

.vat-report-table.wide-vat-report-table th,
.vat-report-table.wide-vat-report-table td {
    padding: 12px 10px;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vat-report-table.wide-vat-report-table .company-cell {
    white-space: nowrap;
    max-width: 260px;
}

.vat-report-table.wide-vat-report-table th:nth-child(1),
.vat-report-table.wide-vat-report-table td:nth-child(1) { width: 105px; }
.vat-report-table.wide-vat-report-table th:nth-child(2),
.vat-report-table.wide-vat-report-table td:nth-child(2) { width: 125px; }
.vat-report-table.wide-vat-report-table th:nth-child(3),
.vat-report-table.wide-vat-report-table td:nth-child(3) { width: 245px; }
.vat-report-table.wide-vat-report-table th:nth-child(4),
.vat-report-table.wide-vat-report-table td:nth-child(4) { width: 210px; }
.vat-report-table.wide-vat-report-table th:nth-child(5),
.vat-report-table.wide-vat-report-table td:nth-child(5),
.vat-report-table.wide-vat-report-table th:nth-child(6),
.vat-report-table.wide-vat-report-table td:nth-child(6),
.vat-report-table.wide-vat-report-table th:nth-child(7),
.vat-report-table.wide-vat-report-table td:nth-child(7),
.vat-report-table.wide-vat-report-table th:nth-child(8),
.vat-report-table.wide-vat-report-table td:nth-child(8),
.vat-report-table.wide-vat-report-table th:nth-child(9),
.vat-report-table.wide-vat-report-table td:nth-child(9),
.vat-report-table.wide-vat-report-table th:nth-child(10),
.vat-report-table.wide-vat-report-table td:nth-child(10) { width: 115px; }

@media (max-width: 950px) {
    .vat-inline-filter.inline-filter-card label,
    .vat-inline-filter.inline-filter-card label:nth-of-type(1),
    .vat-inline-filter.inline-filter-card label:nth-of-type(2),
    .vat-inline-filter.inline-filter-card label:nth-of-type(5),
    .vat-inline-filter .compact-submit,
    .vat-inline-filter .vat-export-btn {
        flex: 1 1 100%;
        width: 100% !important;
        max-width: 100%;
    }
}

/* v52: İnventarlar bölməsi */
.module-grid.three-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.module-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 22px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #fff;
    color: #102a43;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}
.module-card:hover { border-color: #b6c7d8; transform: translateY(-1px); }
.module-icon { font-size: 26px; }
.module-card strong { font-size: 18px; }
.module-card small { color: #64748b; line-height: 1.35; }
.inventory-table { min-width: 900px; table-layout: fixed; }
.inventory-table th,
.inventory-table td { text-align: center; vertical-align: middle; }
.inventory-table th:nth-child(1),
.inventory-table td:nth-child(1) { width: 34%; text-align: left; }
.inventory-table th:nth-child(2),
.inventory-table td:nth-child(2) { width: 16%; }
.inventory-table th:nth-child(3),
.inventory-table td:nth-child(3) { width: 12%; }
.inventory-table th:nth-child(4),
.inventory-table td:nth-child(4),
.inventory-table th:nth-child(5),
.inventory-table td:nth-child(5),
.inventory-table th:nth-child(6),
.inventory-table td:nth-child(6) { width: 12%; }
.inventory-name { white-space: normal; overflow-wrap: anywhere; }
.empty-cell { text-align: center !important; color: #64748b; padding: 26px !important; }
@media (max-width: 900px) { .module-grid.three-grid { grid-template-columns: 1fr; } }

/* v53 qaimə ödəniş/qalıq və inventar əməliyyatları */
.tidy-invoice-table .col-payment,
.tidy-invoice-table .col-balance,
.tidy-invoice-table th:nth-last-child(3),
.tidy-invoice-table th:nth-last-child(2),
.tidy-invoice-table td:nth-last-child(3),
.tidy-invoice-table td:nth-last-child(2),
.tidy-invoice-table .num-cell {
    text-align: center !important;
    vertical-align: middle !important;
}
.inventory-table th,
.inventory-table td { text-align: center !important; }
.inventory-table td.inventory-name { text-align: left !important; }
.line-map-table { min-width: 1150px; table-layout: fixed; width: 100%; }
.line-map-table th, .line-map-table td { text-align: center; vertical-align: middle; }
.line-map-table th:first-child, .line-map-table td:first-child { width: 24%; text-align: left; }
.line-map-table select, .line-map-table input { width: 100%; }

/* v54: faylı sürüşdürüb buraxma və toplu qaimə sətir xəritələmə */
.file-drop-zone.drop-enabled {
    border: 1px dashed #b7c6d8;
    border-radius: 14px;
    padding: 14px;
    background: #f8fafc;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.file-drop-zone.drop-enabled.drag-over {
    border-color: #0f2f4f;
    background: #eef6ff;
    box-shadow: 0 0 0 3px rgba(15, 47, 79, 0.10);
}
.file-drop-zone .drop-hint {
    display: block;
    margin: 5px 0 8px;
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}
.bulk-line-group-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 10px;
    padding: 10px 14px;
    border: 1px solid #dfe7f1;
    border-radius: 14px;
    background: #f7fafc;
}
.bulk-line-group-title span {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .02em;
}
.bulk-line-group-title strong { color: #102a43; }
.bulk-line-invoice-card {
    margin-bottom: 16px;
    border: 1px solid #dfe7f1;
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
}
.bulk-line-invoice-card.bulk-line-single { padding-bottom: 0; }
.bulk-line-invoice-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 14px 16px;
    background: #fbfdff;
    border-bottom: 1px solid #e5edf5;
}
.bulk-line-single .bulk-line-invoice-head { border-bottom: 0; }
.bulk-line-invoice-head div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bulk-line-invoice-head strong { color: #102a43; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bulk-line-invoice-head span { color: #64748b; font-size: 13px; }
.bulk-line-invoice-head em { color: #42627f; font-size: 13px; font-style: normal; white-space: nowrap; }

/* v56 inventory and invoice polish */
.kebab-menu summary.tiny-arrow,
.kebab-menu summary { min-width: 34px; width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.kebab-menu summary.tiny-arrow { font-size: 18px; line-height: 1; }
.invoice-list-table .col-balance { width: 110px; }
.invoice-list-table .col-actions { width: 46px; }
.invoice-list-table td.num-cell { text-align: center !important; padding-right: 8px !important; }
.date-control { display: grid; grid-template-columns: 1fr 48px; gap: 8px; align-items: center; }
.date-control .date-picker { width: 48px; min-width: 48px; color: transparent; cursor: pointer; padding: 0; }
.date-control .date-picker::-webkit-calendar-picker-indicator { opacity: 1; cursor: pointer; margin: auto; }
.mini-entry-table { width: 100%; min-width: 900px; border-collapse: collapse; }
.mini-entry-table th, .mini-entry-table td { border-bottom: 1px solid #e5edf5; padding: 8px; text-align: center; }
.mini-entry-table input { width: 100%; padding: 10px; border: 1px solid #d6e1ec; border-radius: 10px; }
.wide-modal { max-width: 980px; width: min(980px, calc(100vw - 36px)); }
.space-between { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.inventory-subtitle { margin: 24px 0 12px; font-size: 18px; color: #102a43; }
.fixed-asset-table { min-width: 1050px; }
.fixed-asset-table th:nth-child(1), .fixed-asset-table td:nth-child(1) { width: 34%; }
.fixed-asset-table th:nth-child(2), .fixed-asset-table td:nth-child(2) { width: 20%; }
.fixed-asset-table th:nth-child(3), .fixed-asset-table td:nth-child(3),
.fixed-asset-table th:nth-child(4), .fixed-asset-table td:nth-child(4),
.fixed-asset-table th:nth-child(5), .fixed-asset-table td:nth-child(5) { width: 14%; text-align: center !important; }
.fixed-asset-table th:nth-child(6), .fixed-asset-table td:nth-child(6) { width: 6%; }
.danger-row td { background: #fff1f2 !important; color: #991b1b; }
.text-left-force { text-align: left !important; }
.rate-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rate-grid div { border: 1px solid #dbe6f1; border-radius: 12px; padding: 10px 12px; display:flex; justify-content:space-between; gap:8px; background:#f8fafc; }
@media (max-width: 700px) { .rate-grid { grid-template-columns: 1fr; } }

/* v57: inventar hizalama, açıqlama mətnlərinin təmizlənməsi, baş kitab və modal polish */
.modal-note,
.form-hint,
.drop-hint {
    display: none !important;
}

.modal-card {
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.modal-form .btn-primary,
.modal-form .form-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin-top: 4px;
}

.inventory-table th:first-child,
.inventory-table td:first-child,
.inventory-table td.inventory-name,
.fixed-asset-table th:first-child,
.fixed-asset-table td:first-child {
    text-align: left !important;
}

.inventory-table td:not(:first-child),
.inventory-table th:not(:first-child) {
    text-align: center !important;
}

.inventory-tabs {
    display: inline-flex;
    gap: 8px;
    padding: 6px;
    margin: 4px 0 16px;
    border: 1px solid #dfe7f1;
    border-radius: 14px;
    background: #f8fafc;
}

.inventory-tab {
    width: auto;
    margin: 0;
    padding: 10px 18px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #102a43;
    font-size: 15px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.inventory-tab.active,
.inventory-tab:hover {
    background: #102a43;
    color: #fff;
}

.inventory-tab-panel { display: none; }
.inventory-tab-panel.active { display: block; }

.account-ledger-link {
    color: #102a43;
    text-decoration: none;
    font-weight: 700;
}
.account-ledger-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}
.ledger-subtitle {
    margin: 6px 0 0;
    color: #64748b;
    font-weight: 700;
}
.ledger-table { min-width: 950px; }
.ledger-table th,
.ledger-table td {
    text-align: center;
    vertical-align: middle;
}
.ledger-table td:nth-child(2),
.ledger-table td:nth-child(3),
.ledger-table td:nth-child(5) {
    text-align: left;
}

.fixed-asset-table-wrap {
    overflow: visible !important;
}
.fixed-asset-table .kebab-cell,
.fixed-asset-table .kebab-menu {
    overflow: visible !important;
}
.fixed-asset-table .kebab-dropdown {
    right: 0;
    left: auto;
    min-width: 170px;
    z-index: 5000;
}
.fixed-asset-table .kebab-dropdown button {
    white-space: nowrap;
    text-align: left;
}


.filter-period-badge {
    margin: 8px 0 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid #d9e2ec;
    border-radius: 12px;
    background: #f8fafc;
    color: #243b53;
    font-size: 14px;
}

.filter-period-badge span {
    color: #627d98;
}

.filter-period-badge strong {
    color: #102a43;
}

/* Maliyyə hesabatları */
.profit-loss-report h3 {
    margin: 8px 0 18px;
    color: #102a43;
    font-size: 20px;
}

.report-table-gap {
    margin-top: 18px;
}

.profit-loss-table .section-row-title {
    text-align: left !important;
    background: #eef4fb;
    color: #102a43;
    font-weight: 800;
}

.profit-loss-summary-table {
    max-width: 680px;
}

.profit-loss-summary-table td:first-child {
    text-align: left !important;
    font-weight: 800;
}

.profit-loss-summary-table td:last-child {
    width: 220px;
}


/* MZHH single-table layout */
.profit-loss-single-table {
    table-layout: fixed;
    width: 100%;
}

.profit-loss-single-table .col-pl-name {
    width: 72%;
}

.profit-loss-single-table .col-pl-money {
    width: 28%;
}

.profit-loss-single-table th,
.profit-loss-single-table td {
    padding: 12px 16px;
    white-space: normal;
    vertical-align: middle;
}

.profit-loss-single-table th:first-child,
.profit-loss-single-table td:first-child {
    text-align: left !important;
}

.profit-loss-single-table th:last-child,
.profit-loss-single-table td:last-child,
.profit-loss-single-table .num-cell {
    text-align: center !important;
    font-variant-numeric: tabular-nums;
}

.profit-loss-single-table .pl-bold-row td {
    font-weight: 800;
}

.profit-loss-single-table .pl-spacer-row td {
    height: 12px;
    padding: 6px 0;
    background: #fff;
    border-left-color: transparent;
    border-right-color: transparent;
}


/* Final filter alignment fix: all form action buttons stay level with inputs */
.filter-form {
    align-items: flex-end !important;
}
.filter-form .filter-actions {
    height: auto !important;
    align-self: flex-end !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
}
.filter-form .filter-actions .btn-primary,
.filter-form .filter-actions .btn-secondary,
.filter-form .filter-actions .btn-success,
.filter-form .filter-button {
    height: 46px !important;
    min-height: 46px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    line-height: 1 !important;
}
@media (max-width: 700px) {
    .filter-form .filter-actions {
        width: 100% !important;
    }
}
