/* ==========================================================================
   Gift Items Production Manager - Modern Dark Glassmorphic Theme (RTL First)
   ========================================================================== */

:root {
    color-scheme: dark;
    --bg-dark: #0b0f19;
    --bg-card: rgba(22, 27, 46, 0.85);
    --bg-card-hover: rgba(30, 38, 64, 0.95);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-glow: rgba(0, 240, 255, 0.3);
    
    --text-main: #f0f6fc;
    --text-muted: #8b949e;
    --text-dim: #6e7681;

    /* Theme Machine & Process Colors */
    --uv-cyan: #00d2ff;
    --uv-cyan-glow: rgba(0, 210, 255, 0.25);
    
    --laser-amber: #ff9d00;
    --laser-amber-glow: rgba(255, 157, 0, 0.25);
    
    --cutter-magenta: #d946ef;
    --cutter-magenta-glow: rgba(217, 70, 239, 0.25);

    --success-green: #10b981;
    --success-green-glow: rgba(16, 185, 129, 0.25);

    --danger-red: #ef4444;
    --danger-red-glow: rgba(239, 68, 68, 0.25);

    --primary-blue: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.35);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-main: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    15%       { transform: translateX(-8px); }
    30%       { transform: translateX(8px); }
    45%       { transform: translateX(-6px); }
    60%       { transform: translateX(6px); }
    75%       { transform: translateX(-3px); }
    90%       { transform: translateX(3px); }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Tajawal', 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(0, 210, 255, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(217, 70, 239, 0.08) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(255, 157, 0, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    direction: rtl;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ================= Dedicated Top Date & Time Ticker Bar ================= */
.top-datetime-strip {
    background: linear-gradient(90deg, #060913 0%, #0d1527 50%, #060913 100%);
    border-bottom: 1px solid rgba(0, 210, 255, 0.2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
    position: sticky;
    top: 0;
    z-index: 1005;
    width: 100%;
    padding: 6px 24px;
}

.top-datetime-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1800px;
    margin: 0 auto;
    font-size: 0.82rem;
    color: var(--text-main);
    white-space: nowrap;
    gap: 16px;
}

.top-datetime-main {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(0, 210, 255, 0.25);
    padding: 3px 20px;
    border-radius: 30px;
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.1);
}

.top-date-wrap {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 600;
    color: #e2e8f0;
}

.top-time-wrap {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 700;
    color: var(--uv-cyan);
}

.digital-time {
    font-family: 'Cairo', 'Courier New', monospace;
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
    font-weight: 800;
}

.top-divider {
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.85rem;
}

.top-datetime-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.live-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: livePulseDot 2s infinite ease-in-out;
}

@keyframes livePulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

/* ================= Header ================= */
.app-header {
    background: rgba(13, 17, 28, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 14px 28px;
    position: sticky;
    top: 35px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    box-shadow: 0 0 20px var(--uv-cyan-glow);
}

.brand-logo-box {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.96);
    border-radius: var(--radius-md);
    padding: 3px 10px;
    height: 48px;
    min-width: 110px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35), 0 0 15px rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.brand-logo-box:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45), 0 0 22px rgba(220, 38, 38, 0.28);
}

.app-brand-logo {
    height: 38px;
    max-width: 125px;
    object-fit: contain;
    display: block;
}

.brand-tagline {
    font-size: 0.82rem;
    font-weight: 700;
    color: #ef4444;
    margin-right: 6px;
    letter-spacing: 0.5px;
}

.brand-text h1 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-text .badge-local {
    font-size: 0.7rem;
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}

.brand-text p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

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

.clock-display {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.clock-display i {
    color: var(--uv-cyan);
}

/* ================= Navigation Tabs ================= */
.main-nav {
    background: rgba(18, 24, 38, 0.6);
    border-bottom: 1px solid var(--border-color);
    padding: 0 28px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.nav-tab {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 14px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-tab:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.03);
}

.nav-tab.active {
    color: var(--uv-cyan);
    border-bottom-color: var(--uv-cyan);
    background: rgba(0, 210, 255, 0.05);
}

.nav-tab .badge {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
}

.nav-tab.active .badge {
    background: var(--uv-cyan);
    color: #0b0f19;
    font-weight: 700;
}

/* ================= Buttons ================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    min-width: max-content;
    flex-shrink: 0;
    max-width: 100%;
    line-height: 1.35;
    box-sizing: border-box;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #00d2ff 0%, #0077ff 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 119, 255, 0.35);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.5);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-sm {
    padding: 5px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
    gap: 6px;
    min-width: max-content;
    flex-shrink: 0;
    white-space: nowrap;
}

.btn-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-green);
    border-color: rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: var(--success-green);
    color: #fff;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-red);
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: var(--danger-red);
    color: #fff;
}

/* System-Wide Container Wrap Fixes: Prevents button text crushing */
.card-actions-strip {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.card-actions-strip .btn {
    min-width: fit-content;
}

.user-row-actions,
.modal-footer,
.header-actions,
.report-filter-group,
.machine-report-controls {
    flex-wrap: wrap;
}

/* Global Button Text Protection: Prevent text clipping & truncation across entire system */
.btn, button {
    overflow: visible;
    text-overflow: clip;
}

.modal-footer .btn {
    white-space: normal;
    text-align: center;
    line-height: 1.35;
    min-height: 36px;
    height: auto;
}

.custom-table td:has(.btn),
.data-table td:has(.btn),
.custom-table td:last-child,
.data-table td:last-child {
    white-space: nowrap;
    min-width: max-content;
}

/* ================= Content Container ================= */
.app-container {
    max-width: 1700px;
    margin: 0 auto;
    padding: 24px;
}

.view-section {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.view-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ================= Stats KPI Bar ================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-main);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
}

.stat-card.card-blue::before { background: var(--uv-cyan); }
.stat-card.card-orange::before { background: var(--laser-amber); }
.stat-card.card-magenta::before { background: var(--cutter-magenta); }
.stat-card.card-green::before { background: var(--success-green); }

.stat-card:hover {
    transform: translateY(-3px);
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.18);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.card-blue .stat-icon { background: rgba(0, 210, 255, 0.12); color: var(--uv-cyan); }
.card-orange .stat-icon { background: rgba(255, 157, 0, 0.12); color: var(--laser-amber); }
.card-magenta .stat-icon { background: rgba(217, 70, 239, 0.12); color: var(--cutter-magenta); }
.card-green .stat-icon { background: rgba(16, 185, 129, 0.12); color: var(--success-green); }

.stat-info .stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
}

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

/* ================= Machine Status Strip ================= */
.section-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.machine-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: var(--transition);
    position: relative;
    box-shadow: var(--shadow-main);
}

.machine-card.running {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.08);
}

.machine-card.idle {
    border-color: rgba(255, 157, 0, 0.3);
}

.machine-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
}

.machine-name-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.machine-avatar {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.machine-card[data-type="uv_print"] .machine-avatar { color: var(--uv-cyan); background: var(--uv-cyan-glow); }
.machine-card[data-type="engraving"] .machine-avatar { color: var(--laser-amber); background: var(--laser-amber-glow); }
.machine-card[data-type="cutting"] .machine-avatar { color: var(--cutter-magenta); background: var(--cutter-magenta-glow); }

.machine-name-box h3,
.machine-title-blue,
.machine-blue-text {
    color: #00b4d8 !important;
    font-weight: 700;
}

.machine-name-box h3 {
    font-size: 1.05rem;
    color: #00b4d8 !important;
    text-shadow: 0 0 10px rgba(0, 180, 216, 0.25);
    transition: var(--transition);
}

.machine-card:hover .machine-name-box h3 {
    color: #38bdf8 !important;
    text-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

.machine-name-box p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.status-pill {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-pill.running {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-green);
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.status-pill.running::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--success-green);
    border-radius: 50%;
    animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.7; }
}

.status-pill.idle {
    background: rgba(255, 157, 0, 0.15);
    color: var(--laser-amber);
    border: 1px solid rgba(255, 157, 0, 0.4);
}

.status-pill.sample {
    background: rgba(14, 165, 233, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.45);
}

.status-pill.maintenance {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.4);
}

.status-pill.out_of_service {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.machine-card.sample {
    border-color: rgba(14, 165, 233, 0.45);
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.1);
}

.machine-card.maintenance {
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.07);
    opacity: 0.88;
}

.machine-card.out_of_service {
    border-color: rgba(239, 68, 68, 0.45);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.09);
    opacity: 0.80;
}

.machine-current-job {
    background: rgba(0, 0, 0, 0.25);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-top: 10px;
    font-size: 0.85rem;
}

.job-label {
    color: var(--text-dim);
    font-size: 0.75rem;
    margin-bottom: 4px;
}

.job-title {
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
}

/* ================= Filter & Controls Toolbar ================= */
.toolbar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

#btnAddInventoryItem {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    white-space: nowrap !important;
    font-weight: 700 !important;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.search-input-box {
    position: relative;
    min-width: 280px;
}

.search-input-box i {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
}

.search-input-box input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 9px 38px 9px 14px;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.search-input-box input:focus {
    border-color: var(--uv-cyan);
    box-shadow: 0 0 15px var(--uv-cyan-glow);
}

.custom-select {
    color-scheme: dark;
    background: #161b2e;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 9px 16px;
    color: var(--text-main);
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
}

.custom-select option {
    background-color: #161b2e !important;
    color: #ffffff !important;
    padding: 10px 14px;
}

/* ================= Production Kanban Board ================= */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(6, minmax(270px, 1fr));
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 20px;
}

