/* ============================================================
   BandManager Pro — Design System
   Palette : Orange brûlé / Gris anthracite / Noir profond
   Typo    : Bebas Neue (titres) + DM Sans (corps)
   ============================================================ */

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

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --black:        #0a0a0a;
  --dark:         #111111;
  --dark-2:       #1a1a1a;
  --dark-3:       #222222;
  --grey-900:     #2a2a2a;
  --grey-800:     #333333;
  --grey-700:     #444444;
  --grey-600:     #666666;
  --grey-400:     #888888;
  --grey-200:     #bbbbbb;
  --grey-100:     #dddddd;
  --white:        #f5f3f0;
  --white-pure:   #ffffff;

  --orange:       #e8600a;
  --orange-light: #f07830;
  --orange-dark:  #b84a06;
  --orange-glow:  rgba(232, 96, 10, 0.15);
  --orange-dim:   rgba(232, 96, 10, 0.08);

  --success:      #4caf50;
  --warning:      #ff9800;
  --danger:       #f44336;
  --info:         #2196f3;

  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  --sidebar-w:    260px;
  --topbar-h:     60px;
  --radius:       6px;
  --radius-lg:    12px;
  --shadow:       0 2px 12px rgba(0,0,0,0.5);
  --shadow-lg:    0 8px 32px rgba(0,0,0,0.6);
  --shadow-orange: 0 4px 20px rgba(232, 96, 10, 0.3);

  --transition:   0.2s ease;
}

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

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--dark);
  color: var(--white);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--orange); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--orange-light); }

img { max-width: 100%; display: block; }

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--dark-2); }
::-webkit-scrollbar-thumb { background: var(--grey-700); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--orange); }

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

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--black);
  border-right: 1px solid var(--grey-900);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
  transition: transform var(--transition);
}

.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--grey-900);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo .logo-icon {
  width: 38px; height: 38px;
  background: var(--orange);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: var(--shadow-orange);
}

.sidebar-logo .logo-text {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  color: var(--white);
  line-height: 1;
}

.sidebar-logo .logo-text span { color: var(--orange); }

/* Band selector dans la sidebar */
.band-selector {
  padding: 14px 16px;
  border-bottom: 1px solid var(--grey-900);
}

.band-selector label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--grey-600);
  display: block;
  margin-bottom: 6px;
}

.band-selector select {
  width: 100%;
  background: var(--dark-3);
  border: 1px solid var(--grey-800);
  color: var(--white);
  padding: 8px 10px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color var(--transition);
  appearance: none;
  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='%23e8600a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

.band-selector select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-dim);
}

/* Navigation */
.sidebar-nav { flex: 1; padding: 12px 0; }

.nav-section {
  margin-bottom: 8px;
}

.nav-section-title {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--grey-700);
  padding: 8px 20px 4px;
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: var(--grey-400);
  font-size: 0.875rem;
  font-weight: 400;
  transition: all var(--transition);
  border-left: 3px solid transparent;
  cursor: pointer;
  position: relative;
}

.nav-item:hover {
  color: var(--white);
  background: var(--dark-2);
  border-left-color: var(--grey-700);
}

.nav-item.active {
  color: var(--orange);
  background: var(--orange-dim);
  border-left-color: var(--orange);
  font-weight: 500;
}

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

.nav-item .nav-badge {
  margin-left: auto;
  background: var(--orange);
  color: var(--white-pure);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* Footer sidebar */
.sidebar-footer {
  border-top: 1px solid var(--grey-900);
  padding: 14px 16px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-user .user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--grey-800);
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--grey-700);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  color: var(--grey-400);
  font-weight: 600;
}

.sidebar-user .user-info { flex: 1; min-width: 0; }
.sidebar-user .user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user .user-role {
  font-size: 0.7rem;
  color: var(--grey-600);
}

.sidebar-user .user-logout {
  color: var(--grey-600);
  font-size: 0.85rem;
  cursor: pointer;
  transition: color var(--transition);
  padding: 4px;
}
.sidebar-user .user-logout:hover { color: var(--danger); }

