:root {
    --blue: #006fbc;
    --blue-dark: #005fa8;
    --blue-soft: #eaf5ff;
    --blue-pale: #f1f8ff;
    --green: #08ad55;
    --green-2: #37d30e;
    --yellow: #ffc107;
    --red: #ee334e;
    --text: #121212;
    --muted: #666f7a;
    --border: #d9e1ea;
    --surface: #ffffff;
    --shadow: 0 10px 28px rgba(24, 84, 130, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
}

body {
    margin: 0;
    font-family: Inter, Arial, Helvetica, sans-serif;
    color: var(--text);
    background: #fff;
    font-weight: 400;
}

body.modal-open {
    overflow: hidden;
}

a {
    color: #006ef5;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.app-container {
    width: min(100% - 32px, 1320px);
    margin: 0 auto;
}

.site-header {
    background: #fff;
}

.topbar {
    min-height: 105px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background-image: url("https://dichvucong.gdt.gov.vn/tthc/images/wave-670dc51615012d97f73749dbd520180f.png");
    background-repeat: no-repeat;
    background-position: 0 top;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

.brand .brand-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.brand .brand-text span {
    font-size: 1rem;
    font-weight: bold;
}

.brand img {
    width: 78px;
    height: auto;
    object-fit: contain;
}

.brand p {
    margin: 0 0 4px;
    color: #e52020;
    font-size: 16px;
    font-weight: 800;
}

.brand strong,
.brand span {
    display: block;
    color: #060606;
    font-size: 17px;
    line-height: 1.55;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.icon-button,
.profile-button {
    border: 0;
    background: transparent;
    cursor: pointer;
}

.icon-button {
    position: relative;
    color: #ffb337;
    font-size: 28px;
}

.profile-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #242a31;
    font-weight: 700;
}

.profile-menu {
    position: relative;
}

.profile-menu.open .chevron {
    transform: rotate(180deg);
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 20;
    min-width: 240px;
    overflow: hidden;
    border: 1px solid #cfd5dd;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(21, 60, 96, 0.18);
    display: none;
}

.profile-menu.open .profile-dropdown {
    display: block;
}

.profile-identity,
.profile-dropdown a {
    display: block;
    padding: 11px 16px;
    color: #111;
    font-size: 16px;
    font-weight: 400;
}

.profile-identity {
    color: var(--blue);
    font-weight: 700;
}

.profile-dropdown a {
    border-top: 1px solid #d8dde4;
}

.profile-dropdown a:hover,
.profile-dropdown a:focus {
    background: #eef6ff;
    color: var(--blue);
}

.chevron {
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 7px solid #006ef5;
}

.main-nav {
    background: var(--blue);
}

.nav-scroll {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 0;
    overflow-x: auto;
}

.main-nav a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    padding: 0 10px;
    white-space: nowrap;
}

.main-nav a.active,
.main-nav a:hover {
    color: #fff;
    background: #002d62;
}

.main-nav a[href="#"] {
    display: none;
}

.side-menu a[href=""],
.side-menu a[href="#"] {
    display: none;
}

.home-link {
    font-size: 29px;
    line-height: 1;
}

.page-shell {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 24px;
    padding: 18px 0 38px;
}

.work-shell {
    padding: 18px 0 38px;
}

.muted-text {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: calc(0.9 * 1rem);
}

.sidebar h2 {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 500;
}

.side-menu {
    border: 1px solid var(--border);
    border-radius: 5px;
    overflow: hidden;
}

.side-menu a {
    display: block;
    padding: 11px 16px;
    color: #101010;
    border-bottom: 1px solid var(--border);
}

.side-menu a:last-child {
    border-bottom: 0;
}

.side-menu a.active {
    background: #0d6efd;
    color: #fff;
}

.content-area {
    min-width: 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 36px;
    color: var(--muted);
}

.panel {
    margin-bottom: 30px;
}

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 0;
}

h2 {
    font-size: 18px;
}

