/* ============================================================
   122.ro — Design System 2025
   Gradient modern, dark-first, glassmorphism accents
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* ── Variables ─────────────────────────────────────────── */
:root {
  /* Brand gradients */
  --grad-primary:   linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
  --grad-accent:    linear-gradient(135deg, #6c63ff 0%, #a855f7 50%, #ec4899 100%);
  --grad-card:      linear-gradient(145deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.02) 100%);
  --grad-sidebar:   linear-gradient(180deg, #0d0b1e 0%, #1a1535 100%);
  --grad-success:   linear-gradient(135deg, #10b981, #059669);
  --grad-warning:   linear-gradient(135deg, #f59e0b, #d97706);
  --grad-danger:    linear-gradient(135deg, #ef4444, #dc2626);
  --grad-info:      linear-gradient(135deg, #6c63ff, #8b5cf6);

  /* Colors */
  --color-bg:         #0a0818;
  --color-surface:    #120f2a;
  --color-surface-2:  #1c1840;
  --color-surface-3:  #252044;
  --color-border:     rgba(255,255,255,0.08);
  --color-border-2:   rgba(255,255,255,0.14);
  --color-text:       #f0eeff;
  --color-text-2:     #b8b0d4;
  --color-text-3:     #7b72a8;
  --color-accent:     #8b5cf6;
  --color-accent-2:   #6c63ff;
  --color-pink:       #ec4899;
  --color-success:    #10b981;
  --color-warning:    #f59e0b;
  --color-danger:     #ef4444;
  --color-info:       #6c63ff;

  /* Glow effects */
  --glow-accent:  0 0 40px rgba(139,92,246,0.3), 0 0 80px rgba(139,92,246,0.1);
  --glow-success: 0 0 20px rgba(16,185,129,0.3);
  --glow-danger:  0 0 20px rgba(239,68,68,0.3);

  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  /* Spacing */
  --sidebar-w:    260px;
  --topbar-h:     64px;
  --radius-sm:    8px;
  --radius-md:    12px;
  --radius-lg:    20px;
  --radius-xl:    28px;

  /* Transitions */
  --ease:         cubic-bezier(0.16, 1, 0.3, 1);
  --transition:   0.25s var(--ease);
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--color-accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-pink); }

/* ── Login Page ─────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--grad-primary);
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(139,92,246,0.2) 0%, transparent 70%);
  top: -200px; left: -200px;
  animation: float1 8s ease-in-out infinite;
}

.login-page::after {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(236,72,153,0.15) 0%, transparent 70%);
  bottom: -150px; right: -150px;
  animation: float2 10s ease-in-out infinite;
}

@keyframes float1 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(30px,20px)} }
@keyframes float2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-20px,30px)} }

.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  animation: pulse 4s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:0.6} 50%{opacity:1} }

.login-card {
  position: relative;
  z-index: 10;
  width: min(460px, calc(100vw - 2rem));
  padding: 3rem;
  background: rgba(18,15,42,0.7);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xl);
  box-shadow: 0 32px 80px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.1);
}

.login-logo {
  text-align: center;
  margin-bottom: 2.5rem;
}

.login-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  background: var(--grad-accent);
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  color: #fff;
  box-shadow: var(--glow-accent);
  margin-bottom: 1rem;
  letter-spacing: -1px;
}

.login-logo-text {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-text-3);
}

.login-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-text);
  text-align: center;
  margin-bottom: 0.4rem;
  line-height: 1.2;
}

.login-subtitle {
  text-align: center;
  color: var(--color-text-3);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

/* ── Form Elements ──────────────────────────────────────── */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-3);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--color-border-2);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all var(--transition);
  outline: none;
  -webkit-appearance: none;
}

.form-control:focus {
  border-color: var(--color-accent);
  background: rgba(139,92,246,0.08);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.2);
}

.form-control::placeholder { color: var(--color-text-3); }

.form-control.is-invalid {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.15);
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-3);
  pointer-events: none;
  font-size: 1rem;
}

.input-wrapper .form-control { padding-left: 2.6rem; }

.input-toggle {
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-text-3);
  cursor: pointer;
  padding: 0.2rem;
  font-size: 1rem;
  transition: color var(--transition);
}
.input-toggle:hover { color: var(--color-accent); }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--grad-accent);
  color: #fff;
  box-shadow: 0 4px 20px rgba(139,92,246,0.4);
  width: 100%;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(139,92,246,0.5);
  color: #fff;
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-secondary {
  background: var(--color-surface-2);
  color: var(--color-text-2);
  border: 1px solid var(--color-border-2);
}
.btn-secondary:hover {
  background: var(--color-surface-3);
  color: var(--color-text);
  border-color: var(--color-accent);
}

