﻿:root {
    --bg: #f5f7fb;
    --glass: rgba(255, 255, 255, 0.72);
    --glass-strong: rgba(255, 255, 255, 0.9);
    --text: #111827;
    --muted: #64748b;
    --line: rgba(148, 163, 184, 0.28);
    --card: rgba(255, 255, 255, 0.82);
    --blue: #2563eb;
    --green: #16a34a;
    --violet: #7c3aed;
    --orange: #ea580c;
    --shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
    --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}

body.theme-xp_classic .content,
body.theme-xp-classic .content {
    display: block;
    padding: 8px !important;
}

body.theme-xp_classic .content > *,
body.theme-xp-classic .content > * {
    margin-bottom: 4px !important;
}

body.theme-xp_classic .panel,
body.theme-xp-classic .panel,
body.theme-xp_classic .hero,
body.theme-xp-classic .hero,
body.theme-xp_classic .dashboard-hero,
body.theme-xp-classic .dashboard-hero,
body.theme-xp_classic .stat-card,
body.theme-xp-classic .stat-card,
body.theme-xp_classic .widget,
body.theme-xp-classic .widget {
    border-radius: 0 !important;
    padding: 8px !important;
    box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #404040 !important;
}

body.theme-xp_classic .hero,
body.theme-xp-classic .hero,
body.theme-xp_classic .dashboard-hero,
body.theme-xp-classic .dashboard-hero {
    min-height: 0 !important;
}

body.theme-xp_classic .hero p,
body.theme-xp-classic .hero p,
body.theme-xp_classic .dashboard-hero p,
body.theme-xp-classic .dashboard-hero p,
body.theme-xp_classic .hero-kicker,
body.theme-xp-classic .hero-kicker {
    display: none !important;
}

body.theme-xp_classic .grid.two,
body.theme-xp-classic .grid.two,
body.theme-xp_classic .warehouse-receipt-layout,
body.theme-xp-classic .warehouse-receipt-layout,
body.theme-xp_classic .orders-one-column,
body.theme-xp-classic .orders-one-column {
    display: block !important;
}

body.theme-xp_classic .form,
body.theme-xp-classic .form,
body.theme-xp_classic .form-grid,
body.theme-xp-classic .form-grid,
body.theme-xp_classic .calculation,
body.theme-xp-classic .calculation,
body.theme-xp_classic .cutting-material-lines,
body.theme-xp-classic .cutting-material-lines,
body.theme-xp_classic .inline-actions,
body.theme-xp-classic .inline-actions {
    gap: 6px !important;
}

body.theme-xp_classic .form-grid,
body.theme-xp-classic .form-grid,
body.theme-xp_classic .receipt-head-grid,
body.theme-xp-classic .receipt-head-grid,
body.theme-xp_classic .receipt-line-grid,
body.theme-xp-classic .receipt-line-grid,
body.theme-xp_classic .outgoing-line-grid,
body.theme-xp-classic .outgoing-line-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
}

body.theme-xp_classic label,
body.theme-xp-classic label {
    gap: 3px !important;
    font-size: 11px !important;
}

body.theme-xp_classic input,
body.theme-xp-classic input,
body.theme-xp_classic select,
body.theme-xp-classic select,
body.theme-xp_classic textarea,
body.theme-xp-classic textarea {
    min-height: 28px !important;
    padding: 4px 6px !important;
    font-size: 12px !important;
}

body.theme-xp_classic button,
body.theme-xp-classic button,
body.theme-xp_classic .secondary-button,
body.theme-xp-classic .secondary-button,
body.theme-xp_classic .small-button,
body.theme-xp-classic .small-button,
body.theme-xp_classic .table-action,
body.theme-xp-classic .table-action {
    min-height: 28px !important;
    padding: 5px 9px !important;
    font-size: 12px !important;
}

body.theme-xp_classic th,
body.theme-xp_classic td,
body.theme-xp-classic th,
body.theme-xp-classic td {
    padding: 4px 5px !important;
    font-size: 12px !important;
}

body.theme-xp_classic .table-wrap,
body.theme-xp-classic .table-wrap {
    border-radius: 0 !important;
}

body.theme-xp_classic table,
body.theme-xp-classic table {
    table-layout: fixed !important;
    min-width: 760px !important;
    width: 100% !important;
}

body.theme-xp_classic th,
body.theme-xp_classic td,
body.theme-xp-classic th,
body.theme-xp-classic td {
    max-width: 115px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body.theme-xp_classic td input,
body.theme-xp_classic td select,
body.theme-xp_classic td textarea,
body.theme-xp-classic td input,
body.theme-xp-classic td select,
body.theme-xp-classic td textarea {
    max-width: 110px !important;
}

body.theme-xp_classic .cutting-orders-table,
body.theme-xp-classic .cutting-orders-table {
    min-width: 980px !important;
}

body.theme-xp_classic .compact-pricing-table,
body.theme-xp-classic .compact-pricing-table {
    min-width: 820px !important;
}

body.theme-xp_classic .compact-pricing-table td:nth-child(1),
body.theme-xp_classic .compact-pricing-table th:nth-child(1),
body.theme-xp-classic .compact-pricing-table td:nth-child(1),
body.theme-xp-classic .compact-pricing-table th:nth-child(1) {
    width: 70px !important;
}

body.theme-xp_classic .compact-pricing-table td:nth-child(2),
body.theme-xp_classic .compact-pricing-table th:nth-child(2),
body.theme-xp-classic .compact-pricing-table td:nth-child(2),
body.theme-xp-classic .compact-pricing-table th:nth-child(2) {
    width: 72px !important;
}

body.theme-xp_classic .compact-pricing-table td:nth-child(3),
body.theme-xp_classic .compact-pricing-table th:nth-child(3),
body.theme-xp-classic .compact-pricing-table td:nth-child(3),
body.theme-xp-classic .compact-pricing-table th:nth-child(3) {
    width: 88px !important;
}

body.theme-xp_classic .compact-pricing-table td:nth-child(4),
body.theme-xp_classic .compact-pricing-table th:nth-child(4),
body.theme-xp-classic .compact-pricing-table td:nth-child(4),
body.theme-xp-classic .compact-pricing-table th:nth-child(4) {
    width: 122px !important;
}

body.theme-xp_classic .compact-pricing-table td:nth-child(5),
body.theme-xp_classic .compact-pricing-table th:nth-child(5),
body.theme-xp-classic .compact-pricing-table td:nth-child(5),
body.theme-xp-classic .compact-pricing-table th:nth-child(5) {
    width: 68px !important;
}

body.theme-xp_classic .topbar,
body.theme-xp-classic .topbar {
    min-height: 64px !important;
    padding: 10px 14px 8px !important;
}

body.theme-xp_classic .sidebar,
body.theme-xp-classic .sidebar {
    width: 228px !important;
    padding: 8px !important;
}

body.theme-xp_classic .app,
body.theme-xp-classic .app {
    margin-left: 246px !important;
}

body.theme-xp_classic .nav,
body.theme-xp-classic .nav {
    gap: 2px !important;
}

body.theme-xp_classic .nav a,
body.theme-xp-classic .nav a {
    min-height: 28px !important;
    padding: 4px 6px !important;
    font-size: 12px !important;
}

@media (max-width: 900px) {
    body.theme-xp_classic .app,
    body.theme-xp-classic .app {
        margin-left: 0 !important;
    }
}

.module-start-panel {
    padding: 14px;
}

.module-start-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.module-start-head h1 {
    margin: 2px 0 0;
    font-size: 24px;
    line-height: 1.1;
    letter-spacing: 0;
}

.module-start-actions,
.module-quick-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.module-start-actions a {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 8px;
    background: rgba(248, 250, 252, 0.88);
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.module-start-actions a.active,
.module-start-actions a:hover {
    border-color: rgba(37, 99, 235, 0.55);
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
}

.module-quick-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(130px, 1fr));
}

.module-quick-stats a {
    min-height: 72px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--text);
    text-decoration: none;
}

.module-quick-stats a.active,
.module-quick-stats a:hover {
    border-color: rgba(37, 99, 235, 0.48);
    background: rgba(239, 246, 255, 0.92);
}

.module-quick-stats span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.module-quick-stats strong {
    margin-top: 4px;
    font-size: 22px;
    line-height: 1;
}

.cutting-workflow {
    display: grid;
    grid-template-columns: repeat(5, minmax(130px, 1fr));
    gap: 10px;
    margin: 14px 0;
}

.cutting-step-card {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
        "num title"
        "num note";
    gap: 3px 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.68);
    color: var(--text);
    text-decoration: none;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.cutting-step-card:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.42);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.09);
}

.cutting-step-card.active {
    border-color: rgba(37, 99, 235, 0.62);
    background: rgba(239, 246, 255, 0.88);
}

.cutting-step-card span {
    grid-area: num;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #2563eb;
    color: #fff;
    font-weight: 800;
}

.cutting-step-card strong {
    grid-area: title;
    font-size: 14px;
    line-height: 1.2;
}

.cutting-step-card small {
    grid-area: note;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.25;
}

.cutting-stage-panel {
    scroll-margin-top: 96px;
}

.cutting-stage-panel > .panel-title-row h2,
.cutting-stage-panel > h2 {
    letter-spacing: 0;
}

