:root {
    --theme-color: #4f6cff;
    --theme-strong: #314bc8;
    --theme-soft: #eaf0ff;
    --theme-ink: #18223b;
    --accent: #ff8b5e;
    --accent-soft: #fff0e8;
    --bg: #f4f7ff;
    --panel: rgba(255, 255, 255, 0.96);
    --panel-solid: #ffffff;
    --border: rgba(92, 107, 151, 0.14);
    --text: #172033;
    --muted: #6e7790;
    --danger: #d14c2d;
    --danger-soft: #fff0eb;
    --success: #168b61;
    --success-soft: #e2f7ef;
    --warning: #d2841b;
    --warning-soft: #fff4df;
    --info: #406dff;
    --info-soft: #e7eeff;
    --shadow-lg: 0 32px 80px rgba(27, 39, 94, 0.14);
    --shadow-md: 0 18px 42px rgba(27, 39, 94, 0.1);
    --radius-xl: 30px;
    --radius-lg: 24px;
    --radius-md: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    font-family: "Aptos", "Trebuchet MS", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(79, 108, 255, 0.18), transparent 30%),
        radial-gradient(circle at top right, rgba(255, 139, 94, 0.16), transparent 22%),
        linear-gradient(180deg, #f7f9ff 0%, var(--bg) 260px);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(132, 148, 197, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(132, 148, 197, 0.1) 1px, transparent 1px);
    background-size: 84px 84px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.22), transparent 78%);
    z-index: -1;
}

a {
    color: inherit;
    text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
    margin-top: 0;
}

.app-shell {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    min-height: 100vh;
}

.page-settings .content {
    scroll-behavior: smooth;
    scrollbar-gutter: stable both-edges;
    overscroll-behavior-y: contain;
}

.sidebar {
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.12), transparent 32%),
        linear-gradient(180deg, #202b67 0%, #1a2459 60%, #141b43 100%);
    color: #dce7f4;
    padding: 16px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    height: 100vh;
    align-self: start;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 8;
    transition: padding 180ms ease;
}

.brand {
    display: flex;
    gap: 14px;
    align-items: center;
}

.brand-card {
    padding: 12px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand-copy {
    min-width: 0;
}

.brand-copy h1,
.brand-copy p,
.nav-label,
.topbar-title {
    overflow-wrap: anywhere;
}

.brand h1 {
    margin: 0;
    font-size: 1rem;
    letter-spacing: 0.01em;
}

.brand p,
.page-header p,
.muted {
    color: var(--muted);
}

.sidebar .brand p,
.sidebar-panel-copy,
.sidebar-footer {
    color: rgba(220, 231, 244, 0.7);
}

.brand-logo {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    object-fit: contain;
    padding: 4px;
    background: #fff;
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.24);
}

.brand-logo-preview {
    display: block;
    width: min(100%, 220px);
    max-width: 100%;
    max-height: 120px;
    border-radius: 20px;
    object-fit: contain;
    padding: 10px;
    background: #fff;
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.08);
}

.nav {
    display: grid;
    gap: 6px;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding-right: 4px;
    scrollbar-gutter: stable;
    overscroll-behavior: contain;
}

.nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    min-width: 0;
    border-radius: 16px;
    color: #dce7f4;
    border: 1px solid transparent;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.nav a:hover,
.nav a.active {
    transform: translateX(3px);
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 16px 28px rgba(10, 16, 45, 0.22);
}

.nav-label {
    flex: 1 1 auto;
    min-width: 0;
    display: block;
    line-height: 1.25;
    overflow-wrap: normal;
    word-break: keep-all;
}

.nav-icon,
.tab-icon,
.metric-icon,
.inline-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
}

.nav-icon svg,
.tab-icon svg,
.metric-icon svg,
.hero-badge svg,
.detail-chip svg,
.sidebar-panel-title svg,
.section-label svg,
.logout-link svg,
.footer-links svg,
button svg,
.button svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.sidebar-panel {
    padding: 12px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.24), rgba(255, 255, 255, 0.06));
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sidebar-panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-weight: 700;
}

.sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: 10px;
    flex-shrink: 0;
}

.user-chip,
.logout-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.user-chip {
    background: rgba(255, 255, 255, 0.07);
}

.logout-link {
    color: #ffd1c3;
    background: rgba(255, 255, 255, 0.04);
}

.content,
.standalone {
    padding: 18px 20px 24px;
    min-width: 0;
}

.content {
    overflow-x: clip;
}

.content > *,
.standalone > *,
.split > *,
.grid > *,
.summary-grid > *,
.analytics-grid > *,
.expiry-grid > *,
.upload-layout > *,
.document-grid > *,
.form-grid > *,
.reminder-board > *,
.chart-shell > *,
.login-shell > *,
.toolbar > *,
.content-topbar > *,
.card-head > *,
.hero-panel > * {
    min-width: 0;
}

.content > :where(.page-header, .alert, .tab-bar, .summary-grid, .analytics-grid, .expiry-grid, .split, .grid, .card, .upload-layout, .register-detail-panel, .empty-state, .reminder-board, .report-print-controls) + :where(.page-header, .alert, .tab-bar, .summary-grid, .analytics-grid, .expiry-grid, .split, .grid, .card, .upload-layout, .register-detail-panel, .empty-state, .reminder-board, .report-print-controls),
.standalone > :where(.page-header, .alert, .login-shell, .split, .card, .empty-state) + :where(.page-header, .alert, .login-shell, .split, .card, .empty-state) {
    margin-top: 14px;
}

.standalone {
    max-width: 1020px;
    margin: 0 auto;
}

.page-login {
    background:
        radial-gradient(circle at 12% 12%, rgba(79, 108, 255, 0.22), transparent 26%),
        radial-gradient(circle at 88% 14%, rgba(255, 139, 94, 0.18), transparent 26%),
        radial-gradient(circle at 50% 100%, rgba(121, 137, 255, 0.12), transparent 30%),
        linear-gradient(180deg, #f4f7ff 0%, #fbfcff 100%);
}

.page-login::after {
    content: "";
    position: fixed;
    inset: auto -120px -120px auto;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 108, 255, 0.12), transparent 68%);
    pointer-events: none;
    z-index: -1;
}

.page-login .hero-panel {
    background:
        radial-gradient(circle at top right, rgba(79, 108, 255, 0.16), transparent 28%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 255, 0.95));
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
    gap: 22px;
    align-items: stretch;
}

.login-shell-single {
    max-width: 520px;
    margin: 0 auto;
    grid-template-columns: minmax(0, 1fr);
}

.login-card,
.login-showcase {
    position: relative;
    overflow: hidden;
}

.login-card::before,
.login-showcase::before {
    content: "";
    position: absolute;
    inset: auto -44px -44px auto;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 108, 255, 0.12), transparent 70%);
    pointer-events: none;
}

.login-card > *,
.login-showcase > * {
    position: relative;
    z-index: 1;
}

.login-brand {
    display: grid;
    gap: 16px;
    justify-items: center;
    text-align: center;
    margin: 0 auto 18px;
}

