/* HERIK Hair Studio — Black & White (logo-matched) */
:root {
  --herik-bg: #f5f5f5;
  --herik-bg-card: #ffffff;
  --herik-bg-sidebar: #000000;
  --herik-bg-input: #ffffff;
  --herik-bg-muted: #f0f0f0;
  --herik-bg-section: #fafafa;
  --herik-bg-hover: #ebebeb;
  --herik-gold: #000000;
  --herik-gold-light: #333333;
  --herik-gold-dark: #000000;
  --herik-gold-muted: #f0f0f0;
  --herik-accent-soft: rgba(0, 0, 0, 0.06);
  --herik-accent-border: rgba(0, 0, 0, 0.14);
  --herik-foreground: #0a0a0a;
  --herik-muted: #666666;
  --herik-nav-muted: #888888;
  --herik-border: #e0e0e0;
  --herik-border-strong: #cccccc;
  --herik-success: #059669;
  --herik-danger: #dc2626;
  --herik-info: #0284c7;
  --herik-warning: #d97706;
  --herik-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --herik-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --herik-btn-ghost-bg: #ffffff;
  --herik-table-head-bg: #f5f5f5;
  --herik-table-hover-bg: #f5f5f5;
  --herik-table-striped-bg: #fafafa;
  --herik-progress-bg: #e5e5e5;
  --herik-scrollbar: #cccccc;
  --herik-scrollbar-hover: #999999;
  --herik-icon-success-bg: #ecfdf5;
  --herik-icon-info-bg: #eff6ff;
  --herik-icon-warning-bg: #fffbeb;
  --herik-alert-success-bg: #ecfdf5;
  --herik-alert-success-border: #a7f3d0;
  --herik-alert-success-text: #065f46;
  --herik-alert-danger-bg: #fef2f2;
  --herik-alert-danger-border: #fecaca;
  --herik-alert-danger-text: #991b1b;
  --herik-alert-warning-bg: #fffbeb;
  --herik-alert-warning-border: #fde68a;
  --herik-alert-warning-text: #92400e;
  --herik-login-gradient: linear-gradient(160deg, #ffffff 0%, #f5f5f5 45%, #ebebeb 100%);
  --herik-overlay: rgba(0, 0, 0, 0.45);
  --herik-chart-muted: #666666;
  --herik-chart-grid: #e0e0e0;
  --herik-chart-secondary: #999999;
  --herik-chart-primary: #111111;
  --herik-inverse: #0a0a0a;
  --herik-inverse-end: #222222;
  --herik-inverse-fg: #ffffff;
  --herik-on-accent: #ffffff;
  --herik-form-focus-ring: rgba(0, 0, 0, 0.12);
  --herik-card: var(--herik-bg-card);
  --herik-text: var(--herik-foreground);
  --herik-gold-subtle: var(--herik-gold-muted);
  --herik-sidebar-fg: #b3b3b3;
  --herik-sidebar-fg-active: #ffffff;
  --herik-sidebar-hover: #1a1a1a;
  --herik-sidebar-active: #222222;
  --sidebar-width: 250px;
  --sidebar-collapsed: 68px;
  --topbar-height: 64px;
}

[data-theme="dark"] {
  --herik-bg: #0a0a0a;
  --herik-bg-card: #141414;
  --herik-bg-sidebar: #000000;
  --herik-bg-input: #0a0a0a;
  --herik-bg-muted: #1a1a1a;
  --herik-bg-section: #1a1a1a;
  --herik-bg-hover: #222222;
  --herik-gold: #ffffff;
  --herik-gold-light: #f5f5f5;
  --herik-gold-dark: #e5e5e5;
  --herik-gold-muted: rgba(255, 255, 255, 0.08);
  --herik-accent-soft: rgba(255, 255, 255, 0.06);
  --herik-accent-border: rgba(255, 255, 255, 0.14);
  --herik-foreground: #f5f5f5;
  --herik-muted: #a3a3a3;
  --herik-nav-muted: #737373;
  --herik-border: #2a2a2a;
  --herik-border-strong: #404040;
  --herik-shadow: 0 1px 3px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.25);
  --herik-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.45);
  --herik-btn-ghost-bg: #141414;
  --herik-table-head-bg: #1f1f1f;
  --herik-table-hover-bg: #1f1f1f;
  --herik-table-striped-bg: #141414;
  --herik-progress-bg: #2a2a2a;
  --herik-scrollbar: #404040;
  --herik-scrollbar-hover: #666666;
  --herik-icon-success-bg: rgba(5, 150, 105, 0.15);
  --herik-icon-info-bg: rgba(2, 132, 199, 0.15);
  --herik-icon-warning-bg: rgba(217, 119, 6, 0.15);
  --herik-alert-success-bg: rgba(5, 150, 105, 0.12);
  --herik-alert-success-border: rgba(5, 150, 105, 0.35);
  --herik-alert-success-text: #6ee7b7;
  --herik-alert-danger-bg: rgba(220, 38, 38, 0.12);
  --herik-alert-danger-border: rgba(220, 38, 38, 0.35);
  --herik-alert-danger-text: #fca5a5;
  --herik-alert-warning-bg: rgba(217, 119, 6, 0.12);
  --herik-alert-warning-border: rgba(217, 119, 6, 0.35);
  --herik-alert-warning-text: #fcd34d;
  --herik-login-gradient: linear-gradient(165deg, #000000 0%, #0a0a0a 45%, #111111 100%);
  --herik-overlay: rgba(0, 0, 0, 0.65);
  --herik-chart-muted: #a3a3a3;
  --herik-chart-grid: #2a2a2a;
  --herik-chart-secondary: #737373;
  --herik-chart-primary: #f5f5f5;
  --herik-inverse: #141414;
  --herik-inverse-end: #0a0a0a;
  --herik-inverse-fg: #f5f5f5;
  --herik-on-accent: #000000;
  --herik-form-focus-ring: rgba(255, 255, 255, 0.15);
  --herik-card: var(--herik-bg-card);
  --herik-text: var(--herik-foreground);
  --herik-gold-subtle: var(--herik-gold-muted);
  --herik-sidebar-fg: #a3a3a3;
  --herik-sidebar-fg-active: #ffffff;
  --herik-sidebar-hover: #1a1a1a;
  --herik-sidebar-active: #222222;
}

