/* =====================================================
   SajidSMM - Base layout styles (uses theme variables)
   Theme files (assets/css/theme.css) define :root colors.
   ===================================================== */

* { box-sizing: border-box; }
body { background: var(--bg); color: var(--text); font-family: 'Segoe UI', system-ui, sans-serif; }

/* ---- App layout ---- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 250px; background: var(--sidebar-bg); color: #e2e8f0; flex-shrink: 0;
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 1000; display: flex; flex-direction: column; }
.sidebar .brand { padding: 1.25rem 1rem; font-size: 1.35rem; font-weight: 800; color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar .brand span { color: var(--accent); }
.sidebar nav { padding: .75rem; flex: 1; overflow-y: auto; }
.sidebar nav a { display: flex; align-items: center; gap: .7rem; color: #cbd5e1; text-decoration: none;
  padding: .65rem .9rem; border-radius: 8px; margin-bottom: 2px; font-size: .95rem; }
.sidebar nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar nav a.active { background: var(--primary); color: #fff; }
.sidebar .nav-label { font-size: .7rem; text-transform: uppercase; letter-spacing: 1px;
  color: #64748b; padding: .8rem .9rem .3rem; }
.main { flex: 1; margin-left: 250px; display: flex; flex-direction: column; min-width: 0; }
.topbar { background: var(--topbar-bg); border-bottom: 1px solid var(--border); padding: .7rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 900; }
.balance-chip { background: var(--primary); color: #fff; padding: .4rem 1rem; border-radius: 50px; font-weight: 700; }
.content { padding: 1.5rem; max-width: 1200px; width: 100%; margin: 0 auto; }

/* ---- Cards / tables ---- */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); }
.card .card-header { background: transparent; border-bottom: 1px solid var(--border); font-weight: 700; }
.stat-card { border-radius: var(--radius); padding: 1.25rem; color: #fff; position: relative; overflow: hidden; }
.stat-card h3 { font-size: 1.8rem; font-weight: 800; margin: 0; }
.stat-card p { margin: 0; opacity: .85; font-size: .9rem; }
.table { color: var(--text); }
.table thead th { border-bottom: 2px solid var(--border); font-size: .8rem; text-transform: uppercase;
  letter-spacing: .5px; color: var(--text-muted); }
.table td, .table th { border-color: var(--border); vertical-align: middle; }

/* ---- Forms ---- */
.form-control, .form-select { background: var(--input-bg); border: 1px solid var(--border);
  color: var(--text); border-radius: 8px; }
.form-control:focus, .form-select:focus { border-color: var(--primary);
  box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--primary) 20%, transparent); }
.form-label { font-weight: 600; font-size: .9rem; }

/* ---- Buttons ---- */
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { filter: brightness(.92); color: #fff; }

/* ---- Misc ---- */
.page-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 1.25rem; }
.badge-status-pending { background: #fef3c7; color: #92400e; }
.badge-status-processing, .badge-status-in_progress { background: #dbeafe; color: #1e40af; }
.badge-status-completed { background: #dcfce7; color: #166534; }
.badge-status-partial { background: #ffedd5; color: #9a3412; }
.badge-status-canceled, .badge-status-failed { background: #fee2e2; color: #991b1b; }
.badge-status-open { background: #fef3c7; color: #92400e; }
.badge-status-answered { background: #dbeafe; color: #1e40af; }
.badge-status-closed { background: #e2e8f0; color: #475569; }
.badge-status-approved, .badge-status-active { background: #dcfce7; color: #166534; }
.badge-status-rejected, .badge-status-banned { background: #fee2e2; color: #991b1b; }

/* ---- Guest pages ---- */
.guest-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem;
  background: linear-gradient(135deg, var(--primary), var(--accent)); }
.guest-card { background: var(--bg-card); border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.25);
  padding: 2.5rem; width: 100%; max-width: 440px; }

/* ---- Landing ---- */
.hero { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff;
  padding: 5rem 1rem; text-align: center; }
.hero h1 { font-size: 3rem; font-weight: 800; }
.feature-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.75rem; box-shadow: var(--shadow); height: 100%; }
.feature-box .icon { font-size: 2.2rem; margin-bottom: .75rem; }

/* ---- Mobile ---- */
.menu-toggle { display: none; }
@media (max-width: 992px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s; }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .menu-toggle { display: inline-block; }
}
pre.api-box { background: #0f172a; color: #e2e8f0; padding: 1rem; border-radius: 8px; font-size: .85rem; }
.ticket-msg { border: 1px solid var(--border); border-radius: 10px; padding: .9rem 1.1rem; margin-bottom: .8rem;
  background: var(--bg-card); }
.ticket-msg.admin { background: color-mix(in srgb, var(--primary) 8%, var(--bg-card)); border-color: var(--primary); }
