/* Automint Warehouse App Styles */
/* Touch-friendly design for Samsung tablets */

:root {
    --primary-color: #1a5276;
    --primary-hover: #154360;
    --success-color: #27ae60;
    --success-hover: #219a52;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --danger-hover: #c0392b;
    --text-color: #2c3e50;
    --text-light: #7f8c8d;
    --bg-color: #ecf0f1;
    --card-bg: #ffffff;
    --border-color: #bdc3c7;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --touch-min: 48px; /* Minimum touch target size */
    --font-scale: 1; /* User-adjustable font scale: 0.85, 0.95, 1, 1.15, 1.3 */
    --header-height: 56px; /* Fixed AppHeader height - must match .app-header height */
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: calc(16px * var(--font-scale));
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
}

/* ============================================
   Test Mode Banner (global styles for web compatibility)
   ============================================ */

.test-mode-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 40px;
    padding: 0 16px;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.3s ease;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
}

.test-mode-banner.test-mode {
    background-color: #dc3545;
    color: white;
}

.test-mode-banner.live-mode {
    background-color: #28a745;
    color: white;
}

.banner-content {
    display: flex;
    align-items: center;
}

.mode-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-label {
    font-size: 12px;
    min-width: 32px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.3);
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: rgba(255, 255, 255, 0.5);
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* ============================================
   AppHeader Styles (global styles for web compatibility)
   ============================================ */

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 56px;
    padding: 0 1rem;
    background: #1939a3;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    box-sizing: border-box;
}

.app-header.with-test-banner {
    top: 40px;
}

.header-titles h1 {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.2;
    white-space: nowrap;
    color: #fff;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.depot-badge {
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.75rem;
}

.avatar-button {
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    border-radius: 50%;
    background: #c0392b;
    border: 2px solid #e74c3c;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.avatar-button:hover {
    background: #a93226;
    transform: scale(1.05);
}

.avatar-initials {
    color: #fff;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

/* AppHeader Dropdown Menu */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1100;
}

.app-dropdown-menu {
    position: fixed;
    top: 60px;
    right: 1rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    max-width: calc(100vw - 2rem);
    z-index: 1101;
    overflow: hidden;
}

.menu-header {
    padding: 0.875rem 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.menu-user {
    font-weight: 600;
    font-size: 1rem;
    color: #333;
    word-break: break-word;
}

.menu-email {
    font-size: 0.8rem;
    color: #888;
    word-break: break-all;
}

.menu-depot {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    color: #333;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.menu-item:hover {
    background: #f5f5f5;
}

.menu-item svg {
    flex-shrink: 0;
    color: #666;
}

.menu-item.logout {
    color: #dc3545;
}

.menu-item.logout svg {
    color: #dc3545;
}

.menu-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 0.25rem 0;
}

.menu-version {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    color: #999;
    text-align: center;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

/* ============================================
   Loading & Overlays
   ============================================ */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-small {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   Page Headers
   ============================================ */

.page-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.page-header h1 {
    margin: 0;
    font-size: 1.5rem;
    flex: 1;
}

.back-button {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.1rem;
    padding: 8px 12px;
    cursor: pointer;
    min-height: var(--touch-min);
}

/* Sub-header for pages with main AppHeader */
.page-sub-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    margin-top: var(--total-header-offset, var(--header-height)); /* Space for fixed header (+ banner in dev mode) */
}

.page-sub-header h2 {
    margin: 0;
    font-size: 1.15rem;
    flex: 1;
    font-weight: 600;
}

/* ============================================
   Alerts
   ============================================ */

.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    margin: 16px;
    border-radius: var(--radius);
    font-weight: 500;
}

.alert-error {
    background: #fdecea;
    color: #c0392b;
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background: #fef9e7;
    color: #9a7b4f;
    border-left: 4px solid var(--warning-color);
}

.alert-success {
    background: #eafaf1;
    color: #1e8449;
    border-left: 4px solid var(--success-color);
}

.alert-info {
    background: #e8f4fd;
    color: #2980b9;
    border-left: 4px solid #3498db;
}

.alert-info.consignment-info {
    margin-top: 0.5rem;
    font-size: 1.1rem;
}

.cancel-shipment-section {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.cancel-shipment-section .btn-danger {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}

.shipment-actions-section {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 1rem 16px;
    flex-wrap: wrap;
}

.shipment-actions-section .btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    min-width: 140px;
}

.alert-icon {
    font-size: 1.5rem;
}

.alert-link {
    background: none;
    border: 1px solid currentColor;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    color: inherit;
    margin-left: 12px;
    white-space: nowrap;
}

.alert-link:active {
    opacity: 0.7;
}

.alert-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    min-width: var(--touch-min);
    min-height: var(--touch-min);
}

/* ============================================
   Fatal Error Display
   ============================================ */

.fatal-error {
    text-align: center;
    padding: 48px 24px;
    margin: 24px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.fatal-error .error-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.fatal-error h2 {
    margin: 0 0 8px 0;
    color: var(--danger-color);
}

.fatal-error .error-code {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 8px;
}

.fatal-error .error-message {
    font-size: 1.1rem;
    margin-bottom: 24px;
}

.return-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 1.1rem;
    border-radius: var(--radius);
    cursor: pointer;
    min-height: var(--touch-min);
}

/* ============================================
   Fixed Header Spacing
   ============================================ */