.kanban-column {
    background: rgba(18, 23, 38, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

.column-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.col-title {
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.col-count {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.column-cards-container {
    padding: 12px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ================= Order Card ================= */
.order-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    position: relative;
}

.order-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.45);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.order-id-badge {
    font-family: monospace;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--uv-cyan);
    background: rgba(0, 210, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(0, 210, 255, 0.2);
}

.priority-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
}

.priority-urgent {
    background: rgba(239, 68, 68, 0.2);
    color: #ff6b6b;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.priority-high {
    background: rgba(255, 157, 0, 0.2);
    color: #ffb84d;
    border: 1px solid rgba(255, 157, 0, 0.4);
}

.priority-normal {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.client-name {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.product-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
    line-height: 1.4;
}

.operation-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.tag-uv { background: rgba(0, 210, 255, 0.12); color: var(--uv-cyan); border: 1px solid rgba(0, 210, 255, 0.3); }
.tag-laser { background: rgba(255, 157, 0, 0.12); color: var(--laser-amber); border: 1px solid rgba(255, 157, 0, 0.3); }
.tag-cutter { background: rgba(217, 70, 239, 0.12); color: var(--cutter-magenta); border: 1px solid rgba(217, 70, 239, 0.3); }

.card-metrics {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
    margin-bottom: 10px;
}

.card-metrics span strong {
    color: var(--text-main);
}

.card-progress-bar {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
}

.card-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--uv-cyan), var(--primary-blue));
    border-radius: 10px;
}

.card-actions-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

/* ================= Table Styling ================= */
.custom-table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-main);
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
}

.custom-table th {
    background: rgba(255, 255, 255, 0.03);
    padding: 14px 18px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
}

.custom-table td {
    padding: 14px 18px;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.custom-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* ─── Base .data-table (جدول قياسي للتقارير والجداول العامة) ─── */
.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
    font-size: 0.875rem;
}

.data-table th {
    background: rgba(0, 210, 255, 0.07);
    padding: 12px 16px;
    color: var(--uv-cyan);
    font-size: 0.82rem;
    font-weight: 700;
    border-bottom: 2px solid rgba(0, 210, 255, 0.18);
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.data-table td {
    padding: 11px 16px;
    color: var(--text-main);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
    line-height: 1.5;
}

.data-table tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.015);
}

.data-table tbody tr:hover td {
    background: rgba(0, 210, 255, 0.04);
    transition: background 0.15s ease;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tfoot tr td {
    background: rgba(255, 255, 255, 0.04);
    font-weight: 700;
    border-top: 2px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    padding: 12px 16px;
}

/* ================= Global Table Responsive Wrapper ================= */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive::-webkit-scrollbar {
    height: 5px;
}

.table-responsive::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.02);
}

.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(0,210,255,0.3);
    border-radius: 3px;
}

/* ================= Modals ================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-window {
    background: #131828;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 780px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
    animation: modalPop 0.25s ease-out;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

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

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: #fff;
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
}

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

.form-group.col-span-2 {
    grid-column: span 2;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: #ffffff;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

select.form-control,
select {
    color-scheme: dark;
    background-color: #161b2e !important;
    color: #f0f6fc !important;
    cursor: pointer;
}

select.form-control option,
select option,
.custom-select option,
.form-control option {
    background-color: #161b2e !important;
    color: #ffffff !important;
    padding: 12px 14px;
    font-size: 0.92rem;
}

select.form-control option:checked,
select option:checked {
    background-color: #0077ff !important;
    color: #ffffff !important;
}

.form-control:focus,
select.form-control:focus {
    border-color: var(--uv-cyan);
    box-shadow: 0 0 15px var(--uv-cyan-glow);
    background-color: #161b2e;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ================= Job Card Printable Ticket ================= */
.job-card-printable {
    background: #ffffff;
    color: #111827;
    padding: 30px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
}

.job-ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid #111827;
    padding-bottom: 14px;
    margin-bottom: 20px;
}

.ticket-barcode {
    font-family: monospace;
    font-size: 24px;
    letter-spacing: 4px;
    font-weight: 800;
    background: #f3f4f6;
    padding: 6px 14px;
    border: 1px solid #d1d5db;
}

.ticket-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.ticket-table th, .ticket-table td {
    border: 1px solid #d1d5db;
    padding: 10px 12px;
    text-align: right;
}

.ticket-table th {
    background: #f9fafb;
    font-weight: 700;
}

.ticket-signatures {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px dashed #9ca3af;
}

/* Print Styles */
@media print {
    body * {
        visibility: hidden;
    }
    #jobCardPrintArea, #jobCardPrintArea * {
        visibility: visible;
    }
    #jobCardPrintArea {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 20px;
        background: #fff !important;
        color: #000 !important;
    }
    .modal-header, .modal-footer, .app-header, .main-nav {
        display: none !important;
    }
}

/* Responsive tweaks */
@media (max-width: 1024px) {
    .kanban-board {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-group.col-span-2 {
        grid-column: span 1;
    }
}

/* ================= Ambient Animated Background & Floating Glow ================= */
.ambient-glow-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.28;
    mix-blend-mode: screen;
}

.orb-cyan {
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, #00d2ff 0%, rgba(0, 119, 255, 0.1) 70%);
    top: -150px;
    right: -100px;
    animation: floatOrb1 18s ease-in-out infinite alternate;
}

.orb-magenta {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #d946ef 0%, rgba(147, 51, 234, 0.1) 70%);
    bottom: -150px;
    left: -100px;
    animation: floatOrb2 22s ease-in-out infinite alternate;
}

.orb-amber {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #ff9d00 0%, rgba(245, 158, 11, 0.08) 70%);
    top: 40%;
    left: 35%;
    animation: floatOrb3 25s ease-in-out infinite alternate;
}

@keyframes floatOrb1 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-120px, 100px) scale(1.15); }
    100% { transform: translate(60px, 140px) scale(0.9); }
}

@keyframes floatOrb2 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(140px, -90px) scale(1.2); }
    100% { transform: translate(-60px, -120px) scale(0.95); }
}

@keyframes floatOrb3 {
    0% { transform: translate(0, 0) scale(0.9); opacity: 0.18; }
    50% { transform: translate(-80px, -60px) scale(1.1); opacity: 0.35; }
    100% { transform: translate(70px, 80px) scale(1); opacity: 0.2; }
}

/* ================= Animated User Header Profile Widget ================= */
.user-profile-widget {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: 40px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    backdrop-filter: blur(12px);
}

.user-profile-widget:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.user-avatar-badge {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    transition: var(--transition);
}

.user-profile-info {
    display: flex;
    flex-direction: column;
}

.user-display-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.role-tag {
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 12px;
    padding: 1px 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
    width: fit-content;
}

/* Role Color Themes */
.role-production {
    background: rgba(0, 210, 255, 0.15);
    color: #00d2ff;
    border: 1px solid rgba(0, 210, 255, 0.4);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.2);
}

.role-ceo {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.4);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.2);
}

.role-sales {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.4);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

.role-accountant {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.role-operator {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

.role-inventory {
    background: rgba(249, 115, 22, 0.15);
    color: #fb923c;
    border: 1px solid rgba(249, 115, 22, 0.4);
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.2);
}

.role-inventory-assistant {
    background: rgba(20, 184, 166, 0.15);
    color: #2dd4bf;
    border: 1px solid rgba(20, 184, 166, 0.4);
    box-shadow: 0 0 10px rgba(20, 184, 166, 0.2);
}

/* ==========================================================================
   EXECUTIVE USER & ROLES MANAGEMENT CENTER
   ========================================================================== */
.user-mgmt-modal-window {
    background: #0b0f19;
    border: 1px solid rgba(0, 210, 255, 0.25);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 210, 255, 0.1);
}

.modal-header-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(0, 210, 255, 0.12);
    border: 1px solid rgba(0, 210, 255, 0.25);
    color: var(--uv-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* Modal Nav Tabs */
.modal-subnav {
    display: flex;
    gap: 8px;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}

.modal-subnav-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 700;
    padding: 12px 18px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.modal-subnav-btn:hover {
    color: var(--text-main);
}

.modal-subnav-btn.active {
    color: var(--uv-cyan);
    border-bottom-color: var(--uv-cyan);
    background: rgba(0, 210, 255, 0.05);
}

/* Toolbar */
.user-mgmt-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.user-search-box {
    flex: 1;
    min-width: 220px;
    position: relative;
}

.user-search-box i {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 0.85rem;
}

.user-search-box input {
    width: 100%;
    padding: 9px 38px 9px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: #fff;
    font-size: 0.85rem;
    transition: var(--transition);
}

.user-search-box input:focus {
    border-color: var(--uv-cyan);
    outline: none;
    background: rgba(0, 210, 255, 0.03);
}

.user-filter-box select {
    padding: 9px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 0.85rem;
    height: auto;
    cursor: pointer;
}

/* Structured Users List */
.users-structured-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 480px;
    overflow-y: auto;
    padding-left: 4px;
}

.user-row-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: var(--transition);
    position: relative;
}