/* ── Topbar ─────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--dark-2);
  border-bottom: 1px solid var(--grey-900);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.topbar-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.05em;
  color: var(--white);
}

.topbar-breadcrumb {
  font-size: 0.8rem;
  color: var(--grey-600);
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar-breadcrumb .sep { color: var(--grey-800); }

/* Band switcher dans la topbar (navbar) */
.band-switcher-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--dark-3);
  border: 1px solid var(--grey-800);
  border-radius: var(--radius);
  padding: 5px 10px 5px 8px;
  cursor: pointer;
  transition: all var(--transition);
}
.band-switcher-topbar:hover { border-color: var(--orange); }

.band-switcher-topbar .band-logo-mini {
  width: 22px; height: 22px;
  border-radius: 4px;
  background: var(--grey-800);
  overflow: hidden;
  flex-shrink: 0;
}

.band-switcher-topbar .band-name-mini {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--white);
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.band-switcher-topbar .chevron {
  color: var(--orange);
  font-size: 0.7rem;
}

/* Dropdown de sélection de groupe */
.band-dropdown {
  position: absolute;
  top: calc(var(--topbar-h) + 4px);
  right: 24px;
  background: var(--dark-2);
  border: 1px solid var(--grey-800);
  border-radius: var(--radius-lg);
  min-width: 240px;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
  display: none;
}

.band-dropdown.open { display: block; animation: dropIn 0.15s ease; }

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.band-dropdown-header {
  padding: 10px 14px 6px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--grey-600);
}

.band-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background var(--transition);
  border-left: 3px solid transparent;
}

.band-dropdown-item:hover { background: var(--dark-3); }
.band-dropdown-item.active {
  border-left-color: var(--orange);
  background: var(--orange-dim);
}

.band-dropdown-item .band-avatar {
  width: 32px; height: 32px;
  border-radius: var(--radius);
  background: var(--grey-800);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--orange);
  flex-shrink: 0;
  overflow: hidden;
}

.band-dropdown-item .band-info .band-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--white);
}
.band-dropdown-item .band-info .band-role {
  font-size: 0.7rem;
  color: var(--grey-600);
}

/* Notif topbar */
.topbar-notif {
  position: relative;
  width: 36px; height: 36px;
  background: var(--dark-3);
  border: 1px solid var(--grey-800);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--grey-400);
  transition: all var(--transition);
  font-size: 1rem;
}
.topbar-notif:hover { border-color: var(--orange); color: var(--orange); }
.topbar-notif .notif-count {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--orange);
  color: var(--white-pure);
  font-size: 0.6rem;
  font-weight: 700;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

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

.page-content {
  padding: 28px 28px;
  flex: 1;
}

/* ── Page Header ────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-header-left .page-title {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.04em;
  color: var(--white);
  line-height: 1;
  margin-bottom: 4px;
}

.page-header-left .page-subtitle {
  font-size: 0.82rem;
  color: var(--grey-600);
}

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--dark-2);
  border: 1px solid var(--grey-900);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition);
}

.card:hover { border-color: var(--grey-800); }

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--grey-900);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: var(--white);
}

.card-body { padding: 20px; }
.card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--grey-900);
  background: rgba(0,0,0,0.2);
}

/* Card stat (dashboard) */
.stat-card {
  background: var(--dark-2);
  border: 1px solid var(--grey-900);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--orange);
  opacity: 0;
  transition: opacity var(--transition);
}

.stat-card:hover { border-color: var(--grey-800); }
.stat-card:hover::before { opacity: 1; }

.stat-card .stat-icon {
  font-size: 1.6rem;
  margin-bottom: 12px;
  display: block;
}

