/* ==========================================================================
   Gym Client Assessment Platform — Warm Dark Design System
   ========================================================================== */

:root {
  --bg-base: #12111A;
  --bg-gradient: linear-gradient(160deg, #1B1A26 0%, #241E2E 45%, #2E2036 100%);
  --surface: #1E1C28;
  --surface-hover: #262333;
  --surface-glow: radial-gradient(circle at top left, rgba(255,122,89,0.12), transparent 60%);
  
  --accent-coral: #FF7A59;
  --accent-amber: #FFB86B;
  --accent-gradient: linear-gradient(135deg, #FF7A59 0%, #FFB86B 100%);
  --accent-violet: #8C7AE6;
  --violet-gradient: linear-gradient(135deg, #8C7AE6 0%, #B8A5FF 100%);
  
  --text-primary: #F5F1EC;
  --text-secondary: #B5AEBF;
  --text-muted: #7E778A;
  
  --border-soft: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(255, 122, 89, 0.3);
  
  --success-gradient: linear-gradient(135deg, #4CD97B 0%, #8CE6A8 100%);
  --success-text: #4CD97B;
  
  --warning-gradient: linear-gradient(135deg, #FF5C6C 0%, #FF8F6B 100%);
  --warning-text: #FF5C6C;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 25px rgba(255, 122, 89, 0.25);
  
  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-base);
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

/* Header & Top Navigation Bar */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: rgba(18, 17, 26, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: justify-content;
  box-shadow: var(--shadow-glow);
}

.brand-logo svg {
  width: 24px;
  height: 24px;
  fill: #fff;
  margin: auto;
}

.brand-logo-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-glow);
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.app-footer {
  text-align: center;
  padding: 32px 16px 16px 16px;
  margin-top: 48px;
  border-top: 1px solid var(--border-soft);
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.app-footer strong {
  color: var(--accent-amber);
  font-weight: 700;
}

.branch-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 122, 89, 0.12);
  border: 1px solid rgba(255, 122, 89, 0.3);
  color: var(--accent-amber);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  padding: 6px 14px;
  border-radius: var(--radius-lg);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--violet-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
}

.user-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Layout Containers */
.main-container {
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px 64px 24px;
  flex: 1;
}

/* Page Transition Animation Container */
.view-route {
  opacity: 0;
  transform: scale(0.985) translateY(8px);
  transition: opacity var(--transition-smooth), transform var(--transition-smooth);
  display: none;
}

.view-route.active {
  display: block;
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Login Page Styles */
.login-wrapper {
  min-height: calc(100vh - 150px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  background-image: var(--surface-glow);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent-gradient);
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-header h1 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.login-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.demo-account-pills {
  margin-bottom: 24px;
}

.demo-account-pills p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.demo-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-soft);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.demo-pill:hover {
  background: rgba(255, 122, 89, 0.15);
  border-color: var(--accent-coral);
  color: var(--text-primary);
}

/* Forms & Input Elements */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  background: rgba(18, 17, 26, 0.6);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-coral);
  box-shadow: 0 0 0 3px rgba(255, 122, 89, 0.15);
}

.form-control::placeholder {
  color: var(--text-muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #12111A;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 6px 20px rgba(255, 122, 89, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-soft);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger {
  background: var(--warning-gradient);
  color: #fff;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

.btn-full {
  width: 100%;
}

/* Branch Dashboard View */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.dashboard-title h2 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.dashboard-title p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--surface);
  background-image: var(--surface-glow);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.15);
}

.stat-card.alert-card {
  border-color: rgba(255, 92, 108, 0.3);
}

.stat-card.alert-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--warning-gradient);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.stat-number {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Controls Bar (Search & Filter) */
.controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  min-width: 280px;
}

.search-input-wrapper svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  fill: var(--text-muted);
}

.search-input {
  padding-left: 44px;
}

/* Client Cards Grid */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.client-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 24px;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.client-card:hover {
  transform: translateY(-4px);
  background: var(--surface-hover);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-card);
}