/* All pages - sub-header/greeting handles the fixed header spacing */
.stock-info-page,
.despatch-page,
.refresh-page,
.settings-page,
.staff-select-page,
.scanner-page,
.login-page,
.delivery-labels-page,
.bom-view-page,
.appliance-page {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Max-width container for all pages (web-friendly) */
.settings-page,
.staff-select-page,
.delivery-labels-page,
.bom-view-page,
.appliance-page {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Scanner page greeting section */
.scanner-page .greeting-section {
    margin-top: var(--total-header-offset, var(--header-height)); /* Space for fixed header (+ banner in dev mode) */
}

/* ============================================
   Login Page
   ============================================ */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1939a3 0%, #0d2157 100%);
    padding: 24px;
}

.login-container {
    background: #fff;
    border-radius: 16px;
    padding: 48px 32px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.login-header {
    margin-bottom: 32px;
}

.app-logo {
    margin-bottom: 16px;
}

.login-header h1 {
    margin: 0 0 8px 0;
    font-size: 2rem;
    color: #1939a3;
    font-weight: 700;
}

.login-subtitle {
    margin: 0;
    color: #666;
    font-size: 1rem;
}

.login-error {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    margin-bottom: 24px;
    background: #fdecea;
    color: #c0392b;
    border-radius: 8px;
    font-size: 0.95rem;
    text-align: left;
}

.login-error svg {
    flex-shrink: 0;
}

.login-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px 24px;
    background: #1939a3;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    min-height: 56px;
}

.login-button:hover:not(:disabled) {
    background: #142d7a;
}

.login-button:active:not(:disabled) {
    transform: scale(0.98);
}

.login-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-button svg {
    flex-shrink: 0;
}

.login-help {
    margin: 24px 0 0 0;
    color: #888;
    font-size: 0.9rem;
}

/* Auth checking state */
.auth-checking {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
    gap: 16px;
}

.auth-checking p {
    color: var(--text-light);
    font-size: 1rem;
}

/* Responsive login page */
@media (max-width: 480px) {
    .login-container {
        padding: 32px 24px;
    }

    .login-header h1 {
        font-size: 1.75rem;
    }

    .login-button {
        font-size: 1rem;
        padding: 14px 20px;
    }
}

/* ============================================
   Scanner Page
   ============================================ */

.scanner-page {
    padding: 16px;
    padding-top: 0;
    max-width: 600px;
    margin: 0 auto;
}

.scanner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.scanner-header h1 {
    margin: 0;
}

/* Greeting section */
.greeting-section {
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Outstanding Orders Circle */
.orders-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(26, 82, 118, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.orders-circle .orders-count {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

.orders-circle .orders-label {
    font-size: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.greeting-text {
    font-size: 1rem;
    font-weight: 500;
    color: #2c3e50;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.depot-badge {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ============================================
   Camera Scanner Section
   ============================================ */

.camera-scanner-section {
    margin: 0 16px 16px 16px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.scanner-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
}

.scanner-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-color);
}

.scanner-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    min-height: 40px;
}

.scanner-toggle-btn:active {
    background: var(--primary-hover);
}

.scanner-toggle-btn.active {
    background: var(--danger-color);
}

.scanner-toggle-btn.active:active {
    background: var(--danger-hover);
}

.scanner-viewport {
    position: relative;
    width: 100%;
    height: 200px;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scanner-viewport.active {
    height: 250px;
}

.scanner-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #666;
}

.scanner-placeholder svg {
    opacity: 0.5;
}

.scanner-placeholder p {
    margin: 0;
    font-size: 0.9rem;
}

/* html5-qrcode overrides */
#barcode-scanner video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

#barcode-scanner img[alt="Info icon"] {
    display: none !important;
}

#barcode-scanner__scan_region {
    background: transparent !important;
}

#barcode-scanner__dashboard_section {
    display: none !important;
}

#barcode-scanner__dashboard_section_csr {
    display: none !important;
}

/* ============================================
   Scan Barcode Button Section
   ============================================ */

.scan-barcode-section {
    margin: 16px;
    display: flex;
    justify-content: center;
}

.scan-barcode-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 400px;
    padding: 20px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 70px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.scan-barcode-btn:active:not(:disabled) {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.scan-barcode-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.scan-barcode-btn svg {
    flex-shrink: 0;
}

.scan-input-section {
    margin-bottom: 32px;
}

.scan-input-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.scan-input-wrapper {
    display: flex;
    gap: 8px;
}

.scan-input {
    flex: 1;
    padding: 16px;
    font-size: 1.2rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    min-height: var(--touch-min);
}

.scan-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.scan-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    min-width: 80px;
    min-height: var(--touch-min);
}

.scan-button:active {
    background: var(--primary-hover);
}

.quick-actions h3 {
    margin: 0 0 12px 0;
    font-size: 1rem;
    color: var(--text-light);
}

.recent-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    min-height: var(--touch-min);
}

.recent-item:active {
    background: var(--bg-color);
}

.scan-type {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
}

.scan-value {
    font-weight: 600;
}

.no-recent {
    color: var(--text-light);
    font-style: italic;
}

.scan-help {
    margin-top: 32px;
    padding: 16px;
    background: var(--card-bg);
    border-radius: var(--radius);
}

.scan-help h4 {
    margin: 0 0 12px 0;
}