[data-theme="dark"] .text-herik-gold { color: var(--herik-gold-light) !important; }
[data-theme="dark"] .sidebar .nav-link.active { color: var(--herik-gold-light); }
[data-theme="dark"] .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }

[data-theme="dark"] .btn-herik-primary {
  background: #ffffff;
  border-color: #ffffff;
  color: #000000;
}

[data-theme="dark"] .btn-herik-primary:hover {
  background: #e5e5e5;
  border-color: #e5e5e5;
  color: #000000;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.15);
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.875rem;
  line-height: 1.5;
  background: var(--herik-bg);
  color: var(--herik-foreground);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .brand-name {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--herik-foreground);
}

.text-herik-light { color: var(--herik-foreground) !important; }
.text-herik-gold { color: var(--herik-gold-dark) !important; }
.text-herik-muted { color: var(--herik-muted) !important; }
.bg-herik-gold { background-color: var(--herik-gold) !important; color: var(--herik-on-accent) !important; }

[data-theme="dark"] .bg-herik-gold {
  color: var(--herik-on-accent) !important;
}
.bg-herik-gold-subtle { background-color: var(--herik-gold-muted) !important; }
.border-herik { border-color: var(--herik-border) !important; }

/* Overlay */
.overlay {
  position: fixed; inset: 0;
  background: var(--herik-overlay);
  backdrop-filter: blur(2px);
  display: none; z-index: 1030;
}
.overlay.show { display: block; }

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--herik-bg-sidebar);
  border-right: 1px solid var(--herik-border);
  box-shadow: var(--herik-shadow);
  height: 100vh;
  position: fixed; top: 0; left: 0;
  padding-top: var(--topbar-height);
  z-index: 1031;
  transition: width .3s, left .3s;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 0.5rem;
}

