/* ============================================
   IMPORTS
   ============================================ */
@import 'imports.css';

/* ============================================
   CSS VARIABLES — LIGHT MODE
   ============================================ */
:root {
  /* ── Typography ── */
  --font-body: 'Poppins', sans-serif;
  --text-xs:   11px;
  --text-sm:   12.5px;
  --text-base: 14px;
  --text-md:   15px;
  --text-lg:   17px;
  --text-xl:   20px;
  --text-2xl:  24px;
  --text-3xl:  30px;
  --text-4xl:  36px;

  /* ── Brand / Orange scale ── */
  --orange-50:  #FFFBF2;
  --orange-100: #FEF3DC;
  --orange-200: #FDE4A8;
  --orange-300: #FCCC6A;
  --orange-400: #F9B030;
  --orange-500: #F4960F;   /* brand primary */
  --orange-600: #D97E0A;
  --orange-700: #B56507;
  --orange-800: #8E4E05;
  --orange-900: #6B3A04;

  /* ── Slate / Neutral scale ── */
  --slate-50:  #F8FAFC;
  --slate-100: #F1F5F9;
  --slate-200: #E2E8F0;
  --slate-300: #CBD5E1;
  --slate-400: #94A3B8;
  --slate-500: #64748B;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1E293B;
  --slate-900: #0F172A;

  /* ── Green scale ── */
  --green-50:  #F0FDF4;
  --green-100: #DCFCE7;
  --green-500: #22C55E;
  --green-600: #16A34A;
  --green-700: #15803D;

  /* ── Red scale ── */
  --red-50:  #FEF2F2;
  --red-100: #FEE2E2;
  --red-500: #EF4444;
  --red-600: #DC2626;

  /* ── Blue scale ── */
  --blue-50:  #EFF6FF;
  --blue-100: #DBEAFE;
  --blue-500: #3B82F6;
  --blue-600: #2563EB;

  /* ── Amber scale ── */
  --amber-50:  #FFFBEB;
  --amber-100: #FEF3C7;
  --amber-500: #F59E0B;
  --amber-600: #D97706;

  /* ── Purple scale ── */
  --purple-50:  #FAF5FF;
  --purple-100: #F3E8FF;
  --purple-500: #A855F7;
  --purple-600: #9333EA;

  /* ── Navy (sidebar) scale ── */
  --navy-900: #1A1F2E;
  --navy-800: #252B3D;
  --navy-700: #313A52;
  --navy-600: #404D6A;
  --navy-500: #536080;

  /* ── Spacing scale ── */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* ── Semantic aliases (resolve to scale values above) ── */
  --brand-navy:    var(--navy-900);
  --accent:        var(--orange-500);
  --accent-hover:  var(--orange-600);
  --accent-soft:   var(--orange-100);
  --accent-rgb:    244, 150, 16;

  --green:       var(--green-500);
  --green-soft:  var(--green-100);
  --amber:       var(--amber-500);
  --amber-soft:  var(--amber-100);
  --red:         var(--red-500);
  --red-soft:    var(--red-100);
  --purple:      var(--purple-500);
  --purple-soft: var(--purple-100);
  --blue:        var(--blue-500);
  --blue-soft:   var(--blue-100);
  --navy-soft:   rgba(26, 31, 46, .08);

  /* ── Light surfaces ── */
  --bg-base:      #f0f2f5;
  --bg-surface:   #ffffff;
  --bg-surface-2: #f7f8fa;
  --bg-topbar:    #ffffff;
  --bg-sidebar:   var(--navy-900);

  /* ── Light borders ── */
  --border:       #e3e7ed;
  --border-light: #eef0f4;

  /* ── Light text ── */
  --text-primary:   #0f1923;
  --text-secondary: #4a5568;
  --text-muted:     #8a95a3;

  /* ── Layout ── */
  --sidebar-width:     260px;
  --sidebar-collapsed: 72px;
  --topbar-height:     64px;

  /* ── Radii ── */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* ── Shadows ── */
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, .06);
  --shadow:    0 4px 20px rgba(0, 0, 0, .08);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, .13);
  --shadow-accent: 0 4px 14px rgba(244, 150, 16, .35);

  --transition: 0.22s cubic-bezier(.4, 0, .2, 1);
}

/* ============================================
   DARK MODE — only surface/text/border change
   Sidebar stays navy always
   ============================================ */
[data-theme="dark"] {
  --bg-base: #0c1220;
  --bg-surface: #121c2e;
  --bg-surface-2: #1a2640;
  --bg-topbar: #121c2e;

  --border: #1e2d45;
  --border-light: #182038;

  --text-primary: #dce6f0;
  --text-secondary: #7a8fa8;
  --text-muted: #415672;

  --accent-soft: #2A1500;
  --green-soft: #052e16;
  --amber-soft: #1c1400;
  --red-soft: #280d0d;
  --blue-soft: #0c1f3d;
  --purple-soft: #2e1065;
  --navy-soft: rgba(244, 150, 16, .12);

  --shadow-sm: 0 1px 4px rgba(0, 0, 0, .35);
  --shadow: 0 4px 20px rgba(0, 0, 0, .45);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, .6);
}

