/* =============================================================================
   VEZTRAA ADMIN PORTAL - Custom Stylesheet
   Design: Corporate, clean, professional
   Base: Bootstrap 5.3
   ============================================================================= */

/* ---- CSS Variables ---- */
:root {
  --sidebar-width: 255px;
  --sidebar-bg: #0d1117;
  --sidebar-hover: rgba(255, 255, 255, 0.055);
  --sidebar-active: rgba(99, 102, 241, 0.18);
  --sidebar-active-bar: #6366f1;
  --topbar-height: 64px;
  --topbar-bg: #ffffff;
  --topbar-border: #e5e7eb;
  --body-bg: #f1f4f8;
  --card-bg: #ffffff;
  --card-border: #e5e7eb;
  --card-header-bg: #f9fafb;
  --text-primary: #111827;
  --text-muted: #6b7280;
  --accent: #6366f1;
  --accent-dark: #4f46e5;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ---- Reset & Base ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font);
  background: var(--body-bg);
  color: var(--text-primary);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform 0.25s ease;
  overflow: hidden;
}

/* Accent stripe at top */
.sidebar::before {
  content: "";
  display: block;
  height: 3px;
  /* background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%); */
  flex-shrink: 0;
}

/* ── Brand ── */
.sidebar-brand {
  padding: 1.1rem 1.3rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.sidebar-logo {
  width: 148px;
  height: auto;
  display: block;
  margin: auto;
}

/* ── Nav ── */
.sidebar-nav {
  flex: 1;
  padding: 0.75rem 0.85rem;
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar-nav::-webkit-scrollbar {
  width: 3px;
}
.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.nav-group {
  margin-bottom: 0.25rem;
}
.nav-section-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.22);
  padding: 0.9rem 0.6rem 0.4rem;
}
.nav-section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: rgba(255, 255, 255, 0.55);
  padding: 0.56rem 0.75rem;
  border-radius: 8px;
  margin-bottom: 1px;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.14s ease;
  position: relative;
}
.sidebar-nav .nav-link .nav-icon {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
  transition: all 0.14s ease;
}
.sidebar-nav .nav-link:hover {
  color: rgba(255, 255, 255, 0.9);
  background: var(--sidebar-hover);
}
.sidebar-nav .nav-link:hover .nav-icon {
  background: rgba(255, 255, 255, 0.08);
}
.sidebar-nav .nav-link.active {
  color: #e0e7ff;
  background: rgba(99, 102, 241, 0.2);
}
.sidebar-nav .nav-link.active .nav-icon {
  background: rgba(99, 102, 241, 0.45);
  color: #a5b4fc;
}
.sidebar-nav .nav-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 25%;
  bottom: 25%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #6366f1;
}

/* ── Sidebar User Footer ── */
.sidebar-user {
  flex-shrink: 0;
  padding: 0.85rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.sidebar-user__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  flex-shrink: 0;
  letter-spacing: 0;
}
.sidebar-user__avatar--img {
  object-fit: cover;
  background: #1e2432;
}
.sidebar-user__info {
  flex: 1;
  min-width: 0;
  line-height: 1.25;
}
.sidebar-user__name {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user__role {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user__logout {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.25);
  border-radius: 7px;
  text-decoration: none;
  transition: all 0.14s ease;
  flex-shrink: 0;
  font-size: 0.95rem;
}
.sidebar-user__logout:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

/* ── Mobile overlay ── */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 999;
  backdrop-filter: blur(2px);
}
.sidebar-backdrop.show {
  display: block;
}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.main-wrapper {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  position: sticky;
  top: 0;
  height: var(--topbar-height);
  background: #fff;
  border-bottom: 1px solid #eaecf0;
  box-shadow:
    0 1px 3px rgba(16, 24, 40, 0.06),
    0 1px 2px rgba(16, 24, 40, 0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  z-index: 900;
  gap: 1rem;
}

/* ---- Left ---- */
.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

@media (min-width: 992px) {
  .sidebar-toggle {
    display: none !important;
  }
}

.sidebar-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 8px;
  color: #667085;
  font-size: 1.2rem;
  cursor: pointer;
  flex-shrink: 0;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}