.login-brand-copy {
    display: grid;
    gap: 6px;
    justify-items: center;
    text-align: center;
}

.login-logo,
.login-showcase-logo {
    width: clamp(132px, 24vw, 190px);
    height: clamp(132px, 24vw, 190px);
    max-width: 100%;
    border-radius: 28px;
    object-fit: contain;
    padding: 14px;
    background: #fff;
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.12);
    flex: 0 0 auto;
}

.login-logo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #4f6cff, #7e8dff);
}

.login-kicker {
    margin: 0 0 6px;
    color: var(--theme-strong);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.login-card h3,
.login-showcase h3 {
    margin-bottom: 8px;
}

.login-brand-copy .muted {
    max-width: 34ch;
    margin: 0;
}

.login-shell-single .login-card {
    min-height: auto;
}

.login-captcha-panel {
    display: grid;
    gap: 10px;
    margin-top: 10px;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(247, 250, 255, 0.92);
}

.login-captcha-image-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.login-captcha-image {
    display: block;
    width: 180px;
    max-width: 100%;
    height: 64px;
    border-radius: 16px;
    border: 1px solid rgba(36, 59, 122, 0.12);
    background: #fff;
}

.login-trust,
.login-badge-grid,
.login-points {
    display: grid;
    gap: 10px;
}

.login-badge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 18px 0;
}

.login-points {
    padding-top: 10px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.content-topbar {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    margin-bottom: 12px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-toggle {
    width: 42px;
    height: 42px;
    min-width: 42px;
    padding: 0;
    border-radius: 14px;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.92);
    color: var(--theme-ink);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.sidebar-toggle:hover {
    background: var(--theme-soft);
}

.topbar-label {
    margin-bottom: 4px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--muted);
}

.topbar-title {
    margin: 0;
    font-size: 1.15rem;
}

.topbar-actions,
.hero-actions,
.footer-links,
.mini-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.page-header {
    margin-bottom: 14px;
}

.hero-panel {
    background:
        radial-gradient(circle at top right, rgba(255, 139, 94, 0.18), transparent 28%),
        radial-gradient(circle at bottom left, rgba(79, 108, 255, 0.14), transparent 32%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 244, 255, 0.96));
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 18px;
    box-shadow: var(--shadow-md);
    display: grid;
    grid-template-columns: minmax(0, 1.85fr) minmax(200px, 0.85fr);
    gap: 14px;
    overflow: hidden;
    position: relative;
}

.hero-panel::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -90px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 108, 255, 0.16), transparent 68%);
}

.hero-copy,
.hero-art {
    position: relative;
    z-index: 1;
}

.page-eyebrow {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--theme-soft);
    color: var(--theme-strong);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.page-header h2 {
    margin-bottom: 8px;
    font-size: clamp(1.55rem, 2.5vw, 2.1rem);
}

.page-header p {
    max-width: 700px;
    font-size: 0.94rem;
    line-height: 1.48;
}

.hero-art {
    align-self: stretch;
    display: grid;
    justify-items: end;
    gap: 12px;
}

.hero-badge {
    width: 74px;
    height: 74px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #4f6cff, #7e8dff);
    box-shadow: 0 20px 40px rgba(79, 108, 255, 0.24);
}

.hero-badge svg {
    width: 30px;
    height: 30px;
}

.hero-note {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(15, 23, 42, 0.08);
    display: grid;
    gap: 4px;
    min-width: 200px;
}

.hero-note span {
    color: var(--muted);
    line-height: 1.5;
}

.detail-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--theme-ink);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.alert {
    padding: 11px 14px;
    border-radius: 16px;
    margin-bottom: 16px;
    border: 1px solid transparent;
    box-shadow: var(--shadow-md);
}

.alert.success {
    background: var(--success-soft);
    border-color: rgba(18, 113, 91, 0.12);
    color: var(--success);
}

.alert.warning {
    background: var(--warning-soft);
    border-color: rgba(210, 132, 27, 0.18);
    color: var(--warning);
}

.alert.error {
    background: #fde8e8;
    border-color: rgba(194, 65, 12, 0.14);
    color: var(--danger);
}

.grid {
    display: grid;
    gap: 12px;
}

.grid.cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
    background: var(--panel);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 15px;
    box-shadow: var(--shadow-md);
    animation: fadeUp 360ms ease both;
}

.card h3,
.card h4 {
    margin-bottom: 8px;
}

.card > :last-child {
    margin-bottom: 0;
}

.stat,
.metric-card {
    display: grid;
    gap: 10px;
}

.stat {
    padding: 13px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 255, 0.94));
    border: 1px solid var(--border);
    min-height: 96px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 18px 36px rgba(27, 39, 94, 0.08);
}

.stat::after {
    content: "";
    position: absolute;
    inset: auto -24px -24px auto;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 108, 255, 0.16), transparent 68%);
}