/* ============================================
   BASE RESET
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 14px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

a {
  text-decoration: none;
  color: inherit;
}

strong {
  font-weight: 600;
}

/* Global Flaticon alignment fix — kills the float/line-height push */
[class^="fi-"],
[class*=" fi-"] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  vertical-align: middle !important;
  position: relative;
  top: 0 !important;
}

/* Bootstrap overrides — make sure bg/text use our vars */
.table {
  --bs-table-bg: transparent;
  color: var(--text-secondary);
}

.table> :not(caption)>*>* {
  background-color: transparent;
  color: inherit;
}

.card {
  background: var(--bg-surface);
  border-color: var(--border);
}

.form-control,
.form-select {
  background-color: var(--bg-surface-2);
  border-color: var(--border);
  color: var(--text-primary);
  font-family: var(--font-body);
}

.form-control:focus,
.form-select:focus {
  background-color: var(--bg-surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(244, 150, 16, .15);
  color: var(--text-primary);
}

/* ============================================
   LAYOUT SHELL
   ============================================ */
.crm-shell {
  display: flex;
  min-height: 100vh;
}

/* ============================================
   SIDEBAR
   Navy always — scrollable — collapses to icons
   ============================================ */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background: #121C2E;
  /* deep navy — never changes with theme */
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 300;
  transition: width var(--transition);
  /* NO overflow:hidden here — was blocking scroll */
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed);
}

/* ── Brand ── */
.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  height: var(--topbar-height);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  left: -10px;
  min-width: 0;
  transition: padding var(--transition);
}

.brand-logo {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: -.3px;
  /* hidden when expanded — logo image takes over */
  opacity: 0;
  transition: opacity var(--transition);
}

.sidebar.collapsed .brand-logo {
  opacity: 1;
}

.brand-logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  align-items: center;
  min-width: 0;
  transition: opacity var(--transition), width var(--transition);
  position: relative;
  left: -12px;
}

.sidebar.collapsed .brand-text {
  opacity: 0;
  width: 0;
  overflow: hidden;
  pointer-events: none;
}

.sidebar.collapsed .sidebar-brand {
  padding: 0;
  justify-content: center;
  gap: 0;
  position: static;
  left: 0;
}

.sidebar.collapsed .brand-logo-img {
  height: 32px;
}

.brand-tagline {
  min-width: 0;
  white-space: nowrap;
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, .15);
}

.brand-tagline-main {
  font-size: 10px;
  font-weight: 700;
  font-style: italic;
  color: rgba(255, 255, 255, .88);
  letter-spacing: .01em;
  line-height: 1.4;
}

.brand-tagline-sub {
  font-size: 9px;
  font-weight: 400;
  color: rgba(255, 255, 255, .45);
  letter-spacing: .03em;
  margin-top: 1px;
}

.brand-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  line-height: 1.25;
}

.brand-sub {
  font-size: 9.5px;
  color: rgba(255, 255, 255, .38);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: .1em;
}

/* ── Nav scroll area ── */
.sidebar-nav {
  flex: 1;
  padding: 8px;
  overflow-y: auto;
  /* scrollable */
  overflow-x: hidden;
  /* thin scrollbar */
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .12) transparent;
}

.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .12);
  border-radius: 4px;
}

/* ── Section labels ── */
.nav-section-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .28);
  padding: 14px 10px 4px;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity var(--transition), max-height var(--transition);
}

.sidebar.collapsed .nav-section-label {
  opacity: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

/* ── Nav items ── */
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: rgba(255, 255, 255, .5);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
  position: relative;
  margin-bottom: 3px;
  /* no overflow:hidden — would clip collapsed tooltip */
}

.nav-item:hover {
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .92);
}

.nav-item.active {
  background: var(--accent);
  color: #fff;
}

.nav-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.nav-label {
  font-size: 13px;
  font-weight: 500;
  flex: 1;
  min-width: 0;
  transition: opacity var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar.collapsed .nav-label {
  opacity: 0;
  width: 0;
  flex: none;
  pointer-events: none;
}

.nav-badge {
  margin-left: auto;
  background: rgba(255, 255, 255, .15);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 20px;
  flex-shrink: 0;
  transition: opacity var(--transition);
}

.nav-item.active .nav-badge {
  background: rgba(255, 255, 255, .25);
}

.sidebar.collapsed .nav-badge {
  opacity: 0;
  width: 0;
  flex: none;
}

/* Collapsed: centre icon in rail width */
.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 9px 0;
  gap: 0;
  width: 100%;
}

