/* ==========================================================================
   AlwaysReady Care — UK Healthcare Compliance SaaS
   Design System: TeamzLab Tokens
   ========================================================================== */

/* ---------- Design Tokens ---------- */
:root {
  --bg: #12151A;
  --surface: #1D1F25;
  --surface-hover: #262930;
  --text: #FFFFFF;
  --text-muted: rgba(255,255,255,0.7);
  --text-secondary: rgba(255,255,255,0.5);
  --border: rgba(255,255,255,0.15);
  --accent: #D9FE06;
  --accent-hover: #c5e805;
  --accent-text: #12151A;
  --accent-fg: #D9FE06;
  --heading: #FFFFFF;
  --success: #4CAF50;
  --success-bg: rgba(76,175,80,0.15);
  --warning: #ff9800;
  --warning-bg: rgba(255,152,0,0.15);
  --danger: #f44336;
  --danger-bg: rgba(244,67,54,0.15);
  --info: #2196F3;
  --info-bg: rgba(33,150,243,0.15);
  --shadow: rgba(0,0,0,0.3);
  --overlay: rgba(0,0,0,0.6);
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-width: 260px;
  --topbar-height: 56px;
  --font: 'Poppins', sans-serif;
}

[data-theme="light"] {
  --bg: #F4F5F5;
  --surface: #FFFFFF;
  --surface-hover: #F0F0F0;
  --text: #12151A;
  --text-muted: rgba(18,21,26,0.75);
  --text-secondary: rgba(18,21,26,0.5);
  --border: #DDDDDD;
  --accent: #D9FE06;
  --accent-hover: #b8d804;
  --accent-text: #12151A;
  --accent-fg: #12151A;
  --heading: #12151A;
  --success: #4CAF50;
  --success-bg: rgba(76,175,80,0.1);
  --warning: #e68a00;
  --warning-bg: rgba(255,152,0,0.1);
  --danger: #f44336;
  --danger-bg: rgba(244,67,54,0.1);
  --info: #1976D2;
  --info-bg: rgba(33,150,243,0.1);
  --shadow: rgba(0,0,0,0.1);
  --overlay: rgba(0,0,0,0.4);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}
a { color: var(--accent-fg); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font); }
ul { list-style: none; }

/* ---------- Utilities ---------- */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* ========================================================================== */
/*  LOGIN VIEW                                                                 */
/* ========================================================================== */
.login-view {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  position: relative;
  background: var(--bg);
}
.theme-toggle-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background 0.2s, border-color 0.2s;
  z-index: 10;
}
.theme-toggle-btn:hover { background: var(--surface-hover); }

/* ── Landing Page ── */
.landing-page {
  min-height: 100vh;
  overflow-y: auto;
}
.landing-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 64px;
  min-height: 100vh;
  padding: 80px 40px 60px;
  max-width: 1200px;
  margin: 0 auto;
}
.landing-hero-content { max-width: 520px; }
.landing-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 24px;
}
.landing-h1 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--heading);
  margin-bottom: 20px;
}
.landing-hero-sub {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 24px;
}
.landing-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}
.landing-trust span { display: flex; align-items: center; gap: 6px; }
.landing-trust i { color: var(--success); font-size: 14px; }

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  width: 100%;
  max-width: 400px;
  flex-shrink: 0;
  text-align: center;
}

/* Landing sections */
.landing-features,
.landing-audience,
.landing-cqc,
.landing-proof,
.landing-cta { max-width: 1100px; margin: 0 auto; padding: 64px 40px; }

.landing-section-title { font-size: 26px; font-weight: 700; text-align: center; margin-bottom: 8px; color: var(--heading); }
.landing-section-sub { text-align: center; color: var(--text-muted); font-size: 15px; margin-bottom: 40px; }

.landing-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.landing-feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.landing-feature-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px var(--shadow); }
.landing-feature-icon { font-size: 28px; color: var(--accent-fg); margin-bottom: 16px; }
.landing-feature-card h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; color: var(--heading); }
.landing-feature-card p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

