:root {
    --color-primary: #1f5eff;
    --color-primary-dark: #1747bf;
    --color-surface: #ffffff;
    --color-page: #f4f7fb;
    --color-border: #d8e0ec;
    --color-border-strong: #111111;
    --color-text: #1f2937;
    --color-muted: #6b7280;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.08);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
}

@page {
    size: A4 portrait;
    margin: 0;
}

body {
    font-family: "Google Sans", sans-serif;
    font-optical-sizing: auto;
    font-variation-settings: "GRAD" 0;
    background: var(--color-page);
    color: var(--color-text);
}

.workspace {
    min-height: 100vh;
    background: #eef3f7;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 64px;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #d4dde7;
    background: #f8fbfd;
}

.topbar__eyebrow {
    margin-bottom: 0.2rem;
    color: #687786;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.topbar h1,
.topbar h2,
.preview-heading h2 {
    margin: 0;
    color: #1e2933;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0;
}

.topbar__actions,
.section-title-row__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.workspace-grid {
    display: grid;
    grid-template-columns: minmax(340px, 390px) minmax(760px, 1fr);
    min-height: calc(100vh - 64px);
}

.editor-panel {
    height: calc(100vh - 64px);
    overflow: auto;
    padding: 1rem;
    border-right: 1px solid #cfd8e3;
    background: #f6f9fb;
}

.editor-section,
.admin-editor,
.employee-table-panel {
    margin-bottom: 0.9rem;
    padding: 1rem;
    border: 1px solid #ccd7e3;
    border-radius: 8px;
    background: #fdfefe;
}

.editor-section__label,
.panel-heading span {
    display: block;
    margin-bottom: 0.2rem;
    color: #718092;
    font-size: 0.72rem;
    font-weight: 700;
}

.editor-section h2,
.panel-heading strong {
    display: block;
    margin: 0 0 0.8rem;
    color: #202c38;
    font-size: 0.98rem;
    font-weight: 700;
}

.lookup-box {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 0.75rem;
    margin-bottom: 0.8rem;
}

.employee-status {
    display: block;
    margin-bottom: 1rem;
    padding: 1.6rem 2rem 1.75rem;
    border: 0;
    border-radius: 32px;
    background: #dcf5d4;
    color: #7a7f86;
}

.employee-status strong {
    display: inline-block;
    margin-top: 0.55rem;
    color: #123b63;
    font-size: clamp(3rem, 5vw, 4.4rem);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: 0;
}

.employee-status.is-found {
    background: #dcf5d4;
}

.employee-status__label {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
}

.employee-status__unit {
    display: inline-block;
    margin-left: 0.45rem;
    color: #123b63;
    font-size: clamp(2.1rem, 3.4vw, 3.2rem);
    font-weight: 700;
    line-height: 1;
}

.readonly-field {
    background: #edf2f6;
}

.section-title-row,
.panel-heading,
.preview-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.section-title-row h2 {
    margin-bottom: 0;
}

.claim-tabs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.45rem;
    margin: 0.85rem 0;
}

.claim-tab {
    min-height: 34px;
    border: 1px solid #aed0e4;
    border-radius: 6px;
    background: #e5f4fb;
    color: #263746;
    font-weight: 700;
}

.claim-tab.is-active {
    border-color: #0077ad;
    background: #0077ad;
    color: #f8fbfd;
}