.scan-help ul {
    margin: 0;
    padding-left: 20px;
}

.scan-help li {
    margin-bottom: 4px;
}

/* ============================================
   Staff Selection
   ============================================ */

.staff-select-page {
    padding-bottom: 100px; /* Space for action bar */
}

.depot-selector {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.depot-selector select {
    flex: 1;
    padding: 12px;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    min-height: var(--touch-min);
}

.staff-section,
.other-section {
    padding: 16px;
}

.staff-section h2 {
    margin: 0 0 16px 0;
    font-size: 1.2rem;
}

.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
}

.staff-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.2s;
    min-height: 100px;
}

.staff-card:active,
.staff-card.selected {
    border-color: var(--primary-color);
    background: #e8f4f8;
}

.staff-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.staff-name {
    font-weight: 500;
    text-align: center;
    font-size: 0.9rem;
}

.toggle-others {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1rem;
    cursor: pointer;
    padding: 12px 0;
    min-height: var(--touch-min);
}

.toggle-others.toggle-more {
    margin-top: 16px;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    width: 100%;
}

.staff-grid-small {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}

.staff-card-small {
    padding: 12px;
    min-height: 80px;
}

.staff-avatar-small {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
}

.staff-name-small {
    font-size: 0.8rem;
}

.action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

.continue-button {
    width: 100%;
    padding: 16px;
    background: var(--success-color);
    color: white;
    border: none;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    min-height: 56px;
}

.continue-button:active {
    background: var(--success-hover);
}

/* ============================================
   Despatch Page
   ============================================ */

.despatch-page {
    padding-bottom: 100px;
    max-width: 600px;
    margin: 0 auto;
}

.carrier-logo {
    text-align: center;
    padding: 16px;
}

.carrier-logo img {
    max-height: 60px;
    max-width: 200px;
}

.delivery-section,
.items-section,
.packing-inputs {
    margin: 16px;
    padding: 16px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.section-header h2 {
    margin: 0;
    font-size: 1.1rem;
}

.carrier-badge {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 600;
}

.toggle-icon {
    color: var(--text-light);
}

.address-card {
    background: var(--bg-color);
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 12px;
}

.address-line {
    margin-bottom: 4px;
}

.address-line.company {
    font-weight: 600;
    font-size: 1.1rem;
}

.address-line.postcode {
    font-weight: 600;
    margin-top: 8px;
}

.contact-info,
.customer-ref {
    margin-top: 8px;
    font-size: 0.95rem;
}

.items-list {
    margin-bottom: 12px;
}

.item-card {
    padding: 12px;
    background: var(--bg-color);
    border-radius: var(--radius);
    margin-bottom: 8px;
}

.item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.stock-code {
    font-weight: 600;
    font-family: monospace;
}

.item-qty {
    font-weight: 600;
    color: var(--primary-color);
}

.item-desc {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 8px;
}

.item-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
}

.stock-warning {
    color: var(--danger-color);
    font-weight: 500;
}

.items-summary {
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    font-size: 0.95rem;
}

.print-labels-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.print-labels-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.print-labels-btn:hover:not(:disabled) {
    background: var(--primary-hover);
}

.print-labels-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.printer-warning-inline {
    color: var(--warning-color);
    font-size: 0.9rem;
}

/* BOM Section */
.bom-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--border-color);
}

.bom-toggle {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.bom-table {
    width: 100%;
    margin-top: 8px;
    font-size: 0.8rem;
    border-collapse: collapse;
}

.bom-table th,
.bom-table td {
    padding: 6px 8px;
    text-align: left;
}

.bom-table thead th {
    background: var(--bg-color);
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--text-light);
    border-bottom: 1px solid var(--border-color);
}

.bom-table tbody tr:nth-child(even) {
    background: var(--bg-color);
}

.bom-table .bom-code {
    font-weight: 600;
}

.bom-table .bom-qty {
    color: var(--primary-color);
    text-align: center;
}

.bom-table .bom-bin {
    color: var(--text-light);
}

.bom-table .bom-stock {
    color: var(--success-color);
    text-align: right;
}

.bom-table .bom-stock.low {
    color: var(--danger-color);
    font-weight: 500;
}

/* ============================================
   Stock Information Section
   ============================================ */

.stock-info-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--border-color);
}

.stock-info-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 0.9rem;
    padding: 8px 0;
}

.stock-info-btn {
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    cursor: pointer;
    min-height: 40px;
}

.stock-info-btn:active {
    background: var(--bg-color);
}

.no-stock-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