/* ── Collapsed tooltip ── */
.sidebar.collapsed .nav-item::after {
  content: attr(data-label);
  position: absolute;
  left: calc(var(--sidebar-collapsed) + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: #1A1F2E;
  border: 1px solid rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
}

.sidebar.collapsed .nav-item:hover::after {
  opacity: 1;
}

/* ── Sidebar footer / user ── */
.sidebar-footer {
  padding: 8px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  flex-shrink: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  overflow: hidden;
  transition: background var(--transition);
}

.sidebar-user:hover {
  background: rgba(255, 255, 255, .07);
}

.s-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.s-user-info {
  overflow: hidden;
  min-width: 0;
  transition: opacity var(--transition), width var(--transition);
}

.sidebar.collapsed .s-user-info {
  opacity: 0;
  width: 0;
}

.s-user-name {
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, .9);
  white-space: nowrap;
}

.s-user-role {
  font-size: 11px;
  color: rgba(255, 255, 255, .35);
  white-space: nowrap;
}

/* ============================================
   MAIN WRAP
   ============================================ */
.main-wrap {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  transition: margin-left var(--transition);
}

.main-wrap.sidebar-collapsed {
  margin-left: var(--sidebar-collapsed);
}

/* ============================================
   TOPBAR
   ============================================ */
.topbar {
  height: var(--topbar-height);
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 200;
  transition: background var(--transition), border-color var(--transition);
}

.topbar .container {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
}

/* ── Breadcrumb bar — sits directly below topbar, full-width ── */
.page-breadcrumb {
  width: 100%;
  padding: 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: var(--topbar-height);
  z-index: 199;
  transition: background var(--transition), border-color var(--transition);
}

.page-breadcrumb .container {
  padding-top: 10px;
  padding-bottom: 10px;
}

.page-breadcrumb .breadcrumb-item a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color .15s;
}

.page-breadcrumb .breadcrumb-item a:hover {
  color: var(--accent);
}

.page-breadcrumb .breadcrumb-item.active {
  font-size: 13px;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.page-breadcrumb .breadcrumb-item+.breadcrumb-item::before {
  color: var(--text-muted);
  font-size: 11px;
}

.topbar-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition);
  flex-shrink: 0;
}

.topbar-toggle:hover {
  background: var(--bg-surface-2);
  color: var(--text-primary);
}

.page-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  transition: color var(--transition);
}

h1.page-title {
  font-size: 20px;
  letter-spacing: -.02em;
  line-height: 1.25;
  white-space: normal;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.topbar-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition);
  position: relative;
}

.topbar-btn:hover {
  background: var(--bg-surface-2);
  color: var(--text-primary);
}

.badge-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  background: var(--red);
  border-radius: 50%;
  border: 2px solid var(--bg-topbar);
}

/* Theme toggle */
.theme-toggle {
  width: 52px;
  height: 26px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  display: flex;
  align-items: center;
  padding: 2px;
  cursor: pointer;
  transition: background var(--transition);
  outline: none;
  flex-shrink: 0;
}

.theme-toggle-knob {
  width: 20px;
  height: 20px;
  background: var(--bg-surface);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  transition: transform var(--transition), background var(--transition);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .theme-toggle-knob {
  transform: translateX(26px);
}

/* User dropdown */
.topbar-user-wrap {
  position: relative;
}

.topbar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid var(--border);
  transition: border-color var(--transition);
}

.topbar-avatar:hover {
  border-color: var(--accent);
}

.user-dropdown {
  width: 240px;
  background: var(--bg-surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-lg) !important;
  padding: 0 !important;
  overflow: hidden;
}

.notif-dropdown {
  width: 300px;
  background: var(--bg-surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-lg) !important;
  padding: 0 !important;
  overflow: hidden;
}

.notif-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.notif-clear {
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  font-size: 12.5px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
  line-height: 1.5;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item i {
  font-size: 15px;
  flex-shrink: 0;
  margin-top: 1px;
}

.user-dropdown-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
}

.ud-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.ud-email {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.user-dropdown-divider {
  height: 1px;
  background: var(--border-light);
  margin: 4px 0;
}

.ud-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.ud-item:hover {
  background: var(--bg-surface-2);
  color: var(--text-primary);
}

.ud-item i {
  font-size: 14px;
  width: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.ud-item.danger {
  color: var(--red);
}

.ud-item.danger i {
  color: var(--red);
}

.ud-item.danger:hover {
  background: var(--red-soft);
}

/* ============================================
   PAGE CONTENT
   ============================================ */
.page-content {
  flex: 1;
  padding: 24px 26px;
  display: none;
  min-width: 0;
}

.page-content.active {
  display: block;
}

/* ============================================
   PAGE HEADER
   ============================================ */
.pg-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 12px;
}

.pg-header h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.25;
}

.pg-header p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 3px 0 0;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-sts {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-sts.primary {
  background: var(--accent);
  color: #fff;
}

.btn-sts.primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(244, 150, 16, .35);
  transform: translateY(-1px);
}