.actions,
.table-title {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.btn {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 6px;
    border: 1px solid transparent;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    font-style: normal;
}

.btn-primary,
.btn-warning {
    background: var(--yellow);
    color: #000000;
}

.btn-soft {
    background: #daeaf9;
    color: var(--blue);
}

.btn-muted {
    background: #edf4fb;
    color: var(--blue);
}

.btn-danger {
    background: #d92d20;
    color: #fff;
}

.btn-outline {
    background: #fff;
    border-color: var(--blue);
    color: var(--blue);
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.alert {
    margin-bottom: 16px;
    border-radius: 6px;
    padding: 11px 13px;
    font-size: 14px;
    font-weight: 600;
}

.alert-error {
    border: 1px solid #ffd0d7;
    background: #fff2f4;
    color: #c71833;
}

.permission-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: -8px 0 18px;
    color: var(--muted);
    font-size: 13px;
}

.permission-strip span {
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    padding: 5px 10px;
}

.permission-strip .allowed {
    border-color: #bfe8cf;
    background: #eefaf2;
    color: #077a3c;
}

.permission-strip .denied {
    border-color: #ffd0d7;
    background: #fff4f5;
    color: #c71833;
}

.taxpayer-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 24px;
}

.field {
    display: grid;
    gap: 8px;
    color: #151515;
    font-weight: 500;
    font-size: calc(0.9 * 1rem);
}

.field b {
    color: #f31f24;
}

.field input,
.field select {
    width: 100%;
    min-height: 36px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 7px 12px;
    background: #fff;
    color: #111;
    font-weight: 400;
    font-size: calc(0.9 * 1rem);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: 2px solid rgba(0, 126, 206, 0.2);
    border-color: #45a1da;
}

.field textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 9px 12px;
    font: inherit;
    line-height: 1.5;
    resize: vertical;
}

.alert-success {
    border: 1px solid #bfe8cf;
    background: #eefaf2;
    color: #077a3c;
}

.btn-small {
    font-size: 16px;
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(320px, 420px);
    gap: 24px;
}

.business-form {
    display: grid;
    gap: 14px 24px;
}

.field-wide {
    grid-column: 1 / -1;
}

.inline-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.mst-search small {
    min-height: 18px;
    color: var(--muted);
    font-weight: 400;
    font-size: calc(0.9 * 1rem);
}

.mst-search small.found {
    color: #077a3c;
}

.mst-search small.not-found {
    color: #c71833;
}

.utility-workspace {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
}

.utility-left {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.utility-menu .is-disabled {
    color: var(--muted);
    cursor: not-allowed;
}

.scan-card p {
    margin: 0px 0 14px;
    color: var(--muted);
    line-height: 1.55;
    font-size: calc(0.9 * 1rem);
}

.scan-card .btn {
    margin-top: 14px;
}

.scan-card small {
    display: block;
    min-height: 18px;
    margin-top: 10px;
    color: var(--muted);
    font-size: calc(0.9 * 1rem);
    line-height: 1.45;
}

.scan-card small.found {
    color: #077a3c;
}

.scan-card small.not-found {
    color: #c71833;
}

.statement-upload-form {
    max-width: 100%;
}

.statement-status {
    display: block;
    color: var(--muted);
    line-height: 1.55;
    font-size: calc(0.9 * 1rem);
}

.statement-status.found {
    color: #077a3c;
}

.statement-status.not-found {
    color: #c71833;
}

.cake-statement-result {
    margin-top: 24px;
}

.table-scroll {
    overflow-x: auto;
}

.cake-statement-table th,
.cake-statement-table td {
    white-space: nowrap;
    text-align: left;
}

.cake-statement-table th:nth-child(3),
.cake-statement-table td:nth-child(3) {
    min-width: 320px;
    white-space: normal;
}

.cake-statement-table th:last-child,
.cake-statement-table td:last-child {
    text-align: right;
    font-weight: 700;
}

.cake-account-statement-table th,
.cake-account-statement-table td {
    white-space: nowrap;
    text-align: left;
}

.cake-account-statement-table th:nth-child(3),
.cake-account-statement-table td:nth-child(3),
.cake-account-statement-table th:nth-child(7),
.cake-account-statement-table td:nth-child(7) {
    min-width: 240px;
    white-space: normal;
}

.cake-account-statement-table th:nth-child(4),
.cake-account-statement-table td:nth-child(4),
.cake-account-statement-table th:nth-child(5),
.cake-account-statement-table td:nth-child(5) {
    text-align: right;
    font-weight: 700;
}

.cake-account-statement-table th:nth-child(8),
.cake-account-statement-table td:nth-child(8) {
    min-width: 160px;
}

.statement-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 14px;
}

.statement-summary span {
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--text);
    padding: 7px 12px;
    font-size: calc(0.9 * 1rem);
}

.amount-negative {
    color: #c71833;
}