.stat .value {
    font-size: clamp(1.45rem, 2.3vw, 1.95rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.metric-icon {
    width: 36px;
    height: 36px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #4f6cff, #788aff);
    box-shadow: 0 16px 30px rgba(79, 108, 255, 0.22);
}

.summary-grid .stat:nth-child(2) .metric-icon {
    background: linear-gradient(135deg, #ff8b5e, #ffb175);
    box-shadow: 0 16px 30px rgba(255, 139, 94, 0.24);
}

.summary-grid .stat:nth-child(3) .metric-icon {
    background: linear-gradient(135deg, #1fb980, #5bd8ac);
    box-shadow: 0 16px 30px rgba(31, 185, 128, 0.22);
}

.summary-grid .stat:nth-child(4) .metric-icon {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
    box-shadow: 0 16px 30px rgba(139, 92, 246, 0.22);
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.toolbar > :first-child,
.card-head > :first-child,
.content-topbar > :first-child {
    flex: 1 1 280px;
}

.toolbar > .actions,
.toolbar > .icon-actions,
.toolbar > form {
    flex: 0 1 auto;
    max-width: 100%;
    margin-top: 2px;
}

.toolbar h3,
.toolbar h4 {
    margin: 0;
}

.toolbar form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.toolbar form > *,
.actions > *,
.icon-actions > *,
.topbar-actions > *,
.hero-actions > *,
.footer-links > * {
    min-width: 0;
}

.tab-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.tab-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.04);
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.tab-link,
.section-action,
.card-link {
    min-width: 0;
}

.tab-link:hover,
.tab-link.active {
    transform: translateY(-1px);
    background: var(--theme-soft);
    border-color: rgba(79, 108, 255, 0.2);
    color: var(--theme-strong);
}

.tab-icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: rgba(79, 108, 255, 0.1);
}

.table-shell {
    overflow: auto;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    margin-top: 8px;
    scrollbar-gutter: stable both-edges;
    -webkit-overflow-scrolling: touch;
}

.list-sticky-card {
    display: flex;
    flex-direction: column;
}

.list-sticky-card > .toolbar,
.list-sticky-card > .sticky-filter-form {
    position: sticky;
    top: 0;
    z-index: 4;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
}

.list-sticky-card > .toolbar {
    padding-bottom: 8px;
}

.list-sticky-card > .sticky-filter-form {
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.list-sticky-card > .sticky-filter-form + .list-scroll-shell,
.list-sticky-card > .toolbar + .list-scroll-shell {
    margin-top: 10px;
}

.list-scroll-shell {
    max-height: min(68vh, 860px);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--panel-solid);
}

.table-shell.compact-preview table {
    table-layout: fixed;
}

.table-shell.compact-preview th,
.table-shell.compact-preview td {
    padding: 8px 9px;
    white-space: normal;
    word-break: break-word;
    line-height: 1.22;
}

.table-shell.compact-preview th {
    font-size: 0.72rem;
}

.table-shell.compact-preview td {
    font-size: 0.78rem;
}

.report-preview-shell {
    overflow: auto;
    scrollbar-gutter: stable both-edges;
    -webkit-overflow-scrolling: touch;
}

.report-preview-shell table {
    width: max-content;
    min-width: 100%;
    table-layout: auto;
}

.report-preview-shell th,
.report-preview-shell td {
    min-width: 128px;
    max-width: 240px;
    white-space: normal;
    word-break: break-word;
}

.report-preview-shell th:first-child,
.report-preview-shell td:first-child {
    min-width: 64px;
}

th,
td {
    padding: 11px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(15, 23, 42, 0.07);
    vertical-align: top;
}

th {
    background: #f6f8ff;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

tbody tr:hover {
    background: rgba(79, 108, 255, 0.04);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
}

.badge.success {
    background: var(--success-soft);
    color: var(--success);
}

.badge.warning {
    background: var(--warning-soft);
    color: var(--warning);
}

.badge.error {
    background: var(--danger-soft);
    color: var(--danger);
}

.badge.info {
    background: var(--info-soft);
    color: var(--info);
}

.badge.neutral {
    background: rgba(148, 163, 184, 0.18);
    color: #475569;
}

form {
    display: grid;
    gap: 10px;
}

.actions form,
.icon-actions form {
    display: inline-flex;
    gap: 0;
    width: auto;
}

.card form > .actions,
.card form > .icon-actions,
.form-grid + .actions,
.document-grid + .actions,
.mini-table + .actions,
.kpi-list + .actions {
    margin-top: 12px;
}

.toolbar + form,
.toolbar + .table-shell,
.toolbar + .report-preview-shell,
.toolbar + .empty-state,
.toolbar + .mini-table {
    margin-top: 8px;
}

.form-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

label {
    display: grid;
    gap: 6px;
    font-weight: 700;
    color: var(--theme-ink);
    font-size: 0.94rem;
}

input,
select,
textarea,
button {
    width: 100%;
    padding: 9px 11px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    font: inherit;
    background: rgba(255, 255, 255, 0.94);
    color: var(--text);
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(79, 108, 255, 0.45);
    box-shadow: 0 0 0 4px rgba(79, 108, 255, 0.12);
    outline: none;
}

textarea {
    min-height: 108px;
    resize: vertical;
}

select[multiple] {
    min-height: 140px;
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    min-width: 84px;
    background: linear-gradient(135deg, #4f6cff, #314bc8);
    color: #fff;
    border: 0;
    box-shadow: 0 12px 24px rgba(79, 108, 255, 0.2);
    cursor: pointer;
    font-weight: 700;
    padding: 7px 11px;
    text-align: center;
    line-height: 1.25;
    white-space: normal;
    font-size: 0.88rem;
}

button:hover,
.button:hover {
    transform: translateY(-1px);
}

.button.secondary,
button.secondary {
    background: #ffffff;
    color: var(--theme-ink);
    box-shadow: 0 12px 24px rgba(27, 39, 94, 0.06);
    border: 1px solid var(--border);
}

.button.danger,
button.danger {
    background: linear-gradient(135deg, #f97316, #c2410c);
    color: #fff;
}

.button.ghost,
button.ghost {
    background: transparent;
    color: var(--theme-ink);
    border: 1px dashed rgba(15, 23, 42, 0.18);
    box-shadow: none;
}

.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 6px;
}

.icon-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 6px;
}

.actions > *,
.icon-actions > * {
    max-width: 100%;
}

.actions form,
.icon-actions form {
    flex: 0 1 auto;
    max-width: 100%;
}

.icon-button {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.96);
    color: var(--theme-ink);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
    transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.icon-button:hover {
    transform: translateY(-1px);
    background: var(--theme-soft);
    color: var(--theme-strong);
}

.icon-button:disabled,
.icon-button[aria-busy="true"] {
    opacity: 0.7;
    cursor: progress;
    transform: none;
}

.icon-button.danger {
    background: #fff1eb;
    color: var(--danger);
}

.icon-button svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.kpi-list,
.document-grid,
.stack {
    display: grid;
    gap: 10px;
}

.document-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.split {
    display: grid;
    gap: 14px;
    grid-template-columns: 1.35fr 0.95fr;
}

.settings-page-stack {
    gap: 12px;
}

.settings-layout-top {
    align-items: start;
    grid-template-columns: minmax(0, 1.28fr) minmax(280px, 0.72fr);
}

.settings-main-card,
.settings-template-card,
.settings-control-card {
    min-width: 0;
}

.settings-side-stack {
    gap: 12px;
}

.settings-section-block + .settings-section-block {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.settings-section-heading {
    display: grid;
    gap: 4px;
    margin-bottom: 10px;
}

.settings-section-heading h4 {
    margin: 0;
    color: var(--theme-ink);
    font-size: 1rem;
}

.settings-section-heading p {
    margin: 0;
}

.settings-control-card {
    align-self: start;
    padding: 14px;
}

.settings-compact-grid {
    grid-template-columns: 1fr;
    gap: 9px;
}

.settings-template-top-grid,
.settings-template-grid {
    gap: 10px;
}

.settings-template-item {
    padding: 12px;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 248, 255, 0.94));
    min-width: 0;
}

.settings-template-form-grid {
    grid-template-columns: 1fr;
}

.settings-template-card select[multiple] {
    min-height: 108px;
}

.settings-template-card textarea {
    min-height: 90px;
}

.settings-submit-actions {
    justify-content: flex-end;
    margin-top: 2px;
}

.settings-password-card {
    margin-top: 12px;
}

.settings-password-form {
    gap: 10px;
}

.record-panel-stack {
    gap: 16px;
}

.user-permission-panel {
    display: grid;
    gap: 10px;
    margin-top: 4px;
}

.user-permission-panel.is-super-admin {
    opacity: 0.9;
}

.user-permission-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.user-permission-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 248, 255, 0.94));
    font-weight: 600;
    line-height: 1.35;
    min-width: 0;
}

.user-permission-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    accent-color: var(--theme-color);
}

.user-reset-card {
    margin-top: 0;
}

.user-access-summary {
    display: block;
    max-width: 340px;
    overflow-wrap: anywhere;
}

.user-access-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.user-access-form-card,
.user-access-list-card,
.user-reset-card {
    min-width: 0;
}

.user-access-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.user-access-form-actions {
    margin-top: 10px;
}