.grid.one {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

body.theme-xp_classic .cutting-workflow,
body.theme-xp-classic .cutting-workflow {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
    gap: 4px !important;
}

body.theme-xp_classic .cutting-step-card,
body.theme-xp-classic .cutting-step-card {
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 6px !important;
    background: #ece9d8 !important;
}

body.theme-xp_classic .cutting-step-card.active,
body.theme-xp-classic .cutting-step-card.active {
    background: #dbeafe !important;
    border-color: #2563eb !important;
}

body.theme-xp_classic .cutting-step-card span,
body.theme-xp-classic .cutting-step-card span {
    width: 24px !important;
    height: 24px !important;
    border-radius: 0 !important;
    font-size: 12px !important;
}

body.theme-xp_classic .cutting-step-card strong,
body.theme-xp-classic .cutting-step-card strong,
body.theme-xp_classic .cutting-step-card small,
body.theme-xp-classic .cutting-step-card small {
    font-size: 11px !important;
}

@media (max-width: 1100px) {
    .module-start-head {
        align-items: stretch;
        flex-direction: column;
    }

    .module-quick-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cutting-workflow {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
}

@media (max-width: 560px) {
    .module-quick-stats {
        grid-template-columns: 1fr;
    }
}

/* Final XP compact workspace: no equal-column symmetry, minimal touchpad scrolling. */
body.theme-xp_classic .panel-title-row,
body.theme-xp-classic .panel-title-row,
body.theme-xp_classic .pricing-expense-header,
body.theme-xp-classic .pricing-expense-header {
    display: block !important;
    margin-bottom: 4px !important;
}

body.theme-xp_classic .form-grid,
body.theme-xp-classic .form-grid,
body.theme-xp_classic .receipt-head-grid,
body.theme-xp-classic .receipt-head-grid,
body.theme-xp_classic .receipt-line-grid,
body.theme-xp-classic .receipt-line-grid,
body.theme-xp_classic .outgoing-line-grid,
body.theme-xp-classic .outgoing-line-grid,
body.theme-xp_classic .pricing-director-footer,
body.theme-xp-classic .pricing-director-footer,
body.theme-xp_classic .pricing-expense-footer,
body.theme-xp-classic .pricing-expense-footer,
body.theme-xp_classic .search-form,
body.theme-xp-classic .search-form,
body.theme-xp_classic .calculation,
body.theme-xp-classic .calculation {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    align-items: flex-end !important;
    gap: 3px !important;
}

body.theme-xp_classic .form-grid label,
body.theme-xp-classic .form-grid label,
body.theme-xp_classic .receipt-head-grid label,
body.theme-xp-classic .receipt-head-grid label,
body.theme-xp_classic .receipt-line-grid label,
body.theme-xp-classic .receipt-line-grid label,
body.theme-xp_classic .outgoing-line-grid label,
body.theme-xp-classic .outgoing-line-grid label,
body.theme-xp_classic .search-form label,
body.theme-xp-classic .search-form label {
    flex: 0 0 auto !important;
    width: 116px !important;
    min-width: 0 !important;
}

body.theme-xp_classic .cutting-material-line,
body.theme-xp-classic .cutting-material-line,
body.theme-xp_classic .pricing-expense-line,
body.theme-xp-classic .pricing-expense-line {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-end !important;
    gap: 3px !important;
}

body.theme-xp_classic .cutting-material-line label:first-child,
body.theme-xp-classic .cutting-material-line label:first-child,
body.theme-xp_classic .pricing-expense-line input:first-child,
body.theme-xp-classic .pricing-expense-line input:first-child {
    flex: 0 0 180px !important;
    width: 180px !important;
}

body.theme-xp_classic .cutting-material-line label,
body.theme-xp-classic .cutting-material-line label {
    flex: 0 0 auto !important;
    width: 92px !important;
}

body.theme-xp_classic .stats-grid,
body.theme-xp-classic .stats-grid,
body.theme-xp_classic .dashboard-strip,
body.theme-xp-classic .dashboard-strip,
body.theme-xp_classic .sewing-line-grid,
body.theme-xp-classic .sewing-line-grid,
body.theme-xp_classic .process-steps,
body.theme-xp-classic .process-steps {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 3px !important;
}

body.theme-xp_classic .stat-card,
body.theme-xp-classic .stat-card,
body.theme-xp_classic .dashboard-strip div,
body.theme-xp-classic .dashboard-strip div,
body.theme-xp_classic .process-steps div,
body.theme-xp-classic .process-steps div {
    flex: 0 0 auto !important;
    width: 118px !important;
    min-height: 52px !important;
    padding: 5px !important;
}

body.theme-xp_classic .table-wrap,
body.theme-xp-classic .table-wrap {
    max-width: 100% !important;
    overflow-x: auto !important;
}

body.theme-xp_classic table,
body.theme-xp-classic table {
    table-layout: fixed !important;
    min-width: 0 !important;
    width: 100% !important;
}

body.theme-xp_classic .cutting-orders-table,
body.theme-xp-classic .cutting-orders-table {
    min-width: 920px !important;
}

body.theme-xp_classic th,
body.theme-xp_classic td,
body.theme-xp-classic th,
body.theme-xp-classic td {
    height: 24px !important;
    max-width: 92px !important;
    padding: 2px 3px !important;
    font-size: 11px !important;
    line-height: 1.15 !important;
}

body.theme-xp_classic th:nth-child(1),
body.theme-xp_classic td:nth-child(1),
body.theme-xp-classic th:nth-child(1),
body.theme-xp-classic td:nth-child(1) {
    width: 62px !important;
}

body.theme-xp_classic th:nth-child(2),
body.theme-xp_classic td:nth-child(2),
body.theme-xp-classic th:nth-child(2),
body.theme-xp-classic td:nth-child(2) {
    width: 70px !important;
}

body.theme-xp_classic th:nth-child(3),
body.theme-xp_classic td:nth-child(3),
body.theme-xp-classic th:nth-child(3),
body.theme-xp-classic td:nth-child(3) {
    width: 82px !important;
}

body.theme-xp_classic th:nth-child(4),
body.theme-xp_classic td:nth-child(4),
body.theme-xp-classic th:nth-child(4),
body.theme-xp-classic td:nth-child(4) {
    width: 112px !important;
}

body.theme-xp_classic th:nth-child(n+5),
body.theme-xp_classic td:nth-child(n+5),
body.theme-xp-classic th:nth-child(n+5),
body.theme-xp-classic td:nth-child(n+5) {
    width: 68px !important;
}

body.theme-xp_classic td .inline-actions,
body.theme-xp-classic td .inline-actions,
body.theme-xp_classic td form,
body.theme-xp-classic td form {
    gap: 2px !important;
}

body.theme-xp_classic td .small-button,
body.theme-xp-classic td .small-button,
body.theme-xp_classic td .table-action,
body.theme-xp-classic td .table-action {
    min-height: 20px !important;
    padding: 2px 4px !important;
    font-size: 10px !important;
}

body.theme-xp_classic input,
body.theme-xp-classic input,
body.theme-xp_classic select,
body.theme-xp-classic select,
body.theme-xp_classic textarea,
body.theme-xp-classic textarea {
    min-height: 22px !important;
    padding: 2px 4px !important;
}

body.theme-xp_classic .topbar-widgets,
body.theme-xp-classic .topbar-widgets {
    flex-wrap: wrap !important;
}

body.theme-xp_classic .widget,
body.theme-xp-classic .widget {
    min-width: 118px !important;
    width: auto !important;
}

/* Final XP compact workspace: no equal-column symmetry, minimal touchpad scrolling. */
body.theme-xp_classic .panel-title-row,
body.theme-xp-classic .panel-title-row,
body.theme-xp_classic .pricing-expense-header,
body.theme-xp-classic .pricing-expense-header {
    display: block !important;
    margin-bottom: 4px !important;
}

body.theme-xp_classic .form-grid,
body.theme-xp-classic .form-grid,
body.theme-xp_classic .receipt-head-grid,
body.theme-xp-classic .receipt-head-grid,
body.theme-xp_classic .receipt-line-grid,
body.theme-xp-classic .receipt-line-grid,
body.theme-xp_classic .outgoing-line-grid,
body.theme-xp-classic .outgoing-line-grid,
body.theme-xp_classic .pricing-director-footer,
body.theme-xp-classic .pricing-director-footer,
body.theme-xp_classic .pricing-expense-footer,
body.theme-xp-classic .pricing-expense-footer,
body.theme-xp_classic .search-form,
body.theme-xp-classic .search-form,
body.theme-xp_classic .calculation,
body.theme-xp-classic .calculation {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    align-items: flex-end !important;
    gap: 3px !important;
}

body.theme-xp_classic .form-grid label,
body.theme-xp-classic .form-grid label,
body.theme-xp_classic .receipt-head-grid label,
body.theme-xp-classic .receipt-head-grid label,
body.theme-xp_classic .receipt-line-grid label,
body.theme-xp-classic .receipt-line-grid label,
body.theme-xp_classic .outgoing-line-grid label,
body.theme-xp-classic .outgoing-line-grid label,
body.theme-xp_classic .search-form label,
body.theme-xp-classic .search-form label {
    flex: 0 0 auto !important;
    width: 116px !important;
    min-width: 0 !important;
}

body.theme-xp_classic .form-grid label:has(textarea),
body.theme-xp-classic .form-grid label:has(textarea),
body.theme-xp_classic .receipt-head-grid label:has(textarea),
body.theme-xp-classic .receipt-head-grid label:has(textarea) {
    width: 180px !important;
}

body.theme-xp_classic .cutting-material-line,
body.theme-xp-classic .cutting-material-line,
body.theme-xp_classic .pricing-expense-line,
body.theme-xp-classic .pricing-expense-line {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-end !important;
    gap: 3px !important;
}

body.theme-xp_classic .cutting-material-line label:first-child,
body.theme-xp-classic .cutting-material-line label:first-child,
body.theme-xp_classic .pricing-expense-line input:first-child,
body.theme-xp-classic .pricing-expense-line input:first-child {
    flex: 0 0 180px !important;
    width: 180px !important;
}

body.theme-xp_classic .cutting-material-line label,
body.theme-xp-classic .cutting-material-line label {
    flex: 0 0 auto !important;
    width: 92px !important;
}

body.theme-xp_classic .stats-grid,
body.theme-xp-classic .stats-grid,
body.theme-xp_classic .dashboard-strip,
body.theme-xp-classic .dashboard-strip,
body.theme-xp_classic .sewing-line-grid,
body.theme-xp-classic .sewing-line-grid,
body.theme-xp_classic .process-steps,
body.theme-xp-classic .process-steps {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 3px !important;
}

body.theme-xp_classic .stat-card,
body.theme-xp-classic .stat-card,
body.theme-xp_classic .dashboard-strip div,
body.theme-xp-classic .dashboard-strip div,
body.theme-xp_classic .process-steps div,
body.theme-xp-classic .process-steps div {
    flex: 0 0 auto !important;
    width: 118px !important;
    min-height: 52px !important;
    padding: 5px !important;
}

body.theme-xp_classic .table-wrap,
body.theme-xp-classic .table-wrap {
    max-width: 100% !important;
    overflow-x: auto !important;
}

body.theme-xp_classic table,
body.theme-xp-classic table {
    table-layout: fixed !important;
    min-width: 0 !important;
    width: 100% !important;
}

body.theme-xp_classic .cutting-orders-table,
body.theme-xp-classic .cutting-orders-table {
    min-width: 920px !important;
}

body.theme-xp_classic th,
body.theme-xp_classic td,
body.theme-xp-classic th,
body.theme-xp-classic td {
    height: 24px !important;
    max-width: 92px !important;
    padding: 2px 3px !important;
    font-size: 11px !important;
    line-height: 1.15 !important;
}

body.theme-xp_classic th:nth-child(1),
body.theme-xp_classic td:nth-child(1),
body.theme-xp-classic th:nth-child(1),
body.theme-xp-classic td:nth-child(1) {
    width: 62px !important;
}

body.theme-xp_classic th:nth-child(2),
body.theme-xp_classic td:nth-child(2),
body.theme-xp-classic th:nth-child(2),
body.theme-xp-classic td:nth-child(2) {
    width: 70px !important;
}

body.theme-xp_classic th:nth-child(3),
body.theme-xp_classic td:nth-child(3),
body.theme-xp-classic th:nth-child(3),
body.theme-xp-classic td:nth-child(3) {
    width: 82px !important;
}

body.theme-xp_classic th:nth-child(4),
body.theme-xp_classic td:nth-child(4),
body.theme-xp-classic th:nth-child(4),
body.theme-xp-classic td:nth-child(4) {
    width: 112px !important;
}

body.theme-xp_classic th:nth-child(n+5),
body.theme-xp_classic td:nth-child(n+5),
body.theme-xp-classic th:nth-child(n+5),
body.theme-xp-classic td:nth-child(n+5) {
    width: 68px !important;
}

body.theme-xp_classic td .inline-actions,
body.theme-xp-classic td .inline-actions,
body.theme-xp_classic td form,
body.theme-xp-classic td form {
    gap: 2px !important;
}

body.theme-xp_classic td .small-button,
body.theme-xp-classic td .small-button,
body.theme-xp_classic td .table-action,
body.theme-xp-classic td .table-action {
    min-height: 20px !important;
    padding: 2px 4px !important;
    font-size: 10px !important;
}

body.theme-xp_classic input,
body.theme-xp-classic input,
body.theme-xp_classic select,
body.theme-xp-classic select,
body.theme-xp_classic textarea,
body.theme-xp-classic textarea {
    min-height: 22px !important;
    padding: 2px 4px !important;
}

body.theme-xp_classic .topbar-widgets,
body.theme-xp-classic .topbar-widgets {
    flex-wrap: wrap !important;
}

body.theme-xp_classic .widget,
body.theme-xp-classic .widget {
    min-width: 118px !important;
    width: auto !important;
}

body.theme-xp_classic .compact-pricing-table,
body.theme-xp-classic .compact-pricing-table {
    min-width: 820px !important;
}

body.theme-xp_classic .compact-pricing-table th,
body.theme-xp_classic .compact-pricing-table td,
body.theme-xp-classic .compact-pricing-table th,
body.theme-xp-classic .compact-pricing-table td {
    height: 28px !important;
    padding: 3px 4px !important;
    font-size: 11px !important;
}

body.theme-xp_classic .compact-pricing-table th,
body.theme-xp-classic .compact-pricing-table th {
    font-size: 10px !important;
}

body.theme-xp_classic .compact-pricing-table td:nth-child(1),
body.theme-xp_classic .compact-pricing-table th:nth-child(1),
body.theme-xp-classic .compact-pricing-table td:nth-child(1),
body.theme-xp-classic .compact-pricing-table th:nth-child(1) {
    width: 70px !important;
}

body.theme-xp_classic .compact-pricing-table td:nth-child(2),
body.theme-xp_classic .compact-pricing-table th:nth-child(2),
body.theme-xp-classic .compact-pricing-table td:nth-child(2),
body.theme-xp-classic .compact-pricing-table th:nth-child(2) {
    width: 72px !important;
}

body.theme-xp_classic .compact-pricing-table td:nth-child(3),
body.theme-xp_classic .compact-pricing-table th:nth-child(3),
body.theme-xp-classic .compact-pricing-table td:nth-child(3),
body.theme-xp-classic .compact-pricing-table th:nth-child(3) {
    width: 88px !important;
}

body.theme-xp_classic .compact-pricing-table td:nth-child(4),
body.theme-xp_classic .compact-pricing-table th:nth-child(4),
body.theme-xp-classic .compact-pricing-table td:nth-child(4),
body.theme-xp-classic .compact-pricing-table th:nth-child(4) {
    width: 122px !important;
}

body.theme-xp_classic .compact-pricing-table td:nth-child(5),
body.theme-xp_classic .compact-pricing-table th:nth-child(5),
body.theme-xp-classic .compact-pricing-table td:nth-child(5),
body.theme-xp-classic .compact-pricing-table th:nth-child(5) {
    width: 68px !important;
}

body.theme-xp_classic .compact-pricing-table td:nth-child(6),
body.theme-xp_classic .compact-pricing-table th:nth-child(6),
body.theme-xp_classic .compact-pricing-table td:nth-child(7),
body.theme-xp_classic .compact-pricing-table th:nth-child(7),
body.theme-xp_classic .compact-pricing-table td:nth-child(8),
body.theme-xp_classic .compact-pricing-table th:nth-child(8),
body.theme-xp_classic .compact-pricing-table td:nth-child(9),
body.theme-xp_classic .compact-pricing-table th:nth-child(9),
body.theme-xp-classic .compact-pricing-table td:nth-child(6),
body.theme-xp-classic .compact-pricing-table th:nth-child(6),
body.theme-xp-classic .compact-pricing-table td:nth-child(7),
body.theme-xp-classic .compact-pricing-table th:nth-child(7),
body.theme-xp-classic .compact-pricing-table td:nth-child(8),
body.theme-xp-classic .compact-pricing-table th:nth-child(8),
body.theme-xp-classic .compact-pricing-table td:nth-child(9),
body.theme-xp-classic .compact-pricing-table th:nth-child(9) {
    width: 72px !important;
}

body.theme-xp_classic .compact-pricing-table td:nth-child(10),
body.theme-xp_classic .compact-pricing-table th:nth-child(10),
body.theme-xp-classic .compact-pricing-table td:nth-child(10),
body.theme-xp-classic .compact-pricing-table th:nth-child(10) {
    width: 220px !important;
}

body.theme-xp_classic .pricing-costing-cell,
body.theme-xp-classic .pricing-costing-cell {
    min-width: 220px !important;
}

body.theme-xp_classic .pricing-costing-actions,
body.theme-xp-classic .pricing-costing-actions {
    gap: 4px !important;
}

body.theme-xp_classic .pricing-costing-actions .status-pill,
body.theme-xp-classic .pricing-costing-actions .status-pill {
    min-height: 22px !important;
    padding: 0 5px !important;
    font-size: 10px !important;
}

body.theme-xp_classic .pricing-costing-actions .small-button,
body.theme-xp_classic .pricing-costing-actions .secondary-button,
body.theme-xp-classic .pricing-costing-actions .small-button,
body.theme-xp-classic .pricing-costing-actions .secondary-button {
    min-height: 22px !important;
    padding: 3px 6px !important;
    font-size: 10px !important;
}

body.theme-xp_classic .compact-pricing-director-table,
body.theme-xp-classic .compact-pricing-director-table {
    min-width: 920px !important;
}

body.theme-xp_classic .compact-pricing-director-table td,
body.theme-xp-classic .compact-pricing-director-table td {
    max-width: none !important;
    white-space: normal !important;
}

body.theme-xp_classic .content,
body.theme-xp-classic .content {
    display: block;
    padding: 8px;
}

body.theme-xp_classic .content > .panel,
body.theme-xp-classic .content > .panel,
body.theme-xp_classic .content > .hero,
body.theme-xp-classic .content > .hero,
body.theme-xp_classic .content > .dashboard-hero,
body.theme-xp-classic .content > .dashboard-hero,
body.theme-xp_classic .content > .grid,
body.theme-xp-classic .content > .grid,
body.theme-xp_classic .content > .warehouse-receipt-layout,
body.theme-xp-classic .content > .warehouse-receipt-layout,
body.theme-xp_classic .content > .orders-one-column,
body.theme-xp-classic .content > .orders-one-column,
body.theme-xp_classic .content > .stats-grid,
body.theme-xp-classic .content > .stats-grid,
body.theme-xp_classic .content > .dashboard-strip,
body.theme-xp-classic .content > .dashboard-strip,
body.theme-xp_classic .content > .inventory-tabs,
body.theme-xp-classic .content > .inventory-tabs,
body.theme-xp_classic .content > .search-panel,
body.theme-xp-classic .content > .search-panel {
    margin: 0 0 4px;
}

body.theme-xp_classic .panel,
body.theme-xp-classic .panel,
body.theme-xp_classic .hero,
body.theme-xp-classic .hero,
body.theme-xp_classic .dashboard-hero,
body.theme-xp-classic .dashboard-hero {
    padding: 8px;
}

body.theme-xp_classic .hero,
body.theme-xp-classic .hero,
body.theme-xp_classic .dashboard-hero,
body.theme-xp-classic .dashboard-hero {
    min-height: 0;
}

body.theme-xp_classic .hero p,
body.theme-xp-classic .hero p,
body.theme-xp_classic .dashboard-hero p,
body.theme-xp-classic .dashboard-hero p,
body.theme-xp_classic .hero-kicker,
body.theme-xp-classic .hero-kicker {
    display: none;
}

body.theme-xp_classic h1,
body.theme-xp-classic h1 {
    font-size: 20px;
}

body.theme-xp_classic h2,
body.theme-xp-classic h2,
body.theme-xp_classic .panel-title-row h2,
body.theme-xp-classic .panel-title-row h2 {
    margin-bottom: 6px;
    font-size: 15px;
}

body.theme-xp_classic .panel-title-row,
body.theme-xp-classic .panel-title-row,
body.theme-xp_classic .pricing-expense-header,
body.theme-xp-classic .pricing-expense-header {
    margin-bottom: 6px;
    gap: 6px;
}

body.theme-xp_classic .muted-text,
body.theme-xp-classic .muted-text,
body.theme-xp_classic .form-note,
body.theme-xp-classic .form-note,
body.theme-xp_classic .panel-title-row > span,
body.theme-xp-classic .panel-title-row > span {
    font-size: 11px;
}

body.theme-xp_classic .grid.two,
body.theme-xp-classic .grid.two,
body.theme-xp_classic .warehouse-receipt-layout,
body.theme-xp-classic .warehouse-receipt-layout,
body.theme-xp_classic .orders-one-column,
body.theme-xp-classic .orders-one-column {
    display: block;
}

body.theme-xp_classic .grid.two > *,
body.theme-xp-classic .grid.two > *,
body.theme-xp_classic .warehouse-receipt-layout > *,
body.theme-xp-classic .warehouse-receipt-layout > *,
body.theme-xp_classic .orders-one-column > *,
body.theme-xp-classic .orders-one-column > * {
    margin-bottom: 4px;
}

body.theme-xp_classic .form,
body.theme-xp-classic .form,
body.theme-xp_classic .progress-list,
body.theme-xp-classic .progress-list,
body.theme-xp_classic .calculation,
body.theme-xp-classic .calculation,
body.theme-xp_classic .workflow,
body.theme-xp-classic .workflow,
body.theme-xp_classic .cutting-material-lines,
body.theme-xp-classic .cutting-material-lines {
    gap: 6px;
}

body.theme-xp_classic .form-grid,
body.theme-xp-classic .form-grid,
body.theme-xp_classic .receipt-head-grid,
body.theme-xp-classic .receipt-head-grid,
body.theme-xp_classic .receipt-line-grid,
body.theme-xp-classic .receipt-line-grid,
body.theme-xp_classic .outgoing-line-grid,
body.theme-xp-classic .outgoing-line-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 6px;
}

body.theme-xp_classic .cutting-material-line,
body.theme-xp-classic .cutting-material-line {
    grid-template-columns: minmax(180px, 1fr) 88px auto;
    gap: 6px;
}

body.theme-xp_classic label,
body.theme-xp-classic label {
    gap: 3px;
    font-size: 11px;
    font-weight: 700;
}

body.theme-xp_classic input,
body.theme-xp-classic input,
body.theme-xp_classic select,
body.theme-xp-classic select,
body.theme-xp_classic textarea,
body.theme-xp-classic textarea {
    min-height: 28px;
    padding: 4px 6px;
    font-size: 12px;
}

body.theme-xp_classic textarea,
body.theme-xp-classic textarea {
    min-height: 58px;
}

body.theme-xp_classic button,
body.theme-xp-classic button,
body.theme-xp_classic .secondary-button,
body.theme-xp-classic .secondary-button,
body.theme-xp_classic .small-button,
body.theme-xp-classic .small-button,
body.theme-xp_classic .table-action,
body.theme-xp-classic .table-action {
    min-height: 28px;
    padding: 5px 9px;
    font-size: 12px;
}

body.theme-xp_classic .small-button,
body.theme-xp-classic .small-button {
    min-height: 26px;
    padding: 4px 7px;
}

body.theme-xp_classic .pricing-expense-actions,
body.theme-xp-classic .pricing-expense-actions {
    grid-template-columns: repeat(2, 28px);
    gap: 3px;
}

body.theme-xp_classic .pricing-expense-actions .small-button,
body.theme-xp-classic .pricing-expense-actions .small-button {
    width: 28px;
    min-width: 28px;
    min-height: 28px;
    padding: 0;
    font-size: 14px;
}

body.theme-xp_classic .inventory-tabs,
body.theme-xp-classic .inventory-tabs,
body.theme-xp_classic .topbar-widgets,
body.theme-xp-classic .topbar-widgets,
body.theme-xp_classic .inline-actions,
body.theme-xp-classic .inline-actions,
body.theme-xp_classic .hero-actions,
body.theme-xp-classic .hero-actions {
    gap: 4px;
}

body.theme-xp_classic .inventory-tabs a,
body.theme-xp-classic .inventory-tabs a,
body.theme-xp_classic .hero-actions a,
body.theme-xp-classic .hero-actions a {
    min-height: 28px;
    padding: 5px 8px;
    font-size: 12px;
}

body.theme-xp_classic table,
body.theme-xp-classic table {
    font-size: 12px;
}

body.theme-xp_classic th,
body.theme-xp_classic td,
body.theme-xp-classic th,
body.theme-xp-classic td {
    padding: 4px 5px;
}

body.theme-xp_classic .stat-card,
body.theme-xp-classic .stat-card {
    min-height: 72px;
    padding: 8px;
}

body.theme-xp_classic .stat-icon,
body.theme-xp-classic .stat-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 6px;
}