.amount-positive {
    color: #077a3c;
}

.utility-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.template-viewer {
    min-width: 0;
}

.template-badge {
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue);
    padding: 5px 10px;
    font-weight: 700;
    font-size: calc(0.9 * 1rem);
}

.document-canvas {
    overflow: auto;
    border: 1px solid var(--border);
    background: #eef3f8;
    padding: 24px;
}

.word-page {
    width: 794px;
    min-height: 980px;
    box-sizing: border-box;
    margin: 0 auto;
    background: #fff;
    color: #000;
    padding: 76px 70px 70px;
    font-family: "Times New Roman", Times, serif;
    font-size: 16px;
    line-height: 1.45;
    box-shadow: 0 12px 30px rgba(15, 54, 91, 0.14);
}

.doc-header {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 28px;
    align-items: start;
    margin-bottom: 58px;
}

.doc-company,
.doc-national {
    text-align: center;
}

.doc-company {
    font-weight: 700;
    text-transform: uppercase;
}

.doc-national {
    display: grid;
    gap: 2px;
}

.doc-national strong {
    font-size: 16px;
}

.doc-national em {
    font-weight: 700;
}

.word-page h2 {
    margin: 0 0 22px;
    text-align: center;
    font-size: 22px;
    padding: 0px 70px 0px 70px;
}

.doc-recipient {
    width: 100%;
    max-width: 100%;
    margin: 0 auto 22px;
    line-height: 1.22;
    text-align: center;
    overflow-wrap: anywhere;
}

.doc-recipient .doc-highlight {
    display: inline;
    text-align: center;
}

.doc-intro {
    max-width: 100%;
    line-height: 1.45;
    overflow-wrap: break-word;
}

.word-page p {
    margin: 10px 0;
}

.doc-highlight {
    display: inline;
    background: #fff200;
    padding: 0 2px;
}

.word-page .doc-table {
    --doc-table-width: 100%;
    width: var(--doc-table-width);
    min-width: var(--doc-table-width);
    max-width: var(--doc-table-width);
    table-layout: fixed;
    border-collapse: collapse;
    margin: 22px auto 18px;
    text-align: center;
}

.doc-col-stt {
    width: 50px;
}

.doc-col-supplier {
    width: 144px;
}

.doc-col-invoice {
    width: 100px;
}

.doc-col-date {
    width: 110px;
}

.doc-col-item {
    width: 115px;
}

.doc-col-amount {
    width: 135px;
}

