/* =============================================
   SALON MANAGEMENT - PREMIUM CSS
   Color Scheme: White, Dark Gray, Gold
============================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

:root {
  --gold: #C9A84C;
  --gold-light: #F0D080;
  --gold-dark: #A07830;
  --dark: #1A1A2E;
  --dark-2: #16213E;
  --dark-3: #0F3460;
  --sidebar-bg: #12121E;
  --sidebar-width: 260px;
  --gray: #6c757d;
  --light-bg: #F8F9FA;
  --white: #FFFFFF;
  --border: rgba(201,168,76,0.2);
  --card-shadow: 0 4px 24px rgba(0,0,0,0.08);
  --success: #28a745;
  --danger: #dc3545;
  --warning: #ffc107;
  --info: #17a2b8;
  --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--light-bg);
  color: #2d2d2d;
  overflow-x: hidden;
}

/* ---- SIDEBAR ---- */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  position: fixed;
  left: 0; top: 0;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  overflow-y: auto;
  overflow-x: hidden;
}

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

.sidebar-brand .brand-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff;
}

.sidebar-brand .brand-text h5 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  color: var(--white);
  font-size: 16px;
  margin: 0;
  letter-spacing: 0.5px;
}

.sidebar-brand .brand-text small {
  color: var(--gold);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.sidebar-menu { padding: 16px 0; flex: 1; }

.sidebar-section-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.3);
  padding: 12px 20px 6px;
  font-weight: 600;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  border-left: 3px solid transparent;
  position: relative;
}

.sidebar-menu a:hover {
  color: var(--white);
  background: rgba(201,168,76,0.08);
  border-left-color: var(--gold);
}

.sidebar-menu a.active {
  color: var(--gold);
  background: rgba(201,168,76,0.12);
  border-left-color: var(--gold);
}

.sidebar-menu a i { font-size: 18px; min-width: 22px; }

.sidebar-menu .badge-pill {
  margin-left: auto;
  background: var(--gold);
  color: #fff;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 20px;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

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

.sidebar-footer .user-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 13px;
}

.sidebar-footer .user-name {
  color: var(--white);
  font-size: 13px; font-weight: 600;
}

.sidebar-footer .user-role {
  color: rgba(255,255,255,0.4);
  font-size: 11px;
}

/* ---- MAIN CONTENT ---- */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

/* ---- TOPBAR ---- */
.topbar {
  background: var(--white);
  border-bottom: 1px solid #eee;
  padding: 0 24px;
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

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

.page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
}

.topbar .btn-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1px solid #eee;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--gray);
  font-size: 17px;
  position: relative;
}

.topbar .btn-icon:hover { background: var(--light-bg); color: var(--dark); }

.notif-badge {
  position: absolute; top: 4px; right: 4px;
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 1px solid #fff;
}

.topbar-avatar {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 14px;
  cursor: pointer;
}

.topbar-search input {
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 8px 16px 8px 38px;
  font-size: 13px;
  background: var(--light-bg);
  color: var(--dark);
  width: 240px;
  transition: var(--transition);
}

.topbar-search input:focus {
  outline: none;
  border-color: var(--gold);
  width: 280px;
  background: #fff;
}

.topbar-search { position: relative; }

.topbar-search i {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--gray);
  font-size: 14px;
}

/* ---- PAGE BODY ---- */
.page-body { padding: 28px 24px; flex: 1; }

/* ---- STAT CARDS ---- */
.stat-card {
  background: var(--white);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--card-shadow);
  border: 1px solid #f0f0f0;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