.user-access-table-shell {
    margin-top: 10px;
}

.user-access-table {
    min-width: 860px;
}

.user-access-table td,
.user-access-table th {
    padding: 10px 11px;
}

.user-access-table td[data-label="Actions"] {
    white-space: nowrap;
}

.user-access-actions {
    flex-wrap: nowrap;
    gap: 6px;
    align-items: center;
}

.user-access-actions .icon-button {
    flex: 0 0 auto;
}

.license-summary-grid {
    margin-bottom: 14px;
}

.license-summary-card {
    display: grid;
    gap: 8px;
}

.license-summary-value {
    font-size: clamp(1.6rem, 3vw, 2.15rem);
    line-height: 1;
    color: var(--theme-ink);
}

.sidebar-toggle[hidden] {
    display: none !important;
}

.license-layout {
    align-items: start;
    grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1.4fr);
}

.license-form-card,
.license-list-card,
.customer-form-card,
.customer-list-card,
.transfer-form-card,
.transfer-list-card {
    min-width: 0;
    padding: 15px;
}

.customer-form-card,
.customer-list-card {
    padding: 13px;
}

.license-form-grid,
.customer-form-grid,
.transfer-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
}

.customer-form-grid {
    gap: 10px;
}

.license-filter-grid {
    grid-template-columns: minmax(220px, 1.35fr) repeat(4, minmax(140px, 1fr));
}

.customer-filter-grid,
.vehicle-filter-grid {
    grid-template-columns: minmax(220px, 1.35fr) repeat(4, minmax(140px, 1fr));
}

.transfer-filter-grid {
    grid-template-columns: minmax(220px, 1.15fr) minmax(170px, 0.9fr) repeat(4, minmax(140px, 1fr));
}

.vehicle-filter-grid {
    grid-template-columns: minmax(220px, 1.2fr) repeat(5, minmax(140px, 1fr));
}

.license-toolbar-actions > *,
.customer-toolbar-actions > *,
.transfer-toolbar-actions > *,
.license-filter-actions > * {
    flex: 0 1 auto;
}

.license-toolbar-actions,
.customer-toolbar-actions,
.transfer-toolbar-actions {
    gap: 10px;
}

.customer-toolbar {
    margin-bottom: 10px;
}

.license-table-shell,
.customer-table-shell,
.transfer-table-shell {
    margin-top: 10px;
}

.message-action-form {
    display: grid;
    grid-template-columns: minmax(128px, 1fr) repeat(2, 38px);
    align-items: center;
    gap: 8px;
    width: min(100%, 228px);
    max-width: 100%;
}

.message-action-form.single-channel {
    grid-template-columns: minmax(128px, 1fr) 38px;
    width: min(100%, 178px);
}

.message-template-select {
    min-width: 0;
    width: 100%;
    max-width: none;
    padding-right: 28px;
}

.message-action-form .icon-button {
    width: 38px;
    min-width: 38px;
}

.table-shell td .actions,
.table-shell td .icon-actions {
    align-items: flex-start;
}

.table-shell td .message-action-form {
    margin-top: 2px;
}

.delivery-status-list {
    display: grid;
    gap: 6px;
    margin-top: 8px;
}

.delivery-status-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 12px;
    background: rgba(245, 247, 255, 0.92);
    border: 1px solid rgba(15, 23, 42, 0.06);
    min-width: 0;
}

.delivery-status-item .badge {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 4px 7px;
    font-size: 0.72rem;
}

.delivery-status-text {
    font-size: 0.76rem;
    line-height: 1.2;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1 1 auto;
}

.vehicle-list-shell th,
.vehicle-list-shell td {
    vertical-align: top;
}

.vehicle-actions-cell {
    width: 320px;
}

.vehicle-row-actions {
    gap: 5px;
    margin-bottom: 8px;
}

.vehicle-row-actions .message-action-form {
    width: min(100%, 210px);
    grid-template-columns: minmax(108px, 1fr) repeat(2, 36px);
    gap: 6px;
}

.vehicle-row-actions .message-action-form.single-channel {
    grid-template-columns: minmax(108px, 1fr) 36px;
    width: min(100%, 168px);
}

.vehicle-row-actions .message-action-form .icon-button {
    width: 36px;
    min-width: 36px;
    height: 36px;
}

.vehicle-reminder-badges {
    gap: 6px;
}

.vehicle-reminder-cell .badge {
    justify-content: flex-start;
}

.logs-grid {
    align-items: start;
}

.logs-table-shell {
    max-height: 420px;
    overflow: auto;
}

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

.logs-table th,
.logs-table td {
    font-size: 0.82rem;
}

.logs-table th:nth-child(1),
.logs-table td:nth-child(1) {
    width: 132px;
}

.logs-table th:nth-child(2),
.logs-table td:nth-child(2),
.logs-table th:nth-child(4),
.logs-table td:nth-child(4) {
    width: 110px;
}

.log-scroll-box {
    max-height: 74px;
    overflow: auto;
    padding-right: 4px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.license-table {
    min-width: 860px;
}

.customer-table {
    min-width: 780px;
}

.customer-table th,
.customer-table td {
    padding: 9px 10px;
}

.customer-card-head {
    margin-bottom: 8px;
}

.customer-card-head p {
    margin-top: 4px;
}

.customer-form-card textarea {
    min-height: 86px;
}

.customer-form-actions,
.customer-filter-actions {
    margin-top: 10px !important;
}

.page-dashboard .summary-grid {
    margin-bottom: 14px;
}

.page-dashboard .analytics-grid,
.page-dashboard .expiry-grid,
.page-dashboard .dashboard-secondary-grid,
.page-dashboard .dashboard-message-card {
    margin-top: 0;
}

.page-dashboard .analytics-grid,
.page-dashboard .expiry-grid,
.page-dashboard .dashboard-secondary-grid {
    margin-bottom: 14px;
}

.dashboard-expiry-actions {
    margin-top: 14px;
}

.page-dashboard .card-head + .chart-widget,
.page-dashboard .card-head + .table-shell,
.page-dashboard .card-head + .mini-table {
    margin-top: 10px;
}

.page-dashboard .mini-row + .mini-row {
    margin-top: 8px;
}

.page-dashboard .table-shell table {
    margin-top: 0;
}

.page-vehicle-form .split,
.page-settings .settings-layout-top,
.page-user-access .stack {
    gap: 16px;
}

.page-vehicle-form .card,
.page-customers .customer-form-card,
.page-customers .customer-list-card,
.page-licenses .license-form-card,
.page-licenses .license-list-card,
.page-transfers .transfer-form-card,
.page-transfers .transfer-list-card,
.page-user-access .user-access-form-card,
.page-user-access .user-access-list-card,
.page-settings .card {
    padding: 16px;
}

.page-vehicle-form form,
.page-customers .customer-form-card form,
.page-licenses .license-form-card form,
.page-transfers .transfer-form-card form,
.page-user-access .user-access-form-card form,
.page-settings .card form {
    gap: 12px;
}

.page-vehicle-form .form-grid,
.page-customers .customer-form-grid,
.page-licenses .license-form-grid,
.page-transfers .transfer-form-grid,
.page-user-access .user-access-form-grid,
.page-settings .form-grid {
    gap: 12px;
}

.page-vehicle-form label,
.page-customers .customer-form-card label,
.page-licenses .license-form-card label,
.page-transfers .transfer-form-card label,
.page-user-access .user-access-form-card label,
.page-settings .card label {
    gap: 7px;
}

.page-vehicle-form .document-grid {
    gap: 12px;
}

.page-vehicle-form .fetch-panel,
.page-vehicle-form .document-grid,
.page-vehicle-form .actions,
.page-customers .customer-filter-actions,
.page-licenses .license-filter-actions,
.page-transfers .transfer-list-card form > .actions,
.page-settings .settings-template-card,
.page-user-access .user-permission-panel {
    margin-top: 12px;
}

.customer-actions {
    flex-wrap: nowrap;
    gap: 6px;
    align-items: center;
}

.customer-actions .icon-button,
.customer-actions form {
    flex: 0 0 auto;
}

.customer-delete-form {
    margin: 0;
}

.customer-table td[data-label="Address"] {
    max-width: 280px;
}

.transfer-table {
    min-width: 880px;
}

.license-table th:last-child,
.license-table td:last-child,
.customer-table th:last-child,
.customer-table td:last-child,
.transfer-table th:last-child,
.transfer-table td:last-child {
    width: 1%;
    white-space: nowrap;
}

.license-primary {
    display: block;
    font-weight: 700;
    color: var(--theme-ink);
}

.license-subtext {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.35;
}

.empty-state {
    padding: 34px 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 247, 255, 0.92));
    border: 1px dashed rgba(92, 107, 151, 0.2);
    border-radius: 22px;
    text-align: center;
    color: var(--muted);
}

