:root {
    --ink: #172536;
    --muted: #6f7d8e;
    --faint: #96a1af;
    --line: #e5eaf1;
    --surface: #ffffff;
    --canvas: #f4f7fb;
    --navy: #11283e;
    --navy-soft: #193752;
    --blue: #2e6be6;
    --blue-soft: #eaf1ff;
    --green: #0e8a70;
    --green-soft: #e8f7f2;
    --red: #d94a52;
    --red-soft: #fff0f1;
    --amber: #bb771c;
    --amber-soft: #fff5df;
    --shadow: 0 10px 35px rgba(32, 53, 82, 0.07);
    --radius: 16px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--canvas);
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: var(--canvas);
    font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--blue);
    text-decoration: none;
}

a:hover {
    color: #194eb8;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

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

h1 {
    margin-bottom: 0;
    font-size: 26px;
    line-height: 1.25;
    letter-spacing: -0.4px;
}

h2 {
    margin-bottom: 0;
    font-size: 18px;
    line-height: 1.35;
}

.app-shell {
    display: grid;
    grid-template-columns: 236px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    display: flex;
    width: 236px;
    flex-direction: column;
    color: #dce9f5;
    background:
        radial-gradient(circle at 10% 5%, rgba(67, 125, 185, 0.35), transparent 30%),
        linear-gradient(160deg, #142f49, #0d2134 75%);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 25px 22px 23px;
    color: white;
}

.brand:hover {
    color: white;
}

.brand-mark {
    display: inline-grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    color: white;
    border-radius: 11px;
    background: linear-gradient(145deg, #6ea1ff, #2e6be6);
    box-shadow: 0 7px 20px rgba(35, 99, 219, 0.35);
    font-size: 19px;
    font-weight: 800;
}

.brand-mark.large {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    font-size: 23px;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-copy strong {
    font-size: 17px;
    letter-spacing: 1px;
}

.brand-copy small {
    margin-top: 5px;
    color: #88a5bf;
    font-size: 8px;
    letter-spacing: 2px;
}

.main-nav {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 5px;
    padding: 8px 13px;
}

.main-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 45px;
    padding: 0 13px;
    color: #acc0d2;
    border-radius: 10px;
    font-weight: 600;
    transition: 160ms ease;
}

.main-nav a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.07);
}

.main-nav a.active {
    color: white;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 3px 0 #6f9cff;
}

.nav-icon {
    width: 20px;
    text-align: center;
    color: #83a1ba;
    font-size: 18px;
}

.main-nav a.active .nav-icon {
    color: #93b6ff;
}

.sidebar-account {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px;
    padding: 13px 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.avatar {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 10px;
    color: #12324d;
    background: #dceaff;
    font-weight: 800;
}

.account-copy {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

.account-copy strong {
    overflow: hidden;
    color: white;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-copy small {
    color: #8ba6bd;
    font-size: 11px;
}

.account-menu {
    position: relative;
}

.account-menu summary {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    color: #9eb3c5;
    border-radius: 8px;
    cursor: pointer;
    list-style: none;
}

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

.account-menu[open] summary,
.account-menu summary:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.menu-popover {
    position: absolute;
    right: 0;
    bottom: 40px;
    width: 130px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: white;
    box-shadow: 0 14px 34px rgba(10, 30, 50, 0.22);
}

.menu-popover a,
.menu-popover button {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 7px;
    color: var(--ink);
    background: transparent;
    text-align: left;
}

.menu-popover a:hover,
.menu-popover button:hover {
    background: var(--canvas);
}

.menu-popover form {
    margin: 0;
}

.page-shell {
    display: flex;
    min-width: 0;
    min-height: 100vh;
    flex-direction: column;
    grid-column: 2;
}

.topbar {
    display: flex;
    min-height: 96px;
    align-items: center;
    gap: 24px;
    padding: 22px 38px 17px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    background: rgba(244, 247, 251, 0.88);
    backdrop-filter: blur(12px);
}

.topbar > div:nth-child(2) {
    flex: 1;
}

.topbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
}

.eyebrow {
    margin: 0 0 5px;
    color: #7d8b9c;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.eyebrow.light {
    color: #83a8c7;
}

.content {
    width: 100%;
    max-width: 1550px;
    flex: 1;
    margin: 0 auto;
    padding: 26px 38px 38px;
}

.app-footer {
    padding: 10px 38px 25px;
    color: var(--faint);
    font-size: 11px;
    text-align: right;
}

.mobile-nav-toggle {
    display: none;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
    background: white;
}

.sidebar-backdrop {
    display: none;
}

.btn {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 8px 15px;
    border: 1px solid transparent;
    border-radius: 9px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    transition: 150ms ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    color: white;
    background: var(--blue);
    box-shadow: 0 5px 15px rgba(46, 107, 230, 0.2);
}

.btn-primary:hover {
    color: white;
    background: #205bce;
}

.btn-secondary {
    color: var(--blue);
    border-color: #c9d9fb;
    background: #edf3ff;
}

.btn-secondary:hover {
    color: #1749a3;
    background: #e3edff;
}

.btn-ghost {
    color: var(--ink);
    border-color: var(--line);
    background: white;
}

.btn-danger-outline {
    color: var(--red);
    border-color: #f0c9cc;
    background: white;
}

.btn-block {
    width: 100%;
}

.btn-small {
    min-height: 31px;
    padding: 5px 10px;
    font-size: 10px;
}

.list-result-tools {
    display: flex;
    align-items: center;
    gap: 12px;
}

.checkbox-column {
    width: 34px;
    text-align: center;
}

.checkbox-column input {
    width: 16px;
    height: 16px;
    accent-color: var(--blue);
    cursor: pointer;
}

.text-link {
    font-size: 12px;
    font-weight: 700;
}

.panel {
    min-width: 0;
    padding: 22px;
    border: 1px solid rgba(225, 231, 240, 0.88);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.panel-head.compact {
    margin-bottom: 12px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.metric-card {
    position: relative;
    overflow: hidden;
    min-height: 145px;
    padding: 20px 22px;
    border: 1px solid rgba(225, 231, 240, 0.85);
    border-radius: var(--radius);
    background: white;
    box-shadow: var(--shadow);
}

.metric-card::after {
    position: absolute;
    top: -28px;
    right: -22px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--blue-soft);
    content: "";
}

.metric-card.accent-green::after {
    background: var(--green-soft);
}

.metric-card.accent-red::after {
    background: var(--red-soft);
}

.metric-card.accent-amber::after {
    background: var(--amber-soft);
}

.metric-label {
    display: block;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.finance-summary-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.currency-summary {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
}

.currency-summary h2 {
    margin: 2px 0 1px;
    font-size: 23px;
}

.currency-summary small {
    color: var(--faint);
    font-size: 9px;
}

.currency-summary-split {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 4px;
    color: var(--muted);
    font-size: 10px;
    white-space: nowrap;
}

.tax-checklist-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 19px;
    padding: 24px 28px;
    overflow: hidden;
    color: white;
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 88% -45%, rgba(102, 164, 255, 0.5), transparent 42%),
        linear-gradient(135deg, #163b58, #10283e);
    box-shadow: 0 15px 36px rgba(17, 40, 62, 0.16);
}

.package-ready-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 19px;
    border-color: #c6e7dc;
    background: linear-gradient(135deg, rgba(238, 252, 247, 0.92), white);
}

.package-ready-panel h2 {
    margin-bottom: 4px;
}

.package-ready-panel p:not(.eyebrow) {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

.package-ready-panel small {
    color: var(--green);
    font-size: 10px;
}

.package-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}

.package-actions form {
    margin: 0;
}

.customs-hero {
    margin-bottom: 19px;
    padding: 24px 27px;
    color: white;
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 88% -45%, rgba(89, 213, 169, 0.35), transparent 42%),
        linear-gradient(135deg, #164538, #0e2c24);
    box-shadow: 0 15px 36px rgba(17, 40, 62, 0.16);
}

.customs-hero h2 {
    margin-bottom: 5px;
    font-size: 23px;
}

.customs-hero p:not(.eyebrow) {
    margin: 0;
    color: #b4ccc2;
    font-size: 11px;
}

.customs-table td {
    vertical-align: top;
}

.pdf-downloads summary {
    color: var(--blue);
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.pdf-downloads > div {
    display: flex;
    max-width: 210px;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
}

.pdf-downloads a {
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tax-checklist-complete {
    background:
        radial-gradient(circle at 88% -45%, rgba(92, 220, 174, 0.38), transparent 42%),
        linear-gradient(135deg, #145038, #0d3327);
}

.tax-checklist-hero h2 {
    margin-bottom: 5px;
    font-size: 23px;
}

.tax-checklist-hero p:not(.eyebrow) {
    margin: 0;
    color: #b5c9d8;
    font-size: 11px;
}

.checkmark {
    display: inline-grid;
    width: 29px;
    height: 29px;
    margin-right: 5px;
    place-items: center;
    color: #0d7659;
    border-radius: 50%;
    background: #d8f5eb;
    font-size: 17px;
}

.checklist-progress {
    display: flex;
    flex: 0 0 auto;
    align-items: flex-end;
    flex-direction: column;
}

.checklist-progress strong {
    font-size: 39px;
    line-height: 1;
}

.checklist-progress small {
    color: #9eb7c8;
    font-size: 17px;
}

.checklist-progress span {
    margin-top: 4px;
    color: #9eb7c8;
    font-size: 9px;
    letter-spacing: 0.5px;
}

.tax-document-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.tax-document-card {
    position: relative;
    display: flex;
    min-height: 220px;
    flex-direction: column;
    padding: 19px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: white;
    box-shadow: var(--shadow);
}

.tax-document-card.document-complete {
    border-color: #bde7da;
    background:
        linear-gradient(150deg, rgba(236, 251, 246, 0.8), white 54%);
}

.document-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.document-number {
    color: #9ca8b7;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
}

.document-check {
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    color: #08705b;
    border-radius: 50%;
    background: #d9f4eb;
    font-size: 13px;
    font-weight: 900;
}

.tax-document-card h3 {
    margin: 12px 0 7px;
    font-size: 15px;
}

.tax-document-card > .tag {
    align-self: flex-start;
}

.document-file {
    max-width: 100%;
    margin-top: 11px;
    overflow: hidden;
    color: var(--ink);
    font-size: 11px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-file-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 10px;
}

.document-file-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 9px;
    padding: 8px 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfe;
}

.document-file-item > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.document-file-item .document-file {
    margin-top: 0;
}

.document-file-item small {
    color: var(--faint);
    font-size: 9px;
}

.tax-document-card > small {
    color: var(--faint);
    font-size: 9px;
}

.document-upload-form {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: auto;
    padding-top: 15px;
}

.document-delete-form {
    margin-top: 7px;
}

.mini-check {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 10px;
}

.mini-check input {
    accent-color: var(--blue);
}

.file-button {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.file-button input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.file-button span {
    display: block;
    padding: 8px 10px;
    color: var(--blue);
    border: 1px dashed #b9cae7;
    border-radius: 8px;
    background: #f7faff;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
}

.file-button input:focus + span {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(46, 107, 230, 0.1);
}

.checklist-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.55fr);
    align-items: start;
    gap: 20px;
}

.import-choice-hero {
    margin-bottom: 19px;
    padding: 24px 27px;
    color: white;
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 88% -45%, rgba(95, 163, 255, 0.48), transparent 42%),
        linear-gradient(135deg, #163b58, #10283e);
    box-shadow: 0 15px 36px rgba(17, 40, 62, 0.16);
}

.import-choice-hero h2 {
    margin-bottom: 5px;
    font-size: 23px;
}

.import-choice-hero p:not(.eyebrow) {
    margin: 0;
    color: #adc2d4;
    font-size: 11px;
}

.freight-import-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 19px;
    margin-bottom: 19px;
}

.import-method-card {
    position: relative;
    padding: 25px;
}

.import-method-card h2 {
    margin-bottom: 7px;
    font-size: 20px;
}

.import-method-card > p:not(.eyebrow) {
    min-height: 34px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 11px;
}

.method-badge {
    position: absolute;
    top: 22px;
    right: 22px;
    display: grid;
    width: 46px;
    height: 32px;
    place-items: center;
    color: #b52e37;
    border-radius: 8px;
    background: var(--red-soft);
    font-size: 9px;
    font-weight: 900;
}

.method-badge.excel-badge {
    color: var(--green);
    background: var(--green-soft);
}

.freight-pdf-drop {
    min-height: 174px;
}

.excel-upload-form {
    margin-top: 14px;
    padding-top: 15px;
    border-top: 1px solid var(--line);
}

.import-help-panel {
    margin-top: 19px;
}

.import-help-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.import-help-grid > div {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 9px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fbfcfe;
}

.import-help-grid span {
    color: var(--blue);
    font-size: 9px;
    font-weight: 900;
}

.import-help-grid p {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
}

.import-help-grid strong {
    display: block;
    color: var(--ink);
}

.freight-review-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(270px, 0.55fr);
    align-items: start;
    gap: 20px;
}

.review-file-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #f9fbfd;
    font-size: 11px;
}

.review-file-row span {
    max-width: 70%;
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.metric-card strong {
    display: block;
    margin-bottom: 3px;
    font-size: 33px;
    line-height: 1.1;
    letter-spacing: -1px;
}

.metric-card small {
    color: var(--faint);
    font-size: 11px;
}

.content-grid {
    display: grid;
    gap: 20px;
}

.content-grid.two-thirds {
    grid-template-columns: minmax(0, 1.65fr) minmax(270px, 0.75fr);
}

.stack {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 20px;
}

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

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    padding: 11px 12px;
    color: #7b8796;
    border-bottom: 1px solid var(--line);
    background: #fafbfd;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

td {
    padding: 13px 12px;
    border-bottom: 1px solid #eef1f5;
    vertical-align: middle;
}

tbody tr:last-child td {
    border-bottom: 0;
}

tbody tr:hover {
    background: #fbfcfe;
}

.record-link {
    color: var(--ink);
    font-weight: 800;
}

.record-link:hover {
    color: var(--blue);
}

.cell-sub {
    display: block;
    margin-top: 3px;
    color: var(--faint);
    font-size: 11px;
    font-weight: 400;
}

.num {
    white-space: nowrap;
}

.muted {
    color: var(--muted);
}

.danger-text {
    color: var(--red) !important;
}

.tag,
.status-text {
    display: inline-flex;
    min-height: 23px;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
    white-space: nowrap;
}

.flow-status-grid {
    display: grid;
    min-width: 350px;
    grid-template-columns: repeat(3, minmax(105px, auto));
    gap: 5px;
}

.flow-chip {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 9px;
    font-style: normal;
    font-weight: 600;
    white-space: nowrap;
}

.flow-chip b {
    font-size: 9px;
    font-weight: 900;
}

.flow-chip b::after {
    margin-left: 3px;
    color: currentColor;
    content: "·";
    opacity: 0.45;
}

.flow-complete {
    color: #08705b;
    border-color: #c9eade;
    background: #effaf6;
}

.flow-pending {
    color: #97600e;
    border-color: #f0dcad;
    background: #fff8e9;
}

.flow-incomplete {
    color: #6e7c8d;
    border-color: #e2e8f0;
    background: #f5f7fa;
}

.flow-exception {
    color: #af3038;
    border-color: #f0c9cc;
    background: #fff1f2;
}

.flow-neutral {
    color: #5266a4;
    border-color: #dbe1f6;
    background: #eff2ff;
}

.hero-tags .flow-chip {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.1);
    color: #d8e8f5;
}

.hero-tags .flow-complete {
    color: #9be6d2;
    background: rgba(34, 185, 140, 0.18);
}

.hero-tags .flow-pending {
    color: #ffd996;
    background: rgba(226, 158, 37, 0.18);
}

.hero-tags .flow-exception {
    color: #ffb9be;
    background: rgba(225, 78, 88, 0.18);
}

.tag-draft,
.tag-closed {
    color: #677587;
    background: #edf1f5;
}

.tag-pending,
.status-unpaid,
.status-partial {
    color: var(--amber);
    background: var(--amber-soft);
}

.tag-shipped,
.status-paid {
    color: var(--green);
    background: var(--green-soft);
}

.status-overdue {
    color: var(--red);
    background: var(--red-soft);
}

.status-text {
    padding: 2px 0;
    font-size: 10px;
}

.tag-refund {
    color: #5266a4;
    background: #edf0ff;
}

.tag-invoice {
    color: #34718a;
    background: #ebf7fb;
}

.tag-danger {
    color: var(--red);
    background: var(--red-soft);
}

.pre-status-uploaded {
    color: var(--green);
    background: var(--green-soft);
}

.pre-status-pending {
    color: var(--amber);
    background: var(--amber-soft);
}

.pre-status-due_today {
    color: #4061b3;
    background: #edf1ff;
}

.pre-status-overdue {
    color: var(--red);
    background: var(--red-soft);
}

.tag-file {
    display: inline-flex;
    margin-bottom: 3px;
    color: #5d6c7d;
    background: #eff3f7;
    font-size: 9px;
}

.currency-list {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.currency-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--line);
}

