/* =====================================================================
   FreshFoldCare Design System
   Premium SaaS UI — Navy #071A33 / Lime #B7D900 / BG #F6F8FB
   ===================================================================== */

/* ---------- 1. Design Tokens ---------- */
:root {
  --ff-navy: #071A33;
  --ff-navy-light: #0D2847;
  --ff-navy-mid: #132F54;
  --ff-lime: #B7D900;
  --ff-lime-dark: #9FBC00;
  --ff-lime-soft: rgba(183, 217, 0, 0.10);
  --ff-blue: #3B82F6;
  --ff-white: #FFFFFF;
  --ff-bg: #F6F8FB;
  --ff-ink: #1A1F36;
  --ff-ink-soft: #6B7280;
  --ff-ink-muted: #9CA3AF;
  --ff-line: #E5E7EB;
  --ff-line-soft: #F3F4F6;
  --ff-green: #10B981;
  --ff-green-dark: #059669;
  --ff-orange: #F59E0B;
  --ff-red: #EF4444;
  --ff-teal: #14B8A6;
  --ff-radius-sm: 6px;
  --ff-radius: 8px;
  --ff-radius-md: 10px;
  --ff-radius-lg: 12px;
  --ff-radius-xl: 16px;
  --ff-radius-pill: 100px;
  --ff-shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --ff-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
  --ff-shadow-md: 0 2px 8px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.06);
  --ff-shadow-lg: 0 4px 12px rgba(0,0,0,0.08), 0 16px 40px rgba(0,0,0,0.08);
  --ff-side-w: 252px;
  --ff-topbar-h: 60px;
  --ff-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --ff-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

/* ---------- 2. Base ---------- */
body {
  font-family: var(--ff-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

*, *::before, *::after { box-sizing: border-box; }

/* ---------- 3. Auth pages (Login / Forgot Password / Error) ---------- */
.ff-auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--ff-navy);
}

.ff-auth-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px;
  background:
    linear-gradient(135deg, var(--ff-navy) 0%, var(--ff-navy-mid) 100%);
  position: relative;
  overflow: hidden;
}

.ff-auth-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 120% 80% at 30% 20%, rgba(183,217,0,0.08), transparent 60%),
    radial-gradient(ellipse 80% 100% at 80% 90%, rgba(59,130,246,0.05), transparent 50%);
  pointer-events: none;
}

.ff-auth-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 400px;
}

.ff-auth-hero-logo {
  width: 220px;
  height: auto;
  margin-bottom: 32px;
  filter: brightness(1.05);
}

.ff-auth-hero-tagline {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ff-white);
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.ff-auth-hero-tagline .ff-lime-text {
  color: var(--ff-lime);
}

.ff-auth-hero-sub {
  color: rgba(255,255,255,0.5);
  font-size: 0.92rem;
  line-height: 1.6;
}

.ff-auth-hero-dots {
  position: absolute;
  bottom: 40px;
  display: flex;
  gap: 6px;
  z-index: 1;
}

.ff-auth-hero-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
}

.ff-auth-hero-dots span:first-child {
  background: var(--ff-lime);
  width: 20px;
  border-radius: 3px;
}

.ff-auth-form-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px 40px;
  background: var(--ff-navy-light);
  position: relative;
}

.ff-auth-card {
  width: 100%;
  max-width: 380px;
}

.ff-auth-card-header {
  margin-bottom: 32px;
}

.ff-auth-mobile-logo {
  display: none;
  justify-content: center;
  margin-bottom: 24px;
}

.ff-auth-mobile-logo img {
  width: 180px;
  height: auto;
}

.ff-auth-title {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--ff-white);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.ff-auth-subtitle {
  color: rgba(255,255,255,0.45);
  font-size: 0.88rem;
  line-height: 1.5;
}

.ff-form-group {
  position: relative;
  margin-bottom: 16px;
}

.ff-form-group .ff-form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  margin-bottom: 6px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.ff-form-group .ff-form-input-wrap {
  position: relative;
}

.ff-form-group .ff-form-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.3);
  font-size: 1rem;
  pointer-events: none;
  transition: color var(--ff-transition);
  z-index: 1;
}