.client-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.client-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #12111A;
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(255, 122, 89, 0.25);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-pill.flagged {
  background: rgba(255, 92, 108, 0.15);
  border: 1px solid rgba(255, 92, 108, 0.35);
  color: var(--warning-text);
}

.status-pill.on-track {
  background: rgba(76, 217, 123, 0.15);
  border: 1px solid rgba(76, 217, 123, 0.35);
  color: var(--success-text);
}

.client-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.client-goal-badge {
  display: inline-block;
  background: rgba(140, 122, 230, 0.15);
  color: var(--accent-violet);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.client-meta-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  border-top: 1px solid var(--border-soft);
  padding-top: 16px;
  font-size: 0.85rem;
}

.client-meta-item .meta-label {
  color: var(--text-muted);
  font-size: 0.75rem;
  display: block;
}

.client-meta-item .meta-value {
  font-weight: 600;
  color: var(--text-primary);
}

/* Client Profile & Assessment History View */
.back-bar {
  margin-bottom: 24px;
}

.profile-hero {
  background: var(--surface);
  background-image: var(--surface-glow);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  padding: 32px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: 20px;
}

.profile-large-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #12111A;
  font-size: 1.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
}

.profile-details h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.profile-sub {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.auto-flag-banner {
  background: rgba(255, 92, 108, 0.12);
  border: 1px solid rgba(255, 92, 108, 0.4);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.auto-flag-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--warning-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.auto-flag-content h4 {
  font-size: 0.95rem;
  color: #FF5C6C;
  font-weight: 700;
}

.auto-flag-content p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Charts & Analytics Section */
.analytics-section {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  padding: 28px;
  margin-bottom: 32px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-header h3 {
  font-size: 1.3rem;
  font-weight: 700;
}

.chart-container {
  position: relative;
  width: 100%;
  height: 260px;
}

/* Timeline Cards */
.timeline-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.assessment-timeline-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  position: relative;
  transition: all var(--transition-fast);
}

.assessment-timeline-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.assessment-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.assessment-date-tag {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-amber);
}

.assessment-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.metric-box {
  background: rgba(18, 17, 26, 0.5);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.metric-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.metric-val {
  font-size: 1.3rem;
  font-weight: 800;
  margin-top: 2px;
}

.delta-pill {
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: 6px;
}

.delta-pill.positive {
  color: var(--success-text);
}

.delta-pill.negative {
  color: var(--warning-text);
}

.delta-pill.neutral {
  color: var(--text-muted);
}

/* Measurements & Photo Gallery Grid */
.photos-gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.photo-thumb-box {
  position: relative;
  width: 110px;
  height: 146px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  background: #12111A;
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.photo-thumb-box:hover {
  transform: scale(1.04);
  border-color: var(--accent-coral);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.photo-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Lightbox Image Preview Modal */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 9, 15, 0.92);
  backdrop-filter: blur(14px);
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-smooth);
}

.lightbox-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-img-box {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-soft);
}

.lightbox-img-box img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  display: block;
}

.lightbox-caption {
  margin-top: 14px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-amber);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
  object-fit: cover;
}

.photo-angle-tag {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  background: rgba(18, 17, 26, 0.85);
  backdrop-filter: blur(4px);
  padding: 4px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 6px;
}

/* Assessment Compare View */
.compare-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 24px;
}

@media (max-width: 768px) {
  .compare-container {
    grid-template-columns: 1fr;
  }
}

.compare-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  padding: 24px;
}

.compare-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-amber);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 9, 15, 0.85);
  backdrop-filter: blur(12px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-smooth);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  background-image: var(--surface-glow);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-card);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-header h3 {
  font-size: 1.4rem;
  font-weight: 800;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

/* Photo Upload Camera Slots */
.camera-upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.camera-slot {
  border: 2px dashed var(--border-soft);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
  background: rgba(18, 17, 26, 0.4);
}

.camera-slot:hover {
  border-color: var(--accent-coral);
  background: rgba(255, 122, 89, 0.05);
}

.camera-slot input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.camera-slot-icon {
  font-size: 1.8rem;
  margin-bottom: 6px;
}

.camera-slot-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.camera-slot-preview {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 6px;
  margin-top: 8px;
  display: none;
}

/* Utilities */
.text-coral { color: var(--accent-coral); }
.text-amber { color: var(--accent-amber); }
.text-violet { color: var(--accent-violet); }
.text-success { color: var(--success-text); }
.text-warning { color: var(--warning-text); }

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gap-12 { gap: 12px; }

/* Scroll reveal utility */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.reveal-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staff Management & Multi-Branch Settings Styles */
.staff-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 0.88rem;
}