.sidebar-footer {
  flex-shrink: 0;
  padding: 0.35rem 0 0.5rem;
  border-top: 1px solid var(--herik-border);
  background: var(--herik-bg-sidebar);
}

.sidebar-footer .nav-link {
  margin-bottom: 0;
  padding: 8px 14px;
}

.sidebar .logo-area {
  position: absolute; top: 0; left: 0;
  height: var(--topbar-height);
  width: 100%;
  display: flex; align-items: center;
  padding-left: 18px;
  padding-right: 12px;
  border-bottom: 1px solid var(--herik-border);
  background: var(--herik-bg-sidebar);
  z-index: 1033;
}

.logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
  color: #fff;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Inter', sans-serif;
  font-weight: 700; font-size: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.brand-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #000000;
  border: none;
  border-radius: 50%;
  padding: 0;
  flex-shrink: 0;
  line-height: 0;
  box-shadow: none;
  overflow: hidden;
}

.brand-logo-wrap .brand-logo {
  display: block;
  width: var(--logo-size, 40px);
  height: var(--logo-size, 40px);
  object-fit: cover;
  border-radius: 50%;
}

.brand-logo-wrap-sm { --logo-size: 36px; }
.brand-logo-wrap-md { --logo-size: 44px; }
.brand-logo-wrap-lg { --logo-size: 52px; }
.brand-logo-wrap-xl { --logo-size: 72px; }

[data-theme="dark"] .brand-logo-wrap,
[data-theme="light"] .brand-logo-wrap {
  background: #000000;
  border: none;
  box-shadow: none;
}

/* Dark pad behind logo on light surfaces (login form, receipts) */
.login-panel-logo .brand-logo-wrap,
.receipt-logo .brand-logo-wrap,
.report-pdf-logo .brand-logo-wrap,
.login-card .brand-logo-wrap {
  background: #000000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.brand-logo-login {
  display: flex !important;
  margin: 0 auto 1rem;
}

.brand-logo-report {
  display: flex !important;
  margin: 0 auto 0.75rem;
}

.brand-name {
  display: block;
  color: var(--herik-foreground);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  letter-spacing: 0.04em;
}

.brand-tag {
  display: block;
  color: var(--herik-muted);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

.sidebar .nav-link {
  color: var(--herik-sidebar-fg);
  padding: 10px 14px;
  display: flex; align-items: center;
  gap: 12px;
  margin: 2px 12px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 500;
  transition: all .18s ease;
}

.sidebar .nav-link:hover {
  color: var(--herik-sidebar-fg-active);
  background: var(--herik-sidebar-hover);
}

.sidebar .nav-link.active {
  color: var(--herik-sidebar-fg-active);
  background: var(--herik-sidebar-active);
  font-weight: 600;
}

.sidebar .nav-link-logout {
  color: var(--herik-danger);
}

.sidebar .nav-link-logout:hover {
  color: var(--herik-danger);
  background: var(--herik-alert-danger-bg);
}

.sidebar .nav-link .ti { font-size: 18px; opacity: 0.85; }
.sidebar .nav-text { white-space: nowrap; }

.sidebar li small.nav-text {
  color: var(--herik-nav-muted);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.sidebar .brand-name {
  color: #ffffff;
}

.sidebar .brand-tag {
  color: #737373;
}

.sidebar,
.sidebar .logo-area,
.sidebar-footer {
  background: var(--herik-bg-sidebar);
  border-color: #222222;
}

.sidebar .logo-area {
  border-bottom-color: #222222;
}

.sidebar-footer {
  border-top-color: #222222;
}

.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar.collapsed .nav-text,
.sidebar.collapsed .logo-text,
.sidebar.collapsed li small.nav-text { display: none; }
.sidebar.collapsed .nav-link { margin: 2px 8px; padding: 10px; justify-content: center; }

/* Topbar */
.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  width: auto !important;
  height: var(--topbar-height);
  margin-left: 0;
  background: var(--herik-bg-card) !important;
  border-color: var(--herik-border) !important;
  box-shadow: var(--herik-shadow);
  z-index: 1032;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  flex-wrap: nowrap;
}

.topbar.full {
  left: var(--sidebar-collapsed);
}

.topbar .navbar-brand-area {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--herik-foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Topbar — professional digital clock */
.topbar-clock {
  display: flex;
  align-items: center;
  padding: 0.4rem 0.9rem;
  background: var(--herik-bg-card);
  border: 1px solid var(--herik-border);
  border-radius: 12px;
  min-width: 0;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--herik-shadow);
  position: relative;
  overflow: hidden;
}

.topbar-clock::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--herik-gold-light), var(--herik-gold-dark));
  border-radius: 12px 0 0 12px;
}

