/* ==========================================================
   HIS Sigorta — Design System
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600&display=swap');

/* ===== DESIGN TOKENS ===== */
:root {
  --navy: #0F2D5C;
  --navy-700: #16386F;
  --navy-600: #1F4582;
  --navy-50: #EEF2F8;
  --teal: #0EA5A0;
  --teal-600: #0B8A86;
  --teal-700: #097975;
  --teal-50: #E6F7F6;
  --teal-100: #CFF0EE;
  --success: #16A34A;
  --success-50: #E8F6EC;
  --warning: #D97706;
  --warning-50: #FDF3E5;
  --danger: #DC2626;
  --danger-50: #FCE9E9;
  --info: #2563EB;
  --info-50: #E8EEFB;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --surface-alt: #F8FAFC;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;
  --text: #0F172A;
  --text-muted: #475569;
  --text-soft: #64748B;
  --text-dim: #94A3B8;
  --r-card: 8px;
  --r-btn: 6px;
  --r-pill: 999px;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-pop: 0 8px 24px rgba(15,45,92,0.12), 0 2px 6px rgba(15,45,92,0.06);
  --shadow-focus: 0 0 0 3px rgba(14,165,160,0.18);
  --font-sans: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Override Bootstrap color vars */
  --bs-primary: #0EA5A0;
  --bs-primary-rgb: 14, 165, 160;
  --bs-body-font-family: var(--font-sans);
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-border-color: var(--border);
}

/* ===== BASE ===== */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 14px; }
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  margin: 0; padding: 0;
  overflow-x: hidden;
}

/* ===== APP SHELL ===== */
.app-shell { display: flex; min-height: 100vh; }
.app-main {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  margin-left: 240px;
  transition: margin-left 0.2s ease;
}
.app-main.collapsed { margin-left: 72px; }

/* ===== SIDEBAR ===== */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 240px;
  background: var(--navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  z-index: 50;
  transition: width 0.2s ease;
}
.sidebar.collapsed { width: 72px; }

.sidebar-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 49;
}

.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 18px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  min-height: 72px;
  text-decoration: none; color: #fff;
}
.sidebar-logo-mark {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 50%;
  background: #fff;
  display: grid; place-items: center;
  padding: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.sidebar-logo-mark img { width: 100%; height: 100%; object-fit: contain; }
.sidebar-logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.sidebar-logo-text .name { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.sidebar-logo-text .sub { font-size: 11px; color: rgba(255,255,255,0.55); margin-top: 2px; }

.sidebar.collapsed .sidebar-logo-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-group-title,
.sidebar.collapsed .nav-divider,
.sidebar.collapsed .user-meta,
.sidebar.collapsed .sidebar-user-actions { display: none !important; }

.sidebar-nav {
  flex: 1; overflow-y: auto;
  padding: 12px 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }

.nav-group-title {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  padding: 14px 10px 6px;
  font-weight: 600;
}
.nav-divider { height: 1px; background: rgba(255,255,255,0.06); margin: 6px 8px; }

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 10px;
  border-radius: 6px;
  font-size: 13.5px; font-weight: 500;
  color: rgba(255,255,255,0.78);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
  position: relative;
  white-space: nowrap;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; text-decoration: none; }
.nav-item.active {
  background: rgba(14,165,160,0.16);
  color: #fff;
}
.nav-item.active::before {
  content: ""; position: absolute; left: -10px; top: 6px; bottom: 6px; width: 3px;
  background: var(--teal); border-radius: 0 3px 3px 0;
}
.nav-item.disabled {
  color: rgba(255,255,255,0.32);
  cursor: not-allowed;
  pointer-events: none;
}
.nav-item.nested { padding-left: 18px; font-size: 13px; }
.nav-icon { width: 20px; height: 20px; flex-shrink: 0; display: grid; place-items: center; }
.nav-lock { margin-left: auto; font-size: 11px; color: rgba(255,255,255,0.4); }

.sidebar-user {
  padding: 12px 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; flex-direction: column; gap: 8px;
}
.user-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: 6px; cursor: pointer;
}
.user-row:hover { background: rgba(255,255,255,0.05); }
.user-avatar {
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--teal-700));
  color: #fff; font-weight: 600; font-size: 13px;
  display: grid; place-items: center;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.user-meta .name { font-size: 13px; font-weight: 600; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta .role { font-size: 11px; color: rgba(255,255,255,0.55); }

.sidebar-user-actions { display: flex; flex-direction: column; gap: 2px; }
.user-action {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.6);
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
}
.user-action:hover { background: rgba(255,255,255,0.06); color: #fff; text-decoration: none; }

/* ===== TOPBAR ===== */
.his-topbar {
  height: 60px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  position: sticky; top: 0; z-index: 20;
}
.topbar-left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.topbar-toggle {
  width: 34px; height: 34px;
  flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 6px;
  color: var(--text-muted);
  border: none; background: none; cursor: pointer;
}
.topbar-toggle:hover { background: var(--bg); color: var(--navy); }

.his-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-soft); }
.his-breadcrumb .sep { color: var(--text-dim); }
.his-breadcrumb .current { color: var(--text); font-weight: 600; }