.landing-audience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.landing-audience-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.landing-audience-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; color: var(--heading); }
.landing-audience-card h3 i { margin-right: 8px; color: var(--accent-fg); }
.landing-audience-card p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

.landing-cqc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.landing-cqc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.landing-cqc-card strong { display: block; font-size: 16px; color: var(--accent-fg); margin-bottom: 8px; }
.landing-cqc-card span { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

.landing-proof-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.landing-proof-item { padding: 24px; }
.landing-proof-num { display: block; font-size: 40px; font-weight: 800; color: var(--accent-fg); margin-bottom: 4px; }
.landing-proof-item span:last-child { font-size: 14px; color: var(--text-muted); }

.landing-cta {
  text-align: center;
  padding: 80px 40px;
  background: var(--surface);
  border-radius: var(--radius);
  margin-bottom: 40px;
}
.landing-cta h2 { font-size: 28px; margin-bottom: 12px; color: var(--heading); }
.landing-cta p { font-size: 16px; color: var(--text-muted); margin-bottom: 24px; }
.landing-cta .btn-primary { font-size: 16px; padding: 18px 36px; }

.landing-footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--text-secondary);
  font-size: 13px;
  border-top: 1px solid var(--border);
}
.landing-footer p { margin-bottom: 8px; }
.landing-footer-links a { color: var(--accent-fg); margin: 0 4px; }
.landing-footer-copy { font-size: 11px; margin-top: 12px; }

/* Pain points section */
.landing-pain { max-width: 1100px; margin: 0 auto; padding: 64px 40px; }
.landing-pain-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.landing-pain-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  border-left: 3px solid var(--danger);
}
.pain-icon { font-size: 24px; color: var(--danger); display: block; margin-bottom: 12px; }
.landing-pain-card h3 { font-size: 15px; font-weight: 600; color: var(--heading); margin-bottom: 8px; }
.landing-pain-card p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* Regulatory section */
.landing-regs { max-width: 1100px; margin: 0 auto; padding: 64px 40px; }
.landing-regs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.landing-reg-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 13px;
  color: var(--text-muted);
}
.landing-reg-item strong { color: var(--accent-fg); font-weight: 700; margin-right: 6px; }
.landing-regs-note { text-align: center; font-size: 12px; color: var(--text-secondary); margin-top: 16px; }

/* Pricing Section */
.landing-pricing { max-width: 1100px; margin: 0 auto; padding: 64px 40px; }
.landing-pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  position: relative;
}
.pricing-featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 8px 32px rgba(217,254,6,0.1);
  transform: scale(1.03);
}
.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--accent-text);
  padding: 4px 16px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.pricing-name { font-size: 18px; font-weight: 700; color: var(--heading); margin-bottom: 8px; }
