/* ═══════════════════════════════════════════════════════════════════════
   LUXE DESIGN SYSTEM v3.0  —  Pearl & Indigo  —  Light Mode  —  RTL
   ═══════════════════════════════════════════════════════════════════════ */
:root {
    /* ── Sidebar ── */
    --sidebar-bg:      #ffffff;
    --sidebar-border:  #e2e8f0;
    --sidebar-hover:   rgba(0,0,0,0.04);
    --sidebar-active:  rgba(79,70,229,0.08);

    /* ── Accent – Indigo ── */
    --accent:          #4f46e5;
    --accent-light:    #6366f1;
    --accent-dim:      rgba(79,70,229,0.10);
    --accent-glow:     rgba(79,70,229,0.25);

    /* ── Gold Luxury ── */
    --gold:            #b45309;
    --gold-deep:       #92400e;
    --gold-dim:        rgba(180,83,9,0.10);

    /* ── Emerald Success ── */
    --emerald:         #059669;
    --emerald-dim:     rgba(5,150,105,0.10);

    /* ── Semantic ── */
    --success:         #059669;
    --success-dim:     rgba(5,150,105,0.10);
    --warning:         #d97706;
    --warning-dim:     rgba(217,119,6,0.10);
    --danger:          #dc2626;
    --danger-dim:      rgba(220,38,38,0.10);
    --info:            #0284c7;
    --info-dim:        rgba(2,132,199,0.10);

    /* ── Page Backgrounds ── */
    --bg-page:         #f1f5f9;
    --bg-surface:      #ffffff;
    --bg-elevated:     #f8fafc;
    --bg-overlay:      rgba(255,255,255,0.95);

    /* ── Text ── */
    --text-primary:    #0f172a;
    --text-secondary:  #475569;
    --text-muted:      #94a3b8;
    --text-inverted:   #ffffff;

    /* ── Borders ── */
    --border:          #e2e8f0;
    --border-strong:   #cbd5e1;

    /* ── Shadows ── */
    --shadow-sm:   0 1px 3px rgba(15,23,42,0.06);
    --shadow-md:   0 4px 16px rgba(15,23,42,0.08);
    --shadow-lg:   0 8px 32px rgba(15,23,42,0.10);
    --shadow-xl:   0 16px 48px rgba(15,23,42,0.12);
    --shadow-glow: 0 0 24px -4px var(--accent-glow);
}

/* ─── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { direction: rtl; scroll-behavior: smooth; }
body { margin: 0; font-family: 'Cairo', sans-serif; background: var(--bg-page); color: var(--text-primary); min-height: 100vh; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-size: 1rem; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5, h6 { font-weight: 700; letter-spacing: 0; color: var(--text-primary); }
label { font-size: 0.9rem; }
input, select, textarea, button { font-size: 0.95rem; font-family: 'Cairo', sans-serif; }
td, th { font-size: 0.9rem; }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-page); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ─── SIDEBAR ────────────────────────────────────────────────────── */
#sidebar { background: var(--sidebar-bg); border-left: 1px solid var(--sidebar-border); box-shadow: -10px 0 30px rgba(15,23,42,0.03); }
.sidebar-section-label { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-muted); padding: 1rem 1rem 0.4rem; }
.sidebar-link { display: flex; align-items: center; gap: 0.75rem; min-height: 44px; padding: 0.55rem 0.75rem; border-radius: 8px; color: var(--text-secondary); font-size: 0.875rem; font-weight: 700; transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease; position: relative; text-decoration: none; margin-bottom: 2px; }
.sidebar-link:hover { background: var(--sidebar-hover); color: #2563eb; }
.sidebar-link.active { background: #eef2ff; color: #4338ca; box-shadow: inset 3px 0 0 #4f46e5; }
.sidebar-link .icon-wrap { width: 2rem; height: 2rem; border-radius: 0.5rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 0.85rem; background: rgba(0,0,0,0.04); transition: background 0.18s ease; }
.sidebar-link:hover .icon-wrap { background: #e0e7ff; }
.sidebar-link.active .icon-wrap { background: #e0e7ff; color: #4338ca; }

/* ─── TOP HEADER ─────────────────────────────────────────────────── */
.topbar { background: rgba(255,255,255,0.94); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm); backdrop-filter: blur(12px); z-index: 60; }
.topbar-search { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 0.625rem; color: var(--text-primary); padding: 0.55rem 2.75rem 0.55rem 1rem; font-family: 'Cairo', sans-serif; font-size: 0.875rem; transition: border-color 0.2s, box-shadow 0.2s; width: 100%; }
.topbar-search::placeholder { color: var(--text-muted); }
.topbar-search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.avatar-circle { width: 2.5rem; height: 2.5rem; border-radius: 0.625rem; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.9rem; background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%); color: #fff; flex-shrink: 0; box-shadow: var(--shadow-glow); }

/* ─── CARDS ──────────────────────────────────────────────────────── */
.card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-sm); transition: box-shadow 0.2s ease, border-color 0.2s ease; position: relative; overflow: hidden; }
.card::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-light)); opacity: 0; transition: opacity 0.3s; }
.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.card:hover::after { opacity: 1; }
.card-premium { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-md); position: relative; }