.user-row-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.user-row-card.is-prod-manager {
    border-color: rgba(0, 210, 255, 0.35);
    background: linear-gradient(90deg, rgba(0, 210, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.user-row-identity {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 260px;
}

.user-row-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}

.user-row-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.user-row-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.current-user-tag {
    background: rgba(0, 210, 255, 0.15);
    color: var(--uv-cyan);
    border: 1px solid rgba(0, 210, 255, 0.3);
    font-size: 0.68rem;
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 600;
}

.crown-tag {
    background: rgba(255, 157, 0, 0.15);
    color: var(--laser-amber);
    border: 1px solid rgba(255, 157, 0, 0.3);
    font-size: 0.68rem;
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 600;
}

.user-row-contact {
    font-size: 0.76rem;
    color: var(--text-muted);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.user-row-contact span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Role Selector Column */
.user-row-role-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 280px;
    flex: 1;
    max-width: 330px;
}

.role-label-title {
    font-size: 0.73rem;
    color: var(--text-muted);
    font-weight: 600;
}

.user-role-select {
    width: 100%;
    padding: 7px 10px;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 7px;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
}

.user-role-select:focus,
.user-role-select:hover {
    border-color: var(--uv-cyan);
    outline: none;
}

.role-desc-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Actions */
.user-row-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .user-row-card {
        flex-direction: column;
        align-items: stretch;
    }
    .user-row-role-col {
        max-width: 100%;
    }
    .user-row-actions {
        justify-content: flex-end;
    }
}

/* Roles Guide Matrix */
.roles-guide-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .roles-guide-grid {
        grid-template-columns: 1fr;
    }
}

.role-guide-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.role-guide-card.guide-prod        { border-top: 3px solid var(--uv-cyan); }
.role-guide-card.guide-ceo         { border-top: 3px solid #3b82f6; }
.role-guide-card.guide-sales       { border-top: 3px solid var(--success-green); }
.role-guide-card.guide-acc         { border-top: 3px solid var(--laser-amber); }
.role-guide-card.guide-operator    { border-top: 3px solid #fbbf24; }
.role-guide-card.guide-inventory   { border-top: 3px solid #f97316; }
.role-guide-card.guide-inv-assist  { border-top: 3px solid #14b8a6; }

.guide-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.guide-badge {
    font-weight: 700;
    font-size: 0.85rem;
}

.guide-tag-full       { background: rgba(0, 210, 255, 0.15); color: var(--uv-cyan); padding: 2px 8px; border-radius: 12px; font-size: 0.7rem; font-weight: 600; }
.guide-tag-view       { background: rgba(59, 130, 246, 0.15); color: #93c5fd; padding: 2px 8px; border-radius: 12px; font-size: 0.7rem; font-weight: 600; }
.guide-tag-sales      { background: rgba(16, 185, 129, 0.15); color: var(--success-green); padding: 2px 8px; border-radius: 12px; font-size: 0.7rem; font-weight: 600; }
.guide-tag-acc        { background: rgba(255, 157, 0, 0.15); color: var(--laser-amber); padding: 2px 8px; border-radius: 12px; font-size: 0.7rem; font-weight: 600; }
.guide-tag-operator   { background: rgba(245, 158, 11, 0.15); color: #fbbf24; padding: 2px 8px; border-radius: 12px; font-size: 0.7rem; font-weight: 600; }
.guide-tag-inventory  { background: rgba(249, 115, 22, 0.15); color: #fb923c; padding: 2px 8px; border-radius: 12px; font-size: 0.7rem; font-weight: 600; }
.guide-tag-inv-assist { background: rgba(20, 184, 166, 0.15); color: #2dd4bf; padding: 2px 8px; border-radius: 12px; font-size: 0.7rem; font-weight: 600; }

.guide-summary {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.guide-perms-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-main);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 8px;
}

.guide-perms-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
}

.guide-perms-list li i {
    margin-top: 3px;
    flex-shrink: 0;
}

/* ================= Financial & Accounting Tab Styles ================= */
.finance-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.finance-paid {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-green);
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.finance-partial {
    background: rgba(255, 157, 0, 0.15);
    color: var(--laser-amber);
    border: 1px solid rgba(255, 157, 0, 0.35);
}

.finance-unpaid {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-red);
    border: 1px solid rgba(239, 68, 68, 0.35);
}

/* Sales Rep tag on order card */
.sales-rep-tag {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.sales-rep-tag strong {
    color: #93c5fd;
}

/* Micro-interaction Card Shimmer & Ripple */
.order-card {
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.order-card:hover {
    transform: translateY(-4px) scale(1.01);
}

/* Confetti Burst Container */
#confettiCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
}

/* ==========================================================================
   LOGIN SCREEN — Full Screen Premium Glassmorphic Login
   ========================================================================== */
.login-screen {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #07091a;
    overflow: hidden;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.login-screen.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.06);
}

/* Animated background orbs inside login */
.login-ambient {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.55;
    animation: loginOrbFloat 8s ease-in-out infinite;
}

.login-orb.orb-a {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 200, 255, 0.5), transparent 70%);
    top: -150px;
    left: -100px;
    animation-duration: 9s;
}

.login-orb.orb-b {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(200, 50, 250, 0.45), transparent 70%);
    bottom: -120px;
    right: -80px;
    animation-duration: 11s;
    animation-delay: -3s;
}

.login-orb.orb-c {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255, 160, 0, 0.35), transparent 70%);
    top: 40%;
    left: 40%;
    animation-duration: 13s;
    animation-delay: -6s;
}

@keyframes loginOrbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.05); }
    66% { transform: translate(-25px, 30px) scale(0.96); }
}

/* The card */
.login-card {
    position: relative;
    z-index: 10;
    background: rgba(15, 20, 40, 0.75);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px;
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.85),
                0 0 0 1px rgba(0, 200, 255, 0.08),
                inset 0 1px 0 rgba(255,255,255,0.07);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    padding: 44px 48px 36px;
    width: 100%;
    max-width: 460px;
    animation: loginCardIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes loginCardIn {
    from { opacity: 0; transform: translateY(30px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Logo area */
.login-logo {
    text-align: center;
    margin-bottom: 28px;
}

.login-brand-logo-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35), 0 0 25px rgba(220, 38, 38, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
    margin-bottom: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-brand-logo-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45), 0 0 35px rgba(220, 38, 38, 0.3);
}

.login-brand-logo-img {
    height: 58px;
    max-width: 230px;
    object-fit: contain;
    display: block;
}

.login-logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(0,200,255,0.2), rgba(100,50,255,0.2));
    border: 1px solid rgba(0,200,255,0.3);
    box-shadow: 0 0 30px rgba(0,200,255,0.25);
    margin-bottom: 16px;
    font-size: 2rem;
    color: var(--uv-cyan);
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { box-shadow: 0 0 30px rgba(0,200,255,0.25); }
    50% { box-shadow: 0 0 50px rgba(0,200,255,0.5), 0 0 80px rgba(0,200,255,0.15); }
}

.login-title {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 6px;
    line-height: 1.3;
}

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

/* Form fields */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-user-select label,
.login-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.login-select {
    font-size: 1rem !important;
    padding: 12px 14px !important;
}

.login-pass-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.login-pass-wrap .form-control {
    padding-left: 48px;
    font-size: 1rem;
    padding-top: 12px;
    padding-bottom: 12px;
}

.btn-toggle-pass {
    position: absolute;
    left: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    transition: color 0.2s;
}

.btn-toggle-pass:hover {
    color: var(--uv-cyan);
}

/* User info preview */
.login-user-info {
    background: rgba(0, 200, 255, 0.06);
    border: 1px solid rgba(0, 200, 255, 0.18);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 0.88rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-user-info .user-emoji {
    font-size: 1.6rem;
}

/* Login button */
.login-btn {
    width: 100%;
    padding: 14px;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    margin-top: 4px;
    background: linear-gradient(135deg, #0a74da, #3b82f6) !important;
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.45);
    transition: transform 0.2s, box-shadow 0.2s;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(59, 130, 246, 0.6);
}

.login-btn:active {
    transform: translateY(0);
}

/* Error message */
.login-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.9rem;
    color: #fca5a5;
    margin-bottom: 4px;
    text-align: center;
}

/* Hint line */
.login-hint {
    margin-top: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-dim);
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.login-hint strong {
    color: var(--uv-cyan);
    font-weight: 800;
    letter-spacing: 0.1em;
}

/* ==========================================================================
   TWO-PANEL LOGIN SCREEN
   ========================================================================== */

/* Override base to use flex row */
.login-screen {
    flex-direction: row;
    align-items: stretch;
    background: #07091a;
}

/* ---- Hero Panel (Right) ---- */
.login-hero-panel {
    flex: 1 1 55%;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.login-hero-img-wrap {
    position: absolute;
    inset: 0;
}

.login-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    filter: saturate(1.1) brightness(0.85);
}

.login-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(7, 9, 26, 0.92) 0%,
        rgba(7, 9, 26, 0.4) 50%,
        transparent 100%
    ),
    linear-gradient(
        to top,
        rgba(7, 9, 26, 0.95) 0%,
        rgba(7, 9, 26, 0.3) 40%,
        transparent 100%
    );
}

.login-hero-text {
    position: relative;
    z-index: 5;
    padding: 48px 40px;
}

.login-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 200, 255, 0.12);
    border: 1px solid rgba(0, 200, 255, 0.3);
    color: var(--uv-cyan);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 40px;
    margin-bottom: 18px;
    backdrop-filter: blur(8px);
}