.pricing-price { margin-bottom: 24px; }
.pricing-amount { font-size: 40px; font-weight: 800; color: var(--heading); }
.pricing-period { font-size: 14px; color: var(--text-muted); margin-left: 4px; }
.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 24px;
}
.pricing-features li {
  padding: 6px 0;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.pricing-features li i { color: var(--success); font-size: 12px; flex-shrink: 0; }

/* Lead Capture */
.landing-lead { max-width: 600px; margin: 0 auto; padding: 64px 40px; text-align: center; }
.lead-form { margin-top: 24px; }
.lead-form-row {
  display: flex;
  gap: 12px;
}
.lead-form-row .input-field { flex: 1; }
.lead-form-row .btn-primary { flex-shrink: 0; min-width: 120px; }
.lead-note { font-size: 12px; color: var(--text-secondary); margin-top: 8px; }

/* CTA Buttons Row */
.landing-cta-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.landing-cta-buttons .btn-lg { min-width: 200px; }

/* Floating CTA Bar */
.floating-cta {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}
.floating-cta-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px var(--shadow);
  cursor: pointer;
}
.floating-cta-btn i { font-size: 18px; }
.floating-cta-whatsapp {
  background: #25D366;
  color: #fff;
}
.floating-cta-whatsapp:hover { background: #1fba59; color: #fff; transform: scale(1.05); }
.floating-cta-demo {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.floating-cta-demo:hover { background: var(--surface-hover); color: var(--text); transform: scale(1.05); }
.floating-cta-start {
  background: var(--accent);
  color: var(--accent-text);
}
.floating-cta-start:hover { background: var(--accent-hover); color: var(--accent-text); transform: scale(1.05); }

@media (max-width: 900px) {
  .landing-pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .pricing-featured { transform: none; }
  .lead-form-row { flex-direction: column; }
  .landing-cta-buttons { flex-direction: column; align-items: center; }
  .floating-cta-label { display: none; }
  .floating-cta-btn { padding: 12px; border-radius: 50%; width: 48px; height: 48px; justify-content: center; }
  .floating-cta-btn i { margin: 0; }
}

/* PWA Install Banner */
.pwa-install-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 480px;
  width: calc(100% - 40px);
  box-shadow: 0 8px 32px var(--shadow);
  animation: slideUp 0.3s ease;
}
.pwa-install-content {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pwa-install-content i {
  font-size: 24px;
  color: var(--accent-fg);
  flex-shrink: 0;
}
.pwa-install-content strong {
  display: block;
  font-size: 14px;
  color: var(--heading);
}
.pwa-install-content span {
  font-size: 12px;
  color: var(--text-muted);
}
.pwa-install-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
@keyframes slideUp {
  from { transform: translateX(-50%) translateY(100px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

@media (max-width: 900px) {
  .landing-hero { flex-direction: column; gap: 40px; padding: 60px 20px 40px; min-height: auto; text-align: center; }
  .landing-hero-content { max-width: 100%; }
  .landing-trust { justify-content: center; }
  .login-card { max-width: 100%; }
  .landing-features-grid { grid-template-columns: 1fr; }
  .landing-audience-grid { grid-template-columns: 1fr; }
  .landing-proof-grid { grid-template-columns: repeat(2, 1fr); }
  .landing-features, .landing-audience, .landing-cqc, .landing-proof, .landing-cta { padding: 40px 20px; }
}
.login-logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 28px;
}
.login-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 4px;
  line-height: 1.3;
}
.login-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 28px;
}
.login-form { text-align: left; }

/* ---------- Input System ---------- */
.input-group { margin-bottom: 16px; }
.input-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-secondary);
  font-size: 14px;
  pointer-events: none;
}
.input-field {
  width: 100%;
  padding: 12px 14px;
  padding-left: 42px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.input-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217,254,6,0.15);
}
select.input-field { padding-left: 42px; appearance: auto; }
.input-wrapper + .input-wrapper { margin-top: 8px; }
/* Input field without icon */
select.input-field:not(.input-wrapper select),
input[type="date"].input-field,
textarea.input-field {
  padding-left: 14px;
}
.textarea-field {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}
.input-sm { padding: 8px 12px; font-size: 13px; }
.input-group-inline { display: inline-flex; margin-right: 8px; }
.input-group-inline select { padding-left: 12px; }

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s, transform 0.1s;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s, border-color 0.2s;
}
.btn-secondary:hover { background: var(--surface-hover); border-color: var(--text-secondary); }

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: opacity 0.2s;
}
.btn-danger:hover { opacity: 0.9; }

.btn-full { width: 100%; }
.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background 0.2s;
}
.btn-icon:hover { background: var(--surface-hover); }

.spinner { display: inline-flex; align-items: center; }

/* Google button */
.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 10px;
  transition: background 0.2s;
}
.btn-google:hover { background: var(--surface-hover); }
.google-icon { flex-shrink: 0; }

/* Login extras */
.login-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  gap: 12px;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.login-divider span { color: var(--text-secondary); font-size: 13px; }
.login-error {
  margin-top: 16px;
  padding: 12px;
  background: var(--danger-bg);
  border: 1px solid var(--danger);
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: 13px;
  text-align: center;
}

/* ========================================================================== */
/*  APP SHELL                                                                  */
/* ========================================================================== */

