/* LAPTOP SOKO — Admin panel styles (Windows 11 Settings-app inspired) */

body.admin-body {
    background: var(--ink);
    color: var(--text);
    font-family: var(--font-body);
}

.admin-shell { display: flex; min-height: 100vh; }

.admin-sidebar {
    width: 254px; flex-shrink: 0;
    background: rgba(255,255,255,.75);
    backdrop-filter: blur(24px) saturate(1.6);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
    border-right: 1px solid var(--border);
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
    padding: 20px 14px;
}
.admin-sidebar .brand { font-family: var(--font-display); font-weight: 700; font-size: 19px; padding: 4px 10px 20px; }
.admin-sidebar .brand .soko-dot { color: var(--amber); }
.admin-nav-link {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; border-radius: var(--radius); color: var(--muted);
    font-size: 14px; font-weight: 500; margin-bottom: 3px;
    transition: background .1s ease;
}
.admin-nav-link i { font-size: 17px; width: 20px; text-align: center; }
.admin-nav-link:hover { background: var(--surface-3); color: var(--text); }
.admin-nav-link.active { background: var(--amber-tint); color: var(--amber-dark); font-weight: 600; position: relative; }
.admin-nav-link.active::before { content:''; position:absolute; left:-14px; top:8px; bottom:8px; width:3px; background:var(--amber); border-radius:0 3px 3px 0; }

.admin-main { flex: 1; min-width: 0; }
.admin-topbar {
    background: rgba(243,243,243,.85); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px; position: sticky; top: 0; z-index: 20;
    display: flex; justify-content: space-between; align-items: center;
}
.admin-content { padding: 24px; }

.stat-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px;
    box-shadow: var(--shadow-1);
}
.stat-card .stat-icon { width: 42px; height: 42px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 19px; }
.stat-card .stat-value { font-family: var(--font-mono); font-size: 25px; font-weight: 700; }

.admin-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); }
.admin-table { color: var(--text); margin-bottom: 0; }
.admin-table thead th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--border); font-weight: 600; padding: 13px 16px; background: var(--surface-2); }
.admin-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: 13.5px; }
.admin-table tbody tr:hover { background: var(--surface-2); }
.admin-table img.thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); }

.status-pill { font-family: var(--font-mono); font-size: 11px; padding: 4px 10px; border-radius: 50px; text-transform: capitalize; font-weight: 600; }
.status-pending { background: #F0F0F0; color: #5F5F5F; }
.status-confirmed, .status-processing { background: #E3F6F7; color: #00838C; }
.status-shipped { background: var(--amber-tint); color: var(--amber-dark); }
.status-completed { background: var(--success-tint); color: var(--success); }
.status-cancelled { background: var(--danger-tint); color: var(--danger); }
.status-active { background: var(--success-tint); color: var(--success); }
.status-inactive { background: #F0F0F0; color: #5F5F5F; }
.status-available { background: var(--success-tint); color: var(--success); }
.status-sold { background: #F0F0F0; color: #5F5F5F; }
.status-online { background: var(--amber-tint); color: var(--amber-dark); }
.status-pos { background: #F3E9FB; color: #6B3FA0; }

.login-shell {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 20% 20%, rgba(0,103,192,.08), transparent 40%), radial-gradient(circle at 80% 80%, rgba(0,183,195,.08), transparent 45%), var(--ink);
    padding: 20px;
}
.login-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px; width: 100%; max-width: 400px; box-shadow: var(--shadow-2); }

/* Permission checkbox grid on admin accounts page */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 10px; }
.perm-check { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; }

/* Receipt (thermal print) preview inside admin */
.receipt-preview {
    background: #fff; border: 1px dashed var(--border); border-radius: var(--radius);
    width: 302px; margin: 0 auto; padding: 14px; font-family: var(--font-mono); font-size: 12px; color: #111;
}

/* Analytics */
.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-1); }

@media (max-width: 900px) {
    .admin-sidebar { position: fixed; left: -270px; z-index: 40; transition: left .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.25); background: rgba(255,255,255,.96); }
    .admin-sidebar.open { left: 0; }
    .admin-content { padding: 16px; }
}

/* ---------- Print styles for GOOJPRT PT-210 (58mm thermal paper) ---------- */
@media print {
    body * { visibility: hidden; }
    #printReceipt, #printReceipt * { visibility: visible; }
    #printReceipt {
        position: absolute; top: 0; left: 0;
        width: 58mm;
        font-family: 'Consolas', 'Cascadia Mono', monospace;
        color: #000;
    }
    @page { size: 58mm auto; margin: 0; }
}