.topbar-right { display: flex; align-items: center; gap: 8px; }
.his-icon-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 6px;
  color: var(--text-muted);
  border: none; background: none; cursor: pointer;
  position: relative;
}
.his-icon-btn:hover { background: var(--bg); color: var(--navy); }

/* ===== SIDEBAR — MOBILE DRAWER ===== */
@media (max-width: 900px) {
  .app-main, .app-main.collapsed { margin-left: 0; }
  .sidebar {
    width: 240px;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,0.3);
  }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar-backdrop.show { display: block; }

  .his-topbar { padding: 0 12px; gap: 6px; }
  .topbar-left { flex: 1; min-width: 0; gap: 8px; }
  .his-breadcrumb { flex: 1; min-width: 0; overflow: hidden; }
  .his-breadcrumb span:not(.current) { display: none; }
  .his-breadcrumb .current {
    display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .topbar-right { gap: 2px; }
  .topbar-user-pill { padding: 5px; margin-left: 0; }
  .topbar-user-pill .name { display: none; }
}
.his-icon-btn .dot {
  position: absolute; top: 8px; right: 8px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--danger);
  border: 2px solid #fff;
}
.topbar-user-pill {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 12px 5px 5px;
  border-radius: 999px;
  background: var(--bg);
  margin-left: 4px;
  border: none; cursor: pointer; color: var(--text);
}
.topbar-user-pill:hover { background: var(--surface-alt); }
.topbar-user-pill .avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-600), var(--navy));
  color: #fff; font-weight: 600; font-size: 11px;
  display: grid; place-items: center;
}
.topbar-user-pill .name { font-size: 13px; font-weight: 600; }
.topbar-user-pill svg { transition: transform 0.15s ease; }
.topbar-user-pill[aria-expanded="true"] svg { transform: rotate(180deg); }

.his-user-menu {
  min-width: 220px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
}
.his-user-menu-header { padding: 8px 10px 6px; }
.his-user-menu-header .name { font-size: 13.5px; font-weight: 700; color: var(--text); }
.his-user-menu-header .role { font-size: 11.5px; color: var(--text-soft); margin-top: 2px; }
.his-user-menu .dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 6px; font-size: 13px;
  width: 100%; border: none; background: none; text-align: left;
}
.his-user-menu .dropdown-item:hover { background: var(--bg); }
.his-user-menu .dropdown-item.text-danger:hover { background: var(--danger-50); }

/* ===== PAGE SURFACE ===== */
.page { padding: 28px 32px 64px; }
.page-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 24px; flex-wrap: wrap;
}
.page-title { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); margin: 0; }
.page-subtitle { font-size: 13.5px; color: var(--text-muted); margin-top: 4px; }

