/* ══════════════════════════════════════════════════════════
   GradPro – Custom Stylesheet
   Dark theme with golden accent (#c9a84c)
   Font: Cairo (Arabic)
   ══════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────── */
:root {
  --bg-base:      #0d0d0f;
  --bg-card:      #141418;
  --bg-card-2:    #1c1c23;
  --bg-hover:     #22222a;
  --border:       #2a2a35;
  --border-light: #333340;
  --gold:         #c9a84c;
  --gold-dim:     rgba(201,168,76,.15);
  --gold-glow:    rgba(201,168,76,.3);
  --text-primary: #e8e8f0;
  --text-muted:   #7b7b99;
  --text-dim:     #555566;
  --sidebar-w:    240px;
  --topbar-h:     60px;
  --radius:       10px;
  --radius-sm:    6px;
  --shadow:       0 4px 24px rgba(0,0,0,.4);
}

/* ── Theme toggle button ──────────────────────────────────────────────
   Light/dark variables are applied by JS (style.setProperty on :root)
   so they work without collectstatic. Only the icon switch needs CSS.
   ──────────────────────────────────────────────────────────────────── */
.theme-toggle-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: var(--bg-card-2); border: 1px solid var(--border-light);
  color: var(--gold); cursor: pointer; transition: background .15s, color .15s;
}
.theme-toggle-btn:hover { background: var(--gold-dim); }
/* Icon visibility: show moon in dark, sun in light */
.theme-toggle-btn [data-theme-light] { display: none; }
html.theme-light .theme-toggle-btn [data-theme-dark]  { display: none; }
html.theme-light .theme-toggle-btn [data-theme-light] { display: inline; }

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Cairo', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  margin: 0;
  overflow-x: hidden;
}

/* ── Layout ─────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; right: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform .28s cubic-bezier(.4,0,.2,1);
}

.main-wrapper {
  margin-right: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  max-width: 1400px;
  width: 100%;
}

/* ── Sidebar Brand ──────────────────────────────────────── */
.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo-full {
  width: calc(var(--sidebar-w) - 80px);
  max-width: 160px;
  height: auto;
  max-height: 56px;
  object-fit: contain;
  filter: invert(1);
}
html.theme-light .sidebar-logo-full { filter: none; }

/* ── Sidebar Menu ───────────────────────────────────────── */
.sidebar-menu {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-menu::-webkit-scrollbar { width: 4px; }
.sidebar-menu::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 4px; }

.menu-section { margin-bottom: 8px; }
.menu-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--text-dim);
  text-transform: uppercase;
  padding: 6px 8px 4px;
  display: block;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 500;
  transition: background .18s, color .18s;
}
.menu-item i { font-size: 1rem; flex-shrink: 0; }
.menu-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.menu-item.active {
  background: var(--gold-dim);
  color: var(--gold);
  font-weight: 600;
}

/* ── Sidebar Footer ─────────────────────────────────────── */
.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
}
.user-info-sm { flex: 1; min-width: 0; }
.user-name-sm { font-size: .8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role-sm { font-size: .65rem; color: var(--text-muted); }

.btn-logout {
  background: none; border: none;
  color: var(--text-muted);
  padding: 6px; border-radius: var(--radius-sm);
  cursor: pointer; transition: color .18s, background .18s;
  line-height: 1;
}
.btn-logout:hover { color: #ef4444; background: rgba(239,68,68,.1); }

/* ── Topbar ─────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 900;
}

.topbar-breadcrumb { font-size: .9rem; font-weight: 600; color: var(--text-primary); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--gold-dim);
  color: var(--gold);
  font-size: .75rem;
  font-weight: 700;
  display: grid; place-items: center;
  cursor: pointer;
  border: 2px solid var(--border-light);
  overflow: hidden;
}
.topbar-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ── Avatars ────────────────────────────────────────────── */
.user-avatar-sm {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--gold-dim);
  color: var(--gold);
  font-size: .75rem;
  font-weight: 700;
  display: grid; place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--border-light);
}
.small-avatar { width: 28px; height: 28px; font-size: .65rem; }
.user-avatar-lg {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--gold-dim);
  color: var(--gold);
  font-size: 1.6rem;
  font-weight: 700;
  display: grid; place-items: center;
  border: 2px solid var(--border-light);
}

