/* ScanLook - Inventory Management System CSS */
/* Desktop-first design - mobile/scanner overrides in separate files */
/* Files: style.css (base), mobile.css (phones), scanner.css (MC9300) */

@import url('https://fonts.googleapis.com/css2?family=Work+Sans:wght@400;600;700;800&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
    /* Color System - High Contrast for Warehouse */
    --color-bg: #0a0e14;
    --color-surface: #151a23;
    --color-surface-elevated: #1d242f;
    --color-border: #2d3748;
    
    --color-primary: #00d4ff;
    --color-primary-dark: #00a3cc;
    --color-primary-glow: rgba(0, 212, 255, 0.15);
    
    --color-success: #00ff88;
    --color-success-dark: #00cc6a;
    --color-warning: #ffaa00;
    --color-danger: #ff3366;
    --color-info: #6b8cff;
    --color-duplicate: #00a3ff;
    --color-orange: #ff8c00;
    --color-purple: #b366ff;
    
    --color-text: #e8edf4;
    --color-text-muted: #8b95a6;
    --color-text-dim: #5a6376;
    
    /* Typography */
    --font-sans: 'Work Sans', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 24px var(--color-primary-glow);
    
    /* Transitions */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== RESET & BASE ==================== */

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
}

/* ==================== NAVBAR ==================== */

.navbar {
    background: var(--color-surface);
    border-bottom: 2px solid var(--color-border);
    padding: var(--space-md) var(--space-lg);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    text-decoration: none;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.logo-scan {
    color: var(--color-primary);
    text-shadow: 0 0 20px var(--color-primary-glow);
}

.logo-look {
    color: var(--color-text);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.user-badge {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.role-pill {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    background: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: var(--space-xs);
}

.btn-logout {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn-logout:hover {
    border-color: var(--color-danger);
    color: var(--color-danger);
}

/* Settings Dropdown */
.settings-dropdown {
    position: relative;
    display: inline-block;
}

.btn-settings {
    padding: 0.5rem;
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    border-radius: var(--radius-sm);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.settings-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: var(--space-xs);
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
}

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

.settings-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    color: var(--color-text);
    text-decoration: none;
    transition: var(--transition);
    border-bottom: 1px solid var(--color-border);
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item:hover {
    background: var(--color-surface-elevated);
    color: var(--color-primary);
}

.settings-icon {
    font-size: 1.25rem;
}

/* ==================== FLASH MESSAGES ==================== */

.flash-container {
    position: fixed;
    top: 80px;
    right: var(--space-lg);
    z-index: 1000;
    max-width: 400px;
}

.flash {
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-sm);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.flash-icon {
    font-size: 1.5rem;
}

.flash-success {
    background: rgba(0, 255, 136, 0.15);
    border: 2px solid var(--color-success);
    color: var(--color-success);
}

.flash-danger {
    background: rgba(255, 51, 102, 0.15);
    border: 2px solid var(--color-danger);
    color: var(--color-danger);
}

.flash-warning {
    background: rgba(255, 170, 0, 0.15);
    border: 2px solid var(--color-warning);
    color: var(--color-warning);
}

.flash-info {
    background: rgba(107, 140, 255, 0.15);
    border: 2px solid var(--color-info);
    color: var(--color-info);
}

/* ==================== MAIN CONTENT ==================== */

.main-content {
    padding: var(--space-xl) var(--space-lg);
    max-width: 1400px;
    margin: 0 auto;
}

/* ==================== BUTTONS ==================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    justify-content: center;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-bg);
    box-shadow: 0 0 20px var(--color-primary-glow);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 24px var(--color-primary-glow);
}

.btn-secondary {
    background: var(--color-surface-elevated);
    color: var(--color-text);
    border: 2px solid var(--color-border);
}

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

.btn-success {
    background: var(--color-success);
    color: var(--color-bg);
}

.btn-success:hover {
    background: var(--color-success-dark);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 1.25rem 2rem;
    font-size: 1.25rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-icon {
    font-size: 1.25rem;
    font-weight: 400;
}

/* ==================== LOGIN PAGE ==================== */

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--space-lg);
}

.login-card {
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    width: 100%;
    max-width: 450px;
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.login-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: var(--space-sm);
    letter-spacing: -0.03em;
}

.login-subtitle {
    color: var(--color-text-muted);
    font-size: 1rem;
}

.login-form {
    margin-bottom: var(--space-xl);
}

.login-footer {
    text-align: center;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
}

.default-accounts {
    font-size: 0.875rem;
    color: var(--color-text-dim);
    line-height: 1.8;
}

/* ==================== FORMS ==================== */

.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--color-text);
    font-size: 0.95rem;
}