.ff-form-control {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  color: var(--ff-white);
  border-radius: var(--ff-radius);
  padding: 12px 14px 12px 42px;
  font-size: 0.9rem;
  font-family: var(--ff-font);
  transition: border-color var(--ff-transition), box-shadow var(--ff-transition), background var(--ff-transition);
}

.ff-form-control:focus {
  background: rgba(255,255,255,0.08);
  color: var(--ff-white);
  border-color: var(--ff-lime);
  box-shadow: 0 0 0 3px rgba(183,217,0,0.12);
  outline: none;
}

.ff-form-control:focus ~ .ff-form-icon,
.ff-form-group:focus-within .ff-form-icon {
  color: var(--ff-lime);
}

.ff-form-control::placeholder {
  color: rgba(255,255,255,0.3);
}

.ff-auth-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.ff-auth-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.ff-auth-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--ff-lime);
  cursor: pointer;
}

.ff-auth-check-label {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
}

.ff-auth-forgot {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
  cursor: help;
}

.ff-auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: var(--ff-lime);
  border: none;
  color: var(--ff-navy);
  font-weight: 600;
  font-family: var(--ff-font);
  border-radius: var(--ff-radius);
  padding: 13px 20px;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background var(--ff-transition), transform 0.1s ease, box-shadow var(--ff-transition);
}

.ff-auth-btn:hover {
  background: var(--ff-lime-dark);
  box-shadow: 0 4px 16px rgba(183,217,0,0.25);
}

.ff-auth-btn:active {
  transform: scale(0.98);
}

.ff-auth-btn i {
  font-size: 1.1rem;
}

.ff-btn-primary {
  background: var(--ff-lime);
  border: none;
  color: var(--ff-navy);
  font-weight: 600;
  border-radius: var(--ff-radius);
  padding: 11px 20px;
  width: 100%;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  transition: background var(--ff-transition), transform 0.1s ease;
  cursor: pointer;
}

.ff-btn-primary:hover,
.ff-btn-primary:focus-visible {
  background: var(--ff-lime-dark);
  color: var(--ff-navy);
}

.ff-btn-primary:active { transform: scale(0.98); }

.ff-link-lime {
  color: var(--ff-lime);
  text-decoration: none;
  transition: color var(--ff-transition);
}

.ff-link-lime:hover {
  text-decoration: underline;
  color: var(--ff-lime-dark);
}

.ff-auth-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 24px 0;
}

.ff-auth-footer {
  text-align: center;
  color: rgba(255,255,255,0.25);
  font-size: 0.75rem;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.ff-auth-footer a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

@media (max-width: 768px) {
  .ff-auth-page {
    grid-template-columns: 1fr;
  }
  .ff-auth-hero {
    display: none;
  }
  .ff-auth-form-side {
    min-height: 100vh;
    padding: 32px 24px;
  }
  .ff-auth-mobile-logo {
    display: flex;
  }
}

/* ---------- 4. App Shell ---------- */
.ff-app-shell {
  background: var(--ff-bg);
  min-height: 100vh;
}

.ff-dash-body {
  --ff-card-radius: var(--ff-radius-lg);
  --ff-card-shadow: var(--ff-shadow);
  margin: 0;
  background: var(--ff-bg);
  color: var(--ff-ink);
  font-family: var(--ff-font);
  -webkit-font-smoothing: antialiased;
}

/* ---------- 5. Sidebar ---------- */
.ff-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--ff-side-w);
  background: var(--ff-navy);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  z-index: 1040;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.ff-sidebar::-webkit-scrollbar { width: 4px; }
.ff-sidebar::-webkit-scrollbar-track { background: transparent; }
.ff-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.ff-sidebar-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 8px;
}

.ff-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  object-fit: cover;
  flex: 0 0 auto;
}

.ff-logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--ff-lime);
  color: var(--ff-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
}