body.theme-xp_classic .stat-card span,
body.theme-xp-classic .stat-card span {
    font-size: 11px;
}

body.theme-xp_classic .stat-card strong,
body.theme-xp-classic .stat-card strong {
    margin-top: 3px;
    font-size: 18px;
}

body.theme-xp_classic .widget,
body.theme-xp-classic .widget {
    min-width: 150px;
    padding: 6px 8px;
}

body.theme-xp_classic .topbar,
body.theme-xp-classic .topbar {
    min-height: 64px;
    padding: 10px 14px 8px;
}

body.theme-xp_classic .sidebar,
body.theme-xp-classic .sidebar {
    width: 228px;
    padding: 8px;
}

body.theme-xp_classic .app,
body.theme-xp-classic .app {
    margin-left: 246px;
}

body.theme-xp_classic .nav,
body.theme-xp-classic .nav {
    gap: 2px;
}

body.theme-xp_classic .nav-label,
body.theme-xp-classic .nav-label {
    margin: 8px 6px 3px;
}

body.theme-xp_classic .nav a,
body.theme-xp-classic .nav a {
    min-height: 28px;
    padding: 4px 6px;
    gap: 6px;
    font-size: 12px;
}

body.theme-xp_classic .nav a i,
body.theme-xp-classic .nav a i {
    width: 20px;
    height: 20px;
    font-size: 10px;
}

body.theme-xp_classic .brand,
body.theme-xp-classic .brand {
    gap: 6px;
    padding: 4px 4px 8px;
}

body.theme-xp_classic .brand-logo-wrap,
body.theme-xp-classic .brand-logo-wrap {
    width: 78px;
    height: 34px;
}

body.theme-xp_classic .brand strong,
body.theme-xp-classic .brand strong {
    font-size: 14px;
}

body.theme-xp_classic .brand span,
body.theme-xp-classic .brand span {
    font-size: 10px;
}

body.theme-xp_classic,
body.theme-xp-classic {
    --bg: #d4d0c8;
    --glass: #d4d0c8;
    --glass-strong: #ece9d8;
    --text: #000000;
    --muted: #404040;
    --line: #808080;
    --card: #ffffff;
    --blue: #0a246a;
    --green: #008000;
    --violet: #0a246a;
    --orange: #804000;
    --shadow: none;
    --soft-shadow: none;
    color: var(--text);
    font-family: Tahoma, Arial, sans-serif;
    background: #d4d0c8;
}

body.theme-xp_classic::before,
body.theme-xp-classic::before {
    display: none;
}