/* ─── KPI CARDS ──────────────────────────────────────────────────── */
.kpi-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 10px; padding: 1.25rem; box-shadow: var(--shadow-sm); transition: box-shadow 0.2s ease, border-color 0.2s ease; position: relative; overflow: hidden; min-height: 132px; }
.kpi-card::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-light)); opacity: 0; transition: opacity 0.3s; }
.kpi-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.kpi-card:hover::after { opacity: 1; }
.kpi-icon { width: 3rem; height: 3rem; border-radius: 0.875rem; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.kpi-value { font-size: 1.9rem; font-weight: 800; letter-spacing: 0; color: var(--text-primary); line-height: 1.1; word-break: break-word; }

/* ─── TABLES ─────────────────────────────────────────────────────── */
.table-premium { width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden; background: #ffffff; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-sm); }
.table-premium thead { background: linear-gradient(180deg, #f8fafc, #eef4fb); }
.table-premium th { font-weight: 800; font-size: 0.75rem; letter-spacing: 0; text-transform: uppercase; color: #334155; padding: 0.8rem 1rem; border-bottom: 1px solid #cbd5e1; white-space: nowrap; vertical-align: middle; text-align: right; }
.table-premium td { padding: 0.85rem 1.1rem; border-bottom: 1px solid #e7edf5; color: var(--text-primary); font-size: 0.875rem; vertical-align: middle; transition: background 0.15s; }
.table-premium tbody tr:nth-child(even) td { background: rgba(248,250,252,0.68); }
.table-premium tbody tr:hover td { background: #eff6ff; }
.table-premium tbody tr:last-child td { border-bottom: none; }

/* ─── BUTTONS ────────────────────────────────────────────────────── */
.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: 42px; background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 52%, #0891b2 100%); color: #fff; font-weight: 800; font-family: 'Cairo', sans-serif; padding: 0.55rem 1.15rem; border-radius: 8px !important; border: none; cursor: pointer; transition: box-shadow 0.2s ease, filter 0.2s ease; box-shadow: 0 8px 18px rgba(37,99,235,0.20); font-size: 0.875rem; text-decoration: none; white-space: nowrap; line-height: 1.4; }
.btn-primary:hover { filter: brightness(1.03); box-shadow: 0 4px 18px -3px var(--accent-glow); color: #fff; }
.btn-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: 42px; background: #ffffff; color: var(--text-secondary); font-weight: 700; font-family: 'Cairo', sans-serif; padding: 0.55rem 1.15rem; border-radius: 8px !important; border: 1px solid #cbd5e1; cursor: pointer; transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease; font-size: 0.875rem; text-decoration: none; white-space: nowrap; line-height: 1.4; }
.btn-secondary:hover { background: var(--bg-elevated); color: var(--text-primary); border-color: var(--accent); }
.btn-gold { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: 42px; background: linear-gradient(135deg, var(--gold-deep) 0%, var(--gold) 100%); color: #fff; font-weight: 800; font-family: 'Cairo', sans-serif; padding: 0.55rem 1.15rem; border-radius: 8px !important; border: none; cursor: pointer; transition: box-shadow 0.2s ease, filter 0.2s ease; font-size: 0.875rem; text-decoration: none; white-space: nowrap; }
.btn-gold:hover { filter: brightness(1.03); box-shadow: 0 4px 16px -3px rgba(180,83,9,0.35); }
button:disabled, .btn-primary:disabled, .btn-secondary:disabled { opacity: 0.58; cursor: not-allowed; transform: none !important; }

/* ─── INPUTS ─────────────────────────────────────────────────────── */
.input-premium { background: var(--bg-surface); border: 1px solid #cbd5e1; border-radius: 8px !important; padding: 0.65rem 1rem; color: var(--text-primary); font-family: 'Cairo', sans-serif; font-size: 0.875rem; transition: border-color 0.2s, box-shadow 0.2s; width: 100%; box-shadow: inset 0 1px 2px rgba(15,23,42,0.03); }
.input-premium::placeholder { color: var(--text-muted); }
.input-premium:focus { outline: none; border-color: #2563eb !important; box-shadow: 0 0 0 3px rgba(37,99,235,0.12) !important; }
select.input-premium option { background: var(--bg-surface); }
input[type="text"], input[type="number"], input[type="date"], input[type="password"], input[type="search"], select, textarea { min-height: 42px; border-radius: 8px !important; font-family: 'Cairo', sans-serif !important; background-color: #ffffff !important; border-color: #cbd5e1 !important; color: #0f172a !important; box-shadow: inset 0 1px 2px rgba(15,23,42,0.03); }
input:focus, select:focus, textarea:focus { border-color: #2563eb !important; box-shadow: 0 0 0 3px rgba(37,99,235,0.12) !important; outline: none !important; }

/* Tailwind brand fallback for standalone pages that do not define tailwind.config. */
.bg-brand-50 { background-color: #eef2ff !important; }
.bg-brand-100 { background-color: #e0e7ff !important; }
.bg-brand-500 { background-color: #6366f1 !important; }
.bg-brand-600 { background-color: #4f46e5 !important; }
.text-brand-500 { color: #6366f1 !important; }
.text-brand-600 { color: #4f46e5 !important; }
.border-brand-200 { border-color: #c7d2fe !important; }
.border-brand-500 { border-color: #6366f1 !important; }
.focus\:ring-brand-500:focus { --tw-ring-color: #6366f1 !important; }
.focus\:border-brand-500:focus { border-color: #6366f1 !important; }

@keyframes app-fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.animate-fade-in { animation: app-fade-in 0.22s ease-out both; }

/* ─── BADGES ─────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.2rem 0.65rem; font-size: 0.72rem; font-weight: 700; border-radius: 999px !important; letter-spacing: 0; white-space: nowrap; }
.badge-success  { background: var(--success-dim);  color: var(--success);  }
.badge-warning  { background: var(--warning-dim);  color: var(--warning);  }
.badge-danger   { background: var(--danger-dim);   color: var(--danger);   }
.badge-info     { background: var(--info-dim);     color: var(--info);     }
.badge-gold     { background: var(--gold-dim);     color: var(--gold);     }
.badge-secondary{ background: var(--bg-elevated);  color: var(--text-muted); border: 1px solid var(--border); }

/* ─── MODALS ─────────────────────────────────────────────────────── */
.fixed.inset-0 .bg-white, [id$="-modal"] > .bg-white, #form-modal > .bg-white { border: 1px solid rgba(203,213,225,0.92); box-shadow: 0 26px 70px rgba(15,23,42,0.24) !important; overflow: hidden; }
.fixed.inset-0 { backdrop-filter: blur(8px); }
.modal, [id$="-modal"], [id*="modal"] { scroll-margin-top: 80px; }

/* ─── TOAST NOTIFICATIONS ─────────────────────────────────────────── */
@keyframes app-toast-in  { from{opacity:0;transform:translateY(-18px) scale(0.95)} to{opacity:1;transform:translateY(0) scale(1)} }
@keyframes app-toast-out { from{opacity:1;transform:translateY(0) scale(1)} to{opacity:0;transform:translateY(-12px) scale(0.95)} }
.app-toast { pointer-events:auto; display:flex; align-items:center; gap:12px; padding:14px 22px 14px 16px; border-radius:14px; font-family:'Cairo',sans-serif; font-size:0.9rem; font-weight:700; box-shadow:0 8px 32px -8px rgba(15,23,42,0.18); animation:app-toast-in 0.35s cubic-bezier(.34,1.56,.64,1) both; min-width:280px; max-width:480px; border:1px solid transparent; position:relative; backdrop-filter:blur(12px); cursor:default; }
.app-toast.out { animation:app-toast-out 0.3s ease-in both; }
.app-toast-icon { width:36px; height:36px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:1rem; flex-shrink:0; }
.app-toast-close { position:absolute; top:8px; left:8px; width:22px; height:22px; border-radius:6px; display:flex; align-items:center; justify-content:center; font-size:10px; cursor:pointer; background:rgba(0,0,0,0.06); color:rgba(0,0,0,0.4); border:none; transition:all 0.15s; }
.app-toast-close:hover { background:rgba(0,0,0,0.12); color:rgba(0,0,0,0.7); }
.app-toast-progress { position:absolute; bottom:0; right:0; height:3px; border-radius:0 0 14px 14px; transition:width linear; }
.app-toast.success { background:linear-gradient(135deg,#ecfdf5,#d1fae5); border-color:#a7f3d0; color:#065f46; }
.app-toast.success .app-toast-icon { background:#059669; color:#fff; }
.app-toast.success .app-toast-progress { background:#059669; }
.app-toast.error { background:linear-gradient(135deg,#fef2f2,#fee2e2); border-color:#fca5a5; color:#991b1b; }
.app-toast.error .app-toast-icon { background:#dc2626; color:#fff; }
.app-toast.error .app-toast-progress { background:#dc2626; }
.app-toast.warning { background:linear-gradient(135deg,#fffbeb,#fef3c7); border-color:#fcd34d; color:#92400e; }
.app-toast.warning .app-toast-icon { background:#d97706; color:#fff; }
.app-toast.warning .app-toast-progress { background:#d97706; }
.app-toast.info { background:linear-gradient(135deg,#eff6ff,#dbeafe); border-color:#93c5fd; color:#1e40af; }
.app-toast.info .app-toast-icon { background:#2563eb; color:#fff; }
.app-toast.info .app-toast-progress { background:#2563eb; }
#app-confirm-yes:hover { filter:brightness(1.08); transform:translateY(-1px); }
#app-confirm-no:hover { background:#f8fafc; color:#334155; }

/* ─── RESPONSIVE ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
    #sidebar { position: fixed !important; right: 0 !important; top: 0 !important; z-index: 9999 !important; transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: flex !important; }
    #sidebar.sidebar-open { transform: translateX(0); }
    .topbar { padding-inline: 1rem !important; }
    .app-toast { min-width: 0; width: calc(100vw - 32px); max-width: calc(100vw - 32px); }
    .btn-primary, .btn-secondary, .btn-gold { min-height: 40px; padding-inline: 0.9rem; }
}
@media (max-width: 640px) {
    .kpi-card { min-height: 120px; }
    .card-premium, .kpi-card, .card { border-radius: 8px !important; }
    .table-premium th, .table-premium td { padding: 0.75rem 0.85rem; font-size: 0.82rem; }
    .container { padding-inline: 0.9rem !important; }
}

/* ─── API LOGS ────────────────────────────────────────────────────── */
.status-code { font-weight: 700; font-family: 'Courier New', monospace; }
.btn-sm { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.4rem 0.8rem; border-radius: 0.375rem; border: 1px solid var(--border); background: var(--bg-surface); color: var(--text-secondary); font-size: 0.75rem; font-weight: 600; cursor: pointer; text-decoration: none; transition: all 0.2s; }
.btn-sm:hover { background: var(--bg-elevated); border-color: var(--accent); color: var(--accent); }
.response-box { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 0.625rem; padding: 1.5rem; font-family: 'Courier New', monospace; font-size: 0.8rem; overflow-x: auto; max-height: 500px; overflow-y: auto; }
.modal-classic { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15, 23, 42, 0.5); backdrop-filter: blur(4px); z-index: 1000; align-items: center; justify-content: center; }
.modal-classic.active { display: flex; }
.modal-content-classic { background: var(--bg-surface); border-radius: 1rem; padding: 2rem; max-width: 900px; width: 90%; max-height: 90vh; overflow-y: auto; }

/* ─── MEMBER PORTAL ──────────────────────────────────────────────── */
.portal-body { font-family: 'Cairo', sans-serif; background: #f1f5f9; color: #0f172a; min-height: 100vh; margin:0; padding:0; box-sizing:border-box; }
.portal-body * { box-sizing: border-box; }
.portal-body .topbar { background: #ffffff; border-bottom: 1px solid #e2e8f0; padding: 0 1.5rem; display: flex; align-items: center; justify-content: space-between; height: 60px; position: sticky; top: 0; z-index: 50; }
.portal-body .topbar-brand { display: flex; align-items: center; gap: 0.75rem; }
.portal-body .topbar-icon { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, #047857, #059669); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.1rem; }
.portal-body .topbar-name { font-weight: 900; font-size: 1rem; color: #0f172a; }
.portal-body .topbar-sub  { font-size: 0.72rem; color: #64748b; margin-top: -3px; }
.portal-body .topbar-right { display: flex; align-items: center; gap: 1rem; }
.portal-body .member-badge { display: flex; align-items: center; gap: 0.5rem; background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 999px; padding: 0.3rem 0.85rem; font-size: 0.82rem; font-weight: 700; color: #047857; }
.portal-body .btn-logout { display: flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.9rem; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 0.8rem; font-weight: 700; color: #64748b; cursor: pointer; text-decoration: none; transition: all 0.15s; }
.portal-body .btn-logout:hover { background: #fef2f2; border-color: #fca5a5; color: #dc2626; }
.portal-body .main { max-width: 1200px; margin: 0 auto; padding: 2rem 1.25rem; }
.portal-body .kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.portal-body .section { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; margin-bottom: 1.5rem; }
.portal-body .section-header { padding: 1rem 1.25rem; border-bottom: 1px solid #e2e8f0; display: flex; align-items: center; justify-content: space-between; }
.portal-body .section-title { font-size: 0.95rem; font-weight: 800; color: #0f172a; display: flex; align-items: center; gap: 0.5rem; }
.portal-body .section-body { padding: 1.25rem; }
.portal-body table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.portal-body th { text-align: right; padding: 0.6rem 0.85rem; background: #f8fafc; color: #64748b; font-weight: 700; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; border-bottom: 1px solid #e2e8f0; }
.portal-body td { padding: 0.7rem 0.85rem; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.portal-body tr:last-child td { border-bottom: none; }
.portal-body tr:hover td { background: #f8fafc; }
.portal-body .mem-card { border-radius: 12px; padding: 1.25rem; display: flex; align-items: center; gap: 1rem; }
@media (max-width: 640px) { .portal-body .kpi-grid { grid-template-columns: 1fr 1fr; } .portal-body .topbar-sub { display: none; } }

/* ─── LOGIN ──────────────────────────────────────────────────────── */
body.login-body { min-height: 100vh; font-family: 'Cairo', sans-serif; color: #0f172a; background: linear-gradient(rgba(15,23,42,0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(15,23,42,0.035) 1px, transparent 1px), linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%); background-size: 30px 30px, 30px 30px, 100% 100%; display: flex; align-items: center; justify-content: center; padding: 24px; -webkit-font-smoothing: antialiased; margin:0; }
.login-body button, .login-body input { font-family: inherit; }
.login-wrapper { width: min(1080px, 100%); }
.login-shell { min-height: 620px; display: grid; grid-template-columns: minmax(0, 1.15fr) 420px; overflow: hidden; border: 1px solid rgba(203,213,225,0.9); border-radius: 12px; background: rgba(255,255,255,0.86); box-shadow: 0 26px 70px rgba(15,23,42,0.16); }
.login-brand-panel { position: relative; padding: 48px; color: #fff; background: linear-gradient(135deg, rgba(15,23,42,0.98), rgba(17,24,39,0.92)), linear-gradient(45deg, rgba(37,99,235,0.3), rgba(8,145,178,0.18)); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; isolation: isolate; }
.login-brand-panel::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px); background-size: 34px 34px; z-index: -1; }
.brand-kicker { display: inline-flex; width: fit-content; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid rgba(125,211,252,0.25); border-radius: 999px; background: rgba(14,165,233,0.12); color: #bae6fd; font-size: 0.78rem; font-weight: 900; }
.brand-kicker i { font-size: 0.78rem; }
.brand-panel-title { max-width: 600px; margin-top: 28px; font-size: clamp(2rem, 4vw, 2.65rem); line-height: 1.25; font-weight: 900; color: #fff; letter-spacing: 0; }
.brand-panel-copy { max-width: 640px; margin-top: 14px; color: #cbd5e1; line-height: 1.9; font-size: 1rem; font-weight: 600; }
.brand-panel-grid { max-width: 660px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 30px; }
.brand-panel-card { min-height: 104px; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; background: rgba(255,255,255,0.07); padding: 16px; }
.brand-panel-card strong { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; color: #fff; font-size: 0.92rem; }
.brand-panel-card i { color: #38bdf8; }
.brand-panel-card span { display: block; color: #94a3b8; font-size: 0.78rem; line-height: 1.65; font-weight: 600; }
.brand-panel-status { display: flex; flex-wrap: wrap; gap: 8px; color: #dbeafe; font-size: 0.78rem; font-weight: 800; }
.brand-panel-status span { border: 1px solid rgba(255,255,255,0.1); border-radius: 999px; background: rgba(255,255,255,0.06); padding: 7px 11px; }
.login-card { display: flex; flex-direction: column; justify-content: center; padding: 44px 36px; background: rgba(255,255,255,0.98); }
.login-logo { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 28px; }
.logo-icon { width: 58px; height: 58px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: linear-gradient(135deg, #1d4ed8, #0891b2); color: #fff; font-size: 1.7rem; font-weight: 900; box-shadow: 0 14px 28px rgba(37,99,235,0.26); }
.logo-title { color: #0f172a; font-size: 1.45rem; font-weight: 900; letter-spacing: 0; }
.logo-sub { color: #64748b; font-size: 0.76rem; font-weight: 800; }
.login-heading { margin-bottom: 22px; text-align: center; }
.login-heading h2 { color: #0f172a; font-size: 1.25rem; font-weight: 900; }
.login-heading p { margin-top: 5px; color: #64748b; font-size: 0.86rem; line-height: 1.7; font-weight: 600; }
.alert-error { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 18px; padding: 12px 14px; border: 1px solid rgba(220,38,38,0.22); border-radius: 8px; background: #fef2f2; color: #dc2626; font-size: 0.84rem; font-weight: 800; line-height: 1.6; }
.alert-error svg { flex: 0 0 auto; margin-top: 3px; }
.login-body .field { margin-bottom: 15px; }
.login-body .field label { display: block; margin-bottom: 7px; color: #475569; font-size: 0.84rem; font-weight: 900; }
.login-body .input-wrap { position: relative; }
.login-body .input-wrap i { position: absolute; top: 50%; right: 14px; transform: translateY(-50%); color: #94a3b8; font-size: 0.9rem; pointer-events: none; }
.field-input { width: 100%; min-height: 48px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: #0f172a; outline: none; padding: 0 42px 0 14px; font-size: 0.94rem; font-weight: 700; transition: border-color 0.18s ease, box-shadow 0.18s ease; }
.field-input::placeholder { color: #9aa7b7; font-weight: 600; }
.field-input:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.13); }
.btn-login { width: 100%; min-height: 48px; margin-top: 6px; border: 0; border-radius: 8px; background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 55%, #0891b2 100%); color: #fff; cursor: pointer; font-size: 0.98rem; font-weight: 900; box-shadow: 0 12px 24px rgba(37,99,235,0.22); transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease; }
.btn-login:hover { transform: translateY(-1px); box-shadow: 0 16px 28px rgba(37,99,235,0.26); }
.btn-login:active { transform: translateY(0); }
.login-divider { display: flex; align-items: center; gap: 10px; margin-top: 20px; }
.login-divider span { flex: 1; height: 1px; background: #d8e1ec; }
.login-divider p { color: #64748b; font-size: 0.74rem; font-weight: 800; white-space: nowrap; }
.login-footer { margin-top: 14px; color: #64748b; text-align: center; font-size: 0.76rem; font-weight: 700; line-height: 1.8; }
.login-footer strong, .login-footer a { color: #2563eb; font-weight: 900; text-decoration: none; }
@media (max-width: 900px) { .login-body { align-items: flex-start; padding: 14px; overflow-y: auto; } .login-shell { grid-template-columns: 1fr; min-height: auto; } .login-brand-panel { display: none; } .login-card { min-height: calc(100vh - 80px); padding: 34px 22px; } }
@media (max-width: 420px) { .login-card { padding: 28px 18px; } .logo-title { font-size: 1.25rem; } }

/* ─── WINNERS & LOSERS ───────────────────────────────────────────── */
.winners-hero { position: relative; overflow: hidden; border-radius: 18px; background: linear-gradient(135deg, rgba(15, 23, 42, .97), rgba(30, 41, 59, .95)); border: 1px solid rgba(148, 163, 184, .24); box-shadow: 0 24px 60px rgba(15, 23, 42, .16); }
.winners-hero::after { content: ""; position: absolute; inset-inline-end: -12%; inset-block-start: -35%; width: 420px; height: 420px; background: radial-gradient(circle, rgba(16, 185, 129, .18), transparent 62%); pointer-events: none; }
.winners-hero > * { position: relative; z-index: 1; }
.winners-filter input { min-height: 44px; border-radius: 12px; border: 1px solid rgba(203, 213, 225, .9); background: rgba(248, 250, 252, .96); }
.winners-quick-link { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 0 12px; border-radius: 999px; background: rgba(255, 255, 255, .09); color: #e2e8f0; font-size: 12px; font-weight: 800; border: 1px solid rgba(255, 255, 255, .12); transition: all .18s ease; }
.winners-quick-link:hover { background: rgba(255, 255, 255, .16); transform: translateY(-1px); }
.decision-card { border-radius: 14px; background: #fff; border: 1px solid #e2e8f0; box-shadow: 0 14px 34px rgba(15, 23, 42, .07); padding: 18px; }
.decision-card strong { display: block; font-size: 26px; line-height: 1; color: #0f172a; margin-top: 8px; }
.decision-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 900; }
@media (max-width: 768px) { .winners-hero { border-radius: 12px; } .winners-filter, .winners-filter > *, .winners-filter input, .winners-filter button { width: 100%; } }

/* ─── DASHBOARD (INDEX) ──────────────────────────────────────────── */
.dash-kpi { position: relative; overflow: hidden; border-radius: 14px; padding: 1.5rem; border: 1px solid rgba(203,213,225,0.7); background: #fff; box-shadow: 0 4px 20px rgba(15,23,42,0.06); transition: transform 0.22s ease, box-shadow 0.22s ease; }
.dash-kpi:hover { transform: translateY(-3px); box-shadow: 0 12px 36px rgba(15,23,42,0.11); }
.dash-kpi-accent { position: absolute; top: 0; left: 0; right: 0; height: 4px; border-radius: 14px 14px 0 0; }
.dash-kpi-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.dash-kpi-val { font-size: 2.1rem; font-weight: 900; line-height: 1.1; letter-spacing: -0.5px; }
.dash-kpi-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #7c8aa0; margin-bottom: 0.75rem; }
.dash-chart-card { border-radius: 14px; overflow: hidden; border: 1px solid rgba(203,213,225,0.7); box-shadow: 0 4px 20px rgba(15,23,42,0.07); }
.dash-chart-header { padding: 1.25rem 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.dash-leaderboard-card { border-radius: 14px; overflow: hidden; border: 1px solid rgba(203,213,225,0.7); background: #fff; box-shadow: 0 4px 20px rgba(15,23,42,0.06); }
.dash-leaderboard-header { padding: 1.25rem 1.5rem; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(203,213,225,0.6); }
.dash-rank-item { display: flex; align-items: center; gap: 0.9rem; padding: 0.9rem 1.25rem; border-bottom: 1px solid rgba(226,232,240,0.6); transition: background 0.15s; }
.dash-rank-item:last-child { border-bottom: none; }
.dash-rank-item:hover { background: #f8fafc; }
.dash-medal { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.05rem; font-weight: 900; flex-shrink: 0; }
.medal-1 { background: linear-gradient(135deg,#fef3c7,#fde68a); color: #92400e; box-shadow: 0 3px 10px rgba(234,179,8,0.3); }
.medal-2 { background: linear-gradient(135deg,#f1f5f9,#e2e8f0); color: #475569; box-shadow: 0 3px 10px rgba(148,163,184,0.3); }
.medal-3 { background: linear-gradient(135deg,#fef2e6,#fed7aa); color: #9a3412; box-shadow: 0 3px 10px rgba(234,88,12,0.2); }
.medal-n { background: #f1f5f9; color: #64748b; }
.dash-progress { height: 5px; border-radius: 999px; background: #e9eef5; overflow: hidden; margin-top: 0.35rem; }
.dash-progress-fill { height: 100%; border-radius: 999px; }
.dash-alert-item { display: flex; align-items: flex-start; gap: 0.85rem; padding: 0.9rem 1rem; border-radius: 10px; border: 1px solid; transition: box-shadow 0.2s, transform 0.2s; text-decoration: none; }
.dash-alert-item:hover { box-shadow: 0 6px 20px rgba(15,23,42,0.08); transform: translateY(-1px); }

/* ─── PRINT SUMMARY & REPORT ─────────────────────────────────────── */
body.report-body { font-family: 'Cairo', sans-serif; background: linear-gradient(rgba(15,23,42,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(15,23,42,0.025) 1px, transparent 1px), linear-gradient(180deg, #f8fafc 0%, #edf2f7 100%); background-size: 28px 28px, 28px 28px, 100% 100%; color: #1e293b; margin:0; }
.ops-hero { background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 48%, #0e7490 100%); color: #fff; border-radius: 1.25rem; overflow: hidden; position: relative; }
.ops-hero::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px); background-size: 28px 28px; opacity: 0.6; }
.ops-hero > * { position: relative; z-index: 1; }
.ops-metric { background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.16); border-radius: 0.9rem; padding: 1rem; }
.decision-pill { border-radius: 999px; padding: 0.35rem 0.75rem; font-size: 0.75rem; font-weight: 900; display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
.mobile-product-card { display: none; }

@media (max-width: 768px) {
    .print-summary-body .container { padding: 0.75rem !important; }
    .print-summary-body .card-premium { border-radius: 0.9rem; }
    .print-summary-body .table-premium th, .print-summary-body .table-premium td { padding: 0.85rem; font-size: 0.82rem; }
    .print-summary-body .desktop-products-table { display: none; }
    .mobile-product-card { display: block; }
    .ops-hero { border-radius: 0.9rem; }
    .ops-metric { padding: 0.85rem; }
}

@media print {
    .no-print { display: none !important; }
    .summary-page { page-break-after: always; }
    .page-break { page-break-before: always; }
    .mobile-product-card { display: none !important; }
    .desktop-products-table { display: block !important; }
    body { background-color: white !important; -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
    .card-premium { box-shadow: none !important; border: 1px solid #e2e8f0 !important; border-radius: 0.5rem !important; margin-bottom: 2rem !important; }
    .table-premium th { background-color: #f8fafc !important; }
}

/* SIDHOM OS Enterprise Design System
   Tokens + app shell + dense ERP controls. Keep this block last because the
   legacy app still ships some inline styles during the SPA migration. */
:root {
    --sidhom-primary: #0d9488;
    --sidhom-primary-hover: #0f766e;
    --sidhom-primary-soft: #f0fdfa;
    --sidhom-primary-row: #f0fdf4;
    --sidhom-text-heading: #0f172a;
    --sidhom-text: #334155;
    --sidhom-text-muted: #64748b;
    --sidhom-bg: #f8fafc;
    --sidhom-surface: #ffffff;
    --sidhom-border: #e2e8f0;
    --sidhom-border-strong: #cbd5e1;
    --sidhom-danger: #b91c1c;
    --sidhom-radius: 8px;
    --sidhom-topbar-h: 64px;
    --sidhom-sidebar-w: 280px;
    --sidhom-shadow: 0 10px 28px rgba(15, 23, 42, .06);
    --sidhom-shadow-menu: 0 18px 42px rgba(15, 23, 42, .16);
}

html,
body {
    background: var(--sidhom-bg) !important;
    color: var(--sidhom-text) !important;
    font-family: Cairo, sans-serif !important;
    letter-spacing: 0 !important;
}

#sidhom-app {
    min-height: 100vh;
    background: var(--sidhom-bg);
}

.os-shell {
    position: relative;
    display: grid !important;
    grid-template-columns: var(--sidhom-sidebar-w) minmax(0, 1fr) !important;
    min-height: 100vh;
    background: var(--sidhom-bg);
}

.os-shell.is-super-admin::before {
    content: "";
    position: fixed;
    z-index: 120;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, #0d9488, #2563eb, #f59e0b);
}

.os-sidebar {
    position: sticky !important;
    top: 0;
    height: 100vh;
    min-width: 0;
    padding: 16px !important;
    background: var(--sidhom-surface) !important;
    border-left: 1px solid var(--sidhom-border) !important;
    box-shadow: -8px 0 24px rgba(15, 23, 42, .03);
}

.os-brand {
    min-height: 54px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--sidhom-border);
}

.os-logo {
    border-radius: var(--sidhom-radius) !important;
    background: var(--sidhom-primary) !important;
    box-shadow: 0 12px 22px rgba(13, 148, 136, .2) !important;
}

.os-brand strong,
.os-topbar strong,
.view-head h1,
.os-panel h1,
.os-panel h2 {
    color: var(--sidhom-text-heading) !important;
    font-weight: 900 !important;
}

.os-brand span,
.os-topbar span,
.view-head p,
.os-panel p {
    color: var(--sidhom-text-muted) !important;
}

.os-nav {
    gap: 10px !important;
    padding: 4px 0 8px 2px !important;
}

.os-nav-group > span {
    color: #94a3b8 !important;
    letter-spacing: 0 !important;
}

.os-nav a,
.os-logout {
    border-radius: var(--sidhom-radius) !important;
    color: var(--sidhom-text) !important;
    min-height: 42px !important;
    transition: background .16s ease, color .16s ease, border-color .16s ease;
}

.os-nav a:hover {
    background: var(--sidhom-primary-soft) !important;
    color: var(--sidhom-primary-hover) !important;
}

.os-nav a.active {
    background: var(--sidhom-primary-soft) !important;
    color: var(--sidhom-primary-hover) !important;
    box-shadow: inset -3px 0 0 var(--sidhom-primary);
}

.os-logout {
    background: #fef2f2 !important;
    color: var(--sidhom-danger) !important;
    margin-top: auto !important;
}

.os-sidebar-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    margin-top: 8px;
    color: var(--sidhom-text-muted);
    font-size: .72rem;
    font-weight: 800;
    text-align: center;
}

.os-sidebar-footer b {
    display: none;
    color: var(--sidhom-primary-hover);
}

.os-shell[data-sidebar-state="collapsed"] {
    --sidhom-sidebar-w: 84px;
}

.os-shell[data-sidebar-state="collapsed"] .os-nav a b,
.os-shell[data-sidebar-state="collapsed"] .os-brand span,
.os-shell[data-sidebar-state="collapsed"] .os-brand strong,
.os-shell[data-sidebar-state="collapsed"] .os-logout b,
.os-shell[data-sidebar-state="collapsed"] .os-sidebar-footer span {
    display: none;
}

.os-shell[data-sidebar-state="collapsed"] .os-sidebar-footer b {
    display: inline;
}

.os-mobile-navbar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 58px;
    z-index: 400;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    background: rgba(255, 255, 255, .97);
    border-bottom: 1px solid var(--sidhom-border);
    box-shadow: 0 2px 12px rgba(15, 23, 42, .09);
    backdrop-filter: blur(10px);
}

.os-mobile-navbar-brand {
    display: flex;
    align-items: center;
    gap: 9px;
}

.os-mobile-navbar .os-logo {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    font-size: 1rem;
}

.os-mobile-navbar-brand strong {
    color: var(--sidhom-text-heading);
    font-size: .9rem;
    font-weight: 900;
}

.os-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    cursor: pointer;
    border: 1px solid var(--sidhom-border);
    border-radius: var(--sidhom-radius);
    background: #f8fafc;
    color: var(--sidhom-text);
    font-size: .95rem;
    transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.os-hamburger:hover {
    background: #f1f5f9;
    border-color: var(--sidhom-border-strong);
}

.os-hamburger.active {
    background: var(--sidhom-primary-soft);
    border-color: #99f6e4;
    color: var(--sidhom-primary-hover);
}

.os-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 450;
    background: rgba(15, 23, 42, .52);
    opacity: 0;
    transition: opacity .25s ease;
}

.os-mobile-overlay.open {
    display: block;
    opacity: 1;
}

.os-main {
    min-width: 0;
    background: var(--sidhom-bg);
}

.os-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--sidhom-topbar-h) !important;
    padding: 0 22px !important;
    background: rgba(255, 255, 255, .94) !important;
    border-bottom: 1px solid var(--sidhom-border) !important;
    backdrop-filter: blur(10px);
}

.is-super-admin .os-topbar {
    top: 4px;
}

.os-tenant,
.os-user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    max-width: min(38vw, 360px);
    border: 1px solid var(--sidhom-border) !important;
    border-radius: 999px !important;
    background: var(--sidhom-surface) !important;
    color: var(--sidhom-text) !important;
    padding: 0 12px !important;
    font-weight: 900;
    white-space: nowrap;
}

.os-tenant i,
.os-user i {
    color: var(--sidhom-primary);
}

.os-tenant span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.os-tenant small {
    color: var(--sidhom-text-muted);
    font-size: .68rem;
    font-weight: 900;
}

.os-content {
    padding: 24px !important;
    overflow: visible !important;
}

.os-card,
.os-panel,
.analytics-card,
.analytics-panel,
.performance-card,
.settings-page .os-panel {
    border: 1px solid var(--sidhom-border) !important;
    border-radius: var(--sidhom-radius) !important;
    background: var(--sidhom-surface) !important;
    box-shadow: var(--sidhom-shadow) !important;
}

.ghost,
.search-form button,
.btn-secondary {
    border-radius: var(--sidhom-radius) !important;
    border-color: var(--sidhom-border-strong) !important;
    color: var(--sidhom-text) !important;
    background: var(--sidhom-surface) !important;
}

.ghost:hover,
.search-form button:hover,
.btn-secondary:hover {
    border-color: var(--sidhom-primary) !important;
    color: var(--sidhom-primary-hover) !important;
    background: var(--sidhom-primary-soft) !important;
}

.btn-primary,
.settings-page .primary,
.lux-submit {
    background: var(--sidhom-primary) !important;
    border-color: var(--sidhom-primary) !important;
    color: #fff !important;
    border-radius: var(--sidhom-radius) !important;
    box-shadow: 0 12px 24px rgba(13, 148, 136, .18) !important;
}

.btn-primary:hover,
.settings-page .primary:hover,
.lux-submit:hover {
    background: var(--sidhom-primary-hover) !important;
}

input,
select,
textarea,
.input-premium {
    border-radius: var(--sidhom-radius) !important;
    border-color: var(--sidhom-border-strong) !important;
    color: var(--sidhom-text-heading) !important;
    background: #fff !important;
    font-family: Cairo, sans-serif !important;
    autocomplete: off;
}

input:focus,
select:focus,
textarea:focus,
.input-premium:focus {
    border-color: var(--sidhom-primary) !important;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, .14) !important;
    outline: none !important;
}

.field-error,
.validation-message,
[data-validation-message] {
    display: block;
    margin-top: 4px;
    color: var(--sidhom-danger);
    font-size: .72rem;
    font-weight: 800;
    line-height: 1.45;
}

.os-table-wrap,
.analytics-table {
    width: 100%;
    max-width: 100%;
    overflow: auto !important;
    border: 1px solid var(--sidhom-border) !important;
    border-radius: var(--sidhom-radius) !important;
    background: var(--sidhom-surface) !important;
    box-shadow: var(--sidhom-shadow) !important;
}

.os-table,
.analytics-table table,
.table-premium {
    width: 100%;
    min-width: 980px;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.os-table th,
.os-table td,
.analytics-table th,
.analytics-table td,
.table-premium th,
.table-premium td {
    text-align: start !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    color: var(--sidhom-text) !important;
    border-bottom: 1px solid #edf2f7 !important;
}

.os-table th,
.analytics-table th,
.table-premium th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc !important;
    color: var(--sidhom-text) !important;
    font-size: .76rem !important;
    font-weight: 900 !important;
}

.os-table tbody tr:hover td,
.analytics-table tbody tr:hover td,
.table-premium tbody tr:hover td {
    background: var(--sidhom-primary-row) !important;
}

.table-actions {
    position: relative;
    display: inline-flex;
    justify-content: flex-end;
}

.table-action-trigger {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--sidhom-border);
    border-radius: var(--sidhom-radius);
    background: #fff;
    color: var(--sidhom-text-muted);
    cursor: pointer;
}

.table-action-menu {
    position: absolute;
    top: calc(100% + 6px);
    inset-inline-end: 0;
    z-index: 30;
    display: none;
    min-width: 170px;
    padding: 6px;
    border: 1px solid var(--sidhom-border);
    border-radius: var(--sidhom-radius);
    background: #fff;
    box-shadow: var(--sidhom-shadow-menu);
}

.table-actions:hover .table-action-menu,
.table-actions:focus-within .table-action-menu,
.table-action-menu.is-open {
    display: grid;
    gap: 3px;
}

.table-action-menu button,
.table-action-menu a {
    min-height: 34px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--sidhom-text);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    font-family: Cairo, sans-serif;
    font-size: .82rem;
    font-weight: 800;
    cursor: pointer;
    text-align: start;
}

.table-action-menu button:hover,
.table-action-menu a:hover {
    background: var(--sidhom-primary-soft);
    color: var(--sidhom-primary-hover);
}

.status,
.badge,
[data-co-badge],
.status-badge {
    border-radius: 999px !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
}

.status-delivered,
.badge-delivered,
[data-status="DELIVERED"],
[data-status="COMPLETED"] {
    background: #f0fdf4 !important;
    color: #15803d !important;
}

.status-pending,
.badge-pending,
[data-status="PENDING"],
[data-status="STUCK"],
[data-status="HOLD"],
[data-status="pending_stock"] {
    background: #fff7ed !important;
    color: #c2410c !important;
}

.status-rejected,
.badge-rejected,
[data-status="REJECTED"],
[data-status="RETURNED"],
[data-status="CANCELED"],
[data-status="CANCELLED"] {
    background: #fef2f2 !important;
    color: #b91c1c !important;
}

.status-shipped,
.badge-shipped,
[data-status="IN_TRANSIT"],
[data-status="SHIPPED"] {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
}

.form-workspace,
.order-registration-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 18px;
    align-items: start;
}

.form-section,
.order-section,
.order-summary-card {
    background: #fff;
    border: 1px solid var(--sidhom-border);
    border-radius: var(--sidhom-radius);
    box-shadow: var(--sidhom-shadow);
    padding: 16px;
}

.form-section + .form-section {
    margin-top: 14px;
}

.order-summary-card,
.sticky-summary {
    position: sticky;
    top: calc(var(--sidhom-topbar-h) + 18px);
}

.login-lux {
    background: var(--sidhom-bg) !important;
}

.login-lux::after {
    content: "Developed by Mostafa Kamel";
    position: fixed;
    inset-inline: 0;
    bottom: 18px;
    z-index: 4;
    text-align: center;
    color: var(--sidhom-text-muted);
    font-size: .76rem;
    font-weight: 900;
}

.lux-logo,
.lux-card-icon {
    background: var(--sidhom-primary) !important;
}

.lux-headline {
    background: none !important;
    -webkit-text-fill-color: var(--sidhom-text-heading) !important;
    color: var(--sidhom-text-heading) !important;
}

@media (max-width: 980px) {
    .os-shell {
        grid-template-columns: 1fr !important;
    }

    .os-sidebar {
        position: fixed !important;
        z-index: 500;
        inset-block: 0;
        inset-inline-start: auto;
        inset-inline-end: 0;
        width: min(86vw, var(--sidhom-sidebar-w));
        transform: translateX(100%);
        transition: transform .22s ease;
    }

    .os-shell.sidebar-open .os-sidebar,
    .os-shell[data-sidebar-state="open"] .os-sidebar,
    .os-sidebar.mobile-open {
        right: 0 !important;
        transform: translateX(0);
    }

    .os-mobile-navbar {
        display: flex;
        z-index: 700;
        pointer-events: auto;
    }

    .os-mobile-navbar .os-hamburger,
    [data-mobile-hamburger] {
        position: relative;
        z-index: 710;
        pointer-events: auto;
        touch-action: manipulation;
    }

    .os-mobile-overlay.open {
        z-index: 650;
    }

    .os-topbar {
        display: none !important;
    }

    .os-main {
        padding-top: 58px;
    }

    .os-topbar {
        padding-inline: 14px !important;
        gap: 10px !important;
    }

    .os-tenant {
        display: none;
    }

    .os-content {
        padding: 16px !important;
    }

    .form-workspace,
    .order-registration-layout {
        grid-template-columns: 1fr;
    }

    .order-summary-card,
    .sticky-summary {
        position: static;
    }
}

@media (max-width: 560px) {
    .os-table,
    .analytics-table table,
    .table-premium {
        min-width: 760px;
    }

    .os-user {
        max-width: 44vw;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}