.currency-list div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.currency-list span {
    color: var(--muted);
    font-weight: 700;
}

.currency-list strong {
    font-size: 16px;
}

.reminder-list {
    display: flex;
    flex-direction: column;
}

.reminder-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    color: var(--ink);
    border-bottom: 1px solid #eef1f5;
}

.reminder-list a:last-child {
    border-bottom: 0;
}

.reminder-list a:hover strong {
    color: var(--blue);
}

.reminder-list span {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.reminder-list strong {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reminder-list small {
    color: var(--faint);
    font-size: 10px;
}

.reminder-list b {
    color: var(--red);
    font-size: 11px;
    white-space: nowrap;
}

.empty-state {
    padding: 38px 16px;
    color: var(--muted);
    text-align: center;
}

.empty-state strong {
    display: block;
    margin-bottom: 4px;
    color: var(--ink);
}

.empty-state p {
    margin-bottom: 16px;
}

.filter-panel {
    margin-bottom: 18px;
    padding: 16px 18px;
}

.filter-form {
    display: grid;
    grid-template-columns: 1.4fr repeat(4, minmax(115px, 0.8fr)) auto;
    align-items: end;
    gap: 11px;
}

.pre-record-filter {
    grid-template-columns: minmax(220px, 1.5fr) minmax(150px, 0.8fr) minmax(140px, 0.7fr) auto;
}

.finance-filter {
    grid-template-columns: minmax(220px, 1.4fr) minmax(150px, 0.8fr) minmax(150px, 0.9fr) auto;
}

.filter-actions {
    display: flex;
    gap: 7px;
}

.field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 6px;
}

.field > span {
    color: #637183;
    font-size: 11px;
    font-weight: 700;
}

.field > span b {
    color: var(--red);
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    color: var(--ink);
    border: 1px solid #dbe2eb;
    outline: none;
    border-radius: 9px;
    background: white;
    transition: 150ms ease;
}

.field textarea {
    min-height: 94px;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: #8eaff3;
    box-shadow: 0 0 0 3px rgba(46, 107, 230, 0.1);
}

.field input:disabled,
.field select:disabled,
.field textarea:disabled {
    color: #7c8997;
    background: #f3f5f8;
}

.compact-field input,
.compact-field select {
    min-height: 38px;
}

.checkbox-field {
    flex-direction: row;
    align-items: center;
    align-self: end;
    min-height: 42px;
}

.checkbox-field input {
    width: 17px;
    min-height: 17px;
    accent-color: var(--blue);
}

.checkbox-field span {
    color: var(--ink);
}

.form-hint {
    margin: 0;
    color: var(--faint);
    font-size: 11px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 18px;
    color: var(--muted);
    font-size: 12px;
}

.pagination a {
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: white;
}

.row-action {
    color: var(--blue);
    font-size: 11px;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.flash-stack,
.public-flash {
    position: relative;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 17px;
}

.public-flash {
    position: fixed;
    top: 20px;
    left: 50%;
    width: min(520px, calc(100% - 40px));
    transform: translateX(-50%);
}

.flash {
    padding: 11px 14px;
    border: 1px solid #d8e1ed;
    border-radius: 9px;
    background: white;
    box-shadow: var(--shadow);
    font-size: 12px;
    transition: 300ms ease;
}

.flash-success {
    color: #08705b;
    border-color: #bde8dc;
    background: #effbf7;
}

.flash-error {
    color: #a72e37;
    border-color: #f1c7cb;
    background: #fff3f4;
}

.flash-warning {
    color: #92600f;
    border-color: #f0dcad;
    background: #fff8e9;
}

.flash-hide {
    opacity: 0;
    transform: translateY(-4px);
}

.form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    align-items: start;
    gap: 20px;
}

.form-main {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 18px;
}

.form-side {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.section-heading > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-heading p {
    max-width: 390px;
    margin: 0;
    color: var(--faint);
    font-size: 11px;
    text-align: right;
}

.step-no {
    color: var(--blue);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1px;
}

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

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

.sticky-card h2 {
    margin-bottom: 6px;
}

.sticky-card .btn {
    margin-top: 18px;
}

.excel-entry-card {
    position: relative;
    overflow: hidden;
    border-color: #d8e5fb;
    background:
        radial-gradient(circle at 100% 0, #e7f0ff, transparent 45%),
        #fff;
}

.excel-entry-card h2 {
    margin-bottom: 7px;
}

.excel-entry-card > p:not(.eyebrow) {
    margin-bottom: 15px;
    color: var(--muted);
    font-size: 11px;
}

.excel-entry-card .btn {
    margin-top: 8px;
}

.excel-entry-icon {
    display: grid;
    width: 42px;
    height: 42px;
    margin-bottom: 13px;
    place-items: center;
    color: var(--green);
    border: 1px solid #bfe6da;
    border-radius: 11px;
    background: var(--green-soft);
    font-size: 9px;
    font-weight: 900;
}

.excel-entry-note {
    display: block;
    margin-top: 11px;
    color: var(--faint);
    font-size: 9px;
}

.side-note {
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px solid var(--line);
}

.side-note strong {
    font-size: 11px;
}

.side-note p {
    margin: 3px 0 0;
    color: var(--faint);
    font-size: 10px;
}

.narrow-layout {
    max-width: 720px;
    margin: 20px auto;
}

.form-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
}

.record-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
    padding: 24px 27px;
    overflow: hidden;
    color: white;
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 88% -20%, rgba(102, 162, 255, 0.45), transparent 40%),
        linear-gradient(130deg, #163752, #10283e);
    box-shadow: 0 16px 38px rgba(17, 40, 62, 0.18);
}

.record-hero h2 {
    margin: 8px 0 3px;
    font-size: 24px;
}

.record-hero p {
    margin: 0;
    color: #a9c1d6;
    font-size: 12px;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.hero-tags .tag {
    border: 1px solid rgba(255, 255, 255, 0.13);
}

.hero-amount {
    flex: 0 0 auto;
    padding-left: 25px;
    border-left: 1px solid rgba(255, 255, 255, 0.16);
    text-align: right;
}

.hero-amount > span {
    display: block;
    color: #8facc3;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

.hero-amount strong {
    display: block;
    margin: 3px 0;
    font-size: 27px;
}

.hero-amount small {
    color: #a9c1d6;
    font-size: 12px;
    font-weight: 600;
}

.hero-amount em {
    display: block;
    color: #a9c1d6;
    font-size: 10px;
    font-style: normal;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.75fr);
    align-items: start;
    gap: 20px;
}

.detail-main,
.detail-side {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 20px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--line);
}

.info-grid > div {
    min-width: 0;
    padding: 12px 14px;
    background: white;
}

.info-grid dt,
.record-meta dt {
    margin-bottom: 3px;
    color: var(--faint);
    font-size: 10px;
}

.info-grid dd,
.record-meta dd {
    overflow-wrap: anywhere;
    margin: 0;
    font-size: 12px;
    font-weight: 700;
}

.note-box {
    margin-top: 16px;
    padding: 13px 15px;
    border-left: 3px solid #91b3f6;
    border-radius: 0 8px 8px 0;
    background: #f6f9ff;
}

.notice-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.notice-banner {
    padding: 10px 14px;
    color: #85580f;
    border: 1px solid #eed9a8;
    border-radius: 10px;
    background: #fff9ec;
    font-size: 11px;
}

.deadline-banner {
    position: relative;
    display: flex;
    min-height: 132px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
    padding: 24px 28px;
    overflow: hidden;
    color: white;
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 88% -45%, rgba(105, 166, 255, 0.55), transparent 42%),
        linear-gradient(130deg, #153b58, #10283e);
    box-shadow: 0 15px 36px rgba(17, 40, 62, 0.16);
}

.deadline-banner h2 {
    margin-bottom: 5px;
    font-size: 23px;
}

.deadline-banner p:not(.eyebrow) {
    margin: 0;
    color: #abc0d3;
    font-size: 11px;
}

.deadline-banner .eyebrow {
    color: #7fa4c2;
}

.deadline-icon {
    display: grid;
    width: 72px;
    height: 72px;
    flex: 0 0 auto;
    place-items: center;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 31px;
    font-weight: 900;
}

.file-inline-link {
    display: block;
    max-width: 220px;
    overflow: hidden;
    color: var(--ink);
    font-size: 11px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.action-link {
    font-size: 11px;
    font-weight: 700;
}

.pre-record-table td {
    vertical-align: top;
}

.notification-panel {
    margin-top: 18px;
}

.notification-panel summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    cursor: pointer;
    list-style: none;
}

.notification-panel summary::-webkit-details-marker {
    display: none;
}

.notification-panel summary > span:first-child {
    display: flex;
    flex-direction: column;
}

.notification-panel summary strong {
    font-size: 14px;
}

.notification-panel summary small {
    color: var(--faint);
    font-size: 10px;
}

.notification-panel .table-wrap {
    margin-top: 16px;
}

.pre-upload-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.65fr);
    align-items: start;
    gap: 20px;
}