body.theme-xp_classic .sidebar,
body.theme-xp-classic .sidebar,
body.theme-xp_classic .topbar,
body.theme-xp-classic .topbar,
body.theme-xp_classic .panel,
body.theme-xp-classic .panel,
body.theme-xp_classic .hero,
body.theme-xp-classic .hero,
body.theme-xp_classic .dashboard-hero,
body.theme-xp-classic .dashboard-hero,
body.theme-xp_classic .stat-card,
body.theme-xp-classic .stat-card,
body.theme-xp_classic .widget,
body.theme-xp-classic .widget,
body.theme-xp_classic .inventory-tabs,
body.theme-xp-classic .inventory-tabs,
body.theme-xp_classic .receipt-group,
body.theme-xp-classic .receipt-group,
body.theme-xp_classic .soft-panel,
body.theme-xp-classic .soft-panel {
    border: 1px solid #808080;
    border-radius: 0;
    background: #d4d0c8;
    box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #404040;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.theme-xp_classic .topbar,
body.theme-xp-classic .topbar {
    min-height: 82px;
    background: #d4d0c8;
    border-bottom: 1px solid #808080;
}

body.theme-xp_classic .sidebar,
body.theme-xp-classic .sidebar {
    inset: 10px auto 10px 10px;
    width: 250px;
    padding: 10px;
}

body.theme-xp_classic .app,
body.theme-xp-classic .app {
    margin-left: 270px;
}

body.theme-xp_classic .brand-logo-wrap,
body.theme-xp-classic .brand-logo-wrap {
    border-radius: 0;
    border: 1px solid #808080;
    background: #ffffff;
    box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #404040;
}

body.theme-xp_classic .nav a,
body.theme-xp-classic .nav a,
body.theme-xp_classic .inventory-tabs a,
body.theme-xp-classic .inventory-tabs a {
    min-height: 34px;
    border-radius: 0;
    color: #000000;
    font-weight: 500;
}

body.theme-xp_classic .nav a i,
body.theme-xp-classic .nav a i {
    border-radius: 0;
    color: #000000;
    background: #ece9d8;
    border: 1px solid #808080;
}

body.theme-xp_classic .nav a:hover,
body.theme-xp_classic .nav a.active,
body.theme-xp_classic .inventory-tabs a.active,
body.theme-xp-classic .nav a:hover,
body.theme-xp-classic .nav a.active,
body.theme-xp-classic .inventory-tabs a.active {
    color: #ffffff;
    background: #0a246a;
    box-shadow: none;
    transform: none;
}

body.theme-xp_classic .nav a.active i,
body.theme-xp-classic .nav a.active i {
    color: #ffffff;
    background: #0a246a;
}

body.theme-xp_classic .hero,
body.theme-xp-classic .hero,
body.theme-xp_classic .dashboard-hero,
body.theme-xp-classic .dashboard-hero {
    color: #000000;
    background: #ece9d8;
}

body.theme-xp_classic .hero::after,
body.theme-xp-classic .hero::after,
body.theme-xp_classic .dashboard-hero::after,
body.theme-xp-classic .dashboard-hero::after {
    display: none;
}

body.theme-xp_classic button,
body.theme-xp-classic button,
body.theme-xp_classic .secondary-button,
body.theme-xp-classic .secondary-button,
body.theme-xp_classic .small-button,
body.theme-xp-classic .small-button,
body.theme-xp_classic .table-action,
body.theme-xp-classic .table-action,
body.theme-xp_classic input,
body.theme-xp-classic input,
body.theme-xp_classic select,
body.theme-xp-classic select,
body.theme-xp_classic textarea,
body.theme-xp-classic textarea {
    border-radius: 0;
    border: 1px solid #808080;
    box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #404040;
    font-family: Tahoma, Arial, sans-serif;
}

body.theme-xp_classic button,
body.theme-xp-classic button,
body.theme-xp_classic .secondary-button,
body.theme-xp-classic .secondary-button,
body.theme-xp_classic .small-button,
body.theme-xp-classic .small-button,
body.theme-xp_classic .table-action,
body.theme-xp-classic .table-action {
    color: #000000;
    background: #ece9d8;
}

body.theme-xp_classic input,
body.theme-xp-classic input,
body.theme-xp_classic select,
body.theme-xp-classic select,
body.theme-xp_classic textarea,
body.theme-xp-classic textarea {
    background: #ffffff;
}

body.theme-xp_classic table,
body.theme-xp-classic table {
    border-collapse: collapse;
    background: #ffffff;
}

body.theme-xp_classic th,
body.theme-xp_classic td,
body.theme-xp-classic th,
body.theme-xp-classic td {
    border: 1px solid #808080;
}

body.theme-xp_classic th,
body.theme-xp-classic th {
    color: #000000;
    background: #ece9d8;
}

body.theme-xp_classic tr:nth-child(even) td,
body.theme-xp-classic tr:nth-child(even) td {
    background: #f7f7f7;
}

body.theme-xp_classic .status-pill,
body.theme-xp-classic .status-pill,
body.theme-xp_classic .language-switcher button,
body.theme-xp-classic .language-switcher button,
body.theme-xp_classic .mobile-bottom-nav,
body.theme-xp-classic .mobile-bottom-nav {
    border-radius: 0;
    border: 1px solid #808080;
    box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #404040;
}

body.theme-xp_classic .widget.accent,
body.theme-xp-classic .widget.accent,
body.theme-xp_classic .success-button,
body.theme-xp-classic .success-button {
    color: #ffffff;
    background: #0a246a;
}

body.theme-xp_classic .danger-button,
body.theme-xp-classic .danger-button {
    color: #ffffff;
    background: #800000;
}

@media (max-width: 900px) {
    body.theme-xp_classic .app,
    body.theme-xp-classic .app {
        margin-left: 0;
    }

    body.theme-xp_classic .sidebar,
    body.theme-xp-classic .sidebar {
        inset: 0 auto 0 0;
        width: min(310px, 86vw);
    }
}

* {
    box-sizing: border-box;
}

html {
    width: 100%;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    background:
        radial-gradient(circle at 18% 8%, rgba(37, 99, 235, 0.13), transparent 28%),
        radial-gradient(circle at 82% 14%, rgba(20, 184, 166, 0.12), transparent 26%),
        linear-gradient(135deg, #f8fafc 0%, #eef4ff 52%, #f7fbff 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.35) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 70%);
}

.mobile-menu {
    display: none;
}

.menu-bars {
    position: relative;
    display: block;
    width: 24px;
    height: 18px;
}

.menu-bars::before,
.menu-bars::after,
.menu-bars {
    border-top: 3px solid currentColor;
}

.menu-bars::before,
.menu-bars::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
}

.menu-bars::before {
    top: 5px;
}

.menu-bars::after {
    top: 13px;
}

.mobile-bottom-nav,
.mobile-dashboard-menu {
    display: none;
}

.sidebar {
    position: fixed;
    inset: 18px auto 18px 18px;
    width: 278px;
    max-width: calc(100vw - 36px);
    padding: 18px;
    color: var(--text);
    background: var(--glass);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 8px 8px 18px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    color: white;
    background: linear-gradient(135deg, #2563eb, #14b8a6);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
    font-weight: 800;
    font-size: 22px;
}

.brand-logo-wrap {
    display: grid;
    place-items: center;
    width: 112px;
    height: 52px;
    flex: 0 0 auto;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.brand-logo {
    display: block;
    width: 96%;
    height: 96%;
    object-fit: contain;
}

.brand-copy {
    min-width: 0;
}

.brand strong {
    display: block;
    font-size: 18px;
    letter-spacing: 0;
}

.brand span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-top: 3px;
}

.nav {
    display: grid;
    gap: 7px;
}

.nav-label {
    margin: 14px 12px 5px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 16px;
    color: #334155;
    text-decoration: none;
    font-size: 14px;
    font-weight: 650;
    transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.nav a i {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    border-radius: 10px;
    color: #475569;
    background: rgba(241, 245, 249, 0.95);
    font-style: normal;
    font-size: 12px;
    font-weight: 800;
}

.nav a:hover,
.nav a.active {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--soft-shadow);
    transform: translateY(-1px);
}

.nav a.active i {
    color: white;
    background: var(--blue);
}

.nav a.disabled {
    color: #94a3b8;
    cursor: default;
}

.nav a.disabled:hover {
    box-shadow: none;
    transform: none;
    background: transparent;
}

.app {
    margin-left: 314px;
    min-height: 100vh;
    min-width: 0;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 102px;
    padding: 22px 32px 16px;
    background: rgba(245, 247, 251, 0.74);
    border-bottom: 1px solid rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.topbar > *,
.content,
.panel,
.hero,
.dashboard-hero,
.grid,
.stats-grid,
.dashboard-strip,
.form-grid,
.inline-actions,
.table-wrap {
    min-width: 0;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--blue);
    font-size: 13px;
    font-weight: 800;
}

h1,
h2 {
    margin: 0;
    letter-spacing: 0;
}

h1 {
    font-size: 30px;
    line-height: 1.12;
}

h2 {
    font-size: 18px;
    margin-bottom: 18px;
}

.topbar-widgets {
    display: grid;
    grid-template-columns: repeat(3, minmax(170px, 1fr));
    gap: 12px;
    align-items: stretch;
    width: min(100%, 720px);
    min-width: 0;
}

.widget {
    min-width: 0;
    max-width: 100%;
    min-height: 68px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 18px;
    background: var(--glass-strong);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.sidebar-language-switcher {
    width: 100%;
    margin-top: 14px;
}

.widget span,
.widget small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.widget strong {
    display: block;
    margin-top: 5px;
    font-size: 15px;
    line-height: 1.3;
}

.widget.accent {
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(236, 253, 245, 0.94));
}

.language-switcher {
    display: inline-grid;
    grid-auto-flow: column;
    gap: 4px;
    align-self: center;
    padding: 5px;
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: 16px;
    background: var(--glass-strong);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.language-switcher button {
    min-width: 38px;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 12px;
    background: transparent;
    color: var(--muted);
    box-shadow: none;
    font-size: 12px;
    font-weight: 900;
}

.language-switcher button.active {
    color: white;
    background: var(--blue);
}

.login-language {
    margin: 0 auto 14px;
}

.content {
    position: relative;
    padding: 28px 32px 40px;
}

.content > .panel,
.content > .hero,
.content > .dashboard-hero,
.content > .grid,
.content > .warehouse-receipt-layout,
.content > .orders-one-column,
.content > .stats-grid,
.content > .dashboard-strip,
.content > .inventory-tabs,
.content > .mobile-dashboard-menu,
.content > .search-panel {
    margin-bottom: 18px;
}

.content > :last-child {
    margin-bottom: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.orders-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card,
.panel,
.hero {
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: 24px;
    box-shadow: var(--soft-shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.stat-card {
    min-height: 156px;
    padding: 18px;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.stat-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.1);
}

.stat-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    margin-bottom: 18px;
    border-radius: 14px;
    color: white;
    font-weight: 800;
}

.stat-icon.blue { background: var(--blue); }
.stat-icon.green { background: var(--green); }
.stat-icon.violet { background: var(--violet); }
.stat-icon.orange { background: var(--orange); }

.stat-card span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.stat-card strong {
    display: block;
    margin-top: 8px;
    font-size: 30px;
    line-height: 1.08;
}

.stat-card strong span {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

.line-detail-grid {
    align-items: start;
}

.line-detail-card {
    overflow: hidden;
}

.line-detail-card summary {
    display: block;
    cursor: pointer;
    list-style: none;
}

.line-detail-card summary::-webkit-details-marker {
    display: none;
}

.line-detail-card summary::after {
    content: "Batafsil";
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    margin-top: 12px;
    padding: 0 10px;
    border-radius: 999px;
    color: #1d4ed8;
    background: rgba(219, 234, 254, 0.92);
    font-size: 12px;
    font-weight: 850;
}

.line-detail-card[open] summary::after {
    content: "Yopish";
    color: #0f766e;
    background: rgba(204, 251, 241, 0.92);
}

.line-detail-body {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

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

.line-model-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.76);
}

.line-model-item strong {
    margin: 0 0 4px;
    font-size: 15px;
}

.line-model-item span,
.line-model-item small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.4;
}

.line-model-numbers {
    display: grid;
    align-content: start;
    gap: 5px;
    min-width: 92px;
}

.line-model-numbers span {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: #334155;
}

.sewing-allocation-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(310px, 360px);
    gap: 18px;
    align-items: start;
}

.sewing-line-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 0;
}

.sewing-line-grid .stat-card {
    min-height: 150px;
}

.quick-allocate-panel {
    position: sticky;
    top: 122px;
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: var(--soft-shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.panel-title-row.compact {
    align-items: start;
    margin-bottom: 0;
}

.panel-title-row.compact h2 {
    font-size: 18px;
}

.quick-allocate-list {
    display: grid;
    gap: 12px;
    max-height: 680px;
    overflow: auto;
    padding-right: 2px;
}

.quick-allocate-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.82);
}

.receipt-add-line-button {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
    box-shadow: 0 10px 20px rgba(220, 38, 38, 0.18);
}

.receipt-add-line-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.receipt-add-line-button:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

.expense-lines {
    display: grid;
    gap: 8px;
    min-width: min(520px, 100%);
}

.expense-line {
    display: grid;
    grid-template-columns: minmax(130px, 1fr) minmax(110px, 0.75fr) minmax(105px, 0.6fr) auto;
    gap: 8px;
    align-items: end;
}

.expense-line input {
    min-width: 0;
}

.pricing-expense-row td {
    background: rgba(248, 250, 252, 0.76);
    border-top: 0;
}

.approved-detail-row > td {
    padding: 16px;
    white-space: normal;
}

.approved-detail-row .pricing-expense-panel,
.approved-detail-row .inline-edit,
.approved-detail-row .pricing-material-breakdown,
.approved-detail-row .approved-detail-grid {
    width: 100%;
    max-width: 100%;
}

.pricing-summary-row {
    cursor: pointer;
}

.pricing-summary-row:hover td {
    background: rgba(239, 246, 255, 0.72);
}

.pricing-summary-row[aria-expanded="true"] td {
    background: rgba(219, 234, 254, 0.68);
}

.pricing-expense-panel {
    display: grid;
    gap: 12px;
    width: 100%;
}

.pricing-expense-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #0f172a;
}