.login-hero-title {
    font-size: 2.4rem;
    font-weight: 900;
    color: #fff;
    line-height: 1.25;
    margin-bottom: 14px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.login-hero-title span {
    background: linear-gradient(135deg, var(--uv-cyan), var(--cutter-magenta));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-hero-desc {
    font-size: 1rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 24px;
    line-height: 1.6;
}

.login-feature-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.feature-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 16px;
    border-radius: 40px;
    font-size: 0.82rem;
    font-weight: 700;
    border: 1px solid;
    backdrop-filter: blur(12px);
    transition: transform 0.2s;
}

.feature-pill:hover { transform: translateY(-2px); }

.pill-cyan    { background: rgba(0,210,255,0.12);  border-color: rgba(0,210,255,0.4);  color: var(--uv-cyan); }
.pill-amber   { background: rgba(255,157,0,0.12);  border-color: rgba(255,157,0,0.4);  color: var(--laser-amber); }
.pill-magenta { background: rgba(217,70,239,0.12); border-color: rgba(217,70,239,0.4); color: var(--cutter-magenta); }
.pill-green   { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.4); color: var(--success-green); }

/* ---- Form Panel (Left) ---- */
.login-form-panel {
    flex: 0 0 420px;
    max-width: 420px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(7, 9, 26, 0.98);
    border-right: 1px solid rgba(255,255,255,0.07);
    overflow: hidden;
}

.login-form-panel .login-ambient {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.login-form-panel .login-card {
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    padding: 36px 40px;
    width: 100%;
    max-width: 380px;
    border-radius: 0;
    animation: loginCardIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.login-card .login-logo {
    margin-bottom: 28px;
}

/* Responsive: stack on small screens */
@media (max-width: 768px) {
    .login-screen { flex-direction: column; }
    .login-hero-panel { flex: 0 0 240px; }
    .login-hero-title { font-size: 1.6rem; }
    .login-form-panel { flex: 1; max-width: 100%; border-right: none; border-top: 1px solid rgba(255,255,255,0.07); }
    .login-feature-pills { display: none; }
}


/* ==========================================================================
   DASHBOARD HERO GRAPHIC BANNER (Promotional Gifts Studio)
   ========================================================================== */
.dashboard-hero-banner {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    border: 1px solid rgba(0, 210, 255, 0.28);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 25px rgba(0, 210, 255, 0.08);
    background: #07091a;
}

.hero-graphic-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
    filter: brightness(0.42) saturate(1.25);
    display: block;
}

.hero-graphic-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, 
        rgba(7, 9, 26, 0.94) 0%, 
        rgba(7, 9, 26, 0.82) 45%, 
        rgba(7, 9, 26, 0.70) 70%,
        rgba(7, 9, 26, 0.88) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 26px 30px;
    flex: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 210, 255, 0.12);
    border: 1px solid rgba(0, 210, 255, 0.35);
    color: var(--uv-cyan);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
    backdrop-filter: blur(8px);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--uv-cyan);
    box-shadow: 0 0 8px var(--uv-cyan);
    display: inline-block;
    animation: heroPulse 1.8s infinite ease-in-out;
}

@keyframes heroPulse {
    0%, 100% { transform: scale(0.9); opacity: 0.6; }
    50%      { transform: scale(1.3); opacity: 1; }
}

.hero-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
    line-height: 1.3;
}

.hero-title span {
    background: linear-gradient(135deg, var(--uv-cyan), #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 0.92rem;
    color: var(--text-muted);
    max-width: 640px;
    line-height: 1.6;
    margin-bottom: 18px;
}

.hero-gift-pills {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.gift-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 8px 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.gift-pill:hover {
    background: rgba(0, 210, 255, 0.12);
    border-color: rgba(0, 210, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.15);
}

.gift-pill .pill-icon {
    font-size: 1.25rem;
}

.gift-pill .pill-text strong {
    display: block;
    font-size: 0.85rem;
    color: var(--text-main);
}

.gift-pill .pill-text small {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.hero-stats-card {
    position: relative;
    z-index: 2;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    min-width: 260px;
    background: rgba(11, 15, 25, 0.7);
    backdrop-filter: blur(12px);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-mini-stat {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-mini-stat .mini-stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.hero-mini-stat .icon-cyan {
    background: rgba(0, 210, 255, 0.12);
    color: var(--uv-cyan);
}

.hero-mini-stat .icon-amber {
    background: rgba(255, 157, 0, 0.12);
    color: var(--laser-amber);
}

.hero-mini-stat .icon-green {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success-green);
}

.hero-mini-stat .mini-stat-val {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
}

.hero-mini-stat .mini-stat-lbl {
    display: block;
    font-size: 0.74rem;
    color: var(--text-muted);
}

.hero-quick-order-btn {
    width: 100%;
    margin-top: 4px;
    padding: 8px 12px;
    font-size: 0.82rem;
}

@media (max-width: 900px) {
    .dashboard-hero-banner {
        flex-direction: column;
    }
    .hero-stats-card {
        border-right: none;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        min-width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
    }
}

/* User Role Quick Switcher in Modal */
.user-role-quick-change {
    margin: 8px 0 10px 0;
    text-align: right;
}

.user-role-quick-change select {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    border-radius: 6px;
    width: 100%;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 6px 8px;
    transition: var(--transition);
}

.user-role-quick-change select:hover,
.user-role-quick-change select:focus {
    border-color: var(--uv-cyan);
    outline: none;
}

/* ==========================================================================
   MULTI-CURRENCY WIDGET & ORDER CURRENCY
   ========================================================================== */
.currency-selector-widget {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    transition: var(--transition);
}

.currency-selector-widget:hover {
    border-color: var(--laser-amber);
    box-shadow: 0 0 10px rgba(255, 157, 0, 0.15);
}

.currency-dropdown-select {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    outline: none;
}

.currency-dropdown-select option {
    background-color: #0f172a;
    color: #ffffff;
}

/* ==========================================================================
   AUTO-ASSIGNED CREATOR CARD (NO HUMAN INTERVENTION)
   ========================================================================== */
.creator-auto-card {
    background: linear-gradient(135deg, rgba(30, 41, 69, 0.75) 0%, rgba(15, 23, 42, 0.85) 100%);
    border: 1px solid rgba(0, 210, 255, 0.3);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 18px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.creator-card-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--uv-cyan);
    background: rgba(0, 210, 255, 0.1);
    border: 1px solid rgba(0, 210, 255, 0.25);
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.creator-card-inner {
    display: flex;
    align-items: center;
    gap: 16px;
}

.creator-card-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(0, 210, 255, 0.15);
    border: 1px solid rgba(0, 210, 255, 0.4);
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.2);
}

.creator-card-details {
    flex: 1;
}

.creator-card-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.creator-card-label {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.creator-card-name {
    font-size: 1.05rem;
    color: #ffffff;
}

.creator-card-role-tag {
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.35);
    padding: 2px 8px;
    border-radius: 6px;
}

.creator-card-contact-row {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.creator-card-phone {
    color: var(--text-main);
    font-family: monospace;
    font-size: 0.85rem;
}

.creator-card-status {
    color: var(--success-green);
    font-weight: 600;
}

/* Synced sales rep pill in form */
.creator-synced-badge-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 0.9rem;
}

.badge-synced {
    margin-right: auto;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    padding: 2px 8px;
    border-radius: 12px;
}

/* ==========================================================================
   SAMPLE STAGE & APPROVAL WORKFLOW
   ========================================================================== */
.card-sample-prompt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px dashed rgba(255, 157, 0, 0.4);
    background: rgba(255, 157, 0, 0.05);
    color: var(--laser-amber);
    padding: 10px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    margin: 10px 0;
    transition: var(--transition);
}

.card-sample-prompt:hover {
    background: rgba(255, 157, 0, 0.15);
    border-color: var(--laser-amber);
}

.card-sample-preview {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin: 10px 0;
    height: 120px;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-sample-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card-sample-preview:hover img {
    transform: scale(1.05);
}

.sample-overlay-tag {
    position: absolute;
    bottom: 6px;
    right: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    backdrop-filter: blur(8px);
}

.sample-overlay-tag.approved {
    background: rgba(16, 185, 129, 0.9);
    color: #fff;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.sample-overlay-tag.pending {
    background: rgba(245, 158, 11, 0.9);
    color: #fff;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.sample-overlay-tag.rejected {
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
}

/* Sample Modal Styles */
.sample-order-summary-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.88rem;
    line-height: 1.6;
}

.sample-section-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}

.sample-preview-container {
    width: 100%;
    min-height: 220px;
    max-height: 340px;
    background: rgba(0, 0, 0, 0.35);
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    margin-bottom: 12px;
}

.sample-preview-container img {
    max-width: 100%;
    max-height: 320px;
    object-fit: contain;
    border-radius: 8px;
}

.sample-placeholder {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-muted);
}

.sample-placeholder i {
    font-size: 2.5rem;
    color: var(--text-dim);
    margin-bottom: 10px;
    display: block;
}

.sample-placeholder p {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.sample-approval-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    margin-top: 18px;
}

.approval-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    margin-bottom: 10px;
}

.sample-status-box {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 0.88rem;
    line-height: 1.5;
}

.approval-buttons-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.approval-buttons-row .btn {
    flex: 1;
    min-width: 200px;
}

/* ==========================================================================
   DESKTOP FLOATING TOAST NOTIFICATIONS
   ========================================================================== */
.desktop-toast-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 420px;
    width: calc(100vw - 48px);
}

.desktop-toast {
    pointer-events: auto;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 210, 255, 0.35);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 210, 255, 0.2);
    border-radius: 14px;
    padding: 14px 18px;
    color: var(--text-main);
    animation: slideUpToast 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transition: transform 0.25s ease, opacity 0.25s ease;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.desktop-toast.toast-completed {
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.8), 0 0 25px rgba(16, 185, 129, 0.3);
}