.compact-hero {
    padding: 21px 24px;
}

.compact-hero .date-value {
    display: block;
    margin-top: 7px;
    font-size: 21px;
}

.current-document {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #f9fbfd;
}

.current-document-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.current-document-list .current-document {
    margin-bottom: 0;
}

.current-document > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.current-document span:first-child {
    color: var(--faint);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.current-document a {
    overflow: hidden;
    color: var(--ink);
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.current-document small {
    color: var(--faint);
    font-size: 9px;
}

.upload-record-form .upload-drop {
    min-height: 180px;
}

.rule-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.rule-list p {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 10px;
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

.rule-list b {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    color: var(--blue);
    border-radius: 7px;
    background: var(--blue-soft);
    font-size: 10px;
}

.mail-settings-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.6fr);
    align-items: start;
    gap: 20px;
}

.settings-side {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.test-mail-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.test-mail-panel h2 {
    margin-bottom: 5px;
}

.test-mail-panel p:not(.eyebrow) {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

.test-mail-form {
    display: flex;
    min-width: min(430px, 50%);
    align-items: center;
    gap: 9px;
}

.test-mail-form input {
    min-width: 0;
    flex: 1;
    min-height: 39px;
    padding: 8px 11px;
    border: 1px solid #dbe2eb;
    border-radius: 9px;
    outline: none;
}

.test-mail-form input:focus {
    border-color: #8eaff3;
    box-shadow: 0 0 0 3px rgba(46, 107, 230, 0.1);
}

.settings-submit {
    display: flex;
    justify-content: flex-end;
}

.settings-submit .btn {
    min-width: 170px;
}

.config-status {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    padding: 12px;
    border-radius: 10px;
}

.config-status > span {
    display: grid;
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 900;
}

.config-status p {
    margin: 2px 0 0;
    font-size: 11px;
}

.config-status-ok {
    color: #08705b;
    background: var(--green-soft);
}

.config-status-ok > span {
    background: #c8eee3;
}

.config-status-warning {
    color: #8a5c12;
    background: var(--amber-soft);
}

.config-status-warning > span {
    background: #f7e2b3;
}

.provider-list {
    margin: 14px 0 0;
}

.provider-list div {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    padding: 9px 0;
    border-bottom: 1px solid #edf1f5;
    font-size: 10px;
}

.provider-list div:last-child {
    border-bottom: 0;
}

.provider-list dt {
    color: var(--muted);
}

.provider-list dd {
    margin: 0;
    font-weight: 700;
    text-align: right;
}

.topbar-actions form {
    margin: 0;
}

.backup-hero {
    display: flex;
    min-height: 140px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
    padding: 25px 29px;
    overflow: hidden;
    color: white;
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 88% -40%, rgba(92, 171, 255, 0.5), transparent 40%),
        linear-gradient(135deg, #163d59, #0f263b);
    box-shadow: 0 16px 40px rgba(17, 40, 62, 0.16);
}

.backup-hero h2 {
    margin-bottom: 6px;
    font-size: 23px;
}

.backup-hero p:not(.eyebrow) {
    max-width: 690px;
    margin: 0;
    color: #acc2d4;
    font-size: 11px;
}

.backup-hero .eyebrow {
    color: #81a9c8;
}

.backup-shield {
    display: grid;
    width: 71px;
    height: 71px;
    flex: 0 0 auto;
    place-items: center;
    color: #d8f3eb;
    border: 1px solid rgba(154, 235, 212, 0.28);
    border-radius: 19px;
    background: rgba(47, 191, 149, 0.16);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1px;
}

.backup-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(270px, 0.58fr);
    align-items: start;
    gap: 20px;
}

.backup-upload-form {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.backup-upload-form .upload-drop {
    min-height: 165px;
}

.manual-hero {
    display: flex;
    min-height: 132px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
    padding: 24px 28px;
    overflow: hidden;
    color: white;
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 88% -42%, rgba(103, 169, 255, 0.48), transparent 40%),
        linear-gradient(135deg, #183d5b, #10263b);
    box-shadow: 0 15px 36px rgba(17, 40, 62, 0.16);
}

.manual-hero h2 {
    margin-bottom: 5px;
    font-size: 23px;
}

.manual-hero p:not(.eyebrow) {
    max-width: 760px;
    margin: 0;
    color: #afc3d5;
    font-size: 11px;
}

.manual-hero-mark {
    display: grid;
    width: 66px;
    height: 66px;
    flex: 0 0 auto;
    place-items: center;
    color: #d9eaff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    background: rgba(46, 107, 230, 0.2);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1px;
}

.manual-category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 19px;
    margin-bottom: 19px;
}

.manual-category-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 13px;
}

.manual-document-list {
    display: flex;
    flex-direction: column;
}

.manual-document-item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 11px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

.manual-document-item:last-child {
    border-bottom: 0;
}

.manual-file-type {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #536b82;
    border-radius: 9px;
    background: #edf2f7;
    font-size: 8px;
    font-weight: 900;
}

.manual-document-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.manual-document-copy strong {
    font-size: 12px;
}

.manual-document-copy p {
    margin: 3px 0;
    color: var(--muted);
    font-size: 10px;
}

.manual-document-copy small {
    color: var(--faint);
    font-size: 9px;
}

.manual-document-actions {
    display: flex;
    grid-column: 2;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 3px;
}

.manual-reading-guide {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 19px;
}

.manual-reading-guide > div {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: white;
}

.manual-reading-guide span {
    color: var(--blue);
    font-size: 9px;
    font-weight: 900;
}

.manual-reading-guide p {
    margin: 0;
    color: var(--muted);
    font-size: 9px;
}

.manual-reading-guide strong {
    display: block;
    color: var(--ink);
    font-size: 10px;
}

.manual-admin-panel {
    margin-top: 19px;
}

.manual-admin-panel summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    list-style: none;
}