.form-input,
.form-select {
    width: 100%;
    padding: 1rem;
    background: var(--color-surface-elevated);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-glow);
}

.form-help {
    display: block;
    margin-top: var(--space-xs);
    font-size: 0.875rem;
    color: var(--color-text-dim);
}

.form-actions {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

.form-actions .btn {
    flex: 1;
}

/* ==================== DASHBOARD ==================== */

.dashboard-container {
    max-width: 1200px;
}

/* Mode Selector */
.mode-selector {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    margin-bottom: var(--space-xl);
    padding: var(--space-md);
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 2px solid var(--color-border);
}

.mode-btn {
    flex: 1;
    max-width: 250px;
    padding: var(--space-lg);
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.mode-btn:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

.mode-btn-active {
    background: linear-gradient(135deg, var(--color-primary), var(--color-duplicate));
    border-color: var(--color-primary);
    color: var(--color-text);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.mode-btn-active:hover {
    transform: none;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.sessions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--space-lg);
}

.session-card {
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: var(--transition);
}

.session-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.session-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: var(--space-lg);
}

.session-name {
    font-size: 1.25rem;
    font-weight: 700;
    flex: 1;
}

.session-type-badge {
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.session-type-cycle_count {
    background: rgba(107, 140, 255, 0.2);
    color: var(--color-info);
    border: 1px solid var(--color-info);
}

.session-type-full_physical {
    background: rgba(255, 170, 0, 0.2);
    color: var(--color-warning);
    border: 1px solid var(--color-warning);
}

.session-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-primary);
    font-family: var(--font-mono);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

.session-meta {
    padding: var(--space-md);
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-lg);
}

.meta-item {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0;
    font-size: 0.875rem;
}

.meta-label {
    color: var(--color-text-muted);
}

.meta-value {
    color: var(--color-text);
    font-weight: 600;
    font-family: var(--font-mono);
}

.session-actions {
    margin-top: var(--space-lg);
}

/* ==================== EMPTY STATE ==================== */

.empty-state {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
    background: var(--color-surface);
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-lg);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: var(--space-lg);
    opacity: 0.5;
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.empty-text {
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
}

/* ==================== SESSION LIST (STAFF) ==================== */

.sessions-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.session-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--color-text);
    transition: var(--transition);
}

.session-list-item:hover {
    border-color: var(--color-primary);
    transform: translateX(8px);
}