.sidebar-toggle:hover {
  background: #f2f4f7;
  color: #101828;
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.topbar-title__org {
  font-size: 0.8rem;
  font-weight: 500;
  color: #98a2b3;
  letter-spacing: 0.01em;
}
.topbar-title__sep {
  font-size: 1rem;
  color: #d0d5dd;
  line-height: 1;
  font-style: normal;
  transform: rotate(15deg);
  display: inline-block;
}
.topbar-title__page {
  font-size: 0.875rem;
  font-weight: 700;
  color: #101828;
  letter-spacing: -0.01em;
}

/* ---- Right ---- */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

/* .topbar-date removed */

/* ---- Profile wrap ---- */
.topbar-profile-wrap {
  position: relative;
}

.topbar-profile-btn {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: none;
  border: none;
  border-radius: 10px;
  padding: 0.3rem 0.5rem 0.3rem 0.3rem;
  cursor: pointer;
  transition: background 0.15s ease;
  text-decoration: none;
}
.topbar-profile-btn:hover,
.topbar-profile-btn.show {
  background: #f2f4f7;
}
.topbar-profile-btn::after {
  display: none;
} /* hide BS caret */

.topbar-avatar {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  flex-shrink: 0;
  letter-spacing: 0.02em;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 3.5px #e0e7ff;
}
.topbar-avatar--img {
  object-fit: cover;
  background: #f2f4f7;
}

.topbar-user-info {
  flex-direction: column;
  line-height: 1.25;
  text-align: left;
}
.topbar-user-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #101828;
  white-space: nowrap;
  display: block;
}
.topbar-user-role {
  font-size: 0.68rem;
  color: #98a2b3;
  white-space: nowrap;
  display: block;
}
.topbar-chevron {
  font-size: 0.58rem;
  color: #98a2b3;
  margin-left: 0.05rem;
  transition: transform 0.2s ease;
}
.topbar-profile-btn.show .topbar-chevron {
  transform: rotate(180deg);
}

/* ---- Dropdown ---- */
.topbar-dropdown {
  min-width: 230px;
  border: 1px solid #eaecf0;
  border-radius: 14px;
  box-shadow:
    0 12px 40px rgba(16, 24, 40, 0.14),
    0 4px 12px rgba(16, 24, 40, 0.06);
  padding: 0.35rem;
  background: #fff;
  margin-top: 6px !important;
}

/* Dropdown header */
.topbar-dd-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.75rem 0.65rem;
  pointer-events: none;
}
.topbar-dd-header__avatar {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.topbar-dd-header__avatar--img {
  object-fit: cover;
  background: #f2f4f7;
}
.topbar-dd-header__info {
  min-width: 0;
}
.topbar-dd-header__name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #101828;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-dd-header__role {
  font-size: 0.7rem;
  color: #98a2b3;
  margin-top: 1px;
}

.topbar-dd-divider {
  height: 1px;
  background: #f2f4f7;
  margin: 0.25rem 0.35rem;
}

/* Dropdown items */
.topbar-dd-item {
  display: flex !important;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: #344054 !important;
  padding: 0.55rem 0.75rem !important;
  border-radius: 9px !important;
  transition: background 0.12s ease;
  text-decoration: none !important;
}
.topbar-dd-item__icon {
  width: 28px;
  height: 28px;
  background: #f9fafb;
  border: 1px solid #f2f4f7;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.topbar-dd-item__icon i {
  font-size: 0.82rem;
  color: #667085;
}
.topbar-dd-item:hover {
  background: #f9fafb !important;
}
.topbar-dd-item:hover .topbar-dd-item__icon {
  background: #eef2ff;
  border-color: #e0e7ff;
}
.topbar-dd-item:hover .topbar-dd-item__icon i {
  color: #6366f1;
}