.pagination {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 12px;
    flex-wrap: wrap;
}

.pagination a {
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.small {
    font-size: 0.9rem;
}

.content-footer {
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border);
    box-shadow: 0 14px 30px rgba(27, 39, 94, 0.06);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(79, 108, 255, 0.08);
    color: var(--theme-strong);
    font-weight: 700;
}

.section-label {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
    color: var(--theme-strong);
    font-weight: 700;
}

.summary-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.analytics-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 12px;
}

.analytics-card {
    position: relative;
    overflow: hidden;
}

.analytics-card::before {
    content: "";
    position: absolute;
    inset: auto -44px -54px auto;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.12), transparent 70%);
}

.analytics-card > * {
    position: relative;
    z-index: 1;
}

.chart-heading {
    margin-bottom: 14px;
}

.chart-heading h3 {
    margin: 0 0 6px;
}

.chart-widget {
    min-height: 264px;
    display: grid;
    align-items: center;
}

.chart-widget.compact {
    min-height: 228px;
}

.chart-shell {
    display: grid;
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
    gap: 16px;
    align-items: center;
}

.chart-ring {
    width: 220px;
    height: 220px;
    position: relative;
    margin: 0 auto;
}

.chart-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    overflow: visible;
}

.chart-track,
.chart-segment {
    fill: none;
    stroke-width: 20;
}

.chart-track {
    stroke: rgba(15, 23, 42, 0.08);
}

.chart-segment {
    stroke-linecap: round;
    filter: drop-shadow(0 6px 10px rgba(15, 23, 42, 0.08));
}

.chart-center {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    text-align: center;
    gap: 4px;
}

.chart-center strong {
    font-size: 2rem;
    letter-spacing: -0.03em;
}

.chart-center span {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.chart-legend,
.bar-chart {
    display: grid;
    gap: 10px;
}

.chart-legend-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 11px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.chart-swatch {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.9);
}

.chart-legend-copy {
    display: grid;
    gap: 2px;
}

.chart-legend-copy strong,
.bar-row-head strong {
    font-size: 0.92rem;
}

.chart-legend-copy span,
.bar-row-head span,
.chart-empty {
    color: var(--muted);
    font-size: 0.88rem;
}

.chart-legend-value {
    font-weight: 800;
    color: var(--theme-ink);
}

.bar-row {
    display: grid;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.bar-row-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.bar-track {
    position: relative;
    height: 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.07);
    overflow: hidden;
}

.bar-fill {
    display: block;
    height: 100%;
    min-width: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--bar-color), var(--bar-color));
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

.chart-empty {
    min-height: 180px;
    display: grid;
    place-items: center;
    padding: 14px;
    text-align: center;
    border-radius: 18px;
    border: 1px dashed rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.72);
}

.card-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.card-head h3,
.card-head h4,
.card-head p {
    margin: 0;
}

.card-head p {
    margin-top: 6px;
}

.section-action,
.card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    font-weight: 700;
    font-size: 0.86rem;
}

.section-action {
    padding: 6px 10px;
    border-radius: 12px;
    background: var(--theme-soft);
    color: var(--theme-strong);
    border: 1px solid rgba(79, 108, 255, 0.12);
}

.card-link {
    color: var(--theme-strong);
    margin-top: 2px;
}

.expiry-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 12px;
}

.expiry-card {
    display: grid;
    gap: 14px;
    border-top: 4px solid var(--doc-accent, var(--theme-color));
}

.expiry-card .section-label {
    color: var(--doc-accent, var(--theme-strong));
}

.mini-table {
    display: grid;
    gap: 8px;
}

.mini-row {
    display: grid;
    gap: 6px;
    padding: 11px 12px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 248, 255, 0.94));
    border: 1px solid var(--border);
}

.mini-row-top,
.mini-row-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.mini-row-meta {
    color: var(--muted);
    font-size: 0.9rem;
}

.upload-layout {
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    margin-top: 12px;
}

.upload-steps {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.upload-helper-text {
    margin: 2px 0 0;
}

.upload-step {
    display: grid;
    gap: 4px;
    padding: 11px 12px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 248, 255, 0.94));
    border: 1px solid var(--border);
}

.upload-step span {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.fetch-panel {
    display: grid;
    gap: 12px;
}

.fetch-inline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: end;
}

.fetch-inline .icon-button,
.fetch-inline button {
    width: 42px;
    height: 42px;
    min-width: 42px;
    padding: 0;
}

.fetch-status {
    padding: 10px 12px;
    border-radius: 14px;
    font-size: 0.92rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.88);
}

.fetch-status.loading {
    color: var(--info);
    background: var(--info-soft);
}

.fetch-status.success {
    color: var(--success);
    background: var(--success-soft);
}

.fetch-status.warning {
    color: #9a3412;
    background: #fff7ed;
}

.fetch-status.error {
    color: var(--danger);
    background: var(--danger-soft);
}

.reminder-board {
    display: grid;
    gap: 18px;
    grid-template-columns: 1.15fr .85fr;
}

.standalone .hero-panel,
.page-login .hero-panel,
.page-install .hero-panel {
    margin-bottom: 22px;
}

.print-template-page {
    background: linear-gradient(180deg, #eef4f8 0%, #ffffff 100%);
}

.print-template-wrap {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 18px 40px;
}

.print-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.print-template-card {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--shadow-md);
}

