/* Athtech DVC — layout and small components. Loaded after Radzen's material-base.css and theme.css (every colour comes from the --rz-* / --dvc-nav-* variables there). */

html, body { height: 100%; }
body {
    margin: 0; background: var(--rz-body-background-color); color: var(--rz-text-color);
    font-family: var(--rz-text-font-family); font-size: var(--rz-body-font-size); line-height: var(--rz-body-line-height);
}
a { color: var(--rz-primary); }
h1, h2, h3 { color: var(--rz-text-title-color); }
h1:focus, h1:focus-visible { outline: none; }

/* ── brand ── */
.dvc-logo { display: block; width: 2.5rem; height: 2.5rem; flex: none; }
.dvc-brand { display: flex; align-items: center; gap: .7rem; color: #fff; text-decoration: none; }
.dvc-brand__text { display: grid; line-height: 1.15; min-width: 0; }
.dvc-brand__text b { font-size: 1.5rem; font-weight: 800; letter-spacing: .03em; }
.dvc-brand__text small { font-size: .625rem; letter-spacing: .1em; color: var(--dvc-nav-muted); }

/* ── shell: navy sidebar left, top bar + content right ── */
.dvc-shell { display: grid; grid-template-columns: var(--dvc-nav-width) minmax(0, 1fr); min-height: 100vh; }
.dvc-shell--hidden { grid-template-columns: 0 minmax(0, 1fr); }
.dvc-shell--hidden .dvc-side { transform: translateX(-100%); visibility: hidden; }
.dvc-side {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 1150; width: var(--dvc-nav-width); display: flex; flex-direction: column;
    background: linear-gradient(180deg, var(--dvc-nav-bg-top), var(--dvc-nav-bg-bottom)); color: var(--dvc-nav-text);
    transition: transform .22s ease, visibility .22s;
}
.dvc-side .dvc-brand { padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--dvc-nav-line); }
.dvc-side__foot {
    display: flex; align-items: center; gap: .6rem; padding: .9rem 1.25rem; border-top: 1px solid var(--dvc-nav-line);
    color: var(--dvc-nav-muted); font-weight: 700; font-size: .8125rem; letter-spacing: .04em;
}
.dvc-side__foot .dvc-logo { width: 1.75rem; height: 1.75rem; }