.ff-logo-text {
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.ff-sidebar-close {
  margin-left: auto;
  background: none;
  border: 0;
  color: rgba(255,255,255,0.5);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: color var(--ff-transition);
}

.ff-sidebar-close:hover { color: #fff; }

.ff-nav-section {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.30);
  padding: 16px 12px 6px;
  margin-top: 4px;
}

.ff-nav-section:first-child { padding-top: 8px; margin-top: 0; }

.ff-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.ff-nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: var(--ff-radius);
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 0.87rem;
  font-weight: 500;
  border: 0;
  background: none;
  text-align: left;
  transition: background var(--ff-transition), color var(--ff-transition);
  cursor: pointer;
  width: 100%;
}

.ff-nav-link i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex: 0 0 auto;
}

.ff-nav-link:hover {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.9);
}

.ff-nav-link.active {
  background: var(--ff-lime);
  color: var(--ff-navy);
  font-weight: 600;
}

.ff-nav-link.active i { color: var(--ff-navy); }

.ff-nav-soon {
  cursor: default;
  opacity: 0.55;
}

.ff-nav-soon:hover {
  background: none;
  color: rgba(255,255,255,0.55);
}

.ff-soon-pill {
  margin-left: auto;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.07);
  padding: 2px 7px;
  border-radius: var(--ff-radius-pill);
}

.ff-sidebar-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.ff-logout { color: rgba(239,68,68,0.7); }
.ff-logout:hover { background: rgba(239,68,68,0.1); color: rgba(239,68,68,0.9); }

.ff-sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7,26,51,0.6);
  backdrop-filter: blur(4px);
  z-index: 1035;
}

/* ---------- 6. Main Column ---------- */
.ff-main {
  margin-left: var(--ff-side-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.ff-topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  height: var(--ff-topbar-h);
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(246,248,251,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ff-line);
  padding: 0 24px;
}

.ff-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--ff-radius);
  border: 1px solid var(--ff-line);
  background: var(--ff-white);
  color: var(--ff-ink-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  position: relative;
  cursor: pointer;
  transition: background var(--ff-transition), color var(--ff-transition), border-color var(--ff-transition);
}

.ff-icon-btn:hover {
  background: var(--ff-line-soft);
  color: var(--ff-ink);
  border-color: var(--ff-line);
}

.ff-icon-btn:focus-visible {
  outline: 2px solid var(--ff-lime);
  outline-offset: 2px;
}

.ff-whatsapp { color: #25D366; }
.ff-whatsapp:hover { color: #1da851; }

.ff-dot-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  background: var(--ff-red);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  border-radius: var(--ff-radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ff-bg);
}

.ff-search {
  position: relative;
  flex: 1;
  max-width: 420px;
}

.ff-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ff-ink-muted);
  font-size: 0.9rem;
}

.ff-search input {
  width: 100%;
  height: 38px;
  border-radius: var(--ff-radius);
  border: 1px solid var(--ff-line);
  background: var(--ff-white);
  padding: 0 14px 0 38px;
  font-size: 0.85rem;
  color: var(--ff-ink);
  transition: border-color var(--ff-transition), box-shadow var(--ff-transition);
}

.ff-search input:focus {
  outline: none;
  border-color: var(--ff-lime);
  box-shadow: 0 0 0 3px rgba(183,217,0,0.12);
}

.ff-search input::placeholder { color: var(--ff-ink-muted); }

.ff-topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ff-user {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 0;
  padding: 4px 6px;
  border-radius: var(--ff-radius);
  cursor: pointer;
  transition: background var(--ff-transition);
}

.ff-user:hover { background: var(--ff-line-soft); }

.ff-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ff-navy);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ff-user-meta {
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.ff-user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ff-ink);
}

.ff-user-role {
  font-size: 0.7rem;
  color: var(--ff-ink-soft);
}

.ff-user-menu {
  border: 1px solid var(--ff-line);
  box-shadow: var(--ff-shadow-md);
  border-radius: var(--ff-radius-md);
  padding: 4px;
}

.ff-content { padding: 24px; }

.ff-page {
  max-width: 1440px;
  margin: 0 auto;
}

/* ---------- 7. Cards ---------- */
.ff-card {
  background: var(--ff-white);
  border-radius: var(--ff-radius-lg);
  box-shadow: var(--ff-shadow);
  border: 1px solid var(--ff-line);
}