.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  letter-spacing: 0.02em;
  color: var(--white);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-card .stat-label {
  font-size: 0.78rem;
  color: var(--grey-600);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-card .stat-trend {
  position: absolute;
  top: 16px; right: 16px;
  font-size: 0.75rem;
  font-weight: 600;
}

.stat-card .stat-trend.up   { color: var(--success); }
.stat-card .stat-trend.down { color: var(--danger); }

/* ── Boutons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: var(--orange);
  color: var(--white-pure);
}
.btn-primary:hover {
  background: var(--orange-light);
  color: var(--white-pure);
  box-shadow: var(--shadow-orange);
}

.btn-secondary {
  background: var(--dark-3);
  color: var(--grey-200);
  border: 1px solid var(--grey-800);
}
.btn-secondary:hover {
  background: var(--grey-900);
  color: var(--white);
  border-color: var(--grey-700);
}

.btn-outline {
  background: transparent;
  color: var(--orange);
  border: 1px solid var(--orange);
}
.btn-outline:hover {
  background: var(--orange);
  color: var(--white-pure);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
}
.btn-danger:hover { background: var(--danger); color: var(--white-pure); }

.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-lg { padding: 12px 24px; font-size: 0.95rem; }

.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── Formulaires ────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--grey-200);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form-control {
  width: 100%;
  background: var(--dark-3);
  border: 1px solid var(--grey-800);
  color: var(--white);
  padding: 10px 12px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-dim);
}

.form-control::placeholder { color: var(--grey-700); }

textarea.form-control { resize: vertical; min-height: 90px; }

select.form-control {
  cursor: pointer;
  appearance: none;
  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='%23e8600a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--grey-600);
  margin-top: 4px;
}

.form-error {
  font-size: 0.75rem;
  color: var(--danger);
  margin-top: 4px;
}

.form-row {
  display: grid;
  gap: 16px;
}

.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }

/* ── Tables ─────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

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

.table thead tr {
  border-bottom: 2px solid var(--grey-900);
}

.table thead th {
  padding: 10px 14px;
  text-align: left;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--grey-600);
  font-weight: 600;
  white-space: nowrap;
}

.table tbody tr {
  border-bottom: 1px solid var(--grey-900);
  transition: background var(--transition);
}

.table tbody tr:hover { background: var(--dark-3); }

.table tbody td {
  padding: 12px 14px;
  color: var(--grey-200);
  vertical-align: middle;
}

.table tbody td.td-bold {
  color: var(--white);
  font-weight: 500;
}

.table-actions { display: flex; gap: 6px; align-items: center; }

.action-btn {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  border: 1px solid var(--grey-800);
  background: transparent;
  color: var(--grey-400);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.85rem;
  text-decoration: none;
}
.action-btn:hover           { background: var(--dark-3); color: var(--white); border-color: var(--grey-700); }
.action-btn.edit:hover      { border-color: var(--orange); color: var(--orange); }
.action-btn.delete:hover    { border-color: var(--danger); color: var(--danger); }
.action-btn.view:hover      { border-color: var(--info); color: var(--info); }
.action-btn.download:hover  { border-color: var(--success); color: var(--success); }

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge-active    { background: rgba(76,175,80,0.15);  color: #4caf50; }
.badge-pending   { background: rgba(255,152,0,0.15);  color: #ff9800; }
.badge-draft     { background: rgba(100,100,100,0.2); color: var(--grey-400); }
.badge-sent      { background: rgba(33,150,243,0.15); color: #2196f3; }
.badge-paid      { background: rgba(76,175,80,0.15);  color: #4caf50; }
.badge-late      { background: rgba(244,67,54,0.15);  color: #f44336; }
.badge-expired   { background: rgba(244,67,54,0.15);  color: #f44336; }
.badge-cancelled { background: rgba(100,100,100,0.2); color: var(--grey-600); }
.badge-trial     { background: var(--orange-dim);      color: var(--orange); }
.badge-suspended { background: rgba(244,67,54,0.15);  color: #f44336; }

/* ── Alerts / Flash ─────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  border-left: 3px solid;
}

.alert-success { background: rgba(76,175,80,0.1);  border-color: var(--success); color: #81c784; }
.alert-error   { background: rgba(244,67,54,0.1);  border-color: var(--danger);  color: #e57373; }
.alert-warning { background: rgba(255,152,0,0.1);  border-color: var(--warning); color: #ffb74d; }
.alert-info    { background: rgba(33,150,243,0.1); border-color: var(--info);    color: #64b5f6; }

/* ── Notation étoiles ───────────────────────────────────────── */
.star-rating { display: flex; gap: 3px; }
.star {
  font-size: 1rem;
  color: var(--grey-800);
  cursor: pointer;
  transition: color var(--transition);
}
.star.filled, .star:hover, .star:hover ~ .star { color: var(--orange); }
/* Hack CSS inversé pour les étoiles sans JS */
.star-rating:hover .star { color: var(--orange); }
.star:hover ~ .star       { color: var(--grey-800); }

/* ── Upload Zone ────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--grey-800);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--dark-3);
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--orange);
  background: var(--orange-dim);
}

.upload-zone .upload-icon { font-size: 2rem; margin-bottom: 10px; opacity: 0.5; }
.upload-zone .upload-text { font-size: 0.875rem; color: var(--grey-400); }
.upload-zone .upload-hint { font-size: 0.75rem; color: var(--grey-700); margin-top: 4px; }

/* ── Tabs ───────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--grey-900);
  margin-bottom: 24px;
}

.tab {
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--grey-600);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 7px;
}

.tab:hover { color: var(--grey-200); }
.tab.active {
  color: var(--orange);
  border-bottom-color: var(--orange);
}

/* ── Grilles Responsive ─────────────────────────────────────── */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Utilitaires ────────────────────────────────────────────── */
.text-orange  { color: var(--orange); }
.text-muted   { color: var(--grey-600); }
.text-right   { text-align: right; }
.text-center  { text-align: center; }
.mt-auto      { margin-top: auto; }
.mb-0         { margin-bottom: 0; }
.d-flex       { display: flex; }
.align-center { align-items: center; }
.gap-8        { gap: 8px; }
.gap-12       { gap: 12px; }
.gap-16       { gap: 16px; }

/* ── Empty State ────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--grey-600);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 14px; opacity: 0.3; }
.empty-state .empty-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  color: var(--grey-400);
  margin-bottom: 6px;
}
.empty-state .empty-text { font-size: 0.85rem; }

/* ── Pagination ─────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
  padding: 20px 0;
}

.page-btn {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  border: 1px solid var(--grey-800);
  background: var(--dark-3);
  color: var(--grey-400);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.page-btn:hover     { border-color: var(--orange); color: var(--orange); }
.page-btn.active    { background: var(--orange); border-color: var(--orange); color: var(--white-pure); }
.page-btn.disabled  { opacity: 0.3; cursor: not-allowed; pointer-events: none; }

/* ── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--dark-2);
  border: 1px solid var(--grey-800);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  box-shadow: var(--shadow-lg);
  transform: translateY(-16px);
  transition: transform var(--transition);
}
.modal-overlay.open .modal { transform: translateY(0); }

.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--grey-900);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  color: var(--white);
}

.modal-close {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  background: transparent;
  border: 1px solid var(--grey-800);
  color: var(--grey-600);
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--transition);
}
.modal-close:hover { border-color: var(--danger); color: var(--danger); }

.modal-body   { padding: 22px; }
.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--grey-900);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ── Page Login ─────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  background: var(--black);
  position: relative;
  overflow: hidden;
}

.login-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 80px;
  position: relative;
  z-index: 1;
}

.login-right {
  width: 420px;
  background: var(--dark-2);
  border-left: 1px solid var(--grey-900);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
}

.login-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 60px,
      var(--grey-900) 60px,
      var(--grey-900) 61px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 60px,
      var(--grey-900) 60px,
      var(--grey-900) 61px
    );
  opacity: 0.3;
}

.login-logo-big {
  font-family: var(--font-display);
  font-size: 5rem;
  letter-spacing: 0.06em;
  line-height: 1;
  color: var(--white);
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}
.login-logo-big span { color: var(--orange); }

.login-tagline {
  font-size: 1rem;
  color: var(--grey-600);
  position: relative;
  z-index: 1;
}

.login-box-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: 0.06em;
  color: var(--white);
  margin-bottom: 4px;
  text-align: center;
}

.login-box-subtitle {
  font-size: 0.82rem;
  color: var(--grey-600);
  margin-bottom: 32px;
  text-align: center;
}

/* ── Responsive ─────────────────────────────────────────────── */
.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px;
}

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

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

  .sidebar {
    transform: translateX(-260px);
    width: 260px;
  }
  .sidebar.open { transform: translateX(0); }

  .main-content { margin-left: 0; }
  .sidebar-toggle { display: flex; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row.cols-2, .form-row.cols-3 { grid-template-columns: 1fr; }

  .login-right { width: 100%; }
  .login-left  { display: none; }

  .page-content { padding: 16px; }
}

/* ── Sidebar Overlay mobile ─────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99;
}
.sidebar-overlay.open { display: block; }

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-280px);
    width: 260px;
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    z-index: 1000;
    transition: transform 0.25s ease;
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.5);
  }
  .sidebar-overlay {
    z-index: 999;
  }
  .main-content { margin-left: 0 !important; }
  .sidebar-toggle { display: flex !important; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr !important; }
}