.session-list-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.session-list-type {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.arrow-icon {
    font-size: 2rem;
    color: var(--color-primary);
}

/* Session List - Archive/Delete Actions */

.new-session-section {
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.process-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.section-card {
    margin-top: var(--space-xl);
}

.session-list-item-container {
    display: flex;
    align-items: stretch;
    gap: 0; /* Remove gap */
    margin-bottom: var(--space-sm);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    overflow: hidden;
}

.session-list-item {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent; /* Remove duplicate background */
    border: none; /* Remove border since container has it */
    border-radius: 0;
    padding: var(--space-lg);
    text-decoration: none;
    transition: var(--transition);
}

.session-list-item:hover {
    border-color: var(--color-primary);
    transform: translateX(4px);
}

.session-list-info {
    flex: 1;
}

.session-list-action {
    display: flex;
    align-items: center;
}

.session-list-meta {
    display: flex;
    gap: var(--space-sm);
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.checkbox-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.875rem;
    color: var(--color-text-muted);
    cursor: pointer;
}

.checkbox-toggle input[type="checkbox"] {
    cursor: pointer;
}

.btn-session-action {
    background: transparent;
    border: none;
    border-left: 2px solid var(--color-border);
    border-radius: 0;
    padding: var(--space-xl);
    cursor: pointer;
    font-size: 2rem;
    transition: var(--transition);
    min-width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-session-action.btn-archive:hover {
    border-color: var(--color-warning);
    background: rgba(255, 170, 0, 0.1);
}

.btn-session-action.btn-delete:hover {
    border-color: var(--color-danger);
    background: rgba(255, 51, 102, 0.1);
}

.btn-session-action.btn-unarchive:hover {
    border-color: var(--color-primary);
    background: rgba(0, 212, 255, 0.1);
}

.btn-session-action.btn-restore:hover {
    border-color: var(--color-success);
    background: rgba(0, 255, 136, 0.1);
}

.session-status-archived {
    opacity: 1;
}

.session-status-archived .session-list-item-container {
    border-color: var(--color-warning);
    background: rgba(255, 170, 0, 0.08);
}

.session-status-deleted {
    opacity: 1;
}

.session-status-deleted .session-list-item-container {
    border-color: var(--color-danger);
    background: rgba(255, 51, 102, 0.08);
}

/* ==================== FORM CONTAINER ==================== */

.form-container {
    max-width: 600px;
    margin: 0 auto;
}

.form-card {
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
}

.form-header {
    margin-bottom: var(--space-xl);
}

.form-title {
    font-size: 2rem;
    font-weight: 800;
}

.standard-form .form-group:last-of-type {
    margin-bottom: var(--space-xl);
}

/* ==================== SESSION DETAIL ==================== */

.session-detail-container {
    max-width: 1200px;
}

.session-detail-header {
    margin-bottom: var(--space-xl);
}

.breadcrumb {
    display: inline-block;
    color: var(--color-text-muted);
    text-decoration: none;
    margin-bottom: var(--space-sm);
    font-size: 0.9rem;
    transition: var(--transition);
}

.breadcrumb:hover {
    color: var(--color-primary);
}

.section-card {
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--color-border);
}

.baseline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.baseline-item {
    padding: var(--space-lg);
    background: var(--color-bg);
    border-radius: var(--radius-md);
}

.baseline-label {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
}

.baseline-status {
    margin-bottom: var(--space-md);
}

.status-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 700;
}

.status-success {
    background: rgba(0, 255, 136, 0.2);
    color: var(--color-success);
    border: 1px solid var(--color-success);
}

.status-warning {
    background: rgba(255, 170, 0, 0.2);
    color: var(--color-warning);
    border: 1px solid var(--color-warning);
}

.status-neutral {
    background: var(--color-surface-elevated);
    color: var(--color-text-dim);
    border: 1px solid var(--color-border);
}

.baseline-time {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-dim);
    margin-top: 0.25rem;
    font-family: var(--font-mono);
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.file-input {
    padding: var(--space-sm);
    background: var(--color-surface-elevated);
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-lg);
}

.stat-card {
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    text-align: center;
    border: 2px solid;
    cursor: pointer;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.stat-card .stat-number {
    font-size: 3rem;
    font-weight: 800;
    font-family: var(--font-mono);
}

.stat-card .stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: var(--space-xs);
}

.stat-match {
    background: rgba(0, 255, 136, 0.1);
    border-color: var(--color-success);
    color: var(--color-success);
}

.stat-duplicate {
    background: rgba(0, 163, 255, 0.1);
    border-color: var(--color-duplicate);
    color: var(--color-duplicate);
}

.stat-weight-disc {
    background: rgba(255, 152, 0, 0.1);
    border-color: #ff9800;
    color: #ff9800;
}

.stat-wrong {
    background: rgba(255, 170, 0, 0.1);
    border-color: var(--color-warning);
    color: var(--color-warning);
}