.word-page .doc-table th,
.word-page .doc-table td {
    border: 1px solid #000;
    padding: 8px 6px;
    background: #fff;
    color: #000;
    text-align: center;
    vertical-align: middle;
    font-size: 16px;
    line-height: 1.2;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

.word-page .doc-table .doc-highlight {
    display: inline;
    overflow-wrap: anywhere;
}

.word-page .doc-table th {
    font-weight: 400;
}

.doc-signature {
    width: 315px;
    margin: 58px 0 0 auto;
    text-align: center;
}

.doc-signature strong {
    display: block;
    margin-top: 18px;
    text-transform: uppercase;
}

.gnn-canvas {
    display: grid;
    gap: 18px;
}

.gnn-page {
    width: 794px;
    min-height: 1123px;
    box-sizing: border-box;
    margin: 0 auto;
    background: #fff;
    color: #000;
    padding: 76px 70px 70px;
    font-family: "Times New Roman", Times, serif;
    font-size: 16px;
    line-height: 1.22;
    box-shadow: 0 12px 30px rgba(15, 54, 91, 0.14);
}

.gnn-page p {
    margin: 6px 0;
}

.gnn-header {
    display: grid;
    grid-template-columns: 1fr 1.38fr;
    gap: 28px;
    align-items: start;
    margin-bottom: 32px;
    text-align: center;
}

.gnn-party {
    display: grid;
    justify-items: center;
    gap: 2px;
    font-weight: 700;
    text-transform: uppercase;
}

.gnn-party .doc-highlight {
    display: inline-block;
    max-width: 235px;
}

.gnn-national {
    display: grid;
    gap: 2px;
    font-weight: 700;
}

.gnn-national em {
    font-weight: 700;
}

.gnn-page h2 {
    margin: 0 0 2px;
    text-align: center;
    font-size: 22px;
}

.gnn-center {
    text-align: center;
}

.gnn-info-table {
    --doc-table-width: 100%;
    width: var(--doc-table-width);
    min-width: var(--doc-table-width);
    max-width: var(--doc-table-width);
    table-layout: fixed;
    border-collapse: collapse;
    margin: 22px auto 18px;
    text-align: left;
}

.gnn-info-table td {
    padding: 2px 3px;
    vertical-align: top;
}

.gnn-info-table td:first-child {
    width: 43%;
}

.gnn-info-table td:nth-child(2) {
    width: 18px;
    text-align: center;
}

.gnn-currency {
    margin: 0 8px 2px 0 !important;
    text-align: right;
    font-style: italic;
}

.gnn-debt-table {
    --doc-table-width: 100%;
    width: var(--doc-table-width);
    min-width: var(--doc-table-width);
    max-width: var(--doc-table-width);
    table-layout: fixed;
    border-collapse: collapse;
    margin: 22px auto 18px;
    text-align: center;
}

.gnn-debt-table th,
.gnn-debt-table td {
    border: 1px solid #000;
    padding: 5px 3px;
    vertical-align: middle;
    font-size: 12px;
    line-height: 1.18;
    overflow-wrap: anywhere;
    word-break: break-word;
    background: #fff;
    color: #000;
    text-align: center;
    vertical-align: middle;
    white-space: normal;
}

.gnn-debt-table th {
    font-weight: 700;
}

.gnn-debt-table tbody tr:first-child td {
    height: 108px;
}

.gnn-total-row td {
    height: 42px !important;
    font-weight: 700;
}

.gnn-col-stt {
    width: 6.4%;
}

.gnn-col-beneficiary {
    width: 11.4%;
}

.gnn-col-bank {
    width: 10.4%;
}

.gnn-col-account {
    width: 13.8%;
}

.gnn-col-invoice {
    width: 11.4%;
}

.gnn-col-date {
    width: 10.2%;
}

.gnn-col-item {
    width: 10.2%;
}

.gnn-col-money {
    width: 13.1%;
}

.gnn-borrower-sign {
    width: 330px;
    margin: 30px 0 190px auto;
    text-align: center;
}

.gnn-borrower-sign strong {
    display: block;
    margin-top: 8px;
    text-transform: uppercase;
}

.gnn-bank-sign {
    border-top: 1px solid #000;
    padding-top: 10px;
    text-align: center;
}

.gnn-bank-sign>strong {
    font-style: italic;
}

.gnn-bank-footer {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 36px;
    margin-top: 42px;
    text-align: left;
}

.gnn-director {
    text-align: center;
}

.excel-canvas {
    padding: 18px;
}

.excel-page {
    width: 794px;
    min-height: 980px;
    box-sizing: border-box;
    margin: 0 auto;
    background: #fff;
    color: #000;
    padding: 76px 70px 70px;
    font-family: "Times New Roman", Times, serif;
    font-size: 16px;
    line-height: 1.45;
    box-shadow: 0 12px 30px rgba(15, 54, 91, 0.14);
}

.excel-page .excel-sheet {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    border-collapse: collapse;
    border: 2px solid #2f4942;
    font-family: "Times New Roman", Times, serif;
    font-size: 16px;
    text-align: left;
}

.excel-page .excel-sheet td,
.excel-page .excel-sheet th {
    border: 1px solid #d8d8d8;
    background: #fff;
    color: #000;
    padding: 6px 4px;
    vertical-align: middle;
    line-height: 1.18;
    overflow-wrap: break-word;
    word-break: break-word;
}

.excel-col-a {
    width: 14.6%;
}

.excel-col-b {
    width: 14.9%;
}

.excel-col-c {
    width: 14.3%;
}

.excel-col-d {
    width: 10%;
}

.excel-col-e {
    width: 9.8%;
}

.excel-col-f {
    width: 8.8%;
}

.excel-col-g {
    width: 8.9%;
}

.excel-col-h {
    width: 18.7%;
}

.excel-bank-name,
.excel-title,
.excel-subtitle,
.excel-copy,
.excel-center,
.excel-row-14 td,
.excel-row-15 td {
    text-align: center;
}

.excel-bank-name,
.excel-title {
    font-weight: 700;
}

.excel-title {
    font-size: 16px;
}

.excel-logo-cell {
    text-align: center;
}

.vietin-logo {
    color: #d9232e;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -1px;
}

.vietin-logo span {
    color: #0072bc;
}

.excel-subtitle {
    font-size: 16px;
}

.excel-copy {
    border-top: 2px solid #000 !important;
    border-bottom: 2px solid #000 !important;
}

.excel-row-13 td {
    border-top: 2px solid #2f4942 !important;
}

.excel-row-14 td {
    border-top: 1.5px solid #2f4942 !important;
}

.excel-row-blank td {
    border-bottom: 2px solid #2f4942 !important;
}

.excel-yellow {
    background: #fff200 !important;
}

.excel-bold {
    font-weight: 700;
}

.excel-uppercase {
    text-transform: uppercase;
}


.excel-amount {
    text-align: right;
    font-size: 16px;
}

.excel-box-label {
    border: 2px solid #000 !important;
    border-bottom: 0 !important;
}

.excel-row-amount td:nth-last-child(1) {
    border: 2px solid #000 !important;
    border-top: 0 !important;
}

.excel-row-1 td {
    height: 32px;
}

.excel-row-2 td {
    height: 58px;
}

.excel-row-3 td {
    height: 36px;
}

.excel-row-4 td {
    height: 34px;
}

.excel-row-13 td {
    height: 54px;
}

.excel-row-14 td,
.excel-row-15 td {
    height: 44px;
}

.excel-row-blank td {
    height: 150px;
    vertical-align: top;
}

@media print {
    @page {
        size: A4;
        margin: 0;
    }

    body {
        background: #fff;
    }

    .site-header,
    .site-footer,
    .sidebar,
    .breadcrumb,
    .utility-left,
    .template-viewer>.section-heading {
        display: none !important;
    }

    .app-container,
    .page-shell,
    .content-area,
    .utility-workspace,
    .template-viewer,
    .document-canvas {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
        border: 0 !important;
        background: #fff !important;
        box-shadow: none !important;
    }

    .word-page,
    .excel-page,
    .gnn-page {
        width: 210mm !important;
        min-height: 297mm !important;
        margin: 0 !important;
        box-shadow: none !important;
    }

    .excel-page {
        padding: 10mm 8mm !important;
    }

    .gnn-page {
        height: 297mm !important;
        min-height: 0 !important;
        max-height: 297mm !important;
        padding: 13mm 13mm 11mm !important;
        overflow: hidden !important;
        font-size: 13.35px !important;
        line-height: 1.16 !important;
        break-after: page;
        page-break-after: always;
    }

    .gnn-page p {
        margin: 4px 0 !important;
    }

    .gnn-header {
        margin-bottom: 22px !important;
    }

    .gnn-page h2 {
        font-size: 16.5px !important;
    }

    .gnn-info-table {
        margin: 8px auto 7px !important;
    }

    .gnn-info-table td {
        padding: 2px 3px !important;
    }

    .gnn-debt-table {
        margin: 8px auto 11px !important;
    }

    .gnn-debt-table th,
    .gnn-debt-table td {
        padding: 4px 2px !important;
        font-size: 11.5px !important;
        line-height: 1.1 !important;
    }

    .gnn-debt-table tbody tr:first-child td {
        height: 92px !important;
    }

    .gnn-total-row td {
        height: 34px !important;
    }

    .gnn-borrower-sign {
        margin: 32px 0 158px auto !important;
    }

    .gnn-bank-footer {
        margin-top: 40px !important;
    }

    .gnn-page:last-child {
        break-after: auto;
        page-break-after: auto;
    }
}

.admin-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    padding: 18px;
}

