/* Athtech MTC — app layer, loaded AFTER material-base.css and theme.css (every colour comes from the --rz-* / --hd-nav-* variables of theme.css).
   Same look as Athtech HĐĐT: navy sidebar, blue accent, white hairline cards. */

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 ── */
.mtc-logo { display: block; width: 2.5rem; height: 2.5rem; flex: none; }
.mtc-brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: #fff; font-weight: 800; letter-spacing: .02em; }
.mtc-brand__name { display: grid; font-size: 1.35rem; line-height: 1.1; }
.mtc-brand__name small { font-size: .75rem; font-weight: 500; letter-spacing: .02em; opacity: .75; }

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

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

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

.mtc-topbar {
    position: sticky; top: 0; z-index: 1000; height: var(--hd-topbar-height); display: flex; align-items: center; gap: .85rem;
    padding: 0 1.5rem; background: #fff; border-bottom: 1px solid var(--rz-base-200);
}
.mtc-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;
}
.mtc-burger:hover { background: var(--rz-base-100); }
.mtc-topbar__title { flex: 1 1 auto; min-width: 0; line-height: 1.25; }
.mtc-topbar__app { font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; color: var(--hd-nav-bg-top); }
.mtc-topbar__tag { font-size: .8125rem; color: var(--rz-text-tertiary-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mtc-top__note { color: var(--rz-text-tertiary-color); font-size: .8125rem; display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; }
.mtc-top__note .rzi { font-size: 1.1rem; }
.mtc-profile.rz-profile-menu { border: 0; background: transparent; min-width: 0; flex: none; }
.mtc-profile .rz-navigation-item-link { padding: .25rem .5rem; border-radius: 10px; }
.mtc-user { display: inline-flex; align-items: center; gap: .65rem; text-align: left; }
.mtc-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;
}
.mtc-user__meta { display: grid; line-height: 1.25; min-width: 0; }
.mtc-user__meta b { font-size: .875rem; color: var(--rz-base-900); max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mtc-user__meta small { font-size: .75rem; color: var(--rz-text-tertiary-color); }

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

/* ── footer ── */
.mtc-footer {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem 2rem;
    padding: 1rem 1.5rem; background: #fff; border-top: 1px solid var(--rz-base-200); font-size: .8125rem; color: var(--rz-text-secondary-color);
}
.mtc-footer__info { display: grid; gap: .2rem; min-width: 0; }
.mtc-footer__info > b { color: var(--hd-nav-bg-top); font-size: .875rem; }
.mtc-footer__info > span { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .4rem; }
.mtc-footer .rzi { font-size: 1rem; color: var(--rz-text-tertiary-color); }
.mtc-footer a { display: inline-flex; align-items: center; gap: .2rem; color: var(--rz-primary); text-decoration: none; }
.mtc-footer a:hover { text-decoration: underline; }
.mtc-footer a .rzi { color: inherit; font-size: .9rem; }
.mtc-footer__sep { width: 1px; height: .9rem; background: var(--rz-base-300); margin: 0 .5rem; }
.mtc-footer__brand { display: flex; align-items: center; gap: .6rem; }
.mtc-footer__brand .mtc-logo { width: 2rem; height: 2rem; flex: none; }
.mtc-footer__brandtext { display: grid; line-height: 1.15; }
.mtc-footer__brandtext b { color: var(--hd-nav-bg-top); font-size: 1rem; letter-spacing: .02em; }
.mtc-footer__brandtext small { font-size: .5625rem; letter-spacing: .08em; color: var(--rz-text-tertiary-color); }
.mtc-footer__copy { padding-left: .85rem; margin-left: .25rem; border-left: 1px solid var(--rz-base-300); font-size: .75rem; color: var(--rz-text-tertiary-color); }

/* ── content primitives ── */
.mtc-h1 { margin: 0 0 1rem; font-size: 1.375rem; font-weight: 700; letter-spacing: -.015em; }
.mtc-h2 { margin: 1.5rem 0 .6rem; font-size: 1.0625rem; font-weight: 700; letter-spacing: -.01em; color: var(--hd-nav-bg-top); }
.mtc-muted { color: var(--rz-text-tertiary-color); }
.mtc-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; }
.mtc-panel__head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .9rem; }
.mtc-panel__head h2 { margin: 0; font-size: 1.0625rem; font-weight: 700; letter-spacing: -.01em; color: var(--hd-nav-bg-top); }
.mtc-panel__head a { font-size: .8125rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.mtc-panel__head a:hover { text-decoration: underline; }
.mtc-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; }
.mtc-field { display: flex; flex-direction: column; gap: .25rem; min-width: 190px; }
.mtc-field > label { font-size: .8rem; color: var(--rz-text-tertiary-color); }
.mtc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.mtc-card { display: flex; flex-direction: column; gap: .15rem; background: #fff; border: 1px solid var(--rz-base-200); border-radius: 12px; padding: 1.1rem 1.15rem; box-shadow: var(--rz-shadow-1); text-decoration: none; color: inherit; }
a.mtc-card:hover { border-color: var(--rz-primary); }
.mtc-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; }
.mtc-card__l { color: var(--rz-text-secondary-color); font-size: .8125rem; }
.mtc-empty, .mtc-boot { display: grid; place-items: center; gap: .6rem; padding: 3rem 1rem; text-align: center; color: var(--rz-text-tertiary-color); }
.mtc-warn { color: var(--rz-warning-dark); }
.mtc-danger { color: var(--rz-danger); }
.mtc-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; }
.mtc-link:hover { text-decoration: underline; }
.mtc-pre { background: #0f172a; color: #e2e8f0; padding: .8rem 1rem; border-radius: 8px; max-height: 55vh; overflow: auto; white-space: pre-wrap; font: .82rem/1.45 Consolas, monospace; }
.mtc-progress { color: var(--rz-text-tertiary-color); font-size: .82rem; max-width: 420px; }
.mtc-err { color: var(--rz-danger); font-size: .82rem; max-width: 420px; }
.mtc-actions { display: flex; flex-wrap: wrap; gap: .25rem; align-items: center; }
.mtc-tablewrap { overflow-x: auto; background: #fff; border: 1px solid var(--rz-base-200); border-radius: 12px; box-shadow: var(--rz-shadow-1); }
.mtc-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.mtc-table th { text-align: left; font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--rz-text-tertiary-color); background: #fbfcfd; padding: .65rem .8rem; border-bottom: 1px solid var(--rz-base-200); white-space: nowrap; }
.mtc-table td { padding: .6rem .8rem; border-bottom: 1px solid var(--rz-base-100); vertical-align: top; }
.mtc-table tr:last-child td { border-bottom: 0; }
.rz-data-grid { border-radius: 10px; }

/* ── KPI cards ── */
.mtc-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; margin: 1.25rem 0; }
.mtc-kpi { display: flex; gap: .9rem; align-items: flex-start; 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; }
a.mtc-kpi:hover { border-color: var(--rz-primary-light); box-shadow: var(--rz-shadow-3); }
.mtc-kpi__icon { display: grid; place-items: center; width: 3.1rem; height: 3.1rem; border-radius: 12px; color: #fff; flex: none; }
.mtc-kpi__icon .rzi { font-size: 1.7rem; }
.mtc-kpi__icon--blue { background: linear-gradient(135deg, #4d9bff, #1b6cf2); }
.mtc-kpi__icon--green { background: linear-gradient(135deg, #4cc36b, #1f9d47); }
.mtc-kpi__icon--orange { background: linear-gradient(135deg, #ffb340, #f08a00); }
.mtc-kpi__icon--purple { background: linear-gradient(135deg, #9a7bff, #6a42f0); }
.mtc-kpi__body { display: grid; gap: .1rem; min-width: 0; flex: 1 1 auto; }
.mtc-kpi__label { font-size: .8125rem; color: var(--rz-text-secondary-color); }
.mtc-kpi__value { font-size: 1.65rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; color: var(--rz-base-900); font-variant-numeric: tabular-nums; }
.mtc-kpi__value small { font-size: .875rem; font-weight: 600; color: var(--rz-text-tertiary-color); letter-spacing: 0; }
.mtc-kpi__sub { font-size: .75rem; color: var(--rz-text-tertiary-color); }
.mtc-kpi .rz-progressbar { margin: .25rem 0 .1rem; height: .4rem; }

/* ── dashboard ── */
.mtc-hero {
    position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: center; gap: 1rem;
    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);
}
.mtc-hero h1 { margin: 0 0 .35rem; color: #fff; font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; }
.mtc-hero__lead { margin: 0; font-size: 1.0625rem; font-weight: 500; opacity: .95; }
.mtc-hero__meta { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.1rem 0; }
.mtc-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .75rem; border-radius: 999px; font-size: .8125rem; font-weight: 600; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .22); }
.mtc-chip .rzi { font-size: 1.05rem; }
.mtc-hero__actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.mtc-hero__actions .rz-button.rz-light { background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .35); }
.mtc-hero__actions .rz-button.rz-light:hover { background: rgba(255, 255, 255, .26); }
.mtc-hero__actions .rz-button.rz-primary { background: #fff; color: var(--rz-primary-dark); }
.mtc-hero__art { width: 100%; max-height: 11rem; justify-self: end; }
.mtc-hero__tagline { margin: .75rem 0 0; font-style: italic; font-size: .875rem; opacity: .85; text-align: right; }

.mtc-dash { display: grid; grid-template-columns: minmax(0, 2fr) minmax(17rem, 1fr); gap: 1rem; align-items: start; }
.mtc-dash__col { display: grid; gap: 1rem; min-width: 0; }

.mtc-quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.mtc-quick__tile {
    display: grid; justify-items: center; align-content: center; gap: .5rem; min-height: 5.6rem; padding: .85rem .5rem; text-align: center; text-decoration: none;
    color: var(--rz-base-800); font-size: .8125rem; font-weight: 600; line-height: 1.3; background: #fff; border: 1px solid var(--rz-base-200); border-radius: 10px;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.mtc-quick__tile .rzi { font-size: 1.75rem; color: var(--rz-primary); }
.mtc-quick__tile:hover { border-color: var(--rz-primary-light); box-shadow: var(--rz-shadow-3); transform: translateY(-1px); color: var(--rz-primary-dark); }

.mtc-promo {
    padding: 1.25rem 1.35rem; border-radius: 12px; color: #fff;
    background: radial-gradient(18rem 10rem at 100% 100%, rgba(120, 190, 255, .45), transparent 70%), linear-gradient(160deg, #123fb8, #1b6cf2);
}
.mtc-promo h3 { margin: 0; color: #fff; font-size: 1.1rem; font-weight: 800; letter-spacing: .01em; }
.mtc-promo p { margin: .15rem 0 .8rem; font-size: .8125rem; font-weight: 600; letter-spacing: .06em; opacity: .85; }
.mtc-promo ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; font-size: .875rem; }
.mtc-promo li { display: flex; align-items: center; gap: .55rem; }
.mtc-promo li .rzi { font-size: 1.2rem; color: #6fe08e; }

.mtc-contact { display: grid; gap: .65rem; }
.mtc-contact .mtc-panel__head { margin-bottom: .15rem; }
.mtc-contact__who { display: flex; align-items: center; gap: .75rem; }
.mtc-contact__who b { font-size: 1rem; color: var(--rz-base-900); overflow-wrap: anywhere; }
.mtc-contact__avatar { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; flex: none; background: var(--rz-primary-lighter); color: var(--rz-primary); }
.mtc-contact__avatar .rzi { font-size: 1.6rem; }
.mtc-contact__row { display: flex; align-items: center; gap: .65rem; color: var(--rz-base-800); text-decoration: none; font-weight: 500; overflow-wrap: anywhere; }
.mtc-contact__row .rzi { font-size: 1.3rem; color: var(--rz-primary); flex: none; }
.mtc-contact__row:hover span { color: var(--rz-primary-dark); text-decoration: underline; }
.mtc-contact__cta {
    display: flex; align-items: center; justify-content: center; gap: .5rem; margin-top: .25rem; padding: .7rem 1rem; border-radius: 8px;
    background: var(--rz-primary); color: #fff; font-weight: 700; text-decoration: none;
}
.mtc-contact__cta:hover { background: var(--rz-primary-dark); color: #fff; }

.mtc-steps { margin: 0; padding-left: 1.2rem; display: grid; gap: .45rem; line-height: 1.5; }

/* ── plain controls used on the static login page ── */
.mtc-input { width: 100%; box-sizing: border-box; padding: .6rem .7rem; border: 1px solid var(--rz-base-300); border-radius: 8px; font: inherit; background: #fff; color: var(--rz-text-color); }
.mtc-input:focus { outline: 2px solid var(--rz-primary); outline-offset: 0; border-color: transparent; }
.mtc-btn { padding: .65rem 1rem; border-radius: 8px; border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.mtc-btn--primary { background: var(--rz-primary); color: #fff; }
.mtc-btn--primary:hover { background: var(--rz-primary-dark); }
.mtc-form { display: flex; flex-direction: column; gap: .5rem; }
.mtc-form label { font-size: .85rem; color: var(--rz-text-tertiary-color); }
.mtc-field-error { color: var(--rz-danger); font-size: .82rem; }
.mtc-alert { padding: .65rem .85rem; border-radius: 10px; margin: .6rem 0; font-size: .9rem; }
.mtc-alert--error { background: var(--rz-danger-lighter); color: var(--rz-danger-dark); }
.mtc-alert--warn { background: var(--rz-warning-lighter); color: var(--rz-warning-dark); }

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

/* ── Blazor housekeeping ── */
#blazor-error-ui {
    display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 2000; 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; }

/* ── supported portals dialog ── */
.mtc-portals { display: flex; flex-wrap: wrap; gap: .45rem; }
.mtc-chip-soft { padding: .3rem .7rem; border-radius: 999px; font-size: .8125rem; font-weight: 600; background: var(--rz-primary-lighter); color: var(--rz-primary-dark); }

/* ── upload screen ── */
.mtc-file { position: relative; overflow: hidden; cursor: pointer; display: inline-flex; align-items: center; gap: .35rem; }
.mtc-file input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.mtc-card--warn { border-color: var(--rz-warning); }
.mtc-card--warn .mtc-card__v { color: var(--rz-warning-dark); }

/* ── invoice view ── */
.mtc-inv-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: .6rem; }
.mtc-inv { font-size: .9rem; }
.mtc-inv__title { text-align: center; margin: .2rem 0 .8rem; font-size: 1.25rem; }
.mtc-inv__h { margin: 1rem 0 .4rem; font-size: 1rem; border-bottom: 1px solid var(--rz-base-200); padding-bottom: .2rem; }
.mtc-inv__grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .3rem 1rem; margin-bottom: .3rem; }
.mtc-inv__grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: .3rem 1rem; margin-bottom: .3rem; }
.mtc-inv__kv { display: flex; gap: .6rem; margin-bottom: .25rem; }
.mtc-inv__kv > span { flex: 0 0 9.5rem; color: var(--rz-text-tertiary-color); }
.mtc-inv__table th.r, .mtc-inv__table td.r, .mtc-inv__totals td.r { text-align: right; white-space: nowrap; }
.mtc-inv__totals { width: auto; margin: .6rem 0 .4rem auto; min-width: 22rem; }
.mtc-inv__totals tr.total td { font-weight: 700; }
.mtc-inv-raw { margin-top: 1rem; }

@media (max-width: 700px) {
    .mtc-inv__grid3, .mtc-inv__grid2 { grid-template-columns: 1fr; }
    .mtc-inv__kv { flex-direction: column; gap: 0; }
}

@media (max-width: 1100px) {
    .mtc-dash { grid-template-columns: minmax(0, 1fr); }
    .mtc-hero { grid-template-columns: minmax(0, 1fr); }
    .mtc-hero__art, .mtc-hero__tagline { display: none; }
}

@media (max-width: 860px) {
    .mtc-auth { grid-template-columns: 1fr; }
    .mtc-auth__brand { padding: 1.25rem 1.5rem; gap: .75rem; }
    .mtc-auth__pitch, .mtc-auth__foot { display: none; }
}

/* ── phones: the menu slides over the content instead of taking room ── */
@media (max-width: 767px) {
    .mtc-shell, .mtc-shell--toggled { grid-template-columns: minmax(0, 1fr); }
    .mtc-main { grid-column: 1; }
    .mtc-side { transform: translateX(-100%); visibility: hidden; width: min(18rem, 86vw); }
    .mtc-shell--toggled .mtc-side { transform: none; visibility: visible; box-shadow: var(--rz-shadow-8); }
    .mtc-shell--toggled .mtc-scrim { display: block; position: fixed; inset: 0; z-index: 1100; background: rgba(8, 24, 63, .5); }
    .mtc-topbar { padding: 0 .75rem; }
    .mtc-topbar__app { font-size: 1.05rem; }
    .mtc-topbar__tag, .mtc-user__meta, .mtc-top__note { display: none; }
    .mtc-content { padding: 1rem .85rem 3rem; }
    .mtc-hero { padding: 1.25rem 1.1rem; }
    .mtc-hero h1 { font-size: 1.35rem; }
    .mtc-footer { padding: 1rem .85rem; }
    .mtc-footer__brand { flex-wrap: wrap; }
    .mtc-footer__copy { padding-left: 0; margin-left: 0; border-left: 0; flex-basis: 100%; }
}

/* Dialogs must sit above the sidebar (z-index 1150), or the menu covers part of them. Radzen reads the dialog z-index from these two variables. */
:root { --rz-dialog-mask-zindex: 2100; --rz-dialog-zindex: 2101; }