.desktop-toast.toast-sample {
    border-color: rgba(255, 157, 0, 0.5);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.8), 0 0 25px rgba(255, 157, 0, 0.3);
}

.desktop-toast-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.toast-completed .desktop-toast-icon {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.toast-sample .desktop-toast-icon {
    background: rgba(255, 157, 0, 0.2);
    color: #fbbf24;
}

.desktop-toast-content {
    flex: 1;
}

.desktop-toast-title {
    font-weight: 800;
    font-size: 0.95rem;
    margin-bottom: 3px;
    color: #ffffff;
}

.desktop-toast-body {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 8px;
}

.desktop-toast-actions {
    display: flex;
    gap: 8px;
}

.desktop-toast-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.2s;
}

.desktop-toast-close:hover {
    color: #ffffff;
}

@keyframes slideUpToast {
    from {
        transform: translateY(40px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ==========================================================================
   MULTI-INVENTORY ITEMS PICKER IN ORDER MODAL
   ========================================================================== */
.order-inventory-section {
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: 12px;
    padding: 14px 16px;
    margin: 4px 0 8px;
}

.section-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.section-label-row label {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
}

.badge-optional {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-dim);
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 20px;
}

.order-inventory-picker-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.inv-picker-select-wrap {
    flex: 1;
    min-width: 220px;
}

.inv-picker-qty-wrap {
    width: 100px;
}

.btn-add-inv-item {
    white-space: nowrap;
    padding: 9px 16px;
}

.order-inventory-items-list {
    margin-top: 6px;
}

.empty-inv-items-note {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.82rem;
    color: var(--text-dim);
    text-align: center;
}

.inv-items-table-wrap {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.inv-items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    background: rgba(10, 15, 30, 0.5);
}

.inv-items-table th {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    padding: 8px 12px;
    text-align: right;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.inv-items-table td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    vertical-align: middle;
}

.inv-items-table tr.stock-warning-row {
    background: rgba(239, 68, 68, 0.08);
}

.sku-chip {
    font-family: monospace;
    font-weight: 700;
    font-size: 0.78rem;
    background: rgba(0, 210, 255, 0.12);
    color: #38bdf8;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(0, 210, 255, 0.25);
}

.stock-badge {
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.stock-badge.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.stock-badge.badge-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.text-danger-sm {
    color: #f87171;
    font-size: 0.72rem;
    margin-right: 6px;
}

.table-qty-edit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.table-qty-edit .form-control-sm {
    padding: 4px 8px;
    font-size: 0.82rem;
    height: auto;
    background: rgba(15, 23, 42, 0.7);
}

.unit-text {
    color: var(--text-dim);
    font-size: 0.78rem;
}

.btn-remove-item {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.95rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-remove-item:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
}

/* ==========================================================================
   ONE-TIME EXTERNAL SUPPLIER CARD
   ========================================================================== */
.external-supplier-card {
    background: rgba(255, 157, 0, 0.03);
    border: 1px dashed rgba(255, 157, 0, 0.35);
    border-radius: 12px;
    padding: 12px 16px;
    margin: 6px 0 10px;
    transition: border-color 0.2s;
}

.external-supplier-card:hover {
    border-color: rgba(255, 157, 0, 0.6);
}

.external-supplier-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.external-supplier-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 0;
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text-main);
}

.external-supplier-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--color-amber);
}

.external-supplier-body {
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 10px;
    animation: fadeIn 0.3s ease;
}

.external-supplier-hint {
    background: rgba(0, 210, 255, 0.06);
    border: 1px solid rgba(0, 210, 255, 0.15);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.4;
}

.supplier-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (max-width: 600px) {
    .supplier-fields-grid {
        grid-template-columns: 1fr;
    }
}

/* Card badges for Kanban */
.card-inventory-tags {
    font-size: 0.72rem;
    color: #38bdf8;
    background: rgba(0, 210, 255, 0.08);
    border: 1px solid rgba(0, 210, 255, 0.15);
    border-radius: 6px;
    padding: 3px 8px;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-external-supplier-tag {
    font-size: 0.72rem;
    color: #fbbf24;
    background: rgba(255, 157, 0, 0.08);
    border: 1px solid rgba(255, 157, 0, 0.2);
    border-radius: 6px;
    padding: 3px 8px;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================================================
   MULTI-PRODUCT MANUAL ADDITION IN ORDER MODAL
   ========================================================================== */
.order-custom-products-section {
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(0, 210, 255, 0.25);
    border-radius: 12px;
    padding: 14px 16px;
    margin: 4px 0 8px;
}

.custom-product-input-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 12px;
}

.custom-product-input-grid {
    display: grid;
    grid-template-columns: 2fr 85px 105px 115px 1.2fr 1.3fr auto;
    gap: 8px;
    align-items: flex-end;
}

.prod-field-label {
    display: block;
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 600;
    white-space: nowrap;
}

.prod-field-action .btn-add-prod-item {
    white-space: nowrap;
    padding: 8px 16px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.order-machines-summary-card {
    background: rgba(0, 210, 255, 0.04);
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: 10px;
    padding: 10px 14px;
}

.summary-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--uv-cyan);
    margin-bottom: 8px;
}

.summary-card-body {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.summary-machine-pill {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.summary-machine-pill .pill-icon {
    font-size: 1.1rem;
}

.summary-machine-pill .pill-info {
    display: flex;
    flex-direction: column;
}

.summary-machine-pill .pill-info strong {
    color: #ffffff;
    font-size: 0.82rem;
}

.summary-machine-pill .pill-info small {
    color: var(--text-muted);
    font-size: 0.72rem;
}

@media (max-width: 1200px) {
    .custom-product-input-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    }
}

.custom-prods-table-wrap {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.custom-prods-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    background: rgba(10, 15, 30, 0.5);
}

.custom-prods-table th {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    padding: 8px 12px;
    text-align: right;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.custom-prods-table td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    vertical-align: middle;
}

.custom-prods-table tfoot td {
    background: rgba(0, 210, 255, 0.05);
    font-weight: 700;
    padding: 10px 12px;
    border-top: 1px solid rgba(0, 210, 255, 0.2);
}

.supplier-add-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 157, 0, 0.2);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.suppliers-table-wrap {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid rgba(255, 157, 0, 0.2);
}

.suppliers-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    background: rgba(10, 15, 30, 0.5);
}

.suppliers-table th {
    background: rgba(255, 157, 0, 0.08);
    color: #fbbf24;
    padding: 8px 12px;
    text-align: right;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 157, 0, 0.15);
}

.suppliers-table td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    vertical-align: middle;
}

.suppliers-table tfoot td {
    background: rgba(255, 157, 0, 0.08);
    font-weight: 700;
    padding: 8px 12px;
    border-top: 1px solid rgba(255, 157, 0, 0.2);
}

/* ================= NETWORK SERVER & CLOUD TUNNEL BADGES ================= */
.network-server-badge-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.network-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.25s ease;
    max-width: 100%;
    flex-wrap: nowrap;
}

.network-pill.pill-cloud {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.45);
    color: #60a5fa;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.2);
}

.network-pill.pill-local {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
}

.network-pill .pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse-green 2s infinite;
    flex-shrink: 0;
}

.network-pill .pulse-dot.pulse-blue {
    background-color: #3b82f6;
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    animation: pulse-blue 2s infinite;
    flex-shrink: 0;
}

@keyframes pulse-green {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes pulse-blue {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(59, 130, 246, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

.btn-copy-pill {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    white-space: nowrap;
}

.pill-cloud .btn-copy-pill:hover {
    background: #2563eb;
    color: #fff;
    border-color: #3b82f6;
}

.pill-local .btn-copy-pill:hover {
    background: #10b981;
    color: #0f172a;
    border-color: #10b981;
}

/* ================= Execution Time & Cost Enhancements ================= */
.time-metric-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.78rem;
    color: var(--text-main);
}

.time-metric-box strong {
    color: #fff;
}

.badge-paused {
    background: rgba(245, 158, 11, 0.15) !important;
    border: 1px solid rgba(245, 158, 11, 0.4) !important;
    color: #fbbf24 !important;
}

.btn-pause-order {
    background: rgba(245, 158, 11, 0.18) !important;
    border: 1px solid #f59e0b !important;
    color: #fbbf24 !important;
    font-weight: 700;
}

.btn-pause-order:hover {
    background: #f59e0b !important;
    color: #000 !important;
}

.btn-resume-order {
    background: rgba(16, 185, 129, 0.2) !important;
    border: 1px solid #10b981 !important;
    color: #34d399 !important;
    font-weight: 700;
}

.btn-resume-order:hover {
    background: #10b981 !important;
    color: #fff !important;
}

/* Operating Cost Group */
.operating-cost-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.9) 100%);
    border: 1px solid rgba(14, 165, 233, 0.35);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-top: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.operating-cost-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 8px;
}

.operating-cost-badge {
    background: rgba(14, 165, 233, 0.15);
    border: 1px solid rgba(14, 165, 233, 0.4);
    color: #38bdf8;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
}




/* ======================================================
   INVENTORY LIVE-SEARCH DROPDOWN (ORDER MODAL PICKER)
   ====================================================== */
.inv-search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    background: #1a2035;
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    max-height: 280px;
    overflow-y: auto;
    overflow-x: hidden;
}

.inv-search-dropdown::-webkit-scrollbar { width: 5px; }
.inv-search-dropdown::-webkit-scrollbar-track { background: transparent; }
.inv-search-dropdown::-webkit-scrollbar-thumb { background: rgba(56, 189, 248, 0.3); border-radius: 3px; }