/* Sign out */
.topbar-dd-logout {
  color: #b42318 !important;
}
.topbar-dd-logout .topbar-dd-item__icon {
  background: #fff5f5;
  border-color: #fee4e2;
}
.topbar-dd-logout .topbar-dd-item__icon i {
  color: #f04438;
}
.topbar-dd-logout:hover {
  background: #fff5f5 !important;
}
.topbar-dd-logout:hover .topbar-dd-item__icon {
  background: #fee4e2;
  border-color: #fda29b;
}

/* ============================================================
   PAGE CONTENT
   ============================================================ */
.page-content {
  flex: 1;
  padding: 1.75rem 2rem;
  width: 100%;
}

.page-header {
  margin-bottom: 1.5rem;
}

.page-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.2rem;
}

.page-subtitle {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.83rem;
}

.alert-flash {
  margin-bottom: 1.25rem;
  border-radius: 10px;
}

/* ============================================================
   USER AVATAR
   ============================================================ */
.user-avatar {
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: white;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.user-avatar--sm {
  width: 28px;
  height: 28px;
  font-size: 0.7rem;
}
.user-avatar--lg {
  width: 64px;
  height: 64px;
  font-size: 1.5rem;
  border-radius: 16px;
}
.user-avatar--photo {
  object-fit: cover;
  border-radius: 50%;
  background: #f2f4f7;
}

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-card {
  background: white;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: box-shadow 0.15s ease;
}

.stat-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.stat-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.stat-card__value {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-primary);
}

.stat-card__label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

.stat-card--blue .stat-card__icon {
  background: #eff6ff;
  color: #3b82f6;
}
.stat-card--orange .stat-card__icon {
  background: #fff7ed;
  color: #f97316;
}
.stat-card--green .stat-card__icon {
  background: #f0fdf4;
  color: #22c55e;
}
.stat-card--purple .stat-card__icon {
  background: #f5f3ff;
  color: #8b5cf6;
}
.stat-card--red .stat-card__icon {
  background: #fef2f2;
  color: #ef4444;
}

/* ============================================================
   DASHBOARD
   ============================================================ */

/* ── Welcome banner ── */
.dash-welcome {
  border-radius: 20px;
  margin-bottom: 1.75rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #080d18;
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.045) 1px,
    transparent 1px
  );
  background-size: 28px 28px;
}
.dash-welcome__orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
}
.dash-welcome__orb--1 {
  width: 380px;
  height: 380px;
  top: -120px;
  left: -60px;
  background: rgba(99, 102, 241, 0.22);
}
.dash-welcome__orb--2 {
  width: 260px;
  height: 260px;
  bottom: -80px;
  left: 40%;
  background: rgba(139, 92, 246, 0.18);
}
.dash-welcome__orb--3 {
  width: 220px;
  height: 220px;
  top: -40px;
  right: 200px;
  background: rgba(6, 182, 212, 0.1);
}

/* body */
.dash-welcome__body {
  padding: 2.25rem 2.5rem;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.dash-welcome__left {
  flex: 1;
  min-width: 0;
}

/* eyebrow chip */
.dash-welcome__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.32);
  color: #a5b4fc;
  border-radius: 20px;
  padding: 0.24rem 0.8rem;
  font-size: 0.71rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  text-transform: uppercase;
}
.dash-welcome__chip i {
  font-size: 0.8rem;
}

/* greeting lines */
.dash-welcome__hi {
  display: block;
  font-size: 1.05rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.15rem;
  letter-spacing: 0.01em;
}
.dash-welcome__name {
  display: block;
  font-size: 2.6rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(130deg, #ffffff 0%, #e0e7ff 40%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.75rem;
}
.dash-welcome__sub {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.32);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ── Date bubble ── */
.dash-date-bubble {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  width: 148px;
  height: 148px;
}
/* outer rings */
.dash-date-bubble::before,
.dash-date-bubble::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(99, 102, 241, 0.18);
}
.dash-date-bubble::before {
  inset: -14px;
}
.dash-date-bubble::after {
  inset: -28px;
  border-color: rgba(99, 102, 241, 0.08);
}
.dash-date-bubble__circle {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.055);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.2),
    0 0 40px rgba(99, 102, 241, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.dash-date-bubble__circle::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04) 0%,
    transparent 100%
  );
  border-radius: 50% 50% 0 0 / 30% 30% 0 0;
}
.dash-date-bubble__dow {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  color: #a5b4fc;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 0.2rem;
}
.dash-date-bubble__day {
  display: block;
  font-size: 3.2rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.04em;
}
.dash-date-bubble__mon {
  display: block;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.06em;
  margin-top: 0.25rem;
}