.topbar-clock-digital {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding-left: 0.35rem;
  line-height: 1.1;
}

.topbar-clock-time-row {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
}

.topbar-clock-time {
  font-family: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--herik-foreground);
  white-space: nowrap;
}

.topbar-clock-time .tc-sep {
  opacity: 0.45;
  font-weight: 400;
  animation: clock-colon 1s step-end infinite;
}

.topbar-clock-ampm {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--herik-gold-dark);
  text-transform: uppercase;
}

.topbar-clock-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--herik-muted);
  text-transform: uppercase;
}

.topbar-clock-tz {
  font-size: 0.58rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: var(--herik-gold-muted);
  color: var(--herik-gold-dark);
  letter-spacing: 0.1em;
}

@keyframes clock-colon {
  0%, 50% { opacity: 0.45; }
  51%, 100% { opacity: 0.15; }
}

[data-theme="dark"] .topbar-clock {
  background: var(--herik-bg-card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), var(--herik-shadow);
}

[data-theme="dark"] .topbar-clock-ampm,
[data-theme="dark"] .topbar-clock-tz {
  color: var(--herik-gold-light);
}

/* Content */
.content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  padding-top: var(--topbar-height) !important;
  padding-bottom: 2rem;
  transition: margin-left .3s;
}

.content.full { margin-left: var(--sidebar-collapsed); }

.content > .container-fluid {
  padding: 1.5rem;
}

/* Cards */
.card {
  background: var(--herik-bg-card);
  border: 1px solid var(--herik-border);
  border-radius: 12px;
  color: var(--herik-foreground);
  box-shadow: var(--herik-shadow);
}

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--herik-border);
  color: var(--herik-foreground);
  font-weight: 600;
}

.stat-card {
  border: 1px solid var(--herik-border);
  border-radius: 12px;
  padding: 1.25rem 1.25rem 1.25rem 1.5rem;
  background: var(--herik-bg-card);
  box-shadow: var(--herik-shadow);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--herik-gold);
  border-radius: 12px 0 0 12px;
}

.stat-card.success::before { background: var(--herik-success); }
.stat-card.info::before { background: var(--herik-info); }
.stat-card.warning::before { background: var(--herik-warning); }

.icon-shape {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
}

.icon-shape.gold { background: var(--herik-gold-muted); color: var(--herik-gold-dark); }
.icon-shape.success { background: var(--herik-icon-success-bg); color: var(--herik-success); }
.icon-shape.info { background: var(--herik-icon-info-bg); color: var(--herik-info); }
.icon-shape.warning { background: var(--herik-icon-warning-bg); color: var(--herik-warning); }