.inv-search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.inv-search-result-item:last-child { border-bottom: none; }

.inv-search-result-item:hover {
    background: rgba(56, 189, 248, 0.1);
}

.inv-search-icon-placeholder {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 14px;
    flex-shrink: 0;
}

.inv-search-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.inv-search-item-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inv-search-item-sku {
    font-size: 0.72rem;
    color: var(--text-dim);
}

.inv-search-item-stock {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

.inv-search-item-stock.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.inv-search-item-stock.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.inv-search-no-result {
    padding: 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

/* ======================================================
   INVENTORY ITEM IMAGE UPLOAD BOX
   ====================================================== */
.item-image-upload-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.item-image-upload-label {
    display: block;
    width: 100%;
    cursor: pointer;
}

.item-image-preview-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 110px;
    border: 2px dashed rgba(56, 189, 248, 0.3);
    border-radius: var(--radius-md);
    background: rgba(56, 189, 248, 0.03);
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: border-color 0.2s ease, background 0.2s ease;
    padding: 16px;
    text-align: center;
}

.item-image-preview-box i {
    font-size: 1.8rem;
    color: rgba(56, 189, 248, 0.5);
    margin-bottom: 4px;
}

.item-image-preview-box small {
    font-size: 0.7rem;
    color: var(--text-dim);
}

.item-image-upload-label:hover .item-image-preview-box {
    border-color: rgba(56, 189, 248, 0.6);
    background: rgba(56, 189, 248, 0.06);
}

.item-image-preview-box img {
    border-radius: 8px;
    object-fit: contain;
    max-width: 100%;
    max-height: 140px;
}

/* ==========================================================================
   MACHINE PERFORMANCE & PRODUCTIVITY REPORTS STYLES
   ========================================================================== */

.analytics-header-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.analytics-title-group h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

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

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

/* Machine Share Card & Stacked Bar */
.machine-share-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-main);
}

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

.share-title {
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.share-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.share-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

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

.machine-share-bar-container {
    height: 28px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

.machine-share-segment {
    height: 100%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    overflow: hidden;
    white-space: nowrap;
    padding: 0 4px;
}

.machine-share-segment:hover {
    filter: brightness(1.2);
    z-index: 2;
}

/* Machine Report Filters Bar */
.machine-report-controls {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.report-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.report-filter-group .filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.report-filter-group label {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.report-search-item {
    position: relative;
    min-width: 250px;
}

.report-search-item input {
    padding-right: 36px;
    border-radius: var(--radius-sm);
    width: 100%;
}

.report-search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
    pointer-events: none;
}

/* Machine Performance Cards Grid */
.machine-perf-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.machine-perf-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 22px;
    box-shadow: var(--shadow-main);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.machine-perf-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.2);
}

.machine-perf-card.status-running {
    border-top: 3px solid #10b981;
}

.machine-perf-card.status-idle {
    border-top: 3px solid #ff9d00;
}

.machine-perf-card.status-sample {
    border-top: 3px solid #38bdf8;
}

.machine-perf-card.status-maintenance {
    border-top: 3px solid #f97316;
}

.machine-perf-card.status-out_of_service {
    border-top: 3px solid #ef4444;
}

.badge-status-running {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-status-idle {
    background: rgba(255, 157, 0, 0.15);
    color: var(--laser-amber);
    border: 1px solid rgba(255, 157, 0, 0.4);
}

.badge-status-idle .live-status-dot {
    background: #ff9d00;
    box-shadow: 0 0 8px #ff9d00;
}

.badge-status-sample {
    background: rgba(14, 165, 233, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.45);
}

.badge-status-sample .live-status-dot {
    background: #38bdf8;
    box-shadow: 0 0 8px #38bdf8;
}

.badge-status-maintenance {
    background: rgba(249, 115, 22, 0.15);
    color: #fb923c;
    border: 1px solid rgba(249, 115, 22, 0.4);
}

.badge-status-maintenance .live-status-dot {
    background: #f97316;
    box-shadow: 0 0 8px #f97316;
}

.badge-status-out_of_service {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.badge-status-out_of_service .live-status-dot {
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
}

.machine-perf-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.machine-perf-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.machine-perf-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.machine-perf-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 3px;
}

.machine-perf-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    gap: 10px;
    align-items: center;
}

.machine-perf-stats-mini {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.perf-mini-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.perf-mini-val {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
}

.perf-mini-lbl {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.machine-perf-progress-wrap {
    margin-bottom: 16px;
}

.machine-perf-progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 6px;
}

.machine-perf-progress-header .rate-label {
    color: var(--text-muted);
}

.machine-perf-progress-header .rate-val {
    font-weight: 700;
    color: #ffffff;
}

.machine-perf-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.machine-perf-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s ease;
}

.machine-perf-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 14px;
}

.machine-perf-btn-toggle {
    width: 100%;
    background: rgba(0, 210, 255, 0.06);
    border: 1px solid rgba(0, 210, 255, 0.2);
    color: var(--uv-cyan);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.machine-perf-btn-toggle:hover {
    background: rgba(0, 210, 255, 0.15);
    border-color: var(--uv-cyan);
}

/* Machine Orders Collapsible Drawer */
.machine-orders-drawer {
    margin-top: 14px;
    background: rgba(11, 15, 25, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: none;
    animation: fadeIn 0.25s ease-out;
}

.machine-orders-drawer.open {
    display: block;
}

.machine-orders-drawer table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.machine-orders-drawer th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    padding: 8px 10px;
    text-align: right;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.machine-orders-drawer td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-main);
}

.machine-orders-drawer tr:last-child td {
    border-bottom: none;
}

.machine-orders-drawer tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Machine Summary Table Wrap */
.machine-summary-table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-main);
}

.table-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 10px;
}

.table-header-row h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

/* جدول الماكينات — min-width للأعمدة لمنع التضاغط */
#machineReportTable {
    min-width: 900px; /* يجبر الجدول على الـ scroll أفقياً بدلاً من الضغط */
}

#machineReportTable th {
    white-space: nowrap;
    padding: 12px 14px;
}

#machineReportTable td {
    padding: 11px 14px;
    white-space: nowrap;
}

/* أعمدة بعرض ثابت للمحتوى المهم */
#machineReportTable th:nth-child(1),
#machineReportTable td:nth-child(1) { min-width: 150px; white-space: normal; } /* الماكينة */
#machineReportTable th:nth-child(2),
#machineReportTable td:nth-child(2) { min-width: 110px; }                      /* النوع */
#machineReportTable th:nth-child(3),
#machineReportTable td:nth-child(3) { min-width: 130px; }                      /* الفني */
#machineReportTable th:nth-child(4),
#machineReportTable td:nth-child(4) { min-width: 110px; }                      /* الحالة */
#machineReportTable th:nth-child(5),
#machineReportTable td:nth-child(5) { min-width: 130px; }                      /* القطع */
#machineReportTable th:nth-child(6),
#machineReportTable td:nth-child(6) { min-width: 110px; text-align: center; } /* أوردرات مكتملة */
#machineReportTable th:nth-child(7),
#machineReportTable td:nth-child(7) { min-width: 140px; text-align: center; } /* جارية/انتظار */
#machineReportTable th:nth-child(8),
#machineReportTable td:nth-child(8) { min-width: 130px; }                      /* ساعات */
#machineReportTable th:nth-child(9),
#machineReportTable td:nth-child(9) { min-width: 120px; }                      /* القيمة */
#machineReportTable th:nth-child(10),
#machineReportTable td:nth-child(10) { min-width: 120px; }                     /* نسبة الإنجاز */
#machineReportTable th:nth-child(11),
#machineReportTable td:nth-child(11) { min-width: 130px; }                     /* تفاصيل */

/* table-responsive wrapper يضيف scroll أفقي ناعم */
.machine-summary-table-wrap .table-responsive {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.06);
}

.machine-summary-table-wrap .table-responsive::-webkit-scrollbar {
    height: 6px;
}

.machine-summary-table-wrap .table-responsive::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.02);
    border-radius: 3px;
}

.machine-summary-table-wrap .table-responsive::-webkit-scrollbar-thumb {
    background: rgba(0,210,255,0.35);
    border-radius: 3px;
}

/* Smart Insights Card */
.machine-insights-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-main);
}

.machine-insights-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
}

.machine-insights-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.machine-insight-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.machine-insight-item.insight-warning {
    border-right: 4px solid var(--laser-amber);
}

.machine-insight-item.insight-success {
    border-right: 4px solid var(--success-green);
}

.machine-insight-item.insight-info {
    border-right: 4px solid var(--uv-cyan);
}

.machine-insight-icon {
    font-size: 1.2rem;
    margin-top: 2px;
}

@media (max-width: 768px) {
    .analytics-header-strip {
        flex-direction: column;
        align-items: flex-start;
    }
    .machine-report-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .report-search-item {
        width: 100%;
    }
    .machine-perf-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* ================= User Photo Styling ================= */
.user-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.user-row-avatar .user-avatar-img,
.user-avatar-badge .user-avatar-img,
.login-selected-user .user-avatar-img {
    border: 2px solid var(--uv-cyan);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.25);
}

.operator-badge-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 210, 255, 0.1);
    border: 1px solid rgba(0, 210, 255, 0.3);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--uv-cyan);
}

.operator-badge-chip img {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
}