/* ---------- Top Bar ---------- */
.topbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  align-items: center;
  gap: 12px;
  z-index: 100;
}
.btn-hamburger {
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  color: var(--text);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}
.btn-hamburger:hover { background: var(--surface-hover); }
.topbar-title {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: var(--heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.online-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}
.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}
.online-dot.offline { background: var(--warning); }
.online-text { font-weight: 500; }

/* ---------- Sidebar Overlay ---------- */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 199;
}
.sidebar-overlay.active { display: block; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 200;
  overflow-y: auto;
  transition: transform 0.3s ease;
}
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 12px;
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-fg);
  font-size: 20px;
}
.sidebar-brand {
  font-size: 15px;
  font-weight: 700;
  color: var(--heading);
}
.btn-sidebar-close {
  display: none;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 18px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
}
.btn-sidebar-close:hover { background: var(--surface-hover); }

/* Sidebar user */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  margin: 0 12px 8px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background 0.2s;
  width: calc(100% - 24px);
}
.sidebar-user:hover { background: var(--surface-hover); }
.sidebar-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  overflow: hidden;
}
.sidebar-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.sidebar-user-info { display: flex; flex-direction: column; overflow: hidden; }
.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-role-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--accent);
  color: var(--accent-text);
  width: fit-content;
  margin-top: 2px;
}

/* Sidebar nav */
.sidebar-nav {
  flex: 1;
  padding: 4px 12px;
}
.sidebar-nav li { margin-bottom: 2px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.nav-link i { width: 20px; text-align: center; font-size: 15px; }
.nav-link:hover {
  background: var(--surface-hover);
  color: var(--text);
  text-decoration: none;
}
.nav-link.active {
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
}

/* Sidebar footer */
.sidebar-footer { padding: 8px 12px 16px; }
.sidebar-divider { height: 1px; background: var(--border); margin: 0 4px 8px; }
.sidebar-action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  width: 100%;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
}
.sidebar-action-btn:hover { background: var(--surface-hover); color: var(--text); }
.sidebar-action-btn i { width: 20px; text-align: center; font-size: 15px; }
.sidebar-logout:hover { color: var(--danger); }

/* ---------- Main Content ---------- */
.main-content {
  margin-left: var(--sidebar-width);
  padding: 32px;
  min-height: 100vh;
}

/* ---------- Views ---------- */
.view-header { margin-bottom: 28px; }
.view-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--heading);
  line-height: 1.3;
  margin-bottom: 4px;
}
.view-subtitle { color: var(--text-muted); font-size: 14px; }
.section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.3;
}

/* ========================================================================== */
/*  DASHBOARD                                                                  */
/* ========================================================================== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.stat-body { display: flex; flex-direction: column; }
.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--heading);
  line-height: 1.2;
}
.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Quick Actions */
.quick-actions { margin-bottom: 32px; }
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.quick-action-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: left;
  transition: border-color 0.2s, transform 0.15s;
  cursor: pointer;
  color: var(--text);
}
.quick-action-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.quick-action-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.quick-action-body { display: flex; flex-direction: column; }
.quick-action-title { font-size: 15px; font-weight: 600; color: var(--heading); }
.quick-action-desc { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* Recent Evidence */
.recent-evidence { margin-bottom: 32px; }
.evidence-list { display: flex; flex-direction: column; gap: 8px; }
.evidence-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s;
}
.evidence-card:hover { border-color: var(--text-secondary); }
.evidence-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}
.badge-text { background: var(--info-bg); color: var(--info); }
.badge-photo { background: var(--success-bg); color: var(--success); }
.badge-incident { background: var(--danger-bg); color: var(--danger); }
.badge-audio { background: var(--warning-bg); color: var(--warning); }
.evidence-card-body { flex: 1; min-width: 0; }
.evidence-card-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.evidence-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}
.evidence-card-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  align-items: flex-start;
}
.btn-approve {
  padding: 6px 14px;
  background: var(--success);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-approve:hover { opacity: 0.9; }
.btn-reject {
  padding: 6px 14px;
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-reject:hover { opacity: 0.9; }
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.status-submitted { background: var(--warning-bg); color: var(--warning); }
.status-approved { background: var(--success-bg); color: var(--success); }
.status-rejected { background: var(--danger-bg); color: var(--danger); }

/* Coming Soon */
.coming-soon-section { margin-bottom: 32px; }
.coming-soon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.coming-soon-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}
.coming-soon-card i { font-size: 24px; }
.coming-soon-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.coming-soon-inline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px;
  color: var(--text-secondary);
  text-align: center;
}

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 24px;
  color: var(--text-secondary);
  text-align: center;
}
.empty-state i { font-size: 36px; opacity: 0.5; }
.empty-state p { font-size: 14px; }

