/* ═══════════════════════════════════════════════════════════ */
/*  FRONTORA.AI ADMIN - Modern SaaS Design System            */
/*  Section 1: Complete CSS Overhaul                          */
/* ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&display=swap');

:root {
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --primary-bg: rgba(99,102,241,0.08);
  --success: #10b981;
  --success-bg: rgba(16,185,129,0.08);
  --warning: #f59e0b;
  --warning-bg: rgba(245,158,11,0.08);
  --danger: #ef4444;
  --danger-bg: rgba(239,68,68,0.08);
  --info: #06b6d4;
  --info-bg: rgba(6,182,212,0.08);
  --sidebar-bg: #0f0f1a;
  --sidebar-hover: rgba(255,255,255,0.06);
  --sidebar-active: rgba(99,102,241,0.2);
  --sidebar-text: #8b8fa3;
  --sidebar-text-active: #fff;
  --body-bg: #f4f6fb;
  --card-bg: #ffffff;
  --card-border: rgba(0,0,0,0.04);
  --card-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
  --card-shadow-hover: 0 4px 12px rgba(0,0,0,0.08);
  --text-primary: #1a1d2e;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border: #e5e7eb;
  --border-light: #f1f3f5;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 15px; }
body { font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif; background: var(--body-bg); color: var(--text-primary); -webkit-font-smoothing: antialiased; }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ═══════════════════════════════════════ */
/*  SIDEBAR                                */
/* ═══════════════════════════════════════ */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: 250px;
  background: var(--sidebar-bg);
  display: flex; flex-direction: column;
  z-index: 100; transition: transform var(--transition);
  border-right: 1px solid rgba(255,255,255,0.04);
}
.sidebar-brand {
  padding: 1.25rem 1.5rem;
  display: flex; align-items: center; gap: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-logo { height: 36px; object-fit: contain; }
.brand-text { color: #fff; font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; }
.sidebar-location {
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-location small { display: block; font-size: 0.68rem; color: var(--sidebar-text); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.15rem; }
.sidebar-location strong { color: #fff; font-size: 0.85rem; font-weight: 500; }

.sidebar-nav { flex: 1; padding: 0.75rem 0; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 1.5rem;
  color: var(--sidebar-text); text-decoration: none;
  font-size: 0.85rem; font-weight: 400;
  transition: all var(--transition);
  border-left: 3px solid transparent;
  margin: 1px 0;
}
.nav-item:hover { color: #fff; background: var(--sidebar-hover); }
.nav-item.active {
  color: var(--sidebar-text-active);
  background: var(--sidebar-active);
  border-left-color: var(--primary);
  font-weight: 500;
}
.nav-item i { width: 18px; text-align: center; font-size: 0.9rem; opacity: 0.8; }
.nav-item.active i { opacity: 1; color: var(--primary-light); }
.nav-divider { height: 1px; background: rgba(255,255,255,0.06); margin: 0.5rem 1.5rem; }

.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  text-align: center;
}
.sidebar-footer a, .sidebar-footer span {
  color: var(--sidebar-text); font-size: 0.7rem;
  text-decoration: none; opacity: 0.6;
  transition: opacity var(--transition);
}
.sidebar-footer a:hover { opacity: 1; }

/* ═══════════════════════════════════════ */
/*  MAIN CONTENT                           */
/* ═══════════════════════════════════════ */
.main-content, .main-wrapper { margin-left: 250px; min-height: 100vh; transition: margin var(--transition); }
.top-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; height: 60px;
  background: rgba(244,246,251,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}
.header-left { display: flex; align-items: center; gap: 0.75rem; }
.sidebar-toggle {
  background: none; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.4rem 0.6rem;
  cursor: pointer; color: var(--text-secondary);
  transition: all var(--transition);
  display: none;
}
.sidebar-toggle:hover { background: var(--card-bg); color: var(--text-primary); }
.page-title { font-size: 1.15rem; font-weight: 600; color: var(--text-primary); letter-spacing: -0.01em; }
.header-right { display: flex; align-items: center; gap: 1rem; }
.header-user { display: flex; align-items: center; gap: 0.75rem; font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); }
.header-user a { color: var(--text-muted); transition: color var(--transition); padding: 0.3rem; }
.header-user a:hover { color: var(--danger); }
.page-content { padding: 1.5rem 2rem 2rem; }

/* ═══════════════════════════════════════ */
/*  ALERTS                                 */
/* ═══════════════════════════════════════ */
.alert {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.75rem 1.25rem; margin: 0 2rem;
  border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 500;
  animation: slideDown 0.3s ease;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.alert-success { background: var(--success-bg); color: #065f46; border: 1px solid rgba(16,185,129,0.15); }
.alert-error { background: var(--danger-bg); color: #991b1b; border: 1px solid rgba(239,68,68,0.15); }

/* ═══════════════════════════════════════ */
/*  STATS GRID                             */
/* ═══════════════════════════════════════ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; margin-bottom: 1.75rem; }
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex; align-items: center; gap: 1rem;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--card-border);
  transition: all var(--transition);
  position: relative; overflow: hidden;
}
.stat-card::after {
  content: ''; position: absolute; top: 0; right: 0;
  width: 80px; height: 80px; border-radius: 50%;
  background: inherit; opacity: 0.04; transform: translate(20px, -20px);
}
.stat-card:hover { box-shadow: var(--card-shadow-hover); transform: translateY(-1px); }
.stat-icon {
  width: 46px; height: 46px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.1rem; flex-shrink: 0;
}
.stat-info h3 { font-size: 1.5rem; font-weight: 700; margin: 0; line-height: 1.2; letter-spacing: -0.02em; color: var(--text-primary); }
.stat-info p { font-size: 0.75rem; color: var(--text-muted); margin: 0.15rem 0 0; font-weight: 500; text-transform: uppercase; letter-spacing: 0.03em; }

/* ═══════════════════════════════════════ */
/*  CARDS                                  */
/* ═══════════════════════════════════════ */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 1.5rem; margin-bottom: 1.5rem; }
.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--card-border);
  overflow: hidden;
}
.card-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
}
.card-header h3 { margin: 0; font-size: 0.95rem; font-weight: 600; color: var(--text-primary); }
.card-body { padding: 1.25rem 1.5rem; }

/* ═══════════════════════════════════════ */
/*  PAGE HEADER                            */
/* ═══════════════════════════════════════ */
.page-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem;
}
.filter-form { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }

/* ═══════════════════════════════════════ */
/*  TABLES                                 */
/* ═══════════════════════════════════════ */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.table th {
  text-align: left; padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted); font-weight: 600;
  font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.06em; white-space: nowrap;
  background: #fafbfc;
}
.table td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
  color: var(--text-primary);
}
.table tr { transition: background var(--transition); }
.table tbody tr:hover { background: #f8f9fd; }
.table a { color: var(--primary); text-decoration: none; font-weight: 500; }
.table a:hover { text-decoration: underline; }
.text-truncate { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ═══════════════════════════════════════ */
/*  BADGES                                 */
/* ═══════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.25rem 0.65rem; border-radius: 20px;
  font-size: 0.7rem; font-weight: 600;
  text-transform: capitalize;
  background: #f1f3f5; color: #495057;
}
.badge-success { background: var(--success-bg); color: #065f46; }
.badge-warning { background: var(--warning-bg); color: #92400e; }
.badge-danger { background: var(--danger-bg); color: #991b1b; }
.badge-info { background: var(--info-bg); color: #0e7490; }
.badge-primary { background: var(--primary-bg); color: var(--primary-dark); }

/* ═══════════════════════════════════════ */
/*  BUTTONS                                */
/* ═══════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--card-bg); color: var(--text-primary);
  font-family: inherit; font-size: 0.85rem; font-weight: 500;
  cursor: pointer; text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn:hover { background: #f3f4f6; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 2px 8px rgba(99,102,241,0.3); }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { background: #059669; }
.btn-danger { background: transparent; color: var(--danger); border-color: rgba(239,68,68,0.3); }
.btn-danger:hover { background: var(--danger-bg); }
.btn-warning { background: var(--warning); color: #fff; border-color: var(--warning); }
.btn-sm { padding: 0.3rem 0.65rem; font-size: 0.78rem; }
.btn-lg { padding: 0.65rem 1.5rem; font-size: 0.9rem; }
.btn-icon { width: 32px; height: 32px; padding: 0; justify-content: center; }
.actions { white-space: nowrap; display: flex; gap: 0.35rem; }

/* ═══════════════════════════════════════ */
/*  FORMS                                  */
/* ═══════════════════════════════════════ */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.form-group { margin-bottom: 0.25rem; }
.form-group.full-width { grid-column: 1 / -1; }
.form-group label {
  display: block; font-weight: 600; font-size: 0.78rem;
  color: var(--text-secondary); margin-bottom: 0.35rem;
  letter-spacing: 0.01em;
}
.form-control {
  width: 100%; padding: 0.55rem 0.85rem;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.85rem; color: var(--text-primary);
  transition: all var(--transition); box-sizing: border-box;
  background: var(--card-bg);
}
.form-control:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg);
}
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 70px; }
select.form-control { appearance: auto; cursor: pointer; }
.form-help { display: block; font-size: 0.72rem; color: var(--text-muted); margin-top: 0.25rem; }
.form-actions { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border-light); display: flex; gap: 0.75rem; }
.checkbox-label {
  display: flex; align-items: center; gap: 0.5rem;
  font-weight: 400 !important; cursor: pointer;
  font-size: 0.85rem; color: var(--text-primary);
}
.checkbox-label input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--primary);
}
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.5rem; }