.ff-dash-body .ff-card {
  border-radius: var(--ff-card-radius);
  box-shadow: var(--ff-card-shadow);
  border: 1px solid var(--ff-line);
}

/* ---------- 8. Page Header ---------- */
.ff-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.ff-page-head-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ff-page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ff-navy);
  margin: 0;
  letter-spacing: -0.02em;
}

.ff-page-sub {
  margin: 2px 0 0;
  color: var(--ff-ink-soft);
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 7px;
}

.ff-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ff-green);
  animation: ff-pulse 2s infinite;
}

@keyframes ff-pulse {
  0% { box-shadow: 0 0 0 0 rgba(16,185,129,0.5); }
  70% { box-shadow: 0 0 0 6px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

.ff-page-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ff-back {
  width: 34px;
  height: 34px;
  border-radius: var(--ff-radius);
  border: 1px solid var(--ff-line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ff-ink-soft);
  text-decoration: none;
  transition: all var(--ff-transition);
  flex: 0 0 auto;
}

.ff-back:hover {
  background: var(--ff-line-soft);
  color: var(--ff-ink);
  border-color: var(--ff-line);
}

/* ---------- 9. Buttons ---------- */
.ff-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--ff-radius);
  padding: 9px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--ff-transition);
  white-space: nowrap;
  line-height: 1.2;
  font-family: var(--ff-font);
}

.ff-btn:active { transform: scale(0.98); }

/* scoped btn-primary within app shell — width:auto, not 100% */
.ff-dash-body .ff-btn-primary,
.ff-btn.ff-btn-primary {
  background: var(--ff-lime);
  color: var(--ff-navy);
  border-color: var(--ff-lime);
  width: auto;
}

.ff-dash-body .ff-btn-primary:hover,
.ff-dash-body .ff-btn-primary:focus-visible,
.ff-btn.ff-btn-primary:hover {
  background: var(--ff-lime-dark);
  border-color: var(--ff-lime-dark);
  color: var(--ff-navy);
}

.ff-btn-ghost {
  background: var(--ff-white);
  color: var(--ff-ink);
  border-color: var(--ff-line);
}

.ff-btn-ghost:hover {
  background: var(--ff-line-soft);
  color: var(--ff-ink);
}

.ff-btn-danger {
  background: rgba(239,68,68,0.08);
  color: var(--ff-red);
  border-color: rgba(239,68,68,0.2);
}

.ff-btn-danger:hover {
  background: rgba(239,68,68,0.14);
}

.ff-btn-sm { padding: 6px 12px; font-size: 0.8rem; }

.ff-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ff-ink-soft);
  margin: 16px 2px 10px;
}