.stock-info-toggle {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stock-info-content {
    margin-top: 12px;
    padding: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

/* Stock Images - Thumbnails */
.stock-images {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.stock-thumb {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s;
}

.stock-thumb:hover,
.stock-thumb.selected {
    border-color: var(--primary-color);
}

/* Large Image Overlay */
.stock-image-large {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    cursor: pointer;
}

.stock-image-large img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: var(--radius);
}

.close-image {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2rem;
    font-weight: 300;
}

/* Stock Details */
.stock-details {
    margin-bottom: 12px;
}

.stock-detail-row {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.detail-label {
    font-weight: 600;
    color: var(--text-light);
    min-width: 80px;
}

.cached-indicator {
    font-weight: normal;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
    margin-left: 4px;
}

/* Depot Stock */
.stock-depots {
    margin-bottom: 12px;
    padding: 8px;
    background: var(--bg-color);
    border-radius: 4px;
}

.depot-row {
    display: flex;
    gap: 12px;
    padding: 4px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-color);
}

.depot-row:last-child {
    border-bottom: none;
}

.depot-name {
    font-weight: 600;
    min-width: 60px;
}

.depot-qty {
    color: var(--success-color);
}

.depot-backorders {
    color: var(--warning-color);
}

/* Stock BOM */
.stock-bom {
    margin-top: 12px;
}

.stock-bom .bom-table {
    margin-top: 8px;
}

.stock-bom .bom-desc {
    font-size: 0.75rem;
    color: var(--text-light);
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================
   Packing Inputs - Touch Friendly
   ============================================ */

.packing-inputs h2 {
    margin: 0 0 16px 0;
    font-size: 1.1rem;
}

/* Packing Group - bordered container for each item type */
.packing-group {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 12px;
    background: var(--card-bg);
}

.packing-group-header {
    background: var(--bg-color);
    padding: 8px 12px;
    font-weight: 600;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border-color);
    border-radius: var(--radius) var(--radius) 0 0;
}

.packing-group-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Side by side on larger screens (8"+) */
@media (min-width: 600px) {
    .packing-group-content {
        flex-direction: row;
        gap: 16px;
    }

    /* Qty gets 40%, Weight gets 60% */
    .input-cell:first-child {
        flex: 4;
    }

    .input-cell:last-child {
        flex: 6;
    }
}

.input-cell {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
}

.input-cell label {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

.input-cell.full-width {
    flex: 1;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.counter-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.counter-row.compact {
    gap: 4px;
}

.weight-row {
    gap: 4px;
}

.counter-btn {
    min-width: 56px;
    min-height: 56px;
    font-size: 1.2rem;
    font-weight: 600;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--card-bg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Compact buttons for side-by-side layout - use flex to fill space */
.counter-row.compact {
    width: 100%;
    min-width: 0;
}

.counter-row.compact .counter-btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 50px;
    font-size: 1.1rem;
}

.counter-row.compact .counter-btn.increment-10,
.counter-row.compact .counter-btn.decrement-10 {
    font-size: 0.95rem;
}

.counter-btn:active:not(:disabled) {
    background: var(--bg-color);
}

.counter-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.counter-btn.increment,
.counter-btn.increment-10 {
    background: #e8f5e9;
    border-color: var(--success-color);
    color: var(--success-color);
}

.counter-btn.decrement,
.counter-btn.decrement-10 {
    background: #ffebee;
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.counter-btn.increment-10,
.counter-btn.decrement-10 {
    min-width: 48px;
    font-size: 1rem;
}

.counter-value {
    flex: 1;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 600;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    padding: 12px;
    min-height: 56px;
    max-width: 120px;
}

/* Compact counter value for side-by-side layout */
.counter-value.compact {
    flex: 1 1 0;
    min-width: 0;
    font-size: 1.2rem;
    padding: 8px;
    min-height: 50px;
    max-width: none;
}

.counter-value:focus {
    outline: none;
    border-color: var(--primary-color);
}

.text-input {
    width: 100%;
    padding: 16px;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    min-height: var(--touch-min);
}

.carrier-notes {
    padding: 12px;
    background: #fff3cd;
    border-radius: var(--radius);
    margin-top: 16px;
    font-size: 0.95rem;
}

.packing-summary {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
}

.summary-item {
    text-align: center;
}

.summary-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
}

.summary-value {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* ============================================
   Despatch Photos Section
   ============================================ */

.photos-section {
    margin: 16px;
    padding: 16px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.photo-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.photo-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 500;
    min-height: var(--touch-min);
}

.photo-btn.photo-btn-camera {
    flex: 3;
}

.photo-btn.photo-btn-gallery {
    flex: 1;
}

.photo-btn:disabled {
    opacity: 0.6;
}

.photo-message {
    margin-bottom: 12px;
    padding: 8px 12px;
    font-size: 0.9rem;
}

.photos-header {
    cursor: pointer;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.photo-thumb-container {
    cursor: pointer;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 1;
    background: var(--bg-color);
}

.photo-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.photo-thumb:hover {
    transform: scale(1.05);
}

.photo-thumb.selected {
    outline: 3px solid var(--primary-color);
}

.photo-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: pointer;
}

.photo-large-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.photo-large {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius);
}

.close-photo {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 36px;
    height: 36px;
    background: white;
    color: var(--text-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.no-photos {
    color: var(--text-light);
    font-style: italic;
    margin-top: 8px;
}

/* Photo long-press to delete */
.photo-thumb-container {
    position: relative;
}

.photo-thumb-container.long-pressing {
    transform: scale(0.95);
    opacity: 0.8;
}

.long-press-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0 0 var(--radius) var(--radius);
    overflow: hidden;
}

.long-press-progress {
    height: 100%;
    background: var(--danger-color);
    animation: longPressProgress 3s linear forwards;
}

@keyframes longPressProgress {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}

.delete-photo-preview {
    margin-top: 12px;
    text-align: center;
}

.delete-photo-preview img {
    max-width: 200px;
    max-height: 150px;
    object-fit: contain;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

/* ============================================
   Action Buttons
   ============================================ */

.action-buttons {
    padding: 16px;
    margin: 16px;
    margin-bottom: 24px;
    background: var(--card-bg);
    border-radius: var(--radius);
    display: flex;
    gap: 12px;
}

.btn {
    padding: 16px 24px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-large {
    flex: 2;
    font-size: 1.2rem;
}

.btn-primary {
    background: var(--success-color);
    color: white;
}

.btn-primary:active:not(:disabled) {
    background: var(--success-hover);
}

.btn-secondary {
    background: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    flex: 1;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
    flex: 1;
}

.btn-danger:active:not(:disabled) {
    background: var(--danger-hover);
}

/* ============================================
   Responsive Adjustments
   ============================================ */

@media (max-width: 480px) {
    .counter-btn {
        min-width: 48px;
        min-height: 48px;
    }

    .counter-btn.increment-10,
    .counter-btn.decrement-10 {
        min-width: 40px;
    }

    .action-buttons {
        flex-wrap: wrap;
    }

    .btn-large {
        flex: 1 1 100%;
    }
}

/* ============================================
   Utilities
   ============================================ */

.no-staff {
    color: var(--text-light);
    font-style: italic;
    text-align: center;
    padding: 24px;
}

.loading-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: var(--text-light);
}

/* ============================================
   Modal / Popup
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    padding: 16px;
}

.modal-dialog {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 100%;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-color);
}

.modal-body {
    padding: 20px;
}

.modal-body p {
    margin: 0 0 12px 0;
}

.modal-body p:last-child {
    margin-bottom: 0;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-footer .btn {
    min-height: 48px;
    flex: 1;
}

/* Success Dialog */
.success-dialog .modal-body {
    text-align: center;
    padding: 32px 20px;
}

.success-dialog .success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--success-color, #28a745);
    color: white;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.success-dialog .success-header {
    background: var(--success-color, #28a745);
    color: white;
}

.success-dialog .success-header h3 {
    color: white;
}

.success-dialog .consignment-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px !important;
}

.success-dialog .consignment-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: monospace;
    margin: 0 !important;
}

/* ============================================
   Stock Info Page
   ============================================ */

.stock-info-page {
    padding-bottom: 24px;
    max-width: 600px;
    margin: 0 auto;
}

.stock-info-page .search-section {
    padding: 20px;
}

.stock-info-page .search-section label {
    display: block;
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.stock-detail-card {
    margin: 16px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.stock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.stock-code-title {
    margin: 0;
    font-size: 1.8rem;
    font-family: monospace;
    color: var(--primary-color);
}

.company-badge {
    background: var(--bg-color);
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 1rem;
    color: var(--text-light);
}

.stock-description {
    color: var(--text-light);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

/* Stock Images Section */
.stock-images-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.stock-images-section h3 {
    margin: 0 0 12px 0;
    font-size: 1.3rem;
}

.stock-images-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.stock-image-thumb {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s;
}

.stock-image-thumb:hover,
.stock-image-thumb.selected {
    border-color: var(--primary-color);
}

.stock-image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    cursor: pointer;
}

.stock-image-overlay img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: var(--radius);
}

.close-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2rem;
    font-weight: 300;
}

/* Editable Fields Section */
.editable-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.editable-section h3 {
    margin: 0 0 16px 0;
    font-size: 1.3rem;
}

.edit-field {
    margin-bottom: 16px;
}

.edit-field label {
    display: block;
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 8px;
}

.edit-row {
    display: flex;
    gap: 12px;
    width: 100%;
    max-width: 100%;
}

.edit-input {
    flex: 1;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    padding: 14px;
    font-size: 1.2rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    min-height: 52px;
    box-sizing: border-box;
}

.edit-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.edit-input.input-error {
    background-color: var(--danger-color);
    border-color: var(--danger-hover);
    color: white;
}

.edit-input.input-error::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.edit-input.input-error:focus {
    border-color: var(--danger-hover);
    outline: none;
}

.edit-save-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    min-width: 100px;
    min-height: 52px;
}

.edit-save-btn:active:not(:disabled) {
    background: var(--primary-hover);
}

.edit-save-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Stock Movements Section */
.stock-movements-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.stock-movements-section .section-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 100%;
    text-align: left;
}

.stock-movements-section .section-toggle h3 {
    margin: 0;
    font-size: 1.3rem;
}

.stock-movements-section .toggle-icon {
    font-size: 0.9rem;
    color: var(--text-light);
}

.stock-movements-content {
    margin-top: 16px;
}

.movements-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    padding: 16px 0;
}

.movements-table-wrapper {
    overflow-x: auto;
    margin: 0 -16px;
    padding: 0 16px;
}

.movements-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    min-width: 400px;
}

.movements-table th,
.movements-table td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.movements-table th {
    background: var(--bg-color);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-light);
    position: sticky;
    top: 0;
}

.movements-table .date-col {
    white-space: nowrap;
    width: 70px;
}

.movements-table .type-col {
    min-width: 80px;
}

.movements-table .ref-col {
    word-break: break-all;
}

.movements-table .qty-col {
    text-align: right;
    white-space: nowrap;
    font-weight: 600;
    width: 60px;
}

.movements-table .qty-col.positive {
    color: var(--success-color);
}

.movements-table .qty-col.negative {
    color: var(--danger-color);
}

.movements-table tbody tr:hover {
    background: var(--bg-color);
}

.movements-count {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 12px;
    text-align: center;
}

.movements-error {
    color: var(--danger-color);
    padding: 12px;
    background: rgba(220, 53, 69, 0.1);
    border-radius: var(--radius);
}

.movements-empty {
    color: var(--text-light);
    padding: 16px;
    text-align: center;
}

/* Stock Levels Section */
.stock-levels-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.stock-levels-section h3 {
    margin: 0 0 16px 0;
    font-size: 1.3rem;
}

.stock-stat {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 1.15rem;
}

.stat-label {
    color: var(--text-light);
}

.stat-value {
    font-weight: 600;
}

.depot-stock-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.1rem;
    margin-top: 12px;
}

