/* ═══════════════════════════════════════════════
   EstéticaPro — Premium Dark Theme
   ═══════════════════════════════════════════════ */

:root {
  /* Colors */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a26;
  --bg-card-hover: #22222f;
  --bg-input: #15151f;
  --bg-sidebar: #0e0e16;

  --accent: #d4a853;
  --accent-hover: #e6be6a;
  --accent-dim: rgba(212, 168, 83, 0.15);
  --accent-glow: rgba(212, 168, 83, 0.3);

  --text-primary: #f0f0f5;
  --text-secondary: #9a9ab0;
  --text-muted: #5f5f78;

  --border: rgba(255, 255, 255, 0.06);
  --border-light: rgba(255, 255, 255, 0.1);

  --success: #34d399;
  --success-bg: rgba(52, 211, 153, 0.12);
  --warning: #fbbf24;
  --warning-bg: rgba(251, 191, 36, 0.12);
  --danger: #f87171;
  --danger-bg: rgba(248, 113, 113, 0.12);
  --info: #60a5fa;
  --info-bg: rgba(96, 165, 250, 0.12);

  /* Sizing */
  --sidebar-width: 260px;
  --sidebar-collapsed: 72px;
  --topbar-height: 68px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(212, 168, 83, 0.1);
}

/* ─── Light Theme ─────────────────────────── */
[data-theme="light"] {
  --bg-primary: #f5f3ef;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f9f7f4;
  --bg-input: #f0ede8;
  --bg-sidebar: #faf8f5;

  --accent: #b8892e;
  --accent-hover: #a07525;
  --accent-dim: rgba(184, 137, 46, 0.1);
  --accent-glow: rgba(184, 137, 46, 0.2);

  --text-primary: #1a1a2e;
  --text-secondary: #5a5a72;
  --text-muted: #8e8ea0;

  --border: rgba(0, 0, 0, 0.08);
  --border-light: rgba(0, 0, 0, 0.12);

  --success: #16a34a;
  --success-bg: rgba(22, 163, 74, 0.1);
  --warning: #d97706;
  --warning-bg: rgba(217, 119, 6, 0.1);
  --danger: #dc2626;
  --danger-bg: rgba(220, 38, 38, 0.08);
  --info: #2563eb;
  --info-bg: rgba(37, 99, 235, 0.08);

  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(184, 137, 46, 0.06);
}

/* ─── Reset ──────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  border: none;
  cursor: pointer;
  font-family: inherit;
  background: none;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: 1rem;
}

ul {
  list-style: none;
}

/* ─── Scrollbar ──────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* ═══════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed);
}

.sidebar.collapsed .nav-label,
.sidebar.collapsed .logo-text,
.sidebar.collapsed .sidebar-footer {
  display: none;
}

.sidebar-header {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  min-height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  font-size: 1.6rem;
  color: var(--accent);
  text-shadow: 0 0 20px var(--accent-glow);
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.logo-accent {
  color: var(--accent);
}

.sidebar-toggle {
  color: var(--text-secondary);
  padding: 6px;
  border-radius: var(--radius-xs);
  transition: all 0.2s;
}

.sidebar-toggle:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.sidebar-nav {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.2s;
  position: relative;
  white-space: nowrap;
}

.nav-item:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.nav-item.active {
  color: var(--accent);
  background: var(--accent-dim);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

.nav-item .material-icons-round {
  font-size: 22px;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.whatsapp-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
}

.status-dot.connected {
  background: var(--success);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.5);
}

/* ═══════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════ */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed~.main-content {
  margin-left: var(--sidebar-collapsed);
}

/* ─── Topbar ─────────────────────────────── */
.topbar {
  height: var(--topbar-height);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: var(--topbar-bg, rgba(10, 10, 15, 0.8));
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mobile-menu {
  display: none;
  color: var(--text-secondary);
}

.page-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  transition: border-color 0.2s;
}

.search-box:focus-within {
  border-color: var(--accent);
}

.search-box .material-icons-round {
  font-size: 18px;
  color: var(--text-muted);
}

.search-box input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  width: 180px;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.topbar-date {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ─── Theme Toggle ───────────────────────── */
.theme-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
  background: var(--bg-input);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: scale(1.05);
}