.print-template-card-default,
.print-template-card-single-record {
    page: print-portrait;
}

.print-template-card-compact-table {
    page: print-landscape;
}

.print-template-card-compact-table .print-template-header {
    margin-bottom: 18px;
}

.print-template-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.print-brand {
    display: flex;
    gap: 14px;
    align-items: center;
}

.print-brand-mark {
    width: 88px;
    height: 88px;
    border-radius: 20px;
    object-fit: contain;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    padding: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-color);
    flex: 0 0 auto;
}

.print-brand-mark svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.print-brand-copy h1,
.print-brand-copy h2,
.print-brand-copy h3,
.print-brand-copy p {
    margin: 0;
}

.print-brand-copy p + p {
    margin-top: 4px;
}

.print-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.print-record {
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    padding-top: 20px;
    margin-top: 20px;
    page-break-inside: avoid;
}

.print-record:first-of-type,
.print-record-single {
    border-top: 0;
    padding-top: 0;
    margin-top: 0;
}

.print-record-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.print-record-head h3,
.print-record-head p,
.print-section h4 {
    margin: 0;
}

.print-section {
    margin-bottom: 18px;
}

.print-section h4 {
    margin-bottom: 10px;
    font-size: 0.92rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.print-section-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.print-item {
    padding: 14px;
    border-radius: 16px;
    background: #f8fbfc;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.print-item strong {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.print-item span {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.45;
}

.print-compact-table {
    overflow-x: auto;
    overflow-y: visible;
}

.print-compact-table table {
    width: max-content;
    min-width: 100%;
    table-layout: auto;
}

.print-compact-table th,
.print-compact-table td {
    padding: 7px 8px;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
    line-height: 1.28;
    vertical-align: top;
}

.print-compact-table th {
    font-size: 0.76rem;
    letter-spacing: 0.04em;
}

.print-compact-table td {
    font-size: 0.84rem;
}

.print-row-number-cell {
    width: 44px;
    min-width: 44px;
    text-align: center;
}

.print-key-cell {
    font-weight: 700;
    background: #f8fbff;
}

.print-table-note {
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #f8fbff;
    border: 1px solid rgba(37, 99, 235, 0.14);
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.4;
}

.report-print-controls {
    margin-bottom: 16px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.report-print-controls-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.report-print-controls-head h4,
.report-print-controls-head p {
    margin: 0;
}

.report-print-control-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.report-print-control {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
}

.report-print-control input {
    margin-top: 3px;
}

.report-print-control span {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.report-print-control strong {
    font-size: 0.9rem;
}

.report-print-control small {
    color: var(--muted);
    line-height: 1.35;
}

.print-table-group {
    margin-top: 18px;
}

.print-table-group:first-of-type {
    margin-top: 0;
}

.print-table-group + .print-table-group {
    padding-top: 14px;
    border-top: 1px solid rgba(148, 163, 184, 0.45);
}

.print-table-group-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
}

.print-table-group-head h4,
.print-table-group-head p {
    margin: 0;
}

.print-table-group-head h4 {
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.print-table-group-head p {
    margin-top: 4px;
    font-size: 0.82rem;
    color: var(--muted);
}

.print-record-single .print-record-head {
    margin-bottom: 10px;
}

.print-record-single .print-section {
    margin-bottom: 12px;
}

.print-record-single .print-section-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.print-record-single .print-item {
    padding: 10px 12px;
    border-radius: 12px;
}

.print-record-single .print-item strong {
    margin-bottom: 4px;
    font-size: 0.7rem;
}

.print-record-single .print-item span {
    font-size: 0.9rem;
    line-height: 1.28;
}

.print-record-single .table-shell table {
    font-size: 0.86rem;
}

.print-record-single .table-shell th,
.print-record-single .table-shell td {
    padding: 6px 7px;
}

body.sidebar-collapsed .app-shell {
    grid-template-columns: 86px minmax(0, 1fr);
}

body.sidebar-collapsed .sidebar {
    padding-left: 12px;
    padding-right: 12px;
}

body.sidebar-collapsed .brand,
body.sidebar-collapsed .nav a,
body.sidebar-collapsed .user-chip,
body.sidebar-collapsed .logout-link {
    justify-content: center;
}

body.sidebar-collapsed .nav a,
body.sidebar-collapsed .user-chip,
body.sidebar-collapsed .logout-link {
    justify-self: center;
    width: 50px;
    min-width: 50px;
    padding: 8px;
}

body.sidebar-collapsed .nav {
    justify-items: center;
    padding-right: 0;
}

body.sidebar-collapsed .nav a:hover,
body.sidebar-collapsed .nav a.active {
    transform: none;
}

body.sidebar-collapsed .brand-copy,
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .sidebar-panel,
body.sidebar-collapsed .user-chip-label,
body.sidebar-collapsed .logout-label {
    display: none;
}

body.sidebar-collapsed .brand-logo {
    width: 42px;
    height: 42px;
}

.print-only {
    display: none;
}

.modal-backdrop[hidden] {
    display: none !important;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.44);
    backdrop-filter: blur(10px);
    z-index: 50;
}

.modal-card {
    width: min(1120px, 100%);
    max-height: calc(100vh - 36px);
    overflow: auto;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 22px;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.22);
    padding: 16px;
}

.modal-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.modal-head h3,
.modal-head p {
    margin: 0;
}

.bulk-review-modal {
    display: grid;
    gap: 12px;
}

.bulk-review-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.stat.compact {
    min-height: 0;
}

.bulk-review-registration-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bulk-review-form,
.backup-restore-form {
    display: grid;
    gap: 12px;
}

.bulk-review-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.bulk-review-toolbar > .fetch-status {
    flex: 1 1 320px;
}

.bulk-review-table-shell {
    max-height: 54vh;
}

.bulk-review-table th,
.bulk-review-table td {
    min-width: 124px;
}

.bulk-review-table td:first-child,
.bulk-review-table th:first-child,
.bulk-review-table td:nth-child(2),
.bulk-review-table th:nth-child(2) {
    min-width: 62px;
}

.bulk-review-table td:last-child,
.bulk-review-table th:last-child {
    min-width: 72px;
}

.bulk-review-table tr.is-unselected {
    opacity: 0.56;
}

.bulk-select-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.bulk-select-all input,
.bulk-review-table input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--theme-color);
    padding: 0;
}

.backup-note-card {
    display: grid;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 248, 255, 0.94));
    min-width: 0;
}

.backup-restore-grid {
    align-items: start;
}
.bulk-customer-resolution,
.bulk-customer-choice {
    display: grid;
    gap: 8px;
}

.bulk-customer-choice select {
    width: 100%;
}

.customer-detail-modal {
    display: grid;
    gap: 12px;
}

.customer-modal-summary {
    gap: 8px;
}

.customer-modal-toolbar {
    margin: 0;
}

.customer-linked-count {
    padding: 4px 7px;
    font-size: 0.72rem;
    min-width: 28px;
    justify-content: center;
}