.depot-stock-table th,
.depot-stock-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.depot-stock-table th {
    background: var(--bg-color);
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-light);
}

.depot-stock-table tr.current-depot {
    background: #e8f4fd;
}

.depot-stock-table .positive {
    color: var(--success-color);
    font-weight: 600;
}

.depot-stock-table .zero {
    color: var(--text-light);
}

.depot-stock-table .warning {
    color: var(--warning-color);
}

/* Depot Stock Grid (for Stock Info page) */
.depot-stock-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.depot-stock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px 12px;
    background: var(--bg-color);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    min-height: 80px;
}

.depot-stock-item.current-depot {
    background: #e8f4fd;
    border-color: var(--primary-color);
}

.depot-stock-item .depot-name {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 4px;
}

.depot-stock-item .depot-qty {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
}

.depot-stock-item .depot-qty.positive {
    color: var(--success-color);
}

.depot-stock-item .depot-qty.zero {
    color: var(--text-light);
}

.depot-stock-item .depot-location {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 4px;
    font-weight: 500;
    margin-top: 2px;
}

/* Grouped Stock Codes Section */
.grouped-stock-section {
    margin-top: 24px;
    padding: 16px;
    background: var(--card-bg);
    border-radius: var(--radius);
}

.grouped-stock-section h3 {
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    color: var(--text-color);
}