/* ---------- 10. Accent palette ---------- */
.ff-accent-primary   { --a: #3B82F6; --a-bg: rgba(59,130,246,0.10); }
.ff-accent-info      { --a: #14B8A6; --a-bg: rgba(20,184,166,0.10); }
.ff-accent-success   { --a: #10B981; --a-bg: rgba(16,185,129,0.10); }
.ff-accent-warning   { --a: #F59E0B; --a-bg: rgba(245,158,11,0.12); }
.ff-accent-lime      { --a: #84CC16; --a-bg: rgba(132,204,22,0.12); }
.ff-accent-secondary { --a: #6B7280; --a-bg: rgba(107,114,128,0.10); }

/* ---------- 11. KPI Cards ---------- */
.ff-kpi {
  padding: 18px;
  height: 100%;
}

.ff-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.ff-kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--ff-radius-md);
  background: var(--a-bg);
  color: var(--a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.ff-kpi-value {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--ff-navy);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.ff-kpi-label {
  font-size: 0.78rem;
  color: var(--ff-ink-soft);
  margin-top: 4px;
}

.ff-kpi-sub {
  font-size: 0.72rem;
  margin-top: 6px;
  font-weight: 600;
}

.ff-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--ff-radius-pill);
}

.ff-trend-up   { color: #059669; background: rgba(16,185,129,0.10); }
.ff-trend-down { color: #DC2626; background: rgba(239,68,68,0.08); }
.ff-trend-flat { color: var(--ff-ink-soft); background: rgba(107,114,128,0.08); }

/* ---------- 12. Summary Tiles ---------- */
.ff-tile {
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 13px;
  height: 100%;
}

.ff-tile-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--ff-radius-md);
  background: var(--a-bg);
  color: var(--a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex: 0 0 auto;
}

.ff-tile-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ff-navy);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.ff-tile-label {
  font-size: 0.74rem;
  color: var(--ff-ink-soft);
}

/* ---------- 13. Panels ---------- */
.ff-panel { padding: 20px; }

.ff-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.ff-panel-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ff-navy);
  margin: 0;
  letter-spacing: -0.01em;
}

.ff-panel-total {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ff-navy);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.ff-panel-hint,
.ff-panel-link {
  font-size: 0.78rem;
  color: var(--ff-ink-soft);
  text-decoration: none;
}

.ff-panel-link:hover { color: var(--ff-blue); }

.ff-range {
  display: inline-flex;
  background: var(--ff-line-soft);
  border-radius: var(--ff-radius);
  padding: 3px;
  gap: 2px;
}

.ff-range-btn {
  border: 0;
  background: none;
  color: var(--ff-ink-soft);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: var(--ff-radius-sm);
  cursor: pointer;
  transition: all var(--ff-transition);
  font-family: var(--ff-font);
}

.ff-range-btn:hover { color: var(--ff-ink); }

.ff-range-btn.active {
  background: var(--ff-white);
  color: var(--ff-navy);
  box-shadow: var(--ff-shadow-sm);
}

.ff-chart-wrap { position: relative; height: 260px; }
.ff-chart-sm { height: 230px; }

/* ---------- 14. Donut Chart ---------- */
.ff-donut-wrap {
  position: relative;
  height: 210px;
  margin-bottom: 12px;
}

.ff-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.ff-donut-num {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--ff-navy);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.ff-donut-cap {
  font-size: 0.72rem;
  color: var(--ff-ink-soft);
  margin-top: 2px;
}

.ff-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ff-legend li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.82rem;
}

.ff-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex: 0 0 auto;
}

.ff-legend-label { color: var(--ff-ink); }

.ff-legend-val {
  margin-left: auto;
  font-weight: 600;
  color: var(--ff-navy);
  font-variant-numeric: tabular-nums;
}

.ff-legend-val small {
  color: var(--ff-ink-soft);
  font-weight: 500;
}

/* ---------- 15. Top Services ---------- */
.ff-service-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ff-service-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
}

.ff-service-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex: 0 0 auto;
}

.ff-service-name {
  font-weight: 600;
  color: var(--ff-ink);
}

.ff-service-meta {
  margin-left: auto;
  color: var(--ff-ink-soft);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

/* ---------- 16. Operations ---------- */
.ff-op {
  padding: 16px;
  text-align: center;
  height: 100%;
}

.ff-op-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--ff-radius-md);
  margin: 0 auto 10px;
  background: var(--a-bg);
  color: var(--a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.ff-op-count {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ff-navy);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.ff-op-label {
  font-size: 0.73rem;
  color: var(--ff-ink-soft);
  margin-top: 4px;
}

/* ---------- 17. Tables ---------- */
.ff-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.84rem;
}

.ff-table thead th {
  text-align: left;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ff-ink-soft);
  font-weight: 600;
  padding: 0 12px 10px;
  border-bottom: 1px solid var(--ff-line);
  white-space: nowrap;
}

.ff-table tbody td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--ff-line-soft);
  vertical-align: middle;
  color: var(--ff-ink);
}

.ff-table tbody tr:last-child td { border-bottom: 0; }

.ff-table tbody tr {
  transition: background var(--ff-transition);
}

.ff-table tbody tr:hover { background: rgba(246,248,251,0.7); }

.ff-order-no {
  font-weight: 600;
  color: var(--ff-blue);
}

.ff-muted { color: var(--ff-ink-soft); }

.ff-amount {
  font-weight: 700;
  color: var(--ff-navy);
  font-variant-numeric: tabular-nums;
}

.ff-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}