/* ── Card Dark ──────────────────────────────────────────── */
.card-dark {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-dark-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-dark-title { font-size: .95rem; font-weight: 700; margin: 0; }
.card-dark-body { padding: 18px; }
.card-dark-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg-card-2);
}

/* ── Stat Cards ─────────────────────────────────────────── */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color .2s, transform .2s;
}
.stat-card:hover { border-color: var(--border-light); transform: translateY(-2px); }
.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.stat-body { flex: 1; min-width: 0; }
.stat-number { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.stat-label { font-size: .78rem; color: var(--text-muted); margin-top: 3px; }
.stat-link {
  color: var(--text-muted);
  font-size: 1.2rem;
  text-decoration: none;
  transition: color .18s;
}
.stat-link:hover { color: var(--gold); }

/* ── Project List (dashboard) ───────────────────────────── */
.project-list { display: flex; flex-direction: column; }
.project-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text-primary);
  transition: background .15s;
}
.project-list-item:last-child { border-bottom: none; }
.project-list-item:hover { background: var(--bg-hover); }
.project-color-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.project-info { flex: 1; min-width: 0; }
.project-name { font-size: .88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-meta { font-size: .73rem; color: var(--text-muted); margin-top: 2px; }

/* ── Activity List ──────────────────────────────────────── */
.activity-list { display: flex; flex-direction: column; }
.activity-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--gold-dim);
  color: var(--gold);
  display: grid; place-items: center;
  font-size: .8rem;
  flex-shrink: 0;
}
.activity-info { flex: 1; min-width: 0; }
.activity-title { font-size: .82rem; font-weight: 600; }
.activity-sub { font-size: .72rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-time { font-size: .68rem; color: var(--text-dim); white-space: nowrap; }

/* ── Project / Group Cards ──────────────────────────────── */
.pcard {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  position: relative;
}
.pcard:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,.45);
  border-color: var(--border-light);
}

/* top colored stripe */
.pcard-stripe { height: 3px; width: 100%; flex-shrink: 0; }

/* main body */
.pcard-body { padding: 20px 20px 16px; flex: 1; display: flex; flex-direction: column; gap: 14px; }