.btn-sts.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.btn-sts.ghost:hover {
  background: var(--bg-surface-2);
  color: var(--text-primary);
}

.btn-sts.danger {
  background: var(--red);
  color: #fff;
}

.btn-sts.danger:hover {
  background: #dc2626;
}

.btn-sts.sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-sts.xs {
  padding: 4px 9px;
  font-size: 11px;
}

/* ============================================
   CARDS
   ============================================ */
.sts-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.sts-card-header {
  padding: 16px 24px 14px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  transition: border-color var(--transition);
}

.sts-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.sts-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.sts-card-body {
  padding: 24px;
}

/* Global table min-height — prevents collapsed tables with few rows */
.table tbody {
  display: table-row-group;
}

.dataTables_wrapper .dataTables_scrollBody {
  /* min-height removed — was forcing large blank space on small datasets */
}

.dataTable tbody td {
  vertical-align: middle;
}

/* ============================================
   KPI CARDS — clean, minimal, data-focused
   ============================================ */
/* ── KPI strip container ── */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-strip-3 {
  grid-template-columns: repeat(3, 1fr);
}

.kpi-strip-2 {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 900px) {
  .kpi-strip,
  .kpi-strip-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .kpi-strip,
  .kpi-strip-2,
  .kpi-strip-3 { grid-template-columns: 1fr; }
}

/* ── Card shell ── */
.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px 20px;
  cursor: default;
  transition: box-shadow .18s ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.kpi-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, .08);
}

/* ── Suppress legacy chrome ── */
.kpi-icon,
.kpi-icon-box,
.kpi-head,
.kpi-expand,
.kpi-spark {
  display: none !important;
}

/* ── Old pages wrap val+lbl in .kpi-body — flip so label renders above value ── */
.kpi-body {
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 4px;
}

/* ── Label — uppercase, tiny, muted ── */
.kpi-label,
.kpi-lbl {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── Value — large bold number ── */
.kpi-value,
.kpi-val {
  font-size: 30px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -.03em;
  white-space: nowrap;
}

/* Add breathing room only when value is a direct card child (new simple structure) */
.kpi-card > .kpi-value,
.kpi-card > .kpi-val {
  margin: 8px 0 2px;
}

/* ── Unit suffix ── */
.kpi-unit {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: .03em;
  margin-left: 4px;
}

/* ── Change / sub-label ── */
.kpi-change {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 12px;
  white-space: nowrap;
  border-radius: 20px;
}

.kpi-change.up {
  color: var(--green-600);
  background: var(--green-soft);
  padding: 3px 9px 3px 7px;
}

.kpi-change.down {
  color: var(--red-600);
  background: var(--red-soft);
  padding: 3px 9px 3px 7px;
}

.kpi-change.up::before   { content: '↑'; font-size: 11px; line-height: 1; }
.kpi-change.down::before { content: '↓'; font-size: 11px; line-height: 1; }

/* ============================================
   CERT RENEWAL ROWS
   ============================================ */
.renewal-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border-light);
}

.renewal-row:last-child {
  border-bottom: none;
}

.renewal-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 100px;
}

.renewal-course {
  font-size: 12.5px;
  color: var(--text-muted);
  flex: 1;
}

/* ============================================
   BADGES
   ============================================ */
.badge-sts {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.4;
}

.badge-sts.teal {
  background: var(--accent-soft);
  color: var(--accent);
}

.badge-sts.green {
  background: var(--green-soft);
  color: #059669;
}

.badge-sts.amber {
  background: var(--amber-soft);
  color: #b45309;
}

.badge-sts.red {
  background: var(--red-soft);
  color: #dc2626;
}

.badge-sts.purple {
  background: var(--purple-soft);
  color: var(--purple);
}

.badge-sts.slate {
  background: var(--bg-surface-2);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.badge-sts.navy {
  background: var(--navy-soft);
  color: #1A1F2E;
}

[data-theme="dark"] .badge-sts.green {
  color: var(--green);
}

[data-theme="dark"] .badge-sts.amber {
  color: var(--amber);
}

[data-theme="dark"] .badge-sts.red {
  color: var(--red);
}

[data-theme="dark"] .badge-sts.navy {
  color: #F49610;
}

/* ============================================
   DATATABLES — full override for both themes
   ============================================ */

/* Wrapper */
.dataTables_wrapper {
  color: var(--text-secondary);
}

/* Search + length inputs */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  background: var(--bg-surface-2) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text-primary) !important;
  padding: 6px 10px !important;
  font-family: var(--font-body) !important;
  font-size: 12.5px !important;
  outline: none !important;
  transition: border-color var(--transition) !important;
}

.dataTables_wrapper .dataTables_filter input:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(14, 165, 176, .12) !important;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dataTables_length label {
  font-size: 12px !important;
  color: var(--text-muted) !important;
  font-family: var(--font-body) !important;
}