.ff-actions a {
  width: 30px;
  height: 30px;
  border-radius: var(--ff-radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ff-ink-soft);
  border: 1px solid var(--ff-line);
  text-decoration: none;
  transition: all var(--ff-transition);
  font-size: 0.85rem;
}

.ff-actions a:hover {
  background: var(--ff-navy);
  color: #fff;
  border-color: var(--ff-navy);
}

/* Style Bootstrap tables inside the app shell */
.ff-dash-body .table {
  font-size: 0.84rem;
  --bs-table-bg: transparent;
}

.ff-dash-body .table thead th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ff-ink-soft);
  font-weight: 600;
  border-bottom-color: var(--ff-line);
  white-space: nowrap;
}

.ff-dash-body .table tbody td {
  border-bottom-color: var(--ff-line-soft);
  vertical-align: middle;
  color: var(--ff-ink);
}

.ff-dash-body .table tbody tr:hover { background: rgba(246,248,251,0.7); }

/* ---------- 18. Badges ---------- */
.ff-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--ff-radius-pill);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.ff-badge-blue   { color: #2563EB; background: rgba(59,130,246,0.10); }
.ff-badge-orange { color: #D97706; background: rgba(245,158,11,0.12); }
.ff-badge-green  { color: #059669; background: rgba(16,185,129,0.10); }
.ff-badge-green-dark { color: #047857; background: rgba(4,120,87,0.12); }
.ff-badge-teal   { color: #0D9488; background: rgba(20,184,166,0.10); }
.ff-badge-grey   { color: var(--ff-ink-soft); background: rgba(107,114,128,0.10); }
.ff-badge-red    { color: #DC2626; background: rgba(239,68,68,0.08); }

/* ---------- 19. Notifications ---------- */
.ff-notif-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: #D97706;
  background: rgba(245,158,11,0.12);
  padding: 3px 10px;
  border-radius: var(--ff-radius-pill);
}

.ff-notif-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.ff-notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--ff-line-soft);
  position: relative;
}

.ff-notif-item:last-child { border-bottom: 0; }

.ff-notif-item.unread {
  background: linear-gradient(90deg, rgba(183,217,0,0.05), transparent);
}

.ff-notif-item.unread::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 18px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ff-lime);
}

.ff-notif-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--ff-radius);
  background: var(--a-bg);
  color: var(--a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex: 0 0 auto;
}

.ff-notif-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ff-ink);
}

.ff-notif-msg {
  font-size: 0.78rem;
  color: var(--ff-ink-soft);
}

.ff-notif-time {
  font-size: 0.7rem;
  color: var(--ff-ink-muted);
  margin-top: 2px;
}

/* ---------- 20. Quick Actions ---------- */
.ff-quick-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.ff-quick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px;
  border-radius: var(--ff-radius-md);
  border: 1px solid var(--ff-line);
  text-decoration: none;
  text-align: center;
  transition: transform 0.15s ease, box-shadow var(--ff-transition), border-color var(--ff-transition);
}

.ff-quick:hover {
  transform: translateY(-2px);
  box-shadow: var(--ff-shadow-md);
  border-color: transparent;
}

.ff-quick-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--ff-radius-md);
  background: var(--a-bg);
  color: var(--a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.ff-quick-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ff-ink);
}

/* ---------- 21. Forms (scoped to app shell) ---------- */
.ff-dash-body .form-control,
.ff-dash-body .form-select {
  border-radius: var(--ff-radius);
  border-color: var(--ff-line);
  font-size: 0.88rem;
  padding: 9px 12px;
  transition: border-color var(--ff-transition), box-shadow var(--ff-transition);
  color: var(--ff-ink);
}

.ff-dash-body .form-control:focus,
.ff-dash-body .form-select:focus {
  border-color: var(--ff-lime);
  box-shadow: 0 0 0 3px rgba(183,217,0,0.12);
}

.ff-dash-body .form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ff-ink);
  margin-bottom: 5px;
}

.ff-dash-body .form-text {
  font-size: 0.76rem;
  color: var(--ff-ink-muted);
}

.ff-dash-body .form-check-input:checked {
  background-color: var(--ff-lime);
  border-color: var(--ff-lime);
}