/* avatar row */
.pcard-header { display: flex; align-items: center; gap: 13px; }
.pcard-avatar {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center; flex-shrink: 0;
  font-size: 1.2rem; font-weight: 800;
}
.pcard-title { flex: 1; min-width: 0; }
.pcard-name {
  font-size: .95rem; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 4px;
}
.pcard-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .65rem; font-weight: 700; letter-spacing: .03em;
  padding: 2px 8px; border-radius: 20px;
}
.pcard-badge--active   { background: rgba(34,197,94,.13); color: #4ade80; border: 1px solid rgba(34,197,94,.28); }
.pcard-badge--inactive { background: rgba(239,68,68,.1);  color: #f87171; border: 1px solid rgba(239,68,68,.22); }
.pcard-badge i { font-size: .5rem; }

/* meta info list */
.pcard-meta { display: flex; flex-direction: column; gap: 5px; }
.pcard-meta-row {
  display: flex; align-items: center; gap: 7px;
  font-size: .74rem; color: var(--text-muted);
}
.pcard-meta-row i { font-size: .8rem; opacity: .6; flex-shrink: 0; }

/* divider */
.pcard-divider { height: 1px; background: var(--border); margin: 0; }

/* footer */
.pcard-footer {
  padding: 13px 20px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
}
.pcard-count {
  display: flex; align-items: center; gap: 6px;
  font-size: .75rem; color: var(--text-muted);
}
.pcard-count i { font-size: .85rem; }
.pcard-count strong { color: var(--text-primary); font-weight: 700; font-size: .88rem; }
.pcard-view-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 16px; border-radius: 8px; font-size: .78rem; font-weight: 600;
  background: var(--gold-dim); color: var(--gold);
  border: 1px solid var(--gold-glow);
  text-decoration: none;
  transition: background .18s, box-shadow .18s;
}
.pcard-view-btn:hover {
  background: rgba(201,168,76,.28);
  box-shadow: 0 0 12px rgba(201,168,76,.2);
  color: var(--gold);
}

/* legacy aliases kept for other pages that still use old class names */
.project-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: border-color .2s, transform .2s, box-shadow .2s; }
.project-card:hover { border-color: var(--border-light); transform: translateY(-3px); box-shadow: var(--shadow); }
.project-card-name { font-size: .95rem; font-weight: 700; margin-bottom: 6px; }
.project-card-meta { font-size: .75rem; color: var(--text-muted); margin-bottom: 3px; }
.project-card-footer { padding: 10px 16px; border-top: 1px solid var(--border); background: var(--bg-card-2); display: flex; align-items: center; gap: 8px; }
.project-card-count { font-size: .75rem; color: var(--text-muted); }

/* ── Project Avatar ─────────────────────────────────────── */
.project-avatar {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

/* ── Action Cards ───────────────────────────────────────── */
.action-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text-primary);
  transition: background .18s, border-color .18s, transform .18s;
}
.action-card:hover { background: var(--bg-hover); border-color: var(--border-light); transform: translateX(-3px); color: var(--text-primary); }
.action-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.05);
  display: grid; place-items: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.action-title { font-size: .88rem; font-weight: 600; }