.stat-ghost {
    background: rgba(179, 102, 255, 0.1);
    border-color: var(--color-purple);
    color: var(--color-purple);
}

.stat-missing {
    background: rgba(255, 51, 102, 0.1);
    border-color: var(--color-danger);
    color: var(--color-danger);
}

.counter-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.counter-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--color-bg);
    border-radius: var(--radius-md);
}

.counter-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 800;
}

.counter-info {
    flex: 1;
}

.counter-name {
    font-weight: 700;
}

.counter-location {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.counter-time {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--color-text-dim);
}

.location-table {
    overflow-x: auto;
}

.location-table table {
    width: 100%;
    border-collapse: collapse;
}

.location-table th,
.location-table td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.location-table th {
    background: var(--color-bg);
    color: var(--color-text-muted);
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.location-table tr:hover {
    background: var(--color-bg);
}

.status-completed {
    background: rgba(0, 255, 136, 0.2);
    color: var(--color-success);
}

.status-in_progress {
    background: rgba(255, 170, 0, 0.2);
    color: var(--color-warning);
}

.status-not_started {
    background: var(--color-surface-elevated);
    color: var(--color-text-dim);
}

/* ==================== COUNTING INTERFACE ==================== */

.count-container {
    max-width: 600px;
    margin: 0 auto;
}

.count-header {
    margin-bottom: var(--space-xl);
}

.scan-card {
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    text-align: center;
}

.scan-card-active {
    border-color: var(--color-primary);
    box-shadow: 0 0 40px var(--color-primary-glow);
}

.scan-header {
    margin-bottom: var(--space-xl);
}

.scan-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: var(--space-sm);
}

.scan-subtitle {
    color: var(--color-text-muted);
    font-size: 1rem;
}

.scan-input-group {
    display: flex;
    gap: var(--space-md);
}

.scan-input {
    flex: 1;
    padding: 1.5rem;
    background: var(--color-bg);
    border: 3px solid var(--color-primary);
    border-radius: var(--radius-lg);
    color: var(--color-text);
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    transition: var(--transition);
}

.scan-input:focus {
    outline: none;
    box-shadow: 0 0 0 4px var(--color-primary-glow);
}

.scan-input::placeholder {
    color: var(--color-text-dim);
    font-weight: 500;
}

.btn-scan {
    padding: 1.5rem 2rem;
    background: var(--color-primary);
    border: none;
    border-radius: var(--radius-lg);
    color: var(--color-bg);
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-scan:hover {
    background: var(--color-primary-dark);
    transform: scale(1.05);
}

.scan-help {
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
}

.help-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-sm);
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.help-icon {
    font-size: 1.5rem;
}

/* ==================== SCAN SESSION ==================== */
.header-values { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin: var(--space-sm) 0; align-items: center; flex-direction: row; }
.header-pill { background: var(--color-surface-elevated); padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-sm); font-size: 0.8rem; color: var(--color-text-muted); }
.header-pill strong { color: var(--color-text); }
.btn-edit-header { background: transparent; border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: var(--space-xs) var(--space-sm); color: var(--color-text-muted); cursor: pointer; font-size: 0.75rem; text-decoration: none; transition: var(--transition); display: inline-flex; align-items: center; }
.btn-edit-header:hover { border-color: var(--color-primary); color: var(--color-primary); }
.cs-scan-row { display: grid; grid-template-columns: repeat(var(--field-count), 1fr) auto; gap: var(--space-sm); padding: var(--space-md); background: var(--color-surface); border: 2px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: var(--space-sm); cursor: pointer; transition: var(--transition); }
.cs-scan-row:hover { border-color: var(--color-primary); }
.cs-scan-row-cell { font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-scan-row-dup_same_session { border-left: 4px solid var(--color-duplicate) !important; background: rgba(0, 163, 255, 0.1) !important; }
.cs-scan-row-dup_other_session { border-left: 4px solid var(--color-warning) !important; background: rgba(255, 170, 0, 0.1) !important; }
.cs-scan-row-normal { border-left: 4px solid var(--color-success); }
.modal-duplicate { text-align: center; padding: var(--space-xl); }
.duplicate-lot-number { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700; color: var(--color-primary); margin-bottom: var(--space-md); }
.duplicate-title { font-size: 1.25rem; margin-bottom: var(--space-sm); }
.duplicate-message { color: var(--color-text-muted); margin-bottom: var(--space-lg); }

/* ==================== LOCATION COUNTING ==================== */

.count-location-container {
    max-width: 800px;
    margin: 0 auto;
}

.location-header {
    background: linear-gradient(135deg, var(--color-surface), var(--color-surface-elevated));
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    margin-bottom: var(--space-xl);
    text-align: center;
}

.location-label {
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xs);
}

