/* ─── GheSemo Admin Dashboard — Stylesheet ───────────────────────────────── */

:root {
  --sidebar-width: 260px;
  --navbar-height: 56px;
  --primary: #e94560;
  --primary-dark: #c73652;
  --accent: #f5a623;
  --bg-dark: #0f1117;
  --bg-panel: #1a1d27;
  --bg-card: #1e2235;
  --bg-card-hover: #252a40;
  --border: rgba(255,255,255,0.07);
  --text-muted-custom: rgba(255,255,255,0.45);
  --success: #28d094;
  --warning: #f5a623;
  --danger: #e94560;
  --info: #3b9edd;
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
body {
  background: var(--bg-dark);
  color: #e0e4f0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  overflow-x: hidden;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

/* ── Top Navbar ── */
.navbar-top {
  background: rgba(15,17,23,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--navbar-height);
  z-index: 1050;
  padding: 0 1rem;
}
.brand-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--primary);
  border-radius: 50%;
  margin-right: 8px;
  box-shadow: 0 0 8px var(--primary);
}
.avatar-sm {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
}

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  top: var(--navbar-height);
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--navbar-height));
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  z-index: 1040;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0;
}
.sidebar.collapsed { transform: translateX(calc(-1 * var(--sidebar-width))); }

.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 0 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}
.brand-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff;
}

.sidebar-nav { flex: 1; padding: 0 0.75rem; }
.nav-section-title {
  font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--text-muted-custom);
  padding: 0.5rem 0.75rem 0.25rem;
}
.nav-link {
  display: flex; align-items: center; gap: 10px;
  color: rgba(255,255,255,0.6);
  padding: 9px 12px;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s;
  margin-bottom: 2px;
  font-size: 13.5px;
}
.nav-link i { font-size: 16px; flex-shrink: 0; }
.nav-link:hover { background: rgba(255,255,255,0.07); color: #fff; }
.nav-link.active {
  background: linear-gradient(135deg, rgba(233,69,96,0.2), rgba(245,166,35,0.1));
  color: #fff;
  border-left: 3px solid var(--primary);
}

.sidebar-footer { padding: 1rem 1.25rem 0; border-top: 1px solid var(--border); }

/* ── Main Content ── */
.main-content {
  margin-left: var(--sidebar-width);
  margin-top: var(--navbar-height);
  min-height: calc(100vh - var(--navbar-height));
  transition: margin-left 0.3s ease;
}
.main-content.expanded { margin-left: 0; }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
.card:hover { background: var(--bg-card-hover); }
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.25rem;
  font-weight: 600;
}

/* ── Stat Cards ── */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 32px rgba(0,0,0,0.4); }
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.stat-value { font-size: 28px; font-weight: 700; color: #fff; line-height: 1; }
.stat-label { color: var(--text-muted-custom); font-size: 12px; margin-top: 4px; }
.stat-trend { font-size: 11px; margin-top: 8px; }

/* ── Tables ── */
.table { color: #e0e4f0; }
.table > :not(caption) > * > * { background: transparent; border-color: var(--border); padding: 10px 12px; }
.table thead th { color: var(--text-muted-custom); font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.table tbody tr { transition: background 0.15s; }
.table tbody tr:hover > td { background: rgba(255,255,255,0.04) !important; }
.table-responsive { border-radius: 12px; }

/* ── Badges ── */
.badge { font-weight: 500; letter-spacing: 0.3px; }

/* Status badges */
.status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
}
.status-pending    { background: rgba(245,166,35,0.15); color: #f5a623; }
.status-quoted     { background: rgba(59,158,221,0.15); color: #3b9edd; }
.status-accepted   { background: rgba(40,208,148,0.15); color: #28d094; }
.status-completed  { background: rgba(40,208,148,0.2);  color: #28d094; }
.status-cancelled  { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.4); }
.status-dispute    { background: rgba(233,69,96,0.15); color: var(--primary); }
.status-open       { background: rgba(233,69,96,0.15); color: var(--primary); }
.status-resolved   { background: rgba(40,208,148,0.15); color: #28d094; }
.status-succeeded  { background: rgba(40,208,148,0.15); color: #28d094; }
.status-failed     { background: rgba(233,69,96,0.15); color: var(--primary); }
.status-refunded   { background: rgba(59,158,221,0.15); color: #3b9edd; }

/* ── Buttons ── */
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }

/* ── Form Controls ── */
.form-control, .form-select {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #e0e4f0;
  border-radius: 10px;
}
.form-control:focus, .form-select:focus {
  background: rgba(255,255,255,0.09);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(233,69,96,0.2);
}
.form-control::placeholder { color: var(--text-muted-custom); }
.form-select option { background: var(--bg-panel); }

/* ── Modals ── */
.modal-content { background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; }
.modal-header { border-bottom: 1px solid var(--border); }
.modal-footer { border-top: 1px solid var(--border); }

/* ── Page Header ── */
.page-header { margin-bottom: 1.5rem; }
.page-header h1 { font-size: 22px; font-weight: 700; color: #fff; }
.page-header p { color: var(--text-muted-custom); font-size: 13px; }

/* ── User Avatar ── */
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: #fff; flex-shrink: 0;
}

/* ── Pagination ── */
.pagination .page-link {
  background: var(--bg-card); border-color: var(--border); color: #e0e4f0;
  border-radius: 8px; margin: 0 2px;
}
.pagination .page-link:hover { background: rgba(255,255,255,0.1); color: #fff; }
.pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); }

/* ── Alert ── */
.alert { border-radius: 12px; border: none; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(calc(-1 * var(--sidebar-width))); }
  .sidebar.show { transform: translateX(0); }
  .main-content { margin-left: 0; }
}