/* ========================================================================== */
/*  EVIDENCE CAPTURE                                                           */
/* ========================================================================== */
.evidence-form {
  max-width: 720px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.evidence-type-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.type-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
}
.type-btn:hover { border-color: var(--text-secondary); color: var(--text); }
.type-btn.active {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
  font-weight: 600;
}

/* Photo dropzone */
.photo-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 40px 24px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
  color: var(--text-secondary);
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}
.photo-dropzone.drag-over {
  border-color: var(--accent);
  background: rgba(217,254,6,0.05);
}
.photo-dropzone i { font-size: 32px; }
.photo-dropzone p { font-size: 14px; }
.photo-dropzone-or { font-size: 12px; }
.photo-preview-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.photo-preview-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.photo-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-preview-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  border: none;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* AI Assist */
.ai-assist-section { margin-top: 20px; }
.btn-ai-assist {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--info-bg);
  border: 1px solid var(--info);
  border-radius: var(--radius-sm);
  color: var(--info);
  font-size: 13px;
  font-weight: 600;
  transition: opacity 0.2s;
  width: 100%;
  justify-content: center;
}
.btn-ai-assist:hover { opacity: 0.9; }
.ai-results {
  margin-top: 16px;
  padding: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.ai-results-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.3;
}
.ai-results-grid { display: flex; flex-direction: column; gap: 14px; }
.ai-result-item {}
.ai-result-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  display: block;
}
.ai-result-value { font-size: 14px; color: var(--text); line-height: 1.5; }
.ai-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--accent);
  color: var(--accent-text);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.ai-risk-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-risk-flag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--danger-bg);
  color: var(--danger);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.ai-risk-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.risk-low { background: var(--success-bg); color: var(--success); }
.risk-medium { background: var(--warning-bg); color: var(--warning); }
.risk-high { background: var(--danger-bg); color: var(--danger); }
.ai-actions-list {
  list-style: disc;
  padding-left: 20px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.8;
}
.form-actions { margin-top: 24px; }

/* ========================================================================== */
/*  REVIEW                                                                     */
/* ========================================================================== */
.filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.tab-filter {
  padding: 8px 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.tab-filter:hover { border-color: var(--text-secondary); color: var(--text); }
.tab-filter.active {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
  font-weight: 600;
}
.access-denied {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 60px 24px;
  text-align: center;
  color: var(--text-secondary);
}
.access-denied i { font-size: 48px; opacity: 0.5; }
.access-denied h2 { font-size: 20px; color: var(--heading); line-height: 1.3; }
.access-denied p { font-size: 14px; max-width: 400px; }

/* ========================================================================== */
/*  COMPLIANCE                                                                 */
/* ========================================================================== */
.compliance-score-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 40px;
}
.compliance-score-circle {
  position: relative;
  width: 160px;
  height: 160px;
}
.score-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.score-ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 8;
}
.score-ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease;
}
.score-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.score-value { font-size: 36px; font-weight: 700; color: var(--heading); }
.score-percent { font-size: 18px; color: var(--text-muted); font-weight: 500; }
.compliance-score-label {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}
.compliance-gaps { margin-bottom: 32px; }
.gap-list { display: flex; flex-direction: column; gap: 8px; }
.gap-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.gap-item-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.gap-item-status {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}
.gap-missing { background: var(--danger-bg); color: var(--danger); }
.gap-covered { background: var(--success-bg); color: var(--success); }
.compliance-categories { margin-bottom: 32px; }
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.category-card {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
}
.category-card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 4px;
}
.category-card-count {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-fg);
}
.category-card-label {
  font-size: 11px;
  color: var(--text-secondary);
}