.location-name {
    font-size: 3rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--color-primary);
    margin-bottom: var(--space-md);
    text-shadow: 0 0 30px var(--color-primary-glow);
}

.location-stats {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
}

.stat-pill {
    padding: 0.5rem 1rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-family: var(--font-mono);
    font-weight: 600;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--color-surface);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    width: 90%;
    max-width: 500px;
    box-shadow: 0 0 60px var(--color-primary-glow);
}

/* Duplicate Modal Styling */
.modal-duplicate {
    border: 3px solid var(--color-duplicate);
    box-shadow: 0 0 60px rgba(0, 163, 255, 0.3);
    text-align: center;
}

.duplicate-lot-number {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--color-duplicate);
    margin-bottom: var(--space-lg);
    padding: var(--space-lg);
    background: rgba(0, 163, 255, 0.1);
    border-radius: var(--radius-md);
    text-shadow: 0 0 20px rgba(0, 163, 255, 0.5);
}

.duplicate-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.duplicate-message {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-2xl);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: var(--space-lg);
}

.modal-lot-info {
    text-align: center;
    margin-bottom: var(--space-xl);
    padding: var(--space-lg);
    background: var(--color-bg);
    border-radius: var(--radius-md);
}

.modal-lot-number {
    font-size: 1.75rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--color-primary);
    margin-bottom: var(--space-xs);
}

.modal-item-desc {
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

.weight-input {
    width: 100%;
    padding: 1.5rem;
    background: var(--color-bg);
    border: 3px solid var(--color-primary);
    border-radius: var(--radius-lg);
    color: var(--color-text);
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--space-lg);
}

.weight-input:focus {
    outline: none;
    box-shadow: 0 0 0 4px var(--color-primary-glow);
}

.modal-actions {
    display: flex;
    gap: var(--space-md);
}

.modal-actions .btn {
    flex: 1;
}

/* Scans Section */
.scans-section {
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.scans-header {
    margin-bottom: var(--space-lg);
}

.scans-title {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Scans Grid - Compact View */
.scans-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    max-height: 500px;
    overflow-y: auto;
}

.scan-header-row {
    display: grid;
    grid-template-columns: repeat(var(--field-count), 1fr) auto;
    gap: var(--space-md);
    padding: var(--space-xs) var(--space-md);
    max-height: none;
    overflow-y: visible;
}

.scan-col-header {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
}
.scan-row {
    display: grid;
    grid-template-columns: repeat(var(--field-count), 1fr) 1fr;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    border-left: 4px solid;
    cursor: pointer;
    transition: var(--transition);
    align-items: center;
}

.scan-row:hover {
    background: var(--color-surface-elevated);
    transform: translateX(4px);
}

.scan-row-lot {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--color-text);
}

.scan-row-item {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.scan-row-weight {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--color-primary);
}