/* Pagination */
.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: var(--radius-sm) !important;
  font-size: 12px !important;
  font-family: var(--font-body) !important;
  color: var(--text-secondary) !important;
  border: 1px solid transparent !important;
  padding: 4px 10px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: var(--accent) !important;
  color: #fff !important;
  border-color: var(--accent) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:not(.current):hover {
  background: var(--bg-surface-2) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
  color: var(--text-muted) !important;
  background: transparent !important;
}

/* thead */
table.dataTable thead th,
table.dataTable thead td {
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: .07em !important;
  text-transform: uppercase !important;
  color: var(--text-muted) !important;
  background: var(--bg-surface-2) !important;
  border-bottom: 2px solid var(--border) !important;
  padding: 10px 13px !important;
  white-space: nowrap;
}

/* tbody */
table.dataTable tbody td {
  font-size: 13px !important;
  color: var(--text-secondary) !important;
  border-bottom: 1px solid var(--border-light) !important;
  padding: 11px 13px !important;
  vertical-align: middle !important;
  background: transparent !important;
}

table.dataTable tbody tr {
  background: transparent !important;
}

table.dataTable tbody tr:hover td {
  background: var(--bg-surface-2) !important;
}

table.dataTable tbody tr:last-child td {
  border-bottom: none !important;
}

/* tfoot — column search inputs */
table.dataTable tfoot th,
table.dataTable tfoot td {
  background: var(--bg-surface-2) !important;
  border-top: 2px solid var(--border) !important;
  padding: 6px 13px !important;
}

table.dataTable tfoot input {
  width: 100%;
  background: var(--bg-surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  padding: 5px 8px !important;
  font-size: 11.5px !important;
  font-family: var(--font-body) !important;
  color: var(--text-primary) !important;
  outline: none !important;
  transition: border-color var(--transition) !important;
}

table.dataTable tfoot input:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px rgba(14, 165, 176, .12) !important;
}

table.dataTable tfoot input::placeholder {
  color: var(--text-muted) !important;
  font-size: 11px !important;
}

/* Sort icons */
table.dataTable thead .sorting::before,
table.dataTable thead .sorting::after,
table.dataTable thead .sorting_asc::after,
table.dataTable thead .sorting_desc::after {
  color: var(--accent) !important;
  opacity: .6;
}

/* No stripes — clean look */
table.dataTable.no-footer {
  border-bottom: none !important;
}

/* ============================================
   CHARTS
   ============================================ */
.c3 line,
.c3 path {
  stroke: var(--border) !important;
}

.c3 .domain {
  stroke: var(--border) !important;
}

.c3-axis text {
  fill: var(--text-muted) !important;
  font-size: 11px !important;
  font-family: var(--font-body) !important;
}

.c3-legend-item text {
  fill: var(--text-secondary) !important;
  font-size: 11px !important;
  font-family: var(--font-body) !important;
}

.c3-tooltip {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  box-shadow: var(--shadow) !important;
  font-family: var(--font-body) !important;
}

.c3-tooltip th {
  background: var(--bg-surface-2) !important;
  color: var(--text-secondary) !important;
  font-size: 11px !important;
  border-bottom: 1px solid var(--border) !important;
}

.c3-tooltip td {
  color: var(--text-primary) !important;
  font-size: 12px !important;
}

.c3-tooltip td.value {
  color: var(--accent) !important;
  font-weight: 600 !important;
}

/* ============================================
   ACTIVITY FEED
   ============================================ */
.activity-item {
  display: flex;
  gap: 11px;
  padding: 9px 0;
  position: relative;
}

.activity-item::before {
  content: '';
  position: absolute;
  left: 13px;
  top: 34px;
  bottom: -9px;
  width: 1px;
  background: var(--border-light);
}

.activity-item:last-child::before {
  display: none;
}

.activity-dot {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  color: var(--accent);
}

.activity-text {
  font-size: 12.5px;
  color: var(--text-primary);
  line-height: 1.45;
}

.activity-text strong {
  color: var(--accent);
}

.activity-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* ============================================
   PROGRESS BAR
   ============================================ */
.sts-progress {
  height: 5px;
  background: var(--bg-surface-2);
  border-radius: 10px;
  overflow: hidden;
}

.sts-progress-bar {
  height: 100%;
  border-radius: 10px;
  background: var(--accent);
  transition: width 1s ease;
}

/* ============================================
   UPCOMING JOBS WIDGET
   ============================================ */