.admin-table {
    min-width: 720px;
}

.admin-table-wide {
    min-width: 900px;
}

.admin-table th,
.admin-table td {
    padding: 8px 10px;
    font-size: calc(0.9 * 1rem);
}

.admin-table small {
    color: var(--muted);
}

.admin-table select {
    min-height: 34px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #fff;
    padding: 5px 9px;
    font-weight: 400;
    font-size: calc(0.9 * 1rem);
}

.admin-table input {
    width: 100%;
    min-height: 34px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 5px 9px;
    font-size: calc(0.9 * 1rem);
}

.admin-active {
    margin: 16px 0;
}

.activity-details summary {
    cursor: pointer;
    color: var(--blue);
    font-weight: 700;
}

.activity-details pre {
    max-width: 420px;
    max-height: 220px;
    overflow: auto;
    margin: 8px 0 0;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #f7fafc;
    padding: 10px;
    text-align: left;
    white-space: pre-wrap;
    font-size: 12px;
}

.subheading {
    margin: 20px 0 12px;
    color: var(--blue);
}

.pricing-tiers h2 {
    margin-bottom: 10px;
    color: var(--blue);
}

.guide-card {
    margin-bottom: 18px;
    border: 1px solid #bfe0f7;
    border-left: 4px solid var(--blue);
    border-radius: 8px;
    background: #f5fbff;
    overflow: hidden;
}