/* ================= Department Reports & PDF Hub — PREMIUM REDESIGN ================= */
.dept-reports-hub {
    background: linear-gradient(160deg, rgba(13,18,31,0.98) 0%, rgba(10,15,26,0.98) 100%);
    border: 1px solid rgba(0, 210, 255, 0.15);
    border-radius: var(--radius-md);
    padding: 28px 32px;
    margin-bottom: 28px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 210, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.dept-reports-hub::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--uv-cyan), #8b5cf6, var(--uv-orange));
}

.dept-reports-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 28px;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* ─── Department Selector Tabs ─── */
.dept-selector-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 6px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.05);
}

.dept-tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 700;
    font-size: 0.87rem;
    cursor: pointer;
    transition: all 0.22s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    line-height: 1.4;
}

.dept-tab-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-main);
    border-color: rgba(255,255,255,0.1);
    transform: translateY(-1px);
}

.dept-tab-btn.active {
    background: rgba(0, 210, 255, 0.18);
    border-color: rgba(0, 210, 255, 0.5);
    color: #ffffff;
    box-shadow: 0 0 18px rgba(0, 210, 255, 0.22), inset 0 0 12px rgba(0,210,255,0.06);
    transform: translateY(-1px);
}

/* ─── Period Pill Controls ─── */
.dept-report-timeframe-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    background: rgba(0, 0, 0, 0.2);
    padding: 14px 18px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 22px;
}

.period-pill-group {
    display: inline-flex;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 4px;
    gap: 4px;
    flex-wrap: wrap;
}

.period-pill-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 7px 16px;
    border-radius: 7px;
    font-size: 0.83rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.period-pill-btn:hover {
    background: rgba(255,255,255,0.07);
    color: var(--text-main);
}

.period-pill-btn.active {
    background: linear-gradient(135deg, var(--uv-cyan), #0284c7);
    color: #0b0f19;
    font-weight: 800;
    box-shadow: 0 2px 12px rgba(0, 210, 255, 0.35);
}

/* ─── Report Preview Container ─── */
.report-preview-container {
    background: rgba(8, 12, 22, 0.7);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 24px;
    margin-top: 20px;
    min-height: 120px;
}

/* ─── Dynamic Report Content Styles ─── */
.report-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.report-section-title .period-badge {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.08);
}

.report-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.report-kpi-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    padding: 18px 16px;
    text-align: center;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.report-kpi-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--kpi-color, var(--uv-cyan));
    opacity: 0.7;
}

.report-kpi-card:hover {
    background: rgba(255,255,255,0.05);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.report-kpi-card .kpi-icon {
    font-size: 1.5rem;
    margin-bottom: 10px;
    display: block;
    opacity: 0.9;
}

.report-kpi-card .kpi-value {
    font-size: 1.6rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.report-kpi-card .kpi-label {
    font-size: 0.76rem;
    color: var(--text-muted);
    line-height: 1.4;
    font-weight: 500;
}

/* ─── Report Table Styles ─── */
.report-table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.07);
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.report-table-wrapper::-webkit-scrollbar {
    height: 6px;
}

.report-table-wrapper::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.03);
}

.report-table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(0,210,255,0.3);
    border-radius: 3px;
}

.report-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}

.report-data-table thead tr {
    background: rgba(0, 210, 255, 0.1);
    border-bottom: 2px solid rgba(0, 210, 255, 0.2);
}

.report-data-table th {
    padding: 12px 16px;
    text-align: right;
    color: var(--uv-cyan);
    font-weight: 700;
    font-size: 0.82rem;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.report-data-table td {
    padding: 11px 16px;
    color: var(--text-main);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    vertical-align: middle;
    line-height: 1.5;
}

.report-data-table tbody tr:nth-child(even) td {
    background: rgba(255,255,255,0.02);
}

.report-data-table tbody tr:hover td {
    background: rgba(0, 210, 255, 0.05);
}

.report-data-table tbody tr:last-child td {
    border-bottom: none;
}

.report-empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.report-empty-state .empty-icon {
    font-size: 2.8rem;
    display: block;
    margin-bottom: 14px;
    opacity: 0.4;
}

.report-empty-state p {
    font-size: 0.95rem;
    margin: 0;
}

/* ─── Legacy KPI Box (backward compat) ─── */
.report-kpi-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.report-kpi-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.report-kpi-box .val {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
}

.report-kpi-box .lbl {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ================= PRINT ENGINE (PDF & PRINT STYLES) ================= */
@page {
    margin: 8mm 10mm;
    size: A4 portrait;
}

@media print {
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Hide everything on the page by default */
    body * {
        visibility: hidden !important;
    }

    /* Print Job Card Mode */
    body.printing-jobcard #jobCardPrintArea,
    body.printing-jobcard #jobCardPrintArea *,
    #jobCardModal.active #jobCardPrintArea,
    #jobCardModal.active #jobCardPrintArea * {
        visibility: visible !important;
    }
    body.printing-jobcard #jobCardPrintArea,
    #jobCardModal.active #jobCardPrintArea {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 16px 20px !important;
        background: #ffffff !important;
        color: #000000 !important;
        box-shadow: none !important;
        z-index: 999999 !important;
    }

    /* Print Supply Order Mode */
    body.printing-supply #supplyOrderPrintArea,
    body.printing-supply #supplyOrderPrintArea *,
    #supplyOrderModal.active #supplyOrderPrintArea,
    #supplyOrderModal.active #supplyOrderPrintArea * {
        visibility: visible !important;
    }
    body.printing-supply #supplyOrderPrintArea,
    #supplyOrderModal.active #supplyOrderPrintArea {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 16px 20px !important;
        background: #ffffff !important;
        color: #111827 !important;
        box-shadow: none !important;
        font-family: 'Cairo', 'Tajawal', sans-serif !important;
        z-index: 999999 !important;
    }

    /* Print Department Report Mode */
    body.printing-report #printableDepartmentReport,
    body.printing-report #printableDepartmentReport * {
        visibility: visible !important;
    }
    body.printing-report #printableDepartmentReport {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 20px 24px !important;
        background: #ffffff !important;
        color: #111827 !important;
        box-shadow: none !important;
        font-family: 'Cairo', 'Tajawal', sans-serif !important;
        z-index: 999999 !important;
    }

    .modal-header, 
    .modal-footer, 
    .modal-close,
    .app-header, 
    .main-nav, 
    .desktop-toast-container, 
    .ambient-glow-layer,
    .analytics-actions,
    .btn,
    .no-print {
        display: none !important;
    }
}


/* ---- Period Tab Btn (Modal Hub version) ---- */
.period-tab-btn {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    padding: 6px 14px;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.period-tab-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-main); }
.period-tab-btn.active {
    background: var(--uv-cyan);
    color: #0b0f19;
    border-color: var(--uv-cyan);
    font-weight: 800;
}

/* ---- User Profile Photo in grid ---- */
.user-row-avatar img.user-photo-img {
    width: 40px; height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--uv-cyan);
}

/* ---- Execution Log Badge ---- */
.exec-log-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(0,210,255,0.1);
    border: 1px solid rgba(0,210,255,0.25);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 0.78rem;
    color: var(--uv-cyan);
}

/* ---- Bump CSS version to v26 ---- */

/* ==========================================================================
   MULTI-IMAGE SAMPLE APPROVAL & HD INSPECTOR
   ========================================================================== */
.sample-main-viewer-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin-bottom: 12px;
}

.sample-viewer-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
    gap: 8px;
}

.sample-img-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--uv-cyan);
    display: flex;
    align-items: center;
    gap: 6px;
}

.sample-zoom-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-zoom {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.btn-zoom:hover {
    background: rgba(0, 210, 255, 0.2);
    border-color: var(--uv-cyan);
    color: var(--uv-cyan);
}
.btn-zoom-fullscreen {
    background: rgba(0, 210, 255, 0.15);
    border-color: rgba(0, 210, 255, 0.35);
    color: var(--uv-cyan);
    font-weight: 600;
}
.btn-zoom-delete {
    color: #ef4444;
}
.btn-zoom-delete:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #f87171;
}

.zoom-level-badge {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 42px;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 3px 6px;
    border-radius: 4px;
}

.sample-viewport {
    width: 100%;
    height: 380px;
    background: #090d16;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    cursor: grab;
    user-select: none;
}
.sample-viewport.panning {
    cursor: grabbing;
}

.sample-viewport img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.12s ease-out;
    transform-origin: center center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.sample-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}
.sample-nav-btn:hover {
    background: var(--uv-cyan);
    color: #0b0f19;
    border-color: var(--uv-cyan);
}
.sample-nav-btn.prev-btn { right: 12px; }
.sample-nav-btn.next-btn { left: 12px; }

/* Thumbnails Strip */
.sample-thumbnails-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 8px 12px;
    overflow-x: auto;
    margin-bottom: 14px;
}

.sample-thumbnails-list {
    display: flex;
    gap: 10px;
    flex: 1;
    overflow-x: auto;
    padding-bottom: 4px;
}

.sample-thumb-item {
    position: relative;
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: var(--transition);
    background: #000;
}
.sample-thumb-item:hover {
    border-color: var(--uv-cyan);
    transform: translateY(-2px);
}
.sample-thumb-item.active {
    border-color: var(--uv-cyan);
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.4);
}
.sample-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sample-thumb-index {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 0.65rem;
    padding: 1px 5px;
    border-radius: 4px;
}
.sample-thumb-del {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.85);
    color: #fff;
    border: none;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: var(--transition);
}
.sample-thumb-item:hover .sample-thumb-del {
    opacity: 1;
}