.manual-admin-panel summary::-webkit-details-marker {
    display: none;
}

.manual-admin-panel summary > span:first-child {
    display: flex;
    flex-direction: column;
}

.manual-admin-panel summary strong {
    font-size: 13px;
}

.manual-admin-panel summary small {
    color: var(--faint);
    font-size: 9px;
}

.manual-upload-form {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.restore-progress-page {
    display: grid;
    min-height: 100vh;
    padding: 24px;
    place-items: center;
    background:
        radial-gradient(circle at 20% 15%, #e9f2ff, transparent 28%),
        var(--canvas);
}

.restore-progress-card {
    width: min(560px, 100%);
    padding: 48px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: white;
    box-shadow: var(--shadow);
    text-align: center;
}

.restore-progress-card h1 {
    margin: 3px 0 9px;
    font-size: 28px;
}

.restore-progress-card p {
    color: var(--muted);
    font-size: 11px;
}

.restore-loader {
    display: grid;
    width: 58px;
    height: 58px;
    margin: 0 auto 18px;
    place-items: center;
    color: var(--blue);
    border-radius: 17px;
    background: var(--blue-soft);
    font-size: 28px;
}

.restore-progress-track {
    height: 5px;
    margin: 21px 0 15px;
    overflow: hidden;
    border-radius: 999px;
    background: #e9eef6;
}

.restore-progress-track span {
    display: block;
    width: 45%;
    height: 100%;
    border-radius: inherit;
    background: var(--blue);
}

.note-box strong {
    font-size: 11px;
}

.note-box p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 12px;
    white-space: pre-wrap;
}

.panel-amount {
    color: var(--green);
    font-size: 16px;
}

.panel-amount small {
    color: var(--faint);
    font-size: 10px;
}

.inline-form {
    margin-top: 16px;
    padding-top: 13px;
    border-top: 1px solid var(--line);
}

.inline-form > summary {
    color: var(--blue);
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
}

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

.attachment-list {
    display: flex;
    flex-direction: column;
}

.required-docs-head,
.other-attachments-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.required-docs-head strong,
.other-attachments-head strong {
    font-size: 11px;
}

.other-attachments-head {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.other-attachments-head span {
    display: grid;
    min-width: 21px;
    height: 21px;
    place-items: center;
    color: var(--blue);
    border-radius: 999px;
    background: var(--blue-soft);
    font-size: 9px;
    font-weight: 800;
}

.required-doc-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    margin-top: 11px;
}

.required-doc-item {
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 47px;
    padding: 8px 9px;
    border: 1px solid var(--line);
    border-radius: 9px;
}

.required-doc-uploaded {
    border-color: #c9eade;
    background: #f4fbf8;
}

.required-doc-pending {
    border-color: #efdcb4;
    background: #fffaf0;
}

.required-doc-state {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 900;
}

.required-doc-uploaded .required-doc-state {
    color: #08705b;
    background: #d9f3ea;
}

.required-doc-pending .required-doc-state {
    color: #a46a12;
    background: #f8e8c6;
}

.required-doc-item > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.required-doc-item strong {
    font-size: 10px;
}

.required-doc-item a,
.required-doc-item > div > span:not(.pending-label) {
    overflow: hidden;
    color: var(--ink);
    font-size: 9px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.required-doc-item small {
    color: var(--faint);
    font-size: 8px;
}

.pending-label {
    color: #a46a12;
    font-size: 9px;
    font-weight: 800;
}

.document-panel-note {
    margin: 16px 0 0;
    padding-top: 12px;
    color: var(--faint);
    border-top: 1px solid var(--line);
    font-size: 9px;
    line-height: 1.55;
}

.attachment-item {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #edf1f5;
}

.attachment-item:last-child {
    border-bottom: 0;
}

.file-icon {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 9px;
    color: #64778a;
    background: #edf2f7;
    font-size: 8px;
    font-weight: 900;
}

.attachment-item > div:last-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.attachment-item a {
    overflow: hidden;
    color: var(--ink);
    font-size: 11px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-item small {
    margin-top: 2px;
    color: var(--faint);
    font-size: 9px;
}

.count-badge {
    display: inline-grid;
    min-width: 25px;
    height: 25px;
    place-items: center;
    border-radius: 999px;
    color: var(--blue);
    background: var(--blue-soft);
    font-size: 10px;
    font-weight: 800;
}

.upload-box form {
    margin-top: 13px;
}

.record-meta dl {
    margin: 0;
}

.record-meta dl div {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 8px 0;
    border-bottom: 1px solid #edf1f5;
}

.record-meta dl div:last-child {
    border-bottom: 0;
}

.record-meta dt {
    margin: 0;
}

.record-meta dd {
    text-align: right;
}

.import-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.65fr);
    align-items: start;
    gap: 20px;
}

.import-side {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 14px;
}

.template-card {
    position: relative;
    padding-left: 67px;
}

.template-card h2 {
    margin-bottom: 7px;
}

.template-card p:not(.eyebrow) {
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 12px;
}

.template-badge {
    position: absolute;
    top: 22px;
    left: 20px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: var(--blue);
    border-radius: 10px;
    background: var(--blue-soft);
    font-size: 12px;
    font-weight: 900;
}

.import-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.owner-card {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 14px;
    border: 1px solid #dce6f9;
    border-radius: 11px;
    background: #f4f8ff;
}

.owner-card div:last-child {
    display: flex;
    flex-direction: column;
}

.owner-card span {
    color: var(--faint);
    font-size: 10px;
}

.owner-card strong {
    font-size: 12px;
}

.salesperson-option-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 11px;
}