.ff-dash-body .input-group-text {
  border-radius: var(--ff-radius);
  border-color: var(--ff-line);
  background: var(--ff-line-soft);
  color: var(--ff-ink-soft);
  font-size: 0.88rem;
}

/* ---------- 22. Alerts ---------- */
.ff-dash-body .alert {
  border-radius: var(--ff-radius);
  font-size: 0.85rem;
  border: none;
  padding: 12px 16px;
}

.ff-dash-body .alert-success {
  background: rgba(16,185,129,0.10);
  color: #047857;
}

.ff-dash-body .alert-danger {
  background: rgba(239,68,68,0.08);
  color: #B91C1C;
}

.ff-dash-body .alert-warning {
  background: rgba(245,158,11,0.10);
  color: #92400E;
}

/* ---------- 23. Pagination ---------- */
.ff-dash-body .pagination .page-link {
  border-radius: var(--ff-radius-sm);
  border: 1px solid var(--ff-line);
  color: var(--ff-ink-soft);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 10px;
  margin: 0 2px;
  transition: all var(--ff-transition);
}

.ff-dash-body .pagination .page-item.active .page-link {
  background: var(--ff-navy);
  border-color: var(--ff-navy);
  color: #fff;
}

.ff-dash-body .pagination .page-link:hover {
  background: var(--ff-line-soft);
  color: var(--ff-ink);
}

/* ---------- 24. Bootstrap button overrides ---------- */
.ff-dash-body .btn-outline-primary {
  color: var(--ff-blue);
  border-color: rgba(59,130,246,0.3);
  border-radius: var(--ff-radius);
  font-size: 0.82rem;
  font-weight: 600;
}

.ff-dash-body .btn-outline-primary:hover {
  background: var(--ff-blue);
  border-color: var(--ff-blue);
  color: #fff;
}

.ff-dash-body .btn-outline-secondary {
  color: var(--ff-ink-soft);
  border-color: var(--ff-line);
  border-radius: var(--ff-radius);
  font-size: 0.82rem;
  font-weight: 600;
}

.ff-dash-body .btn-outline-secondary:hover {
  background: var(--ff-line-soft);
  color: var(--ff-ink);
  border-color: var(--ff-line);
}

.ff-dash-body .btn-outline-danger {
  color: var(--ff-red);
  border-color: rgba(239,68,68,0.3);
  border-radius: var(--ff-radius);
  font-size: 0.82rem;
  font-weight: 600;
}

.ff-dash-body .btn-outline-danger:hover {
  background: var(--ff-red);
  border-color: var(--ff-red);
  color: #fff;
}

.ff-dash-body .btn-outline-success {
  color: var(--ff-green);
  border-color: rgba(16,185,129,0.3);
  border-radius: var(--ff-radius);
  font-size: 0.82rem;
  font-weight: 600;
}

.ff-dash-body .btn-outline-success:hover {
  background: var(--ff-green);
  border-color: var(--ff-green);
  color: #fff;
}

/* ---------- 25. Bootstrap badge overrides ---------- */
.ff-dash-body .badge {
  font-weight: 600;
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: var(--ff-radius-pill);
  letter-spacing: 0.02em;
}

.ff-dash-body .badge.bg-secondary {
  background: rgba(107,114,128,0.12) !important;
  color: var(--ff-ink-soft);
}

.ff-dash-body .badge.bg-success {
  background: rgba(16,185,129,0.12) !important;
  color: #059669;
}

.ff-dash-body .badge.bg-warning {
  background: rgba(245,158,11,0.12) !important;
  color: #D97706;
}

/* ---------- 26. Content wrapper ---------- */
.ff-content-wrap {
  max-width: 1440px;
  margin: 0 auto;
}

.ff-card-section {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ff-ink-soft);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ff-line-soft);
}

/* ---------- 27. WhatsApp Prompt ---------- */
.ff-wa-prompt {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1080;
  width: 320px;
  max-width: calc(100vw - 40px);
  background: var(--ff-white);
  border: 1px solid var(--ff-line);
  border-left: 4px solid #25D366;
  border-radius: var(--ff-radius-lg);
  box-shadow: var(--ff-shadow-lg);
  padding: 16px;
}