.action-sub { font-size: .73rem; color: var(--text-muted); }
.text-purple { color: #a855f7 !important; }
.text-gold { color: var(--gold) !important; }

/* ── Info List ──────────────────────────────────────────── */
.info-list { display: grid; gap: 2px; margin: 0; }
.info-list dt { font-size: .75rem; color: var(--text-muted); font-weight: 500; margin-top: 8px; }
.info-list dd { font-size: .88rem; font-weight: 500; margin: 0; }

/* ── Grid / Table ───────────────────────────────────────── */
.grid-wrapper { overflow-x: auto; }

.table { --bs-table-bg: transparent; --bs-table-hover-bg: var(--bg-hover); color: var(--text-primary); }
.table thead th {
  background: var(--bg-card-2);
  border-bottom: 1px solid var(--border);
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 10px 12px;
  white-space: nowrap;
}
.table td { padding: 8px 12px; font-size: .85rem; border-bottom: 1px solid var(--border); }
.table tbody tr:last-child td { border-bottom: none; }

/* ── Form Builder ───────────────────────────────────────── */
.fields-list { list-style: none; margin: 0; padding: 0; }
.field-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.field-item:last-child { border-bottom: none; }
.field-item:hover { background: var(--bg-hover); }
.field-drag-handle { color: var(--text-dim); cursor: grab; padding: 2px; font-size: 1rem; }
.field-drag-handle:active { cursor: grabbing; }
.field-icon { color: var(--gold); font-size: 1rem; width: 22px; text-align: center; flex-shrink: 0; }
.field-info { flex: 1; min-width: 0; }
.field-label { font-size: .88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field-type-badge { font-size: .7rem; color: var(--text-muted); margin-top: 1px; }
.field-actions { display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.field-item:hover .field-actions { opacity: 1; }
/* Internal / admin-only field styling */
.field-internal { border-right: 3px solid var(--text-dim) !important; opacity: .75; }
.field-internal .field-icon { color: var(--text-muted); }
.field-internal:hover { opacity: 1; }

/* ── Form Preview ───────────────────────────────────────── */
.preview-scroll { max-height: calc(100vh - 220px); overflow-y: auto; }
.preview-scroll::-webkit-scrollbar { width: 4px; }
.preview-scroll::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 4px; }
.form-preview { font-size: .85rem; }

/* ── Public Form ────────────────────────────────────────── */
.public-form-body {
  background: var(--bg-base);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.public-form-wrapper {
  width: 100%;
  max-width: 680px;
  padding: 32px 16px 48px;
}
.public-form-header {
  text-align: center;
  margin-bottom: 24px;
}
.public-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 8px;
}
.project-badge {
  font-size: .8rem;
  color: var(--text-muted);
}
.public-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.public-form-title-section { margin-bottom: 24px; }
.public-form-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 6px; }
.public-form-desc { color: var(--text-muted); font-size: .88rem; }
.public-form-divider { height: 2px; background: linear-gradient(to left, var(--gold), transparent); border-radius: 2px; margin-top: 16px; }
.public-label { font-size: .9rem; font-weight: 600; margin-bottom: 6px; display: block; }
.public-help-text { font-size: .78rem; color: var(--text-muted); margin-bottom: 6px; }
.public-input { background: var(--bg-card-2) !important; border-color: var(--border) !important; color: var(--text-primary) !important; border-radius: var(--radius-sm) !important; }
.public-input:focus { border-color: var(--gold) !important; box-shadow: 0 0 0 3px var(--gold-dim) !important; }

/* Multi-select checkboxes */
.multiselect-group { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.multiselect-item .form-check-input:checked { background-color: var(--gold); border-color: var(--gold); }

/* File upload zone */
.file-upload-zone {
  position: relative;
  border: 2px dashed var(--border-light);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .2s, background .2s;
  overflow: hidden;
}
.file-upload-zone:hover { border-color: var(--gold); background: var(--gold-dim); }
.file-upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  width: 100%;
  height: 100%;
}
.file-upload-ui {
  padding: 28px;
  text-align: center;
  pointer-events: none;
}

.public-form-footer { text-align: center; color: var(--text-dim); font-size: .75rem; margin-top: 20px; }

/* ── Success Page ───────────────────────────────────────── */
.success-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}
.success-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 40px;
  text-align: center;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow);
}
.success-icon-wrap { margin-bottom: 20px; }
.success-circle {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(16,185,129,.15);
  color: #10b981;
  font-size: 2rem;
  display: grid; place-items: center;
  margin: 0 auto;
  border: 2px solid rgba(16,185,129,.3);
  animation: pop .4s cubic-bezier(.175,.885,.32,1.275);
}
@keyframes pop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.success-title { font-size: 1.6rem; font-weight: 800; margin-bottom: 10px; }
.success-msg { color: var(--text-muted); margin-bottom: 16px; }
.success-project { font-size: .85rem; color: var(--text-muted); background: var(--bg-card-2); border-radius: var(--radius-sm); padding: 8px 16px; display: inline-block; }