.upload-drop {
    display: flex;
    min-height: 200px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 7px;
    padding: 28px;
    color: var(--muted);
    border: 1.5px dashed #b8c7df;
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(234, 241, 255, 0.5), rgba(250, 252, 255, 0.6));
    cursor: pointer;
    text-align: center;
    transition: 160ms ease;
}

.upload-drop:hover,
.upload-drop:focus-within {
    border-color: var(--blue);
    background: var(--blue-soft);
}

.upload-drop input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.upload-drop strong {
    color: var(--ink);
    font-size: 14px;
}

.upload-drop small {
    max-width: 430px;
    color: var(--faint);
    font-size: 10px;
}

.upload-symbol {
    display: grid;
    width: 52px;
    height: 52px;
    margin-bottom: 5px;
    place-items: center;
    color: var(--green);
    border: 1px solid #bfe6da;
    border-radius: 13px;
    background: var(--green-soft);
    font-size: 10px;
    font-weight: 900;
}

.check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fbfcfe;
    cursor: pointer;
}

.check-row input {
    width: 17px;
    height: 17px;
    margin-top: 2px;
    accent-color: var(--blue);
}

.check-row span {
    display: flex;
    flex-direction: column;
}

.check-row strong {
    font-size: 11px;
}

.check-row small {
    color: var(--faint);
    font-size: 10px;
}