.stat-card.gold::before { background: linear-gradient(90deg, var(--gold), var(--gold-light)); }
.stat-card.green::before { background: linear-gradient(90deg, #28a745, #6fcf97); }
.stat-card.blue::before { background: linear-gradient(90deg, #3a7bd5, #00d2ff); }
.stat-card.purple::before { background: linear-gradient(90deg, #8B5CF6, #C084FC); }
.stat-card.red::before { background: linear-gradient(90deg, #ef4444, #f87171); }

.stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 32px rgba(0,0,0,0.12); }

.stat-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
}

.stat-icon.gold { background: rgba(201,168,76,0.1); color: var(--gold); }
.stat-icon.green { background: rgba(40,167,69,0.1); color: #28a745; }
.stat-icon.blue { background: rgba(58,123,213,0.1); color: #3a7bd5; }
.stat-icon.purple { background: rgba(139,92,246,0.1); color: #8B5CF6; }
.stat-icon.red { background: rgba(239,68,68,0.1); color: #ef4444; }

.stat-value {
  font-size: 28px; font-weight: 700;
  color: var(--dark); line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px; color: var(--gray); font-weight: 500;
}

.stat-change {
  font-size: 12px; margin-top: 10px;
  display: flex; align-items: center; gap: 4px;
}

.stat-change.up { color: #28a745; }
.stat-change.down { color: #dc3545; }

/* ---- CARDS ---- */
.card-premium {
  background: var(--white);
  border-radius: 16px;
  border: 1px solid #f0f0f0;
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.card-header-premium {
  padding: 18px 22px;
  border-bottom: 1px solid #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header-premium h6 {
  font-size: 15px; font-weight: 700;
  color: var(--dark); margin: 0;
  display: flex; align-items: center; gap: 8px;
}

.card-header-premium h6 i { color: var(--gold); }

.card-body-premium { padding: 22px; }

/* ---- BUTTONS ---- */
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex; align-items: center; gap: 7px;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201,168,76,0.4);
  color: #fff;
}

.btn-outline-gold {
  background: transparent;
  color: var(--gold);
  border: 1.5px solid var(--gold);
  border-radius: 10px;
  padding: 9px 20px;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex; align-items: center; gap: 7px;
}

.btn-outline-gold:hover {
  background: var(--gold);
  color: #fff;
  transform: translateY(-2px);
}

/* ---- TABLES ---- */
.table-premium {
  width: 100%;
  border-collapse: collapse;
}

.table-premium thead th {
  background: var(--light-bg);
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid #eee;
}

.table-premium tbody td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid #f5f5f5;
  color: #333;
  vertical-align: middle;
}

.table-premium tbody tr:hover { background: rgba(201,168,76,0.03); }

.table-premium tbody tr:last-child td { border-bottom: none; }

/* ---- BADGES ---- */
.badge-status {
  font-size: 11px; font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-confirmed { background: rgba(40,167,69,0.1); color: #28a745; }
.badge-pending { background: rgba(255,193,7,0.1); color: #b8860b; }
.badge-cancelled { background: rgba(220,53,69,0.1); color: #dc3545; }
.badge-completed { background: rgba(58,123,213,0.1); color: #3a7bd5; }
.badge-instock { background: rgba(40,167,69,0.1); color: #28a745; }
.badge-lowstock { background: rgba(255,193,7,0.15); color: #b8860b; }
.badge-outstock { background: rgba(220,53,69,0.1); color: #dc3545; }
.badge-gold { background: rgba(201,168,76,0.1); color: var(--gold); }

/* ---- AVATAR ---- */
.avatar-sm {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
  flex-shrink: 0;
}

.avatar-sm.gold { background: rgba(201,168,76,0.15); color: var(--gold); }
.avatar-sm.blue { background: rgba(58,123,213,0.15); color: #3a7bd5; }
.avatar-sm.green { background: rgba(40,167,69,0.15); color: #28a745; }
.avatar-sm.purple { background: rgba(139,92,246,0.15); color: #8B5CF6; }
.avatar-sm.pink { background: rgba(236,72,153,0.15); color: #EC4899; }

/* ---- PROGRESS BAR ---- */
.progress-custom {
  height: 8px;
  border-radius: 10px;
  background: #f0f0f0;
  overflow: hidden;
}

.progress-custom .bar {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transition: width 0.6s ease;
}

/* ---- APPOINTMENT CALENDAR STYLES ---- */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: #eee; border-radius: 12px; overflow: hidden; }
.cal-day-header { background: var(--sidebar-bg); color: rgba(255,255,255,0.7); text-align: center; padding: 10px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.cal-day { background: #fff; min-height: 110px; padding: 8px; }
.cal-day.other-month { background: #fafafa; }
.cal-day.today { background: rgba(201,168,76,0.06); }
.cal-day-num { font-size: 12px; font-weight: 700; color: var(--dark); margin-bottom: 4px; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.cal-day.today .cal-day-num { background: var(--gold); color: #fff; }
.cal-event { font-size: 11px; padding: 3px 7px; border-radius: 5px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.cal-event.confirmed { background: rgba(40,167,69,0.1); color: #28a745; border-left: 3px solid #28a745; }
.cal-event.pending { background: rgba(255,193,7,0.1); color: #b8860b; border-left: 3px solid #ffc107; }
.cal-event.cancelled { background: rgba(220,53,69,0.1); color: #dc3545; border-left: 3px solid #dc3545; }

/* ---- STAFF CARD ---- */
.staff-card {
  background: var(--white);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  border: 1px solid #f0f0f0;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}

.staff-card:hover { transform: translateY(-4px); box-shadow: 0 12px 36px rgba(0,0,0,0.1); }

.staff-avatar {
  width: 70px; height: 70px;
  border-radius: 50%;
  margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 700; color: #fff;
  border: 3px solid rgba(201,168,76,0.3);
}

.staff-name { font-size: 15px; font-weight: 700; color: var(--dark); margin-bottom: 3px; }
.staff-role { font-size: 12px; color: var(--gold); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px; }
.staff-stat { font-size: 12px; color: var(--gray); }
.staff-stat span { font-weight: 700; color: var(--dark); }

/* ---- STOCK TABLE ---- */
.stock-bar { height: 6px; border-radius: 10px; background: #f0f0f0; width: 100px; overflow: hidden; display: inline-flex; }
.stock-bar .fill { height: 100%; border-radius: 10px; }
.fill-green { background: #28a745; }
.fill-yellow { background: #ffc107; }
.fill-red { background: #dc3545; }

/* ---- INVOICE ---- */
.invoice-preview {
  background: var(--white);
  border-radius: 16px;
  padding: 32px;
  border: 1px solid #f0f0f0;
  box-shadow: var(--card-shadow);
}

.invoice-header { border-bottom: 2px solid var(--gold); padding-bottom: 20px; margin-bottom: 20px; }
.invoice-brand { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 24px; color: var(--dark); }
.invoice-brand span { color: var(--gold); }

.invoice-item-row { padding: 10px 0; border-bottom: 1px solid #f5f5f5; display: flex; justify-content: space-between; align-items: center; }
.invoice-total-row { padding: 14px 0; display: flex; justify-content: space-between; align-items: center; font-size: 18px; font-weight: 700; color: var(--dark); border-top: 2px solid var(--gold); margin-top: 10px; }

/* ---- CHARTS ---- */
.chart-wrapper { position: relative; height: 280px; }
.chart-wrapper-sm { position: relative; height: 200px; }

/* ---- FORM CONTROLS ---- */
.form-control-premium {
  border: 1.5px solid #e8e8e8;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--dark);
  background: var(--white);
  transition: var(--transition);
  width: 100%;
}

.form-control-premium:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.1);
}

.form-label-premium { font-size: 13px; font-weight: 600; color: #444; margin-bottom: 6px; display: block; }

/* ---- LOGIN ---- */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 50%, #0a0a15 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,0.08) 0%, transparent 70%);
  top: -100px; right: -100px;
}

.login-page::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,0.05) 0%, transparent 70%);
  bottom: -80px; left: -80px;
}

.login-card {
  background: rgba(255,255,255,0.97);
  border-radius: 24px;
  padding: 48px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.4);
  position: relative; z-index: 1;
}

.login-logo {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; color: #fff;
  margin: 0 auto 20px;
}

.login-title { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 26px; text-align: center; color: var(--dark); margin-bottom: 4px; }
.login-sub { text-align: center; color: var(--gray); font-size: 14px; margin-bottom: 32px; }

.login-card .form-control {
  border: 1.5px solid #e8e8e8;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
}

.login-card .form-control:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,0.1); }

.login-card .input-group-text {
  border: 1.5px solid #e8e8e8;
  border-right: none;
  border-radius: 10px 0 0 10px;
  background: #fafafa;
  color: var(--gold);
}

.login-card .input-group .form-control { border-left: none; border-radius: 0 10px 10px 0; }
.login-card .input-group:focus-within .input-group-text { border-color: var(--gold); }

.btn-login {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  width: 100%;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.5px;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201,168,76,0.5);
}

/* ---- REPORT METRIC ---- */
.report-metric {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #f5f5f5;
}
.report-metric:last-child { border-bottom: none; }
.report-metric-rank { width: 28px; height: 28px; border-radius: 8px; background: rgba(201,168,76,0.1); color: var(--gold); font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.report-metric-label { flex: 1; font-size: 14px; font-weight: 500; color: #333; }
.report-metric-value { font-size: 14px; font-weight: 700; color: var(--dark); }

/* ---- MOBILE ---- */
.sidebar-toggle { display: none; }

@media (max-width: 992px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .sidebar-toggle { display: flex; }
  .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1040; }
  .sidebar-overlay.show { display: block; }
  .topbar-search input { width: 160px; }
}

@media (max-width: 576px) {
  .page-body { padding: 16px; }
  .login-card { padding: 32px 24px; margin: 16px; }
  .topbar-search { display: none; }
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 10px; }

/* ---- ANIMATIONS ---- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in-up { animation: fadeInUp 0.4s ease forwards; }
.fade-in-up:nth-child(1) { animation-delay: 0.05s; }
.fade-in-up:nth-child(2) { animation-delay: 0.1s; }
.fade-in-up:nth-child(3) { animation-delay: 0.15s; }
.fade-in-up:nth-child(4) { animation-delay: 0.2s; }

/* ---- MISC ---- */
.divider-gold { border: none; border-top: 1px solid var(--border); }
.text-gold { color: var(--gold); }
.bg-gold { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); }
.rounded-premium { border-radius: 16px; }
.section-heading { font-family: 'Inter', sans-serif; font-size: 22px; color: var(--dark); font-weight: 800; }