.claim-card {
    display: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.claim-card.is-active {
    display: block;
}

.preview-panel {
    min-width: 0;
    padding: 1rem 1.25rem 1.5rem;
}

.preview-heading {
    margin-bottom: 0.8rem;
    color: #718092;
    font-size: 0.82rem;
}

.live-preview-surface {
    min-height: calc(100vh - 140px);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #c8d2dc;
    background: #cfd8e1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.print-sheet--preview {
    transform-origin: top center;
}

.signature-summary {
    display: grid;
    gap: 0.6rem;
}

.signature-summary div {
    padding: 0.7rem;
    border: 1px solid #d5dee8;
    border-radius: 8px;
    background: #f7fafc;
}

.signature-summary span,
.signature-summary strong {
    display: block;
}

.signature-summary span {
    color: #667789;
    font-size: 0.78rem;
}

.signature-summary strong {
    min-height: 20px;
    color: #1f2a35;
}

.workspace--admin {
    padding-bottom: 2rem;
}

.workspace--login {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 1rem;
}

.admin-login-panel {
    width: min(440px, 100%);
    padding: 1.25rem;
    border: 1px solid #ccd7e3;
    border-radius: 8px;
    background: #fdfefe;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.admin-login-panel h1 {
    margin: 0 0 0.5rem;
    color: #202c38;
    font-size: 1.25rem;
    font-weight: 700;
}

.admin-login-panel p {
    margin-bottom: 1rem;
    color: #667789;
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(320px, 520px) minmax(640px, 1fr);
    gap: 1rem;
    padding: 1rem;
}

.admin-editor {
    align-self: start;
}

.admin-editor__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.table-search {
    position: relative;
    min-width: 260px;
}

.table-search i {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: #758495;
}

.table-search input {
    width: 100%;
    min-height: 40px;
    padding: 0.45rem 0.8rem 0.45rem 2.3rem;
    border: 1px solid #cbd6e2;
    border-radius: 8px;
    background: #f8fbfd;
}

.employee-table {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.employee-table thead th {
    color: #526172;
    font-size: 0.76rem;
    white-space: nowrap;
}

.employee-table td {
    vertical-align: middle;
}

.claim-stack {
    display: grid;
    gap: var(--space-4);
}

.claim-card {
    border: 1px solid var(--color-border);
    padding: var(--space-4);
    background: #fbfdff;
}

.relation-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-4);
    padding-top: 0.35rem;
}

.form-control,
.input-group-text {
    min-height: 48px;
    border-radius: 14px;
}

.js-date-picker.input {
    padding-right: 3rem;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%231f5eff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    cursor: pointer;
}

.flatpickr-calendar {
    overflow: hidden;
    border: 1px solid rgba(216, 224, 236, 0.95);
    border-radius: 18px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
    font-family: "Google Sans", sans-serif;
}

.flatpickr-months {
    padding: 0.65rem 0.5rem 0.25rem;
    background: #f5f8ff;
}

.flatpickr-current-month,
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
    font-weight: 600;
}

.flatpickr-current-month .numInputWrapper {
    position: relative;
    margin-left: 0.5rem;
}

.flatpickr-current-month .numInputWrapper input.cur-year {
    color: transparent;
    caret-color: transparent;
}

.flatpickr-current-month .numInputWrapper::after {
    content: attr(data-buddhist-year);
    position: absolute;
    inset: 0 18px 0 0;
    display: flex;
    align-items: center;
    pointer-events: none;
    color: #172033;
    font-weight: 600;
}

.flatpickr-weekdays {
    background: #f5f8ff;
}

span.flatpickr-weekday {
    color: #64748b;
    font-weight: 600;
}

.flatpickr-day {
    border-radius: 10px;
}

.flatpickr-day:hover,
.flatpickr-day:focus {
    border-color: #e5ecff;
    background: #eaf0ff;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.today.selected {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #ffffff;
}

.flatpickr-day.today {
    border-color: var(--color-primary);
    color: var(--color-primary-dark);
}

textarea.form-control {
    min-height: 92px;
}

.btn-primary {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

.screen-toolbar {
    display: flex;
    gap: var(--space-3);
    justify-content: space-between;
    align-items: center;
    max-width: 210mm;
    margin: 0 auto;
    padding: var(--space-4);
}

.screen-toolbar__title {
    font-size: 1.1rem;
    font-weight: 700;
}

.screen-toolbar__actions {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin-left: auto;
}

.live-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    padding: 0 0.5rem;
}