.grouped-stock-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.grouped-stock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px 12px;
    background: var(--bg-color);
    border-radius: var(--radius);
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    min-height: 70px;
}

.grouped-stock-item:hover,
.grouped-stock-item:active {
    border-color: var(--primary-color);
    background: #e8f4fd;
}

.grouped-stock-code {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.grouped-stock-desc {
    font-size: 0.75rem;
    color: var(--text-light);
    line-height: 1.2;
}

/* BOM Detail Table */
.bom-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.05rem;
}

.bom-detail-table th,
.bom-detail-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.bom-detail-table th {
    background: var(--bg-color);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-light);
}

.bom-detail-table .bom-code {
    font-family: monospace;
    font-weight: 600;
}

.bom-detail-table .bom-desc {
    color: var(--text-light);
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bom-detail-table .bom-qty {
    text-align: center;
    color: var(--primary-color);
}

.bom-detail-table .bom-loc {
    color: var(--text-light);
}

.bom-detail-table .low-stock {
    color: var(--danger-color);
    font-weight: 600;
}

.no-results {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-light);
    font-size: 1.2rem;
}

/* Action Buttons Stack for Scanner Page */
.action-buttons-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 16px;
    margin-bottom: 24px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    min-height: 56px;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.2s;
}

.action-btn svg {
    flex-shrink: 0;
}

/* Printer Button - Primary color */
.action-btn.printer-btn {
    background: var(--primary-color);
    color: white;
}

.action-btn.printer-btn:active {
    background: var(--primary-hover);
}

/* Stock Info Button - Teal/Green color */
.action-btn.stock-btn {
    background: #16a085;
    color: white;
}

.action-btn.stock-btn:active {
    background: #138d75;
}

/* Delivery Labels Button - Orange color */
.action-btn.delivery-btn {
    background: #e67e22;
    color: white;
}

.action-btn.delivery-btn:active {
    background: #d35400;
}

/* Batch View Button - Purple color */
.action-btn.batch-btn {
    background: #9b59b6;
    color: white;
}

.action-btn.batch-btn:active {
    background: #8e44ad;
}

/* Appliance Button - Light blue */
.action-btn.appliance-btn {
    background: #5dade2;
    color: white;
}

.action-btn.appliance-btn:active {
    background: #3498db;
}

