/* =====================================================================
   Admin / Seller / Customer panel theme  (Bootstrap 5 overrides)
   ===================================================================== */
:root {
  --bs-font-sans-serif: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bs-body-bg: #f4f6fb;
  --bs-body-color: #1f2937;
  --bs-primary: #2f4bd7;
  --bs-primary-rgb: 47, 75, 215;
  --bs-link-color: #2f4bd7;
  --bs-border-color: #e6e9f2;
  --bs-border-radius: .75rem;
  --bs-border-radius-sm: .5rem;
  --bs-border-radius-lg: 1rem;
  --side-w: 256px;
  --top-h: 64px;
  --navy: #0b1229;
  --navy2: #131c3f;
  --gold: #e6c27a;
  --gold2: #b8933f;
  --muted: #6b7280;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px -12px rgba(16,24,40,.12);
}
html { font-size: 15px; }
body { background: var(--bs-body-bg); color: var(--bs-body-color); font-family: var(--bs-font-sans-serif); -webkit-font-smoothing: antialiased; }
a { text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-weight: 650; letter-spacing: -.01em; color: #111827; }

/* ---------- App shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--side-w); flex: 0 0 var(--side-w); position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy2) 100%); color: #cdd3e6; display: flex; flex-direction: column;
}
.sidebar::-webkit-scrollbar { width: 6px; } .sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 6px; }
.sb-brand { display: flex; align-items: center; gap: 12px; padding: 20px 20px 16px; color: #fff; font-weight: 650; font-size: 1.02rem; }
.sb-brand:hover { color: #fff; text-decoration: none; }
.sb-brand .mark { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, var(--gold), var(--gold2)); color: #1a1405; box-shadow: 0 8px 20px rgba(230,194,122,.35); flex: 0 0 auto; }
.sb-brand small { display: block; font-weight: 400; font-size: .72rem; color: rgba(205,211,230,.6); letter-spacing: .08em; text-transform: uppercase; }
.sb-section { padding: 14px 20px 6px; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(205,211,230,.45); }
.sb-nav { list-style: none; margin: 0; padding: 0 12px; }
.sb-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #cdd3e6; font-size: .93rem; font-weight: 500; transition: .15s; }
.sb-nav a i { width: 20px; text-align: center; font-size: 1.05rem; opacity: .85; }
.sb-nav a:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.sb-nav a.active { background: linear-gradient(90deg, rgba(230,194,122,.22), rgba(230,194,122,.06)); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
.sb-nav a.active i { color: var(--gold); opacity: 1; }
.sb-nav .badge { margin-left: auto; font-size: .68rem; }
.sb-foot { margin-top: auto; padding: 14px 16px 18px; border-top: 1px solid rgba(255,255,255,.08); }
.sb-user { display: flex; align-items: center; gap: 10px; color: #fff; }
.sb-user .avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.12); font-weight: 600; }
.sb-user small { display: block; color: rgba(205,211,230,.6); font-size: .74rem; }
.sb-foot .btn { border-color: rgba(255,255,255,.18); color: #cdd3e6; }
.sb-foot .btn:hover { background: rgba(255,255,255,.08); color: #fff; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: var(--top-h); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 28px; background: rgba(255,255,255,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--bs-border-color); position: sticky; top: 0; z-index: 1020; }
.topbar .crumb { color: var(--muted); font-size: .85rem; }
.topbar .crumb b { color: #111827; font-weight: 600; }
.topbar .quick .btn { border-radius: 999px; font-weight: 500; }
.content { padding: 26px 28px 40px; }
.content > .container-fluid { padding: 0; }
.burger { display: none; }

/* ---------- Cards ---------- */
.card { border: 1px solid var(--bs-border-color); border-radius: 16px; box-shadow: var(--shadow); }
.card-header { background: #fff; border-bottom: 1px solid var(--bs-border-color); padding: .9rem 1.15rem; font-weight: 600; border-radius: 16px 16px 0 0 !important; }
.card-header.bg-danger, .card-header.bg-success, .card-header.bg-secondary, .card-header.bg-dark { color: #fff; }
.card-footer { background: #fafbfe; border-top: 1px solid var(--bs-border-color); border-radius: 0 0 16px 16px !important; }
.stat-card { transition: transform .15s, box-shadow .15s; }
a.stat-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -12px rgba(16,24,40,.25); text-decoration: none; }
.stat-card .card-body { padding: 1.1rem 1.2rem; }
.stat-card .text-muted.small { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.stat-card .h3, .stat-card .h2 { font-weight: 700; letter-spacing: -.02em; margin-top: .25rem; }
.bg-danger-subtle { background: linear-gradient(135deg, #fff1f2, #ffe4e6) !important; }
.bg-success-subtle { background: linear-gradient(135deg, #ecfdf5, #d1fae5) !important; }
.bg-light { background: #f8f9fc !important; }

/* ---------- Tables ---------- */
.table { --bs-table-hover-bg: #f6f7fb; margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .7rem .9rem; border-bottom-color: var(--bs-border-color); }
.table thead th, .table-light th { background: #f8f9fc !important; color: #6b7280; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; border-bottom: 1px solid var(--bs-border-color) !important; }
.table-sm > :not(caption) > * > * { padding: .5rem .75rem; }
.table tbody tr:last-child td { border-bottom: 0; }
.table td .small, .table td .text-muted { color: var(--muted) !important; }
.table-responsive { border-radius: 0 0 16px 16px; }

/* ---------- Forms ---------- */
.form-control, .form-select { border-radius: 10px; border-color: #dfe3ee; padding: .55rem .8rem; background: #fff; }
.form-control:focus, .form-select:focus { border-color: #a7b4f5; box-shadow: 0 0 0 4px rgba(47,75,215,.12); }
.form-control-lg { border-radius: 12px; }
.form-label { font-weight: 500; font-size: .86rem; color: #374151; margin-bottom: .3rem; }
.form-text { color: var(--muted); font-size: .78rem; }
.input-group .form-select { max-width: 120px; }
.form-check-input:checked { background-color: var(--bs-primary); border-color: var(--bs-primary); }
.form-switch .form-check-input { width: 2.4em; height: 1.3em; }

/* ---------- Buttons ---------- */
.btn { border-radius: 10px; font-weight: 500; padding: .5rem .95rem; }
.btn-sm { border-radius: 8px; padding: .3rem .65rem; }
.btn-primary { background: linear-gradient(135deg, #3b5bdb, #2f4bd7); border: 0; box-shadow: 0 6px 16px -6px rgba(47,75,215,.6); }
.btn-primary:hover { background: linear-gradient(135deg, #2f4bd7, #2540b8); }
.btn-success { background: linear-gradient(135deg, #16a34a, #15803d); border: 0; box-shadow: 0 6px 16px -6px rgba(22,163,74,.6); }
.btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626); border: 0; box-shadow: 0 6px 16px -6px rgba(239,68,68,.6); }
.btn-outline-secondary { border-color: #dfe3ee; color: #374151; background: #fff; }
.btn-outline-secondary:hover { background: #f3f4f8; color: #111827; border-color: #cfd5e3; }
.btn-link { text-decoration: none; }
.btn-group .btn { border-radius: 10px; }
.btn-group > .btn:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.btn-group > .btn:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }

/* ---------- Badges / alerts / misc ---------- */
.badge { border-radius: 999px; font-weight: 600; padding: .35em .7em; letter-spacing: .01em; }
.badge.bg-light { background: #f1f3f9 !important; color: #374151 !important; border: 1px solid #e3e7f1 !important; }
.badge.bg-warning { color: #1f2937 !important; }
.alert { border-radius: 12px; border: 1px solid transparent; box-shadow: var(--shadow); }
.alert-success { background: #ecfdf5; border-color: #bbf7d0; color: #166534; }
.alert-danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.list-group-item { border-color: var(--bs-border-color); padding: .8rem 1.15rem; }
.list-group-flush > .list-group-item:last-child { border-bottom-left-radius: 16px; border-bottom-right-radius: 16px; }
.progress { border-radius: 999px; background: #eef0f6; }
.dropdown-menu { border-radius: 12px; border: 1px solid var(--bs-border-color); box-shadow: 0 12px 32px -8px rgba(16,24,40,.25); padding: .4rem; }
.dropdown-item { border-radius: 8px; padding: .5rem .8rem; }
.pagination .page-link { border-radius: 8px !important; margin: 0 2px; border-color: var(--bs-border-color); }
.page-item.active .page-link { background: var(--bs-primary); border-color: var(--bs-primary); }
code { color: #1d4ed8; background: #eef2ff; padding: .1em .35em; border-radius: 6px; }
.font-monospace { font-family: 'JetBrains Mono', ui-monospace, monospace !important; }
footer.foot { color: var(--muted); font-size: .8rem; text-align: center; padding: 10px 0 24px; }
.page-title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 1.1rem; }

/* Quick add card accent */
.card.border-start.border-primary { border-left: 4px solid var(--bs-primary) !important; }

/* ---------- Auth (login) ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { background: radial-gradient(900px 500px at 80% -10%, #1b2350 0%, transparent 60%), radial-gradient(700px 500px at -10% 110%, #2a1a3f 0%, transparent 55%), linear-gradient(180deg, #070a14, #0d1224); color: #f4f1ea; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art .orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; }
.auth-art .o1 { width: 380px; height: 380px; background: #3b4bd8; top: -120px; right: -100px; }
.auth-art .o2 { width: 320px; height: 320px; background: #b8933f; bottom: -120px; left: -80px; }
.auth-art h2 { font-family: 'Playfair Display', Georgia, serif; font-weight: 600; color: #fff; font-size: 2.4rem; line-height: 1.1; position: relative; }
.auth-art h2 span { background: linear-gradient(90deg, #fff, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-art p { color: rgba(244,241,234,.7); max-width: 420px; position: relative; }
.auth-art .brand { display: flex; align-items: center; gap: 12px; font-weight: 600; color: #fff; position: relative; }
.auth-art .brand .mark { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, var(--gold), var(--gold2)); color: #1a1405; }
.auth-art .pills { display: flex; flex-wrap: wrap; gap: 8px; position: relative; }
.auth-art .pills span { border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 6px 12px; font-size: .8rem; color: rgba(244,241,234,.8); }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: #fff; }
.auth-form .box { width: 100%; max-width: 400px; }
.auth-form h1 { font-size: 1.6rem; }
.auth-form .form-control { padding: .7rem .9rem; border-radius: 12px; }
.auth-form .btn { padding: .7rem; border-radius: 12px; font-weight: 600; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-art { display: none; } }

/* ---------- Print layout untouched ---------- */

/* ---------- Responsive shell ---------- */
@media (max-width: 992px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 1050; transform: translateX(-100%); transition: transform .25s; box-shadow: 0 0 0 100vw rgba(0,0,0,0); }
  body.sb-open .sidebar { transform: none; box-shadow: 0 0 0 100vw rgba(11,18,41,.45); }
  .burger { display: inline-flex; }
  .topbar { padding: 0 16px; }
  .content { padding: 18px 16px 32px; }
  .topbar .quick .btn span { display: none; }
}
@media (max-width: 576px) {
  html { font-size: 14px; }
  .topbar .crumb { display: none; }
  .content { padding: 14px 12px 28px; }
  .card-header, .card-body { padding: .85rem; }
  .page-title .btn { flex: 1; }
}
body.sb-open #sbBackdrop { display: block !important; }