.upcoming-job {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.upcoming-job:last-child {
  border-bottom: none;
}

.job-date-box {
  width: 40px;
  min-width: 40px;
  text-align: center;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  padding: 5px 3px;
}

.job-date-day {
  font-size: 17px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.job-date-mon {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.job-detail {
  flex: 1;
  min-width: 0;
}

.job-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.job-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* ============================================
   INLINE TABLE (dashboard, cert renewals)
   ============================================ */
.simple-table {
  width: 100%;
  border-collapse: collapse;
}

.simple-table th {
  padding: 9px 16px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-surface-2);
  border-bottom: 1px solid var(--border);
}

.simple-table td {
  padding: 10px 16px;
  font-size: 12.5px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.simple-table tr:last-child td {
  border-bottom: none;
}

.simple-table tr:hover td {
  background: var(--bg-surface-2);
}

.simple-table td strong {
  color: var(--text-primary);
}

/* ============================================
   SWEETALERT2 THEME
   ============================================ */
.swal2-popup {
  font-family: var(--font-body) !important;
  border-radius: var(--radius-lg) !important;
  background: var(--bg-surface) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border) !important;
}

.swal2-title {
  color: var(--text-primary) !important;
  font-size: 17px !important;
  font-weight: 700 !important;
}

.swal2-html-container {
  color: var(--text-secondary) !important;
  font-size: 13px !important;
  line-height: 1.6 !important;
}

.swal2-confirm {
  background: var(--accent) !important;
  border-radius: var(--radius-sm) !important;
  font-family: var(--font-body) !important;
  font-weight: 600 !important;
  font-size: 13px !important;
}

.swal2-cancel,
.swal2-deny {
  border-radius: var(--radius-sm) !important;
  font-family: var(--font-body) !important;
  font-weight: 600 !important;
  font-size: 13px !important;
}

/* ============================================
   DATEPICKER THEME
   ============================================ */
.datepicker {
  font-family: var(--font-body) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-lg) !important;
  background: var(--bg-surface) !important;
}

.datepicker table tr td,
.datepicker table tr th {
  color: var(--text-primary) !important;
  font-family: var(--font-body) !important;
}

.datepicker table tr td.active,
.datepicker table tr td.active:hover {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
}

.datepicker table tr td.today {
  background: var(--accent-soft) !important;
  color: var(--accent) !important;
  border-color: var(--accent) !important;
}

.datepicker .datepicker-switch,
.datepicker .prev,
.datepicker .next {
  color: var(--text-primary) !important;
}

/* ============================================
   SETTINGS SIDEBAR ITEMS
   ============================================ */
.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  margin: 2px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.settings-nav-item:hover {
  background: var(--bg-surface-2);
  color: var(--text-primary);
}

.settings-nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.settings-nav-item i {
  font-size: 15px;
  width: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.settings-nav-item.active i {
  color: var(--accent);
}

/* ============================================
   FORM INPUTS (settings page)
   ============================================ */
.form-field label {
  display: block;
  margin-bottom: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-field input[type="text"],
.form-field input[type="email"] {
  width: 100%;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(14, 165, 176, .12);
}

/* Toggle switch */
.toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-light);
}

.toggle-wrap:last-child {
  border-bottom: none;
}

.toggle-wrap span {
  font-size: 13.5px;
  color: var(--text-primary);
}

.toggle-btn {
  width: 42px;
  height: 24px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 2px;
  flex-shrink: 0;
  transition: background var(--transition);
}

.toggle-btn.on {
  background: var(--accent);
}

.toggle-btn.off {
  background: var(--border);
}

.toggle-knob {
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
  transition: margin-left var(--transition);
}

.toggle-btn.on .toggle-knob {
  margin-left: 18px;
}

.toggle-btn.off .toggle-knob {
  margin-left: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
  .sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width) !important;
    transition: transform var(--transition);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .main-wrap {
    margin-left: 0 !important;
  }

  .topbar-toggle {
    display: flex;
  }
}

/* ============================================
   UTILITY
   ============================================ */
.text-accent {
  color: var(--accent) !important;
}

.text-green {
  color: var(--green) !important;
}

.text-amber {
  color: var(--amber) !important;
}

.text-danger {
  color: var(--red) !important;
}

.text-muted-c {
  color: var(--text-muted) !important;
}

.fw-500 {
  font-weight: 500;
}

.fw-600 {
  font-weight: 600;
}

.fw-700 {
  font-weight: 700;
}

.gap-1 {
  gap: 6px !important;
}

.gap-2 {
  gap: 8px !important;
}

.cand-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

/* ============================================
   SIDEBAR SUB-NAV (accordion groups)
   ============================================ */
.nav-arrow {
  margin-left: auto;
  font-size: 11px;
  color: rgba(255, 255, 255, .35);
  transition: transform var(--transition);
  flex-shrink: 0;
}

.nav-item.has-sub.open .nav-arrow {
  transform: rotate(180deg);
}

.nav-item.has-sub.open {
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .8);
}

.nav-sub {
  display: none;
  padding: 2px 0 6px 12px;
  overflow: hidden;
  margin-bottom: 4px;
}

.nav-sub.open {
  display: block;
}

.sidebar.collapsed .nav-sub {
  display: none !important;
}

.sidebar.collapsed .nav-arrow {
  display: none !important;
}

.sidebar.collapsed .nav-badge {
  display: none !important;
}

