/* assets/css/app.css — Maracade v3 shared UI
   Design tokens: indigo/violet accent (#6366f1 → #8b5cf6), warm-neutral surfaces,
   Plus Jakarta Sans for UI text so the dashboard doesn't read as default Bootstrap. */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --radius-lg: 16px;
  --radius-md: 10px;
}

[data-bs-theme="dark"] {
  --surface: #131a2b;
  --surface-2: #1b2438;
  --sidebar-bg: #0c1120;
  --border-soft: #232c43;
  --text-muted-2: #93a0bd;
  color-scheme: dark;
}
[data-bs-theme="light"] {
  --surface: #ffffff;
  --surface-2: #f6f7fb;
  --sidebar-bg: #14152b;
  --border-soft: #e6e8f0;
  --text-muted-2: #6b7290;
  color-scheme: light;
}

* { font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif; }

body {
  background: var(--surface-2);
}

.auth-bg {
  background:
    radial-gradient(circle at 20% 20%, rgba(99,102,241,.25), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(139,92,246,.2), transparent 40%),
    #0c1120;
}

/* ---------------- App shell ---------------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  color: #cdd3e6;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  overflow-y: auto;
  z-index: 1040;
  transition: transform .25s ease;
}
.sidebar-brand {
  padding: 1.25rem 1.25rem .75rem;
  display: flex; align-items: center; justify-content: space-between;
  color: #fff;
}
.sidebar-nav { padding: .5rem .75rem 2rem; }
.nav-section {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .08em;
  color: #6b7299; margin: 1.1rem .6rem .35rem;
}
.sidebar .nav-link {
  display: flex; align-items: center; gap: .65rem;
  padding: .55rem .65rem; border-radius: var(--radius-md);
  color: #cdd3e6; font-size: .9rem; font-weight: 500;
  margin-bottom: 2px;
}
.sidebar .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar .nav-link.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}
.nav-icon { width: 17px; height: 17px; flex-shrink: 0; }

.app-main { margin-left: 260px; flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 64px; flex-shrink: 0;
  display: flex; align-items: center; gap: 1rem;
  padding: 0 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
  position: sticky; top: 0; z-index: 1020;
}
.topbar-title { font-weight: 700; font-size: 1.1rem; margin: 0; flex: 1; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .4rem; }

.btn-icon { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--border-soft); background: transparent; }
.badge-dot {
  position: absolute; top: 2px; right: 2px;
  background: #ef4444; color: #fff; font-size: .6rem; font-weight: 700;
  border-radius: 50%; min-width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
}
.avatar-circle {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 700; font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
}

.content { padding: 1.5rem; flex: 1; }

/* ---------------- Cards / surfaces ---------------- */
.card { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); }
.stat-card { border-radius: var(--radius-lg); padding: 1.25rem; background: var(--surface); border: 1px solid var(--border-soft); }
.stat-card .stat-value { font-size: 1.6rem; font-weight: 800; }
.stat-card .stat-label { color: var(--text-muted-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.stat-card .stat-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(99,102,241,.12); color: var(--accent);
}

.table { vertical-align: middle; }
.table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted-2); border-bottom-width: 1px; }

.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: none; }
.btn-primary:hover { filter: brightness(1.08); }

/* ---------------- Mobile ---------------- */
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); width: 270px; }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,.4); }
  .app-main { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