.import-errors {
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid #f0c9cd;
    border-radius: 12px;
    background: #fff8f8;
}

.import-result-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.import-result-head h3 {
    margin: 0;
    color: #9d3038;
    font-size: 14px;
}

.error-table-wrap {
    margin-top: 12px;
    border: 1px solid #f2dfdf;
    border-radius: 9px;
    background: white;
}

.error-list {
    margin: 0;
    padding-left: 17px;
    color: #9d3038;
    font-size: 11px;
}

.import-warnings {
    margin-bottom: 15px;
    padding: 10px 13px;
    color: #8a5c12;
    border: 1px solid #eedbac;
    border-radius: 9px;
    background: #fff9ec;
    font-size: 11px;
}

.import-warnings p {
    margin: 0;
}

.import-note {
    margin-top: 0;
}

.inline-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    white-space: nowrap;
}

.inline-actions form {
    margin: 0;
}

.link-button {
    padding: 0;
    color: var(--blue);
    border: 0;
    background: transparent;
    font-weight: 700;
}

.auth-page {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(360px, 1.1fr) minmax(420px, 0.9fr);
    background: white;
}

.auth-intro {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    justify-content: space-between;
    padding: 44px clamp(40px, 7vw, 100px);
    color: white;
    background:
        radial-gradient(circle at 82% 18%, rgba(70, 136, 224, 0.38), transparent 32%),
        linear-gradient(145deg, #163b59 0%, #10283e 52%, #091c2d 100%);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.auth-brand > span:last-child {
    display: flex;
    flex-direction: column;
}

.auth-brand strong {
    font-size: 18px;
    letter-spacing: 1px;
}

.auth-brand small {
    color: #8daac2;
    font-size: 9px;
    letter-spacing: 1.7px;
}

.auth-intro h1 {
    max-width: 560px;
    margin: 13px 0 22px;
    font-size: clamp(36px, 4.5vw, 64px);
    line-height: 1.12;
    letter-spacing: -2px;
}

.auth-intro p:not(.eyebrow) {
    max-width: 500px;
    color: #aac1d4;
    font-size: 14px;
}

.auth-feature-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.auth-feature-row span {
    padding: 6px 11px;
    color: #b9cde0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    font-size: 10px;
}

.auth-card-wrap {
    display: grid;
    place-items: center;
    padding: 45px;
    background:
        radial-gradient(circle at 85% 12%, #eaf2ff, transparent 24%),
        #fff;
}

.auth-card {
    display: flex;
    width: min(430px, 100%);
    flex-direction: column;
    gap: 17px;
}

.auth-card-head {
    margin-bottom: 8px;
}

.auth-card-head h2 {
    margin-bottom: 6px;
    font-size: 28px;
}

.auth-card-head p:last-child {
    margin-bottom: 0;
    color: var(--muted);
}

.auth-card .btn {
    min-height: 45px;
    margin-top: 4px;
}

.public-error {
    display: grid;
    min-height: 100vh;
    padding: 30px;
    place-items: center;
    background: var(--canvas);
}

.error-card {
    max-width: 500px;
    margin: 60px auto;
    padding: 40px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: white;
    box-shadow: var(--shadow);
    text-align: center;
}

.error-code {
    color: #d8e5fa;
    font-size: 86px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -4px;
}

.error-card h2 {
    margin: 10px 0 8px;
}

.error-card p {
    color: var(--muted);
}

@media (max-width: 1180px) {
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .filter-actions {
        align-self: end;
    }

    .detail-layout {
        grid-template-columns: minmax(0, 1fr);
    }

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

    .import-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .import-side {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pre-upload-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .mail-settings-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .settings-side {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .backup-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .manual-category-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .manual-reading-guide {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .checklist-bottom {
        grid-template-columns: minmax(0, 1fr);
    }

    .freight-review-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 900px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        width: 260px;
        transform: translateX(-105%);
        transition: transform 180ms ease;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 20;
        display: block;
        visibility: hidden;
        background: rgba(8, 24, 39, 0.4);
        opacity: 0;
        transition: 180ms ease;
    }

    body.sidebar-open .sidebar-backdrop {
        visibility: visible;
        opacity: 1;
    }

    .page-shell {
        min-height: 100vh;
    }

    .mobile-nav-toggle {
        display: block;
    }

    .topbar {
        padding: 18px 22px;
    }

    .content {
        padding: 22px;
    }

    .content-grid.two-thirds {
        grid-template-columns: minmax(0, 1fr);
    }

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

    .form-side {
        position: static;
    }
}

@media (max-width: 720px) {
    .topbar {
        flex-wrap: wrap;
        gap: 12px;
    }

    .topbar-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .metric-grid,
    .field-grid,
    .form-grid,
    .filter-form,
    .info-grid,
    .detail-side {
        grid-template-columns: minmax(0, 1fr);
    }

    .import-side {
        display: flex;
    }

    .deadline-banner {
        align-items: flex-start;
    }

    .deadline-icon {
        width: 58px;
        height: 58px;
        font-size: 25px;
    }

    .test-mail-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .test-mail-form {
        width: 100%;
        min-width: 0;
        align-items: stretch;
        flex-direction: column;
    }

    .settings-side {
        display: flex;
    }

    .backup-hero {
        align-items: flex-start;
    }

    .backup-shield {
        width: 56px;
        height: 56px;
    }

    .manual-hero {
        align-items: flex-start;
    }

    .manual-reading-guide {
        grid-template-columns: minmax(0, 1fr);
    }

    .tax-checklist-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .package-ready-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .package-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .checklist-progress {
        align-items: flex-start;
    }

    .tax-document-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .freight-import-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .import-help-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .pre-record-filter {
        grid-template-columns: minmax(0, 1fr);
    }

    .finance-filter {
        grid-template-columns: minmax(0, 1fr);
    }

    .filter-actions {
        flex-wrap: wrap;
    }

    .record-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero-amount {
        width: 100%;
        padding: 15px 0 0;
        border-top: 1px solid rgba(255, 255, 255, 0.16);
        border-left: 0;
        text-align: left;
    }

    .auth-page {
        display: block;
    }

    .auth-intro {
        min-height: auto;
        gap: 60px;
        padding: 28px 24px 38px;
    }

    .auth-intro h1 {
        margin-top: 50px;
        font-size: 36px;
    }

    .auth-card-wrap {
        min-height: 55vh;
        padding: 45px 24px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .section-heading p {
        text-align: left;
    }
}
