* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden;
    display: grid;
    grid-template-columns: 176px minmax(0, 1200px);
    gap: 20px;
    justify-content: center;
    align-items: start;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 30px;
    overflow-x: hidden;
    box-sizing: border-box;
}

.app-sidebar {
    position: sticky;
    top: 20px;
    width: 176px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 14px 10px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(24, 35, 94, 0.34), rgba(67, 36, 111, 0.32));
    box-shadow: 0 14px 34px rgba(29, 17, 73, 0.24);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.app-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 2px 5px 13px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
}

.app-sidebar-logo {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    object-fit: contain;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.94);
    padding: 3px;
}

.app-sidebar-brand strong,
.app-sidebar-brand span {
    display: block;
}

.app-sidebar-brand strong {
    font-size: 13px;
    line-height: 1.2;
}

.app-sidebar-brand span {
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 9px;
    line-height: 1.2;
}

.app-sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.app-sidebar-link {
    width: 100%;
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 9px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, 0.86);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.app-sidebar-link:hover {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(2px);
}

.app-sidebar-link.active {
    border-color: rgba(255, 255, 255, 0.62);
    background: #fff;
    color: #4c51bf;
    box-shadow: 0 7px 18px rgba(27, 19, 74, 0.2);
}

.app-sidebar-icon {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 14px;
}

.app-sidebar-link.active .app-sidebar-icon {
    background: #eef2ff;
}

@media (min-width: 1600px) {
    body {
        display: block;
    }

    .container {
        margin: 0 auto;
    }

    .app-sidebar {
        position: fixed;
        left: max(16px, calc(50vw - 796px));
    }
}

h1 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.landing-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: 30px;
    width: 100%;
}

.landing-title {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.landing-subtitle {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 30px;
    text-align: center;
}

.button-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    align-items: stretch;
    justify-items: stretch;
}

.option-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 28px 16px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-size: 22px;
    font-weight: 700;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    width: 100%;
    min-width: 0;
    min-height: 168px;
    height: 100%;
    box-sizing: border-box;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    line-height: 1.2;
}

.option-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.6);
}

.option-button .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.2em;
    height: 1.2em;
    font-size: 2.6em;
    line-height: 1;
    margin: 0;
    flex-shrink: 0;
}

.nav-bar {
    display: none;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.nav-bar.active {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.nav-back-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.back-button {
    background: #6c757d;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s;
}

.back-button:hover {
    background: #5a6268;
}

.back-button-dark {
    background: #212529;
}

.back-button-dark:hover {
    background: #000000;
}

.page-title {
    color: #667eea;
    font-size: 1.8em;
    font-weight: 700;
    text-align: center;
    justify-self: center;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.form-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 600;
}

input,
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

button {
    background: #667eea;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.3s;
}

button:hover {
    background: #5568d3;
}

.requestor-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.requestor-button {
    flex: 1;
    min-width: 120px;
    padding: 12px 20px;
    background: #e9ecef;
    color: #495057;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s;
}

.requestor-button:hover {
    background: #dee2e6;
    border-color: #adb5bd;
}

.requestor-button.selected {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.requestor-button.selected:hover {
    background: #5568d3;
    border-color: #5568d3;
}

.material-search-wrap {
    position: relative;
}

.material-search-list {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    max-height: 240px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.material-search-list.show {
    display: block;
}

.material-search-option {
    padding: 10px 12px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    border-bottom: 1px solid #f1f1f1;
}

.material-search-option:last-child {
    border-bottom: none;
}

.material-search-option:hover {
    background: #f3f5ff;
}

.material-search-option.active {
    background: #c7d2fe;
    outline: none;
    box-shadow: inset 3px 0 0 #4f46e5;
}

.material-search-empty {
    padding: 10px 12px;
    font-size: 14px;
    color: #888;
}

.image-thumb-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.image-thumb {
    width: 90px;
    text-align: center;
}

.image-thumb img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #ddd;
    display: block;
}

.image-thumb span {
    display: block;
    font-size: 11px;
    color: #666;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-bom-qty,
.project-bom-stock {
    display: inline-block;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #1e3a8a;
    background: #bfdbfe;
    border: 1px solid #93c5fd;
    border-radius: 6px;
    padding: 1px 7px;
    line-height: 1.35;
}

.project-bom-stock {
    color: #065f46;
    background: #a7f3d0;
    border-color: #6ee7b7;
}

.project-form-modal {
    width: min(980px, 96vw);
}

.project-form-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
    margin-bottom: 8px;
}

.project-form-split-divider {
    background: #e5e7eb;
    width: 1px;
    min-height: 100%;
}

.project-form-panel {
    min-width: 0;
}

.project-form-panel-title {
    font-size: 13px;
    font-weight: 700;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 14px;
}

.project-bom-panel {
    display: flex;
    flex-direction: column;
    min-height: 420px;
}

.project-bom-list-scroll,
.project-file-list-scroll {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fafbfc;
    max-height: 240px;
    overflow-y: auto;
    margin-top: 10px;
}

.project-list-empty {
    padding: 18px 14px;
    color: #7f8c8d;
    font-size: 13px;
    text-align: center;
}

.project-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid #eef1f4;
    background: #fff;
}

.project-list-row:last-child {
    border-bottom: none;
}

.project-list-row-main {
    min-width: 0;
    flex: 1;
}

.project-list-title {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-list-meta {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.project-list-remove {
    border: none;
    background: #fee2e2;
    color: #b91c1c;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
}

.project-list-remove:hover {
    background: #fecaca;
}

.project-bom-qty-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.project-bom-qty-btn {
    border: none;
    border-radius: 6px;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.project-bom-qty-btn.decrease {
    background: #e5e7eb;
    color: #374151;
}

.project-bom-qty-btn.decrease:hover {
    background: #d1d5db;
}

.project-bom-qty-btn.increase {
    background: #dbeafe;
    color: #1d4ed8;
}

.project-bom-qty-btn.increase:hover {
    background: #bfdbfe;
}

.project-bom-qty-btn.remove {
    background: #fee2e2;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 600;
    min-width: 0;
    padding: 0 10px;
}

.project-bom-qty-btn.remove:hover {
    background: #fecaca;
}

.pf-bom-bulk-list {
    max-height: 320px;
    margin-top: 0;
}

.pf-bom-bulk-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid #eef1f4;
    background: #fff;
}

.pf-bom-bulk-row:last-child {
    border-bottom: none;
}

.pf-bom-bulk-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
}

.pf-bom-bulk-name {
    font-weight: 600;
    color: #1f2937;
}

.pf-bom-bulk-meta {
    font-size: 12px;
    color: #6b7280;
}

.project-detail-field {
    margin-bottom: 14px;
}

.project-detail-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 4px;
}

.project-detail-value {
    display: block;
    font-size: 15px;
    color: #111827;
    font-weight: 500;
}

.project-view-bom-panel {
    min-height: 360px;
}

.project-file-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.project-file-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 8px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #dbeafe;
}

.project-file-btn:hover {
    background: #e0e7ff;
}

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

.project-file-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid #eef1f4;
    background: #fff;
}

.project-file-row:last-child {
    border-bottom: none;
}

.project-file-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.project-file-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #fef3c7;
    color: #b45309;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.project-bom-hint {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 8px;
}

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

    .project-form-split-divider {
        display: none;
    }
}

.lot-number-preview {
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-weight: 600;
    color: #667eea;
    word-break: break-word;
}

.lot-detail-modal {
    width: min(1200px, 97vw);
    max-height: 92vh;
    overflow-y: auto;
}

.lot-progress-panel {
    margin: 16px 0 18px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.lot-progress-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.lot-progress-grid .form-group {
    margin-bottom: 0;
}

.lot-progress-transfer {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Align with the number inputs (below labels) */
    margin-top: 28px;
    height: 42px;
}

.lot-progress-arrow-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid #93c5fd;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    cursor: pointer;
}