.guide-toggle {
    width: 100%;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 0;
    background: transparent;
    padding: 12px 16px;
    color: var(--blue);
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    text-align: left;
}

.guide-chevron {
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--blue);
    border-bottom: 2px solid var(--blue);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.guide-card.open .guide-chevron {
    transform: rotate(225deg);
}

.guide-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 16px;
    transition: max-height 0.25s ease, padding-bottom 0.25s ease;
}

.guide-card.open .guide-content {
    max-height: 420px;
    padding-bottom: 14px;
}

.guide-card p {
    margin: 6px 0;
    color: #27313d;
    line-height: 1.45;
}

.total-badge {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    border-radius: 999px;
    background: #eefaf2;
    color: #077a3c;
    padding: 6px 14px;
    font-size: calc(0.9 * 1rem);
}

.status-text {
    color: #b45309 !important;
    font-size: 1rem !important;
}

.status-text.active {
    color: #077a3c !important;
    font-size: 1rem !important;
}

.version-badge,
.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: calc(0.9 * 1rem);
    font-weight: 700;
}

.version-badge {
    background: #eef6ff;
    color: var(--blue);
}

.status-pill {
    background: #f4f6f8;
    color: #5f6873;
}

.status-pill.pending {
    background: #fff8e6;
    color: #b45309;
    border: 1px solid #fde68a;
    display: inline-flex;
    align-items: center;
}

.status-pill.active,
.status-pill.completed,
.status-pill.done {
    background: #eefaf2;
    color: #077a3c;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 16px;
}

.danger-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
    border-top: 1px solid #ffd0d7;
    padding-top: 16px;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(8, 31, 52, 0.45);
}

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

.modal-panel {
    width: min(960px, 100%);
    max-height: min(86vh, 820px);
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: 0 24px 70px rgba(0, 55, 97, 0.28);
}

.pricing-modal {
    width: min(1040px, 100%);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: #f8fbff;
}

.modal-header h1 {
    font-size: 20px;
}

.modal-close {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 6px;
    border: 1px solid transparent;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    font-style: normal;
    background: #daeaf9;
    color: var(--blue);
}

.modal-close:hover,
.modal-close:focus {
    background: var(--yellow);
    color: #000000;
}

.modal-body {
    max-height: calc(min(86vh, 820px) - 68px);
    overflow-y: auto;
    padding: 20px;
}

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

.detail-grid div {
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #fbfdff;
    padding: 11px 12px;
}

.detail-grid span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: calc(0.9 * 1rem);
}

.detail-grid strong {
    display: block;
    font-size: 1rem;
}

.pricing-detail-table {
    min-width: 620px;
}

.pricing-basic-section {
    margin-top: 34px;
}

.pricing-basic-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.pricing-basic-heading h1 {
    font-size: 24px;
}

.pricing-basic-table {
    min-width: 860px;
}

.dashboard-filter-card {
    margin: 0 0 18px;
    padding: 16px 18px;
}

.dashboard-filter-form {
    grid-template-columns: minmax(180px, 1.2fr) repeat(1, minmax(150px, 1fr)) auto;
    align-items: end;
    gap: 14px;
}

.dashboard-filter-actions {
    grid-column: auto;
    align-self: end;
    justify-content: flex-start;
    white-space: nowrap;
}

.dashboard-filter-note {
    margin: 10px 0 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 24px;
    padding: 12px 0 20px;
}

.chart-card,
.chart-wide {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}