/* Buttons */
.btn-herik-primary {
  background: var(--herik-gold);
  border-color: var(--herik-gold);
  color: #fff;
  font-weight: 600;
  border-radius: 8px;
  font-size: 0.84rem;
  padding: 0.5rem 1rem;
  transition: all .18s ease;
}
.btn-herik-primary:hover {
  background: var(--herik-gold-dark);
  border-color: var(--herik-gold-dark);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-herik-ghost {
  background: var(--herik-btn-ghost-bg);
  border: 1px solid var(--herik-border);
  color: var(--herik-foreground);
  border-radius: 8px;
  font-weight: 500;
}
.btn-herik-ghost:hover {
  background: var(--herik-bg-hover);
  border-color: var(--herik-border-strong);
  color: var(--herik-foreground);
}

.btn-icon {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
}

/* Forms */
.form-control, .form-select {
  background: var(--herik-bg-input);
  border: 1px solid var(--herik-border);
  color: var(--herik-foreground);
  border-radius: 8px;
  font-size: 0.875rem;
  padding: 0.5rem 0.875rem;
}

.form-control:focus, .form-select:focus {
  background: var(--herik-bg-input);
  border-color: var(--herik-gold);
  color: var(--herik-foreground);
  box-shadow: 0 0 0 3px var(--herik-form-focus-ring);
}

.form-control::placeholder { color: var(--herik-nav-muted); }
.form-label {
  color: var(--herik-foreground);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

/* Tables */
.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--herik-foreground);
  --bs-table-border-color: var(--herik-border);
  --bs-table-hover-bg: var(--herik-table-hover-bg);
  --bs-table-striped-bg: var(--herik-table-striped-bg);
}

.table thead th {
  color: var(--herik-muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--herik-table-head-bg);
  border-bottom: 1px solid var(--herik-border);
  padding: 0.75rem 1rem;
}

.table tbody td {
  padding: 0.85rem 1rem;
  vertical-align: middle;
}

/* Badges */
.badge-gold {
  background: var(--herik-gold-muted);
  color: var(--herik-gold-dark);
  border: 1px solid var(--herik-accent-border);
  font-weight: 600;
  font-size: 0.72rem;
}

/* Login page */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--herik-login-gradient);
  position: relative;
}

.login-card {
  max-width: 420px;
  width: 100%;
  background: var(--herik-bg-card);
  border: 1px solid var(--herik-border);
  border-radius: 16px;
  box-shadow: var(--herik-shadow-md);
}

.login-card .logo-icon { width: 52px; height: 52px; font-size: 1.3rem; margin: 0 auto; }

.login-card .brand-logo-login { margin-bottom: 1rem; }

.login-demo-box {
  background: var(--herik-bg-muted);
  border: 1px solid var(--herik-border);
}

.login-theme-wrap {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

/* Dropdown */
.dropdown-menu {
  background: var(--herik-bg-card);
  border: 1px solid var(--herik-border);
  border-radius: 10px;
  box-shadow: var(--herik-shadow-md);
  padding: 0.35rem;
}

.dropdown-item {
  color: var(--herik-foreground);
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
}
.dropdown-item:hover {
  background: var(--herik-bg);
  color: var(--herik-foreground);
}

/* Alerts */
.alert-success { background: var(--herik-alert-success-bg); border-color: var(--herik-alert-success-border); color: var(--herik-alert-success-text); }
.alert-danger { background: var(--herik-alert-danger-bg); border-color: var(--herik-alert-danger-border); color: var(--herik-alert-danger-text); }
.alert-warning { background: var(--herik-alert-warning-bg); border-color: var(--herik-alert-warning-border); color: var(--herik-alert-warning-text); }

.page-header {
  background: var(--herik-bg-card);
  border: 1px solid var(--herik-border);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  box-shadow: var(--herik-shadow);
  margin-bottom: 1.5rem;
}

.page-header h1 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--herik-foreground);
  margin-bottom: 0.25rem;
}

.page-header p {
  color: var(--herik-muted);
  margin: 0;
  font-size: 0.85rem;
}

/* Staff avatar */
.staff-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--herik-gold-muted);
  color: var(--herik-gold-dark);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.75rem;
}

/* Footer */
.app-footer {
  text-align: center;
  padding: 1.5rem 0;
  color: var(--herik-muted);
  font-size: 0.75rem;
  border-top: 1px solid var(--herik-border);
  margin-top: 2rem;
}

.app-footer a { color: var(--herik-gold-dark); text-decoration: none; font-weight: 500; }
.app-footer a:hover { text-decoration: underline; }

/* List group */
.list-group-item {
  background: transparent;
  border-color: var(--herik-border);
  color: var(--herik-foreground);
}

/* Charts — theme aware */
.apexcharts-text { fill: var(--herik-muted) !important; }
.apexcharts-legend-text { color: var(--herik-muted) !important; font-family: 'Inter', sans-serif !important; }
.apexcharts-tooltip { font-family: 'Inter', sans-serif !important; }