.btn-success { background: var(--grad-success); color: #fff; }
.btn-danger  { background: var(--grad-danger);  color: #fff; }
.btn-warning { background: var(--grad-warning); color: #fff; }
.btn-sm      { padding: 0.5rem 1rem; font-size: 0.85rem; }
.btn-lg      { padding: 1rem 2rem; font-size: 1.05rem; }
.btn-icon    { width: 36px; height: 36px; padding: 0; border-radius: var(--radius-sm); }

/* ── Alert / Messages ───────────────────────────────────── */
.alert {
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}
.alert-error   { background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }
.alert-success { background: rgba(16,185,129,0.15); border: 1px solid rgba(16,185,129,0.3); color: #6ee7b7; }
.alert-warning { background: rgba(245,158,11,0.15); border: 1px solid rgba(245,158,11,0.3); color: #fcd34d; }
.alert-info    { background: rgba(139,92,246,0.15); border: 1px solid rgba(139,92,246,0.3); color: #c4b5fd; }

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

/* ── Sidebar ────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--grad-sidebar);
  border-right: 1px solid var(--color-border);
  display: grid;
  grid-template-rows: auto 1fr auto;
  position: fixed;
  top: 0; left: 0;
  z-index: 100;
  transition: transform var(--transition);
  overflow: hidden;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-logo {
  width: 36px; height: 36px;
  background: var(--grad-accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
}

.sidebar-tagline {
  font-size: 0.7rem;
  color: var(--color-text-3);
}

/* ── Nav ────────────────────────────────────────────────── */
.sidebar-nav {
  padding: 1.25rem 0.75rem;
  overflow-y: auto;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--color-surface-3) transparent;
}

.nav-section {
  margin-bottom: 1.5rem;
}

.nav-section-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-3);
  padding: 0 0.75rem;
  margin-bottom: 0.4rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--color-text-2);
  font-size: 0.9rem;
  font-weight: 400;
  transition: all var(--transition);
  position: relative;
  cursor: pointer;
  text-decoration: none;
}

.nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: var(--color-text);
}

.nav-item.active {
  background: rgba(139,92,246,0.15);
  color: var(--color-text);
  font-weight: 500;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--grad-accent);
  border-radius: 0 3px 3px 0;
}

.nav-icon {
  font-size: 1.05rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.nav-badge {
  margin-left: auto;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 20px;
  min-width: 18px;
  text-align: center;
}

.nav-badge.urgent { background: var(--color-danger); animation: badgePulse 2s infinite; }
@keyframes badgePulse { 0%,100%{box-shadow:0 0 0 0 rgba(239,68,68,0.4)} 50%{box-shadow:0 0 0 4px rgba(239,68,68,0)} }

/* ── Sidebar Footer ─────────────────────────────────────── */
.sidebar-footer {
  padding: 1rem 0.75rem;
  border-top: 1px solid var(--color-border);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}
.user-card:hover { background: rgba(255,255,255,0.05); }

.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--grad-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  color: #fff;
  flex-shrink: 0;
}

.user-name  { font-size: 0.88rem; font-weight: 500; color: var(--color-text); }
.user-role  { font-size: 0.72rem; color: var(--color-text-3); }

/* ── Main Content Area ──────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Top Bar ────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: rgba(10,8,24,0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  padding: 0 1.75rem;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  flex: 1;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.notif-btn {
  position: relative;
  width: 38px; height: 38px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-2);
  border-radius: var(--radius-sm);
  color: var(--color-text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 1rem;
}
.notif-btn:hover { border-color: var(--color-accent); color: var(--color-accent); }

.notif-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--color-danger);
  border-radius: 50%;
  border: 2px solid var(--color-bg);
}

/* ── Page Content ───────────────────────────────────────── */
.page-body {
  padding: 2rem 1.75rem;
  flex: 1;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-header-title h1 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
}