/* ═══════════════════════════════════════ */
/*  DETAIL VIEW                            */
/* ═══════════════════════════════════════ */
.detail-row {
  display: flex; padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.85rem;
}
.detail-row .label { font-weight: 600; width: 130px; color: var(--text-secondary); flex-shrink: 0; }
.list-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.6rem 0; border-bottom: 1px solid var(--border-light);
}

/* ═══════════════════════════════════════ */
/*  PAGINATION                             */
/* ═══════════════════════════════════════ */
.pagination { display: flex; gap: 0.25rem; margin-top: 1.25rem; justify-content: center; }
.pagination a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 0.5rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  text-decoration: none; color: var(--text-primary);
  font-size: 0.8rem; font-weight: 500;
  transition: all var(--transition);
}
.pagination a.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination a:hover:not(.active) { background: #f3f4f6; }

/* ═══════════════════════════════════════ */
/*  ACTIVITY LIST                          */
/* ═══════════════════════════════════════ */
.activity-item {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.65rem 0; border-bottom: 1px solid var(--border-light);
  font-size: 0.83rem;
}
.activity-item i { color: var(--primary); margin-top: 0.25rem; font-size: 0.5rem; }
.activity-item small { color: var(--text-muted); margin-left: auto; white-space: nowrap; font-size: 0.72rem; }
.text-muted { color: var(--text-muted); }

/* ═══════════════════════════════════════ */
/*  LOCATION SWITCHER                      */
/* ═══════════════════════════════════════ */
.location-switcher select {
  padding: 0.4rem 0.75rem; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-family: inherit;
  font-size: 0.8rem; background: var(--card-bg); color: var(--text-primary);
  cursor: pointer;
}

/* ═══════════════════════════════════════ */
/*  AUTH PAGES                             */
/* ═══════════════════════════════════════ */
.auth-body {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f0f1a 0%, #1a1a3e 50%, #0f0f1a 100%);
  padding: 1rem;
}
.auth-container {
  width: 100%; max-width: 420px;
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.auth-brand { text-align: center; margin-bottom: 2rem; }
.auth-brand img { height: 48px; margin-bottom: 0.75rem; }
.auth-brand h1 { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.25rem; }
.auth-brand p { font-size: 0.85rem; color: var(--text-secondary); }
.auth-form .form-group { margin-bottom: 1.15rem; }
.auth-form .btn-primary { width: 100%; padding: 0.7rem; font-size: 0.9rem; justify-content: center; border-radius: var(--radius); }
.auth-footer { text-align: center; margin-top: 1.25rem; }
.auth-footer a { color: var(--primary); text-decoration: none; font-size: 0.85rem; font-weight: 500; }
.auth-footer a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════ */
/*  EMPTY STATE                            */
/* ═══════════════════════════════════════ */
.empty-state {
  text-align: center; padding: 3rem 1.5rem;
  color: var(--text-muted);
}
.empty-state i { font-size: 2.5rem; margin-bottom: 0.75rem; opacity: 0.3; }
.empty-state p { font-size: 0.9rem; }
.empty-state a { color: var(--primary); font-weight: 500; }

/* ═══════════════════════════════════════ */
/*  RESPONSIVE                             */
/* ═══════════════════════════════════════ */
@media (max-width: 1024px) {
  .sidebar-toggle { display: flex; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,0.3); }
  .main-content, .main-wrapper { margin-left: 0; }
  .page-content { padding: 1.25rem 1rem; }
  .top-header { padding: 0 1rem; }
  .alert { margin: 0 1rem; }
  .admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  html { font-size: 13px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .stat-card { padding: 1rem; }
  .stat-info h3 { font-size: 1.2rem; }
  .form-grid { grid-template-columns: 1fr; }
  .filter-form { width: 100%; flex-direction: column; }
  .filter-form .form-control { width: 100%; }
  .page-header { flex-direction: column; align-items: stretch; }
  .page-header .btn-primary { text-align: center; justify-content: center; }
  .table th:nth-child(n+5), .table td:nth-child(n+5) { display: none; }
  .auth-container { padding: 1.75rem; border-radius: var(--radius-lg); }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { padding: 0.85rem 1rem; }
  .page-content { padding: 1rem 0.75rem; }
}

/* ═══════════════════════════════════════ */
/*  SIDEBAR OVERLAY (MOBILE)               */
/* ═══════════════════════════════════════ */
.sidebar-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 99; display: none;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.show { display: block; }

/* ═══════════════════════════════════════ */
/*  SEARCHABLE SELECT                      */
/* ═══════════════════════════════════════ */
.search-select-wrapper { position: relative; }
.search-select-input {
  width: 100%; padding: 0.55rem 0.85rem;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.85rem;
  background: var(--card-bg); cursor: pointer;
}
.search-select-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }
.search-select-dropdown {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--card-bg); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  max-height: 200px; overflow-y: auto; z-index: 200; display: none;
}
.search-select-dropdown.show { display: block; }
.search-select-option {
  padding: 0.5rem 0.85rem; cursor: pointer; font-size: 0.85rem;
  transition: background 0.1s;
}
.search-select-option:hover { background: var(--primary-bg); color: var(--primary-dark); }
.search-select-option.selected { background: var(--primary-bg); font-weight: 600; }

/* ═══════════════════════════════════════ */
/*  PASSWORD STRENGTH                      */
/* ═══════════════════════════════════════ */
.password-wrapper { position: relative; }
.password-wrapper .btn-generate {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  padding: 0.25rem 0.6rem; font-size: 0.72rem;
}
.password-strength { display: flex; gap: 3px; margin-top: 0.35rem; }
.password-strength .bar { flex: 1; height: 3px; border-radius: 2px; background: var(--border); transition: background var(--transition); }
.password-strength .bar.weak { background: var(--danger); }
.password-strength .bar.medium { background: var(--warning); }
.password-strength .bar.strong { background: var(--success); }
.password-strength-text { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.15rem; }