/* Modal */
.modal-content {
  background: var(--herik-bg-card);
  border: 1px solid var(--herik-border);
  color: var(--herik-foreground);
  border-radius: 12px;
  box-shadow: var(--herik-shadow-md);
}
.modal-header, .modal-footer { border-color: var(--herik-border); }
.modal-title { font-weight: 600; }

/* Progress bar track */
.progress { background: var(--herik-progress-bg); border-radius: 4px; }

::-webkit-scrollbar-thumb { background: var(--herik-scrollbar); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--herik-scrollbar-hover); }

.branch-pick-card {
  transition: transform .15s ease, box-shadow .15s ease;
  cursor: pointer;
}
.branch-pick-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--herik-shadow-md);
  border-color: var(--herik-gold) !important;
}

.staff-branch-section + .staff-branch-section {
  margin-top: 0.5rem;
}

.staff-branch-header {
  background: var(--herik-bg-card);
  border: 1px solid var(--herik-border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--herik-shadow);
}

.staff-branch-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--herik-foreground);
  margin: 0;
}

.staff-branch-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  color: var(--herik-muted);
  font-size: 0.78rem;
}

.staff-branch-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

code { color: var(--herik-gold-dark); background: var(--herik-gold-muted); padding: 0.1em 0.35em; border-radius: 4px; font-size: 0.85em; }

/* Theme toggle switch */
.theme-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  margin: 0;
  user-select: none;
}

.theme-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.theme-switch-track {
  width: 52px;
  height: 28px;
  background: var(--herik-bg-muted);
  border: 1px solid var(--herik-border);
  border-radius: 999px;
  position: relative;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.theme-switch input:checked + .theme-switch-track {
  background: rgba(0, 0, 0, 0.25);
  border-color: rgba(0, 0, 0, 0.45);
}

.theme-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--herik-bg-card);
  box-shadow: var(--herik-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: var(--herik-gold-dark);
  transition: transform 0.22s ease, background 0.2s ease;
}

.theme-switch input:checked + .theme-switch-track .theme-switch-thumb {
  transform: translateX(24px);
  color: var(--herik-gold-light);
}

.theme-switch .theme-icon-dark { display: none; }
.theme-switch input:checked + .theme-switch-track .theme-icon-light { display: none; }
.theme-switch input:checked + .theme-switch-track .theme-icon-dark { display: inline; }

.topbar-theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.input-group-text {
  background: var(--herik-bg-muted);
  border-color: var(--herik-border);
  color: var(--herik-muted);
}

.bg-secondary {
  background-color: var(--herik-bg-muted) !important;
  color: var(--herik-muted) !important;
}

.btn-whatsapp {
  background: #25D366 !important;
  color: #fff !important;
  border: none !important;
}

@media (max-width: 768px) {
  .topbar-theme-toggle small { display: none; }
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }

/* Dashboard */
.dashboard-hero {
  background: linear-gradient(135deg, var(--herik-inverse) 0%, var(--herik-inverse-end) 100%);
  border: 1px solid var(--herik-border-strong);
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  color: var(--herik-inverse-fg);
  box-shadow: var(--herik-shadow-md);
}

.dashboard-hero-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
}

.dashboard-greeting {
  font-size: 0.85rem;
  opacity: 0.92;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.dashboard-greeting .ti {
  font-size: 1rem;
}

.login-greeting {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--herik-gold-dark);
  margin-bottom: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  background: var(--herik-gold-muted);
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.login-greeting.period-morning,
.login-greeting.period-afternoon,
.login-greeting.period-evening,
.login-greeting.period-night {
  color: #333;
  background: #f0f0f0;
  border-color: #ddd;
}

[data-theme="dark"] .login-greeting.period-morning,
[data-theme="dark"] .login-greeting.period-afternoon,
[data-theme="dark"] .login-greeting.period-evening,
[data-theme="dark"] .login-greeting.period-night {
  color: #ccc;
  background: #1a1a1a;
  border-color: #333;
}

.dashboard-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--herik-inverse-fg);
  margin: 0;
}