.ff-wa-prompt .ff-wa-title {
  font-weight: 700;
  color: var(--ff-ink);
  font-size: 0.88rem;
}

.ff-wa-prompt .ff-wa-sub {
  font-size: 0.78rem;
  color: var(--ff-ink-soft);
  margin: 4px 0 10px;
}

.ff-wa-prompt .ff-wa-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ff-wa-prompt .btn-success {
  background: #25D366;
  border-color: #25D366;
  font-weight: 600;
  border-radius: var(--ff-radius);
}

.ff-wa-prompt .btn-success:hover {
  background: #1da851;
  border-color: #1da851;
}

/* ---------- 28. Select2 ---------- */
.ff-add-customer-box {
  padding: 4px 2px;
  color: var(--ff-ink-soft);
}

.ff-add-customer {
  color: var(--ff-green) !important;
  text-decoration: none;
  cursor: pointer;
}

.ff-add-customer:hover { text-decoration: underline; }

/* ---------- 29. Loading Overlay ---------- */
.ff-grid-spinner {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--ff-card-radius, var(--ff-radius-lg));
  backdrop-filter: blur(2px);
}

/* ---------- 30. Barcode Labels ---------- */
.ff-barcode-sheet {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ff-barcode-label {
  width: 52mm;
  box-sizing: border-box;
  border: 1px solid var(--ff-line);
  border-radius: var(--ff-radius-sm);
  padding: 6px 8px;
  text-align: center;
  font-family: var(--ff-font);
  color: #000;
  page-break-inside: avoid;
  break-inside: avoid;
}

.ff-bl-customer { font-weight: 700; font-size: 12px; }
.ff-bl-order    { font-size: 11px; font-weight: 600; margin-top: 1px; }
.ff-bl-barcode  { display: block; width: 100%; height: auto; margin: 3px auto; }
.ff-bl-service  { font-size: 12px; font-weight: 600; }
.ff-bl-date     { font-size: 10px; color: #333; }
.ff-bl-brand    { font-size: 11px; font-weight: 700; color: var(--ff-navy); margin-top: 2px; letter-spacing: 0.03em; }

/* ---------- 31. Animations ---------- */
@media (prefers-reduced-motion: no-preference) {
  .ff-card { transition: box-shadow var(--ff-transition); }
  .ff-nav-link { transition: background var(--ff-transition), color var(--ff-transition); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- 32. Responsive ---------- */
@media (max-width: 991.98px) {
  .ff-sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  body.ff-nav-open .ff-sidebar { transform: translateX(0); }
  .ff-main { margin-left: 0; }
  .ff-quick-grid { grid-template-columns: repeat(3, 1fr); }
  .ff-topbar { padding: 0 16px; }
  .ff-content { padding: 20px 16px; }
}

@media (min-width: 992px) {
  .ff-sidebar-backdrop { display: none !important; }
}

@media (max-width: 575.98px) {
  .ff-content { padding: 16px 12px; }
  .ff-quick-grid { grid-template-columns: repeat(2, 1fr); }
  .ff-kpi-value { font-size: 1.35rem; }
  .ff-page-title { font-size: 1.25rem; }
  .ff-topbar { gap: 8px; padding: 0 12px; }
  .ff-search { max-width: 100%; }
}

/* ---------- 33. Print ---------- */
@media print {
  .ff-sidebar, .ff-topbar, nav, .d-print-none { display: none !important; }
  .ff-app-shell, main, .ff-main { margin: 0 !important; background: #fff !important; }
  .ff-barcode-sheet { gap: 0; }
  .ff-barcode-label { border: none; width: 52mm; padding: 4px 6px; }
  .ff-card { box-shadow: none !important; border: 1px solid #ddd !important; }
}

/* ---------- 34. Empty state ---------- */
.ff-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--ff-ink-soft);
}

.ff-empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ff-line-soft);
  color: var(--ff-ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.ff-empty-title {
  font-weight: 600;
  color: var(--ff-ink);
  font-size: 0.92rem;
  margin-bottom: 4px;
}

.ff-empty-text {
  font-size: 0.82rem;
  color: var(--ff-ink-soft);
}