/* Footer shortcuts */
.dash-welcome__footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.75rem 2.5rem;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  background: rgba(0, 0, 0, 0.18);
}
.dash-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  padding: 0.3rem 0.75rem;
  font-size: 0.74rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.dash-shortcut i {
  font-size: 0.78rem;
}
.dash-shortcut:hover {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.38);
  color: #c7d2fe;
}

/* ── Section label ── */
.dash-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.dash-section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e8ecf2;
}
.dash-section-label.sl--billing {
  color: #16a34a;
}
.dash-section-label.sl--crm {
  color: #6366f1;
}

/* ── KPI cards ── */
.kpi-card {
  border-radius: 16px;
  padding: 1.4rem 1.5rem 1.25rem;
  position: relative;
  overflow: hidden;
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
  height: 100%;
  border: 1px solid transparent;
}
.kpi-card:hover {
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
}
.kpi-card__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}
.kpi-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.kpi-card__badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.22rem 0.55rem;
  border-radius: 20px;
}
.kpi-card__value {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #0f172a;
  margin-bottom: 0.3rem;
}
.kpi-card__value--sm {
  font-size: 1.55rem;
  letter-spacing: -0.02em;
}
.kpi-card__label {
  font-size: 0.77rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 0;
}
.kpi-card__divider {
  height: 1px;
  margin: 0.9rem 0 0.75rem;
}
.kpi-card__sub {
  font-size: 0.72rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}
.kpi-card__bg {
  position: absolute;
  bottom: -12px;
  right: -8px;
  font-size: 6rem;
  line-height: 1;
  pointer-events: none;
  opacity: 0.07;
}