.chart-card {
    min-height: 370px;
    padding: 16px 26px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chart-card h2 {
    text-align: center;
    font-size: 18px;
    margin: 0 0 12px;
}

.chart-card canvas {
    width: 100%;
    max-width: 520px;
    height: auto;
}

.revenue-month-card canvas {
    max-width: none;
}

.revenue-summary-card {
    display: grid;
    grid-template-rows: auto 1fr auto;
    justify-items: center;
}

.revenue-summary-card canvas {
    width: 250px;
    max-width: 100%;
    align-self: center;
}

.revenue-summary-card .summary-line {
    margin-top: 0;
}

.summary-line {
    width: 100%;
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    color: #4d4d4d;
    font-size: 16px;
}

.summary-line strong {
    color: var(--blue);
}

.chart-wide {
    padding: 18px;
    background: #fff;
}

.chart-wide h2 {
    color: #004aa2;
    font-size: 16px;
    margin: 0 0 16px;
    font-weight: 600;
}

.chart-wide canvas {
    width: 100%;
    height: auto;
}

.data-section {
    margin-top: 34px;
}

.table-title {
    justify-content: space-between;
    margin-bottom: 14px;
}

.table-title h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 500;
}

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

table {
    width: 100%;
    min-width: 850px;
    border-collapse: collapse;
    text-align: center;
}

th,
td {
    border: 1px solid var(--border);
    padding: 10px 12px;
}

th {
    background: var(--blue);
    color: #fff;
    font-size: 16px;
    line-height: 1.35;
}

.empty-row {
    color: #111;
    background: #fff;
}

.site-footer {
    margin-top: 8px;
    background-color: #dceeff;
    background-image: url("https://dichvucong.gdt.gov.vn/tthc/images/Vector2-ee9296f8645db3653b6e67496a8d5878.svg");
    background-size: cover;
    background-position: center;
}

.footer-inner {
    min-height: 136px;
    display: grid;
    grid-template-columns: 168px 1fr 420px;
    align-items: center;
    gap: 24px;
    font-size: 13px;
}

.footer-photo {
    width: 138px;
    border-radius: 7px;
}

.footer-info h2 {
    margin-bottom: 8px;
    color: var(--blue);
    font-size: 16px;
}

.footer-info p,
.footer-contact p {
    margin: 5px 0;
}

.auth-body {
    min-height: 100vh;
    background:
        linear-gradient(rgba(235, 247, 255, 0.92), rgba(235, 247, 255, 0.92)),
        url("https://dichvucong.gdt.gov.vn/tthc/images/wave-670dc51615012d97f73749dbd520180f.png") top center / 980px auto no-repeat;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(100%, 450px);
    padding: 28px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.login-brand img {
    width: 116px;
}

.login-brand p {
    margin: 0 0 5px;
    color: #e52020;
    font-weight: 800;
    font-size: 13px;
}

.login-brand h1 {
    font-size: 24px;
    font-weight: 500;
}

.form-stack {
    display: grid;
    gap: 15px;
}

.form-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.between {
    justify-content: space-between;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
}

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

    .sidebar {
        display: grid;
        grid-template-columns: 210px minmax(0, 1fr);
        align-items: start;
        gap: 18px;
    }

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

    .dashboard-filter-form {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dashboard-filter-actions {
        grid-column: 1 / -1;
    }

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

    .utility-workspace {
        grid-template-columns: 1fr;
    }

    .utility-left {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 140px 1fr;
    }

    .footer-contact {
        grid-column: 2;
    }
}

@media (max-width: 760px) {
    .app-container {
        width: min(100% - 20px, 1320px);
    }

    .topbar {
        min-height: auto;
        padding: 16px 0;
        align-items: flex-start;
        flex-direction: column;
    }

    .brand img {
        width: 136px;
    }

    .brand p {
        font-size: 14px;
    }

    .brand strong,
    .brand span,
    .main-nav a {
        font-size: 14px;
    }

    .nav-scroll {
        gap: 16px;
    }

    .sidebar {
        display: block;
    }

    .breadcrumb {
        margin-bottom: 20px;
        flex-wrap: wrap;
    }

    .section-heading,
    .table-title,
    .actions {
        align-items: stretch;
        flex-direction: column;
    }

    .taxpayer-form {
        grid-template-columns: 1fr;
    }

    .business-form {
        grid-template-columns: 1fr;
    }

    .dashboard-filter-form {
        grid-template-columns: 1fr;
    }

    .utility-form {
        grid-template-columns: 1fr;
    }

    .document-canvas {
        padding: 12px;
    }

    .word-page {
        width: 794px;
        padding: 58px 42px;
    }

    .chart-card {
        padding: 14px;
        min-height: 320px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        padding: 20px 0;
    }

    .footer-contact {
        grid-column: auto;
    }

    .login-card {
        padding: 22px;
    }

    .login-brand {
        align-items: flex-start;
        flex-direction: column;
    }
}