.dashboard-greeting {
  color: var(--herik-inverse-fg);
}

.dashboard-sub {
  font-size: 0.85rem;
  opacity: 0.9;
  color: var(--herik-inverse-fg);
}

.dashboard-sub .badge-gold {
  background: rgba(255, 255, 255, 0.14) !important;
  color: var(--herik-inverse-fg) !important;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.dashboard-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn-hero-primary {
  background: var(--herik-inverse-fg) !important;
  color: var(--herik-inverse) !important;
  font-weight: 600;
  border: none;
  border-radius: 10px;
}

.btn-hero-primary:hover {
  background: var(--herik-gold-light) !important;
  color: var(--herik-inverse) !important;
}

.btn-hero-ghost {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: var(--herik-inverse-fg);
  font-weight: 600;
  border-radius: 10px;
}

.btn-hero-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
  color: var(--herik-inverse-fg);
  border-color: rgba(255, 255, 255, 0.38);
}

.quick-action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1rem 0.5rem;
  background: var(--herik-bg-card);
  border: 1px solid var(--herik-border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--herik-foreground);
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.15s ease;
  box-shadow: var(--herik-shadow);
  min-height: 80px;
}

.quick-action-card i {
  font-size: 1.35rem;
  color: var(--herik-gold-dark);
}

[data-theme="dark"] .quick-action-card i {
  color: var(--herik-gold-light);
}

.quick-action-card:hover {
  border-color: var(--herik-gold);
  color: var(--herik-gold-dark);
  transform: translateY(-2px);
  box-shadow: var(--herik-shadow-md);
}

[data-theme="dark"] .quick-action-card:hover {
  color: var(--herik-gold-light);
}

[data-theme="dark"] .icon-shape.gold {
  color: var(--herik-gold-light);
}

[data-theme="dark"] .payment-mini-card i {
  color: var(--herik-gold-light);
}

.stat-card-enhanced {
  padding: 1.15rem 1.25rem;
}

.stat-card-enhanced h3 {
  font-size: 1.35rem;
}

.stat-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
}

.stat-badge.up {
  background: var(--herik-icon-success-bg);
  color: var(--herik-success);
}

.stat-badge.down {
  background: var(--herik-alert-danger-bg);
  color: var(--herik-danger);
}

.payment-mini-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--herik-bg-card);
  border: 1px solid var(--herik-border);
  border-radius: 12px;
  box-shadow: var(--herik-shadow);
}

.payment-mini-card i {
  font-size: 1.25rem;
  color: var(--herik-gold-dark);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--herik-gold-muted);
  border-radius: 8px;
  flex-shrink: 0;
}