.lot-progress-arrow-icon {
    width: 20px;
    height: 20px;
    display: block;
}

.lot-progress-arrow-btn:hover:not(:disabled) {
    background: #dbeafe;
}

.lot-progress-arrow-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.lot-progress-meta {
    margin: 10px 0 8px;
    color: #475569;
    font-size: 0.86rem;
}

.lot-progress-panel .action-btn {
    margin-top: 4px;
}

@media (max-width: 700px) {
    .lot-progress-grid {
        grid-template-columns: 1fr;
        justify-items: stretch;
    }

    .lot-progress-transfer {
        margin-top: 0;
        order: 2;
        width: 100%;
        height: auto;
        padding: 4px 0;
    }

    .lot-progress-arrow-btn {
        transform: rotate(90deg);
    }
}

.lot-bom-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

.lot-bom-summary-2x {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lot-bom-summary-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lot-bom-summary-item {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 10px;
    min-height: 58px;
}

.lot-bom-summary-cost {
    grid-column: 1 / -1;
}

.lot-cost-reveal-btn {
    margin-top: 6px;
    padding: 4px 10px !important;
    font-size: 12px !important;
    background: #eef2ff !important;
    color: #3730a3 !important;
    border: 1px solid #c5cae9 !important;
    border-radius: 6px !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    width: auto !important;
}

.lot-cost-reveal-btn:hover {
    background: #e0e7ff !important;
}

.lot-cost-hidden-value {
    letter-spacing: 0.12em;
    color: #6b7280 !important;
}

.request-block-replacement {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    box-shadow: inset 0 0 0 1px #fdba74;
}

.replacement-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #c2410c;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    vertical-align: middle;
}

.request-block-rnd {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    box-shadow: inset 0 0 0 1px #6ee7b7;
}

.rnd-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #0f766e;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    vertical-align: middle;
}

.bulk-bom-list {
    max-height: 320px;
    overflow: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
}

.bulk-bom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
}

.bulk-bom-row:last-child {
    border-bottom: none;
}

.bulk-bom-name {
    min-width: 0;
    flex: 1;
}

.bulk-bom-name strong {
    display: block;
    font-size: 13px;
    color: #111827;
}

.bulk-bom-name span {
    font-size: 12px;
    color: #64748b;
}

.bulk-bom-qty {
    width: 90px;
    padding: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
}

.item-txn-list {
    max-height: 420px;
    overflow: auto;
    margin-top: 16px;
}

.item-txn-modal-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 4px;
}

.item-txn-modal-top .modal-header {
    text-align: left;
}

.item-txn-modal-top .modal-subtitle {
    text-align: left;
}

