:root {
    --bg-dark: #0a0a0c;
    --bg-panel: #16161a;
    --accent: #007AFF;
    --text-main: #ffffff;
    --text-muted: #8e8e93;
    --border: #2a2a30;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { background-color: var(--bg-dark); color: var(--text-main); height: 100vh; overflow: hidden; position: relative; }

/* STAFF LOGIN POPUP OVERLAY (GLASSMORPHISM) */
.auth-overlay {
    position: fixed !important; 
    top: 0 !important; 
    left: 0 !important; 
    width: 100vw !important; 
    height: 100vh !important;
    background-color: rgba(10, 10, 12, 0.85); 
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex; 
    align-items: center; 
    justify-content: center;
    z-index: 999999 !important; 
}
.auth-card {
    background: var(--bg-panel); padding: 3rem; border-radius: 12px;
    border: 1px solid var(--border); text-align: center; width: 400px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}
.auth-card h2 { margin-bottom: 0.5rem; font-size: 2rem; }
.auth-card span { color: var(--accent); }
.auth-card input {
    width: 100%; padding: 1rem; margin-top: 1rem; background: var(--bg-dark);
    border: 1px solid var(--border); color: white; border-radius: 6px; font-size: 1rem;
}
.auth-card button {
    width: 100%; padding: 1rem; margin-top: 1.5rem; background-color: var(--accent);
    color: white; border: none; border-radius: 6px; font-weight: bold; cursor: pointer; font-size: 1rem;
}

/* Dashboard Layout */
.dashboard { display: flex; height: 100vh; width: 100vw; }
.sidebar { width: 260px; background-color: var(--bg-panel); border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.brand { padding: 2rem 1.5rem; border-bottom: 1px solid var(--border); }
.brand h2 { font-size: 1.8rem; margin-bottom: 0.2rem; }
.brand span { color: var(--accent); }
.brand p { color: var(--text-muted); font-size: 0.9rem; }

.side-nav { display: flex; flex-direction: column; padding: 1.5rem 1rem; gap: 0.5rem; flex: 1; }
.nav-btn { background: transparent; border: none; color: var(--text-main); padding: 1rem; text-align: left; border-radius: 8px; font-size: 1rem; cursor: pointer; transition: 0.2s; }
.nav-btn:hover { background-color: rgba(255,255,255,0.05); }
.nav-btn.active { background-color: var(--accent); color: white; font-weight: bold; }
.return-btn { color: var(--text-muted); text-decoration: none; display: block; text-align: center; margin-top: 10px; font-size: 0.9rem; }
.return-btn:hover { color: white; background: none; }

.content-area { flex: 1; padding: 2rem 3rem; overflow-y: auto; }
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.header-row h1 { font-size: 2rem; }

/* SLEEK GLOBAL SEARCH BAR */
.top-bar { margin-bottom: 2rem; display: flex; align-items: center; width: 100%; }
.search-wrapper { position: relative; flex: 1; }
.search-bar { 
    width: 100%; 
    padding: 1.2rem; 
    background: var(--bg-dark); 
    border: 1px solid var(--border); 
    color: white; 
    border-radius: 8px; 
    font-size: 1rem; 
    transition: all 0.2s ease; 
}
.search-bar:focus { 
    outline: none; 
    border-color: var(--accent); 
    background: #000; 
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2); 
}

/* SLIM METRICS & LOGISTICS RIBBONS */
.metrics-row { display: flex; gap: 1.5rem; margin-bottom: 1.5rem; }
.metric-card { 
    flex: 1; 
    background: rgba(255,255,255,0.02); 
    border: 1px solid var(--border); 
    border-left: 4px solid var(--accent); 
    border-radius: 8px; 
    padding: 1rem 1.5rem; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}
.metric-card.green { border-left-color: #34C759; }
.metric-card h3 { color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; margin: 0; }
.metric-card p { font-size: 1.6rem; font-weight: bold; color: var(--text-main); margin: 0; }
.metric-card.green p { color: #34C759; }

/* Buttons & Inputs */
.action-btn { background-color: var(--accent); color: white; border: none; padding: 0.8rem 1.5rem; border-radius: 6px; font-weight: bold; cursor: pointer; transition: 0.2s; }
.action-btn:hover { background-color: #0056b3; }
.cancel-btn { background-color: transparent; border: 1px solid var(--border); color: white; padding: 0.8rem 1.5rem; border-radius: 6px; cursor: pointer; }

/* Tables */
.table-container { background-color: var(--bg-panel); border-radius: 12px; border: 1px solid var(--border); overflow: hidden; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { background-color: rgba(255,255,255,0.02); padding: 1.2rem; color: var(--text-muted); font-size: 0.9rem; text-transform: uppercase; border-bottom: 1px solid var(--border); }
td { padding: 1.2rem; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }

/* CLIENT PAGINATION */
.pagination { display: flex; gap: 0.5rem; margin-top: 1.5rem; justify-content: center; }
.page-btn { padding: 0.5rem 1rem; background: var(--bg-dark); border: 1px solid var(--border); color: var(--text-muted); border-radius: 6px; cursor: pointer; transition: 0.2s; font-weight: bold; }
.page-btn:hover { background: rgba(255,255,255,0.05); color: white; }
.page-btn.active { background: var(--accent); color: white; border-color: var(--accent); }

/* Status Badges */
.status-badge { padding: 0.4rem 0.8rem; border-radius: 20px; font-size: 0.85rem; font-weight: bold; }
.status-Received { color: #ff9f0a; background: rgba(255, 159, 10, 0.1); }
.status-Diagnosing { color: #b766ff; background: rgba(183, 102, 255, 0.1); }
.status-Repairing { color: #007AFF; background: rgba(0, 122, 255, 0.1); }
.status-Ready { color: #34C759; background: rgba(52, 199, 89, 0.1); }
.status-Picked { color: var(--text-muted); background: rgba(255, 255, 255, 0.05); }

/* Modals */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); display: none; align-items: center; justify-content: center; z-index: 1000; }
.modal-overlay.open { display: flex; }
.modal-card { background: var(--bg-panel); padding: 2.5rem; border-radius: 12px; width: 500px; border: 1px solid var(--border); max-height: 90vh; overflow-y: auto; }
.modal-card h2 { margin-bottom: 1.5rem; text-align: center; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid input { padding: 0.8rem; background: var(--bg-dark); border: 1px solid var(--border); color: white; border-radius: 6px; }
.btn-row { display: flex; gap: 1rem; margin-top: 2rem; }
.btn-row button { flex: 1; }
textarea { padding: 0.8rem; background: var(--bg-dark); border: 1px solid var(--border); color: white; border-radius: 6px; font-family: inherit; }

/* IMEI CHECKER STYLES */
.imei-box { background: var(--bg-panel); padding: 2rem; border-radius: 12px; border: 1px solid var(--border); max-width: 600px; }
.imei-input-group { display: flex; gap: 10px; margin-bottom: 2rem; }
.imei-input-group input { flex: 1; padding: 1rem; background: var(--bg-dark); border: 1px solid var(--border); color: white; border-radius: 6px; font-size: 1rem; }
.imei-input-group button { padding: 0 1.5rem; background-color: var(--accent); color: white; border: none; border-radius: 6px; font-weight: bold; cursor: pointer; }
.imei-results { display: none; background: var(--bg-dark); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.imei-row { display: flex; border-bottom: 1px solid var(--border); }
.imei-row:last-child { border-bottom: none; }
.imei-label { flex: 1; padding: 1rem; color: var(--text-muted); background: rgba(255,255,255,0.02); border-right: 1px solid var(--border); font-weight: bold; }
.imei-value { flex: 2; padding: 1rem; font-weight: 500; }
.imei-value.clean { color: #34C759; }
.imei-value.locked { color: #ff4a4a; }