/* ═══════════════════════════════════════ */
/*  SETTINGS GROUPS                        */
/* ═══════════════════════════════════════ */
.settings-section { margin-bottom: 1.5rem; }
.settings-section .card-header { background: #fafbfc; }
.color-input-wrapper { display: flex; gap: 8px; align-items: center; }
.color-input-wrapper input[type="color"] {
  width: 42px; height: 38px; padding: 2px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; background: transparent;
}
/* Section 2: Form improvements CSS */
.form-section-title{font-size:.9rem;font-weight:600;color:#4f46e5;margin:1.8rem 0 .8rem;padding-bottom:.5rem;border-bottom:1px solid #e5e7eb;display:flex;align-items:center;gap:.5rem}
.form-section-title:first-of-type{margin-top:0}
.form-section-title i{font-size:.85rem;opacity:.8}

/* Password tools */
.password-input-wrap{display:flex;gap:.5rem;align-items:center}
.password-input-wrap input{flex:1}
.password-input-wrap .btn{padding:.45rem .65rem;font-size:.85rem;white-space:nowrap;background:#f3f4f6;border:1px solid #d1d5db;border-radius:.5rem}
.password-input-wrap .btn:hover{background:#e5e7eb}
.password-strength{margin-top:.4rem}
.strength-bars{display:flex;gap:3px}
.strength-bars span{height:4px;flex:1;border-radius:2px;background:#e5e7eb;transition:background .3s}
.strength-bars.weak span:nth-child(1){background:#ef4444}
.strength-bars.medium span:nth-child(1),.strength-bars.medium span:nth-child(2){background:#f59e0b}
.strength-bars.strong span:nth-child(1),.strength-bars.strong span:nth-child(2),.strength-bars.strong span:nth-child(3){background:#22c55e}
.strength-bars.very-strong span{background:#06b6d4}
.strength-label{font-size:.75rem;color:#6b7280;margin-top:.15rem;display:block}
.password-match-msg{font-size:.75rem;display:block;margin-top:.25rem}
.match-ok{color:#22c55e}
.match-fail{color:#ef4444}

/* Features grid for plans */
.features-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:.6rem;margin:.5rem 0 1.5rem}
.feature-checkbox{display:flex;align-items:center;gap:.6rem;padding:.65rem .85rem;border:1.5px solid #e5e7eb;border-radius:.6rem;cursor:pointer;transition:all .2s;font-size:.85rem;background:#fff}
.feature-checkbox:hover{border-color:#a5b4fc;background:#eef2ff}
.feature-checkbox.checked{border-color:#6366f1;background:#eef2ff;color:#4338ca}
.feature-checkbox input{display:none}
.feature-checkbox i{font-size:.9rem;opacity:.6;width:18px;text-align:center}
.feature-checkbox.checked i{opacity:1;color:#6366f1}

/* Features display (show page) */
.features-display{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:.5rem}
.feature-item{padding:.5rem .75rem;border-radius:.5rem;font-size:.85rem;display:flex;align-items:center;gap:.5rem}
.feature-item.enabled{color:#166534;background:#f0fdf4}
.feature-item.disabled{color:#9ca3af;background:#f9fafb}
.feature-item i{font-size:.85rem}

/* Badge info color */
.badge-info{background:rgba(99,102,241,.12);color:#6366f1}

/* Searchable select tweaks */
.searchable-select-wrap{position:relative}
.searchable-select-wrap .ss-search{width:100%;padding:.55rem .75rem;border:1.5px solid #d1d5db;border-radius:.5rem;font-size:.875rem;outline:none;background:#fff}
.searchable-select-wrap .ss-search:focus{border-color:#6366f1;box-shadow:0 0 0 3px rgba(99,102,241,.1)}
.searchable-select-wrap .ss-dropdown{position:absolute;top:100%;left:0;right:0;background:#fff;border:1.5px solid #d1d5db;border-top:0;border-radius:0 0 .5rem .5rem;max-height:200px;overflow-y:auto;z-index:999;display:none;box-shadow:0 4px 12px rgba(0,0,0,.1)}
.searchable-select-wrap.open .ss-dropdown{display:block}
.searchable-select-wrap .ss-option{padding:.5rem .75rem;cursor:pointer;font-size:.85rem}
.searchable-select-wrap .ss-option:hover,.searchable-select-wrap .ss-option.highlighted{background:#eef2ff;color:#4338ca}
.searchable-select-wrap .ss-option.selected{background:#6366f1;color:#fff}
.searchable-select-wrap .ss-empty{padding:.5rem .75rem;color:#9ca3af;font-size:.85rem}

@media(max-width:768px){
  .features-grid{grid-template-columns:1fr 1fr}
  .features-display{grid-template-columns:1fr}
  .password-input-wrap{flex-wrap:wrap}
}
@media(max-width:480px){
  .features-grid{grid-template-columns:1fr}
}/* ═══════════════════════════════════════════════════════════ */
/*  SECTION 3: Font Fix + Enhanced Views                      */
/* ═══════════════════════════════════════════════════════════ */

/* ─── JSON Array Editor ─── */
.json-editor { margin-bottom: 1rem; }
.json-editor-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.5rem;
}
.json-editor-header label { margin-bottom: 0; }
.json-editor-rows { display: flex; flex-direction: column; gap: 0.5rem; }
.json-editor-row {
  display: flex; gap: 0.5rem; align-items: center;
  padding: 0.65rem 0.85rem;
  background: #f8f9fd;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.json-editor-row:hover { border-color: var(--border); background: #f3f4f8; }
.json-editor-row .form-control { background: #fff; }
.json-editor-row .row-fields { display: flex; gap: 0.5rem; flex: 1; flex-wrap: wrap; }
.json-editor-row .row-fields .form-control { min-width: 100px; }
.json-editor-row .row-fields .field-sm { max-width: 100px; }
.json-editor-row .row-fields .field-md { max-width: 160px; }
.btn-remove-row {
  width: 30px; height: 30px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--radius-sm); color: var(--danger);
  cursor: pointer; transition: all var(--transition); flex-shrink: 0;
}
.btn-remove-row:hover { background: var(--danger-bg); border-color: var(--danger); }
.btn-add-row {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.85rem; margin-top: 0.35rem;
  background: var(--primary-bg); color: var(--primary);
  border: 1px dashed rgba(99,102,241,0.3); border-radius: var(--radius-sm);
  cursor: pointer; font-size: 0.8rem; font-weight: 500;
  transition: all var(--transition);
}
.btn-add-row:hover { background: rgba(99,102,241,0.15); border-color: var(--primary); }

/* ─── Simple Text List Editor ─── */
.text-list-editor .json-editor-row {
  padding: 0.45rem 0.65rem;
}
.text-list-editor .json-editor-row .form-control {
  flex: 1;
}
.text-list-editor .row-number {
  font-size: 0.72rem; color: var(--text-muted);
  font-weight: 600; min-width: 20px; text-align: center;
}

/* ─── Prompt Preview ─── */
.prompt-preview {
  position: relative;
}
.prompt-preview textarea {
  font-family: 'DM Sans', monospace;
  line-height: 1.7;
}
.prompt-char-count {
  position: absolute; bottom: 8px; right: 12px;
  font-size: 0.7rem; color: var(--text-muted);
  background: rgba(255,255,255,0.9); padding: 0 4px;
  border-radius: 3px;
}

/* ─── Model Detail Page ─── */
.model-prompt-box {
  background: #f8f9fd; border: 1px solid var(--border-light);
  border-radius: var(--radius-sm); padding: 1rem 1.25rem;
  font-size: 0.85rem; line-height: 1.7; color: var(--text-primary);
  white-space: pre-wrap; word-wrap: break-word;
  max-height: 300px; overflow-y: auto;
}
.model-greeting-box {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid rgba(16,185,129,0.15);
  border-radius: var(--radius-sm); padding: 1rem 1.25rem;
  font-size: 0.85rem; line-height: 1.7; color: #166534;
  white-space: pre-wrap;
}
.service-template-table .table td { font-size: 0.82rem; }
.service-template-table .price-col { font-weight: 600; color: var(--text-primary); }
.questions-list { list-style: none; padding: 0; margin: 0; }
.questions-list li {
  display: flex; align-items: flex-start; gap: 0.65rem;
  padding: 0.55rem 0; border-bottom: 1px solid var(--border-light);
  font-size: 0.85rem;
}
.questions-list li:last-child { border-bottom: none; }
.questions-list .q-num {
  min-width: 24px; height: 24px;
  background: var(--primary-bg); color: var(--primary);
  border-radius: 50%; font-size: 0.72rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ─── Dashboard Plan Distribution ─── */
.plan-dist-grid { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.plan-dist-item {
  flex: 1; min-width: 120px;
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 1rem;
  text-align: center; transition: all var(--transition);
}
.plan-dist-item:hover { box-shadow: var(--card-shadow-hover); }
.plan-dist-count { font-size: 1.75rem; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.plan-dist-name { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.03em; margin-top: 0.2rem; }
.plan-dist-bar { height: 4px; border-radius: 4px; background: var(--border-light); margin-top: 0.65rem; overflow: hidden; }
.plan-dist-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; }

/* ─── Activity Log Enhanced ─── */
.activity-action-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.2rem 0.55rem; border-radius: 4px;
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.03em;
}
.activity-action-badge.action-create { background: var(--success-bg); color: #065f46; }
.activity-action-badge.action-update { background: var(--info-bg); color: #0e7490; }
.activity-action-badge.action-delete { background: var(--danger-bg); color: #991b1b; }
.activity-action-badge.action-login { background: var(--primary-bg); color: var(--primary-dark); }
.activity-action-badge.action-other { background: #f1f3f5; color: #495057; }
.activity-entity { font-weight: 500; color: var(--text-primary); }
.activity-desc { color: var(--text-secondary); }
.activity-time { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }
.activity-filters { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }

/* ─── Category badge for models ─── */
.category-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.25rem 0.65rem; border-radius: 20px;
  font-size: 0.72rem; font-weight: 500;
  background: #f0f1ff; color: #4338ca;
}

/* ─── JSON Code View Toggle ─── */
.json-toggle-wrap { margin-top: 0.5rem; }
.json-toggle-btn {
  font-size: 0.75rem; color: var(--text-muted);
  background: none; border: none; cursor: pointer;
  text-decoration: underline; padding: 0;
}
.json-toggle-btn:hover { color: var(--primary); }
.json-code-view {
  display: none; margin-top: 0.5rem;
  background: #1e1e2e; color: #cdd6f4;
  border-radius: var(--radius-sm); padding: 0.85rem 1rem;
  font-family: 'Fira Code', 'Consolas', monospace; font-size: 0.78rem;
  line-height: 1.6; overflow-x: auto; max-height: 250px;
  white-space: pre-wrap; word-wrap: break-word;
}
.json-code-view.show { display: block; }

/* ─── Dashboard Welcome Section ─── */
.dashboard-welcome-card {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
  border-radius: var(--radius-lg); padding: 1.5rem 2rem;
  color: #fff; margin-bottom: 1.5rem;
  position: relative; overflow: hidden;
}
.dashboard-welcome-card::after {
  content: ''; position: absolute; top: -30px; right: -30px;
  width: 150px; height: 150px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.dashboard-welcome-card h2 { font-size: 1.35rem; font-weight: 700; margin-bottom: 0.3rem; }
.dashboard-welcome-card p { font-size: 0.88rem; opacity: 0.85; margin: 0; }

@media (max-width: 768px) {
  .json-editor-row .row-fields { flex-direction: column; }
  .json-editor-row .row-fields .field-sm,
  .json-editor-row .row-fields .field-md { max-width: none; }
  .plan-dist-grid { flex-direction: column; }
  .activity-filters { flex-direction: column; }
  .activity-filters .form-control { width: 100%; }
}

/* ─── Sidebar Header Redesign ─── */
.sidebar-header {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; gap: 0.85rem;
}
.sidebar-header-logo {
  height: 38px; width: auto; border-radius: 8px; flex-shrink: 0;
}
.sidebar-header-info { flex: 1; min-width: 0; }
.sidebar-header-name {
  color: #fff; font-weight: 600; font-size: 0.92rem;
  line-height: 1.3; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.sidebar-header-role {
  font-size: 0.68rem; color: rgba(255,255,255,0.4);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-top: 0.1rem;
}

/* ─── Inline Filter Bar ─── */
.filter-bar {
  display: flex; align-items: center; gap: 0.5rem;
  flex-wrap: wrap; flex: 1;
}
.filter-bar .form-control {
  font-size: 0.82rem; padding: 0.4rem 0.7rem;
}
.filter-bar .filter-search {
  min-width: 180px; max-width: 240px; flex: 1;
}
.filter-bar .filter-select {
  width: auto; min-width: 120px; max-width: 150px;
}
.filter-bar .btn-reset {
  padding: 0.4rem 0.7rem; font-size: 0.78rem;
  color: var(--text-muted); background: transparent;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; transition: all var(--transition);
  text-decoration: none; display: inline-flex;
  align-items: center; gap: 0.3rem; white-space: nowrap;
}
.filter-bar .btn-reset:hover { color: var(--danger); border-color: var(--danger); background: var(--danger-bg); }
@media (max-width: 768px) {
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar .filter-search, .filter-bar .filter-select { max-width: none; min-width: auto; }
  .page-header { flex-direction: column; align-items: stretch; gap: 0.75rem; }
}
/* ═══════════════════════════════════════════
   SECTION 4: Industry Modules Styles
   ═══════════════════════════════════════════ */

/* ── Industry Card Grid ── */
.industry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
.industry-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}
.industry-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.industry-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}
.industry-card-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
}
.industry-card-name {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.35rem 0;
  color: #1e293b;
}
.industry-card-desc {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0 0 0.75rem 0;
  flex: 1;
  line-height: 1.4;
}
.industry-card-footer {
  display: flex;
  gap: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f1f5f9;
}
.industry-card-stat {
  font-size: 0.8rem;
  color: #94a3b8;
}
.industry-card-stat i {
  margin-right: 0.3rem;
}

/* ── Industry Detail Header ── */
.industry-detail-header {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.industry-detail-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.industry-detail-info h2 {
  margin: 0 0 0.35rem 0;
  font-size: 1.35rem;
}
.industry-detail-info p {
  margin: 0;
  color: #64748b;
  font-size: 0.9rem;
}

/* ── Modules Grid (show page) ── */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.module-card {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  transition: all 0.15s;
}
.module-card:hover {
  border-color: #cbd5e1;
  background: #fff;
}
.module-card-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1rem;
  flex-shrink: 0;
}
.module-card-body {
  flex: 1;
  min-width: 0;
}
.module-card-body h4 {
  margin: 0 0 0.2rem 0;
  font-size: 0.95rem;
  font-weight: 600;
}
.module-card-body p {
  margin: 0;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.4;
}
.module-card-actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

/* ── Module Checkbox Cards (location form) ── */
.modules-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0.75rem;
}
.module-check-card {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem 1rem;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.module-check-card:hover {
  border-color: #cbd5e1;
  background: #fff;
}
.module-check-card:has(input:checked) {
  border-color: var(--primary);
  background: #f0f0ff;
}
.module-check-card input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  flex-shrink: 0;
  cursor: pointer;
}
.module-check-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 0.9rem;
  flex-shrink: 0;
}
.module-check-card:has(input:checked) .module-check-icon {
  background: linear-gradient(135deg, var(--primary), #6366f1);
  color: #fff;
}
.module-check-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.module-check-info strong {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e293b;
}
.module-check-info span {
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.modules-toggle-row {
  display: flex;
  gap: 0.5rem;
}

/* ── Module Badges (location show page) ── */
.modules-grid-sm {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.6rem;
}
.module-badge {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  padding: 0.6rem 0.85rem;
  background: #f0f0ff;
  border: 1px solid #e0e7ff;
  border-radius: 8px;
}
.module-badge i {
  color: var(--primary);
  font-size: 0.9rem;
  width: 20px;
  text-align: center;
}
.module-badge strong {
  font-size: 0.85rem;
  display: block;
}
.module-badge small {
  font-size: 0.75rem;
  color: #64748b;
  display: block;
  line-height: 1.2;
}

/* ── Icon Preview ── */
.module-icon-preview {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1rem;
  flex-shrink: 0;
}

/* ── Model Prompt/Greeting boxes ── */
.model-prompt-box, .model-greeting-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.model-greeting-box {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .industry-grid { grid-template-columns: 1fr; }
  .modules-grid { grid-template-columns: 1fr; }
  .modules-checklist { grid-template-columns: 1fr; }
  .modules-grid-sm { grid-template-columns: 1fr; }
  .industry-detail-header { flex-direction: column; }
}
/* ═══════════════════════════════════════════════
   Pack 2 Section 1 — Dashboard, Services, Staff
   Append this to public/css/admin.css
   ═══════════════════════════════════════════════ */

/* ── Dashboard Grid ── */
.dashboard-grid { display:flex; flex-direction:column; gap:1.5rem; }
.stat-cards { display:grid; grid-template-columns:repeat(auto-fit, minmax(220px,1fr)); gap:1rem; }
.stat-card { background:#fff; border:1px solid #e2e8f0; border-radius:12px; padding:1.25rem; display:flex; flex-wrap:wrap; align-items:center; gap:1rem; }
.stat-card-icon { width:48px; height:48px; border-radius:12px; display:flex; align-items:center; justify-content:center; color:#fff; font-size:1.2rem; flex-shrink:0; }
.stat-card-info { flex:1; min-width:0; }
.stat-card-value { font-size:1.75rem; font-weight:700; color:#0f172a; line-height:1; }
.stat-card-label { font-size:.85rem; color:#64748b; margin-top:2px; }
.stat-card-footer { width:100%; font-size:.78rem; color:#94a3b8; border-top:1px solid #f1f5f9; padding-top:.5rem; margin-top:0; }

.stat-cards-sm { grid-template-columns:repeat(auto-fit, minmax(180px,1fr)); }
.stat-card-mini { background:#f8fafc; border:1px solid #e2e8f0; border-radius:8px; padding:.75rem 1rem; display:flex; align-items:center; gap:.75rem; font-size:.9rem; color:#475569; }
.stat-card-mini i { color:#64748b; font-size:1.1rem; }

/* ── Dashboard Columns ── */
.dashboard-columns { display:grid; grid-template-columns:1fr 1fr; gap:1.5rem; }
@media(max-width:900px){ .dashboard-columns { grid-template-columns:1fr; } }
.dash-panel { background:#fff; border:1px solid #e2e8f0; border-radius:12px; overflow:hidden; }
.dash-panel-header { display:flex; align-items:center; justify-content:space-between; padding:1rem 1.25rem; border-bottom:1px solid #f1f5f9; }
.dash-panel-header h3 { font-size:.95rem; font-weight:600; color:#1e293b; display:flex; align-items:center; gap:.5rem; margin:0; }
.dash-panel-body { padding:0; }

/* Mini table inside panels */
.table-mini { width:100%; border-collapse:collapse; font-size:.85rem; }
.table-mini thead th { padding:.5rem 1rem; background:#f8fafc; color:#64748b; font-weight:500; text-align:left; font-size:.78rem; text-transform:uppercase; letter-spacing:.04em; }
.table-mini tbody td { padding:.6rem 1rem; border-top:1px solid #f1f5f9; color:#334155; }
.table-mini tbody tr:hover { background:#f8fafc; }

/* Appointment list inside dashboard */
.appt-list { display:flex; flex-direction:column; }
.appt-item { display:flex; align-items:center; gap:.75rem; padding:.65rem 1.25rem; border-bottom:1px solid #f1f5f9; }
.appt-item:last-child { border-bottom:0; }
.appt-time { font-size:.85rem; font-weight:600; color:#334155; min-width:50px; }
.appt-bar { width:3px; height:32px; border-radius:2px; flex-shrink:0; }
.appt-details { flex:1; min-width:0; }
.appt-name { font-size:.88rem; font-weight:500; color:#1e293b; }
.appt-meta { font-size:.78rem; color:#94a3b8; display:flex; gap:.75rem; }

/* Empty state small */
.empty-state-sm { padding:2rem; text-align:center; color:#94a3b8; }
.empty-state-sm i { font-size:2rem; margin-bottom:.5rem; display:block; }

/* ── Page Headers ── */
.page-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:1.25rem; flex-wrap:wrap; gap:.75rem; }
.page-header-left { display:flex; align-items:center; gap:.75rem; }
.page-header-left h2 { margin:0; font-size:1.3rem; font-weight:700; color:#0f172a; }
.record-count { font-size:.85rem; color:#64748b; background:#f1f5f9; padding:2px 10px; border-radius:12px; }

/* ── Filters Bar ── */
.filters-bar { margin-bottom:1.25rem; }
.filters-form { display:flex; gap:.5rem; flex-wrap:wrap; align-items:center; }
.filter-group { display:flex; gap:.5rem; align-items:center; }
.form-control-sm { padding:.45rem .75rem; font-size:.85rem; border-radius:8px; }

/* ── Empty State ── */
.empty-state { text-align:center; padding:3rem 1rem; background:#fff; border:1px solid #e2e8f0; border-radius:12px; }
.empty-state i { font-size:3rem; color:#cbd5e1; margin-bottom:1rem; display:block; }
.empty-state h3 { font-size:1.15rem; color:#334155; margin-bottom:.5rem; }
.empty-state p { color:#64748b; font-size:.9rem; margin-bottom:1.25rem; }

/* ── Data Table ── */
.table-responsive { overflow-x:auto; background:#fff; border:1px solid #e2e8f0; border-radius:12px; }
.data-table { width:100%; border-collapse:collapse; }
.data-table thead th { padding:.75rem 1rem; background:#f8fafc; color:#64748b; font-weight:500; font-size:.8rem; text-transform:uppercase; letter-spacing:.04em; text-align:left; border-bottom:1px solid #e2e8f0; white-space:nowrap; }
.data-table tbody td { padding:.75rem 1rem; border-top:1px solid #f1f5f9; color:#334155; font-size:.88rem; vertical-align:middle; }
.data-table tbody tr:hover { background:#f8fafc; }
.cell-primary { font-weight:500; color:#0f172a; }
.cell-secondary { font-size:.78rem; color:#94a3b8; margin-top:2px; }
.text-right { text-align:right; }
.text-muted { color:#94a3b8; }
.text-danger { color:#ef4444 !important; }
.actions-cell { white-space:nowrap; display:flex; gap:.25rem; justify-content:flex-end; }
.inline-form { display:inline; }

/* ── Badges ── */
.badge { display:inline-block; padding:2px 10px; border-radius:12px; font-size:.75rem; font-weight:500; white-space:nowrap; }
.badge-success { background:#dcfce7; color:#15803d; }
.badge-danger { background:#fee2e2; color:#dc2626; }
.badge-warning { background:#fef3c7; color:#b45309; }
.badge-info { background:#e0f2fe; color:#0369a1; }
.badge-default { background:#f1f5f9; color:#475569; }

/* ── Tags ── */
.tag { display:inline-block; padding:2px 8px; background:#f1f5f9; color:#475569; border-radius:6px; font-size:.78rem; margin:2px; }

/* ── Form Card ── */
.form-card { background:#fff; border:1px solid #e2e8f0; border-radius:12px; padding:1.5rem; max-width:800px; }
.form-grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:1rem; }
.span-2 { grid-column: span 2; }
@media(max-width:640px){ .form-grid-2 { grid-template-columns:1fr; } .span-2 { grid-column:span 1; } }
.form-group { display:flex; flex-direction:column; gap:.35rem; }
.form-label { font-size:.85rem; font-weight:500; color:#334155; }
.form-label.required::after { content:' *'; color:#ef4444; }
.form-control { padding:.55rem .75rem; border:1px solid #d1d5db; border-radius:8px; font-size:.9rem; color:#1e293b; background:#fff; transition:border-color .15s; }
.form-control:focus { outline:none; border-color:#3b82f6; box-shadow:0 0 0 3px rgba(59,130,246,.1); }
textarea.form-control { resize:vertical; }
.form-help { font-size:.78rem; color:#94a3b8; }
.form-actions { display:flex; gap:.75rem; justify-content:flex-end; margin-top:1.5rem; padding-top:1rem; border-top:1px solid #f1f5f9; }
.form-section { margin-top:1.5rem; padding-top:1.25rem; border-top:1px solid #f1f5f9; }
.form-section-title { font-size:.95rem; font-weight:600; color:#1e293b; display:flex; align-items:center; gap:.5rem; margin:0 0 .5rem; }

/* Checkbox grid */
.checkbox-grid { display:flex; flex-wrap:wrap; gap:.5rem; margin-top:.5rem; }
.checkbox-card { cursor:pointer; display:flex; align-items:center; }
.checkbox-card input { display:none; }
.checkbox-card-body { padding:.4rem .85rem; background:#f8fafc; border:1px solid #e2e8f0; border-radius:8px; font-size:.85rem; color:#475569; display:flex; align-items:center; gap:.5rem; transition:all .15s; }
.checkbox-card input:checked + .checkbox-card-body { background:#eff6ff; border-color:#3b82f6; color:#1d4ed8; font-weight:500; }
.checkbox-card-dot { width:10px; height:10px; border-radius:50%; flex-shrink:0; }

/* Toggle */
.toggle-label { display:flex; align-items:center; gap:.5rem; cursor:pointer; font-size:.88rem; color:#334155; }
.toggle-stack { display:flex; flex-direction:column; gap:.5rem; }

/* Color picker */
.color-picker-row { display:flex; align-items:center; gap:.75rem; }
.form-control-color { width:48px; height:36px; padding:2px; border:1px solid #d1d5db; border-radius:8px; cursor:pointer; }
.color-preview { width:24px; height:24px; border-radius:6px; border:1px solid #e2e8f0; }

/* ── Buttons (additions) ── */
.btn-sm { padding:.35rem .75rem; font-size:.8rem; }
.btn-ghost { background:transparent; color:#475569; border:1px solid #e2e8f0; }
.btn-ghost:hover { background:#f8fafc; }
.btn-primary { background:#3b82f6; color:#fff; border:none; }
.btn-primary:hover { background:#2563eb; }

/* ── Staff Grid ── */
.staff-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(340px,1fr)); gap:1rem; }
.staff-card { background:#fff; border:1px solid #e2e8f0; border-radius:12px; overflow:hidden; }
.staff-card-header { display:flex; align-items:center; gap:.75rem; padding:1rem 1.25rem; }
.staff-avatar { width:42px; height:42px; border-radius:50%; display:flex; align-items:center; justify-content:center; color:#fff; font-weight:700; font-size:1.1rem; flex-shrink:0; }
.staff-info { flex:1; min-width:0; }
.staff-name { font-weight:600; color:#0f172a; font-size:.95rem; }
.staff-meta { font-size:.78rem; color:#94a3b8; display:flex; flex-direction:column; gap:1px; }
.staff-meta i { width:14px; }
.staff-badges { display:flex; flex-direction:column; gap:4px; align-items:flex-end; }
.staff-card-services { padding:.5rem 1.25rem; border-top:1px solid #f1f5f9; }
.staff-card-actions { display:flex; gap:.5rem; padding:.75rem 1.25rem; border-top:1px solid #f1f5f9; }

/* Sidebar location switcher */
.sidebar-location { display:flex; align-items:center; justify-content:space-between; padding:.6rem 1.25rem; margin:0 .75rem .5rem; background:rgba(255,255,255,.06); border-radius:8px; font-size:.82rem; }
.sidebar-location-name { color:#e2e8f0; display:flex; align-items:center; gap:.4rem; font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sidebar-location-switch { color:#94a3b8; text-decoration:none; font-size:.75rem; display:flex; align-items:center; gap:.3rem; flex-shrink:0; }
.sidebar-location-switch:hover { color:#fff; }

/* Impersonation Banner */
.impersonation-banner { background:linear-gradient(135deg,#f59e0b,#d97706); color:#fff; padding:.6rem 1.25rem; display:flex; align-items:center; gap:.75rem; font-size:.88rem; border-radius:8px; margin-bottom:1rem; }
.impersonation-banner i { font-size:1.1rem; }
.btn-return-admin { background:rgba(255,255,255,.2); color:#fff; padding:.3rem .75rem; border-radius:6px; text-decoration:none; font-size:.82rem; margin-left:auto; display:flex; align-items:center; gap:.4rem; }
.btn-return-admin:hover { background:rgba(255,255,255,.35); }
.btn-warning { background:#f59e0b; color:#fff; border:none; padding:.45rem .85rem; border-radius:8px; cursor:pointer; font-size:.85rem; }
.btn-warning:hover { background:#d97706; }
.page-header-right { display:flex; gap:.5rem; align-items:center; }

/* ═══════════════════════════════════════════════
   Pack 2 Section 2 — Customers + Calls
   ═══════════════════════════════════════════════ */

/* ── Show Grid / Detail Pages ── */
.show-grid { display:grid; grid-template-columns:1fr 1fr; gap:1rem; margin-bottom:1.5rem; }
@media(max-width:900px){ .show-grid { grid-template-columns:1fr; } }
.card { background:#fff; border:1px solid #e2e8f0; border-radius:12px; overflow:hidden; }
.card-header { padding:.85rem 1.25rem; border-bottom:1px solid #f1f5f9; }
.card-header h3 { font-size:.92rem; font-weight:600; color:#1e293b; display:flex; align-items:center; gap:.5rem; margin:0; }
.card-body { padding:1rem 1.25rem; }
.detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:.65rem; }
.detail-item { display:flex; flex-direction:column; gap:2px; }
.detail-item label { font-size:.75rem; color:#94a3b8; text-transform:uppercase; letter-spacing:.04em; font-weight:500; }
.detail-item span { font-size:.88rem; color:#1e293b; }
.stat-value { font-size:1.15rem; font-weight:700; color:#0f172a; }
.detail-notes { margin-top:.75rem; padding-top:.75rem; border-top:1px solid #f1f5f9; }
.detail-notes label { font-size:.78rem; color:#94a3b8; text-transform:uppercase; letter-spacing:.04em; font-weight:500; display:block; margin-bottom:.25rem; }
.detail-notes p { font-size:.88rem; color:#334155; margin:0; }
.notes-block { margin-top:.75rem; font-size:.88rem; color:#475569; line-height:1.6; white-space:pre-wrap; }

/* ── Section Blocks ── */
.section-block { background:#fff; border:1px solid #e2e8f0; border-radius:12px; overflow:hidden; margin-bottom:1.5rem; }
.section-header { padding:.85rem 1.25rem; border-bottom:1px solid #f1f5f9; display:flex; align-items:center; justify-content:space-between; }
.section-header h3 { font-size:.92rem; font-weight:600; color:#1e293b; display:flex; align-items:center; gap:.5rem; margin:0; }

/* ── Cell Links ── */
.cell-primary-link { font-weight:500; color:#1e293b; text-decoration:none; }
.cell-primary-link:hover { color:#3b82f6; text-decoration:underline; }
.cell-tags { display:flex; gap:3px; margin-top:3px; }
.text-sm { font-size:.78rem; }
.text-info { color:#0ea5e9; }

/* ── Tags ── */
.tags-list { display:flex; flex-wrap:wrap; gap:4px; }

/* ── Pagination ── */
.pagination-bar { display:flex; gap:4px; justify-content:center; margin-top:1.25rem; }
.page-link { padding:.35rem .65rem; border:1px solid #e2e8f0; border-radius:6px; font-size:.82rem; color:#475569; text-decoration:none; }
.page-link.active { background:#3b82f6; color:#fff; border-color:#3b82f6; }
.page-link:hover:not(.active) { background:#f8fafc; }

/* ── Mini Stats ── */
.mini-stats { display:flex; gap:1rem; }
.mini-stat { font-size:.85rem; color:#475569; display:flex; align-items:center; gap:.35rem; }

/* ── Call Detail Grid ── */
.call-detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:1rem; margin-bottom:1.5rem; }
@media(max-width:900px){ .call-detail-grid { grid-template-columns:1fr; } }
.customer-quick-name { font-size:1rem; font-weight:600; margin-bottom:.5rem; }
.customer-quick-name a { color:#1e293b; text-decoration:none; }
.customer-quick-name a:hover { color:#3b82f6; }

/* ── Score Badge ── */
.score-badge { display:inline-block; padding:1px 8px; border-radius:10px; font-size:.78rem; font-weight:600; }
.score-high { background:#dcfce7; color:#15803d; }
.score-mid { background:#fef3c7; color:#b45309; }
.score-low { background:#fee2e2; color:#dc2626; }

/* ── Grade Display ── */
.grade-overview { display:flex; align-items:center; gap:1.5rem; }
.grade-circle { width:80px; height:80px; border-radius:50%; display:flex; flex-direction:column; align-items:center; justify-content:center; flex-shrink:0; }
.grade-circle.grade-high { background:#dcfce7; }
.grade-circle.grade-mid { background:#fef3c7; }
.grade-circle.grade-low { background:#fee2e2; }
.grade-value { font-size:1.3rem; font-weight:700; line-height:1; }
.grade-high .grade-value { color:#15803d; }
.grade-mid .grade-value { color:#b45309; }
.grade-low .grade-value { color:#dc2626; }
.grade-label { font-size:.7rem; color:#64748b; text-transform:uppercase; letter-spacing:.04em; }
.grade-bars { flex:1; display:flex; flex-direction:column; gap:.4rem; }
.grade-bar-row { display:flex; align-items:center; gap:.5rem; font-size:.8rem; }
.grade-bar-row label { width:120px; color:#64748b; text-transform:capitalize; font-size:.78rem; }
.grade-bar-track { flex:1; height:8px; background:#f1f5f9; border-radius:4px; overflow:hidden; }
.grade-bar-fill { height:100%; border-radius:4px; transition:width .3s; }
.grade-bar-fill.grade-high { background:#22c55e; }
.grade-bar-fill.grade-mid { background:#f59e0b; }
.grade-bar-fill.grade-low { background:#ef4444; }
.grade-bar-row span { width:35px; text-align:right; font-weight:500; color:#475569; }

/* ── Flags ── */
.flags-list { display:flex; flex-direction:column; gap:.5rem; margin-bottom:.75rem; }
.flag-item { display:flex; align-items:center; gap:.5rem; padding:.45rem .75rem; border-radius:8px; background:#f8fafc; border-left:3px solid #94a3b8; font-size:.85rem; }
.flag-item.flag-urgent { border-left-color:#ef4444; }
.flag-item.flag-vip { border-left-color:#f59e0b; }
.flag-item.flag-followup { border-left-color:#3b82f6; }
.flag-item.flag-complaint { border-left-color:#8b5cf6; }
.flag-item.flag-spam { border-left-color:#64748b; }
.flag-item.flag-resolved { opacity:.5; }
.flag-type-badge { font-weight:600; text-transform:capitalize; font-size:.78rem; }
.flag-notes { flex:1; color:#475569; }
.flag-dot { width:8px; height:8px; border-radius:50%; display:inline-block; }
.flag-dot.flag-urgent { background:#ef4444; }
.flag-dot.flag-vip { background:#f59e0b; }
.flag-dot.flag-followup { background:#3b82f6; }
.flag-dot.flag-complaint { background:#8b5cf6; }
.flag-dot.flag-spam { background:#64748b; }
.add-flag-form { display:flex; gap:.5rem; margin-top:.5rem; }

/* ── Row Highlight ── */
.row-highlight { background:#fffbeb !important; }

/* ── Chat Messages ── */
.chat-messages { padding:1rem 1.25rem; display:flex; flex-direction:column; gap:.75rem; max-height:500px; overflow-y:auto; }
.chat-msg { display:flex; gap:.5rem; }
.chat-msg-ai { flex-direction:row; }
.chat-msg-caller { flex-direction:row-reverse; }
.chat-msg-system { justify-content:center; }
.chat-msg-avatar { width:32px; height:32px; border-radius:50%; background:#e2e8f0; display:flex; align-items:center; justify-content:center; font-size:.75rem; font-weight:600; flex-shrink:0; color:#475569; }
.chat-msg-ai .chat-msg-avatar { background:#dbeafe; color:#2563eb; }
.chat-msg-bubble { max-width:75%; }
.chat-msg-role { font-size:.7rem; color:#94a3b8; text-transform:uppercase; letter-spacing:.03em; margin-bottom:2px; }
.chat-msg-caller .chat-msg-role { text-align:right; }
.chat-msg-text { padding:.6rem .85rem; border-radius:12px; font-size:.88rem; line-height:1.5; color:#1e293b; }
.chat-msg-ai .chat-msg-text { background:#f1f5f9; border-bottom-left-radius:4px; }
.chat-msg-caller .chat-msg-text { background:#dbeafe; border-bottom-right-radius:4px; }
.chat-msg-system .chat-msg-text { background:#fef3c7; color:#92400e; font-size:.8rem; font-style:italic; }

/* ── Transcript ── */
.transcript-summary { padding:1rem 1.25rem; background:#f0fdf4; border-bottom:1px solid #dcfce7; }
.transcript-summary label { font-size:.78rem; color:#15803d; font-weight:600; display:flex; align-items:center; gap:.4rem; margin-bottom:.35rem; }
.transcript-summary p { font-size:.88rem; color:#1e293b; margin:0; line-height:1.6; }
.transcript-full { padding:1rem 1.25rem; }
.transcript-text { font-family:inherit; font-size:.85rem; color:#334155; white-space:pre-wrap; word-wrap:break-word; line-height:1.7; background:#f8fafc; padding:1rem; border-radius:8px; border:1px solid #e2e8f0; max-height:400px; overflow-y:auto; margin:0; }

/* ── Recording ── */
.recording-player { width:100%; margin:.75rem 1.25rem 1rem; max-width:calc(100% - 2.5rem); }

/* Sidebar location dropdown */
.sidebar-location-select { width:100%; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.12); border-radius:8px; color:#e2e8f0; padding:.5rem .65rem; font-size:.82rem; cursor:pointer; appearance:none; -webkit-appearance:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 8px center; }
.sidebar-location-select:hover { background:rgba(255,255,255,.12); }
.sidebar-location-select:focus { outline:none; border-color:rgba(59,130,246,.5); }
.sidebar-location-select option { background:#1e293b; color:#e2e8f0; }

/* ═══════════════════════════════════════════════
   Pack 2 Section 3 — Appointments + SMS Center
   ═══════════════════════════════════════════════ */

/* ── Calendar ── */
.calendar-container { background:#fff; border:1px solid #e2e8f0; border-radius:12px; padding:1rem; }
.calendar-container .fc { font-size:.85rem; }
.calendar-container .fc-toolbar-title { font-size:1.1rem !important; }
.calendar-container .fc-button { font-size:.8rem !important; padding:.35rem .6rem !important; }
.calendar-container .fc-event { cursor:pointer; border-radius:4px; font-size:.78rem; padding:1px 4px; }

/* ── Staff Dot ── */
.staff-dot { display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:4px; vertical-align:middle; }

/* ── Status Actions ── */
.status-actions { display:flex; flex-wrap:wrap; gap:.5rem; align-items:center; }
.btn-success { background:#22c55e; color:#fff; border:none; padding:.4rem .75rem; border-radius:8px; cursor:pointer; font-size:.83rem; }
.btn-success:hover { background:#16a34a; }
.btn-info { background:#0ea5e9; color:#fff; border:none; padding:.4rem .75rem; border-radius:8px; cursor:pointer; font-size:.83rem; }
.btn-info:hover { background:#0284c7; }
.cancel-form { display:flex; gap:.35rem; align-items:center; }

/* ── Timeline ── */
.timeline { display:flex; flex-direction:column; gap:.5rem; }
.timeline-item { display:flex; justify-content:space-between; padding:.35rem 0; border-bottom:1px solid #f1f5f9; font-size:.85rem; }
.timeline-item:last-child { border-bottom:none; }
.timeline-item label { color:#64748b; font-weight:500; font-size:.78rem; }
.timeline-item span { color:#334155; }

/* ── Tabs ── */
.tab-bar { display:flex; gap:0; border-bottom:2px solid #e2e8f0; margin-bottom:1.25rem; }
.tab-item { padding:.6rem 1.25rem; font-size:.88rem; color:#64748b; text-decoration:none; border-bottom:2px solid transparent; margin-bottom:-2px; display:flex; align-items:center; gap:.4rem; transition:all .15s; }
.tab-item:hover { color:#334155; }
.tab-item.active { color:#3b82f6; border-bottom-color:#3b82f6; font-weight:500; }

/* ── SMS Body Cell ── */
.sms-body-cell { max-width:300px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#475569; font-size:.85rem; }

/* ── SMS Bubble ── */
.sms-bubble { max-width:400px; padding:.85rem 1rem; border-radius:16px; font-size:.9rem; line-height:1.5; }
.sms-outbound { background:#dbeafe; color:#1e293b; border-bottom-right-radius:4px; margin-left:auto; }
.sms-inbound { background:#f1f5f9; color:#1e293b; border-bottom-left-radius:4px; }
.sms-bubble p { margin:0; }

/* ── Template Cards ── */
.templates-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(320px,1fr)); gap:1rem; }
.template-card { background:#fff; border:1px solid #e2e8f0; border-radius:12px; padding:1rem 1.25rem; }
.template-card-header { display:flex; gap:.5rem; margin-bottom:.5rem; }
.template-name { font-size:.95rem; font-weight:600; color:#0f172a; margin:0 0 .35rem; }
.template-preview { font-size:.85rem; color:#64748b; line-height:1.5; margin:0 0 .75rem; }
.template-card-actions { display:flex; gap:.5rem; border-top:1px solid #f1f5f9; padding-top:.65rem; }

/* ── Code in form help ── */
code { background:#f1f5f9; padding:1px 5px; border-radius:4px; font-size:.8rem; color:#7c3aed; }

/* ── Character counter ── */
.form-help span { font-weight:500; }

/* ═══════════════════════════════════════════════
   Pack 2 Section 4 — Settings + Team + Reports
   ═══════════════════════════════════════════════ */

/* ── Settings Form Grid ── */
.settings-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:1rem; }
@media(max-width:640px){ .settings-form-grid { grid-template-columns:1fr; } }

/* ── Add Member ── */
.add-member-row { display:flex; gap:.5rem; }
.add-member-row .form-control { flex:1; }

/* ── Team Grid ── */
.team-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(360px,1fr)); gap:1rem; }
.team-card { background:#fff; border:1px solid #e2e8f0; border-radius:12px; padding:1.25rem; display:flex; gap:1rem; align-items:flex-start; }
.team-card-avatar { width:48px; height:48px; border-radius:50%; background:linear-gradient(135deg,#3b82f6,#8b5cf6); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:1rem; flex-shrink:0; }
.team-card-info { flex:1; min-width:0; }
.team-card-name { font-weight:600; color:#0f172a; font-size:.95rem; }
.team-card-email { font-size:.82rem; color:#64748b; margin-top:1px; }
.team-card-meta { display:flex; gap:.35rem; margin-top:.4rem; flex-wrap:wrap; }
.team-card-login { margin-top:.35rem; }
.team-card-actions { display:flex; flex-direction:column; align-items:flex-end; gap:.35rem; }

/* ── Reports ── */
.report-section { margin-bottom:2rem; }
.report-section-title { font-size:1rem; font-weight:600; color:#1e293b; display:flex; align-items:center; gap:.5rem; margin:0 0 1rem; }

/* Chart container */
.chart-container { background:#fff; border:1px solid #e2e8f0; border-radius:12px; padding:1rem; margin-top:1rem; }

/* Outcomes breakdown */
.outcomes-bar { background:#fff; border:1px solid #e2e8f0; border-radius:12px; padding:1rem 1.25rem; margin-top:1rem; }
.outcomes-bar h4 { font-size:.88rem; font-weight:600; color:#1e293b; margin:0 0 .75rem; }
.outcomes-list { display:flex; flex-direction:column; gap:.5rem; }
.outcome-row { display:flex; align-items:center; gap:.75rem; font-size:.85rem; }
.outcome-label { width:120px; color:#475569; text-transform:capitalize; font-size:.82rem; }
.outcome-bar-track { flex:1; height:10px; background:#f1f5f9; border-radius:5px; overflow:hidden; }
.outcome-bar-fill { height:100%; background:linear-gradient(90deg,#3b82f6,#8b5cf6); border-radius:5px; min-width:2px; }
.outcome-count { width:35px; text-align:right; font-weight:600; color:#334155; font-size:.82rem; }
.invoice-total-block{padding:0.5rem 0}.invoice-total-row{display:flex;justify-content:space-between;padding:0.5rem 0;font-size:0.875rem}.invoice-total-final{border-top:2px solid #e5e7eb;margin-top:0.5rem;padding-top:0.75rem;font-size:1.125rem;font-weight:700}

/* Billing detail cards */
.detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
.detail-card{background:#fff;border:1px solid #e5e7eb;border-radius:0.75rem;overflow:hidden}
.detail-card-header{padding:1rem 1.25rem 0.75rem;border-bottom:1px solid #f3f4f6}
.detail-card-header h3{font-size:0.9375rem;font-weight:600;margin:0;color:#1e293b}
.detail-card-body{padding:1.25rem}
.detail-row{display:flex;justify-content:space-between;align-items:center;padding:0.375rem 0;font-size:0.875rem}
.detail-label{color:#6b7280}
.detail-value{font-weight:500;color:#1e293b}
@media(max-width:768px){.detail-grid{grid-template-columns:1fr}}

/* ══════════════════════════════════════════
   Pack 3 Final Fix - Print & Team Styles
   ══════════════════════════════════════════ */

/* ── Print Header for Reports ── */
@media print {
  .sidebar, .top-header, .sidebar-toggle, .no-print, .filters-bar form button,
  .page-header-right .btn { display: none !important; }
  .main-content { margin-left: 0 !important; padding: 0 !important; }
  .page-content { padding: 0 !important; }

  /* Report print header */
  .print-report-header {
    display: flex !important;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
  }
  .print-report-header img { max-height: 50px; max-width: 160px; }
  .print-report-header .print-header-info { flex: 1; }
  .print-report-header .print-header-title { font-size: 1.25rem; font-weight: 700; color: #1e293b; }
  .print-report-header .print-header-sub { font-size: 0.75rem; color: #6b7280; margin-top: 2px; }
  .print-report-header .print-header-date { font-size: 0.75rem; color: #9ca3af; text-align: right; }

  /* Print footer */
  .print-report-footer {
    display: block !important;
    text-align: center;
    padding-top: 16px;
    margin-top: 30px;
    border-top: 1px solid #e5e7eb;
    font-size: 0.6875rem;
    color: #9ca3af;
  }
}

@media screen {
  .print-report-header, .print-report-footer { display: none !important; }
}

/* ── Print button style ── */
.btn-print { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.btn-print:hover { background: #e2e8f0; color: #1e293b; }

/* ── Team Form Styles ── */
.location-checkboxes { display: flex; flex-direction: column; gap: 6px; padding: 12px; background: #f8fafc; border-radius: 8px; border: 1px solid #e5e7eb; }

/* Active Sidebar Indicator v2 */
.sidebar-nav .nav-item {
  position: relative;
  overflow: visible;
  border-left: 3px solid transparent;
  transition: all .15s ease;
}
.sidebar-nav .nav-item.active {
  color: #fff !important;
  background: linear-gradient(90deg, rgba(129,140,248,0.22) 0%, transparent 100%) !important;
  border-left: 3px solid #a5b4fc !important;
  font-weight: 600 !important;
}
.sidebar-nav .nav-item.active i {
  color: #c7d2fe !important;
  opacity: 1 !important;
}
.sidebar-nav .nav-item.active::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: #a5b4fc;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(165,180,252,0.6);
}
.sidebar-nav .nav-item:not(.active):hover {
  border-left: 3px solid rgba(255,255,255,0.12);
}