.btn-add-sample-photo {
    flex-shrink: 0;
    width: 95px;
    height: 70px;
    border-radius: 8px;
    border: 1.5px dashed rgba(0, 210, 255, 0.4);
    background: rgba(0, 210, 255, 0.05);
    color: var(--uv-cyan);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 600;
    transition: var(--transition);
    text-align: center;
}
.btn-add-sample-photo:hover {
    background: rgba(0, 210, 255, 0.15);
    border-color: var(--uv-cyan);
}

/* Fullscreen HD Inspector */
.fullscreen-inspector-overlay {
    z-index: 999999 !important;
    background: rgba(5, 8, 16, 0.96) !important;
    backdrop-filter: blur(25px);
    padding: 0 !important;
}
.fullscreen-inspector-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
}
.inspector-header {
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    background: rgba(15, 23, 42, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.inspector-title-box {
    display: flex;
    align-items: center;
    gap: 12px;
}
.inspector-badge {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
}
.inspector-title-box h3 {
    margin: 0;
    font-size: 1rem;
    color: #fff;
}
.inspector-counter {
    background: rgba(0, 210, 255, 0.15);
    color: var(--uv-cyan);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}
.inspector-zoom-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}
.btn-inspect-tool {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}
.btn-inspect-tool:hover {
    background: rgba(0, 210, 255, 0.2);
    border-color: var(--uv-cyan);
    color: var(--uv-cyan);
}
.btn-close-inspector {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}
.btn-close-inspector:hover {
    background: #ef4444;
    color: #fff;
}
.inspector-zoom-val {
    font-weight: 700;
    color: var(--uv-cyan);
    font-size: 0.9rem;
    min-width: 48px;
    text-align: center;
}
.inspector-viewport {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    user-select: none;
    background: radial-gradient(circle at center, #111827 0%, #030712 100%);
}
.inspector-viewport.panning {
    cursor: grabbing;
}
.inspector-viewport img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.1s ease-out;
    transform-origin: center center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}
.inspector-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
    z-index: 20;
}
.inspector-nav-btn:hover {
    background: var(--uv-cyan);
    color: #0b0f19;
    border-color: var(--uv-cyan);
}
.inspector-nav-btn.prev { right: 24px; }
.inspector-nav-btn.next { left: 24px; }
.inspector-tip {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(10px);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
}
.inspector-footer {
    height: 80px;
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
}
.inspector-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0;
}
.inspector-thumb-btn {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    background: #000;
    transition: var(--transition);
}
.inspector-thumb-btn.active {
    border-color: var(--uv-cyan);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
}
.inspector-thumb-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   USER CUSTOM PERMISSIONS SYSTEM
   ========================================================================== */
.user-perms-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fbbf24;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    margin-right: 6px;
}
.user-perms-count-badge:hover {
    background: rgba(245, 158, 11, 0.25);
}

.perms-user-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 14px;
}
.perms-banner-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--uv-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.perms-banner-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.perms-banner-info {
    flex: 1;
}
.perms-banner-name {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}
.perms-banner-role {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.perms-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
}
.perms-summary-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--uv-cyan);
}
.perms-btn-group {
    display: flex;
    gap: 6px;
}
.btn-xs {
    padding: 3px 8px;
    font-size: 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}
.btn-outline-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
}
.btn-outline-success:hover {
    background: #10b981;
    color: #fff;
}
.btn-outline-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #f87171;
}
.btn-outline-danger:hover {
    background: #ef4444;
    color: #fff;
}
.btn-outline-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fbbf24;
}
.btn-outline-warning:hover {
    background: #f59e0b;
    color: #0b0f19;
}

.perms-categories-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 440px;
    overflow-y: auto;
    padding-left: 4px;
}

.perms-category-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
}
.perms-category-header {
    background: rgba(255, 255, 255, 0.04);
    padding: 8px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}
.perms-category-items {
    padding: 6px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.perm-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 8px;
    transition: var(--transition);
}
.perm-toggle-row:hover {
    background: rgba(255, 255, 255, 0.04);
}
.perm-info-col {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.perm-icon-box {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(0, 210, 255, 0.1);
    color: var(--uv-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    margin-top: 2px;
    flex-shrink: 0;
}
.perm-title-text {
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
}
.perm-desc-text {
    font-size: 0.76rem;
    color: var(--text-muted);
}

/* Custom Switch Toggle */
.perm-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.perm-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.perm-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: .3s;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.perm-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}
.perm-switch input:checked + .perm-slider {
    background-color: #10b981;
    border-color: #34d399;
}
.perm-switch input:checked + .perm-slider:before {
    transform: translateX(20px);
}

/* ==========================================================================
   OPERATOR PROFILE & SMART PERFORMANCE EVALUATION STYLES
   ========================================================================== */

.op-profile-hero {
    background: linear-gradient(135deg, rgba(20, 27, 45, 0.95), rgba(30, 41, 59, 0.85));
    border: 1px solid rgba(0, 210, 255, 0.25);
    border-radius: 14px;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    margin-bottom: 22px;
}

.op-profile-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(0, 210, 255, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.op-hero-info {
    display: flex;
    align-items: center;
    gap: 18px;
}

.op-hero-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ea5e9, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    flex-shrink: 0;
}

.op-hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.op-hero-details h3 {
    margin: 0 0 6px;
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.op-hero-meta {
    display: flex;
    gap: 14px;
    font-size: 0.84rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.op-hero-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Live Status Badges (مين شغال ومين لا) */
.op-status-badge {
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.88rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.op-status-badge.working {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.25);
    animation: opPulseGreen 2s infinite;
}

.op-status-badge.idle {
    background: rgba(148, 163, 184, 0.12);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.op-status-badge.paused {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

@keyframes opPulseGreen {
    0%, 100% { box-shadow: 0 0 8px rgba(16, 185, 129, 0.3); }
    50% { box-shadow: 0 0 20px rgba(16, 185, 129, 0.6); }
}

/* Smart Performance Evaluation Card */
.op-eval-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.85));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 22px;
    position: relative;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.op-eval-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 14px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.op-eval-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #c084fc;
    display: flex;
    align-items: center;
    gap: 8px;
}

.op-eval-badge {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(14, 165, 233, 0.2));
    border: 1px solid rgba(139, 92, 246, 0.4);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 800;
    color: #e9d5ff;
}

.op-eval-notice {
    font-size: 0.82rem;
    color: #94a3b8;
    background: rgba(14, 165, 233, 0.08);
    border-right: 3px solid var(--uv-cyan);
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 18px;
    line-height: 1.5;
}

.op-eval-pillars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.op-pillar-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 14px 16px;
    transition: all 0.25s ease;
}

.op-pillar-card:hover {
    border-color: rgba(0, 210, 255, 0.3);
    transform: translateY(-2px);
}

.op-pillar-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.op-pillar-label {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

.op-pillar-value {
    font-size: 1.15rem;
    font-weight: 800;
}

.op-pillar-bar {
    height: 7px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin: 8px 0 6px;
}

.op-pillar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.6s ease-in-out;
}

.op-pillar-desc {
    font-size: 0.74rem;
    color: var(--text-muted);
}

/* Machine Breakdown Grid (إنجاز القطع على ماكينات الورشة) */
.op-machines-section {
    margin-bottom: 24px;
}

.op-section-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.op-machines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.op-machine-card {
    background: rgba(19, 24, 40, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.op-machine-card:hover {
    border-color: var(--uv-cyan);
    box-shadow: 0 6px 18px rgba(0, 210, 255, 0.15);
    transform: translateY(-2px);
}

.op-machine-card.active-machine {
    border-color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(19, 24, 40, 0.95));
}

.op-machine-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.op-machine-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: rgba(0, 210, 255, 0.1);
    color: var(--uv-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.op-machine-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.op-machine-pieces-badge {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(99, 102, 241, 0.15));
    border: 1px solid rgba(14, 165, 233, 0.35);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.op-machine-pieces-num {
    font-size: 1.35rem;
    font-weight: 900;
    color: #38bdf8;
}

.op-machine-meta-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 10px;
}

.op-machine-meta-item {
    display: flex;
    flex-direction: column;
}

.op-machine-meta-item strong {
    color: #e2e8f0;
    font-size: 0.84rem;
}

/* ==========================================================================
   EXCEL INVENTORY IMPORT STYLING
   ========================================================================== */
.excel-drop-zone {
    border: 2px dashed rgba(16, 185, 129, 0.4);
    border-radius: 14px;
    padding: 36px 20px;
    text-align: center;
    background: rgba(16, 185, 129, 0.03);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.excel-drop-zone:hover,
.excel-drop-zone.drag-over {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(16, 185, 129, 0.15);
}

.excel-drop-zone .drop-zone-icon {
    font-size: 2.8rem;
    color: #10b981;
    margin-bottom: 12px;
    transition: transform 0.25s ease;
}

.excel-drop-zone:hover .drop-zone-icon {
    transform: scale(1.12);
}

.excel-preview-img-wrap {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 44px;
}

.excel-preview-img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: #111827;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.excel-preview-img:hover {
    transform: scale(1.35);
    z-index: 10;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
}

.badge-import-new {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-import-update {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ================= Load Order to Machine & Product Execution Styles ================= */
.load-order-item-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}
.load-order-item-card:hover {
    border-color: rgba(0, 210, 255, 0.35);
    background: rgba(0, 210, 255, 0.03);
    transform: translateY(-1px);
}
.badge-prod-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 700;
}
.badge-prod-status.completed {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.badge-prod-status.running {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.badge-prod-status.pending {
    background: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