.nav-sub-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px 7px 14px;
  font-size: 12.5px;
  font-weight: 400;
  color: rgba(255, 255, 255, .45);
  border-left: 1px solid rgba(255, 255, 255, .1);
  margin-left: 13px;
  cursor: pointer;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-sub-item i {
  font-size: 12px;
  flex-shrink: 0;
}

.nav-sub-item:hover {
  color: rgba(255, 255, 255, .85);
  background: rgba(255, 255, 255, .06);
  border-left-color: var(--accent);
}

.nav-sub-item.active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 600;
}

/* ============================================
   USER POPOVER (Bootstrap popover override)
   ============================================ */
.user-popover .popover {
  width: 250px;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-lg) !important;
  background: var(--bg-surface) !important;
  padding: 0 !important;
  font-family: var(--font-body) !important;
}

/* user-popover removed — using Bootstrap dropdown instead */

.up-header {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 16px;
  background: var(--bg-surface);
}

.up-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.up-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.up-email {
  font-size: 11px;
  color: var(--text-muted);
}

.up-divider {
  height: 1px;
  background: var(--border-light);
  margin: 3px 0;
}

.up-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  text-align: left;
  transition: background var(--transition), color var(--transition);
}

.up-item:hover {
  background: var(--bg-surface-2);
  color: var(--text-primary);
}

.up-item i {
  font-size: 14px;
  width: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.up-item.danger {
  color: var(--red);
}

.up-item.danger i {
  color: var(--red);
}

.up-item.danger:hover {
  background: var(--red-soft);
}

/* ============================================
   KEBAB / ROW ACTION MENU
   ============================================ */
.kebab-wrap {
  position: relative;
  display: inline-block;
}

.kebab-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 14px;
  transition: all var(--transition);
}

.kebab-btn:hover {
  background: var(--bg-surface-2);
  border-color: var(--border);
  color: var(--text-primary);
}

.kebab-menu {
  position: fixed;
  /* fixed so it escapes table overflow */
  z-index: 9999;
  min-width: 160px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 4px 0;
  display: none;
}

.kebab-menu.open {
  display: block;
}

.kebab-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
  font-family: var(--font-body);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.kebab-item:hover {
  background: var(--bg-surface-2);
  color: var(--text-primary);
}

.kebab-item i {
  font-size: 13px;
  width: 15px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.kebab-item.danger {
  color: var(--red);
}

.kebab-item.danger i {
  color: var(--red);
}

.kebab-item.danger:hover {
  background: var(--red-soft);
}

.kebab-divider {
  height: 1px;
  background: var(--border-light);
  margin: 3px 0;
}

/* ============================================
   BREADCRUMB — STS Style
   ============================================ */
.sts-breadcrumb {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  display: inline-flex;
}

.sts-breadcrumb .breadcrumb {
  font-size: 12.5px;
  font-weight: 500;
  gap: 4px;
}

.sts-breadcrumb .breadcrumb-item+.breadcrumb-item::before {
  content: '\203A';
  color: var(--text-muted);
  font-size: 14px;
  padding: 0 6px;
}

.sts-breadcrumb .breadcrumb-item a {
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color var(--transition);
}

.sts-breadcrumb .breadcrumb-item a:hover {
  color: var(--accent);
}

.sts-breadcrumb .breadcrumb-item.active {
  color: var(--text-primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.sts-breadcrumb .breadcrumb-item i {
  font-size: 12px;
}

/* ============================================
   ADD COMPANY PAGE
   ============================================ */

/* Layout max-width */
.ac-layout {
  width: 100%;
}

/* ── Section Cards ── */
.ac-card {
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.ac-card .card-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: var(--radius) var(--radius) 0 0 !important;
}

.ac-section-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.ac-section-icon.accent {
  background: var(--accent-soft);
  color: var(--accent);
}

.ac-section-icon.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.ac-section-icon.green {
  background: var(--green-soft);
  color: var(--green);
}

.ac-section-icon.amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.ac-section-icon.purple {
  background: var(--purple-soft);
  color: var(--purple);
}

.ac-section-icon.teal {
  background: #e0f7f4;
  color: #0d9488;
}

[data-theme="dark"] .ac-section-icon.teal {
  background: #042f2e;
  color: #2dd4bf;
}

.ac-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.ac-section-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* ── Optional badge ── */
.badge-optional {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bg-surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  vertical-align: middle;
  margin-left: 3px;
}

/* ── Postcode uppercase ── */
.ac-uppercase {
  text-transform: uppercase;
}

/* ── Company Type Tiles ── */
.ac-type-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ac-type-tile {
  cursor: pointer;
  flex: 0 0 auto;
}

.ac-type-check {
  display: none;
}

.ac-type-body {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg-surface-2);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition);
  user-select: none;
}

.ac-type-body i {
  font-size: 15px;
}

.ac-type-tile:hover .ac-type-body {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.ac-type-check:checked+.ac-type-body {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 0 0 3px rgba(244, 150, 16, .12);
}

/* ── Primary Contact divider ── */
.ac-contact-divider {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ac-contact-divider-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.ac-contact-divider-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── Contact info banner ── */
.ac-contact-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--blue-soft);
  border: 1px solid rgba(59, 130, 246, .2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12.5px;
  color: var(--blue);
}

.ac-contact-note i {
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}

[data-theme="dark"] .ac-contact-note {
  border-color: rgba(59, 130, 246, .15);
}

/* ── Contact card highlight ── */
.ac-contact-card {
  border-color: rgba(59, 130, 246, .25) !important;
}

.ac-contact-card .card-header {
  background: linear-gradient(135deg, var(--bg-surface), var(--blue-soft)) !important;
}

/* ── Actions bar ── */
.ac-actions-bar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px 0 48px;
}

.ac-actions-bar .btn-sts {
  min-width: 120px;
  justify-content: center;
}

/* input-group theming */
.input-group-text {
  background: var(--bg-surface-2);
  border-color: var(--border);
  color: var(--text-muted);
  font-size: 13px;
}

/* ============================================
   TOAST NOTIFICATION SYSTEM
   ============================================ */
#sts-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.sts-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 12px 16px;
  min-width: 280px;
  max-width: 380px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-primary);
  pointer-events: all;
  opacity: 0;
  transform: translateY(12px) scale(.97);
  transition: opacity var(--transition), transform var(--transition);
  border-left: 3px solid var(--border);
}