.scan-row-status {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.875rem;
    font-weight: 600;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot-green {
    background: var(--color-success);
    box-shadow: 0 0 8px var(--color-success);
}

.status-dot-blue {
    background: var(--color-duplicate);
    box-shadow: 0 0 8px var(--color-duplicate);
}

.status-dot-orange {
    background: var(--color-orange);
    box-shadow: 0 0 8px var(--color-orange);
}

.status-dot-yellow {
    background: var(--color-warning);
    box-shadow: 0 0 8px var(--color-warning);
}

.status-dot-purple {
    background: var(--color-purple);
    box-shadow: 0 0 8px var(--color-purple);
}

/* Row color coding */
.scan-row-match {
    border-color: var(--color-success);
    background: rgba(0, 255, 136, 0.05);
}

.scan-row-weight_discrepancy {
    border-color: #ff9800;
    background: rgba(255, 152, 0, 0.05);
}

.scan-row-wrong_location {
    border-color: var(--color-warning);
    background: rgba(255, 170, 0, 0.05);
}

.scan-row-ghost_lot {
    border-color: var(--color-purple);
    background: rgba(179, 102, 255, 0.05);
}

.scan-row-duplicate-01,
.scan-row-duplicate-04 {
    border-color: var(--color-duplicate);
    background: rgba(0, 163, 255, 0.05);
}

.scan-row-duplicate-03 {
    border-color: var(--color-orange);
    background: rgba(255, 140, 0, 0.05);
}

/* Scan Detail Modal */
.modal-large {
    max-width: 700px;
}

.modal-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--color-border);
}

.modal-header-actions {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.btn-close-modal {
    background: transparent;
    border: 2px solid var(--color-border);
    color: var(--color-text-muted);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close-modal:hover {
    border-color: var(--color-danger);
    color: var(--color-danger);
    transform: rotate(90deg);
}

.scan-detail-content {
    max-height: 60vh;
    overflow-y: auto;
}

.detail-section {
    margin-bottom: var(--space-xl);
    padding: var(--space-lg);
    background: var(--color-bg);
    border-radius: var(--radius-md);
}

.detail-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
    color: var(--color-primary);
}

.detail-row {
    display: flex;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-border);
}

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

.detail-label {
    flex: 0 0 180px;
    font-weight: 600;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.detail-value {
    flex: 1;
    color: var(--color-text);
}

.detail-input {
    flex: 1;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: var(--space-xs) var(--space-sm);
    color: var(--color-text);
    font-size: 1rem;
    font-family: var(--font-mono);
    transition: var(--transition);
}

.detail-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.detail-lot {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
}

.detail-info {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.detail-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.form-textarea {
    width: 100%;
    padding: var(--space-md);
    background: var(--color-surface-elevated);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 1rem;
    resize: vertical;
    transition: var(--transition);
}

.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-glow);
}

.detail-actions {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 2px solid var(--color-border);
}

.detail-actions .btn {
    flex: 1;
}

.btn-danger {
    background: var(--color-danger);
    color: var(--color-bg);
}

.btn-danger:hover {
    background: #cc2952;
    transform: translateY(-2px);
}

/* User Management */
.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.filter-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    user-select: none;
}