.pricing-expense-header span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.pricing-material-breakdown {
    margin: 0;
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 8px;
    background: rgba(248, 250, 252, 0.78);
}

.director-pricing-card {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.compact-pricing-director-table {
    min-width: 900px;
}

.compact-pricing-director-table th,
.compact-pricing-director-table td {
    vertical-align: middle;
}

.previous-price-cell {
    min-width: 118px;
}

.previous-price-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.previous-price-compact > strong {
    color: #15803d;
}

.previous-price-details {
    position: relative;
}

.previous-price-details summary {
    min-height: 26px;
    padding: 5px 8px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 6px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

.previous-price-details summary::-webkit-details-marker {
    display: none;
}

.previous-price-list {
    position: absolute;
    z-index: 20;
    top: calc(100% + 6px);
    left: 0;
    display: grid;
    gap: 4px;
    width: 260px;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.previous-price-list a {
    display: grid;
    grid-template-columns: 82px 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 6px 8px;
    border-radius: 6px;
    color: #0f172a;
    font-size: 12px;
    text-decoration: none;
}

.previous-price-list a:hover {
    background: #f8fafc;
}

.factory-expense-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border: 1px solid rgba(245, 158, 11, 0.24);
    border-radius: 8px;
    background: #fffbeb;
    color: #78350f;
    font-size: 12px;
}

.factory-expense-note strong {
    font-size: 13px;
}

.factory-expense-note span {
    color: #92400e;
    font-weight: 700;
}

.checkbox-card,
.inline-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #334155;
}

.checkbox-card {
    min-height: 42px;
    padding: 9px 10px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 8px;
    background: #f8fafc;
}

.checkbox-card input,
.inline-checkbox input {
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
}

.director-detail-row > td {
    padding: 0 !important;
    background: rgba(248, 250, 252, 0.72);
}

.director-detail-row .director-pricing-card {
    padding: 10px;
}

.director-pricing-workbench {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.director-pricing-visual {
    min-height: 250px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
}

.director-pricing-visual img {
    display: block;
    width: 100%;
    height: 250px;
    object-fit: contain;
    background: #fff;
}

.director-pricing-no-image {
    display: grid;
    min-height: 250px;
    place-items: center;
    padding: 14px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}

.director-pricing-main {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.director-expense-section {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
}

.director-pricing-summary {
    display: grid;
    grid-template-columns: 120px minmax(170px, 1fr) 120px 90px 95px 90px;
    gap: 0;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(248, 250, 252, 0.82);
}

.director-pricing-summary div {
    min-width: 0;
    padding: 7px 9px;
    border-right: 1px solid rgba(148, 163, 184, 0.2);
}

.director-pricing-summary div:last-child {
    border-right: 0;
}

.director-pricing-summary .director-pricing-order-cell {
    background: rgba(239, 246, 255, 0.92);
}

.director-pricing-summary span {
    display: block;
    margin-bottom: 2px;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

.director-pricing-summary strong {
    display: block;
    min-width: 0;
    color: #0f172a;
    font-size: 12px;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 1200px) {
    .director-pricing-summary {
        grid-template-columns: repeat(3, minmax(120px, 1fr));
    }

    .director-pricing-summary div:nth-child(3n) {
        border-right: 0;
    }
}

@media (max-width: 760px) {
    .director-pricing-workbench {
        grid-template-columns: 1fr;
    }

    .director-pricing-visual,
    .director-pricing-no-image {
        min-height: 180px;
    }

    .director-pricing-visual img {
        height: 180px;
    }

    .director-pricing-summary {
        grid-template-columns: repeat(2, minmax(110px, 1fr));
    }

    .director-pricing-summary div:nth-child(3n) {
        border-right: 1px solid rgba(148, 163, 184, 0.2);
    }

    .director-pricing-summary div:nth-child(2n) {
        border-right: 0;
    }
}

.pricing-material-breakdown > strong {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
}

.pricing-material-breakdown table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
    table-layout: fixed;
}

.pricing-material-breakdown .compact-input {
    width: 76px;
    min-width: 0;
    padding: 5px 6px;
    font-size: 12px;
    text-align: right;
}

.pricing-material-breakdown .material-real-input {
    width: 82px;
}

.pricing-material-breakdown .material-price-input {
    width: 72px;
}

.pricing-material-breakdown th,
.pricing-material-breakdown td {
    padding: 6px 7px;
    font-size: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    white-space: normal;
    word-break: break-word;
}

.pricing-expense-summary-table {
    min-width: 230px;
    max-width: 360px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(248, 250, 252, 0.82);
}

.pricing-expense-summary-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(239, 246, 255, 0.9);
    border-bottom: 1px solid rgba(148, 163, 184, 0.24);
}

.pricing-expense-summary-title strong {
    font-size: 12px;
    color: #0f172a;
}

.pricing-expense-summary-title span {
    font-size: 13px;
    font-weight: 900;
    color: #0f172a;
    white-space: nowrap;
}

.pricing-expense-summary-list {
    display: grid;
}

.pricing-expense-summary-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    font-size: 12px;
}

.pricing-expense-summary-item:last-child {
    border-bottom: 0;
}

.pricing-expense-summary-item span {
    min-width: 0;
    color: #334155;
    overflow-wrap: anywhere;
}

.pricing-expense-summary-item strong {
    color: #0f172a;
    font-weight: 900;
    white-space: nowrap;
    text-align: right;
}

.pricing-expense-summary-table table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.pricing-expense-summary-table th,
.pricing-expense-summary-table td {
    padding: 7px 10px;
    font-size: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    white-space: normal;
    word-break: break-word;
}

.pricing-expense-summary-table th {
    color: #64748b;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.72);
}

.pricing-expense-summary-table th:last-child,
.pricing-expense-summary-table td:last-child {
    width: 108px;
    text-align: right;
    white-space: nowrap;
}

.pricing-expense-summary-table tbody tr:last-child td {
    border-bottom: 0;
}

.approved-detail-grid {
    display: grid;
    grid-template-columns: minmax(520px, 1.35fr) minmax(300px, 0.8fr);
    gap: 14px;
    align-items: start;
    margin-bottom: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.approved-detail-grid > * {
    min-width: 0;
}

.approved-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
}

.approved-actions-row form {
    margin: 0;
}

.pricing-costing-cell {
    min-width: 230px;
    white-space: nowrap;
}

.pricing-costing-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    min-width: max-content;
}

.pricing-costing-actions form {
    margin: 0;
}

.pricing-costing-actions .status-pill {
    min-height: 26px;
    padding: 0 8px;
    white-space: nowrap;
}

.pricing-costing-actions .small-button,
.pricing-costing-actions .secondary-button,
.pricing-costing-actions button {
    min-height: 26px;
    padding: 5px 8px;
    line-height: 1;
    white-space: nowrap;
}

.pricing-expense-lines {
    min-width: 0;
}

.pricing-expense-line {
    grid-template-columns: minmax(220px, 1.2fr) minmax(150px, 0.75fr) minmax(130px, 0.55fr) auto;
}

.pricing-expense-actions {
    display: grid;
    grid-template-columns: repeat(2, 38px);
    gap: 6px;
    align-items: center;
}

.pricing-expense-actions .small-button {
    width: 38px;
    min-width: 38px;
    padding: 0;
    justify-content: center;
    font-size: 18px;
    font-weight: 900;
}

.pricing-expense-footer {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: end;
    gap: 8px;
    align-items: center;
}

.pricing-expense-footer input,
.pricing-expense-footer select {
    min-width: 0;
}

.pricing-director-footer {
    display: grid;
    grid-template-columns: minmax(110px, 0.55fr) minmax(120px, 0.6fr) minmax(120px, 0.6fr) minmax(170px, 1fr) auto auto;
    gap: 8px;
    align-items: center;
}

.pricing-director-footer input,
.pricing-director-footer select {
    min-width: 0;
}

.cutting-material-lines {
    display: grid;
    gap: 8px;
}

.cutting-material-line {
    display: grid;
    grid-template-columns: 34px minmax(120px, 0.45fr) minmax(360px, 1.8fr) minmax(80px, 0.35fr) minmax(80px, 0.35fr) minmax(112px, 0.45fr) minmax(86px, 0.35fr) minmax(150px, 0.65fr) minmax(112px, 0.5fr) auto;
    gap: 8px;
    align-items: end;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 8px;
    background: rgba(248, 250, 252, 0.72);
}

.cutting-material-line label {
    min-width: 0;
}

.cutting-stock-outgoing-line {
    grid-template-columns: 34px minmax(130px, 0.28fr) minmax(420px, 1fr) minmax(92px, 0.22fr) auto;
}

.cutting-stock-search-label {
    min-width: 120px;
    max-width: 160px;
}

.cutting-stock-model-label {
    min-width: 360px;
}

.cutting-stock-qty-label {
    max-width: 130px;
}

.cutting-material-search-label {
    min-width: 0;
}

.cutting-material-party-label {
    min-width: 320px;
}

.material-row-number {
    align-self: center;
    color: var(--text);
    font-weight: 900;
    font-size: 15px;
}

.material-actions {
    align-self: center;
}

.material-mini-list {
    display: grid;
    gap: 0;
    min-width: 150px;
}

.material-mini-row,
.material-send-row {
    display: grid;
    grid-template-columns: minmax(54px, 0.35fr) minmax(0, 1fr);
    gap: 5px;
    align-items: center;
    min-height: 24px;
    padding: 2px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.material-send-row {
    grid-template-columns: 1fr;
    gap: 0;
    justify-items: center;
}

.material-mini-row:last-child,
.material-send-row:last-of-type {
    border-bottom: 0;
}

.material-mini-row span,
.material-send-row span {
    color: var(--muted);
    font-size: 12px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.material-send-row .send-row-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.compact-material-list {
    min-width: 0;
}

.compact-material-list .material-mini-row {
    display: flex;
    justify-content: center;
    min-height: 24px;
    padding: 2px 0;
}

.compact-material-list .material-mini-row span {
    overflow-wrap: normal;
}

.compact-material-list .status-pill {
    min-height: 22px;
    padding: 3px 7px;
    white-space: nowrap;
}

.material-send-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    min-width: 118px;
    align-items: start;
}

.material-send-form .small-button {
    width: 76px;
    justify-self: center;
}

.material-send-row input[type="number"] {
    width: 46px;
    min-height: 22px;
    padding: 2px 5px;
    text-align: center;
}

.material-send-row span {
    font-size: 11px;
    line-height: 1.12;
}

.compact-send-date {
    min-height: 26px !important;
    padding: 4px 6px !important;
    font-size: 11px !important;
}

.compact-send-button {
    min-height: 26px !important;
    padding: 4px 6px !important;
    font-size: 11px !important;
}

.material-gramaj-pill,
.material-diff-pill,
.batch-result-kg-pill {
    align-self: center;
    justify-content: center;
    min-height: 42px;
    white-space: nowrap;
}

.cutting-batch-result-line {
    grid-template-columns:
        30px
        minmax(112px, 0.62fr)
        minmax(150px, 0.78fr)
        minmax(120px, 0.55fr)
        minmax(82px, 0.34fr)
        minmax(70px, 0.26fr)
        minmax(78px, 0.28fr)
        minmax(86px, 0.3fr)
        minmax(86px, 0.3fr)
        minmax(78px, 0.28fr)
        minmax(82px, 0.3fr)
        76px;
    gap: 6px;
    align-items: end;
}

.cutting-batch-result-line label {
    display: grid;
    gap: 5px;
}

.cutting-batch-result-line .batch-result-kg-pill,
.cutting-batch-result-line .status-pill.pending.batch-result-kg-pill {
    align-self: end;
    min-height: 42px;
    height: 42px;
    padding: 5px 7px;
    border-radius: 7px;
    border: 1px solid var(--border);
    background: rgba(240, 253, 244, 0.92);
    color: #047857;
    font-weight: 800;
    box-sizing: border-box;
    font-size: 11px;
    white-space: nowrap;
}

.cutting-batch-result-line .material-actions {
    align-self: end;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.batch-result-total-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin: 8px 0 10px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(240, 253, 244, 0.92);
    color: #047857;
    font-weight: 800;
}

.batch-result-total-row span {
    color: inherit;
}

.batch-result-total-row strong {
    font-size: 18px;
}

.compact-accept-order-button {
    min-height: 30px !important;
    padding: 5px 10px !important;
    font-size: 12px !important;
    white-space: nowrap;
}

.compact-size-cell {
    min-width: 130px;
    max-width: 260px;
    vertical-align: top;
}

.compact-size-details {
    position: relative;
    max-width: 260px;
}

.compact-size-details summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 28px;
    padding: 5px 9px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 7px;
    background: rgba(239, 246, 255, 0.96);
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
    white-space: nowrap;
}

.compact-size-details summary::-webkit-details-marker {
    display: none;
}

.compact-size-details summary::after {
    content: "▾";
    font-size: 10px;
    color: #64748b;
}

.compact-size-details[open] summary {
    margin-bottom: 6px;
    background: #2563eb;
    color: #ffffff;
}