.staff-avatar.rank-1 { background: #fef3c7; color: #b45309; }
.staff-avatar.rank-2 { background: #e2e8f0; color: #475569; }
.staff-avatar.rank-3 { background: #ffedd5; color: #c2410c; }

[data-theme="dark"] .staff-avatar.rank-1 { background: rgba(251,191,36,0.2); color: #fcd34d; }
[data-theme="dark"] .staff-avatar.rank-2 { background: rgba(148,163,184,0.2); color: #cbd5e1; }
[data-theme="dark"] .staff-avatar.rank-3 { background: rgba(251,146,60,0.2); color: #fdba74; }

/* Settings */
.settings-nav-card {
  position: sticky;
  top: calc(var(--topbar-height) + 1rem);
}

.settings-nav .list-group-item {
  border: none;
  border-radius: 8px !important;
  margin: 0.2rem 0.5rem;
  padding: 0.65rem 0.85rem;
  font-weight: 500;
  font-size: 0.84rem;
  color: var(--herik-muted);
  background: transparent;
}

.settings-nav .list-group-item:hover {
  background: var(--herik-bg-hover);
  color: var(--herik-foreground);
}

.settings-nav .list-group-item.active {
  background: var(--herik-gold-muted);
  color: var(--herik-gold-dark);
  font-weight: 600;
}

.settings-panel .card-header {
  background: var(--herik-bg-section);
}

/* ---- Dark mode — global fixes ---- */
.bg-herik-gold.text-white {
  color: var(--herik-on-accent) !important;
}

[data-theme="dark"] .settings-nav .list-group-item.active {
  color: var(--herik-gold-light);
}

[data-theme="dark"] .btn-light {
  --bs-btn-bg: var(--herik-bg-muted);
  --bs-btn-border-color: var(--herik-border);
  --bs-btn-color: var(--herik-foreground);
  --bs-btn-hover-bg: var(--herik-bg-hover);
  --bs-btn-hover-border-color: var(--herik-border-strong);
  --bs-btn-hover-color: var(--herik-foreground);
  --bs-btn-active-bg: var(--herik-bg-hover);
  --bs-btn-active-border-color: var(--herik-border-strong);
  --bs-btn-active-color: var(--herik-foreground);
}

[data-theme="dark"] .btn-outline-light {
  --bs-btn-color: var(--herik-foreground);
  --bs-btn-border-color: var(--herik-border-strong);
  --bs-btn-hover-bg: var(--herik-bg-hover);
  --bs-btn-hover-border-color: var(--herik-border-strong);
  --bs-btn-hover-color: var(--herik-foreground);
}

[data-theme="dark"] .bg-light,
[data-theme="dark"] .text-bg-light {
  background-color: var(--herik-bg-muted) !important;
  color: var(--herik-foreground) !important;
}

[data-theme="dark"] .table-light {
  --bs-table-bg: var(--herik-bg-muted);
  --bs-table-color: var(--herik-foreground);
  --bs-table-border-color: var(--herik-border);
}

[data-theme="dark"] .list-group-item-light {
  background-color: var(--herik-bg-muted);
  color: var(--herik-foreground);
  border-color: var(--herik-border);
}

[data-theme="dark"] .input-group-text {
  background: var(--herik-bg-muted);
  border-color: var(--herik-border);
  color: var(--herik-muted);
}

[data-theme="dark"] .nav-tabs {
  border-bottom-color: var(--herik-border);
}

[data-theme="dark"] .nav-tabs .nav-link {
  color: var(--herik-muted);
}

[data-theme="dark"] .nav-tabs .nav-link:hover,
[data-theme="dark"] .nav-tabs .nav-link:focus {
  border-color: var(--herik-border) var(--herik-border) transparent;
  color: var(--herik-foreground);
}

[data-theme="dark"] .nav-tabs .nav-link.active {
  background: var(--herik-bg-card);
  border-color: var(--herik-border) var(--herik-border) var(--herik-bg-card);
  color: var(--herik-foreground);
}

[data-theme="dark"] .page-link {
  background: var(--herik-bg-card);
  border-color: var(--herik-border);
  color: var(--herik-foreground);
}

[data-theme="dark"] .page-link:hover {
  background: var(--herik-bg-hover);
  border-color: var(--herik-border-strong);
  color: var(--herik-foreground);
}

[data-theme="dark"] .page-item.active .page-link {
  background: var(--herik-gold);
  border-color: var(--herik-gold);
  color: var(--herik-on-accent);
}

[data-theme="dark"] .page-item.disabled .page-link {
  background: var(--herik-bg-muted);
  border-color: var(--herik-border);
  color: var(--herik-nav-muted);
}

[data-theme="dark"] .form-check-input {
  background-color: var(--herik-bg-input);
  border-color: var(--herik-border-strong);
}

[data-theme="dark"] .form-check-input:checked {
  background-color: var(--herik-gold);
  border-color: var(--herik-gold);
}

[data-theme="dark"] .text-dark {
  color: var(--herik-foreground) !important;
}

[data-theme="dark"] .text-muted {
  color: var(--herik-muted) !important;
}

[data-theme="dark"] .border,
[data-theme="dark"] .border-top,
[data-theme="dark"] .border-bottom,
[data-theme="dark"] .border-start,
[data-theme="dark"] .border-end {
  border-color: var(--herik-border) !important;
}

[data-theme="dark"] .service-line:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