/* ===== STAT CARDS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stats-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .stats-grid { grid-template-columns: minmax(0, 1fr); } }

.stat-card {
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 18px 20px;
  display: flex; align-items: flex-start; gap: 14px;
}
.stat-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: grid; place-items: center; flex-shrink: 0;
  font-size: 20px;
}
.stat-icon.blue { background: var(--info-50); color: var(--info); }
.stat-icon.teal { background: var(--teal-50); color: var(--teal); }
.stat-icon.orange { background: var(--warning-50); color: var(--warning); }
.stat-icon.green { background: var(--success-50); color: var(--success); }
.stat-icon.navy { background: var(--navy-50); color: var(--navy); }
.stat-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.stat-label { font-size: 12.5px; color: var(--text-soft); font-weight: 500; }
.stat-value { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); margin-top: 4px; }
.stat-trend { font-size: 11.5px; margin-top: 6px; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* ===== BOOTSTRAP BUTTON OVERRIDES ===== */
.btn {
  border-radius: var(--r-btn) !important;
  font-weight: 600 !important;
  font-family: var(--font-sans) !important;
  font-size: 13.5px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  transition: background 0.12s, color 0.12s, border-color 0.12s, box-shadow 0.12s !important;
}
.btn-primary {
  background-color: var(--teal) !important;
  border-color: var(--teal) !important;
  color: #fff !important;
}
.btn-primary:hover:not(:disabled), .btn-primary:active:not(:disabled) {
  background-color: var(--teal-600) !important;
  border-color: var(--teal-600) !important;
}
.btn-secondary {
  background-color: var(--navy) !important;
  border-color: var(--navy) !important;
  color: #fff !important;
}
.btn-secondary:hover:not(:disabled) {
  background-color: var(--navy-600) !important;
  border-color: var(--navy-600) !important;
}
.btn-success {
  background-color: var(--success) !important;
  border-color: var(--success) !important;
  color: #fff !important;
}
.btn-success:hover:not(:disabled) { background-color: #128a3e !important; border-color: #128a3e !important; }
.btn-danger { background-color: var(--danger) !important; border-color: var(--danger) !important; }
.btn-outline-secondary {
  background: transparent !important;
  border-color: var(--border-strong) !important;
  color: var(--navy) !important;
}
.btn-outline-secondary:hover:not(:disabled) {
  background-color: var(--navy-50) !important;
  border-color: var(--navy) !important;
  color: var(--navy) !important;
}
.btn-outline-danger {
  border-color: var(--danger) !important;
  color: var(--danger) !important;
  background: transparent !important;
}
.btn-outline-danger:hover:not(:disabled) {
  background-color: var(--danger-50) !important;
}
.btn-dark {
  background-color: var(--navy) !important;
  border-color: var(--navy) !important;
}
.btn-dark:hover:not(:disabled) { background-color: var(--navy-600) !important; }

/* ===== BOOTSTRAP FORM OVERRIDES ===== */
.form-control, .form-select, .form-control-lg {
  height: 40px !important;
  padding: 0 12px !important;
  background: #fff !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  font-size: 13.5px !important;
  font-family: var(--font-sans) !important;
  color: var(--text) !important;
  transition: border-color 0.12s, box-shadow 0.12s !important;
  line-height: 1.5 !important;
}
.form-control-lg { height: 46px !important; font-size: 15px !important; }
textarea.form-control { height: auto !important; padding: 10px 12px !important; }
.form-control::placeholder { color: var(--text-dim) !important; }
.form-control:focus, .form-select:focus {
  border-color: var(--teal) !important;
  box-shadow: var(--shadow-focus) !important;
  outline: none !important;
}
.form-control.is-invalid, .form-select.is-invalid {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(220,38,38,0.1) !important;
}
.form-select {
  appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%2364748B' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  padding-right: 32px !important;
}
.form-label {
  font-size: 12.5px !important;
  font-weight: 600 !important;
  color: var(--text-muted) !important;
  margin-bottom: 6px !important;
}
.form-check-input:checked {
  background-color: var(--teal) !important;
  border-color: var(--teal) !important;
}
.form-check-input:focus { box-shadow: var(--shadow-focus) !important; }
.invalid-feedback { font-size: 11.5px !important; color: var(--danger) !important; }

/* Product permissions */
.product-permission-grid {
  --bs-gutter-y: 10px;
}
.product-permission-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 64px;
  padding: 11px 12px 11px 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease, transform 0.12s ease;
  cursor: pointer;
}
.product-permission-card:hover {
  border-color: #bfe6e3;
  background: #f5fbfb;
}
.product-permission-card .product-permission-checkbox {
  position: absolute;
  left: 12px;
  top: 14px;
  margin: 0 !important;
  flex-shrink: 0;
}
.product-permission-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.product-permission-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.product-permission-meta {
  margin-top: 4px;
  color: var(--text-soft) !important;
  font-size: 11.5px;
}
.product-permission-card.selected {
  border-color: var(--teal);
  background: #eef9f8;
  box-shadow: 0 0 0 1px rgba(14,165,160,0.18);
}
.product-permission-card.selected::after {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--teal);
}