.sts-toast.sts-toast-success {
  border-left-color: var(--green);
}

.sts-toast.sts-toast-error {
  border-left-color: var(--red);
}

.sts-toast.sts-toast-warning {
  border-left-color: var(--amber);
}

.sts-toast.sts-toast-info {
  border-left-color: var(--accent);
}

.sts-toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.sts-toast-msg {
  flex: 1;
  line-height: 1.45;
  font-weight: 500;
}

.sts-toast-close {
  background: none;
  border: none;
  font-size: 18px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 2px;
  flex-shrink: 0;
  transition: color var(--transition);
}

.sts-toast-close:hover {
  color: var(--text-primary);
}

/* ============================================
   PAGE FADE-UP ANIMATION
   ============================================ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-fade-up {
  animation: fadeUp .38s cubic-bezier(.4, 0, .2, 1) both;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.sts-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  text-align: center;
}

.sts-empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin-bottom: 20px;
  background: var(--bg-surface-2);
  color: var(--text-muted);
}

.sts-empty-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 6px;
}

.sts-empty-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 24px;
  max-width: 340px;
  line-height: 1.6;
}

/* ============================================
   OFFCANVAS PANEL — 480px from right
   ============================================ */
.sts-offcanvas {
  width: 480px !important;
  max-width: 96vw;
  background: var(--bg-surface) !important;
  border-left: 1px solid var(--border) !important;
  font-family: var(--font-body);
}

.sts-offcanvas .offcanvas-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface-2);
}

.sts-offcanvas .offcanvas-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-body);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sts-offcanvas .offcanvas-body {
  padding: 24px;
  overflow-y: auto;
  background: var(--bg-surface);
}

/* ============================================
   BTN-STS INDIGO VARIANT — maps to accent per brand
   ============================================ */
.btn-sts.indigo {
  background: var(--accent);
  color: #fff;
  border: none;
}

.btn-sts.indigo:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(244, 150, 16, .35);
  transform: translateY(-1px);
}

/* ============================================
   MODAL THEME OVERRIDES
   ============================================ */
.modal-content {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  font-family: var(--font-body);
  display: flex;
  flex-direction: column;
}

.modal-header {
  border-bottom: 1px solid var(--border) !important;
  background: var(--bg-surface-2) !important;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
}

.modal-footer {
  border-top: 1px solid var(--border) !important;
  background: var(--bg-surface-2) !important;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg) !important;
}

.modal-body {
  padding: 24px !important;
}

.modal-title {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: var(--text-primary) !important;
  font-family: var(--font-body) !important;
}

.btn-close {
  filter: var(--bs-btn-close-filter, inherit);
}

[data-theme="dark"] .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* ── Shared card header variant (icon + title + subtitle) ── */
.sts-card-header .card-hdr-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.sts-card-header .card-hdr-text {
  flex: 1;
  min-width: 0;
  font-size: .9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.sts-card-header .card-hdr-sub {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 1px;
}

/* ── Notes component ── */
.note-composer {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 16px;
}

.note-composer textarea {
  flex: 1;
  border: none;
  background: transparent;
  resize: none;
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  line-height: 1.5;
  min-height: 38px;
  font-family: var(--font-body);
}

.note-composer textarea::placeholder {
  color: var(--text-muted);
}

.note-item {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 10px;
}

.note-item:last-child {
  margin-bottom: 0;
}

.note-item-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.note-item-author {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.note-item-date {
  font-size: 11px;
  color: var(--text-muted);
}

.note-item-body {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: pre-wrap;
  line-height: 1.5;
}


.sts-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px
}