/* ============================================================
   Barbershop SaaS — Main Stylesheet
   Theme: Black · White · Red (Premium Barbershop)
   ============================================================ */

:root {
  --red:          #c0392b;
  --red-dark:     #962d22;
  --red-light:    #e74c3c;
  --black:        #111111;
  --black-2:      #1a1a1a;
  --black-3:      #242424;
  --gray-dark:    #333333;
  --gray:         #555555;
  --gray-mid:     #888888;
  --gray-light:   #bbbbbb;
  --white:        #ffffff;
  --white-off:    #f8f8f8;
  --border:       #2e2e2e;
  --border-light: #ececec;
  --success:      #27ae60;
  --warning:      #f39c12;
  --info:         #2980b9;
  --danger:       #c0392b;
  --radius:       10px;
  --radius-lg:    16px;
  --shadow:       0 2px 12px rgba(0,0,0,.25);
  --shadow-lg:    0 8px 32px rgba(0,0,0,.35);
  --transition:   all .2s ease;
  --font:         'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--black); color: var(--white); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-light); }
button, input, select, textarea { font-family: inherit; }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.25; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
p  { margin-bottom: .75rem; color: var(--gray-light); }

/* ── Layout ─────────────────────────────────────────────────── */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.row { display: flex; flex-wrap: wrap; gap: 20px; }
.col { flex: 1; min-width: 200px; }

/* ── Admin Layout ───────────────────────────────────────────── */
.admin-wrapper { display: flex; min-height: 100vh; background: #0f0f0f; }

/* Sidebar */
.sidebar {
  width: 260px; min-height: 100vh; background: var(--black-2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
  transition: transform .3s ease;
  overflow-y: auto;
}
.sidebar-logo {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-logo .logo-icon { width: 36px; height: 36px; background: var(--red); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.sidebar-logo .logo-text { font-size: 1rem; font-weight: 700; }
.sidebar-logo .logo-sub { font-size: .7rem; color: var(--gray-mid); text-transform: uppercase; letter-spacing: .5px; }
.sidebar-nav { padding: 12px 0; flex: 1; }
.sidebar-section { padding: 10px 20px 4px; font-size: .65rem; font-weight: 700; color: var(--gray); text-transform: uppercase; letter-spacing: 1px; }
.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px; color: var(--gray-light);
  font-size: .875rem; font-weight: 500;
  transition: var(--transition); border-left: 3px solid transparent;
}
.sidebar-link:hover { background: var(--black-3); color: var(--white); border-left-color: var(--red); }
.sidebar-link.active { background: rgba(192,57,43,.12); color: var(--red-light); border-left-color: var(--red); font-weight: 600; }
.sidebar-link .icon { width: 18px; text-align: center; font-size: 1rem; flex-shrink: 0; }
.sidebar-footer { padding: 16px 20px; border-top: 1px solid var(--border); font-size: .8rem; color: var(--gray); }

/* Main content */
.main-content { margin-left: 260px; flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  height: 64px; background: var(--black-2); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; position: sticky; top: 0; z-index: 50;
}
.topbar-title { font-size: 1.1rem; font-weight: 700; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.topbar-user { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.topbar-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--red); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .875rem; }
.page-content { padding: 28px; flex: 1; }

/* Mobile sidebar toggle */
.sidebar-toggle { display: none; background: none; border: none; color: var(--white); font-size: 1.4rem; cursor: pointer; }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--black-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-header h3 { font-size: 1rem; font-weight: 700; margin: 0; }
.card-body { padding: 24px; }
.card-footer { padding: 14px 24px; border-top: 1px solid var(--border); background: rgba(255,255,255,.02); }

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--black-2); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px; position: relative; overflow: hidden;
}
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--red); }
.stat-card.success::before { background: var(--success); }
.stat-card.warning::before { background: var(--warning); }
.stat-card.info::before { background: var(--info); }
.stat-card .stat-icon { font-size: 1.75rem; margin-bottom: 8px; }
.stat-card .stat-value { font-size: 1.75rem; font-weight: 800; line-height: 1; }
.stat-card .stat-label { font-size: .8rem; color: var(--gray-mid); margin-top: 4px; text-transform: uppercase; letter-spacing: .5px; }
.stat-card .stat-change { font-size: .75rem; margin-top: 8px; }
.stat-card .stat-change.up { color: var(--success); }
.stat-card .stat-change.down { color: var(--danger); }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--radius);
  font-size: .875rem; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; transition: var(--transition);
  white-space: nowrap; text-decoration: none;
}
.btn-primary { background: var(--red); color: #fff; border-color: var(--red); }
.btn-primary:hover { background: var(--red-dark); color: #fff; border-color: var(--red-dark); }
.btn-secondary { background: var(--gray-dark); color: var(--white); border-color: var(--gray-dark); }
.btn-secondary:hover { background: #444; color: #fff; }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { background: #219a52; color: #fff; }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: var(--red-dark); color: #fff; }
.btn-warning { background: var(--warning); color: #111; border-color: var(--warning); }