/* ===== BOOTSTRAP CARD OVERRIDES ===== */
.card {
  background: var(--surface);
  border: none !important;
  border-radius: var(--r-card) !important;
  box-shadow: var(--shadow-card) !important;
  min-width: 0;
}
.card-header {
  background: var(--surface-alt) !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 14px 20px !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  color: var(--text) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}
.card-body { padding: 20px !important; }
.card-footer {
  background: var(--surface-alt) !important;
  border-top: 1px solid var(--border) !important;
  padding: 14px 20px !important;
}
.card.shadow, .card.shadow-sm { box-shadow: var(--shadow-card) !important; }

/* ===== BOOTSTRAP TABLE OVERRIDES ===== */
.table { font-size: 13px !important; border-collapse: collapse !important; }
.table thead th {
  background: var(--navy) !important;
  color: rgba(255,255,255,0.9) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
  padding: 12px 16px !important;
  border: none !important;
  white-space: nowrap !important;
}
.table thead th:first-child { padding-left: 20px !important; }
.table thead th:last-child { padding-right: 20px !important; }
.table tbody td {
  padding: 14px 16px !important;
  border-bottom: 1px solid var(--border) !important;
  border-top: none !important;
  vertical-align: middle !important;
}
.table tbody td:first-child { padding-left: 20px !important; }
.table tbody td:last-child { padding-right: 20px !important; }
.table tbody tr:last-child td { border-bottom: none !important; }
.table tbody tr:hover { background-color: var(--teal-50) !important; }
.table.table-hover tbody tr:hover { background-color: var(--teal-50) !important; }
.table-dark thead th { background: var(--navy) !important; }
.table-light { --bs-table-bg: var(--surface-alt) !important; }
.table-striped > tbody > tr:nth-of-type(odd) > * { background-color: rgba(14,165,160,0.03) !important; }