/* User Printing Button - Green with badge */
.action-btn.user-printing-btn {
    background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
    color: white;
    position: relative;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.action-btn.user-printing-btn:active:not(:disabled) {
    background: linear-gradient(135deg, #1e8449 0%, #196f3d 100%);
    box-shadow: 0 2px 6px rgba(39, 174, 96, 0.3);
}

.action-btn.user-printing-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Queue Badge for User Printing Button */
.queue-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    background: #e74c3c;
    color: white;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-left: 8px;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* ============================================
   Typeahead Search
   ============================================ */

.typeahead-wrapper {
    position: relative;
}

.typeahead-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.typeahead-item {
    padding: 16px 20px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.typeahead-item:last-child {
    border-bottom: none;
}

.typeahead-item:active {
    background: var(--bg-color);
}

.typeahead-code {
    font-weight: 600;
    font-size: 1.2rem;
    font-family: monospace;
    color: var(--primary-color);
}

.typeahead-desc {
    font-size: 1.05rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-hint {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
}

.hint-text {
    font-size: 1rem;
    color: var(--text-light);
}

/* ============================================
   Catalogue & Live Data Sections
   ============================================ */

.catalogue-section,
.live-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.catalogue-section h3,
.live-section h3 {
    margin: 0 0 16px 0;
    font-size: 1.3rem;
}

/* Print Label Section */
.print-label-section {
    margin-bottom: 24px;
    background: var(--bg-color);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.print-label-section .section-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 16px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
}

.print-label-section .section-toggle:hover {
    background: rgba(0, 0, 0, 0.03);
}

.print-label-section .toggle-icon {
    font-size: 0.8rem;
    color: var(--text-light);
}

.print-label-section h3 {
    margin: 0;
    font-size: 1.2rem;
}

.print-label-content {
    padding: 0 16px 16px 16px;
}

.print-label-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.qty-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-input-group label {
    font-weight: 500;
    white-space: nowrap;
}

.qty-input {
    width: 80px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1.1rem;
    text-align: center;
}

.print-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-left: auto;
}

.print-btn:hover:not(:disabled) {
    background: var(--primary-hover);
}

.print-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.printer-warning {
    margin: 12px 0 0 0;
    color: var(--warning-color);
    font-size: 0.95rem;
}

.printer-info {
    margin: 12px 0 0 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

.detail-grid,
.live-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.detail-item,
.live-item {
    display: flex;
    flex-direction: column;
    padding: 12px;
    background: var(--bg-color);
    border-radius: 4px;
}

.detail-label,
.live-label {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 4px;
}

.detail-value,
.live-value {
    font-weight: 600;
    font-size: 1.25rem;
}

.live-value.location {
    font-family: monospace;
    color: var(--primary-color);
}

.live-value.positive {
    color: var(--success-color);
}

.live-value.zero {
    color: var(--text-light);
}

.live-value.warning {
    color: var(--warning-color);
}

.live-section.loading {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-light);
    padding: 24px;
    justify-content: center;
    font-size: 1.1rem;
}

.api-unavailable-note {
    color: var(--text-light);
    font-style: italic;
    font-size: 0.95rem;
    margin: 8px 0 0 0;
}

/* ============================================
   Refresh Page
   ============================================ */

.refresh-page {
    min-height: 100vh;
    background: var(--bg-color);
    max-width: 600px;
    margin: 0 auto;
}

.refresh-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
}

.refresh-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.refresh-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--primary-color);
    color: white;
}

.refresh-card-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.refreshing-indicator {
    font-size: 1.1rem;
    opacity: 0.9;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 0.5; }
}

.refresh-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.refresh-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: var(--bg-color);
    border-radius: 4px;
}

.stat-label {
    color: var(--text-light);
    font-size: 1.2rem;
}

.stat-value {
    font-weight: 600;
    font-size: 1.4rem;
}

.stat-value.stale {
    color: var(--warning-color);
}

.refresh-card-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.refresh-btn {
    width: 100%;
    padding: 16px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 56px;
}

.refresh-btn:active:not(:disabled) {
    background: var(--primary-hover);
}

.refresh-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.refresh-all-section {
    padding: 16px;
}

.refresh-all-btn {
    width: 100%;
    padding: 18px 20px;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 64px;
}

.refresh-all-btn:active:not(:disabled) {
    background: var(--success-hover);
}

.refresh-all-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.refresh-info {
    padding: 20px;
    margin: 16px;
    background: var(--card-bg);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary-color);
}

.refresh-info p {
    margin: 0 0 12px 0;
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--text-color);
}

.refresh-info ul {
    margin: 0;
    padding-left: 24px;
    color: var(--text-light);
    font-size: 1.1rem;
}

.refresh-info li {
    margin: 8px 0;
}

/* ============================================
   Responsive Styles for Smaller Devices
   ============================================ */

/* Scan input responsive sizing */
.scan-input-wrapper {
    flex-wrap: nowrap;
    max-width: 100%;
}

.scan-input {
    width: 100%;
    min-width: 0; /* Allow shrinking below content size */
    max-width: 100%;
    font-size: clamp(0.9rem, 4vw, 1.2rem);
    padding: clamp(10px, 3vw, 16px);
}

.scan-button {
    flex-shrink: 0;
    padding: clamp(10px, 3vw, 16px) clamp(16px, 4vw, 32px);
    font-size: clamp(0.9rem, 4vw, 1.2rem);
    min-width: clamp(60px, 15vw, 80px);
}

/* Stock info page search section */
.search-section {
    max-width: 100%;
}

.search-section .scan-input {
    width: 100%;
}

.typeahead-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
}

/* Medium screens */
@media (max-width: 480px) {
    .scanner-page,
    .stock-info-page,
    .despatch-page,
    .refresh-page,
    .settings-page,
    .staff-select-page,
    .delivery-labels-page {
        padding-left: 12px;
        padding-right: 12px;
        padding-bottom: 12px;
    }

    .scan-input-section {
        margin-bottom: 20px;
    }

    .scan-input-section label {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }

    .scan-input {
        padding: 12px;
        font-size: 1rem;
    }

    .scan-button {
        padding: 12px 20px;
        font-size: 1rem;
        min-width: 65px;
    }

    .action-buttons-stack {
        gap: 8px;
    }

    .action-btn {
        padding: 12px 16px;
        font-size: 0.95rem;
    }

    .edit-input {
        padding: 12px;
        font-size: 1rem;
    }

    .edit-save-btn {
        min-width: 70px;
        padding: 0 16px;
        font-size: 1rem;
    }
}

/* Small screens */
@media (max-width: 360px) {
    .scanner-page,
    .stock-info-page,
    .despatch-page,
    .refresh-page,
    .settings-page,
    .staff-select-page,
    .delivery-labels-page {
        padding-left: 8px;
        padding-right: 8px;
        padding-bottom: 8px;
    }

    .scan-input-section {
        margin-bottom: 16px;
    }

    .scan-input-section label {
        font-size: 0.85rem;
    }

    .scan-input {
        padding: 10px;
        font-size: 0.9rem;
    }

    .scan-button {
        padding: 10px 16px;
        font-size: 0.9rem;
        min-width: 55px;
    }

    .scan-help {
        margin-top: 16px;
        padding: 12px;
    }

    .scan-help h4 {
        font-size: 0.9rem;
    }

    .scan-help ul {
        font-size: 0.85rem;
    }

    /* Reduce action button sizes */
    .action-btn {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .action-btn svg {
        width: 20px;
        height: 20px;
    }

    /* Adjust page headers */
    .page-header {
        padding: 12px;
        gap: 10px;
    }

    .page-header h1 {
        font-size: 1.2rem;
    }

    .back-button {
        padding: 6px 10px;
        font-size: 1rem;
    }

    .edit-input {
        padding: 10px;
        font-size: 0.9rem;
    }

    .edit-save-btn {
        min-width: 60px;
        padding: 0 12px;
        font-size: 0.9rem;
    }
}

/* Very small screens */
@media (max-width: 320px) {
    .scan-input {
        padding: 8px;
        font-size: 0.85rem;
    }

    .scan-button {
        padding: 8px 12px;
        font-size: 0.85rem;
        min-width: 50px;
    }

    .edit-row {
        flex-wrap: wrap;
    }

    .edit-input {
        width: 100%;
        padding: 8px;
        font-size: 0.85rem;
    }

    .edit-save-btn {
        width: 100%;
        min-width: unset;
        padding: 10px;
        font-size: 0.85rem;
    }
}

/* ============================================
   Help System
   ============================================ */

/* Floating Help Button */
.help-floating-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #1939a3;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(25, 57, 163, 0.4);
    z-index: 900;
    transition: transform 0.2s, box-shadow 0.2s;
}

.help-floating-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(25, 57, 163, 0.5);
}

.help-floating-button:active {
    transform: scale(0.95);
}

.help-floating-button svg {
    stroke: white;
}

/* Help Modal Enhancements */
.help-modal {
    max-width: 500px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 90%;
}

.help-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1939a3;
    color: white;
    padding: 16px 20px;
}

.help-modal-header h3 {
    margin: 0;
    color: white;
}

.help-modal-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.help-modal-close:hover {
    opacity: 0.8;
}

.help-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.help-description {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 16px;
    line-height: 1.5;
}

.help-screenshot {
    margin: 16px 0;
    text-align: center;
}

.help-screenshot img {
    max-width: 100%;
    max-height: 200px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.help-section {
    margin-top: 20px;
}

.help-section h4 {
    margin: 0 0 12px 0;
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 600;
}

.help-steps {
    margin: 0;
    padding-left: 24px;
}

.help-steps li {
    margin-bottom: 8px;
    line-height: 1.4;
}

.help-tips {
    margin: 0;
    padding-left: 20px;
    list-style-type: disc;
}

.help-tips li {
    margin-bottom: 6px;
    color: var(--text-light);
    line-height: 1.4;
}

.help-modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 16px 20px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    pointer-events: auto;
}

.help-modal-footer .btn {
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
    cursor: pointer;
}

/* Help Page */
.help-page {
    min-height: 100vh;
    background: var(--bg-color);
    padding-bottom: 40px;
}

.help-page-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #1939a3;
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
}

.help-page-header h1 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.help-page-header .back-button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-page-header .back-button:hover {
    opacity: 0.8;
}

/* Table of Contents */
.help-toc {
    padding: 20px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
}

.help-toc h2 {
    margin: 0 0 16px 0;
    font-size: 1.2rem;
    color: var(--text-color);
}

.toc-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.toc-link {
    display: inline-block;
    padding: 8px 16px;
    background: var(--bg-color);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.2s;
}

.toc-link:hover {
    background: #e8f4fd;
}

/* Help Content Sections */
.help-content {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 16px;
}

.help-section-page {
    padding: 24px 0;
    border-bottom: 1px solid var(--border-color);
}

.help-section-page:last-child {
    border-bottom: none;
}

.help-section-page h2 {
    margin: 0 0 12px 0;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.help-section-page .help-description {
    font-size: 1.05rem;
    margin-bottom: 20px;
}

.help-section-page .help-screenshot {
    margin: 20px 0;
}

.help-section-page .help-screenshot img {
    max-height: 300px;
}

.help-subsection {
    margin-top: 20px;
    padding: 16px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.help-subsection h3 {
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 600;
}

.back-to-top {
    display: inline-block;
    margin-top: 16px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.back-to-top:hover {
    text-decoration: underline;
}

/* Help page responsive */
@media (max-width: 480px) {
    .help-floating-button {
        bottom: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
    }

    .help-floating-button svg {
        width: 24px;
        height: 24px;
    }

    .help-modal {
        max-width: 95%;
        max-height: 90vh;
    }

    .toc-link {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
}