.item-txn-table {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.item-txn-head,
.item-txn-row {
    display: grid;
    grid-template-columns: 110px 60px 70px 1fr;
    gap: 8px;
    padding: 8px 10px;
    font-size: 13px;
}

.item-txn-head {
    background: #f8fafc;
    font-weight: 700;
    color: #475569;
    border-bottom: 1px solid #e5e7eb;
}

.item-txn-row {
    border-top: 1px solid #eef1f4;
    color: #334155;
}

.item-txn-row.in .item-txn-type { color: #047857; font-weight: 800; }
.item-txn-row.out .item-txn-type { color: #b45309; font-weight: 800; }

@media (max-width: 600px) {
    .item-txn-modal-top {
        flex-direction: column;
        align-items: stretch;
    }

    .item-txn-modal-top .action-btn {
        width: 100%;
    }

    .item-txn-head,
    .item-txn-row {
        grid-template-columns: 90px 48px 56px 1fr;
        font-size: 12px;
    }
}

.lot-bom-summary-label {
    display: block;
    min-height: 14px;
    font-size: 10px;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lot-bom-summary-value {
    display: block;
    margin-top: auto;
    font-size: 16px;
    font-weight: 800;
    color: #1e3a8a;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.lot-bom-summary-value.lot-bom-parts {
    color: #9a3412;
}

.lot-bom-summary-value.lot-bom-order {
    color: #7c3aed;
}

.start-lot-material-row {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
}

.start-lot-material-name {
    width: 100%;
}

.start-lot-quantity-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.start-lot-quantity-cell {
    display: flex;
    min-width: 0;
    min-height: 58px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 7px 9px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #f8fafc;
}

.start-lot-quantity-cell.required {
    border-color: #fdba74;
    background: #fff7ed;
    color: #9a3412;
}

.start-lot-quantity-cell.stock {
    border-color: #86efac;
    background: #f0fdf4;
    color: #15803d;
}

.start-lot-quantity-cell.order {
    margin: 0;
    border-color: #c4b5fd;
    background: #f5f3ff;
    color: #6d28d9;
}

.start-lot-quantity-label {
    color: inherit;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.start-lot-quantity-cell strong {
    font-size: 17px;
    font-variant-numeric: tabular-nums;
}

.start-lot-quantity-cell .sl-order-qty-input {
    width: 100%;
    height: 30px;
    padding: 4px 7px;
    border: 1px solid #a78bfa;
    border-radius: 6px;
    background: #fff;
    color: #4c1d95;
    font-size: 15px;
    font-weight: 800;
}

.lot-bom-summary-value.lot-bom-given {
    color: #5b21b6;
}

.lot-bom-summary-value.lot-bom-remaining {
    color: #065f46;
}

.lot-bom-summary-value.lot-bom-cost {
    color: #065f46;
}

.lot-bom-list-scroll {
    max-height: 380px;
    flex: 1;
}

.project-bom-lot-qty {
    display: inline-block;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #9a3412;
    background: #fed7aa;
    border: 1px solid #fdba74;
    border-radius: 6px;
    padding: 1px 7px;
    line-height: 1.35;
    margin-left: 0;
}

.project-bom-allocated-qty,
.project-bom-requested-qty,
.project-bom-given-qty,
.project-bom-remaining-qty {
    display: inline-block;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    border-radius: 6px;
    padding: 1px 7px;
    line-height: 1.35;
    margin-left: 0;
}

.project-bom-allocated-qty {
    color: #1e3a8a;
    background: #dbeafe;
    border: 1px solid #93c5fd;
}

.project-bom-requested-qty {
    color: #9a3412;
    background: #fed7aa;
    border: 1px solid #fdba74;
}

.project-bom-given-qty {
    color: #5b21b6;
    background: #ede9fe;
    border: 1px solid #c4b5fd;
}

.project-bom-remaining-qty {
    color: #065f46;
    background: #a7f3d0;
    border: 1px solid #6ee7b7;
}

.lot-bom-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin: 6px 0 8px;
    font-size: 11px;
    font-weight: 600;
    color: #334155;
}

.lot-bom-list-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 8px;
}

.lot-bom-filter-hint {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

.lot-bom-list-toolbar .action-btn {
    flex: 0 0 auto;
    padding: 8px 14px;
    font-size: 13px;
}

.lot-bom-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.lot-metric-swatch {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    border: 1px solid transparent;
    display: inline-block;
}

.lot-metric-swatch.per-unit {
    background: #bfdbfe;
    border-color: #93c5fd;
}

.lot-metric-swatch.allocated {
    background: #dbeafe;
    border-color: #93c5fd;
}

.lot-metric-swatch.requested {
    background: #fed7aa;
    border-color: #fdba74;
}

.lot-metric-swatch.given {
    background: #ede9fe;
    border-color: #c4b5fd;
}

.lot-metric-swatch.remaining {
    background: #a7f3d0;
    border-color: #6ee7b7;
}

.lot-bom-list-scroll .lot-bom-usage-row,
.lot-bom-list-scroll .project-list-row.lot-bom-usage-row {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    padding: 12px 12px;
    margin: 0 0 10px;
    border: 1px solid #cbd5e1;
    border-bottom: 2px solid #94a3b8;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.lot-bom-list-scroll .lot-bom-usage-row:last-child {
    margin-bottom: 0;
    border-bottom: 2px solid #94a3b8;
}

.lot-bom-row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.lot-instant-request-wrap {
    margin-top: 8px;
}

.lot-bom-metric-action {
    padding: 0;
    overflow: hidden;
}

.lot-instant-request-btn {
    width: 100% !important;
    height: 100%;
    min-height: 100%;
    margin: 0 !important;
    padding: 4px 4px !important;
    font-size: 9px !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    line-height: 1.1;
    white-space: nowrap !important;
    border: none !important;
    border-radius: 6px !important;
    background: transparent !important;
    color: #3730a3 !important;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    text-align: left;
    box-shadow: none !important;
}

.lot-bom-metric-action:hover {
    background: #eef2ff;
    border-color: #a5b4fc;
}

.lot-instant-request-btn:hover:not(:disabled) {
    background: transparent !important;
    color: #312e81 !important;
}

.lot-instant-request-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    color: #6b7280 !important;
}

.lot-bom-usage-row .project-list-title {
    font-size: 13px;
    font-weight: 800;
    color: #0f172a;
}

.lot-bom-unit {
    font-weight: 600;
    color: #475569;
    font-size: 11px;
}

.lot-bom-stock {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 7px;
    border-radius: 999px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    vertical-align: middle;
}

.lot-bom-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 4px;
    width: 100%;
}

.lot-bom-metric {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    min-width: 0;
    padding: 4px 6px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

.lot-bom-metric-label {
    font-size: 9px;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    flex-shrink: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lot-bom-metric .project-bom-qty,
.lot-bom-metric .project-bom-allocated-qty,
.lot-bom-metric .project-bom-requested-qty,
.lot-bom-metric .project-bom-given-qty,
.lot-bom-metric .project-bom-remaining-qty,
.lot-bom-metric .lot-bom-cost-value {
    order: -1;
    margin-left: 0;
    margin-right: 0;
    font-size: 12px;
    padding: 0 5px;
    flex-shrink: 0;
}

.lot-bom-cost-value {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #374151;
    font-size: 12px;
}

@media (max-width: 700px) {
    .lot-bom-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .start-lot-quantity-grid {
        grid-template-columns: 1fr;
    }
}

.lot-bom-row-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
    font-size: 12px;
    color: #6b7280;
}

@media (max-width: 860px) {
    .lot-bom-summary,
    .lot-bom-summary-2x,
    .lot-bom-summary-4 {
        grid-template-columns: 1fr 1fr;
    }
}

.inventory-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

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

.inventory-title {
    font-size: 1.6em;
    font-weight: 700;
    color: #333;
}

.inventory-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.inventory-tab {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #c5cae9;
    background: #eef2ff;
    color: #3730a3;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
}

.inventory-tab:hover {
    background: #e0e7ff;
    color: #312e81;
}

.inventory-tab.active {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

.inventory-tab.active:hover {
    background: #5568d3;
    color: #fff;
}

.inventory-actions {
    display: flex;
    flex: 1 1 520px;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    min-width: 0;
}

.inventory-actions input[type="text"] {
    /* Modest basis so siblings are not pushed onto a second row; it grows
       into whatever space is left over. */
    flex: 1 1 220px;
    width: 100%;
    max-width: none;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    min-width: 180px;
}

.inventory-actions .action-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 12px 22px;
    font-size: 15px;
}

.inventory-actions select {
    /* Shrinkable and capped so a long project name cannot widen the row. */
    flex: 0 1 160px;
    min-width: 0;
    max-width: 220px;
    padding: 8px 10px;
    border: 1px solid #c5cae9;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    text-overflow: ellipsis;
}

.project-upload-progress {
    margin: 0 0 12px;
}

.project-upload-progress-label {
    font-size: 13px;
    color: #475569;
    margin-bottom: 6px;
    font-weight: 600;
}

.project-upload-progress-track {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.project-upload-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #667eea, #5a67d8);
    transition: width 0.15s ease-out;
}

.action-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.action-btn.orange {
    background: #f39c12;
}

.action-btn.green {
    background: #2ecc71;
}

.action-btn.blue {
    background: #3498db;
}

.action-btn.dark {
    background: #2c3e50;
}

.inventory-summary {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    flex: 0 0 auto;
    margin-left: auto;
}

.summary-chip {
    border: 1px solid #f39c12;
    color: #f39c12;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    background: #fff8e6;
}

.inventory-filters {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
    width: 100%;
    min-width: 0;
}

.inventory-pagination-top {
    margin-bottom: 12px;
}

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

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

.inventory-filters select,
.inventory-filters input {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.add-item-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.add-item-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.add-item-full {
    grid-column: 1 / -1;
}

.add-item-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.add-item-inline input,
.add-item-inline select {
    flex: 1 1 140px;
    min-width: 0;
}

.pill-toggle {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
}

.pill-toggle label {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    background: #f8f9fa;
}

.pill-toggle input {
    display: none;
}

.pill-toggle input:checked+span {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
    padding: 6px 10px;
    border-radius: 6px;
}

@media (max-width: 900px) {
    .add-item-grid {
        grid-template-columns: 1fr;
    }

    .add-item-row {
        grid-template-columns: 1fr;
    }
}

.inventory-table td.actions {
    text-align: right;
    white-space: nowrap;
}

.table-action {
    border: none;
    background: #f0f0f0;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 6px;
}

.inventory-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.inventory-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.inventory-table th,
.inventory-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e9ecef;
    text-align: left;
    font-size: 12px;
}

.inventory-table th {
    background: #667eea;
    color: white;
    font-weight: 700;
}

.inventory-table tbody tr:hover {
    background: #f3f5ff;
}

.inventory-empty {
    text-align: center;
    color: #777;
    padding: 20px;
}

.production-list-client {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
    margin-top: 2px;
}

.requests-grid {
    display: grid;
    /* minmax(0, 1fr) prevents long lot/project names from blowing past the card */
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
    gap: 20px;
    margin-top: 20px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.request-block {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 10px;
    border-left: 5px solid #667eea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 200px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.request-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.request-block.acknowledged {
    border-left-color: #ffc107;
}

.request-block h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.15em;
    line-height: 1.35;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.request-details {
    flex: 1;
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    min-width: 0;
}

.request-details div {
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 4px 6px;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.request-details strong {
    color: #444;
    margin-right: 8px;
    min-width: 80px;
}

.time-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #667eea;
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.action-button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
}

.action-button.acknowledge {
    background: #28a745;
    color: white;
}

.action-button.acknowledge:hover {
    background: #218838;
}

.action-button.complete {
    background: #ffc107;
    color: #333;
}

.action-button.complete:hover {
    background: #e0a800;
}

.action-button:disabled {
    opacity: 0.6;
    cursor: wait;
    pointer-events: none;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
}

.pagination button {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.pagination button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.pagination span {
    color: #666;
    font-weight: 600;
}

.page-view {
    display: none !important;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.page-view.active {
    display: block !important;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    overflow-y: auto;
    padding: 30px 20px;
}

#instantRequestModal,
#adminUserModal,
#appConfirmModal,
#inventoryReceiveModal {
    z-index: 3000;
}

#challanModal,
#challanClientModal {
    z-index: 2500;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
}

.modal-content.large {
    max-width: 980px;
}

.purchase-sheet-modal-content {
    width: min(96vw, 1800px);
    max-width: min(96vw, 1800px);
    height: calc(100vh - 36px);
    max-height: calc(100vh - 36px);
    padding: 22px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.purchase-sheet-heading,
.purchase-sheet-toolbar,
.purchase-sheet-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.purchase-sheet-heading {
    justify-content: space-between;
}

.purchase-sheet-heading .modal-header,
.purchase-sheet-heading .modal-subtitle {
    margin: 0;
    text-align: left;
}

.purchase-sheet-toolbar {
    justify-content: flex-end;
    margin: 16px 0 10px;
}

.purchase-sheet-lot-picker {
    min-width: min(440px, 100%);
    margin: 0;
}

.purchase-sheet-meta {
    padding: 9px 12px;
    border: 1px solid #dbe3ef;
    border-radius: 8px 8px 0 0;
    background: #f8fafc;
    color: #475569;
    font-size: 0.86rem;
}

.purchase-sheet-save-status {
    min-width: 64px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-align: right;
}

.purchase-sheet-save-status.saving {
    color: #b45309;
}

.purchase-sheet-save-status.saved {
    color: #15803d;
}

.purchase-sheet-save-status.error {
    color: #b91c1c;
}

.purchase-sheet-table-wrap {
    flex: 1;
    min-height: 240px;
    overflow: auto;
    border: 1px solid #dbe3ef;
    border-top: 0;
    border-radius: 0;
    background: #fff;
}

.purchase-sheet-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 12px;
    border: 1px solid #dbe3ef;
    border-top: 0;
    border-radius: 0 0 8px 8px;
    background: #f8fafc;
}

.purchase-sheet-filter-hint {
    color: #64748b;
    font-size: 0.82rem;
}

.purchase-sheet-table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
}

.purchase-sheet-table th,
.purchase-sheet-table td {
    min-width: 130px;
    padding: 0;
    border-right: 1px solid #dbe3ef;
    border-bottom: 1px solid #dbe3ef;
    background: #fff;
}

.purchase-sheet-table th {
    position: sticky;
    top: 0;
    z-index: 3;
    height: 42px;
    padding: 7px 9px;
    color: #fff;
    background: #1f4e79;
    text-align: left;
    white-space: nowrap;
}

.purchase-sheet-table th:first-child,
.purchase-sheet-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    min-width: 44px;
    width: 44px;
    text-align: center;
}

.purchase-sheet-table th:first-child {
    z-index: 4;
}

.purchase-sheet-table input,
.purchase-sheet-table select {
    width: 100%;
    min-width: 128px;
    height: 38px;
    padding: 6px 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
    font: inherit;
}

.purchase-sheet-table input:focus,
.purchase-sheet-table select:focus {
    outline: 2px solid #667eea;
    outline-offset: -2px;
    background: #f5f7ff;
}

.purchase-sheet-table input[type="checkbox"] {
    min-width: auto;
    width: 18px;
    height: 18px;
}

.purchase-sheet-table .purchase-sheet-computed {
    padding: 8px;
    color: #64748b;
    background: #f8fafc;
    text-align: center;
}

.purchase-sheet-table .purchase-sheet-readonly {
    padding: 8px;
    color: #334155;
    background: #f8fafc;
    cursor: default;
}

.purchase-sheet-receive-cell {
    text-align: center;
    vertical-align: middle;
}

.purchase-sheet-receive-btn {
    white-space: nowrap;
    padding: 6px 10px;
    font-size: 12px;
    margin: 0 auto;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.purchase-sheet-delete {
    border: 0;
    background: transparent;
    color: #b91c1c;
    cursor: pointer;
    font-size: 16px;
}

.purchase-sheet-delete:hover {
    background: #fee2e2;
    color: #991b1b;
}

.modal-header {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

.modal-subtitle {
    color: #666;
    margin-bottom: 25px;
    text-align: center;
    font-size: 0.9em;
}

.remarks-display {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    color: #856404;
}

.remarks-display strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.textarea-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 20px;
    min-height: 100px;
    font-family: inherit;
    resize: vertical;
}

.textarea-input:focus {
    outline: none;
    border-color: #667eea;
}

.password-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 20px;
}

.password-input:focus {
    outline: none;
    border-color: #667eea;
}

.modal-buttons {
    display: flex;
    gap: 10px;
}

.modal-button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
}

.modal-button.submit {
    background: #667eea;
    color: white;
}

.modal-button.submit:hover {
    background: #5568d3;
}

.modal-button.cancel {
    background: #e9ecef;
    color: #495057;
}

.modal-button.cancel:hover {
    background: #dee2e6;
}

.error-message {
    color: #dc3545;
    font-size: 0.9em;
    margin-top: -10px;
    margin-bottom: 10px;
    display: none;
    text-align: center;
}

.error-message.field-error {
    margin-top: 6px;
    margin-bottom: 0;
    text-align: left;
}

.error-message.show {
    display: block;
}

.download-button {
    background: #28a745;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
}

.download-button:hover {
    background: #218838;
}

.date-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 15px;
}