.filter-toggle input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.filter-label {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.users-table-container {
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow-x: auto;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
}

.users-table th,
.users-table td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.users-table th {
    background: var(--color-bg);
    color: var(--color-text-muted);
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.users-table tr:hover {
    background: var(--color-surface-elevated);
}

.users-table tr.inactive-user {
    opacity: 0.5;
}

.role-admin {
    background: rgba(107, 140, 255, 0.2);
    color: var(--color-info);
    border: 1px solid var(--color-info);
}

.role-staff {
    background: var(--color-surface-elevated);
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
}

.role-owner {
    background: rgba(0, 212, 255, 0.2);
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}

.action-buttons {
    display: flex;
    gap: var(--space-xs);
}

.btn-action {
    padding: 0.5rem;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-action:hover {
    transform: scale(1.1);
}

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

.btn-delete:hover {
    border-color: var(--color-danger);
    background: rgba(255, 51, 102, 0.1);
}

.user-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.finish-section {
    position: sticky;
    bottom: var(--space-lg);
}

.action-buttons-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* Extra Large Modal for Status Details */
.modal-xl {
    max-width: 95%;
    max-height: 90vh;
}

.status-detail-content {
    max-height: 70vh;
    overflow: hidden;
    position: relative;
}

.detail-table-container {
    width: 100%;
    max-height: 65vh;
    overflow: auto;
    scroll-behavior: smooth;
    position: relative;
}

.detail-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
}

.detail-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 4px 0 0 var(--color-primary);
}

.detail-table th {
    color: var(--color-text-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: var(--space-md);
    text-align: left;
    border: none;
    background: var(--color-bg);
}

.detail-table thead tr:first-child th {
    border-bottom: 1px solid var(--color-border);
}

.detail-table thead tr:nth-child(2) th {
    border-bottom: none;
}

/* Apply background colors to both header rows */
.detail-table th.col-counted {
    background: var(--color-bg);
}

.detail-table th.col-expected {
    background: #3d2d00;
    color: var(--color-warning);
}

.detail-table th.col-current {
    background: #00293d;
    color: var(--color-duplicate);
}

/* Section headers stay default/neutral */
.detail-table th.section-counted,
.detail-table th.section-expected,
.detail-table th.section-current {
    background: var(--color-bg);
    color: var(--color-text-muted);
}

.detail-table td {
    padding: var(--space-md);
    border: none;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
}

.detail-table tr:hover {
    background: var(--color-surface-elevated);
}

.detail-table strong {
    font-family: var(--font-mono);
    color: var(--color-primary);
}

.loading-spinner {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--color-text-muted);
    font-size: 1.25rem;
}

/* Color-coded table sections */
.section-header {
    font-size: 0.875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: var(--space-sm) var(--space-md);
    text-align: center !important;
}

.section-counted {
    background: var(--color-bg);
    color: var(--color-text);
}

.section-expected {
    background: rgba(255, 170, 0, 0.3);
    color: var(--color-warning);
}

.section-current {
    background: rgba(0, 163, 255, 0.3);
    color: var(--color-duplicate);
}

.col-counted {
    background: rgba(255, 255, 255, 0.02);
}

.col-expected {
    background: rgba(255, 170, 0, 0.15);
}

.col-current {
    background: rgba(0, 163, 255, 0.15);
}

/* Make header cells opaque so data doesn't show through when scrolling */
.detail-table th.col-expected {
    background: #3d2d00;
    color: var(--color-warning);
    border-bottom: 4px solid var(--color-primary);
}

.detail-table th.col-current {
    background: #00293d;
    color: var(--color-duplicate);
    border-bottom: 4px solid var(--color-primary);
}

.detail-table th.col-counted {
    border-bottom: 4px solid var(--color-primary);
}

.detail-table tr:hover .col-counted,
.detail-table tr:hover .col-expected,
.detail-table tr:hover .col-current {
    filter: brightness(1.2);
}

/* Bin Cards */
.bins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

.bin-card {
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: var(--transition);
}

.bin-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.bin-card.bin-active {
    border-color: var(--color-primary);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.bin-card.bin-completed {
    border-color: var(--color-success);
}

.bin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border);
}

.bin-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary);
    font-family: var(--font-mono);
}

.bin-status {
    font-size: 0.875rem;
    font-weight: 600;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
}

.status-progress {
    background: rgba(0, 212, 255, 0.2);
    color: var(--color-primary);
}

.bin-stats {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.bin-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bin-stat .stat-label {
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.bin-stat .stat-value {
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--color-text);
}

.bin-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.bin-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.bin-note {
    text-align: center;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: var(--space-xs);
    margin-bottom: 0;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-xl);
}

.page-subtitle {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    margin-top: var(--space-xs);
}

/* Clickable location rows */
.location-row-clickable {
    cursor: pointer;
    transition: var(--transition);
}

.location-row-clickable:hover {
    background: var(--color-surface-elevated);
    transform: translateX(4px);
}

/* Confirmation modal styles */
.modal-small {
    max-width: 500px;
}

.confirm-modal-content {
    padding: var(--space-xl);
    text-align: center;
}