.dvc-nav { flex: 1 1 auto; overflow-y: auto; padding: .75rem .75rem 1rem; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent; }
.dvc-nav .rzi { font-size: 1.35rem; flex: none; }
.dvc-nav__top, .dvc-nav__head, .dvc-nav__item {
    display: flex; align-items: center; gap: .75rem; width: 100%; box-sizing: border-box; border: 0; border-radius: 8px; cursor: pointer;
    background: transparent; color: var(--dvc-nav-text); text-decoration: none; font: inherit; text-align: left;
}
.dvc-nav__top { padding: .7rem .85rem; font-weight: 600; font-size: .9375rem; margin-bottom: .35rem; }
.dvc-nav__head { padding: .7rem .85rem; margin-top: .35rem; font-weight: 700; font-size: .9375rem; color: var(--dvc-nav-text-strong); }
.dvc-nav__head > span { flex: 1 1 auto; }
.dvc-nav__chev { transition: transform .18s ease; opacity: .7; }
.dvc-nav__chev.is-open { transform: rotate(180deg); }
.dvc-nav__items { margin: .15rem 0 .35rem 1.5rem; padding-left: .5rem; border-left: 1px solid var(--dvc-nav-line); display: grid; gap: .1rem; }
.dvc-nav__item { padding: .5rem .75rem; font-size: .875rem; font-weight: 500; }
.dvc-nav__item .rzi { font-size: 1.15rem; opacity: .85; }
.dvc-nav__top:hover, .dvc-nav__head:hover, .dvc-nav__item:hover { background: var(--dvc-nav-hover); color: var(--dvc-nav-text-strong); }
.dvc-nav__top.active, .dvc-nav__item.active { background: var(--dvc-nav-active); color: #fff; box-shadow: 0 4px 12px -4px rgba(27, 108, 242, .6); }
.dvc-nav__item.active .rzi { opacity: 1; }
.dvc-nav :focus-visible { outline: 2px solid #8bb8ff; outline-offset: 1px; }

.dvc-scrim { display: none; }
.dvc-main { grid-column: 2; min-width: 0; display: flex; flex-direction: column; }

.dvc-top {
    position: sticky; top: 0; z-index: 1000; height: var(--dvc-topbar-height); display: flex; align-items: center; gap: .85rem;
    padding: 0 1.5rem; background: #fff; border-bottom: 1px solid var(--rz-base-200);
}
.dvc-burger {
    display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; border: 0; border-radius: 8px; background: transparent;
    color: var(--rz-base-700); cursor: pointer; flex: none;
}
.dvc-burger:hover { background: var(--rz-base-100); }
.dvc-burger--phone { display: none; }
.dvc-top__title { flex: 1 1 auto; min-width: 0; line-height: 1.25; }
.dvc-top__app { font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; color: var(--dvc-nav-bg-top); }
.dvc-top__tag { font-size: .8125rem; color: var(--rz-text-tertiary-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dvc-top__note { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .7rem; border-radius: 999px; background: var(--rz-primary-lighter); color: var(--rz-primary-dark); font-size: .8125rem; font-weight: 600; white-space: nowrap; }
.dvc-top__note .rzi { font-size: 1.1rem; }
.dvc-user { display: inline-flex; align-items: center; gap: .65rem; text-align: left; }
.dvc-avatar {
    display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; flex: none;
    background: linear-gradient(135deg, #4da3ff, #1b6cf2); color: #fff; font-weight: 700;
}
.dvc-user__meta { display: grid; line-height: 1.25; min-width: 0; }
.dvc-user__meta b { font-size: .875rem; color: var(--rz-base-900); max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dvc-user__meta small { font-size: .75rem; color: var(--rz-text-tertiary-color); }
.dvc-logout { margin: 0; }
.dvc-logout .dvc-link { color: var(--rz-base-700); padding: .4rem .6rem; border-radius: 8px; }
.dvc-logout .dvc-link:hover { background: var(--rz-base-100); text-decoration: none; }

.dvc-content { flex: 1 0 auto; padding: 1.5rem 1.5rem 3rem; max-width: 1500px; width: 100%; box-sizing: border-box; margin: 0 auto; }

.dvc-footer {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem 2rem;
    padding: 1rem 1.5rem; background: #fff; border-top: 1px solid var(--rz-base-200); font-size: .8125rem; color: var(--rz-text-secondary-color);
}
.dvc-footer__brand { display: flex; align-items: center; gap: .6rem; }
.dvc-footer__brand .dvc-logo { width: 2rem; height: 2rem; }
.dvc-footer__brand b { color: var(--dvc-nav-bg-top); letter-spacing: .02em; }
.dvc-footer a { text-decoration: none; }
.dvc-footer a:hover { text-decoration: underline; }

/* ── content ── */
.dvc-h1 { margin: 0 0 1rem; font-size: 1.375rem; font-weight: 700; letter-spacing: -.015em; }
.dvc-h2 { margin: 1.5rem 0 .6rem; font-size: 1.0625rem; font-weight: 700; letter-spacing: -.01em; color: var(--dvc-nav-bg-top); }
.dvc-muted { color: var(--rz-text-tertiary-color); }
.dvc-panel { background: #fff; border: 1px solid var(--rz-base-200); border-radius: 12px; padding: 1.1rem 1.25rem; box-shadow: var(--rz-shadow-1); min-width: 0; }
.dvc-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; }
.dvc-field { display: flex; flex-direction: column; gap: .25rem; min-width: 190px; }
.dvc-field > label { font-size: .8rem; color: var(--rz-text-tertiary-color); }
.dvc-empty, .dvc-boot { display: grid; place-items: center; gap: .6rem; padding: 3rem 1rem; text-align: center; color: var(--rz-text-tertiary-color); }
.dvc-warn { color: var(--rz-warning-dark); }
.dvc-danger { color: var(--rz-danger); }
.dvc-link { background: none; border: 0; color: var(--rz-primary); cursor: pointer; font: inherit; display: inline-flex; align-items: center; gap: .25rem; padding: .25rem; text-decoration: none; }
.dvc-link:hover { text-decoration: underline; }
.dvc-pre { background: #0f172a; color: #e2e8f0; padding: .8rem 1rem; border-radius: 10px; max-height: 55vh; overflow: auto; white-space: pre-wrap; font: .82rem/1.45 Consolas, monospace; }
.dvc-progress { color: var(--rz-text-tertiary-color); font-size: .82rem; max-width: 420px; }
.dvc-err { color: var(--rz-danger); font-size: .82rem; max-width: 420px; }
.dvc-actions { display: flex; flex-wrap: wrap; gap: .25rem; align-items: center; }
.dvc-checklist { display: flex; flex-direction: column; gap: .15rem; max-height: 260px; overflow-y: auto; padding: .35rem .5rem; border: 1px solid var(--rz-base-300); border-radius: 10px; }
.dvc-check { display: flex; align-items: center; gap: .5rem; padding: .2rem 0; cursor: pointer; }
.dvc-check--off { color: var(--rz-text-tertiary-color); cursor: not-allowed; }
.dvc-tablewrap { overflow-x: auto; background: #fff; border: 1px solid var(--rz-base-200); border-radius: 12px; box-shadow: var(--rz-shadow-1); }
.dvc-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.dvc-table th { text-align: left; font-weight: 600; font-size: .8rem; background: #fbfcfd; color: var(--rz-base-600); padding: .65rem .8rem; border-bottom: 1px solid var(--rz-base-200); white-space: nowrap; }
.dvc-table td { padding: .6rem .8rem; border-bottom: 1px solid var(--rz-base-100); vertical-align: top; }
.dvc-table tr:last-child td { border-bottom: 0; }
.dvc-table--nowrap td { white-space: nowrap; }
.dvc-table tr.dvc-row--lech td { background: #fff1f1; }
.dvc-table tr.dvc-row--total td { background: #e2e3e5; font-weight: 700; }
.rz-data-grid { border-radius: 12px; }

/* ── KPI cards (home) ── */
.dvc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.dvc-card {
    display: flex; gap: .9rem; align-items: center; background: #fff; border: 1px solid var(--rz-base-200); border-radius: 12px;
    padding: 1.1rem 1.15rem; box-shadow: var(--rz-shadow-1); min-width: 0; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s;
}
a.dvc-card:hover { border-color: var(--rz-primary-light); box-shadow: var(--rz-shadow-3); }
.dvc-card__icon { display: grid; place-items: center; width: 3.1rem; height: 3.1rem; border-radius: 12px; color: #fff; flex: none; }
.dvc-card__icon .rzi { font-size: 1.7rem; }
.dvc-card__icon--blue { background: linear-gradient(135deg, #4d9bff, #1b6cf2); }
.dvc-card__icon--green { background: linear-gradient(135deg, #4cc36b, #1f9d47); }
.dvc-card__icon--orange { background: linear-gradient(135deg, #ffb340, #f08a00); }
.dvc-card__icon--purple { background: linear-gradient(135deg, #9a7bff, #6a42f0); }
.dvc-card__body { display: grid; gap: .1rem; min-width: 0; }
.dvc-card__l { font-size: .8125rem; color: var(--rz-text-secondary-color); }
.dvc-card__v { font-size: 1.65rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; color: var(--rz-base-900); font-variant-numeric: tabular-nums; }

/* ── hero (home) ── */
.dvc-hero {
    position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem;
    padding: 1.75rem 2rem; border-radius: 14px; color: #fff;
    background: radial-gradient(60rem 20rem at 85% -20%, rgba(120, 190, 255, .55), transparent 60%), linear-gradient(105deg, #123fb8, #1b6cf2 60%, #2f86ff);
    box-shadow: 0 10px 28px -12px rgba(27, 108, 242, .55);
}
.dvc-hero h1 { margin: 0 0 .35rem; color: #fff; font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; }
.dvc-hero p { margin: 0; font-size: 1.0625rem; font-weight: 500; opacity: .95; }
.dvc-hero__tag { font-style: italic; font-size: .9rem; opacity: .85; text-align: right; }
.dvc-hero__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem; }
.dvc-hero__btn { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1rem; border-radius: 8px; font-weight: 600; font-size: .875rem; text-decoration: none; background: #fff; color: var(--rz-primary-dark); }
.dvc-hero__btn--ghost { background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .35); }
.dvc-hero__btn--ghost:hover { background: rgba(255, 255, 255, .26); }

/* ── plain controls (static login page) ── */
.dvc-input { width: 100%; box-sizing: border-box; padding: .6rem .75rem; border: 1px solid var(--rz-base-300); border-radius: 8px; font: inherit; background: #fff; }
.dvc-input:focus { outline: none; border-color: var(--rz-primary); box-shadow: 0 0 0 3px var(--rz-primary-lighter); }
.dvc-btn { padding: .65rem 1rem; border-radius: 8px; border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.dvc-btn--primary { background: var(--rz-primary); color: #fff; }
.dvc-btn--primary:hover { background: var(--rz-primary-dark); }
.dvc-form { display: flex; flex-direction: column; gap: .5rem; }
.dvc-form label { font-size: .85rem; color: var(--rz-text-tertiary-color); }
.dvc-field-error { color: var(--rz-danger); font-size: .82rem; }
.dvc-alert { padding: .65rem .85rem; border-radius: 10px; margin: .6rem 0; font-size: .9rem; }
.dvc-alert--error { background: var(--rz-danger-lighter); color: var(--rz-on-danger-lighter); }
.dvc-alert--warn { background: var(--rz-warning-lighter); color: var(--rz-on-warning-lighter); }
.dvc-google { display: flex; justify-content: center; min-height: 44px; }

/* ── login: navy brand panel + form ── */
.dvc-auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.dvc-auth__brand {
    display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; padding: 2.5rem; color: #d6e2fb;
    background: radial-gradient(40rem 24rem at 100% 100%, rgba(80, 150, 255, .35), transparent 65%), linear-gradient(170deg, var(--dvc-nav-bg-top), var(--dvc-nav-bg-bottom));
}
.dvc-auth__pitch h2 { color: #fff; font-size: 1.75rem; line-height: 1.25; margin: 0 0 1rem; letter-spacing: -.02em; }
.dvc-auth__pitch ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .6rem; line-height: 1.5; }
.dvc-auth__foot { font-size: .8125rem; opacity: .7; }
.dvc-auth__form-wrap { display: grid; place-items: center; padding: 2rem 1.25rem; }
.dvc-auth__card { width: min(26rem, 100%); display: grid; gap: .5rem; }
.dvc-auth__title { margin: 0 0 .5rem; font-size: 1.625rem; letter-spacing: -.02em; }

/* ── Blazor housekeeping ── */
#blazor-error-ui {
    display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 3000; padding: .75rem 1.25rem; box-sizing: border-box;
    background: var(--rz-danger-lighter); color: var(--rz-on-danger-lighter); border-top: 1px solid var(--rz-danger);
}
#blazor-error-ui .reload { margin-left: .75rem; font-weight: 600; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .9rem; top: .55rem; }
.blazor-error-boundary { background: #b32121; padding: 1rem; color: #fff; }

/* dialogs sit above the sidebar (z-index 1150); Radzen reads these two variables */
:root { --rz-dialog-mask-zindex: 2100; --rz-dialog-zindex: 2101; }
/* ...and a dropdown or date picker opened inside a dialog must sit above it (Radzen's own popups are 2000, which put the list behind the dialog) */
.rz-popup, .rz-dropdown-panel { z-index: 2200 !important; }

@media (max-width: 1100px) {
    .dvc-hero__tag { display: none; }
}

/* ── phones: the menu slides over the content ── */
@media (max-width: 900px) {
    .dvc-auth { grid-template-columns: 1fr; }
    .dvc-auth__brand { padding: 1.25rem 1.5rem; gap: .75rem; }
    .dvc-auth__pitch, .dvc-auth__foot { display: none; }
    .dvc-shell, .dvc-shell--hidden { grid-template-columns: minmax(0, 1fr); }
    .dvc-main { grid-column: 1; }
    .dvc-side, .dvc-shell--hidden .dvc-side { transform: translateX(-100%); visibility: hidden; width: min(18rem, 86vw); }
    .dvc-shell--open .dvc-side { transform: none; visibility: visible; box-shadow: var(--rz-shadow-8); }
    .dvc-shell--open .dvc-scrim { display: block; position: fixed; inset: 0; z-index: 1100; background: rgba(8, 24, 63, .5); }
    .dvc-burger--desktop { display: none; }
    .dvc-burger--phone { display: inline-grid; }
    .dvc-content { padding: 1rem .85rem 3rem; }
    .dvc-top { padding: 0 .75rem; }
    .dvc-top__app { font-size: 1.05rem; }
    .dvc-top__tag, .dvc-top__note, .dvc-user__meta { display: none; }
    .dvc-hero { padding: 1.25rem 1.1rem; }
    .dvc-hero h1 { font-size: 1.35rem; }
    .dvc-footer { padding: 1rem .85rem; }
}

/* ── tax return detail, laid out like the GDT's iTaxViewer: a paper page per form/phụ lục, a tab for each; "In / lưu PDF" prints all pages ── */
.dvc-detail__file { color: var(--rz-text-secondary-color); font-size: .78rem; margin: 0 0 .5rem; overflow-wrap: anywhere; }
.dvc-tabs { display: flex; flex-wrap: wrap; gap: .2rem; margin: 0 0 .9rem; border-bottom: 1px solid var(--rz-base-300); }
.dvc-tabs button { font: inherit; font-size: .85rem; padding: .45rem .9rem; cursor: pointer; background: none; border: 1px solid transparent; border-bottom: 0; border-radius: .4rem .4rem 0 0; color: var(--rz-text-secondary-color); }
.dvc-tabs button:hover { color: var(--rz-primary); }
.dvc-tabs button.is-on { background: #fff; border-color: var(--rz-base-300); color: var(--rz-primary); font-weight: 600; margin-bottom: -1px; }
.dvc-page--off { display: none; }
.dvc-form { font-family: "Times New Roman", Times, serif; font-size: .98rem; line-height: 1.35; color: #111; }
.dvc-form__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.dvc-form__nation { flex: 1; text-align: center; }
.dvc-form__mau { white-space: nowrap; text-align: right; }
.dvc-form__title { margin: .9rem 0 .15rem; text-align: center; font-size: 1.25rem; font-weight: 700; }
.dvc-form__sub { margin: 0 0 1rem; text-align: center; font-style: italic; font-size: .88rem; }
.dvc-form__sec { margin: 1.1rem 0 .4rem; font-size: 1rem; font-weight: 700; }
.dvc-form__info { display: grid; grid-template-columns: 3.1rem max-content minmax(0, 1fr); gap: .2rem .6rem; margin: 0 0 1rem; align-items: baseline; }
.dvc-form__info--plain, .dvc-form__info--fields { grid-template-columns: max-content minmax(0, 1fr); }
.dvc-form__info--fields { margin-top: .6rem; }
.dvc-form__tag { text-align: right; }
.dvc-formwrap { overflow-x: auto; }
.dvc-form__table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.dvc-form__table th, .dvc-form__table td { border: 1px solid #333; padding: .3rem .5rem; vertical-align: top; }
.dvc-form__table th { background: #f1f3f5; text-align: center; font-weight: 700; }
.dvc-form__table--narrow { width: auto; min-width: 22rem; }
.dvc-form__stt { width: 2.6rem; text-align: center; white-space: nowrap; }
.dvc-form__figcol { min-width: 9rem; }
.dvc-form__fig { text-align: right; white-space: nowrap; }
.dvc-form__code { margin-right: .35rem; font-weight: 700; }
.dvc-form__ind { padding-left: 1.4rem !important; }
.dvc-form__h td { font-weight: 700; }
.dvc-form__sign { margin-top: 1.4rem; display: flex; flex-direction: column; gap: .6rem; }
.dvc-form__sign p { margin: 0; }
.dvc-form__signer { align-self: flex-end; width: min(24rem, 100%); display: flex; flex-direction: column; align-items: center; text-align: center; gap: .15rem; }
.dvc-form__signname { margin-top: 3rem; font-weight: 700; }
.dvc-num { text-align: right; white-space: nowrap; }
@media print {
    /* only while a detail is open: hide the page behind it (hidden would still take its height and add blank pages) and the dialog's own chrome */
    body:has(.dvc-printable) .dvc-shell,
    body:has(.dvc-printable) .rz-dialog-mask,
    body:has(.dvc-printable) .rz-dialog-titlebar,
    body:has(.dvc-printable) .dvc-noprint { display: none !important; }
    body:has(.dvc-printable) .rz-dialog-wrapper,
    body:has(.dvc-printable) .rz-dialog,
    body:has(.dvc-printable) .dvc-page--off { display: block !important; }
    body:has(.dvc-printable) .dvc-page + .dvc-page { break-before: page; }
    body:has(.dvc-printable) .rz-dialog-content { position: static !important; overflow: visible !important; max-height: none !important; height: auto !important; width: auto !important; transform: none !important; box-shadow: none !important; }
}