.page-header-title p {
  color: var(--color-text-3);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* ── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--grad-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
  overflow: hidden;
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-body { padding: 1.5rem; }

/* ── Stat Cards (dashboard) ─────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--grad-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition);
}
.stat-card:hover { transform: translateY(-3px); border-color: var(--color-border-2); }

.stat-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 120px; height: 120px;
  border-radius: 50%;
  opacity: 0.08;
}
.stat-card.purple::before { background: var(--color-accent); }
.stat-card.pink::before   { background: var(--color-pink); }
.stat-card.green::before  { background: var(--color-success); }
.stat-card.orange::before { background: var(--color-warning); }

.stat-icon {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1;
  margin-bottom: 0.35rem;
}
.stat-label {
  font-size: 0.82rem;
  color: var(--color-text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.stat-trend {
  font-size: 0.78rem;
  color: var(--color-success);
  margin-top: 0.5rem;
}

/* ── Dashboard Grid ─────────────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.25rem;
}

@media (max-width: 1200px) { .dashboard-grid { grid-template-columns: 1fr; } }

/* ── Table ──────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-3);
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--color-text-2);
  vertical-align: middle;
}

.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(255,255,255,0.03); }
.table td strong { color: var(--color-text); font-weight: 500; }

/* ── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.badge-gray    { background: rgba(255,255,255,0.08);  color: var(--color-text-3); }
.badge-blue    { background: rgba(108,99,255,0.2);    color: #a5b4fc; }
.badge-green   { background: rgba(16,185,129,0.2);    color: #6ee7b7; }
.badge-red     { background: rgba(239,68,68,0.2);     color: #fca5a5; }
.badge-orange  { background: rgba(245,158,11,0.2);    color: #fcd34d; }
.badge-success { background: rgba(16,185,129,0.25);   color: #34d399; border: 1px solid rgba(16,185,129,0.3); }
.badge-purple  { background: rgba(139,92,246,0.2);    color: #c4b5fd; }

/* ── Sticky Notes ───────────────────────────────────────── */
.sticky-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.sticky-note {
  border-radius: var(--radius-md);
  padding: 1.25rem;
  position: relative;
  transition: transform var(--transition);
}
.sticky-note:hover { transform: translateY(-3px) rotate(0.5deg); }

.sticky-note.galben   { background: rgba(252,211,77,0.12); border: 1px solid rgba(252,211,77,0.25); }
.sticky-note.verde    { background: rgba(52,211,153,0.12); border: 1px solid rgba(52,211,153,0.25); }
.sticky-note.albastru { background: rgba(96,165,250,0.12); border: 1px solid rgba(96,165,250,0.25); }
.sticky-note.rosu     { background: rgba(248,113,113,0.12); border: 1px solid rgba(248,113,113,0.25); }
.sticky-note.portocaliu { background: rgba(251,146,60,0.12); border: 1px solid rgba(251,146,60,0.25); }

.sticky-subject { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.5rem; color: var(--color-text); }
.sticky-body    { font-size: 0.85rem; color: var(--color-text-2); line-height: 1.5; }
.sticky-meta    { font-size: 0.72rem; color: var(--color-text-3); margin-top: 0.75rem; }

/* ── Progress Bar ───────────────────────────────────────── */
.progress {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: var(--grad-accent);
  border-radius: 10px;
  transition: width 0.5s var(--ease);
}

/* ── Filter Bar ─────────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.filter-bar .form-control {
  width: auto;
  min-width: 180px;
  padding: 0.6rem 0.9rem;
  font-size: 0.875rem;
}

/* ── Select ─────────────────────────────────────────────── */
select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237b72a8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

select.form-control option { background: var(--color-surface-2); }

/* ── Textarea ───────────────────────────────────────────── */
textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* ── Pagination ─────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--color-border);
  flex-wrap: wrap;
}

.page-btn {
  padding: 0.4rem 0.8rem;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-2);
  border-radius: var(--radius-sm);
  color: var(--color-text-2);
  font-size: 0.82rem;
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
}
.page-btn:hover, .page-btn.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}
.page-info {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--color-text-3);
}

/* ── Empty State ────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}
.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.4; }
.empty-state h3   { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 0.5rem; }
.empty-state p    { color: var(--color-text-3); font-size: 0.9rem; }

/* ── Spinner ────────────────────────────────────────────── */
.spinner {
  width: 24px; height: 24px;
  border: 2px solid rgba(139,92,246,0.2);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast notifications ────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
}

.toast {
  padding: 0.9rem 1.25rem;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-2);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: 0.875rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  pointer-events: all;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 280px;
  animation: toastIn 0.3s var(--ease) forwards;
  backdrop-filter: blur(12px);
}

.toast.removing { animation: toastOut 0.3s var(--ease) forwards; }
.toast.success  { border-left: 3px solid var(--color-success); }
.toast.error    { border-left: 3px solid var(--color-danger); }
.toast.info     { border-left: 3px solid var(--color-accent); }

@keyframes toastIn  { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(20px); } }

/* ── Rating Stars ───────────────────────────────────────── */
.star-rating { display: flex; gap: 0.2rem; }
.star { color: var(--color-text-3); cursor: pointer; font-size: 1.2rem; transition: color 0.15s; }
.star.active, .star:hover, .star:hover ~ .star { color: var(--color-warning); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }

  .app-layout { display: block; }

  .sidebar {
    transform: translateX(-260px);
    width: 260px;
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 30px rgba(0,0,0,0.5);
  }
  .main-content {
    margin-left: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }
  .page-body { padding: 1.25rem; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .topbar { position: sticky; top: 0; z-index: 50; }
  #menuToggle { display: flex !important; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .page-header > div:last-child { width: 100%; }
  .page-header > div:last-child .btn { flex: 1; justify-content: center; }
  .table-wrapper { font-size: 0.82rem; }
  .table th, .table td { padding: 0.6rem 0.75rem; }
}

/* ── Modal mobil ────────────────────────────────────────── */
@media (max-width: 520px) {
  #modalApel > div {
    margin: 0 !important;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    max-width: 100% !important;
    max-height: 90vh;
    overflow-y: auto;
  }
  #modalApel {
    align-items: flex-end !important;
  }
}

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--color-surface-3); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-text-3); }

/* ── Print ──────────────────────────────────────────────── */
@media print {
  .sidebar, .topbar { display: none; }
  .main-content { margin-left: 0; }
  body { background: #fff; color: #000; }
}