.staff-table th, .staff-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
}

.staff-table th {
  color: var(--text-secondary);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}

.staff-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-badge.active {
  background: rgba(76, 217, 123, 0.15);
  color: var(--success-text);
  border: 1px solid rgba(76, 217, 123, 0.3);
}

.status-badge.suspended {
  background: rgba(255, 92, 108, 0.15);
  color: var(--warning-text);
  border: 1px solid rgba(255, 92, 108, 0.3);
}

.branch-tag-pill {
  display: inline-block;
  background: rgba(140, 122, 230, 0.15);
  border: 1px solid rgba(140, 122, 230, 0.3);
  color: var(--accent-violet);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  margin-right: 4px;
  margin-bottom: 2px;
}

.checkbox-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  background: rgba(18, 17, 26, 0.5);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-top: 8px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-primary);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-coral);
  cursor: pointer;
}

/* Mobile Responsive Media Queries */
@media (max-width: 768px) {
  .navbar {
    padding: 10px 12px;
    flex-wrap: nowrap;
    gap: 8px;
  }
  
  .brand-container {
    gap: 8px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
  }

  .brand-logo-img {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
  }

  .brand-title {
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .branch-badge {
    padding: 2px 6px;
    font-size: 0.68rem;
    white-space: nowrap;
  }

  .nav-actions {
    gap: 6px;
    flex-shrink: 0;
  }

  .user-profile-badge {
    padding: 4px 6px;
    gap: 6px;
  }

  .user-avatar {
    width: 26px;
    height: 26px;
    font-size: 0.75rem;
  }

  .user-name {
    font-size: 0.78rem;
    max-width: 75px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .user-role {
    display: none;
  }

  .main-container {
    padding: 14px 10px 40px 10px;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 20px;
  }

  .dashboard-title h2 {
    font-size: 1.35rem;
  }

  .dashboard-title p {
    font-size: 0.82rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
  }

  .stat-card {
    padding: 14px 12px;
  }

  .stat-number {
    font-size: 1.6rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  .stat-desc {
    font-size: 0.72rem;
  }

  /* Single column client cards grid on mobile to prevent overflow/zoom */
  .clients-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .client-card {
    padding: 16px;
  }

  .client-name {
    font-size: 1.05rem;
  }

  .client-meta-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    font-size: 0.8rem;
  }

  /* Profile & Hero Banner */
  .profile-hero {
    padding: 18px 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .profile-identity {
    gap: 12px;
  }

  .profile-large-avatar {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }

  .profile-details h2 {
    font-size: 1.3rem;
  }

  .profile-sub {
    font-size: 0.8rem;
  }

  .analytics-section {
    padding: 16px;
  }

  .chart-container {
    height: 200px;
  }

  .assessment-timeline-card {
    padding: 16px;
  }

  .assessment-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .metric-box {
    padding: 8px 10px;
  }

  .metric-val {
    font-size: 1.05rem;
  }

  .photos-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  /* Modals on Mobile */
  .modal-overlay {
    padding: 10px;
  }

  .modal-box {
    padding: 20px 14px;
    max-height: 94vh;
    border-radius: var(--radius-lg);
  }

  .modal-header h3 {
    font-size: 1.15rem;
  }

  .camera-upload-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  /* Buttons on mobile */
  .btn {
    padding: 8px 14px;
    font-size: 0.85rem;
  }

  .btn-sm {
    padding: 5px 10px;
    font-size: 0.78rem;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .branch-badge {
    display: none;
  }

  .user-name {
    display: none;
  }

  .nav-actions {
    gap: 4px;
  }

  .btn-sm {
    padding: 4px 8px;
    font-size: 0.72rem;
  }
}