/* Color variants */
.kpi-blue {
  background: linear-gradient(145deg, #eff6ff, #f8fbff);
  border-color: #dbeafe;
}
.kpi-orange {
  background: linear-gradient(145deg, #fff7ed, #fffcf9);
  border-color: #fed7aa;
}
.kpi-green {
  background: linear-gradient(145deg, #f0fdf4, #f8fff9);
  border-color: #bbf7d0;
}
.kpi-purple {
  background: linear-gradient(145deg, #faf5ff, #fdfaff);
  border-color: #e9d5ff;
}
.kpi-red {
  background: linear-gradient(145deg, #fef2f2, #fff8f8);
  border-color: #fecaca;
}
.kpi-indigo {
  background: linear-gradient(145deg, #eef2ff, #f5f7ff);
  border-color: #c7d2fe;
}
.kpi-teal {
  background: linear-gradient(145deg, #f0fdfa, #f7fffd);
  border-color: #99f6e4;
}

.kpi-blue .kpi-card__icon {
  background: #dbeafe;
  color: #2563eb;
}
.kpi-orange .kpi-card__icon {
  background: #fed7aa;
  color: #c2410c;
}
.kpi-green .kpi-card__icon {
  background: #bbf7d0;
  color: #15803d;
}
.kpi-purple .kpi-card__icon {
  background: #e9d5ff;
  color: #7c3aed;
}
.kpi-red .kpi-card__icon {
  background: #fecaca;
  color: #dc2626;
}
.kpi-indigo .kpi-card__icon {
  background: #c7d2fe;
  color: #4338ca;
}
.kpi-teal .kpi-card__icon {
  background: #99f6e4;
  color: #0d9488;
}

.kpi-blue .kpi-card__divider {
  background: #bfdbfe;
}
.kpi-orange .kpi-card__divider {
  background: #fed7aa;
}
.kpi-green .kpi-card__divider {
  background: #bbf7d0;
}
.kpi-purple .kpi-card__divider {
  background: #ddd6fe;
}
.kpi-red .kpi-card__divider {
  background: #fecaca;
}
.kpi-indigo .kpi-card__divider {
  background: #c7d2fe;
}
.kpi-teal .kpi-card__divider {
  background: #99f6e4;
}

.kpi-blue .kpi-card__bg {
  color: #2563eb;
}
.kpi-orange .kpi-card__bg {
  color: #ea580c;
}
.kpi-green .kpi-card__bg {
  color: #16a34a;
}
.kpi-purple .kpi-card__bg {
  color: #7c3aed;
}
.kpi-red .kpi-card__bg {
  color: #dc2626;
}
.kpi-indigo .kpi-card__bg {
  color: #4338ca;
}
.kpi-teal .kpi-card__bg {
  color: #0d9488;
}

/* Summary panel */
.summary-panel {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
}
.summary-panel__head {
  padding: 0.8rem 1.15rem;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-header-bg);
}
.summary-panel__title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.summary-panel__body {
  padding: 1rem 1.15rem;
}
.summary-panel__body.p-0 {
  padding: 0;
}
.text-indigo {
  color: #6366f1;
}

/* Status breakdown rows */
.status-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}
.status-row:last-child {
  margin-bottom: 0;
}
.status-row__label {
  width: 90px;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
}
.status-row__bar-wrap {
  flex: 1;
  height: 5px;
  background: #f1f5f9;
  border-radius: 3px;
  overflow: hidden;
}
.status-row__bar {
  height: 100%;
  border-radius: 3px;
  min-width: 2px;
  transition: width 0.5s ease;
}
.status-row__count {
  width: 26px;
  text-align: right;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-primary);
  flex-shrink: 0;
}

/* Activity feed list */
.dash-feed-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dash-feed-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.7rem 1.15rem;
  border-bottom: 1px solid #f8fafc;
  transition: background 0.1s;
}
.dash-feed-item:last-child {
  border-bottom: none;
}
.dash-feed-item:hover {
  background: #fafbff;
}
.dash-feed-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #eef2ff;
  color: #6366f1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.67rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}
.dash-feed-avatar--purple {
  background: #f5f3ff;
  color: #8b5cf6;
}
.dash-feed-body {
  flex: 1;
  min-width: 0;
}
.dash-feed-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-feed-name:hover {
  color: var(--accent);
}
.dash-feed-meta {
  font-size: 0.71rem;
  color: var(--text-muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-feed-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}
.dash-feed-time {
  font-size: 0.67rem;
  color: #cbd5e1;
  white-space: nowrap;
}

/* xs button */
.btn-xs {
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  line-height: 1.5;
}

/* ============================================================
   CARDS
   ============================================================ */
.card-portal {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
}

.table-responsive {
  border-radius: 12px;
}

.card-header-portal {
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.card-header-portal {
  padding: 0.85rem 1.25rem;
  background: var(--card-header-bg);
  border-bottom: 1px solid var(--card-border);
  font-weight: 600;
  font-size: 0.83rem;
  color: var(--text-primary);
}

.card-footer-portal {
  padding: 0.75rem 1.25rem;
  background: var(--card-header-bg);
  border-top: 1px solid var(--card-border);
  display: flex;
  justify-content: flex-end;
}

/* ============================================================
   TABLES
   ============================================================ */
.table-portal {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
  margin: 0;
}

.table-portal thead tr {
  background: var(--card-header-bg);
  border-bottom: 1px solid var(--card-border);
}

.table-portal th {
  padding: 0.7rem 1.25rem;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border: none;
  white-space: nowrap;
}

.table-portal td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
  color: var(--text-primary);
}

.table-portal tbody tr:hover {
  background: #fafafa;
}
.table-portal tbody tr:last-child td {
  border-bottom: none;
}

.row-unread {
  background: #fefce8;
}
.row-unread:hover {
  background: #fef9c3 !important;
}

.empty-state {
  text-align: center;
  padding: 3rem !important;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ============================================================
   STATUS BADGES
   ============================================================ */
.badge {
  padding: 0.3em 0.7em;
  font-weight: 600;
  font-size: 0.72rem;
  border-radius: 6px;
  letter-spacing: 0.01em;
}

.badge-status-new {
  background: #eff6ff;
  color: #1d4ed8;
}
.badge-status-progress {
  background: #fff7ed;
  color: #c2410c;
}
.badge-status-closed {
  background: #f0fdf4;
  color: #15803d;
}
.badge-status-spam {
  background: #fef2f2;
  color: #b91c1c;
}
.badge-status-review {
  background: #fefce8;
  color: #92400e;
}
.badge-status-shortlisted {
  background: #f0fdf4;
  color: #166534;
}
.badge-status-interviewed {
  background: #f5f3ff;
  color: #5b21b6;
}
.badge-status-selected {
  background: #dcfce7;
  color: #15803d;
}
.badge-status-rejected {
  background: #fee2e2;
  color: #991b1b;
}
.badge-status-hold {
  background: #f1f5f9;
  color: #475569;
}

/* ============================================================
   MISC COMPONENTS
   ============================================================ */
.ref-link {
  font-family: "Courier New", monospace;
  font-size: 0.78rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.ref-link:hover {
  text-decoration: underline;
}

.unread-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #f97316;
  border-radius: 50%;
  vertical-align: middle;
}

.btn-xs {
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 5px;
  font-weight: 500;
}

.detail-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1.25rem;
  margin: 0;
}

.detail-list dt {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.detail-list dd {
  color: var(--text-primary);
  font-size: 0.83rem;
  margin: 0;
  word-break: break-word;
}

.notes-list {
  max-height: 340px;
  overflow-y: auto;
}

.note-item {
  padding: 0.75rem;
  background: var(--body-bg);
  border-radius: 8px;
  margin-bottom: 0.6rem;
  border-left: 3px solid var(--accent);
}

.note-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
}

.note-body {
  font-size: 0.83rem;
  color: var(--text-primary);
}

.status-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  padding: 1rem 1.25rem;
  gap: 0.75rem;
}

.status-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.status-item strong {
  font-size: 1.25rem;
  font-weight: 700;
}

.permission-group__title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--card-border);
}

/* ============================================================
   AUTH LAYOUT
   ============================================================ */
.auth-body {
  background: linear-gradient(135deg, #f0f4ff 0%, #f3f4f6 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.auth-wrapper {
  width: 100%;
  max-width: 420px;
}

.auth-card {
  background: white;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

.auth-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.auth-logo-img {
  width: 160px;
  height: auto;
  display: block;
  margin: 0 auto 0.5rem;
}

.btn-auth {
  padding: 0.65rem;
  font-weight: 600;
  border-radius: 10px;
}

.auth-footer-text {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 1.25rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

/* ============================================================
   FORMS
   ============================================================ */
.form-control,
.form-select {
  border-radius: 8px;
  border-color: #d1d5db;
  font-size: 0.85rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.form-label {
  font-weight: 600;
  font-size: 0.8rem;
  color: #374151;
  margin-bottom: 0.35rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Prevent iOS Safari from zooming on input focus (requires font-size >= 16px) */
@media (max-width: 768px) {
  .form-control,
  .form-select,
  textarea {
    font-size: 16px !important;
  }
}

@media (max-width: 991px) {
  .sidebar {
    transform: translateX(calc(-1 * var(--sidebar-width)));
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.35);
  }
  .main-wrapper {
    margin-left: 0;
  }
  .page-content {
    padding: 1.25rem 1rem;
  }
  .table-portal th,
  .table-portal td {
    padding: 0.65rem 0.75rem;
  }
  .topbar {
    padding: 0 1rem;
  }
}

@media (max-width: 576px) {
  .auth-card {
    padding: 1.75rem 1.25rem;
  }
}

/* ============================================================
   SCROLLBAR (WebKit)
   ============================================================ */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* ============================================================
   PROFILE PAGE — AVATAR
   ============================================================ */
.profile-avatar-wrap {
  position: relative;
  width: 90px;
  height: 90px;
}
.profile-avatar-img,
.profile-avatar-initials {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  box-shadow:
    0 0 0 3px #fff,
    0 0 0 5px #e0e7ff;
}
.profile-avatar-initials {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.02em;
}
.profile-avatar-edit {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 26px;
  height: 26px;
  background: #6366f1;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  cursor: pointer;
  border: 2px solid #fff;
  transition: background 0.15s ease;
}
.profile-avatar-edit:hover {
  background: #4f46e5;
}

/* ============================================================
   DEAL PIPELINE BOARD
   ============================================================ */
.pipeline-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  align-items: flex-start;
}
@media (max-width: 991px) {
  .pipeline-board {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 575px) {
  .pipeline-board {
    grid-template-columns: 1fr;
  }
}

.pipeline-col {
  background: #f9fafb;
  border: 1px solid #eaecf0;
  border-radius: 12px;
  overflow: hidden;
}
.pipeline-col__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  background: #fff;
  border-bottom: 1px solid #eaecf0;
}
.pipeline-col__body {
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 80px;
}
.pipeline-empty {
  text-align: center;
  color: #98a2b3;
  font-size: 0.78rem;
  padding: 1.5rem 0;
  border: 2px dashed #e4e7ec;
  border-radius: 8px;
}
.pipeline-card {
  background: #fff;
  border: 1px solid #eaecf0;
  border-left: 3px solid #6366f1;
  border-radius: 8px;
  padding: 0.75rem;
}
.pipeline-card__title {
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}
.pipeline-card__company {
  font-size: 0.73rem;
  color: #667085;
  margin-bottom: 0.5rem;
}
.pipeline-card__company i {
  margin-right: 0.25rem;
}
.pipeline-card__value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}
.pipeline-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ============================================================
   BANK TYPE SELECTOR CARDS
   ============================================================ */
.bank-type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}
@media (max-width: 575px) {
  .bank-type-grid {
    grid-template-columns: 1fr;
  }
}

.bank-type-card {
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  border: 2px solid #eaecf0;
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  background: #fff;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}
.bank-type-card:hover {
  border-color: #c7d2fe;
  background: #fafafa;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.07);
}
.bank-type-card--active {
  border-color: #6366f1;
  background: #f5f3ff;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Checkmark badge */
.bank-type-card__check {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #eaecf0;
  color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.bank-type-card--active .bank-type-card__check {
  background: #6366f1;
  color: #fff;
}

/* Icon circle */
.bank-type-card__icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.bank-type-card__icon-wrap--blue {
  background: #dbeafe;
  color: #1d4ed8;
}
.bank-type-card__icon-wrap--violet {
  background: #ede9fe;
  color: #7c3aed;
}

.bank-type-card--active .bank-type-card__icon-wrap--blue {
  background: #1d4ed8;
  color: #fff;
}
.bank-type-card--active .bank-type-card__icon-wrap--violet {
  background: #7c3aed;
  color: #fff;
}

/* Text */
.bank-type-card__body {
  padding-right: 1.5rem;
}
.bank-type-card__label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #101828;
  margin-bottom: 0.2rem;
  line-height: 1.3;
}
.bank-type-card--active .bank-type-card__label {
  color: #4338ca;
}
.bank-type-card__sub {
  font-size: 0.75rem;
  color: #667085;
  line-height: 1.5;
}

/* ---- Topbar Breadcrumb ---- */
.topbar-breadcrumb {
  display: flex;
  align-items: center;
}
.topbar-breadcrumb .breadcrumb {
  font-size: 0.8rem;
  flex-wrap: nowrap;
  align-items: center;
  white-space: nowrap;
}
.topbar-breadcrumb .breadcrumb-item a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.topbar-breadcrumb .breadcrumb-item a:hover {
  color: var(--accent);
}
.topbar-breadcrumb .breadcrumb-item.active {
  color: var(--text-primary);
  font-weight: 600;
}
.topbar-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  color: #d1d5db;
}