.backup-restore-form textarea,
.page-bulk-upload textarea[readonly] {
    min-height: 84px;
}

.customer-modal-vehicle-table th,
.customer-modal-vehicle-table td {
    white-space: normal;
    word-break: break-word;
}

.register-detail-panel {
    margin-bottom: 14px;
}

.page-vehicles .summary-grid,
.page-vehicle-form .tab-bar,
.page-vehicle-register .tab-bar {
    margin-bottom: 20px;
}

.page-vehicle-form .split,
.page-vehicle-register .card + .card {
    margin-top: 10px;
}

.page-vehicle-form .document-grid,
.page-vehicle-register .document-grid {
    gap: 16px;
}

@media (max-width: 1360px) {
    .page-vehicle-form .split {
        grid-template-columns: 1fr;
    }

    .page-vehicle-form .document-grid,
    .page-vehicle-register .document-grid {
        grid-template-columns: 1fr;
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1180px) {
    .app-shell {
        grid-template-columns: 236px minmax(0, 1fr);
    }

    .hero-panel {
        grid-template-columns: minmax(0, 1.45fr) minmax(180px, 0.75fr);
    }

    .summary-grid,
    .expiry-grid,
    .grid.cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid.cols-3,
    .form-grid.cols-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .analytics-grid,
    .reminder-board,
    .split,
    .upload-layout,
    .chart-shell,
    .print-grid {
        grid-template-columns: 1fr;
    }

    .license-layout {
        grid-template-columns: 1fr;
    }

    .license-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .customer-filter-grid,
    .transfer-filter-grid,
    .vehicle-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .user-access-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sidebar {
        padding: 14px 12px;
    }

    .toolbar > .actions,
    .toolbar > .icon-actions,
    .toolbar > form {
        flex-basis: 100%;
        justify-content: flex-start;
    }

    .chart-ring {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 920px) {
    .app-shell,
    body.sidebar-collapsed .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        top: auto;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding: 12px;
        gap: 12px;
    }

    .brand-card {
        padding: 10px 12px;
    }

    .nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .settings-layout-top {
        grid-template-columns: 1fr;
    }

    .user-permission-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .user-access-form-grid {
        grid-template-columns: 1fr;
    }

    .nav a,
    body.sidebar-collapsed .nav a {
        justify-content: flex-start;
        padding: 8px 10px;
        min-height: 44px;
        width: auto;
        min-width: 0;
        justify-self: stretch;
    }

    .brand,
    body.sidebar-collapsed .brand {
        justify-content: flex-start;
    }

    .brand-copy,
    .nav-label,
    .user-chip-label,
    .logout-label,
    body.sidebar-collapsed .brand-copy,
    body.sidebar-collapsed .nav-label,
    body.sidebar-collapsed .user-chip-label,
    body.sidebar-collapsed .logout-label {
        display: block;
    }

    .sidebar-panel,
    .sidebar-footer,
    body.sidebar-collapsed .sidebar-panel {
        display: none;
    }

    .hero-panel,
    .login-shell,
    .reminder-board,
    .split,
    .upload-layout,
    .chart-shell,
    .print-grid {
        grid-template-columns: 1fr;
    }

    .summary-grid,
    .analytics-grid,
    .expiry-grid,
    .license-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .form-grid.cols-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .license-toolbar-actions {
        width: 100%;
    }

    .customer-toolbar-actions,
    .transfer-toolbar-actions {
        width: 100%;
    }

    .content-topbar,
    .content-footer,
    .card-head,
    .modal-head,
    .bulk-review-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-art {
        justify-items: start;
    }
}

@media (max-width: 760px) {
    .content,
    .standalone {
        padding: 14px 12px 18px;
    }

    .sidebar {
        padding: 10px;
    }

    .brand-logo {
        width: 42px;
        height: 42px;
        border-radius: 14px;
    }

    .nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-panel,
    .card {
        padding: 14px;
        border-radius: 18px;
    }

    .license-summary-grid,
    .license-filter-grid,
    .customer-filter-grid,
    .transfer-filter-grid,
    .vehicle-filter-grid {
        grid-template-columns: 1fr;
    }

    .settings-template-top-grid,
    .settings-template-grid,
    .user-permission-grid {
        grid-template-columns: 1fr;
    }

    .user-access-summary-grid {
        grid-template-columns: 1fr;
    }

    .print-template-wrap,
    .print-template-card {
        padding: 16px;
    }

    .modal-backdrop {
        padding: 12px;
        align-items: flex-start;
    }

    .modal-card {
        width: 100%;
        max-height: calc(100vh - 24px);
        padding: 14px;
        border-radius: 18px;
    }

    .bulk-review-summary-grid {
        grid-template-columns: 1fr;
    }

    .print-template-header,
    .print-toolbar,
    .print-grid,
    .print-record-head,
    .print-section-grid {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar-left {
        width: 100%;
        justify-content: space-between;
        gap: 10px;
    }

    .license-table,
    .customer-table,
    .transfer-table,
    .user-access-table {
        min-width: 0;
    }

    .license-table thead,
    .customer-table thead,
    .transfer-table thead,
    .user-access-table thead {
        display: none;
    }

    .license-table,
    .license-table tbody,
    .license-table tr,
    .license-table td,
    .customer-table,
    .customer-table tbody,
    .customer-table tr,
    .customer-table td,
    .transfer-table,
    .transfer-table tbody,
    .transfer-table tr,
    .transfer-table td,
    .user-access-table,
    .user-access-table tbody,
    .user-access-table tr,
    .user-access-table td {
        display: block;
        width: 100%;
    }

    .license-table tr,
    .customer-table tr,
    .transfer-table tr,
    .user-access-table tr {
        padding: 12px 12px 8px;
        border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    }

    .license-table td,
    .customer-table td,
    .transfer-table td,
    .user-access-table td {
        display: grid;
        grid-template-columns: minmax(92px, 112px) minmax(0, 1fr);
        gap: 8px;
        padding: 8px 0;
        border-bottom: 1px dashed rgba(15, 23, 42, 0.08);
        white-space: normal;
    }

    .license-table td::before,
    .customer-table td::before,
    .transfer-table td::before,
    .user-access-table td::before {
        content: attr(data-label);
        font-size: 0.72rem;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--muted);
    }

    .user-access-table td:last-child {
        border-bottom: 0;
    }

    .user-access-table td[data-label="Actions"] {
        grid-template-columns: 1fr;
        white-space: normal;
    }

    .user-access-table td[data-label="Actions"]::before {
        margin-bottom: 4px;
    }

    .user-access-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .license-table td:last-child,
    .customer-table td:last-child,
    .transfer-table td:last-child {
        border-bottom: 0;
    }

    .license-table td[data-label="Actions"],
    .customer-table td[data-label="Actions"],
    .transfer-table td[data-label="Actions"] {
        grid-template-columns: 1fr;
    }

    .license-table td[data-label="Actions"]::before,
    .customer-table td[data-label="Actions"]::before,
    .transfer-table td[data-label="Actions"]::before {
        margin-bottom: 4px;
    }

    .license-actions,
    .customer-actions,
    .transfer-actions {
        width: 100%;
    }

    .topbar-title {
        font-size: 1.02rem;
    }

    .summary-grid,
    .analytics-grid,
    .expiry-grid,
    .grid.cols-2,
    .grid.cols-3,
    .form-grid,
    .form-grid.cols-3,
    .document-grid,
    .split,
    .upload-layout,
    .chart-shell,
    .print-grid,
    .reminder-board {
        grid-template-columns: 1fr;
    }

    .tab-link {
        width: 100%;
        justify-content: flex-start;
    }

    .detail-chip {
        width: auto;
    }

    button,
    .button {
        width: auto;
        min-width: 0;
    }

    .fetch-inline {
        grid-template-columns: 1fr;
    }

    .fetch-inline .icon-button,
    .fetch-inline button {
        width: 100%;
        height: 40px;
    }

    .table-shell {
        border-radius: 16px;
    }

    th,
    td {
        padding: 10px 11px;
    }

    .chart-ring {
        width: 170px;
        height: 170px;
    }

    .chart-legend-item,
    .bar-row {
        padding: 9px 10px;
    }

    .toolbar,
    .content-topbar,
    .card-head {
        gap: 10px;
    }

    .toolbar form,
    .actions,
    .topbar-actions,
    .hero-actions,
    .footer-links,
    .mini-row-top,
    .mini-row-meta {
        width: 100%;
    }

    .toolbar form > *,
    .actions > *,
    .icon-actions > *,
    .topbar-actions > *,
    .hero-actions > *,
    .footer-links > * {
        flex: 1 1 calc(50% - 8px);
        min-width: 130px;
    }

    .settings-submit-actions {
        justify-content: stretch;
    }

    .message-action-form,
    .message-template-select {
        width: 100%;
        max-width: none;
    }

    .message-action-form {
        grid-template-columns: minmax(0, 1fr) repeat(2, 40px);
    }

    .toolbar > .actions,
    .toolbar > .icon-actions,
    .toolbar > form {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 520px) {
    .nav {
        grid-template-columns: 1fr;
    }

    .toolbar form > *,
    .actions > *,
    .icon-actions > *,
    .topbar-actions > *,
    .hero-actions > *,
    .footer-links > * {
        flex-basis: 100%;
        min-width: 0;
    }

    .settings-template-item {
        padding: 12px;
    }

    .topbar-left,
    .mini-row-top,
    .mini-row-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header h2 {
        font-size: 1.35rem;
    }

    .license-table td,
    .customer-table td,
    .transfer-table td,
    .user-access-table td {
        grid-template-columns: 1fr;
    }

    .message-action-form {
        grid-template-columns: 1fr 40px 40px;
    }

    .hero-panel,
    .card,
    .empty-state {
        border-radius: 16px;
    }

    .page-eyebrow {
        font-size: 0.76rem;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 10mm;
    }

    @page print-landscape {
        size: A4 landscape;
        margin: 7mm;
    }

    @page print-portrait {
        size: A4 portrait;
        margin: 10mm;
    }

    body {
        background: #fff;
    }

    body.print-template-page::before,
    body::before,
    .sidebar,
    .content-topbar,
    .page-header,
    .tab-bar,
    .toolbar form,
    .actions,
    .content-footer,
    .register-detail-panel,
    button,
    .button,
    .alert {
        display: none !important;
    }

    .app-shell {
        display: block;
    }

    .content,
    .print-template-wrap {
        padding: 0;
        max-width: none;
    }

    .card,
    .print-template-card,
    .table-shell {
        box-shadow: none;
        border: 1px solid #d0d7de;
    }

    .table-shell,
    .print-compact-table {
        overflow: visible !important;
    }

    .print-template-card {
        border: 0;
        padding: 0;
    }

    table {
        font-size: 9.5px;
    }

    th,
    td {
        padding: 6px 8px;
    }

    .print-template-card-compact-table .print-template-header {
        gap: 10px;
        margin-bottom: 10px;
    }

    .print-template-card-compact-table .print-brand {
        gap: 10px;
    }

    .print-template-card-compact-table .print-brand-mark {
        width: 52px;
        height: 52px;
        border-radius: 14px;
        padding: 6px;
    }

    .print-template-card-compact-table .print-brand-copy h2 {
        font-size: 17px;
        line-height: 1.12;
    }

    .print-template-card-compact-table .print-brand-copy p {
        font-size: 10.5px;
        line-height: 1.2;
    }

    .print-template-card-compact-table .kpi-list.small {
        gap: 4px;
    }

    .print-template-card-compact-table .badge {
        padding: 3px 7px;
        font-size: 10px;
    }

    .report-print-controls {
        display: none !important;
    }

    .print-template-card-compact-table .print-table-note {
        margin-bottom: 8px;
        padding: 6px 8px;
        font-size: 8px;
        line-height: 1.25;
    }

    .print-template-card-compact-table table {
        width: 100%;
        min-width: 0;
        font-size: 8.2px;
    }

    .print-template-card-compact-table th,
    .print-template-card-compact-table td {
        padding: 4px 5px;
        line-height: 1.2;
    }

    .print-template-card-compact-table th {
        font-size: 7.4px;
    }

    .print-template-card-compact-table .print-table-group {
        margin-top: 12px;
    }

    .print-template-card-compact-table .print-table-group + .print-table-group {
        padding-top: 10px;
    }

    .print-template-card-compact-table .print-table-group-head {
        gap: 8px;
        margin-bottom: 6px;
    }

    .print-template-card-compact-table .print-table-group-head h4 {
        font-size: 8.2px;
    }

    .print-template-card-compact-table .print-table-group-head p {
        font-size: 8px;
        margin-top: 2px;
    }

    .print-template-card-compact-table .print-key-cell {
        background: #f7fafc !important;
    }

    .print-template-card-compact-table .print-row-number-cell {
        width: 22px;
        min-width: 22px;
        padding-left: 3px;
        padding-right: 3px;
    }

    .print-record {
        page-break-after: always;
    }

    .print-record:last-child,
    .print-record-single {
        page-break-after: auto;
    }

    .print-record-single {
        page-break-inside: avoid;
    }

    .print-record-single .print-record-head {
        margin-bottom: 8px;
    }

    .print-record-single .print-section {
        margin-bottom: 8px;
    }

    .print-record-single .print-section h4 {
        margin-bottom: 6px;
        font-size: 0.74rem;
    }

    .print-record-single .print-section-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 5px;
    }

    .print-record-single .print-item {
        padding: 6px 7px;
        border-radius: 10px;
    }

    .print-record-single .print-item strong {
        margin-bottom: 2px;
        font-size: 0.6rem;
    }

    .print-record-single .print-item span {
        font-size: 0.74rem;
        line-height: 1.18;
    }

    .print-record-single .table-shell table {
        font-size: 8px;
    }

    .print-record-single .table-shell th,
    .print-record-single .table-shell td {
        padding: 4px 5px;
    }

    .print-only {
        display: block;
        margin-bottom: 14px;
    }

    .print-toolbar {
        display: none !important;
    }
}