/* ── Login ──────────────────────────────────────────────── */
.login-body {
  background: radial-gradient(ellipse at top right, rgba(201,168,76,.06) 0%, var(--bg-base) 60%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-container { width: 100%; max-width: 420px; }
.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: var(--shadow);
}
.login-brand { text-align: center; margin-bottom: 32px; }
.login-icon {
  width: 72px; height: 72px;
  border-radius: 16px;
  background: var(--gold-dim);
  display: grid; place-items: center;
  margin: 0 auto 12px;
  border: 1px solid var(--gold-glow);
  padding: 8px;
}
.login-icon img { width: 100%; height: 100%; object-fit: contain; }
.login-title {
  font-size: 1.7rem; font-weight: 800; color: var(--gold); margin: 0;
  font-family: 'Cairo', sans-serif; letter-spacing: .5px;
}
.login-subtitle { font-size: .82rem; color: var(--text-muted); margin-top: 4px; }
.login-form input { background: var(--bg-card-2) !important; border-color: var(--border) !important; color: var(--text-primary) !important; }
.login-form input:focus { border-color: var(--gold) !important; box-shadow: 0 0 0 3px var(--gold-dim) !important; }
.login-footer-text { text-align: center; color: var(--text-dim); font-size: .73rem; margin-top: 16px; }

/* ── Permissions Grid ───────────────────────────────────── */
.perm-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.perm-label { display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; font-size: .7rem; color: var(--text-muted); }
.perm-label input { margin: 0; }

/* ── Detail Page ────────────────────────────────────────── */
.detail-grid { display: flex; flex-direction: column; gap: 0; }
.detail-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.detail-item:last-child { border-bottom: none; }
.detail-label { font-size: .82rem; color: var(--text-muted); font-weight: 600; padding-top: 2px; }
.detail-value { font-size: .9rem; word-break: break-word; }
.detail-image { max-width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--border); }

/* ── Bootstrap overrides ────────────────────────────────── */
.btn-primary {
  background: var(--gold) !important;
  border-color: var(--gold) !important;
  color: #0d0d0f !important;
  font-weight: 600;
}
.btn-primary:hover, .btn-primary:focus {
  background: #d4b05a !important;
  border-color: #d4b05a !important;
  box-shadow: 0 0 0 3px var(--gold-dim) !important;
}
.btn-icon {
  background: none;
  border: none;
  padding: 4px 7px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s, color .15s;
  color: var(--text-muted);
}
.btn-icon:hover { background: var(--bg-hover); color: var(--text-primary); }

.form-control, .form-select {
  background-color: var(--bg-card-2) !important;
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
}
.form-control:focus, .form-select:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px var(--gold-dim) !important;
}
.form-control::placeholder { color: var(--text-dim) !important; }

.input-group-text {
  background: var(--bg-card-2) !important;
  border-color: var(--border) !important;
  color: var(--text-muted) !important;
}

.badge { font-weight: 600; }
.bg-success-subtle { background: rgba(16,185,129,.12) !important; }
.bg-danger-subtle { background: rgba(239,68,68,.12) !important; }
.bg-warning-subtle { background: rgba(251,191,36,.12) !important; }
.bg-secondary-subtle { background: rgba(107,114,128,.12) !important; }

.alert { border-radius: var(--radius-sm); }
.alert-success { background: rgba(16,185,129,.1); border-color: rgba(16,185,129,.25); color: #6ee7b7; }
.alert-danger { background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.25); color: #fca5a5; }
.alert-warning { background: rgba(251,191,36,.1); border-color: rgba(251,191,36,.25); color: #fde68a; }
.alert-info { background: rgba(99,102,241,.1); border-color: rgba(99,102,241,.25); color: #c7d2fe; }

.modal-content { background: var(--bg-card) !important; border-color: var(--border) !important; }
.modal-header, .modal-footer { border-color: var(--border) !important; }

.dropdown-menu-dark { background: var(--bg-card-2) !important; border-color: var(--border) !important; }
.dropdown-item { color: var(--text-primary) !important; font-size: .85rem; }
.dropdown-item:hover { background: var(--bg-hover) !important; }

.page-link { background: var(--bg-card-2) !important; border-color: var(--border) !important; color: var(--text-muted) !important; }
.page-item.active .page-link { background: var(--gold) !important; border-color: var(--gold) !important; color: #0d0d0f !important; }

.empty-state {
  color: var(--text-muted);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ── Mobile sidebar ─────────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 999;
}
.sidebar-toggle-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  padding: 4px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: color .15s;
}
.sidebar-toggle-btn:hover { color: var(--text-primary); }

@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(100%);
    box-shadow: -8px 0 32px rgba(0,0,0,.6);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .main-wrapper { margin-right: 0; }
}

/* ── Scrollbar (global) ─────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }
