:root {
    --fp-radius: 8px;
    --fp-primary: #4f46e5;
    --fp-primary-dark: #4338ca;
    --fp-ink: #151b3d;
    --fp-muted: #73799a;
    --fp-line: #e6e9f5;
    --fp-soft: #f7f8fd;
}

.d-none {
    display: none !important;
}

.collapse:not(.show) {
    display: none !important;
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1100;
    min-width: 220px;
    padding: 8px;
    margin-top: 6px;
    color: var(--fp-ink);
    background: #fff;
    border: 1px solid var(--fp-line);
    border-radius: 10px;
    box-shadow: 0 18px 45px rgba(24, 32, 56, 0.16);
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu-end {
    right: 0;
    left: auto;
}

.dropdown-item {
    display: block;
    width: 100%;
    min-height: 34px;
    padding: 7px 10px;
    color: var(--fp-ink);
    text-align: left;
    text-decoration: none;
    background: transparent;
    border: 0;
    border-radius: 8px;
}

.dropdown-item:hover,
.dropdown-item:focus {
    color: var(--fp-primary);
    background: #f0efff;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1050;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 24px;
}

.modal.show {
    display: block;
}

.modal-open {
    overflow: hidden;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(15, 23, 42, 0.45);
}

.modal.show .modal-dialog {
    position: relative;
    z-index: 1055;
    width: min(560px, 100%);
    margin: 32px auto;
}

body {
    color: var(--fp-ink);
    background: var(--fp-soft);
}

i[data-lucide] {
    display: inline-block;
    width: 19px;
    height: 19px;
    overflow: hidden;
    vertical-align: middle;
}

.app-body {
    min-height: 100vh;
    background: #f8f9fd;
}

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    display: flex;
    width: 270px;
    flex-direction: column;
    gap: 22px;
    padding: 22px 18px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: rgba(255, 255, 255, 0.92);
    border-right: 1px solid var(--fp-line);
    box-shadow: 12px 0 30px rgba(35, 40, 80, 0.04);
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    color: var(--fp-ink);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 800;
}

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #4f46e5, #6d5dfc);
    border-radius: 12px;
}

.brand-mark svg,
.side-nav svg,
.theme-toggle svg,
.icon-btn svg {
    width: 19px;
    height: 19px;
    stroke-width: 2.2;
}

.new-repair-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--fp-primary), #6d5dfc);
    box-shadow: 0 12px 22px rgba(79, 70, 229, 0.22);
    font-weight: 700;
}

.side-nav {
    display: grid;
    gap: 8px;
}

.side-nav a,
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 14px;
    color: #606783;
    text-decoration: none;
    border-radius: 11px;
    font-weight: 650;
}

.side-nav a:hover,
.side-nav a:focus,
.theme-toggle:hover {
    color: var(--fp-primary);
    background: #f0efff;
}

.theme-toggle {
    margin-top: auto;
    border: 1px solid var(--fp-line);
    background: #fff;
}

.theme-toggle svg:last-child {
    margin-left: auto;
}

.app-shell {
    min-height: 100vh;
    margin-left: 270px;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 78px;
    padding: 14px 32px;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--fp-line);
    backdrop-filter: blur(12px);
}

.top-search {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(620px, 100%);
    min-height: 50px;
    padding: 0 14px;
    background: #fff;
    border: 1px solid #dfe3f1;
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(35, 40, 80, 0.04);
}

.top-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--fp-ink);
}

.top-search kbd {
    color: #73799a;
    background: #f4f6fb;
    border: 1px solid #e1e5f0;
    box-shadow: none;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-btn {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    color: var(--fp-primary);
    background: #fff;
    border: 1px solid var(--fp-line);
    border-radius: 12px;
    text-decoration: none;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--fp-ink);
}

.user-menu strong,
.user-menu small {
    display: block;
    line-height: 1.2;
}

.user-menu small {
    color: var(--fp-muted);
}

.avatar {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #0ea5e9, #4f46e5);
    border-radius: 50%;
    font-weight: 800;
}

.app-main {
    padding: 28px 32px 88px;
}

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

.page-heading h1 {
    margin: 0;
    color: var(--fp-ink);
    font-size: 1.45rem;
    font-weight: 850;
    letter-spacing: 0;
}

.page-heading p {
    margin: 6px 0 0;
    color: var(--fp-muted);
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.page-actions .btn,
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    border-radius: 10px;
    font-weight: 750;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(13, 110, 253, 0.12), rgba(25, 135, 84, 0.08)),
        #f6f8fb;
}

.auth-card {
    width: min(100%, 460px);
    border-radius: var(--fp-radius);
    padding: 28px;
}

.installer-card {
    width: min(100%, 820px);
}

.content-panel,
.metric {
    border-radius: 14px;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--fp-line);
}

.content-panel,
.metric,
.service-box {
    border-color: var(--fp-line) !important;
    box-shadow: 0 14px 35px rgba(35, 40, 80, 0.06) !important;
}

.metric {
    display: grid;
    gap: 8px;
    min-height: 118px;
    position: relative;
    overflow: hidden;
}

.metric span {
    color: #6b7280;
    font-size: 0.92rem;
}

.metric strong {
    font-size: clamp(1.7rem, 4vw, 2.35rem);
    line-height: 1;
}

.metric svg {
    width: 22px;
    height: 22px;
    color: var(--fp-primary);
}

.mini-metric {
    min-height: 96px;
    padding: 16px;
}

.mini-metric strong {
    font-size: 1.45rem;
}

.panel-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.soft-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    color: var(--fp-primary);
    background: #f0efff;
    border: 1px solid #dedbff;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
}

.app-table-wrap {
    border: 1px solid var(--fp-line);
    border-radius: 12px;
}

.app-table-wrap .table {
    margin-bottom: 0;
}

.app-table-wrap thead th {
    color: #68708f;
    background: #f8f9fd;
    border-bottom-color: var(--fp-line);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.app-table-wrap tbody tr:last-child td {
    border-bottom: 0;
}

.app-modal {
    border: 1px solid var(--fp-line);
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(35, 40, 80, 0.18);
}

.segmented-control {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 5px;
    background: #f6f7fb;
    border: 1px solid var(--fp-line);
    border-radius: 12px;
}

.segmented-control .btn {
    min-height: 38px;
    color: #606783;
    border: 0;
    border-radius: 9px;
    font-weight: 750;
}

.segmented-control .btn-check:checked + .btn {
    color: #fff;
    background: var(--fp-primary);
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.2);
}

.consent-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.consent-options .form-check {
    min-height: 42px;
    padding: 10px 14px 10px 38px;
    background: #f8f9fd;
    border: 1px solid var(--fp-line);
    border-radius: 10px;
}

.consent-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.consent-badges span {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    padding: 0 8px;
    color: #8a91a9;
    background: #f2f4f8;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
}

.consent-badges span.is-on {
    color: #0f766e;
    background: #dff8f3;
}

.warehouse-adjust-form {
    display: grid;
    grid-template-columns: minmax(105px, 0.8fr) minmax(80px, 0.7fr) auto;
    gap: 8px;
    min-width: 290px;
}

.warehouse-adjust-form .btn {
    white-space: nowrap;
}

.navbar-brand {
    letter-spacing: 0;
}

.table > :not(caption) > * > * {
    padding: 0.9rem 0.75rem;
}

.timeline {
    display: grid;
    gap: 14px;
}

.timeline-item {
    border-left: 3px solid #0d6efd;
    padding-left: 12px;
}

.repair-workspace {
    max-width: 1680px;
    margin: 0 auto;
}

.repair-crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.88rem;
    align-items: center;
}

.repair-crumbs a,
.repair-crumbs span,
.repair-crumbs strong {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    color: #606783;
    text-decoration: none;
    background: #fff;
    border: 1px solid var(--fp-line);
    border-radius: 999px;
    box-shadow: 0 8px 18px rgba(35, 40, 80, 0.04);
    font-weight: 750;
}

.repair-crumbs a::after,
.repair-crumbs span::after {
    content: "";
    position: absolute;
    right: -8px;
    width: 8px;
    height: 1px;
    background: #cfd5e6;
}

.repair-crumbs strong {
    color: #fff;
    background: var(--fp-primary);
    border-color: var(--fp-primary);
    font-weight: 700;
}

.repair-crumbs a:hover {
    color: var(--fp-primary);
    background: #f0efff;
}

.service-box {
    padding: 22px;
    margin-bottom: 20px;
    background: #fff;
    border: 1px solid var(--fp-line);
    border-radius: 14px;
}

.service-box .form-label {
    margin-bottom: 6px;
    color: #111827;
    font-size: 0.85rem;
    font-weight: 700;
}

.repair-stepper {
    counter-reset: repair-step;
}

.repair-stepper.row {
    display: block;
}

.repair-stepper > [class*="col-"] {
    display: contents;
}

.repair-step {
    position: relative;
    display: none;
    max-width: 1040px;
    margin-right: auto;
    margin-left: auto;
}

.repair-step.is-active {
    display: block;
}

.repair-step-progress {
    display: none;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    max-width: 1040px;
    margin: 0 auto 20px;
}

.repair-step-progress button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    color: #606783;
    background: #fff;
    border: 1px solid var(--fp-line);
    border-radius: 12px;
    font-weight: 800;
}

.repair-step-progress button span {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    color: var(--fp-primary);
    background: #f0efff;
    border-radius: 8px;
}

.repair-step-progress button.is-active {
    color: #fff;
    background: var(--fp-primary);
    border-color: var(--fp-primary);
    box-shadow: 0 12px 22px rgba(79, 70, 229, 0.18);
}

.repair-step-progress button.is-active span {
    color: var(--fp-primary);
    background: #fff;
}

.page-heading [form="repairForm"] {
    display: none;
}

.photo-upload-grid + .form-label,
.photo-upload-grid + .form-label + input[name="photo_link"] {
    display: none;
}

form:has(input[name="action"][value="save_system_settings"]) {
    display: none !important;
}

.step-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--fp-line);
}

.step-heading > span {
    display: none;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #fff;
    background: var(--fp-primary);
    border-radius: 10px;
    font-weight: 850;
}

.step-heading h2 {
    margin: 0;
    font-size: 1.03rem;
    font-weight: 850;
}

.step-heading p {
    margin: 4px 0 0;
    color: var(--fp-muted);
}

.warranty-check {
    min-height: 44px;
    padding: 10px 14px 10px 38px;
    background: #f8f9fd;
    border: 1px solid var(--fp-line);
    border-radius: 10px;
}

.accessory-editor {
    display: grid;
    gap: 12px;
}

.accessory-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.65fr);
    gap: 12px;
}

.accessory-list {
    display: grid;
    gap: 10px;
}

.accessory-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: #f8f9fd;
    border: 1px solid var(--fp-line);
    border-radius: 10px;
}

.accessory-item span {
    color: var(--fp-muted);
}

.photo-upload-grid,
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.photo-upload {
    display: grid;
    gap: 8px;
    padding: 12px;
    background: #f8f9fd;
    border: 1px dashed #cfd5e6;
    border-radius: 12px;
}

.photo-upload span,
.photo-thumb span {
    color: var(--fp-ink);
    font-weight: 800;
}

.photo-thumb {
    display: grid;
    gap: 8px;
    padding: 10px;
    color: var(--fp-ink);
    text-decoration: none;
    background: #fff;
    border: 1px solid var(--fp-line);
    border-radius: 12px;
}

.photo-thumb img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    background: #f3f4f6;
}

.repair-form .form-control,
.repair-form .form-select,
.repair-form .input-group-text {
    min-height: 42px;
    border-color: #dfe3f1;
    border-radius: 9px;
}

.repair-form .input-group-text {
    min-width: 48px;
    justify-content: center;
    background: #f6f7fb;
    color: #4b5563;
    font-weight: 700;
}

.repair-form .input-group .btn {
    border-color: #dfe3f1;
    font-weight: 750;
}

.repair-form .large-textarea {
    min-height: 180px;
    resize: vertical;
}

.deposit-input {
    max-width: 220px;
}

.sticky-savebar {
    position: sticky;
    bottom: 0;
    z-index: 10;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin: 24px -32px -88px;
    padding: 14px 32px;
    background: rgba(255, 255, 255, 0.9);
    border-top: 1px solid var(--fp-line);
    backdrop-filter: blur(12px);
}

.repair-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.repair-tabs a {
    min-height: 40px;
    padding: 10px 16px;
    color: #606783;
    text-decoration: none;
    background: #fff;
    border: 1px solid var(--fp-line);
    border-radius: 10px;
    font-weight: 750;
}

.repair-tabs a.active,
.repair-tabs a:hover {
    color: var(--fp-primary);
    background: #f0efff;
}

.repair-tab-host {
    margin-bottom: 24px;
}

.repair-tab-host > .content-panel {
    margin-bottom: 0;
}

.details-grid {
    display: grid;
    grid-template-columns: minmax(160px, 40%) 1fr;
    margin: 0;
    border: 1px solid var(--fp-line);
    border-radius: 12px;
    overflow: hidden;
}

.details-grid dt,
.details-grid dd {
    min-height: 38px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--fp-line);
}

.details-grid dt {
    color: #68708f;
    background: #f8f9fd;
    font-weight: 750;
    text-align: right;
}

.details-grid dd {
    margin: 0;
    background: #fff;
}

.details-grid dt:nth-last-child(2),
.details-grid dd:last-child {
    border-bottom: 0;
}

.details-grid.compact {
    grid-template-columns: minmax(160px, 46%) 1fr;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 850;
}