.confirm-icon {
    font-size: 4rem;
    margin-bottom: var(--space-lg);
}

.confirm-text {
    font-size: 1.125rem;
    color: var(--color-text);
    margin-bottom: var(--space-md);
}

.confirm-subtext {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-top: 1px solid var(--color-border);
}

.modal-actions .btn {
    flex: 1;
}

.footer {
    padding: var(--space-xl) var(--space-lg);
    text-align: center;
    border-top: 1px solid var(--color-border);
    margin-top: var(--space-2xl);
    background: var(--color-surface);
}

.footer-content p {
    color: var(--color-text-dim);
    font-size: 0.875rem;
    font-weight: 600;
}

.footer-subtext {
    font-size: 0.75rem !important;
    margin-top: var(--space-xs);
    letter-spacing: 0.05em;
}

/* ==================== EXPECTED ITEMS SECTION (Cycle Count) ==================== */

.expected-section {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 2px dashed var(--color-border);
}

.expected-title {
    opacity: 0.7;
    color: var(--color-text-muted);
}

/* Expected rows look "pending" or "unscanned" */
.expected-row {
    opacity: 0.7;
    border-left: 4px solid var(--color-border);
    background: var(--color-surface);
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: var(--space-md);
    padding: var(--space-md);
    margin-bottom: var(--space-xs);
    border-radius: var(--radius-sm);
    align-items: center;
}

.expected-row:hover {
    opacity: 1;
    background: var(--color-surface-elevated);
}

.status-dot-gray {
    background: var(--color-text-dim);
    box-shadow: none;
}

/* Hide scroll buttons on desktop */
.scroll-to-top,
.scroll-to-bottom {
    display: none;
}

/* ==================== ARCHIVED SESSIONS ==================== */

.session-archived {
    opacity: 0.7;
    border-color: var(--color-text-dim);
}

.session-archived:hover {
    opacity: 0.85;
}

.archived-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: var(--color-text-dim);
    color: var(--color-bg);
    border-radius: var(--radius-sm);
    font-size: 0.65rem;
    font-weight: 700;
    margin-left: var(--space-sm);
    vertical-align: middle;
}
/* Session Detail Header Actions */
.session-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.session-actions-header {
    flex-shrink: 0;
}

/* ==================== MODULE GRID (Home Page) ==================== */

.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-xl);
    margin-top: var(--space-xl);
}

.module-card {
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl) var(--space-xl);
    text-decoration: none;
    text-align: center;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

.module-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow), var(--shadow-lg);
}

.module-icon {
    width: 80px;
    height: 80px;
    background: var(--color-primary-glow);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--color-primary);
    transition: var(--transition);
}

.module-card:hover .module-icon {
    background: var(--color-primary);
    color: var(--color-bg);
    box-shadow: 0 0 30px var(--color-primary-glow);
}

.module-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
}

.module-desc {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin: 0;
    line-height: 1.5;
}
/* ==================== MODAL SCROLL FIX ==================== */

.modal {
    overflow-y: auto;
    padding: var(--space-xl) 0;
}

.modal-content {
    max-height: none;
    margin: auto;
}

/* ==================== ADMIN MODULES SECTION ==================== */

.modules-section {
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-xl);
    border-bottom: 2px solid var(--color-border);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-lg);
}

.module-card-link {
    text-decoration: none;
}

.modules-grid .module-card {
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
}

.modules-grid .module-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    border-radius: var(--radius-md);
}

.modules-grid .module-name {
    font-size: 1.1rem;
}

.modules-grid .module-desc {
    font-size: 0.8rem;
}

.module-card-active {
    border-color: var(--color-primary);
    background: var(--color-primary-glow);
}

.module-card-active .module-icon {
    background: var(--color-primary);
    color: var(--color-bg);
}

/* ==================== ICON BUTTONS ==================== */
.btn-icon-only {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px 8px;
    transition: var(--transition);
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-only:hover {
    color: var(--color-danger);
    transform: scale(1.1);
}