/* ========================================================================== */
/*  ACTIONS                                                                    */
/* ========================================================================== */
.actions-toolbar { margin-bottom: 16px; }
.actions-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.overdue-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--danger-bg);
  border: 1px solid var(--danger);
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
}
.actions-list { display: flex; flex-direction: column; gap: 8px; }
.action-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s;
}
.action-card:hover { border-color: var(--text-secondary); }
.action-card.overdue { border-left: 3px solid var(--danger); }
.action-card-body { flex: 1; min-width: 0; }
.action-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 4px;
}
.action-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.priority-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.priority-critical { background: var(--danger-bg); color: var(--danger); }
.priority-high { background: var(--warning-bg); color: var(--warning); }
.priority-medium { background: var(--info-bg); color: var(--info); }
.priority-low { background: var(--success-bg); color: var(--success); }
.btn-complete {
  padding: 8px 16px;
  background: var(--success);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
  flex-shrink: 0;
}
.btn-complete:hover { opacity: 0.9; }

/* ========================================================================== */
/*  INSPECTION PACKS                                                           */
/* ========================================================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}
.packs-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.pack-type-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip-type {
  padding: 8px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.chip-type:hover { border-color: var(--text-secondary); }
.chip-type.active {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
  font-weight: 600;
}
.packs-list { display: flex; flex-direction: column; gap: 8px; }
.pack-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.pack-card-body { flex: 1; }
.pack-card-title { font-size: 14px; font-weight: 600; color: var(--heading); }
.pack-card-meta { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* ========================================================================== */
/*  PROFILE & SETTINGS                                                         */
/* ========================================================================== */
.profile-content { max-width: 600px; }
.profile-card { margin-bottom: 24px; }
.profile-header-section {
  display: flex;
  align-items: center;
  gap: 20px;
}
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
  overflow: hidden;
}
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.profile-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--heading);
  line-height: 1.3;
}
.profile-email {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 2px;
}
.settings-card { margin-bottom: 16px; }
.settings-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}
.theme-preference {
  display: flex;
  gap: 12px;
}
.theme-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  flex: 1;
  justify-content: center;
}
.theme-option:hover { border-color: var(--text-secondary); }
.theme-option.active {
  border-color: var(--accent);
  color: var(--heading);
  background: var(--surface);
}
.about-info { display: flex; flex-direction: column; gap: 12px; }
.about-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.about-row:last-child { border-bottom: none; }
.about-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.about-value { font-size: 13px; color: var(--heading); font-weight: 600; }
.about-link { font-size: 13px; color: var(--accent-fg); font-weight: 500; }

/* ========================================================================== */
/*  MODALS                                                                     */
/* ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 24px;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--overlay);
}
.modal-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 520px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  z-index: 1;
  animation: modalIn 0.2s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 12px;
}
.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--heading);
  line-height: 1.3;
}
.modal-body { padding: 12px 24px; overflow-y: auto; }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 24px 20px;
}

/* Template list */
.template-list { display: flex; flex-direction: column; gap: 8px; }
.card-template {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: left;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  width: 100%;
}
.card-template:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
}
.template-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.template-info { flex: 1; }
.template-name { font-size: 14px; font-weight: 600; color: var(--heading); display: block; }
.template-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; display: block; line-height: 1.4; }