.status-active {
    color: #1d4ed8;
    background: #dbeafe;
}

.status-waiting {
    color: #92400e;
    background: #fef3c7;
}

.status-ready {
    color: #047857;
    background: #d1fae5;
}

.status-done {
    color: #166534;
    background: #dcfce7;
}

.status-cancelled {
    color: #b91c1c;
    background: #fee2e2;
}

.problem-panel {
    border-color: #bfdfb1 !important;
}

.problem-panel .panel-title-row {
    color: #166534;
}

.problem-panel h3 {
    margin: 0 0 8px;
    font-size: 0.95rem;
    font-weight: 850;
}

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

.action-list {
    display: grid;
    gap: 12px;
}

.action-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    background: #f8f9fd;
    border: 1px solid var(--fp-line);
    border-radius: 12px;
}

.action-item strong {
    display: block;
    margin-bottom: 4px;
    color: var(--fp-ink);
}

.action-item p {
    margin: 0 0 6px;
    color: #606783;
}

.action-item small {
    color: #8a91a9;
}

.code-preview {
    display: grid;
    min-height: 150px;
    place-items: center;
    color: #111827;
    background: #fff;
    border: 1px solid var(--fp-line);
    border-radius: 12px;
    font-weight: 900;
    text-decoration: none;
}

.code-preview img {
    max-width: 100%;
    max-height: 170px;
    object-fit: contain;
}

.action-menu {
    min-width: 310px;
    padding: 8px;
    border: 1px solid var(--fp-line);
    border-radius: 12px;
    box-shadow: 0 18px 48px rgba(35, 40, 80, 0.16);
}

.action-menu .dropdown-item {
    min-height: 34px;
    border-radius: 8px;
    font-weight: 650;
}

.action-menu .dropdown-header {
    color: #8a91a9;
    font-size: 0.75rem;
    font-weight: 850;
}

.cost-items-editor {
    display: grid;
    gap: 10px;
}

.cost-item-row {
    display: grid;
    grid-template-columns: 130px 1fr 170px;
    gap: 10px;
}

.cost-summary-list {
    display: grid;
    gap: 8px;
}

.cost-summary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: #f8f9fd;
    border: 1px solid var(--fp-line);
    border-radius: 10px;
}

.cost-summary-item.total {
    color: var(--fp-ink);
    background: #f0efff;
    border-color: #dedbff;
    font-weight: 850;
}

@media (max-width: 767.98px) {
    .cost-item-row {
        grid-template-columns: 1fr;
    }

    .warehouse-adjust-form {
        grid-template-columns: 1fr;
        min-width: 0;
    }

    .repair-step-progress {
        grid-template-columns: 1fr;
    }

    .accessory-row,
    .photo-upload-grid,
    .photo-gallery {
        grid-template-columns: 1fr;
    }
}

.barcode {
    background:
        repeating-linear-gradient(90deg, #111 0 3px, transparent 3px 7px),
        #fff;
    color: transparent;
}

.qr {
    background:
        linear-gradient(90deg, #111 10px, transparent 10px) 0 0 / 24px 24px,
        linear-gradient(#111 10px, transparent 10px) 0 0 / 24px 24px,
        #fff;
    color: #fff;
    text-shadow: 0 1px 2px #000;
}

.alert-info {
    border-color: #b9e4f4;
    background: #d9f2fb;
    color: #0b5d78;
}

.btn-primary {
    --bs-btn-bg: var(--fp-primary);
    --bs-btn-border-color: var(--fp-primary);
    --bs-btn-hover-bg: var(--fp-primary-dark);
    --bs-btn-hover-border-color: var(--fp-primary-dark);
}

@media (max-width: 575.98px) {
    .auth-card,
    .content-panel,
    .metric {
        padding: 16px;
    }

    .btn {
        width: 100%;
    }

    .navbar .btn {
        width: auto;
    }

    .page-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .page-actions {
        justify-content: stretch;
    }

    .repair-crumbs a,
    .repair-crumbs span,
    .repair-crumbs strong {
        flex: 1 1 50%;
        justify-content: center;
        padding: 8px 10px;
    }
}

@media (max-width: 991.98px) {
    .app-sidebar {
        position: static;
        width: 100%;
        padding: 16px;
    }

    .app-shell {
        margin-left: 0;
    }

    .app-topbar {
        position: static;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
    }

    .top-actions {
        justify-content: space-between;
    }

    .app-main {
        padding: 18px 16px 72px;
    }

    .sticky-savebar {
        margin: 24px -16px -72px;
        padding: 12px 16px;
    }

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

.warehouse-use-form {
    display: grid;
    grid-template-columns: minmax(84px, 110px) auto;
    gap: 8px;
    align-items: center;
}

.warehouse-use-form .btn {
    white-space: nowrap;
}

.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-filter a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    color: #606783;
    text-decoration: none;
    background: #fff;
    border: 1px solid var(--fp-line);
    border-radius: 10px;
    font-weight: 700;
}

.category-filter a.active,
.category-filter a:hover {
    color: var(--fp-primary);
    background: #f0efff;
}

.category-admin-row {
    display: grid;
    grid-template-columns: 1fr 1fr 76px auto;
    gap: 8px;
    align-items: center;
}

.print-document {
    margin: 0;
    color: #101426;
    background: #eef1f8;
    font-family: Arial, Helvetica, sans-serif;
}

.print-toolbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid #d9deea;
}

.print-toolbar button {
    min-height: 38px;
    padding: 0 16px;
    color: #fff;
    background: #4f46e5;
    border: 0;
    border-radius: 8px;
    font-weight: 700;
}

.print-toolbar button + button {
    color: #273047;
    background: #fff;
    border: 1px solid #cfd6e6;
}

.print-page {
    width: 210mm;
    min-height: 297mm;
    margin: 18px auto;
    padding: 16mm;
    background: #fff;
    box-shadow: 0 18px 55px rgba(20, 25, 45, 0.15);
}

.print-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 2px solid #101426;
}

.print-header strong {
    display: block;
    font-size: 22px;
}

.print-header span,
.print-header p,
.print-box p,
.print-note {
    color: #536079;
}

.print-header h1 {
    margin: 0 0 4px;
    font-size: 24px;
    text-align: right;
}

.print-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 12px;
}

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

.print-box {
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid #d9deea;
    border-radius: 8px;
    page-break-inside: avoid;
}

.print-box h2 {
    margin: 0 0 10px;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0;
}

.print-box h3 {
    margin: 12px 0 6px;
    font-size: 13px;
}

.print-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.print-table th,
.print-table td {
    padding: 8px;
    border: 1px solid #d9deea;
    vertical-align: top;
}

.print-table th {
    width: 22%;
    background: #f6f8fc;
    font-weight: 700;
}

.text-end {
    text-align: right;
}

.print-total td {
    background: #f6f8fc;
    font-weight: 800;
}

.print-photos {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.print-photos figure {
    margin: 0;
    border: 1px solid #d9deea;
    border-radius: 8px;
    overflow: hidden;
}

.print-photos img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

.print-photos figcaption {
    padding: 6px;
    color: #536079;
    font-size: 11px;
}

.print-codes {
    display: flex;
    align-items: center;
    gap: 16px;
}

.print-codes img {
    max-width: 190px;
    max-height: 140px;
}

.print-signatures {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
    margin-top: 36px;
}

.print-signatures span {
    display: block;
    height: 44px;
    border-bottom: 1px solid #101426;
}

.print-signatures strong {
    display: block;
    padding-top: 8px;
    text-align: center;
    font-size: 12px;
}

.print-empty-lines {
    height: 90px;
    background: repeating-linear-gradient(#fff, #fff 29px, #d9deea 30px);
}

.print-label-body {
    background: #fff;
}

.service-label {
    width: 96mm;
    margin: 14px auto;
    padding: 5mm;
    color: #101426;
    background: #fff;
    border: 1px dashed #7b849d;
}

.service-label header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #101426;
}

.service-label header strong {
    font-size: 18px;
}

.service-label header span {
    font-weight: 800;
}

.label-device {
    margin: 10px 0;
    font-size: 16px;
    font-weight: 800;
}

.service-label dl {
    display: grid;
    grid-template-columns: 26mm 1fr;
    gap: 4px 8px;
    margin: 0 0 10px;
    font-size: 12px;
}

.service-label dt {
    color: #536079;
    font-weight: 700;
}

.service-label dd {
    margin: 0;
    font-weight: 700;
}

.label-codes {
    display: grid;
    grid-template-columns: 1fr 32mm;
    gap: 8px;
    align-items: center;
}

.label-codes img {
    max-width: 100%;
}

@media print {
    @page {
        size: A4;
        margin: 10mm;
    }

    .print-toolbar {
        display: none;
    }

    .print-document {
        background: #fff;
    }

    .print-page {
        width: auto;
        min-height: auto;
        margin: 0;
        padding: 0;
        box-shadow: none;
    }

    .print-box {
        break-inside: avoid;
    }

    .service-label {
        margin: 0;
        box-shadow: none;
    }
}