.compact-size-details[open] summary::after {
    color: #ffffff;
}

.compact-size-details summary span {
    min-width: 20px;
    padding: 1px 5px;
    border-radius: 999px;
    background: #ffffff;
    color: #1d4ed8;
    text-align: center;
    font-size: 11px;
}

.compact-size-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-width: 260px;
    line-height: 1.1;
}

.compact-size-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-height: 22px;
    padding: 3px 6px;
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 6px;
    background: rgba(239, 246, 255, 0.92);
    color: #1e40af;
    white-space: nowrap;
    font-size: 11px;
    font-weight: 800;
}

.compact-size-chip small {
    max-width: 54px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
}

.compact-size-chip strong {
    color: #0f172a;
}

.compact-size-chip em {
    min-width: 20px;
    padding: 1px 4px;
    border-radius: 999px;
    background: #ffffff;
    color: #047857;
    font-style: normal;
    text-align: center;
}

.cutting-order-accepted-pill {
    display: inline-flex;
    margin-right: 6px;
    margin-bottom: 4px;
    background: rgba(224, 242, 254, 0.96) !important;
    color: #0369a1 !important;
    border: 1px solid rgba(14, 165, 233, 0.35) !important;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.compact-title-row {
    margin-top: 8px;
    margin-bottom: 8px;
}

.preline-note {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    white-space: pre-line;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.35;
}

.quick-allocate-info {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.quick-allocate-info span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.quick-allocate-info strong {
    color: #0f172a;
    font-size: 13px;
    text-align: right;
}

.quick-allocate-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 10px;
}

.quick-allocate-form button {
    grid-column: 1 / -1;
    width: 100%;
}

.qr-transfer-panel {
    display: grid;
    grid-template-columns: minmax(340px, 0.85fr) minmax(420px, 1.15fr);
    gap: 18px;
    align-items: start;
}

.qr-search-panel {
    display: grid;
    grid-template-columns: minmax(340px, 0.82fr) minmax(460px, 1.18fr);
    gap: 18px;
    align-items: start;
}

.qr-scanner-card,
.qr-result-card {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 20px;
    background: rgba(248, 250, 252, 0.82);
}

.qr-video-wrap {
    position: relative;
    min-height: 260px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 18px;
    background: #0f172a;
}

.qr-video-wrap video,
.qr-video-placeholder {
    width: 100%;
    height: 100%;
    min-height: 260px;
}

.qr-video-wrap video {
    display: block;
    object-fit: cover;
}

.qr-video-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 22px;
    color: #e2e8f0;
    text-align: center;
    font-weight: 800;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.72), rgba(30, 64, 175, 0.52)),
        repeating-linear-gradient(90deg, transparent, transparent 18px, rgba(255, 255, 255, 0.05) 18px, rgba(255, 255, 255, 0.05) 19px);
}

.qr-code-form,
.qr-send-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.qr-code-form label,
.qr-send-form label {
    min-width: 0;
}

.qr-code-form button,
.qr-send-form button {
    align-self: end;
}

.qr-result-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.qr-result-summary div {
    display: grid;
    gap: 4px;
    min-height: 68px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
}

.qr-result-summary span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.qr-result-summary strong {
    color: #0f172a;
    overflow-wrap: anywhere;
}

.panel {
    padding: 22px;
}

.hero,
.dashboard-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 132px;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(239, 246, 255, 0.76)),
        radial-gradient(circle at 95% 10%, rgba(37, 99, 235, 0.14), transparent 26%);
}

.hero > div,
.dashboard-hero > div {
    min-width: 0;
}

.hero h1,
.dashboard-hero h2 {
    margin: 4px 0 8px;
    font-size: 28px;
    line-height: 1.12;
}

.hero p,
.dashboard-hero p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.panel > h2:first-child,
.panel-title-row h2 {
    margin-bottom: 0;
}

.panel > h2:first-child:not(:only-child) {
    margin-bottom: 18px;
}

.panel > .success:last-child,
.panel > .error:last-child,
.panel > .form-note:last-child {
    margin-bottom: 0;
}

.soft-panel {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(239, 246, 255, 0.72));
}

.grid.two {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: start;
}

.grid.two.cash-two {
    grid-template-columns: minmax(360px, 0.95fr) minmax(420px, 1.05fr);
}

.cash-expense-groups th,
.cash-expense-groups td {
    white-space: normal;
}

.cash-expense-details summary {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-height: 44px;
    cursor: pointer;
    list-style: none;
}

.cash-expense-details summary::-webkit-details-marker {
    display: none;
}

.cash-expense-summary-name {
    min-width: 120px;
    font-weight: 800;
    color: var(--text);
}

.cash-expense-summary-money {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.cash-expense-summary-money strong {
    color: var(--text);
}

.cash-expense-open {
    margin-left: auto;
}

.cash-expense-details[open] > summary {
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.cash-expense-details > .table-wrap {
    margin-top: 10px;
}

.dashboard-grid {
    margin-top: 0;
}

.inventory-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.inventory-tabs a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 14px;
    color: #1e293b;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--soft-shadow);
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
}

.inventory-tabs a.active {
    color: white;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.search-panel {
    margin-bottom: 18px;
}

.search-form {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
}

.search-form label {
    min-width: min(420px, 100%);
    flex: 1;
}

.clear-link {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 14px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
}

.dashboard-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(239, 246, 255, 0.76)),
        radial-gradient(circle at 95% 10%, rgba(37, 99, 235, 0.14), transparent 26%);
    box-shadow: var(--soft-shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.dashboard-hero h2 {
    margin: 4px 0 8px;
    font-size: 28px;
}

.dashboard-hero p {
    max-width: 620px;
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.hero-kicker {
    color: var(--blue);
    font-size: 13px;
    font-weight: 850;
}

.hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-actions a,
.panel-title-row a {
    color: var(--blue);
    text-decoration: none;
    font-weight: 800;
}

.hero-actions a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--soft-shadow);
}

.dashboard-stats .stat-card small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.dashboard-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.dashboard-strip div {
    min-height: 92px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: var(--soft-shadow);
}

.dashboard-strip span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.dashboard-strip strong {
    display: block;
    margin-top: 10px;
    font-size: 20px;
}

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

.panel-title-row > * {
    min-width: 0;
}

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

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
}

.process-steps div,
.color-stock div {
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.76);
}

.process-steps span {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    margin-bottom: 12px;
    border-radius: 12px;
    color: #475569;
    background: rgba(226, 232, 240, 0.9);
    font-weight: 850;
}

.process-steps .done span {
    color: white;
    background: var(--green);
}

.process-steps strong,
.process-steps small,
.color-stock span,
.color-stock strong {
    display: block;
}

.process-steps small {
    margin-top: 5px;
    color: var(--muted);
}

.color-stock {
    display: grid;
    gap: 10px;
}

.color-stock div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.color-stock span {
    color: var(--muted);
    font-weight: 800;
}

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

.form.compact {
    margin-top: 24px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

label {
    display: grid;
    gap: 7px;
    color: #334155;
    font-size: 13px;
    font-weight: 750;
}

input,
select,
textarea {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 14px;
    padding: 12px 13px;
    color: var(--text);
    font: inherit;
    background: rgba(255, 255, 255, 0.86);
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input[type="checkbox"],
input[type="radio"] {
    -webkit-appearance: auto;
    appearance: auto;
    width: 18px;
    max-width: 18px;
    height: 18px;
    min-height: 18px;
    padding: 0;
    border-radius: 4px;
    accent-color: var(--blue);
    flex: 0 0 18px;
}

input[type="radio"] {
    border-radius: 50%;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(37, 99, 235, 0.55);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    background: white;
}

textarea {
    min-height: 104px;
    resize: vertical;
}

button,
.secondary-button {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    width: fit-content;
    border: 0;
    border-radius: 14px;
    padding: 12px 18px;
    text-decoration: none;
    line-height: 1;
    color: white;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.22);
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

button:disabled,
button[disabled] {
    cursor: not-allowed;
    opacity: 0.58;
    transform: none;
    box-shadow: none;
}

button:hover,
.secondary-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.28);
}

.calculation,
.workflow,
.progress-list {
    display: grid;
    gap: 10px;
}

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

.calculation span,
.workflow div,
.progress-list div {
    padding: 13px 14px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.78);
}

.progress-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.progress-list span {
    color: var(--muted);
    font-weight: 750;
}

.progress-list strong {
    font-size: 14px;
}

.table-wrap {
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    border-radius: 18px;
    border: 1px solid rgba(226, 232, 240, 0.74);
    background: rgba(255, 255, 255, 0.54);
}

table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.5);
}

.accepted-sales-compact-table {
    width: 100%;
    min-width: 1080px;
    table-layout: auto;
}

.accepted-sales-compact-table th,
.accepted-sales-compact-table td {
    height: 44px;
    padding: 9px 10px;
}

.accepted-sales-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: max-content;
}

.accepted-sales-actions > form,
.accepted-sales-actions > details {
    margin: 0;
}

.accepted-sales-actions .table-action,
.accepted-sales-actions .small-button {
    height: 32px;
    min-height: 32px;
    margin: 0;
}

th,
td {
    height: 52px;
    padding: 13px 14px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.78);
    text-align: left;
    white-space: nowrap;
}

tr:last-child td {
    border-bottom: 0;
}

th {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
    background: rgba(248, 250, 252, 0.72);
}

.table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    white-space: nowrap;
    padding: 0 10px;
    border-radius: 10px;
    color: var(--blue);
    background: rgba(239, 246, 255, 0.92);
    text-decoration: none;
    font-size: 12px;
    font-weight: 850;
}

input[data-report-part-checkbox] {
    width: 18px;
    height: 18px;
    padding: 0;
    accent-color: var(--blue);
}

.table-check-label {
    display: inline-flex;
    grid-template-columns: none;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 850;
}

.table-check-label input {
    width: 16px;
    height: 16px;
    padding: 0;
    accent-color: var(--blue);
}

.report-table-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: min(460px, 100%);
}

.report-table-search input {
    min-width: min(320px, 100%);
    flex: 1;
}

.report-collapsible {
    overflow: hidden;
}

.report-collapsible-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(90px, 140px) 24px;
    align-items: center;
    gap: 16px;
    padding: 4px 0;
    cursor: pointer;
    list-style: none;
}

.report-collapsible-summary > span {
    width: 100%;
    text-align: center;
    justify-self: center;
}

.report-collapsible-summary::-webkit-details-marker {
    display: none;
}

.report-collapsible-summary::after {
    content: "+";
    color: var(--blue);
    font-size: 22px;
    font-weight: 900;
}

.report-collapsible[open] > .report-collapsible-summary::after {
    content: "−";
}

.report-collapsible-body {
    margin-top: 18px;
}

tfoot .report-total-row td,
.report-total-row td {
    background: rgba(239, 246, 255, 0.72);
    font-weight: 850;
}

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

.status-pill.pending {
    color: #92400e;
    background: rgba(254, 243, 199, 0.92);
}

.status-pill.accepted {
    color: #166534;
    background: rgba(220, 252, 231, 0.92);
}

.status-pill.rejected {
    color: #991b1b;
    background: rgba(254, 226, 226, 0.92);
}

.status-pill.diff-negative {
    color: #991b1b;
    background: rgba(254, 226, 226, 0.92);
}

.status-pill.diff-positive {
    color: #075985;
    background: rgba(224, 242, 254, 0.95);
}

html body .status-pill.plain-number {
    display: inline !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: inherit !important;
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    letter-spacing: inherit !important;
}

.client-rating {
    min-width: 74px;
    justify-content: center;
}

.client-rating.yaxshi {
    color: #166534;
    background: rgba(220, 252, 231, 0.95);
}

.client-rating.orta {
    color: #92400e;
    background: rgba(254, 243, 199, 0.95);
}

.client-rating.yomon {
    color: #991b1b;
    background: rgba(254, 226, 226, 0.95);
}

.client-rating-text {
    font: inherit;
    font-weight: 700;
    white-space: nowrap;
}

.client-rating-text.yaxshi {
    color: #2563eb;
}

.client-rating-text.orta {
    color: inherit;
}

.client-rating-text.yomon {
    color: #dc2626;
}

.client-stats-grid {
    margin-bottom: 0;
}

.inline-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-width: max-content;
}

.inline-actions form {
    margin: 0;
}

.inline-actions input,
.inline-actions select {
    min-width: 118px;
    max-width: 220px;
}

.inline-actions button,
.inline-actions .secondary-button,
.inline-actions .table-action {
    flex: 0 0 auto;
}

.cutting-actions {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 4px;
    min-width: 88px;
    flex-wrap: nowrap;
}

.cutting-actions .table-action,
.cutting-actions .small-button {
    min-height: 28px;
    width: 100%;
    white-space: nowrap;
    justify-content: center;
}

.cutting-actions form {
    display: contents;
}

.cutting-actions .qr-action {
    color: #0f766e;
    background: rgba(204, 251, 241, 0.92);
}

.cutting-orders-wrap {
    max-width: 100%;
}

.cutting-orders-table {
    min-width: 1440px;
    table-layout: fixed;
}

.cutting-orders-table th,
.cutting-orders-table td {
    vertical-align: top;
    padding-top: 6px;
    padding-bottom: 6px;
}

.cutting-orders-table th {
    vertical-align: middle;
    white-space: normal;
    line-height: 1.12;
    word-break: keep-all;
    padding-left: 6px;
    padding-right: 6px;
}

.cutting-orders-table td:nth-child(1),
.cutting-orders-table td:nth-child(2),
.cutting-orders-table td:nth-child(3),
.cutting-orders-table td:nth-child(4),
.cutting-orders-table td:nth-child(6),
.cutting-orders-table td:nth-child(17) {
    vertical-align: middle;
}

.cutting-orders-table th:nth-child(1),
.cutting-orders-table td:nth-child(1) { width: 92px; }
.cutting-orders-table th:nth-child(2),
.cutting-orders-table td:nth-child(2) { width: 92px; }
.cutting-orders-table th:nth-child(3),
.cutting-orders-table td:nth-child(3) { width: 154px; }
.cutting-orders-table th:nth-child(4),
.cutting-orders-table td:nth-child(4) { width: 142px; }
.cutting-orders-table th:nth-child(5),
.cutting-orders-table td:nth-child(5) { width: 172px; }
.cutting-orders-table th:nth-child(6),
.cutting-orders-table td:nth-child(6) { width: 108px; }
.cutting-orders-table th:nth-child(7),
.cutting-orders-table td:nth-child(7) { width: 76px; }
.cutting-orders-table th:nth-child(8),
.cutting-orders-table td:nth-child(8),
.cutting-orders-table th:nth-child(9),
.cutting-orders-table td:nth-child(9),
.cutting-orders-table th:nth-child(10),
.cutting-orders-table td:nth-child(10),
.cutting-orders-table th:nth-child(11),
.cutting-orders-table td:nth-child(11),
.cutting-orders-table th:nth-child(12),
.cutting-orders-table td:nth-child(12),
.cutting-orders-table th:nth-child(13),
.cutting-orders-table td:nth-child(13),
.cutting-orders-table th:nth-child(14),
.cutting-orders-table td:nth-child(14),
.cutting-orders-table th:nth-child(15),
.cutting-orders-table td:nth-child(15) {
    width: 72px;
    text-align: center;
}
.cutting-orders-table th:nth-child(16),
.cutting-orders-table td:nth-child(16) { width: 126px; }
.cutting-orders-table th:nth-child(17),
.cutting-orders-table td:nth-child(17) { width: 96px; }

.cutting-orders-table td:nth-child(3),
.cutting-orders-table td:nth-child(4),
.cutting-orders-table td:nth-child(5),
.cutting-orders-table td:nth-child(6) {
    white-space: normal;
    line-height: 1.35;
}

.cutting-date-cell {
    white-space: nowrap;
    font-weight: 800;
}

.cutting-send-form {
    display: grid;
    grid-template-columns: 1fr 58px;
    gap: 4px;
    align-items: center;
    min-width: 132px;
}

.cutting-send-form input {
    min-height: 26px;
    padding: 4px 6px;
    border-radius: 8px;
    font-size: 11px;
}

.cutting-send-form button {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 26px;
}

.cutting-send-form.material-send-form {
    grid-template-columns: 1fr;
    gap: 0;
    justify-items: center;
    align-items: start;
    min-width: 80px;
}

.cutting-send-form.material-send-form .material-send-row {
    width: 100%;
}

.cutting-send-form.material-send-form .compact-send-button {
    grid-column: auto;
    width: 70px;
    margin-top: 4px;
}

.allocation-actions {
    align-items: flex-start;
    min-width: 220px;
}

.allocation-actions .inline-edit {
    margin-bottom: 0;
}

.allocation-actions .inline-edit form {
    min-width: 300px;
}

.inline-edit {
    display: grid;
    gap: 8px;
    margin-bottom: 8px;
}

.inline-edit summary {
    cursor: pointer;
    list-style: none;
}

.inline-edit summary::-webkit-details-marker {
    display: none;
}

.inline-edit form {
    max-width: 460px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.9);
}

.small-button {
    min-height: 32px;
    padding: 7px 10px;
    border-radius: 10px;
    font-size: 12px;
    box-shadow: none;
}

.success-button {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

.danger-button {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
}

.text-danger {
    color: #dc2626;
}

.permission-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin: 12px 0;
}

.permission-list.compact {
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    min-width: 360px;
}

.table-permission-list {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    min-width: 260px;
    gap: 6px;
    margin: 0 0 6px;
}

.table-permission-list .check-row {
    min-height: 30px;
    padding: 5px 7px;
    font-size: 12px;
    border-radius: 8px;
}

.field-title {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.form-field-wide {
    display: grid;
    grid-column: 1 / -1;
    gap: 8px;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 8px 10px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.72);
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
    min-width: 0;
    height: auto;
    white-space: normal;
}

/* Long module names must wrap inside their own checkbox tile in every theme. */
body .permission-list .check-row {
    min-width: 0 !important;
    height: auto !important;
    white-space: normal !important;
}

body .check-row > span {
    min-width: 0;
    flex: 1 1 auto;
    white-space: normal !important;
    overflow-wrap: anywhere;
    text-overflow: clip;
}

/* Keep permission controls usable inside horizontally scrollable tables. */
body td .permission-list {
    min-width: 240px !important;
}

.check-row input {
    width: 18px;
    max-width: 18px;
    height: 18px;
    min-height: 18px;
    accent-color: var(--blue);
    flex: 0 0 18px;
}

.cutting-table-checks {
    display: grid;
    gap: 8px;
    align-self: end;
}

.compact-check-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(72px, 1fr));
    gap: 8px;
}

.cutting-batch-issue-grid {
    grid-template-columns:
        minmax(118px, 0.45fr)
        minmax(190px, 0.65fr)
        minmax(420px, 1.75fr)
        minmax(140px, 0.45fr)
        minmax(380px, 1.2fr)
        minmax(180px, 0.55fr);
    gap: 8px;
    align-items: end;
}

.cutting-batch-issue-grid label,
.cutting-batch-issue-actions,
.cutting-table-checks {
    min-width: 0;
}

.cutting-batch-issue-grid input,
.cutting-batch-issue-grid select {
    min-height: 42px;
}

.cutting-batch-issue-grid .compact-check-grid {
    gap: 6px;
}

.cutting-batch-issue-grid .check-row {
    min-height: 42px;
    padding: 8px;
    white-space: nowrap;
}

.cutting-batch-issue-actions {
    display: grid;
    gap: 8px;
    align-self: end;
    justify-self: end;
    width: 180px;
    justify-items: end;
}

.cutting-batch-issue-actions button {
    width: 96px !important;
    max-width: 96px !important;
    min-height: 42px !important;
    padding: 0 8px !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
    border-color: rgba(185, 28, 28, 0.72) !important;
    box-shadow: 0 10px 20px rgba(220, 38, 38, 0.2) !important;
    white-space: normal;
    line-height: 1.05;
}

.cutting-batch-issue-actions button:hover {
    background: linear-gradient(135deg, #dc2626, #991b1b) !important;
    box-shadow: 0 12px 24px rgba(220, 38, 38, 0.24) !important;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.section-heading h2 {
    margin: 0;
}

.warehouse-receipt-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.orders-one-column {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.receipt-head-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.receipt-lines {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.receipt-lines-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.receipt-total-weight {
    margin-left: auto;
    padding: 7px 12px;
    border: 1px solid rgba(37, 99, 235, 0.22);
    border-radius: 10px;
    background: rgba(239, 246, 255, 0.9);
    color: #1e3a8a;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.receipt-total-weight strong {
    font-size: 15px;
}

.receipt-line-grid {
    display: grid;
    grid-template-columns: 0.9fr 1fr 1.25fr 1fr 0.9fr 0.85fr 0.75fr 0.65fr 0.75fr auto;
    gap: 8px;
    align-items: center;
}

.receipt-line-title {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    padding: 0 2px;
}

.receipt-line-grid input {
    width: 100%;
    min-width: 0;
}

.dg-receipt-line-grid {
    grid-template-columns: 1.45fr 1fr 1fr 0.75fr 0.9fr 1.2fr auto;
}

@media (max-width: 900px) {
    .dg-receipt-line-grid {
        grid-template-columns: 1fr;
        padding: 12px;
        border: 1px solid rgba(148, 163, 184, 0.35);
        border-radius: 10px;
        background: rgba(248, 250, 252, 0.8);
    }

    .dg-receipt-line-grid.receipt-line-title {
        display: none;
    }
}

.outgoing-line-grid {
    display: grid;
    grid-template-columns: 1fr 2.2fr 0.8fr auto;
    gap: 8px;
    align-items: center;
}

.outgoing-line-grid input,
.outgoing-line-grid select {
    width: 100%;
    min-width: 0;
}

.fabric-outgoing-search-box {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.fabric-outgoing-search-box small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
}

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

.receipt-group-header {
    display: grid;
    grid-template-columns: 1fr 1fr 0.7fr 0.7fr 1.2fr;
    gap: 12px;
    padding: 0 14px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.receipt-group {
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.68);
    overflow: hidden;
}

.receipt-group summary {
    display: grid;
    grid-template-columns: 1fr 1fr 0.7fr 0.7fr 1.2fr;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    cursor: pointer;
    list-style: none;
}

.receipt-group summary::-webkit-details-marker {
    display: none;
}

.receipt-group-header.outgoing-group-header,
.receipt-group summary.outgoing-group-summary {
    grid-template-columns: 0.9fr 0.9fr 1fr 0.7fr 0.8fr 1fr;
}

.receipt-group summary strong {
    color: #0f172a;
}

.receipt-group summary span {
    color: var(--muted);
    font-weight: 750;
}

.receipt-group-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.receipt-group[open] summary {
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(248, 250, 252, 0.78);
}

.receipt-group-detail {
    padding: 10px;
}

.muted-text {
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.empty,
.error {
    color: #b91c1c;
}

.success {
    margin: 0 0 14px;
    color: #15803d;
    font-weight: 750;
}

.form-note {
    margin: -4px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.size-picker {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.74);
}

.size-options {
    display: grid;
    gap: 10px;
}

.compact-size-picker .size-options {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.size-card {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.78);
}

.size-checkline {
    display: flex;
    align-items: center;
    gap: 8px;
}

.manual-model-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.82);
}

.manual-model-preview[hidden] {
    display: none;
}

.manual-model-preview img {
    width: 72px;
    height: 92px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: #fff;
}

.order-color-row {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.84);
    overflow: hidden;
}

.color-row-header {
    display: grid;
    grid-template-columns: minmax(180px, 1.4fr) minmax(140px, 1fr) 96px auto;
    align-items: end;
    gap: 12px;
}

.color-row-header label {
    min-width: 0;
}

.order-row-total {
    min-width: 0;
}

.add-color-row-button {
    color: #ffffff !important;
    background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
    border-color: rgba(185, 28, 28, 0.7) !important;
    box-shadow: 0 12px 24px rgba(239, 68, 68, 0.26) !important;
    font-weight: 900;
}

.add-color-row-button:hover {
    background: linear-gradient(135deg, #dc2626, #991b1b) !important;
    transform: translateY(-1px);
}

.size-row-grid {
    display: flex;
    align-items: stretch;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x proximity;
}

.size-picker-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(234, 179, 8, 0.35);
    border-radius: 14px;
    background: rgba(254, 249, 195, 0.74);
}

.size-picker-alert strong,
.size-picker-alert span {
    display: block;
}

.size-picker-alert strong {
    color: #854d0e;
}

.size-picker-alert span {
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}

.size-row {
    flex: 0 0 146px;
    display: grid;
    grid-template-rows: 1fr 34px 38px;
    align-items: stretch;
    gap: 8px;
    min-height: 140px;
    padding: 9px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.78);
    scroll-snap-align: start;
}

.size-row span {
    display: grid;
    grid-template-columns: 18px 1fr;
    align-items: start;
    gap: 7px;
    min-width: 0;
    font-weight: 900;
}

.size-row small {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.size-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 1px;
}

.size-row input[type="number"],
.size-row input[data-size-body-input] {
    width: 100%;
    min-width: 0;
    text-align: center;
    font-weight: 900;
}

.clear-form {
    margin-top: 16px;
}

.secondary-button {
    color: #1e293b;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(148, 163, 184, 0.32);
    box-shadow: var(--soft-shadow);
}

.secondary-button:hover {
    color: #0f172a;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1);
}

.login-page {
    position: relative;
    display: grid;
    place-items: center end;
    padding: 24px;
    background:
        linear-gradient(90deg, rgba(8, 15, 25, 0.18), rgba(8, 15, 25, 0.5)),
        url("login-wallpaper.jpg") center / cover no-repeat;
    overflow: hidden;
}

.login-page::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 76% 42%, rgba(255, 255, 255, 0.12), transparent 22%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.34));
}

.login-card {
    width: min(430px, 100%);
    padding: 28px;
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    z-index: 1;
    margin-right: clamp(12px, 7vw, 110px);
}

.login-brand .brand span {
    color: rgba(226, 232, 240, 0.82);
}

.login-brand {
    align-items: center;
    flex-direction: column;
    text-align: center;
}

.login-logo-wrap {
    width: 260px;
    height: 108px;
    margin-bottom: 10px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
}

.login-logo {
    width: 96%;
    height: 96%;
}

.login-card .brand strong,
.login-card label {
    color: #f8fafc;
}

.login-card input {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.92);
}

.login-card .error {
    color: #fecaca;
    font-weight: 800;
}

@media (max-width: 1100px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .orders-stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .grid.two,
    .dashboard-strip,
    .process-steps,
    .sewing-allocation-layout,
    .qr-transfer-panel,
    .qr-search-panel {
        grid-template-columns: 1fr;
    }

    .quick-allocate-panel {
        position: static;
    }

    .hero,
    .dashboard-hero {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 820px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    body {
        background:
            radial-gradient(circle at 18% 5%, rgba(37, 99, 235, 0.16), transparent 28%),
            radial-gradient(circle at 88% 10%, rgba(20, 184, 166, 0.13), transparent 24%),
            linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
    }

    .login-page {
        place-items: center;
        padding: 18px;
    }

    .login-card {
        margin-right: 0;
    }

    .mobile-menu {
        position: fixed;
        right: 16px;
        top: 16px;
        z-index: 30;
        display: grid;
        place-items: center;
        width: 50px;
        height: 50px;
        padding: 0;
        border: 1px solid rgba(255, 255, 255, 0.82);
        border-radius: 16px;
        color: #0f172a;
        background: rgba(255, 255, 255, 0.94);
        box-shadow: var(--soft-shadow);
        font: inherit;
    }

    .mobile-menu span {
        line-height: 1;
    }

    .mobile-menu.open {
        color: white;
        background: var(--blue);
    }

    .sidebar {
        inset: 12px auto 12px 12px;
        z-index: 20;
        width: min(320px, calc(100vw - 24px));
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateX(calc(-100% - 24px));
        -webkit-transform: translateX(calc(-100% - 24px));
        transition: transform 180ms ease;
    }

    .sidebar.open {
        transform: translateX(0);
        -webkit-transform: translateX(0);
    }

    .app {
        margin-left: 0;
        width: 100%;
        padding-bottom: 0;
    }

    .topbar {
        min-height: 0;
        padding: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        border-bottom: 0;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .topbar > div:first-child {
        display: none;
    }

    .topbar-widgets {
        display: none;
    }

    .eyebrow {
        margin-bottom: 3px;
        font-size: 11px;
    }

    .content {
        padding: 14px 12px 18px;
        max-width: 100%;
        overflow-x: hidden;
    }

    .stats-grid,
    .grid.two.cash-two,
    .sewing-line-grid,
    .dashboard-strip,
    .process-steps,
    .form-grid,
    .calculation,
    .size-options,
    .receipt-head-grid,
    .receipt-line-grid,
    .outgoing-line-grid,
    .receipt-group-header,
    .receipt-group summary,
    .receipt-group-header.outgoing-group-header,
    .receipt-group summary.outgoing-group-summary {
        grid-template-columns: 1fr;
    }

    .dashboard-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .stat-card {
        min-height: 124px;
        padding: 13px;
        border-radius: 20px;
    }

    .stat-card:hover {
        transform: none;
    }

    .stat-icon {
        width: 32px;
        height: 32px;
        margin-bottom: 10px;
        border-radius: 12px;
        font-size: 12px;
    }

    .stat-card span {
        font-size: 11px;
        line-height: 1.25;
    }

    .stat-card strong {
        margin-top: 7px;
        font-size: 17px;
        overflow-wrap: anywhere;
    }

    .dashboard-stats .stat-card small {
        margin-top: 6px;
        font-size: 11px;
        line-height: 1.3;
    }

    .mobile-dashboard-menu {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }

    .mobile-dashboard-menu a {
        min-height: 92px;
        padding: 12px 8px;
        display: grid;
        align-content: center;
        justify-items: center;
        gap: 5px;
        color: #172033;
        text-align: center;
        text-decoration: none;
        border: 1px solid rgba(255, 255, 255, 0.78);
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.84);
        box-shadow: var(--soft-shadow);
    }

    .mobile-dashboard-menu i {
        display: grid;
        place-items: center;
        width: 34px;
        height: 34px;
        border-radius: 13px;
        color: white;
        background: var(--blue);
        font-style: normal;
        font-size: 12px;
        font-weight: 850;
    }

    .mobile-dashboard-menu strong {
        max-width: 100%;
        font-size: 13px;
        font-weight: 850;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-dashboard-menu span {
        max-width: 100%;
        color: var(--muted);
        font-size: 11px;
        line-height: 1.25;
        display: -webkit-box;
        overflow: hidden;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .mobile-bottom-nav {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        z-index: 28;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 4px;
        padding: 7px;
        border: 1px solid rgba(255, 255, 255, 0.8);
        border-radius: 24px;
        background: rgba(255, 255, 255, 0.92);
        box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }

    .mobile-bottom-nav a,
    .mobile-bottom-nav button {
        min-width: 0;
        min-height: 56px;
        padding: 6px 3px;
        border: 0;
        border-radius: 17px;
        display: grid;
        place-items: center;
        gap: 3px;
        color: #64748b;
        background: transparent;
        text-decoration: none;
        font: inherit;
        font-size: 11px;
        font-weight: 800;
    }

    .mobile-bottom-nav a.active,
    .mobile-bottom-nav button.open {
        color: white;
        background: var(--blue);
    }

    .mobile-bottom-nav i {
        display: grid;
        place-items: center;
        width: 24px;
        height: 24px;
        border-radius: 10px;
        background: rgba(226, 232, 240, 0.78);
        color: inherit;
        font-style: normal;
        font-size: 10px;
        font-weight: 900;
    }

    .mobile-bottom-nav a.active i,
    .mobile-bottom-nav button.open i {
        background: rgba(255, 255, 255, 0.2);
    }

    h1 {
        font-size: 22px;
    }

    .hero,
    .dashboard-hero,
    .panel {
        border-radius: 22px;
        padding: 18px;
    }

    .dashboard-hero {
        min-height: 0;
        padding: 16px;
        gap: 14px;
    }

    .hero h1,
    .dashboard-hero h2 {
        font-size: 23px;
    }

    .dashboard-hero p {
        font-size: 13px;
    }

    .hero-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .hero-actions a {
        justify-content: center;
        min-height: 44px;
        padding: 0 10px;
        font-size: 13px;
    }

    .dinar-fabric-edit-heading {
        padding-right: 58px;
    }

    .dashboard-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .dashboard-strip div {
        min-height: 82px;
        padding: 12px;
        border-radius: 18px;
    }

    .dashboard-strip strong {
        margin-top: 8px;
        font-size: 17px;
    }

    .inline-actions {
        min-width: 0;
        width: 100%;
    }

    .inline-actions input,
    .inline-actions select,
    .inline-actions button,
    .inline-actions .secondary-button,
    .inline-actions .table-action {
        max-width: none;
    }

    input,
    select,
    textarea {
        font-size: 16px;
    }

    .table-wrap {
        margin-left: -2px;
        margin-right: -2px;
        overflow-x: auto;
    }

    .table-wrap table {
        min-width: 720px;
    }

    .permission-list,
    .permission-list.compact {
        grid-template-columns: 1fr;
        min-width: 0;
    }

    .check-row {
        min-width: 0;
        width: 100%;
    }

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

    .expense-line {
        grid-template-columns: 1fr;
    }

    .pricing-expense-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .pricing-expense-line,
    .pricing-expense-footer,
    .pricing-director-footer,
    .cutting-material-line {
        grid-template-columns: 1fr;
    }
}

@supports (-webkit-touch-callout: none) {
    .sidebar,
    .topbar,
    .panel,
    .hero,
    .dashboard-hero,
    .widget,
    .mobile-bottom-nav,
    .login-card {
        background-color: rgba(255, 255, 255, 0.94);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .login-card {
        background-color: rgba(15, 23, 42, 0.72);
    }

    .table-wrap,
    .size-row-grid {
        -webkit-overflow-scrolling: touch;
    }

    .topbar {
        position: sticky;
        position: -webkit-sticky;
    }
}

/* Compact Windows XP mode. Kept at the end so it wins over the default layout. */
body.theme-xp_classic .content,
body.theme-xp-classic .content {
    display: block;
    padding: 8px !important;
}

body.theme-xp_classic .content > *,
body.theme-xp-classic .content > * {
    margin-bottom: 4px !important;
}

body.theme-xp_classic .panel,
body.theme-xp-classic .panel,
body.theme-xp_classic .hero,
body.theme-xp-classic .hero,
body.theme-xp_classic .dashboard-hero,
body.theme-xp-classic .dashboard-hero,
body.theme-xp_classic .stat-card,
body.theme-xp-classic .stat-card,
body.theme-xp_classic .widget,
body.theme-xp-classic .widget {
    border-radius: 0 !important;
    padding: 8px !important;
    box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #404040 !important;
}

body.theme-xp_classic .hero,
body.theme-xp-classic .hero,
body.theme-xp_classic .dashboard-hero,
body.theme-xp-classic .dashboard-hero {
    min-height: 0 !important;
}

body.theme-xp_classic .hero p,
body.theme-xp-classic .hero p,
body.theme-xp_classic .dashboard-hero p,
body.theme-xp-classic .dashboard-hero p,
body.theme-xp_classic .hero-kicker,
body.theme-xp-classic .hero-kicker {
    display: none !important;
}

body.theme-xp_classic .grid.two,
body.theme-xp-classic .grid.two,
body.theme-xp_classic .warehouse-receipt-layout,
body.theme-xp-classic .warehouse-receipt-layout,
body.theme-xp_classic .orders-one-column,
body.theme-xp-classic .orders-one-column {
    display: block !important;
}

body.theme-xp_classic .form,
body.theme-xp-classic .form,
body.theme-xp_classic .form-grid,
body.theme-xp-classic .form-grid,
body.theme-xp_classic .calculation,
body.theme-xp-classic .calculation,
body.theme-xp_classic .cutting-material-lines,
body.theme-xp-classic .cutting-material-lines,
body.theme-xp_classic .inline-actions,
body.theme-xp-classic .inline-actions {
    gap: 6px !important;
}

body.theme-xp_classic .form-grid,
body.theme-xp-classic .form-grid,
body.theme-xp_classic .receipt-head-grid,
body.theme-xp-classic .receipt-head-grid,
body.theme-xp_classic .receipt-line-grid,
body.theme-xp-classic .receipt-line-grid,
body.theme-xp_classic .outgoing-line-grid,
body.theme-xp-classic .outgoing-line-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
}

body.theme-xp_classic label,
body.theme-xp-classic label {
    gap: 3px !important;
    font-size: 11px !important;
}

body.theme-xp_classic input,
body.theme-xp-classic input,
body.theme-xp_classic select,
body.theme-xp-classic select,
body.theme-xp_classic textarea,
body.theme-xp-classic textarea {
    min-height: 28px !important;
    padding: 4px 6px !important;
    font-size: 12px !important;
}

body.theme-xp_classic button,
body.theme-xp-classic button,
body.theme-xp_classic .secondary-button,
body.theme-xp-classic .secondary-button,
body.theme-xp_classic .small-button,
body.theme-xp-classic .small-button,
body.theme-xp_classic .table-action,
body.theme-xp-classic .table-action {
    min-height: 28px !important;
    padding: 5px 9px !important;
    font-size: 12px !important;
}

body.theme-xp_classic th,
body.theme-xp_classic td,
body.theme-xp-classic th,
body.theme-xp-classic td {
    padding: 4px 5px !important;
    font-size: 12px !important;
}

body.theme-xp_classic .topbar,
body.theme-xp-classic .topbar {
    min-height: 64px !important;
    padding: 10px 14px 8px !important;
}

body.theme-xp_classic .sidebar,
body.theme-xp-classic .sidebar {
    width: 228px !important;
    padding: 8px !important;
}

body.theme-xp_classic .app,
body.theme-xp-classic .app {
    margin-left: 246px !important;
}

body.theme-xp_classic .nav,
body.theme-xp-classic .nav {
    gap: 2px !important;
}

body.theme-xp_classic .nav a,
body.theme-xp-classic .nav a {
    min-height: 28px !important;
    padding: 4px 6px !important;
    font-size: 12px !important;
}

@media (max-width: 900px) {
    body.theme-xp_classic .app,
    body.theme-xp-classic .app {
        margin-left: 0 !important;
    }
}

.audit-json {
    max-width: 520px;
    max-height: 220px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 10px;
    font-size: 12px;
}

.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 16px;
    border-radius: 6px;
    background: #2563eb;
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.button-link:hover {
    background: #1d4ed8;
}