/* ===== BOOTSTRAP BADGE OVERRIDES ===== */
.badge {
  font-size: 11.5px !important;
  font-weight: 600 !important;
  border-radius: var(--r-pill) !important;
  padding: 3px 9px !important;
}
.badge.bg-success, .badge.text-bg-success { background-color: var(--success-50) !important; color: #15803d !important; }
.badge.bg-danger, .badge.text-bg-danger { background-color: var(--danger-50) !important; color: #B91C1C !important; }
.badge.bg-warning, .badge.text-bg-warning { background-color: var(--warning-50) !important; color: #B45309 !important; }
.badge.bg-primary, .badge.text-bg-primary { background-color: var(--navy-50) !important; color: var(--navy) !important; }
.badge.bg-secondary, .badge.text-bg-secondary { background-color: #F1F5F9 !important; color: var(--text-muted) !important; }
.badge.bg-info, .badge.text-bg-info { background-color: var(--info-50) !important; color: var(--info) !important; }
.badge.bg-dark { background-color: var(--navy) !important; color: #fff !important; }

/* ===== BOOTSTRAP ALERT OVERRIDES ===== */
.alert {
  border-radius: var(--r-card) !important;
  border: none !important;
  font-size: 13.5px !important;
}
.alert-success { background: var(--success-50) !important; color: #15803d !important; }
.alert-danger { background: var(--danger-50) !important; color: #B91C1C !important; }
.alert-warning { background: var(--warning-50) !important; color: #B45309 !important; }
.alert-info { background: var(--info-50) !important; color: #1D4ED8 !important; }

/* ===== CUSTOM HIS COMPONENTS ===== */
/* Mono text */
.mono { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-muted); }
.premium { font-weight: 700; color: var(--navy); }

/* Branch chips */
.branch-chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 9px;
  border-radius: 6px;
  font-size: 11.5px; font-weight: 600;
}
.branch-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.branch-seyahat { background: var(--info-50); color: var(--info); }
.branch-saglik { background: var(--teal-50); color: var(--teal-700); }
.branch-hayat { background: var(--warning-50); color: #B45309; }
.branch-kaza { background: #F3E8FF; color: #7E22CE; }

/* Mini tags */
.tag-mini {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px;
  border-radius: 6px;
  font-size: 10.5px; font-weight: 700;
}
.tag-mini.T { background: var(--info-50); color: var(--info); }
.tag-mini.S { background: var(--teal-50); color: var(--teal-700); }
.tag-mini.H { background: var(--warning-50); color: #B45309; }
.tag-mini.K { background: #F3E8FF; color: #7E22CE; }

/* Wizard steps */
.wizard-steps {
  display: flex;
  align-items: flex-start;
  padding: 24px 32px;
  background: #fff;
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
  overflow-x: auto;
}
.wizard-step {
  display: flex; flex-direction: column; align-items: center;
  flex: 1; min-width: 72px;
  position: relative; gap: 8px;
}
.wizard-step:not(:last-child)::after {
  content: ""; position: absolute;
  top: 15px; left: calc(50% + 20px); right: calc(-50% + 20px);
  height: 2px; background: var(--border); z-index: 0;
}
.wizard-step.done:not(:last-child)::after { background: var(--teal); }
.wizard-step-circle {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
  background: #fff; border: 2px solid var(--border);
  color: var(--text-soft);
  position: relative; z-index: 1;
  transition: all 0.2s;
}
.wizard-step.current .wizard-step-circle {
  background: var(--navy); border-color: var(--navy); color: #fff;
  box-shadow: 0 0 0 4px rgba(15,45,92,0.12);
}
.wizard-step.done .wizard-step-circle {
  background: var(--teal); border-color: var(--teal); color: #fff;
}
.wizard-step-label {
  font-size: 11.5px; font-weight: 500; color: var(--text-soft);
  text-align: center; white-space: nowrap;
}
.wizard-step.current .wizard-step-label { color: var(--navy); font-weight: 700; }
.wizard-step.done .wizard-step-label { color: var(--text); }
.wizard-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; gap: 12px; }

/* Bar chart */
.bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.bar-row .lbl { width: 110px; font-size: 12.5px; color: var(--text-muted); font-weight: 500; }
.bar-row .track { flex: 1; height: 18px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.bar-row .fill { height: 100%; border-radius: 4px; }
.bar-row .val { width: 80px; text-align: right; font-size: 12.5px; font-weight: 600; color: var(--navy); }

/* Coming soon overlay */
.coming-soon-overlay {
  position: absolute; inset: 0;
  background: rgba(248,250,252,0.7);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  border-radius: var(--r-card); z-index: 5;
}
.coming-soon-badge {
  background: #fff; border: 1px solid var(--border);
  padding: 10px 16px; border-radius: 999px;
  font-weight: 700; font-size: 13px; color: var(--navy);
  display: flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow-card);
}

/* Spinner */
.his-spinner {
  width: 14px; height: 14px;
  border: 2px solid var(--teal-100);
  border-top-color: var(--teal);
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Animations */
@keyframes scaleIn {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.25s ease both; }

/* Divider */
.his-divider { height: 1px; background: var(--border); margin: 16px 0; }

/* Section title */
.section-title {
  font-size: 11.5px; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-soft);
  font-weight: 700; margin: 0 0 12px;
}

/* Floating label */
.floating { position: relative; }
.floating .form-control {
  height: 52px !important;
  padding: 22px 12px 8px 14px !important;
}
.floating label {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  font-size: 13.5px; color: var(--text-soft);
  pointer-events: none;
  transition: all 0.15s ease;
  font-weight: 400 !important;
  margin: 0 !important;
}
.floating .form-control:focus ~ label,
.floating .form-control:not(:placeholder-shown) ~ label {
  top: 13px; transform: translateY(0);
  font-size: 11px; color: var(--teal); font-weight: 600 !important;
}

/* Toggle switch */
.his-switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.his-switch input { opacity: 0; width: 0; height: 0; }
.his-switch .slider { position: absolute; inset: 0; background: var(--border-strong); border-radius: 999px; transition: 0.18s; }
.his-switch .slider::before {
  content: ""; position: absolute; height: 16px; width: 16px;
  left: 3px; top: 3px; background: #fff; border-radius: 50%;
  transition: 0.18s; box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.his-switch input:checked + .slider { background: var(--teal); }
.his-switch input:checked + .slider::before { transform: translateX(18px); }

/* Quick action CTA card */
.quick-action-cta {
  background: linear-gradient(135deg, #0EA5A0 0%, #097975 100%);
  color: #fff;
  border-radius: 12px;
  padding: 24px;
  text-align: left;
  position: relative; overflow: hidden;
  box-shadow: 0 4px 14px rgba(14,165,160,0.25);
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer; border: none; width: 100%; display: block;
  text-decoration: none;
}
.quick-action-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(14,165,160,0.32);
  color: #fff; text-decoration: none;
}
.quick-action-locked {
  background: #fff; border-radius: 12px; padding: 20px;
  box-shadow: var(--shadow-card); position: relative;
  overflow: hidden; opacity: 0.85;
}

/* Page content wrapper */
.page-content { flex: 1; }

/* Progress bar */
.his-progress {
  height: 4px; background: var(--border); border-radius: 2px; margin-bottom: 0; overflow: hidden;
}
.his-progress-bar { height: 100%; background: var(--teal); border-radius: 2px; transition: width 0.3s; }

/* User avatar circle */
.user-circle {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; font-size: 13px; color: #fff;
  flex-shrink: 0;
}

/* Input with icon */
.input-icon { position: relative; }
.input-icon .form-control { padding-left: 38px !important; }
.input-icon .icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-soft); pointer-events: none; z-index: 1;
}

/* ===== BODY DEFAULT ===== */
.text-navy { color: var(--navy) !important; }
.text-teal { color: var(--teal) !important; }
.fw-700 { font-weight: 700 !important; }
.fs-12 { font-size: 12px !important; }
.fs-13 { font-size: 13px !important; }

/* Container removal for full-width layout */
body > .container { max-width: none !important; padding: 0 !important; }

/* Remove Bootstrap's default body padding that conflicts with sidebar */
@media (min-width: 992px) {
  .container { max-width: none; }
}

/* ===== MISSING RADIUS TOKENS ===== */
:root {
  --r-lg: 12px;
  --r-md: 8px;
  --r-sm: 6px;
}

/* ===== WIZARD LAYOUT ===== */
.wizard-wrap {
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}

/* Responsive form grids */
.tw-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.tw-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.tw-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .wizard-wrap { max-width: 100%; }
  .tw-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .tw-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .page { padding: 16px 16px 48px; }
  .tw-grid-3, .tw-grid-2, .tw-grid-4 { grid-template-columns: 1fr; }
}

/* Wizard step bar responsive */
.wizard-steps-bar {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 28px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.wizard-steps-bar::-webkit-scrollbar { display: none; }