/* ========================================================================== */
/*  TOAST NOTIFICATIONS                                                        */
/* ========================================================================== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  box-shadow: 0 4px 20px var(--shadow);
  animation: toastIn 0.3s ease;
  min-width: 260px;
}
.toast.removing { animation: toastOut 0.3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(40px); } }
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-info { background: var(--info); }
.toast-warning { background: var(--warning); }
.toast i { font-size: 16px; }

/* ========================================================================== */
/*  MOBILE RESPONSIVE                                                          */
/* ========================================================================== */
@media (max-width: 768px) {
  .topbar { display: flex; }
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open { transform: translateX(0); }
  .btn-sidebar-close { display: flex; }
  .main-content {
    margin-left: 0;
    padding: 16px;
    padding-top: calc(var(--topbar-height) + 16px);
  }
  .view-title { font-size: 22px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat-card { padding: 14px; gap: 12px; }
  .stat-value { font-size: 22px; }
  .stat-icon { width: 40px; height: 40px; font-size: 16px; }
  .quick-actions-grid { grid-template-columns: 1fr; }
  .evidence-form { padding: 20px; }
  .packs-form-row { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .profile-header-section { flex-direction: column; text-align: center; }
  .theme-preference { flex-direction: column; }
  .evidence-card { flex-direction: column; }
  .evidence-card-actions { align-self: flex-end; }
  .action-card { flex-direction: column; align-items: flex-start; }
  .btn-complete { width: 100%; text-align: center; justify-content: center; display: flex; }
  .toast-container { left: 16px; right: 16px; max-width: none; }
  .modal-card { max-width: 100%; max-height: 90vh; }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr; }
  .evidence-type-tabs { flex-direction: column; }
  .type-btn { justify-content: center; }
  .pack-type-chips { flex-direction: column; }
  .chip-type { text-align: center; }
  .filter-tabs { flex-direction: column; }
  .tab-filter { text-align: center; }
  .actions-filters { flex-direction: column; }
  .input-group-inline { width: 100%; margin-right: 0; }
  .input-group-inline select { width: 100%; }
}

/* ========================================================================== */
/*  HELP & FAQ                                                                 */
/* ========================================================================== */
.help-content { max-width: 720px; }
.help-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}
.help-steps {
  padding-left: 20px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.8;
  list-style: decimal;
}
.help-steps li { margin-bottom: 8px; }
.help-steps strong { color: var(--heading); }
.faq-list { display: flex; flex-direction: column; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  background: none;
  border: none;
  color: var(--heading);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}
.faq-toggle:hover { color: var(--accent-fg); }
.faq-toggle i { transition: transform 0.2s; color: var(--text-muted); font-size: 13px; flex-shrink: 0; margin-left: 12px; }
.faq-toggle.open i { transform: rotate(180deg); }
.faq-answer {
  padding: 0 0 16px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
}
.login-help-link {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ========================================================================== */
/*  ADMIN / TEAM MANAGEMENT                                                    */
/* ========================================================================== */
.admin-content { max-width: 720px; }
.admin-section { margin-bottom: 32px; }
.home-settings-form { display: flex; flex-direction: column; gap: 12px; }
.staff-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 20px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 700;
}
.staff-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
}
.staff-card-info { flex: 1; min-width: 0; }
.staff-card-name { font-weight: 600; font-size: 14px; color: var(--heading); }
.staff-card-email { font-size: 12px; color: var(--text-muted); }
.staff-card-actions { display: flex; gap: 8px; align-items: center; }
.staff-role-select {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 12px;
  font-family: var(--font);
}
.btn-remove-staff {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 14px;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.btn-remove-staff:hover { background: var(--danger-bg); }

/* ========================================================================== */
/*  ONBOARDING                                                                 */
/* ========================================================================== */
.modal-lg { max-width: 480px; }
.onboarding-content { text-align: center; padding: 40px 32px 24px; }
.onboarding-icon { font-size: 48px; color: var(--accent-fg); margin-bottom: 20px; }
.onboarding-title { font-size: 22px; font-weight: 700; margin-bottom: 12px; color: var(--heading); line-height: 1.3; }
.onboarding-desc { font-size: 15px; color: var(--text-muted); line-height: 1.6; }
.onboarding-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}
.onboarding-dots { display: flex; gap: 8px; }
.onboarding-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.onboarding-dot.active { background: var(--accent); }
.onboarding-actions { display: flex; gap: 8px; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

@media (max-width: 480px) {
  .staff-card { flex-direction: column; align-items: flex-start; }
  .staff-card-actions { align-self: flex-end; }
  .help-content { max-width: 100%; }
}