.theme-toggle .material-icons-round {
  font-size: 18px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle:active .material-icons-round {
  transform: rotate(180deg);
}

/* ─── Page Content ────────────────────────── */
.page-content {
  padding: 28px 32px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ═══════════════════════════════════════════════
   CARDS & GRID
   ═══════════════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.stat-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.stat-card-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.stat-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.stat-card-icon.gold {
  background: var(--accent-dim);
  color: var(--accent);
}

.stat-card-icon.green {
  background: var(--success-bg);
  color: var(--success);
}

.stat-card-icon.blue {
  background: var(--info-bg);
  color: var(--info);
}

.stat-card-icon.red {
  background: var(--danger-bg);
  color: var(--danger);
}

.stat-card-value {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 4px;
}

.stat-card-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ─── Content Card ────────────────────────── */
.content-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}

.content-card-header {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.content-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.content-card-title .material-icons-round {
  font-size: 20px;
  color: var(--accent);
}

.content-card-body {
  padding: 20px 24px;
}

/* ─── Two Column Grid ─────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* ═══════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn .material-icons-round {
  font-size: 18px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #c49540);
  color: #0a0a0f;
  box-shadow: 0 2px 12px rgba(212, 168, 83, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-hover), var(--accent));
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(212, 168, 83, 0.35);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(248, 113, 113, 0.2);
}

.btn-danger:hover {
  background: rgba(248, 113, 113, 0.2);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.btn-icon:hover {
  color: var(--text-primary);
  border-color: var(--accent);
}

/* ═══════════════════════════════════════════════
   TABLE
   ═══════════════════════════════════════════════ */
.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

tbody tr {
  transition: background 0.15s;
}

tbody tr:hover {
  background: var(--bg-card-hover);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* ═══════════════════════════════════════════════
   BADGES / STATUS
   ═══════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success {
  background: var(--success-bg);
  color: var(--success);
}

.badge-warning {
  background: var(--warning-bg);
  color: var(--warning);
}

.badge-danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.badge-info {
  background: var(--info-bg);
  color: var(--info);
}

.badge-neutral {
  background: var(--bg-input);
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════ */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.1);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239a9ab0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 16px;
  margin-top: 8px;
  border-top: 1px solid var(--border);
}

/* Toggle Switch */
.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.toggle-track {
  width: 44px;
  height: 24px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 12px;
  position: relative;
  transition: all 0.3s;
}

.toggle-track::after {
  content: '';
  width: 18px;
  height: 18px;
  background: var(--text-secondary);
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: all 0.3s;
}

.toggle input {
  display: none;
}

.toggle input:checked+.toggle-track {
  background: var(--accent-dim);
  border-color: var(--accent);
}

.toggle input:checked+.toggle-track::after {
  background: var(--accent);
  transform: translateX(20px);
}

/* ═══════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  width: 90%;
  max-width: 540px;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-lg);
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-close {
  color: var(--text-muted);
  padding: 4px;
  border-radius: var(--radius-xs);
  transition: all 0.2s;
}

.modal-close:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.modal-body {
  padding: 24px;
}

/* ═══════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-md);
  animation: slideInRight 0.3s ease;
  min-width: 280px;
}

.toast-success {
  background: var(--toast-success-bg, #0d3320);
  color: var(--success);
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.toast-error {
  background: var(--toast-error-bg, #3d1515);
  color: var(--danger);
  border: 1px solid rgba(248, 113, 113, 0.2);
}

.toast-info {
  background: var(--toast-info-bg, #15243d);
  color: var(--info);
  border: 1px solid rgba(96, 165, 250, 0.2);
}

[data-theme="light"] {
  --topbar-bg: rgba(250, 248, 245, 0.85);
  --toast-success-bg: #ecfdf5;
  --toast-error-bg: #fef2f2;
  --toast-info-bg: #eff6ff;
}

[data-theme="light"] .sidebar,
[data-theme="light"] .content-card,
[data-theme="light"] .stat-card,
[data-theme="light"] .modal {
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="light"] .stat-card {
  box-shadow: var(--shadow-sm);
}

[data-theme="light"] .content-card {
  box-shadow: var(--shadow-sm);
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ═══════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state .material-icons-round {
  font-size: 56px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-state h3 {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 0.85rem;
  margin-bottom: 20px;
}

/* ═══════════════════════════════════════════════
   SCHEDULE-SPECIFIC
   ═══════════════════════════════════════════════ */
.schedule-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.date-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.date-nav .date-label {
  font-size: 1.1rem;
  font-weight: 600;
  min-width: 200px;
  text-align: center;
}

.time-slot {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  transition: all 0.2s;
}

.time-slot:hover {
  border-color: var(--border-light);
}

.time-slot-time {
  font-weight: 700;
  font-size: 1rem;
  min-width: 60px;
  color: var(--accent);
}

.time-slot-info {
  flex: 1;
}

.time-slot-client {
  font-weight: 600;
}

.time-slot-service {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.time-slot.available {
  border-style: dashed;
  opacity: 0.5;
}

.time-slot.available:hover {
  opacity: 1;
  border-color: var(--accent);
}

.time-slot.blocked {
  opacity: 0.4;
  background: var(--danger-bg);
}

/* ─── Day Config ──────────────────────────── */
.day-config {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  transition: all 0.2s;
}

.day-config:hover {
  border-color: var(--border-light);
}

.day-config-name {
  font-weight: 600;
  min-width: 100px;
}

.day-config-times {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.day-config.inactive {
  opacity: 0.4;
}

/* ═══════════════════════════════════════════════
   SETTINGS-SPECIFIC
   ═══════════════════════════════════════════════ */
.settings-section {
  margin-bottom: 32px;
}

.settings-section-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
}

/* ═══════════════════════════════════════════════
   CHART (simple bar chart)
   ═══════════════════════════════════════════════ */
.chart-container {
  padding: 16px 0;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 140px;
  padding-top: 8px;
}

.chart-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: flex-end;
}

.chart-bar-fill {
  width: 100%;
  background: linear-gradient(180deg, var(--accent), rgba(212, 168, 83, 0.3));
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.chart-bar-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.chart-bar-value {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════
   LOADING
   ═══════════════════════════════════════════════ */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 150;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0 !important;
  }

  .mobile-menu {
    display: block;
  }

  .topbar {
    padding: 0 16px;
  }

  .page-content {
    padding: 20px 16px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .search-box {
    display: none;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════
   PREMIUM POLISH
   ═══════════════════════════════════════════════ */

/* Smooth transitions on all themed elements */
.sidebar,
.topbar,
.content-card,
.stat-card,
.modal,
.btn-secondary,
.btn-icon,
.form-input,
.form-select,
.form-textarea,
.time-slot,
.day-config,
.badge {
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

/* Chart bars — constrain when few data points */
.chart-bars {
  max-width: 100%;
}

.chart-bar {
  max-width: 80px;
}

/* Sidebar footer breathing */
.sidebar-footer {
  padding: 16px 20px 20px;
}

/* Schedule header alignment */
.schedule-header {
  flex-wrap: wrap;
  gap: 12px;
}

.date-nav {
  flex-wrap: wrap;
}

/* Table hover row highlight - subtle */
tbody tr:hover {
  background: var(--bg-card-hover);
}

/* Form select light mode dropdown arrow */
[data-theme="light"] .form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235a5a72' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

/* Light mode — improved depth via subtle borders + shadows */
[data-theme="light"] .topbar {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .sidebar {
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 1px 0 4px rgba(0, 0, 0, 0.03);
}

/* Light mode — chart bar gradient */
[data-theme="light"] .chart-bar-fill {
  background: linear-gradient(180deg, var(--accent), rgba(184, 137, 46, 0.25));
}

/* Light mode — modal overlay softer */
[data-theme="light"] .modal-overlay {
  background: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .modal {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Light mode — scrollbar */
[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}

/* Stat card — value numbers alignment */
.stat-card-value {
  line-height: 1.1;
}

/* Empty state — better vertical rhythm */
.empty-state {
  padding: 56px 32px;
}

.empty-state .material-icons-round {
  font-size: 48px;
  margin-bottom: 20px;
  opacity: 0.25;
}

.empty-state h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 0.85rem;
  max-width: 320px;
  margin: 0 auto 20px;
  line-height: 1.5;
}

/* Topbar — better vertical centering */
.topbar-right {
  gap: 16px;
}

/* Time slot hover — more premium feel */
.time-slot {
  border-radius: var(--radius-sm);
}

.time-slot:hover {
  box-shadow: var(--shadow-sm);
}

/* Content card header — consistent padding bottom */
.content-card-header {
  padding: 16px 24px;
  min-height: 56px;
}

/* Page content — max-width for ultra-wide screens */
.page-content {
  max-width: 1400px;
}