.date-input:focus {
    outline: none;
    border-color: #667eea;
}

.date-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: block;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #667eea;
    position: relative;
    min-height: 72px;
}

.header-user {
    position: relative;
    z-index: 1;
    justify-self: start;
    min-width: 0;
    max-width: min(220px, 28vw);
    text-align: center;
    font-size: 0.85em;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #0f2d44;
    background: #f4f7fa;
    border: 1.5px solid #0f2d44;
    border-radius: 6px;
    padding: 7px 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-brand {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    min-width: 0;
    max-width: calc(100% - 280px);
    pointer-events: none;
}

.app-brand .app-logo,
.app-brand .app-title {
    pointer-events: auto;
}

.app-logo {
    width: 80px;
    height: 60px;
    object-fit: contain;
    flex-shrink: 0;
}

.app-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 0;
}

.company-name {
    font-size: 1.3em;
    font-weight: 700;
    color: #2c5a7f;
    margin: 0;
    line-height: 1.2;
}

.app-name {
    font-size: 1.1em;
    color: #667eea;
    margin: 0;
    font-weight: 600;
}

.master-logout-btn {
    position: relative;
    z-index: 1;
    margin-left: auto;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: #eee;
    color: #555;
    font-size: 0.85em;
    cursor: pointer;
}

.master-logout-btn:hover {
    background: #ddd;
}

/* Blinking animation for old inventory blocks */
@keyframes urgentBlink {

    0%,
    100% {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    50% {
        background: linear-gradient(135deg, #ffe6e6 0%, #ffcccc 100%);
        box-shadow: 0 5px 20px rgba(220, 53, 69, 0.5);
        border-left-color: #dc3545;
    }
}

.request-block.urgent-blink {
    animation: urgentBlink 1s ease-in-out 3;
}

.running-project-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.running-project-actions .action-button {
    flex: 1;
    background: #6c757d;
    color: white;
}

.running-project-actions .action-button.archive {
    background: #f39c12;
    color: white;
}

.running-project-actions .action-button.archive:hover {
    background: #e08e0b;
}

.lot-status-select {
    font-weight: 600;
    border-width: 2px;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.lot-status-select.status-procurement {
    background-color: #fef3c7;
    color: #92400e;
    border-color: #f59e0b;
}

.lot-status-select.status-production {
    background-color: #dbeafe;
    color: #1e40af;
    border-color: #3b82f6;
}

.lot-status-select.status-complete_not_delivered {
    background-color: #ede9fe;
    color: #5b21b6;
    border-color: #8b5cf6;
}

.lot-status-select.status-delivered {
    background-color: #d1fae5;
    color: #065f46;
    border-color: #10b981;
}

.lot-card-actions {
    margin-top: 12px;
}

.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    width: 100%;
    min-width: 0;
}

.section-header-row h2 {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.lot-view-btn {
    width: 100%;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    border: 2px solid #3b82f6;
    border-radius: 5px;
    background: #eff6ff;
    color: #1e40af;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.lot-view-btn:hover {
    background: #dbeafe;
    border-color: #2563eb;
    color: #1e3a8a;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.22);
    transform: translateY(-1px);
}

.lot-view-btn:active {
    background: #bfdbfe;
    border-color: #1d4ed8;
    box-shadow: none;
    transform: translateY(0);
}

.lot-view-btn:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

.help-page {
    max-width: 1040px;
    margin: 0 auto;
    color: #1f2937;
    line-height: 1.55;
}

.help-hero {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e9ecef;
}

.help-hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.help-hero-top > div {
    min-width: 0;
    flex: 1;
}

.help-hero-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.help-pdf-btn {
    flex-shrink: 0;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.35);
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    white-space: nowrap;
}

.help-docs-btn {
    background: #0f766e !important;
    box-shadow: 0 3px 10px rgba(15, 118, 110, 0.3) !important;
}

.help-docs-btn:hover:not(:disabled) {
    background: #0d9488 !important;
}

.help-pdf-btn:hover:not(:disabled) {
    background: #5a6fd6;
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(102, 126, 234, 0.45);
}

.help-pdf-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.help-pdf-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 2147483646;
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-pdf-overlay-msg {
    background: #fff;
    color: #111827;
    padding: 16px 22px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.help-pdf-export-host {
    position: fixed;
    left: 0;
    top: 0;
    width: 750px;
    max-height: none;
    overflow: visible;
    background: #ffffff;
    opacity: 1;
    pointer-events: none;
    z-index: 2147483645;
}

.help-pdf-export-host .help-mock {
    position: static !important;
}

.help-pdf-export-host .hm-pulse,
.help-pdf-export-host .hm-pulse-soft {
    animation: none !important;
    box-shadow: none !important;
    filter: none !important;
}

.help-pdf-export-host section {
    break-inside: auto;
    page-break-inside: auto;
}

.help-pdf-export-host .help-mock,
.help-pdf-export-host .hm-stage,
.help-pdf-export-host .hm-app {
    break-inside: avoid;
    page-break-inside: avoid;
}

.help-hero h2 {
    color: #667eea;
    margin: 0 0 8px;
    font-size: 1.6em;
    text-align: left;
}

.help-hero p {
    margin: 0;
    color: #4b5563;
    font-size: 15px;
}

.help-toc {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.help-toc a {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #dbe3f0;
    color: #4338ca;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.help-toc a:hover {
    background: #eef2ff;
    border-color: #a5b4fc;
}

.help-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #eef1f4;
    scroll-margin-top: 16px;
}

.help-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.help-split {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
    gap: 22px;
    align-items: start;
}

.help-copy h3 {
    color: #333;
    font-size: 1.2em;
    margin: 0 0 12px;
}

.help-copy p {
    margin: 0 0 12px;
    color: #374151;
}

.help-steps {
    margin: 0 0 12px 1.2em;
    padding: 0;
}

.help-steps > li {
    margin-bottom: 10px;
}

.help-steps ul {
    margin: 8px 0 0 1.1em;
    padding: 0;
}

.help-steps ul li {
    margin-bottom: 6px;
}

.help-bullets {
    margin: 0 0 12px 1.2em;
    padding: 0;
}

.help-bullets li {
    margin-bottom: 8px;
}

.help-callout {
    margin: 12px 0 0;
    padding: 12px 14px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-left: 4px solid #3b82f6;
    border-radius: 6px;
    color: #1e3a8a;
    font-size: 14px;
}

.help-table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0 16px;
    font-size: 14px;
}

.help-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.help-table th,
.help-table td {
    border: 1px solid #e5e7eb;
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

.help-table th {
    background: #f8fafc;
    color: #334155;
    font-weight: 700;
}

.help-table td {
    color: #374151;
}

.help-footer-note {
    margin-top: 16px;
    font-size: 13px;
    color: #6b7280;
}

/* Mini UI mockups — scaled replicas of real app screens */
.help-mock {
    position: sticky;
    top: 12px;
}

.hm-stage {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 10px 24px rgba(102, 126, 234, 0.35);
}

.hm-app {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    font-size: 10px;
    color: #334155;
}

.hm-app-flow {
    padding: 12px;
}

.hm-app-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid #eef1f4;
    background: #fff;
}

.hm-user {
    font-size: 8px;
    font-weight: 600;
    color: #2c5a7f;
    max-width: 52px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hm-logo {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    flex-shrink: 0;
    background:
        radial-gradient(circle at 30% 30%, #fff 0 18%, transparent 19%),
        linear-gradient(135deg, #667eea, #764ba2);
}

.hm-brand {
    flex: 1;
    min-width: 0;
    line-height: 1.15;
}

.hm-brand strong {
    display: block;
    font-size: 9px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hm-brand span {
    display: block;
    font-size: 8px;
    color: #667eea;
    font-weight: 600;
}

.hm-logout {
    padding: 3px 7px;
    border-radius: 4px;
    background: #eee;
    color: #555;
    font-size: 8px;
    font-weight: 600;
    flex-shrink: 0;
}

.hm-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 10px;
    border-bottom: 2px solid #e9ecef;
    background: #fff;
}

.hm-back {
    background: #6c757d;
    color: #fff;
    padding: 3px 7px;
    border-radius: 4px;
    font-size: 8px;
    font-weight: 700;
    white-space: nowrap;
}

.hm-nav-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.hm-back-dark {
    background: #212529;
}

.hm-stock-pill {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 999px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
    font-size: 8px;
    font-weight: 700;
    vertical-align: middle;
}

.hm-page-title {
    font-weight: 800;
    color: #333;
    font-size: 10px;
}

.hm-screen {
    padding: 10px;
    background: #fff;
}

.hm-screen-home {
    padding: 16px 12px 14px;
    text-align: center;
}

.hm-h2 {
    color: #667eea;
    font-weight: 800;
    font-size: 11px;
    margin: 0;
}

.hm-label {
    font-size: 8px;
    font-weight: 700;
    color: #555;
    margin: 7px 0 3px;
}

.hm-field {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 5px 7px;
    background: #fff;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 10px;
}

.hm-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.hm-form-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    border: 1px solid #e9ecef;
}

.hm-pills {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.hm-pills span {
    padding: 4px 7px;
    border-radius: 6px;
    border: 1px solid #ccc;
    background: #f8f9fa;
    color: #333;
    font-weight: 600;
    font-size: 8px;
}

.hm-pill-on {
    background: #667eea !important;
    border-color: #667eea !important;
    color: #fff !important;
}

.hm-suggest {
    margin-top: 3px;
    border: 1px solid #c7d2fe;
    border-radius: 5px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.15);
}

.hm-suggest-item {
    padding: 5px 7px;
    font-size: 9px;
    border-top: 1px solid #eef1f4;
    color: #475569;
}

.hm-suggest-item:first-child {
    border-top: none;
}

.hm-suggest-on {
    background: #eef2ff;
    color: #3730a3;
    font-weight: 700;
}

.hm-req-row {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.hm-req {
    padding: 4px 6px;
    border-radius: 5px;
    border: 2px solid #667eea;
    background: #fff;
    color: #667eea;
    font-size: 8px;
    font-weight: 700;
}

.hm-req-on {
    background: #667eea;
    color: #fff;
}

.hm-btn {
    margin-top: 10px;
    display: inline-block;
    padding: 7px 14px;
    border-radius: 5px;
    background: #667eea;
    color: #fff;
    font-weight: 700;
    font-size: 10px;
}

.hm-caption {
    margin-top: 8px;
    text-align: center;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
}

.hm-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.hm-chip-btn {
    background: #667eea;
    color: #fff;
    padding: 5px 8px;
    border-radius: 5px;
    font-weight: 700;
    font-size: 8px;
    white-space: nowrap;
}

.hm-chip-ghost {
    background: #3498db;
}

.hm-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: none;
    border-left: 5px solid #667eea;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.hm-card-ack {
    border-left-color: #ffc107;
}

.hm-card-repl {
    border-left-color: #c2410c;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
}

.hm-card-title {
    font-weight: 800;
    font-size: 11px;
    color: #333;
    margin-bottom: 6px;
    padding-bottom: 5px;
    border-bottom: 2px solid #667eea;
}

.hm-card-repl .hm-card-title {
    border-bottom-color: #c2410c;
}

.hm-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    color: #666;
    font-size: 9px;
    margin-bottom: 6px;
}

.hm-card-meta b {
    color: #333;
}

.hm-card-actions {
    display: flex;
    gap: 5px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.hm-btn-sm {
    padding: 5px 8px;
    border-radius: 5px;
    font-size: 8px;
    font-weight: 700;
    color: #fff;
}

.hm-btn-ack { background: #2196F3; }
.hm-btn-done { background: #28a745; }
.hm-btn-out { background: #f39c12; }
.hm-btn-in { background: #2ecc71; }
.hm-btn-add { background: #f39c12; }
.hm-btn-view { background: #3498db; }

.hm-btn-view-full {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 8px;
    padding: 7px 8px;
    border: 2px solid #3b82f6;
    border-radius: 5px;
    background: #eff6ff;
    color: #1e40af;
    font-weight: 800;
    font-size: 10px;
    box-sizing: border-box;
}

.hm-badge-repl {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 5px;
    border-radius: 4px;
    background: #c2410c;
    color: #fff;
    font-size: 7px;
    font-weight: 700;
    vertical-align: middle;
}

.hm-st-pend { color: #c62828; font-weight: 800; }
.hm-st-ack { color: #1565c0; font-weight: 800; }

.hm-actions-row {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.hm-inv-bar {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}

.hm-summary-row {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.hm-summary-chip {
    border: 1px solid #f39c12;
    color: #f39c12;
    padding: 3px 6px;
    border-radius: 5px;
    font-size: 8px;
    font-weight: 700;
    background: #fff8e6;
}

.hm-tabs {
    display: flex;
    gap: 4px;
    margin: 0 0 8px;
    flex-wrap: wrap;
}

.hm-tab {
    padding: 4px 8px;
    border-radius: 5px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    font-size: 8px;
    font-weight: 700;
    color: #555;
}

.hm-tab-on {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
}

.hm-table {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
}

.hm-tr {
    display: grid;
    grid-template-columns: 1.4fr 0.7fr 0.5fr;
    gap: 4px;
    padding: 5px 7px;
    border-top: 1px solid #eef1f4;
    font-size: 9px;
    align-items: center;
}

.hm-tr:first-child { border-top: none; }

.hm-th {
    background: #f8fafc;
    font-weight: 800;
    color: #475569;
}

.hm-search {
    border: 2px solid #667eea;
    border-radius: 6px;
    padding: 6px 8px;
    margin-bottom: 8px;
    color: #94a3b8;
    font-size: 9px;
    background: #fff;
}

.hm-mini-bom {
    margin-top: 2px;
    padding: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
}

.hm-mini-bom-title {
    font-weight: 800;
    font-size: 9px;
    color: #475569;
    margin-bottom: 6px;
}

.hm-mini-bom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    border-top: 1px solid #e2e8f0;
    font-size: 9px;
}

.hm-mini-bom-row:first-of-type { border-top: none; }

.hm-qty-pill {
    background: #bfdbfe;
    color: #1e3a8a;
    border: 1px solid #93c5fd;
    border-radius: 5px;
    padding: 1px 6px;
    font-weight: 800;
    font-size: 9px;
}

.hm-status-sel {
    display: inline-block;
    padding: 5px 8px;
    border: 2px solid #3b82f6;
    border-radius: 5px;
    background: #dbeafe;
    color: #1e40af;
    font-weight: 700;
    font-size: 10px;
}

.hm-status-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 6px;
}

.hm-status-legend span {
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 7px;
    font-weight: 700;
    border-width: 1px;
    border-style: solid;
}

.hm-lg-proc { background: #fef3c7; color: #92400e; border-color: #f59e0b; }
.hm-lg-prod { background: #dbeafe; color: #1e40af; border-color: #3b82f6; }
.hm-lg-cnd { background: #ede9fe; color: #5b21b6; border-color: #8b5cf6; }
.hm-lg-del { background: #d1fae5; color: #065f46; border-color: #10b981; }

.hm-metric-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.hm-metric {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    padding: 4px 5px;
    min-height: 28px;
}

.hm-metric-action {
    grid-column: span 1;
    padding: 0;
    overflow: hidden;
}

.hm-m-lab {
    font-size: 7px;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
}

.hm-m-val {
    font-weight: 800;
    font-size: 10px;
    padding: 0 5px;
    border-radius: 5px;
    border: 1px solid transparent;
}

.hm-m-blue { color: #1e3a8a; background: #dbeafe; border-color: #93c5fd; }
.hm-m-orange { color: #9a3412; background: #fed7aa; border-color: #fdba74; }
.hm-m-purple { color: #5b21b6; background: #ddd6fe; border-color: #c4b5fd; }
.hm-m-green { color: #065f46; background: #a7f3d0; border-color: #6ee7b7; }

.hm-instant {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    height: 100%;
    padding: 4px 5px;
    background: #eef2ff;
    color: #3730a3;
    font-weight: 800;
    font-size: 7px;
    text-transform: uppercase;
    white-space: nowrap;
    box-sizing: border-box;
}

.hm-landing-title {
    font-weight: 800;
    font-size: 12px;
    color: #333;
    margin-bottom: 8px;
}

.hm-signed-in {
    margin: 0 0 12px;
    font-size: 9px;
    color: #64748b;
    font-weight: 600;
}

.hm-stage-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hm-stage-stack > .hm-caption {
    margin: 0 0 4px;
    text-align: left;
}

.hm-app-login {
    background: linear-gradient(145deg, #1e3a5f 0%, #2c5a7f 45%, #667eea 100%);
    padding: 14px 12px;
}

.hm-login-card {
    background: #fff;
    border-radius: 10px;
    padding: 12px 12px 10px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.25);
    text-align: left;
}

.hm-login-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.hm-login-brand strong {
    display: block;
    font-size: 12px;
    color: #1e3a5f;
    line-height: 1.2;
}

.hm-login-brand span {
    display: block;
    font-size: 8px;
    color: #667eea;
    font-weight: 700;
}

.hm-captcha {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 8px 10px;
    background: #f8fafc;
    font-size: 9px;
    color: #334155;
    font-weight: 600;
    margin-bottom: 8px;
}

.hm-captcha-box {
    width: 14px;
    height: 14px;
    border: 2px solid #94a3b8;
    border-radius: 3px;
    background: #fff;
    flex-shrink: 0;
}

.hm-login-btn {
    margin-top: 4px;
}

.hm-login-note {
    margin-top: 8px;
    font-size: 7px;
    color: #94a3b8;
    text-align: center;
}

.hm-landing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
}

.hm-dept {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 8px;
    padding: 11px 6px;
    font-weight: 700;
    font-size: 8px;
    box-shadow: 0 3px 8px rgba(102, 126, 234, 0.4);
    line-height: 1.2;
}

.hm-dept span {
    display: block;
    font-size: 15px;
    margin-bottom: 3px;
}

.hm-flow {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
}

.hm-flow-step {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid #667eea;
    border-radius: 7px;
    padding: 8px 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
}

.hm-flow-step i {
    font-style: normal;
    font-size: 14px;
    width: 22px;
    text-align: center;
}

.hm-flow-step b {
    display: block;
    font-size: 11px;
    color: #1f2937;
}

.hm-flow-step span {
    display: block;
    margin-top: 1px;
    font-weight: 600;
    font-size: 9px;
    color: #64748b;
}

.hm-flow-arrow {
    text-align: center;
    color: #94a3b8;
    font-weight: 700;
    font-size: 10px;
    line-height: 1.2;
}

.hm-status-path {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px 4px;
}

.hm-status-chip {
    min-width: 78%;
    text-align: center;
    padding: 9px 12px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 12px;
    color: #fff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.hm-st-pend-bg { background: #ef5350; }
.hm-st-ack-bg { background: #2196F3; }
.hm-st-done-bg { background: #28a745; }

.hm-stock-note {
    margin-top: 4px;
    padding: 6px 10px;
    border-radius: 6px;
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    color: #065f46;
    font-size: 9px;
    font-weight: 700;
}

.hm-pulse {
    animation: hmPulse 1.8s ease-in-out infinite;
}

.hm-pulse-soft {
    animation: hmPulseSoft 2.2s ease-in-out infinite;
}

@keyframes hmPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.55); }
    50% { box-shadow: 0 0 0 5px rgba(102, 126, 234, 0); }
}

@keyframes hmPulseSoft {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.08); }
}

@media (max-width: 820px) {
    .help-split {
        grid-template-columns: 1fr;
    }

    .help-mock {
        position: static;
        max-width: 440px;
    }

    .help-hero h2 {
        font-size: 1.35em;
    }

    .help-hero-top {
        flex-direction: column;
        align-items: stretch;
    }

    .help-hero-actions {
        width: 100%;
    }

    .help-pdf-btn {
        width: 100%;
    }

    .button-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        max-width: 560px;
    }

    .option-button {
        min-height: 140px;
        padding: 22px 12px;
        font-size: 18px;
    }

    .option-button .icon {
        font-size: 2.2em;
    }
}

@media (max-width: 480px) {
    .button-container {
        grid-template-columns: 1fr;
        max-width: 320px;
    }
}

/* ---------- Responsive: tablets & phones ---------- */
.table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-scroll .inventory-table {
    min-width: 720px;
}

.nav-spacer {
    width: 100%;
}

@media (max-width: 900px) {
    body {
        padding: 12px;
        display: block;
    }

    .app-sidebar {
        display: none;
    }

    .container {
        margin: 0 auto;
        padding: 18px;
        border-radius: 8px;
    }

    .app-header {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 12px 16px;
        margin-bottom: 20px;
        min-height: 0;
    }

    .header-user {
        order: 1;
        flex: 1 1 auto;
        max-width: calc(100% - 100px);
    }

    .master-logout-btn {
        order: 2;
        flex: 0 0 auto;
        margin-left: 0;
    }

    .app-brand {
        position: static;
        left: auto;
        top: auto;
        transform: none;
        order: 3;
        width: 100%;
        max-width: 100%;
        justify-content: center;
        gap: 12px;
        pointer-events: auto;
    }

    .app-logo {
        width: 64px;
        height: 48px;
    }

    .company-name {
        font-size: 1.05em;
    }

    .app-name {
        font-size: 0.95em;
    }

    .nav-bar.active {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 20px;
    }

    .page-title {
        font-size: 1.35em;
        width: 100%;
        order: -1;
    }

    .nav-spacer {
        display: none;
    }

    .landing-title {
        font-size: 1.8em;
    }

    .landing-subtitle {
        font-size: 1em;
    }

    .form-section {
        padding: 16px;
    }

    .inventory-actions {
        width: 100%;
    }

    .inventory-actions input[type="text"] {
        flex: 1 1 160px;
        min-width: 0;
    }

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

    .requestor-buttons {
        flex-wrap: wrap;
    }

    .requestor-button {
        flex: 1 1 auto;
        min-width: 110px;
    }

    .modal {
        padding: 16px 10px;
        align-items: flex-start;
    }

    .modal-content {
        padding: 24px 18px;
        width: 100%;
        max-height: calc(100vh - 32px);
    }

    .modal-content.large,
    .lot-detail-modal,
    .project-form-modal {
        max-width: 100%;
        width: 100%;
    }

    .modal-buttons {
        flex-wrap: wrap;
    }

    .modal-button {
        min-width: 120px;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    body {
        padding: 8px;
    }

    .container {
        padding: 14px 12px;
        border-radius: 0;
        box-shadow: none;
        min-height: 100vh;
    }

    .app-header {
        flex-direction: column;
        align-items: stretch;
        padding-right: 0;
        gap: 10px;
    }

    .app-logo {
        width: 56px;
        height: 42px;
    }

    .company-name {
        font-size: 0.98em;
    }

    .app-name {
        font-size: 0.88em;
    }

    .master-logout-btn {
        position: static;
        align-self: center;
        order: 2;
        margin-left: 0;
    }

    .nav-bar.active {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-back-group {
        width: 100%;
    }

    .back-button,
    .back-button-dark {
        width: 100%;
        text-align: center;
    }

    .page-title {
        font-size: 1.2em;
        line-height: 1.25;
    }

    .landing-title {
        font-size: 1.45em;
    }

    .option-button {
        min-height: 112px;
        font-size: 17px;
        padding: 18px 12px;
    }

    .option-button .icon {
        font-size: 2em;
    }

    .inventory-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .inventory-title {
        font-size: 1.3em;
    }

    .inventory-summary {
        width: 100%;
    }

    .inventory-filters {
        grid-template-columns: 1fr;
    }

    .inventory-actions {
        flex-direction: column;
        align-items: stretch;
        flex: 0 0 auto;
    }

    .inventory-actions input[type="text"],
    .inventory-actions .action-btn,
    .inventory-actions select {
        width: 100%;
        max-width: none;
        min-width: 0;
        /* Column direction makes flex-basis a height, which stretches these
           controls; keep them at their natural height. */
        flex: 0 0 auto;
    }

    .pill-toggle label {
        flex: 1 1 calc(50% - 6px);
        text-align: center;
    }

    .download-button {
        margin-left: 0;
        width: 100%;
    }

    .request-block {
        min-height: 0;
        padding: 16px;
    }

    .request-block:hover {
        transform: none;
    }

    .lot-bom-summary,
    .lot-bom-summary-2x,
    .lot-bom-summary-4,
    .lot-bom-metrics {
        grid-template-columns: 1fr;
    }

    .help-toc {
        flex-wrap: wrap;
    }

    .table-scroll .inventory-table {
        min-width: 640px;
        font-size: 11px;
    }

    .inventory-table th,
    .inventory-table td {
        padding: 6px 8px;
    }
}

@media (max-width: 380px) {
    .company-name {
        font-size: 0.9em;
    }

    .button-container {
        max-width: 100%;
    }

    .option-button {
        min-height: 100px;
        font-size: 16px;
    }
}

/* Admin user management */
.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.admin-tab {
    border: 2px solid #667eea;
    background: #fff;
    color: #4338ca;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.admin-tab.active {
    background: #667eea;
    color: #fff;
}

.admin-users-list-wrap {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px;
}

.admin-users-full {
    width: 100%;
    box-sizing: border-box;
}

.admin-users-list-header h3 {
    margin: 0;
    color: #334155;
}

.admin-users-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.admin-field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin: 10px 0 6px;
}

.admin-field-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
}

.admin-field-hint {
    margin: 6px 0 0;
    font-size: 12px;
    color: #64748b;
}

.admin-active-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
    width: auto;
    max-width: 100%;
}

.admin-active-row input[type="checkbox"] {
    width: auto;
    min-width: 16px;
    height: auto;
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
    accent-color: #667eea;
}

.admin-user-modal-content {
    max-width: 460px;
}

.app-confirm-modal-content {
    max-width: 440px;
}

#appConfirmOkBtn.app-confirm-danger {
    background: #dc2626;
}

#appConfirmOkBtn.app-confirm-danger:hover {
    background: #b91c1c;
}

#adminUserModal .admin-field-label:first-of-type,
#adminUserModal form > .admin-field-label:first-child {
    margin-top: 0;
}

.admin-users-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.admin-users-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-user-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    flex-wrap: wrap;
}

.admin-user-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.admin-user-meta {
    color: #64748b;
    font-size: 13px;
}

.admin-user-status {
    display: inline-block;
    width: fit-content;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
}

.admin-user-status.active {
    background: #dcfce7;
    color: #166534;
}

.admin-user-status.inactive {
    background: #fee2e2;
    color: #991b1b;
}

.admin-user-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-users-empty {
    color: #64748b;
    margin: 8px 0;
}

.admin-activity-filters {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
    gap: 14px 16px;
    align-items: end;
    margin-bottom: 14px;
}

.admin-activity-filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.admin-activity-filter-field .admin-field-label {
    margin: 0;
}

.admin-activity-filter-actions {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

/* Avoid stacking margin-left:20px from .download-button with gap; on narrow
   viewports width:100% buttons must wrap onto their own rows. */
.admin-activity-filter-actions .download-button {
    margin-left: 0;
}

.admin-activity-meta {
    margin: 0 0 10px;
    color: #64748b;
    font-size: 13px;
}

.admin-activity-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-challan-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.admin-challan-filter-group {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-challan-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: min(68vh, 760px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding-right: 8px;
}

.admin-challan-card {
    background: #f8fafc;
    border: 1px solid #dbe4f0;
    border-radius: 14px;
    padding: 16px;
}

.admin-challan-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.admin-challan-card-head h3 {
    margin: 0;
    color: #1e293b;
}

.admin-challan-card-head p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13px;
}

.admin-challan-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-challan-badge {
    background: #e0e7ff;
    color: #3730a3;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
}

.admin-challan-pdf-button {
    border: 1px solid #082f5f;
    border-radius: 999px;
    padding: 6px 12px;
    background: #082f5f;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.admin-challan-pdf-button:hover {
    background: #c60018;
    border-color: #c60018;
}

.admin-challan-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.admin-challan-meta-row {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-challan-meta-row span {
    font-size: 12px;
    color: #64748b;
}

.admin-challan-meta-row strong {
    color: #0f172a;
    font-size: 13px;
}

.admin-challan-address {
    margin-bottom: 12px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #334155;
    white-space: pre-wrap;
}

.admin-challan-table-wrap {
    overflow-x: auto;
}

.admin-challan-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

.admin-challan-table th,
.admin-challan-table td {
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 12px;
    text-align: left;
    font-size: 13px;
}

.admin-challan-table th {
    background: #eef2ff;
    color: #3730a3;
    font-weight: 700;
}

.admin-activity-row {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
}

.admin-activity-top {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: baseline;
    margin-bottom: 6px;
}

.admin-activity-user {
    font-weight: 700;
    color: #1e293b;
}

.admin-activity-action {
    font-size: 12px;
    font-weight: 700;
    color: #4338ca;
    background: #eef2ff;
    border-radius: 999px;
    padding: 2px 8px;
}

.admin-activity-time {
    margin-left: auto;
    font-size: 12px;
    color: #64748b;
}

.admin-activity-detail {
    color: #334155;
    font-size: 14px;
    line-height: 1.45;
    word-break: break-word;
}

.admin-activity-ip {
    margin-top: 6px;
    font-size: 12px;
    color: #94a3b8;
}

.challan-flag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    align-items: center;
}

.challan-flag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    margin: 0;
}

.challan-flag input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.challan-client-select-row {
    display: block;
}

.challan-client-select-row select {
    width: 100%;
    min-width: 0;
}

.challan-client-details-preview {
    margin-top: 8px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-left: 4px solid #667eea;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
    line-height: 1.45;
}

.challan-client-details-preview strong {
    color: #1e293b;
}

.challan-client-delete {
    width: 42px;
    padding: 6px;
    border: 1px solid #fecaca;
    background: #fff5f5;
    color: #b91c1c;
    border-radius: 6px;
}

.challan-client-delete:hover {
    background: #fee2e2;
}

.modal-on-top {
    z-index: 2500;
}

.directory-modal-content {
    max-width: 980px;
}

.directory-split {
    display: grid;
    grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.4fr);
    gap: 16px;
    align-items: stretch;
}

.directory-list-pane {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.directory-list {
    border: 1px solid #dbe3f0;
    border-radius: 8px;
    min-height: 280px;
    max-height: min(420px, 50vh);
    overflow-y: auto;
    background: #f8fafc;
}

.directory-list-item {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    border-bottom: 1px solid #e2e8f0;
    background: transparent;
    padding: 10px 12px;
    cursor: pointer;
}

.directory-list-item:hover,
.directory-list-item.active {
    background: #eef2ff;
}

.directory-list-item strong {
    display: block;
    color: #1e293b;
}

.directory-list-item span {
    display: block;
    color: #64748b;
    font-size: 12px;
}

.directory-form-pane {
    min-width: 0;
    max-height: min(70vh, 640px);
    overflow-y: auto;
}

.directory-form-pane textarea {
    width: 100%;
    min-height: 72px;
    resize: vertical;
    box-sizing: border-box;
}

.directory-phone-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.directory-phone-row {
    display: grid;
    grid-template-columns: minmax(120px, 0.9fr) minmax(0, 1.4fr) auto;
    gap: 8px;
    align-items: center;
}

.directory-phone-row-single {
    grid-template-columns: minmax(120px, 0.9fr) minmax(0, 1.4fr);
}

.directory-phone-row select,
.directory-phone-row input {
    width: 100%;
    min-width: 0;
}

.directory-phone-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    margin: 0;
    line-height: 1;
    font-size: 18px;
    font-weight: 500;
    border: 1px solid #fecaca;
    background: #fff5f5;
    color: #b91c1c;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
}

.directory-phone-remove:hover {
    background: #fee2e2;
    color: #b91c1c;
}

.directory-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.directory-modal-content > .error-message {
    margin-top: 12px;
    margin-bottom: 0;
}

.directory-footer .modal-button {
    flex: 0 0 auto;
    min-width: 110px;
}

.directory-footer .modal-button.cancel:first-child {
    margin-right: auto;
}

@media (max-width: 800px) {
    .directory-split {
        grid-template-columns: 1fr;
    }

    .directory-footer {
        flex-wrap: wrap;
    }
}

#challanClientAddress {
    display: block;
    width: 100%;
    height: 92px;
    min-height: 92px;
    max-height: 92px;
    resize: none;
    overflow-y: auto;
    box-sizing: border-box;
}

.modal-content.large.challan-modal-content {
    width: min(1240px, 97vw);
    max-width: 1240px;
    max-height: calc(100vh - 24px);
    min-height: min(760px, calc(100vh - 24px));
}

.challan-client-form-divider {
    margin: 20px 0 14px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
    color: #334155;
    font-weight: 700;
}

.challan-client-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
}

.challan-phone-row {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 8px;
}

.challan-phone-row select,
.challan-phone-row input {
    width: 100%;
    min-width: 0;
}

.challan-add-client-btn {
    width: 100%;
}

.challan-client-count {
    margin-top: 8px;
    text-align: center;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.challan-lines-placeholder {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #e2e8f0;
}

.challan-line-header,
.challan-line-row {
    display: grid;
    grid-template-columns:
        minmax(160px, 2.4fr) minmax(72px, 0.8fr)
        minmax(88px, 0.9fr) minmax(58px, 0.6fr) 36px;
    gap: 8px;
    align-items: center;
}

.challan-line-header {
    padding: 0 2px 6px;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

.challan-line-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: min(520px, calc(100vh - 280px));
    overflow-y: auto;
    overflow-x: auto;
    padding-right: 3px;
}

.challan-line-row input,
.challan-line-row select {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 10px 9px;
    font-size: 13px;
}

.challan-line-description {
    min-width: 0;
}

.challan-line-quantity {
    min-width: 96px;
}

.challan-line-row input[readonly] {
    background: #eef3f8;
    color: #334155;
    cursor: not-allowed;
}

.challan-line-remove {
    width: 34px;
    height: 36px;
    min-width: 34px;
    box-sizing: border-box;
    justify-self: center;
    padding: 0;
    border: 1px solid #fecaca;
    background: #fff5f5;
    color: #b91c1c;
}

.challan-line-remove:hover {
    background: #fee2e2;
}

.challan-add-line-btn {
    width: 100%;
    margin-top: 12px;
}

@media (max-width: 900px) {
    .admin-activity-filters {
        grid-template-columns: 1fr;
    }

    .challan-client-fields {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .challan-phone-row {
        grid-template-columns: 1fr;
    }

    .directory-phone-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .directory-phone-row-single {
        grid-template-columns: 1fr;
    }

    .challan-line-header {
        display: none;
    }

    .challan-line-row {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px;
        padding: 10px;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        background: #f8fafc;
    }

    .challan-line-description {
        grid-column: 1 / 3;
    }

    .challan-line-remove {
        grid-column: 3;
        grid-row: 1;
    }
}