.live-preview-title {
    margin: 0 0 0.35rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.live-preview-surface {
    overflow: auto;
    padding: 2rem;
    border-radius: 32px;
    border: 1px solid rgba(216, 224, 236, 0.9);
    background:
        radial-gradient(circle at top left, rgba(31, 94, 255, 0.08), transparent 30%),
        linear-gradient(180deg, #f8fbff 0%, #eef3f9 100%);
    box-shadow: var(--shadow-soft);
}

.print-page-wrapper {
    padding: var(--space-4) 0 var(--space-6);
}

.print-sheet {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    background: #ffffff;
    color: #172033;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12);
    padding: 8mm;
    border: 1px solid #cbd5e1;
    font-family: "Google Sans", sans-serif;
    font-optical-sizing: auto;
    font-variation-settings: "GRAD" 0;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.print-sheet--preview {
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
}

.print-company-row,
.print-title-box,
.print-date-row,
.print-footer-row {
    border-bottom: 1px solid #cbd5e1;
}

.print-company-row {
    padding: 7px 18px;
    font-size: 16px;
    font-weight: 700;
    color: #173b72;
    background: #eef4fc;
    border-left: 4px solid #1f5eff;
}

.print-title-box {
    text-align: center;
    padding: 10px 12px 12px;
    border-bottom: 2px solid #173b72;
    background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
}

.print-title-th {
    font-size: 18px;
    font-weight: 700;
    color: #142d55;
}

.print-title-en {
    font-size: 13px;
    margin-top: 6px;
    color: #637083;
    letter-spacing: 0.02em;
}

.print-date-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    font-size: 14px;
    background: #f8fafc;
}

.print-line-value {
    border-bottom: 1px solid #718096;
    min-width: 150px;
    min-height: 24px;
    display: inline-flex;
    justify-content: center;
    align-items: flex-end;
    padding: 0 6px 2px;
}

.print-intro {
    padding: 10px 0 6px;
}

.manager-line {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.65;
    margin-bottom: 14px;
    padding-left: 0;
    border-left: 0;
    color: #243b5a;
}

.employee-meta {
    display: grid;
    grid-template-columns: 1.15fr 0.9fr 0.9fr;
    gap: 10px;
    align-items: start;
    margin-bottom: 14px;
}

.employee-meta--secondary {
    grid-template-columns: 1fr 1fr;
    max-width: 100%;
}

.meta-item {
    display: grid;
    grid-template-columns: max-content minmax(40px, 1fr);
    grid-template-rows: 20px 14px;
    align-items: end;
    column-gap: 6px;
    font-size: 13px;
}

.meta-label {
    font-weight: 700;
    line-height: 20px;
}

.meta-line {
    border-bottom: 1px solid #94a3b8;
    min-height: 20px;
    padding: 0 4px 1px;
    color: #172033;
    font-size: 14px;
    font-weight: 700;
    line-height: 18px;
}

.meta-sub {
    grid-column: 1 / -1;
    font-size: 11px;
    line-height: 14px;
    color: #64748b;
    padding-left: 2px;
}

.intro-text {
    margin-bottom: 6px;
    font-size: 12.75px;
    line-height: 1.6;
}

.claim-print-table,
.signature-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

.claim-print-table th,
.claim-print-table td,
.signature-table th,
.signature-table td {
    border: 1px solid #aeb9c8;
}

.claim-print-table thead th {
    text-align: left;
    padding: 8px 6px;
    font-size: 12px;
    font-weight: 700;
    vertical-align: middle;
    color: #ffffff;
    background: #173b72;
}

.claim-print-table thead span,
.signature-table th span {
    font-weight: 500;
    opacity: 0.88;
}

.claim-print-table thead .table-heading-primary,
.claim-print-table thead .table-heading-secondary {
    display: block;
    white-space: nowrap;
    line-height: 1.25;
}

.claim-print-table thead .table-heading-primary {
    font-weight: 700;
    opacity: 1;
}

.claim-print-table thead .table-heading-secondary {
    margin-top: 2px;
    font-size: 10.5px;
}

.claim-print-table td {
    font-size: 12.75px;
    padding: 6px 8px;
    vertical-align: top;
    height: 58px;
    background: #ffffff;
}

.claim-print-table tbody tr:not(.grand-total-row) td:nth-child(1),
.claim-print-table tbody tr:not(.grand-total-row) td:nth-child(2),
.claim-print-table tbody tr:not(.grand-total-row) td:nth-child(4) {
    text-align: center;
    vertical-align: middle;
}

.claim-print-table .amount-cell {
    text-align: right;
    vertical-align: middle;
    font-size: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.claim-print-table tbody tr:nth-child(even):not(.grand-total-row) td {
    background: #f8fafc;
}

.col-date { width: 12%; }
.col-hospital { width: 18%; }
.col-patient { width: 29%; }
.col-disease { width: 20%; }
.col-amount { width: 21%; }

.patient-cell {
    text-align: left;
}

.patient-field + .patient-field {
    margin-top: 10px;
}

.patient-label {
    display: block;
    color: #34445b;
    font-size: 10.5px;
    line-height: 1.35;
}

.patient-value {
    display: block;
    min-height: 19px;
    padding-top: 1px;
    border-bottom: 0;
    color: #172033;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

.grand-total-row td {
    height: auto;
    font-weight: 700;
    padding-top: 10px;
    padding-bottom: 10px;
    color: #142d55;
    background: #eaf1fb;
}

.print-sheet.claim-count-4 .claim-print-table tbody tr:not(.grand-total-row) td {
    height: 42px;
    padding-top: 4px;
    padding-bottom: 4px;
}

.print-sheet.claim-count-5 .claim-print-table tbody tr:not(.grand-total-row) td {
    height: 34px;
    padding-top: 3px;
    padding-bottom: 3px;
    font-size: 10.5px;
}

.print-sheet.claim-count-5 .patient-name {
    min-height: 16px;
}

.print-sheet.claim-count-5 .patient-label {
    font-size: 9.5px;
}

.print-sheet.claim-count-5 .patient-value {
    font-size: 12px;
}

.certify-block {
    padding: 8px 18px 4px;
    text-align: left;
    color: #34445b;
    background: #f8fafc;
    border-bottom: 1px solid #d7dee8;
}

.certify-block p {
    margin-bottom: 4px;
    font-size: 12px;
    line-height: 1.4;
}

.signature-table {
    table-layout: fixed;
    margin-top: auto;
}

.signature-table th {
    font-size: 12px;
    text-align: center;
    vertical-align: middle;
    padding: 8px 6px;
    width: 20%;
    height: 48px;
    color: #18365f;
    background: #eaf1fb;
}

.signature-table td {
    height: 92px;
    font-size: 12px;
    text-align: center;
    vertical-align: bottom;
    padding: 8px 8px 12px;
}

.signature-line {
    display: block;
    width: 100%;
    margin-bottom: 7px;
    border-top: 1px dotted #526174;
}

.signature-name {
    display: block;
    min-height: 16px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.print-footer-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 38px;
    padding: 0 18px;
    margin-top: 8px;
    font-size: 12px;
    color: #64748b;
    border-top: 1px solid #d7dee8;
    border-bottom: 0;
}

@media (max-width: 991.98px) {
    .topbar {
        position: static;
        align-items: flex-start;
        flex-direction: column;
    }

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

    .editor-panel {
        height: auto;
        max-height: none;
        border-right: 0;
        border-bottom: 1px solid #cfd8e3;
    }

    .preview-panel {
        overflow-x: auto;
    }

    .screen-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .print-page-wrapper {
        padding: var(--space-3);
        overflow-x: auto;
    }
}

@media (max-width: 575.98px) {
    .lookup-box,
    .employee-status,
    .section-title-row,
    .panel-heading,
    .preview-heading {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .lookup-box,
    .employee-status {
        display: grid;
    }

    .claim-tabs {
        grid-template-columns: repeat(3, 1fr);
    }

    .live-preview-surface {
        padding: 0.75rem;
    }

    .live-preview-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

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

    html,
    body {
        width: 210mm;
        min-height: 297mm;
        background: #ffffff;
    }

    .no-print {
        display: none !important;
    }

    .workspace,
    .workspace-grid,
    .preview-panel,
    .live-preview-surface {
        display: block;
        width: 210mm;
        min-height: 297mm;
        margin: 0;
        padding: 0;
        overflow: visible;
        background: #ffffff;
        border: 0;
        box-shadow: none;
    }

    .print-page-wrapper {
        padding: 0;
    }

    .print-sheet {
        width: 210mm;
        min-height: 297mm;
        margin: 0;
        box-shadow: none;
        border: 1px solid #cbd5e1;
    }

    .print-sheet--preview {
        transform: none;
    }
}

/* Workspace overrides kept last so the new split editor wins over the earlier card layout. */
.workspace .live-preview-surface {
    min-height: calc(100vh - 140px);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #c8d2dc;
    background: #cfd8e1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.workspace .claim-card {
    display: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.workspace .claim-card.is-active {
    display: block;
}

.workspace .form-control,
.workspace .input-group-text {
    min-height: 44px;
    border-radius: 8px;
}

.workspace textarea.form-control {
    min-height: 104px;
}

/* Modern product UI polish */
:root {
    --app-ink: oklch(27% 0.045 252);
    --app-muted: oklch(51% 0.035 250);
    --app-shell: oklch(96.5% 0.014 235);
    --app-panel: oklch(99% 0.006 235);
    --app-line: oklch(88% 0.025 240);
    --app-blue: oklch(56% 0.18 255);
    --app-blue-strong: oklch(48% 0.2 255);
    --app-mint: oklch(91% 0.09 142);
    --app-mint-soft: oklch(95% 0.055 142);
    --app-danger: oklch(55% 0.18 28);
}

body {
    color: var(--app-ink);
    background: var(--app-shell);
}

.workspace {
    background:
        linear-gradient(180deg, oklch(98% 0.01 230) 0%, var(--app-shell) 38%, oklch(94% 0.018 235) 100%);
}

.topbar {
    min-height: 68px;
    border-bottom-color: var(--app-line);
    background: color-mix(in oklch, var(--app-panel) 88%, oklch(95% 0.03 240));
    box-shadow: 0 1px 0 oklch(100% 0 0 / 0.72), 0 10px 30px oklch(35% 0.04 250 / 0.08);
}

.topbar__eyebrow,
.editor-section__label,
.panel-heading span {
    color: var(--app-blue-strong);
    letter-spacing: 0.055em;
}

.topbar h1,
.topbar h2,
.preview-heading h2,
.editor-section h2,
.panel-heading strong {
    color: var(--app-ink);
}

.workspace-grid {
    grid-template-columns: minmax(390px, 440px) minmax(720px, 1fr);
}

.editor-panel {
    padding: 1.1rem;
    border-right-color: var(--app-line);
    background: oklch(97% 0.012 235);
    scrollbar-color: oklch(68% 0.035 245) transparent;
}

.editor-section,
.admin-editor,
.employee-table-panel,
.admin-login-panel {
    border-color: var(--app-line);
    border-radius: 18px;
    background: var(--app-panel);
    box-shadow: 0 16px 42px oklch(38% 0.04 250 / 0.08), inset 0 1px 0 oklch(100% 0 0 / 0.85);
}

.lookup-box {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.85rem;
}

.workspace .form-control,
.workspace .input-group-text,
.form-control,
.input-group-text {
    min-height: 46px;
    border-color: oklch(86% 0.026 240);
    border-radius: 12px;
    background-color: oklch(99.2% 0.004 235);
    color: var(--app-ink);
    box-shadow: inset 0 1px 2px oklch(40% 0.04 250 / 0.04);
}

.workspace .form-control:focus,
.form-control:focus {
    border-color: var(--app-blue);
    box-shadow: 0 0 0 4px color-mix(in oklch, var(--app-blue) 18%, transparent);
}

.readonly-field {
    background: oklch(95.5% 0.012 235);
    color: oklch(39% 0.035 250);
}

.btn {
    border-radius: 12px;
    font-weight: 650;
}

.btn-primary {
    border-color: var(--app-blue);
    background: var(--app-blue);
    box-shadow: 0 10px 24px color-mix(in oklch, var(--app-blue) 28%, transparent);
}

.btn-primary:hover,
.btn-primary:focus {
    border-color: var(--app-blue-strong);
    background: var(--app-blue-strong);
}

.btn-outline-primary {
    border-color: color-mix(in oklch, var(--app-blue) 72%, oklch(100% 0 0));
    color: var(--app-blue-strong);
    background: oklch(99% 0.006 240);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    border-color: var(--app-blue);
    background: color-mix(in oklch, var(--app-blue) 12%, oklch(100% 0 0));
    color: var(--app-blue-strong);
}

.btn-outline-danger {
    border-color: color-mix(in oklch, var(--app-danger) 48%, oklch(100% 0 0));
    color: var(--app-danger);
}

.employee-status {
    position: relative;
    overflow: hidden;
    padding: 1.35rem 1.45rem 1.45rem;
    border: 1px solid oklch(84% 0.08 144);
    border-radius: 28px;
    background: linear-gradient(145deg, var(--app-mint) 0%, var(--app-mint-soft) 100%);
    box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.76), 0 14px 30px oklch(58% 0.08 145 / 0.18);
}

.employee-status::after {
    content: "";
    position: absolute;
    right: -3.5rem;
    bottom: -4.25rem;
    width: 9rem;
    height: 9rem;
    border-radius: 50%;
    background: oklch(100% 0 0 / 0.32);
    pointer-events: none;
}

.employee-status__label {
    color: oklch(49% 0.025 145);
    font-size: 1rem;
}

.employee-status__value {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    min-width: 0;
    margin-top: 0.45rem;
    flex-wrap: wrap;
}

.employee-status strong {
    margin-top: 0;
    max-width: 100%;
    color: oklch(28% 0.09 252);
    font-size: clamp(2.55rem, 10vw, 3.65rem);
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.employee-status__unit {
    margin-left: 0;
    color: oklch(28% 0.09 252);
    font-size: clamp(1.55rem, 5.4vw, 2.25rem);
}

.claim-tab {
    border-color: oklch(82% 0.055 235);
    border-radius: 10px;
    background: oklch(95.5% 0.027 235);
}

.claim-tab.is-active {
    border-color: var(--app-blue);
    background: var(--app-blue);
}

.signature-summary div {
    border-color: var(--app-line);
    border-radius: 14px;
    background: oklch(97.8% 0.009 235);
}

.preview-panel {
    background: oklch(94.6% 0.018 235);
}

.workspace .live-preview-surface {
    border-color: oklch(83% 0.025 240);
    border-radius: 18px;
    background:
        linear-gradient(180deg, oklch(90% 0.018 235), oklch(85% 0.018 235));
    box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.7);
}

.print-sheet {
    border-color: oklch(83% 0.025 240);
    box-shadow: 0 18px 55px oklch(35% 0.04 250 / 0.16);
}

@media (max-width: 575.98px) {
    .employee-status {
        padding: 1.2rem;
        border-radius: 22px;
    }

    .employee-status strong {
        font-size: clamp(2.25rem, 18vw, 3rem);
    }
}

.employee-status__value {
    display: block;
    gap: 0;
}

.employee-status__unit {
    display: block;
    margin-left: 0;
    margin-top: 0.2rem;
    font-size: clamp(1.75rem, 6vw, 2.55rem);
    font-weight: 700;
}

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

    html,
    body {
        width: 210mm !important;
        height: 297mm !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        background: #ffffff !important;
    }

    .no-print,
    .topbar,
    .editor-panel,
    .preview-heading {
        display: none !important;
    }

    .workspace,
    .workspace-grid,
    .preview-panel,
    .workspace .live-preview-surface {
        display: block !important;
        width: 210mm !important;
        height: 297mm !important;
        min-height: 0 !important;
        max-height: 297mm !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: #ffffff !important;
        box-shadow: none !important;
    }

    .print-sheet,
    .print-sheet--preview {
        width: 210mm !important;
        height: 297mm !important;
        min-height: 0 !important;
        max-height: 297mm !important;
        margin: 0 !important;
        padding: 7mm !important;
        overflow: hidden !important;
        border: 0 !important;
        box-shadow: none !important;
        page-break-before: avoid !important;
        page-break-after: avoid !important;
        break-before: avoid !important;
        break-after: avoid !important;
        transform: none !important;
    }

    .print-company-row {
        padding: 6px 16px !important;
    }

    .print-title-box {
        padding: 8px 12px 9px !important;
    }

    .print-date-row {
        padding: 5px 16px !important;
    }

    .print-intro {
        padding: 8px 0 5px !important;
    }

    .manager-line,
    .employee-meta {
        margin-bottom: 10px !important;
    }

    .claim-print-table thead th {
        padding: 6px !important;
    }

    .claim-print-table td {
        height: 48px !important;
        padding: 5px 7px !important;
    }

    .grand-total-row td {
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }

    .certify-block {
        padding: 7px 16px 3px !important;
    }

    .signature-table td {
        height: 74px !important;
        padding: 7px 8px 10px !important;
    }

    .signature-table th {
        height: 42px !important;
        padding: 7px 6px !important;
    }

    .print-footer-row {
        min-height: 28px !important;
        margin-top: 6px !important;
        padding: 0 16px !important;
    }
}
