@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Oswald:wght@500;600;700&display=swap');

/* ========================================
   VECTOR CLIENT PORTAL — Design System
   Complete CSS framework with design tokens
   ======================================== */

/* ============================================================
   1. CSS CUSTOM PROPERTIES / DESIGN TOKENS
   ============================================================ */

:root {
  /* Colors — Vector Brand Palette (light) */
  --color-bg: #F8F5F0;
  --color-bg2: #FFFFFF;
  --color-text: #100C0A;
  --color-text-muted: #5A4A3C;
  --color-gold: #8B6914;
  --color-burg: #4A1528;
  --color-burg-2: #6B2040;
  --color-burg-dim: rgba(74, 21, 40, 0.08);
  --color-blue: #4A1528;
  --color-orange: #B8921E;
  --color-green: #16a34a;
  --color-red: #dc2626;
  --color-line: rgba(16, 12, 10, 0.10);
  --color-line-subtle: rgba(16, 12, 10, 0.06);
  --color-sidebar: #D4C9BC; /* Variant C — deeper taupe, chosen 27 mar 2026 */

  /* Typography Scale */
  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-base: 16px;
  --fs-lg: 18px;
  --fs-xl: 20px;
  --fs-2xl: 24px;
  --fs-3xl: 32px;
  --fs-4xl: 40px;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  --lh-tight: 1.2;
  --lh-normal: 1.5;
  --lh-relaxed: 1.75;

  /* Spacing Scale */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(16, 12, 10, 0.08);
  --shadow-md: 0 4px 16px rgba(16, 12, 10, 0.10);
  --shadow-lg: 0 12px 40px rgba(16, 12, 10, 0.12);
  --shadow-xl: 0 24px 64px rgba(16, 12, 10, 0.16);

  /* Blur & Glass Effects */
  --blur-sm: blur(8px);
  --blur-md: blur(12px);
  --blur-lg: blur(16px);
  --glass-bg: #FFFFFF;
  --glass-border: rgba(16, 12, 10, 0.10);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-Index Scale */
  --z-dropdown: 100;
  --z-sticky: 150;
  --z-fixed: 200;
  --z-modal-backdrop: 500;
  --z-modal: 510;
  --z-tooltip: 600;

  /* Font Stack */
  --font-base: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --font-display: 'Oswald', ui-sans-serif, system-ui, sans-serif;

  /* Layout */
  --sidebar-width: 260px;
  --topbar-height: 64px;
  --container-max: 1200px;
}

/* ============================================================
   2. RESET + BASE STYLES
   ============================================================ */

* {
  box-sizing: border-box;
}

*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-base);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  font-weight: var(--fw-regular);
  min-height: 100vh;
}

/* Remove default margins */
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
dl,
blockquote,
figure {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

a {
  color: var(--color-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-burg);
}

button {
  font-family: var(--font-base);
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

input,
select,
textarea {
  font-family: var(--font-base);
  font-size: inherit;
}

/* Focus Visible */
:focus-visible {
  outline: 2px solid var(--color-burg);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--color-burg);
  outline-offset: 2px;
}

/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */

.h1 {
  font-size: var(--fs-4xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: -0.5px;
}

.h2 {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: -0.3px;
}

.h3 {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
}

.h4 {
  font-size: var(--fs-xl);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-normal);
}

.h5 {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-normal);
}

.lead {
  font-size: var(--fs-lg);
  line-height: var(--lh-relaxed);
  color: var(--color-text);
  font-weight: var(--fw-regular);
}

.muted {
  color: var(--color-text-muted);
  font-weight: var(--fw-regular);
}

.eyebrow {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Text Color Utilities */
.text-gold {
  color: var(--color-gold);
}

.text-blue {
  color: var(--color-blue);
}

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

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

.text-orange {
  color: var(--color-orange);
}

/* ============================================================
   4. LAYOUT
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--sp-4);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--sp-6);
  }
}

.portal-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 64px;
  background: var(--color-sidebar);
  backdrop-filter: var(--blur-md);
  border-top: 1px solid var(--color-line);
  display: flex;
  align-items: center;
  padding: 0 var(--sp-4);
  overflow-x: auto;
  z-index: var(--z-fixed);
}

.sidebar-nav {
  display: flex;
  gap: var(--sp-2);
  width: 100%;
  align-items: center;
}

.main-content {
  flex: 1;
  margin-bottom: 64px;
  padding: var(--sp-6) var(--sp-4);
}

@media (min-width: 768px) {
  .portal-layout {
    flex-direction: row;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    flex-direction: column;
    padding: var(--sp-6) var(--sp-4);
    border-top: none;
    border-right: 1px solid var(--color-line);
    overflow-y: auto;
    overflow-x: hidden;
  }

  .sidebar-nav {
    flex-direction: column;
    gap: var(--sp-2);
    width: 100%;
    margin-top: var(--sp-6);
  }

  .main-content {
    margin-left: var(--sidebar-width);
    margin-bottom: 0;
    padding: var(--sp-8) var(--sp-6);
  }
}

@media (min-width: 1200px) {
  .main-content {
    padding: var(--sp-10) var(--sp-8);
  }
}

/* Responsive Grid */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--sp-6);
}

.col-span-1 {
  grid-column: span 1;
}
.col-span-2 {
  grid-column: span 2;
}
.col-span-3 {
  grid-column: span 3;
}
.col-span-4 {
  grid-column: span 4;
}
.col-span-5 {
  grid-column: span 5;
}
.col-span-6 {
  grid-column: span 6;
}
.col-span-12 {
  grid-column: span 12;
}

@media (max-width: 1024px) {
  .col-span-6 {
    grid-column: span 12;
  }
}

@media (max-width: 768px) {
  .col-span-4,
  .col-span-5 {
    grid-column: span 12;
  }
}

/* Flexbox Utilities */
.flex-row {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.gap-2 {
  gap: var(--sp-2);
}
.gap-4 {
  gap: var(--sp-4);
}
.gap-6 {
  gap: var(--sp-6);
}
.gap-8 {
  gap: var(--sp-8);
}

.justify-between {
  justify-content: space-between;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

/* ============================================================
   5. NAVIGATION
   ============================================================ */

.sidebar-logo {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  color: var(--color-burg);
  font-family: var(--font-display);
  margin-bottom: var(--sp-8);
  display: none;
}

@media (min-width: 768px) {
  .sidebar-logo {
    display: block;
  }
}

.nav-section-title {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: var(--sp-3) var(--sp-3);
  margin-top: var(--sp-6);
  display: none;
}

@media (min-width: 768px) {
  .nav-section-title {
    display: block;
  }
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-3);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-weight: var(--fw-medium);
  font-size: var(--fs-sm);
  transition: all var(--transition-fast);
  position: relative;
  white-space: nowrap;
}

.nav-item:hover {
  color: var(--color-text);
  background: rgba(16, 12, 10, 0.05);
}

.nav-item.active {
  color: var(--color-burg);
  background: var(--color-burg-dim);
}

@media (min-width: 768px) {
  .nav-item.active {
    border-left: 3px solid var(--color-burg);
    padding-left: calc(var(--sp-3) - 3px);
  }
}

.nav-item-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-item-label {
  display: none;
  flex: 1;
}

@media (min-width: 768px) {
  .nav-item-label {
    display: block;
  }
}

.sidebar-user {
  display: none;
  margin-top: auto;
  padding-top: var(--sp-6);
  border-top: 1px solid var(--color-line);
}

@media (min-width: 768px) {
  .sidebar-user {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: rgba(248, 245, 240, 0.95);
  backdrop-filter: var(--blur-md);
  border-bottom: 1px solid var(--color-line);
  padding: var(--sp-4) var(--sp-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--topbar-height);
}

.topbar-breadcrumb {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  display: none;
}

@media (min-width: 768px) {
  .topbar-breadcrumb {
    display: block;
  }
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

/* ============================================================
   6. CARDS
   ============================================================ */

.card {
  background: #FFFFFF;
  backdrop-filter: var(--blur-md);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 100% 0%,
    rgba(74, 21, 40, 0.03) 0%,
    transparent 50%
  );
  pointer-events: none;
}

.card:hover {
  border-color: rgba(16, 12, 10, 0.15);
  box-shadow: var(--shadow-md);
}

.card-sm {
  padding: var(--sp-4);
}

.card-stat {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.card-stat-value {
  font-size: var(--fs-4xl);
  font-weight: var(--fw-bold);
  line-height: 1;
}

.card-stat-label {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  font-weight: var(--fw-medium);
}

.card-stat-trend {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.card-stat-trend.up {
  color: var(--color-green);
}

.card-stat-trend.down {
  color: var(--color-orange);
}

.card-gradient {
  position: relative;
  overflow: hidden;
}

.card-gradient::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 100% 0%,
    rgba(74, 163, 255, 0.1) 0%,
    transparent 50%
  );
  pointer-events: none;
}

.card-gradient.gold::after {
  background: radial-gradient(
    circle at 100% 0%,
    rgba(214, 179, 92, 0.15) 0%,
    transparent 50%
  );
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--color-line-subtle);
}

.card-body {
  flex: 1;
}

.card-footer {
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--color-line-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ============================================================
   7. BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  transition: all var(--transition-fast);
  position: relative;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-gold) 0%, #c9a042 100%);
  color: #000;
  border-color: var(--color-gold);
}

.btn-primary:hover {
  box-shadow: 0 0 20px rgba(214, 179, 92, 0.4);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--color-blue) 0%, #3a8fe6 100%);
  color: #fff;
  border-color: var(--color-blue);
}

.btn-secondary:hover {
  box-shadow: 0 0 20px rgba(74, 163, 255, 0.4);
  transform: translateY(-2px);
}

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

.btn-ghost:hover {
  background: rgba(16,12,10,0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--color-red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
}

.btn-sm {
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--fs-xs);
}

.btn-lg {
  padding: var(--sp-4) var(--sp-6);
  font-size: var(--fs-base);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 600ms linear infinite;
}

.btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================================
   8. FORMS
   ============================================================ */

.form-group {
  margin-bottom: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.form-label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
}

.form-hint {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

.input,
.select,
.textarea {
  background: rgba(16,12,10,0.06);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: var(--sp-3) var(--sp-4);
  color: var(--color-text);
  font-size: var(--fs-sm);
  transition: all var(--transition-fast);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--color-text-muted);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--color-gold);
  background: rgba(16,12,10,0.09);
  box-shadow: 0 0 0 3px rgba(74,21,40,0.08);
}

.textarea {
  resize: vertical;
  min-height: 120px;
  font-family: monospace;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group-prefix,
.input-group-suffix {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 100%;
  color: var(--color-text-muted);
  pointer-events: none;
}

.input-group-prefix {
  left: 0;
}

.input-group-suffix {
  right: 0;
}

.input-group .input {
  padding-left: 40px;
}

.input-group .input.with-suffix {
  padding-right: 40px;
}

.form-error {
  font-size: var(--fs-xs);
  color: var(--color-red);
  font-weight: var(--fw-medium);
}

.form-group.error .input,
.form-group.error .select,
.form-group.error .textarea {
  border-color: var(--color-red);
  background: rgba(239, 68, 68, 0.05);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}

@media (min-width: 768px) {
  .form-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-row.col-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Checkbox & Radio */
.checkbox,
.radio {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  cursor: pointer;
  user-select: none;
}

.checkbox input[type='checkbox'],
.radio input[type='radio'] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--color-gold);
}

/* ============================================================
   9. BADGES & CHIPS
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-2) var(--sp-3);
  border-radius: 20px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  white-space: nowrap;
  background: rgba(16,12,10,0.08);
  color: var(--color-text);
}

.badge-gold {
  background: rgba(214, 179, 92, 0.2);
  color: var(--color-gold);
}

.badge-blue {
  background: rgba(74, 163, 255, 0.2);
  color: var(--color-blue);
}

.badge-green {
  background: rgba(34, 197, 94, 0.2);
  color: var(--color-green);
}

.badge-red {
  background: rgba(239, 68, 68, 0.2);
  color: var(--color-red);
}

.badge-orange {
  background: rgba(255, 179, 77, 0.2);
  color: var(--color-orange);
}

.badge-grey {
  background: rgba(16,12,10,0.06);
  color: var(--color-text-muted);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border-radius: 8px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  background: rgba(16,12,10,0.06);
  color: var(--color-text);
}

.status-chip::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--chip-color, var(--color-text-muted));
  flex-shrink: 0;
}

.stage-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-md);
  font-weight: var(--fw-semibold);
  background: var(--chip-bg, rgba(16,12,10,0.06));
  color: var(--chip-color, var(--color-text));
  font-size: var(--fs-sm);
}

/* ============================================================
   10. TABLES
   ============================================================ */

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-line);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}

.data-table th {
  background: rgba(15, 19, 24, 0.5);
  color: var(--color-text-muted);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: var(--sp-4);
  text-align: left;
  border-bottom: 1px solid var(--color-line);
  font-size: var(--fs-xs);
}

.data-table td {
  padding: var(--sp-4);
  border-bottom: 1px solid var(--color-line-subtle);
  color: var(--color-text);
}

.data-table tbody tr {
  transition: background-color var(--transition-fast);
}

.data-table tbody tr:hover {
  background-color: rgba(16,12,10,0.04);
}

.table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-2);
}

.table-actions .btn-icon {
  width: 32px;
  height: 32px;
}

/* ============================================================
   11. PIPELINE
   ============================================================ */

.pipeline-track {
  display: flex;
  gap: var(--sp-4);
  overflow-x: auto;
  padding: var(--sp-4) 0;
}

.pipeline-stage {
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.pipeline-stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--sp-3);
  border-bottom: 2px solid var(--color-line);
}

.pipeline-stage-name {
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.pipeline-stage-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--stage-color, var(--color-blue));
}

.pipeline-stage-count {
  background: rgba(16,12,10,0.08);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

.candidate-card {
  background: rgba(16,12,10,0.06);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: var(--sp-4);
  cursor: grab;
  transition: all var(--transition-fast);
}

.candidate-card:hover {
  background: rgba(16,12,10,0.09);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.candidate-card:active {
  cursor: grabbing;
}

.candidate-name {
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  margin-bottom: var(--sp-2);
}

.candidate-title {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

/* ============================================================
   12. MODALS
   ============================================================ */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: var(--blur-sm);
  z-index: var(--z-modal-backdrop);
}

.modal-overlay.open {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

@media (min-width: 768px) {
  .modal-overlay.open {
    align-items: center;
  }
}

.modal {
  background: #FFFFFF;
  backdrop-filter: var(--blur-lg);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: slideUp 300ms var(--transition-base);
  z-index: var(--z-modal);
}

.modal.modal-wide {
  max-width: 900px;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  padding: var(--sp-6);
  border-bottom: 1px solid var(--color-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
}

.modal-body {
  padding: var(--sp-6);
}

.modal-footer {
  padding: var(--sp-6);
  border-top: 1px solid var(--color-line);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-4);
}

/* ============================================================
   13. TIMELINE
   ============================================================ */

.timeline {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding-left: var(--sp-6);
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-line);
}

.timeline-item {
  position: relative;
  padding-left: var(--sp-6);
}

.timeline-icon {
  position: absolute;
  left: -27px;
  top: 2px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--timeline-color, var(--color-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: var(--fw-bold);
  border: 2px solid var(--color-bg);
}

.timeline-content {
  background: rgba(16,12,10,0.04);
  border: 1px solid var(--color-line-subtle);
  border-radius: var(--radius-md);
  padding: var(--sp-4);
}

.timeline-title {
  font-weight: var(--fw-semibold);
  margin-bottom: var(--sp-2);
}

.timeline-time {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

/* ============================================================
   14. METRICS/KPI
   ============================================================ */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--sp-6);
}

.kpi-card {
  background: #FFFFFF;
  backdrop-filter: var(--blur-md);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 100% 0%,
    var(--kpi-accent-color, rgba(74, 163, 255, 0.1)) 0%,
    transparent 50%
  );
  pointer-events: none;
}

.kpi-value {
  font-size: var(--fs-4xl);
  font-weight: var(--fw-bold);
  line-height: 1;
  color: var(--kpi-color, var(--color-blue));
}

.kpi-label {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  font-weight: var(--fw-medium);
}

.kpi-trend {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.kpi-trend.up {
  color: var(--color-green);
}

.kpi-trend.down {
  color: var(--color-orange);
}

.metric-bar {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.metric-bar-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

.metric-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(16,12,10,0.06);
  border-radius: 3px;
  overflow: hidden;
}

.metric-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-blue), var(--color-gold));
  border-radius: 3px;
  transition: width 300ms var(--transition-base);
}

/* ============================================================
   15. AGENDA/CALENDAR
   ============================================================ */

.time-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: var(--sp-3);
}

.time-slot {
  padding: var(--sp-3);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: var(--fs-xs);
  cursor: pointer;
  transition: all var(--transition-fast);
  background: rgba(16,12,10,0.04);
}

.time-slot:hover {
  background: rgba(16,12,10,0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.time-slot.selected {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: #000;
  font-weight: var(--fw-semibold);
}

.time-slot.booked {
  background: rgba(16,12,10,0.04);
  border-color: var(--color-line-subtle);
  cursor: not-allowed;
  opacity: 0.6;
}

.booking-card {
  background: #FFFFFF;
  backdrop-filter: var(--blur-md);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.booking-status {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  width: fit-content;
  padding: var(--sp-2) var(--sp-3);
  border-radius: 20px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
}

.booking-status.confirmed {
  background: rgba(34, 197, 94, 0.15);
  color: var(--color-green);
}

/* ============================================================
   16. NOTIFICATIONS
   ============================================================ */

.notification-item {
  background: rgba(16,12,10,0.04);
  border-left: 3px solid var(--color-blue);
  border-radius: var(--radius-md);
  padding: var(--sp-4);
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
}

.notification-item.success {
  border-left-color: var(--color-green);
}

.notification-item.warning {
  border-left-color: var(--color-orange);
}

.notification-item.error {
  border-left-color: var(--color-red);
}

.notification-content {
  flex: 1;
}

.notification-title {
  font-weight: var(--fw-semibold);
  margin-bottom: var(--sp-1);
}

.notification-message {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

.notification-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-blue);
  flex-shrink: 0;
  margin-top: 4px;
}

.notification-dot.unread {
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.toast {
  position: fixed;
  top: var(--sp-6);
  right: var(--sp-6);
  background: #FFFFFF;
  backdrop-filter: var(--blur-lg);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  padding: var(--sp-4) var(--sp-6);
  z-index: var(--z-tooltip);
  max-width: 400px;
  animation: slideInRight 300ms var(--transition-base);
  box-shadow: var(--shadow-lg);
}

.toast.success {
  border-left: 3px solid var(--color-green);
}

.toast.error {
  border-left: 3px solid var(--color-red);
}

.toast.warning {
  border-left: 3px solid var(--color-orange);
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ============================================================
   17. UTILITIES
   ============================================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.mt-2 {
  margin-top: var(--sp-2);
}
.mt-4 {
  margin-top: var(--sp-4);
}
.mt-6 {
  margin-top: var(--sp-6);
}
.mt-8 {
  margin-top: var(--sp-8);
}

.mb-2 {
  margin-bottom: var(--sp-2);
}
.mb-4 {
  margin-bottom: var(--sp-4);
}
.mb-6 {
  margin-bottom: var(--sp-6);
}
.mb-8 {
  margin-bottom: var(--sp-8);
}

.p-2 {
  padding: var(--sp-2);
}
.p-4 {
  padding: var(--sp-4);
}
.p-6 {
  padding: var(--sp-6);
}
.p-8 {
  padding: var(--sp-8);
}

.hidden {
  display: none;
}

.block {
  display: block;
}

.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.cursor-pointer {
  cursor: pointer;
}

.separator {
  height: 1px;
  background: var(--color-line);
}

/* ============================================================
   18. ANIMATIONS & LOADING
   ============================================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-fade-in {
  animation: fadeIn 300ms var(--transition-base);
}

.animate-slide-up {
  animation: slideUp 300ms var(--transition-base);
}

.skeleton {
  background: linear-gradient(
    90deg,
    rgba(16,12,10,0.04) 0%,
    rgba(16,12,10,0.08) 50%,
    rgba(16,12,10,0.04) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton.text {
  height: 14px;
  margin-bottom: var(--sp-2);
}

.skeleton.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.skeleton.card {
  height: 200px;
}

/* ============================================================
   V2 EXTENSIONS — Vector Portal V2 components
   Append-only. Do NOT modify sections above.
   ============================================================ */

/* ----------------------------------------------------------
   SIDEBAR V2 — shared component styles
   ---------------------------------------------------------- */

/* FEATURE: SIDEBAR_V2_STYLES START */
.sidebar-logo-sub {
  display: block;
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 2px;
}

.nav-item-locked {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.nav-lock {
  margin-left: auto;
  font-size: 10px;
  font-weight: var(--fw-semibold);
  color: var(--color-text-muted);
  background: rgba(16,12,10,0.06);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.sidebar-bottom {
  position: sticky;
  bottom: 0;
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--color-line);
  background: var(--color-bg2);
  margin-top: auto;
}
/* FEATURE: SIDEBAR_V2_STYLES END */

/* ----------------------------------------------------------
   STATE BADGES — project/candidate state indicators
   ---------------------------------------------------------- */

/* FEATURE: STATE_BADGES START */
.state-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.state-badge.state-blue   { background: rgba(74,163,255,0.15);  color: var(--color-blue); }
.state-badge.state-gold   { background: rgba(214,179,92,0.15);  color: var(--color-gold); }
.state-badge.state-green  { background: rgba(34,197,94,0.15);   color: var(--color-green); }
.state-badge.state-orange { background: rgba(255,179,77,0.15);  color: var(--color-orange); }
.state-badge.state-red    { background: rgba(239,68,68,0.15);   color: var(--color-red); }
.state-badge.state-muted  { background: rgba(168,179,194,0.1);  color: var(--color-text-muted); }

.state-badge-suffix {
  opacity: 0.7;
  font-weight: var(--fw-regular);
}

.state-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}
/* FEATURE: STATE_BADGES END */

/* ----------------------------------------------------------
   PROGRESS DOTS — 5-stage pipeline indicator
   ---------------------------------------------------------- */

/* FEATURE: PROGRESS_DOTS START */
.progress-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.progress-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(16,12,10,0.09);
  border: 1.5px solid rgba(255,255,255,0.18);
  transition: all var(--transition-fast);
}

.progress-dots .dot.done {
  background: rgba(214,179,92,0.4);
  border-color: var(--color-gold);
}

.progress-dots .dot.active {
  background: var(--color-burg);
  border-color: var(--color-burg);
  box-shadow: 0 0 8px rgba(139,105,20,0.4);
}
/* FEATURE: PROGRESS_DOTS END */

/* ----------------------------------------------------------
   DASHBOARD V2 — 3-zone layout
   ---------------------------------------------------------- */

/* FEATURE: DASHBOARD_V2_STYLES START */
.dash-header {
  margin-bottom: var(--sp-8);
}

.dash-greeting {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  color: var(--color-text);
  margin: 0 0 var(--sp-1) 0;
  line-height: var(--lh-tight);
}

.dash-date {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin: 0;
}

.dash-zone {
  margin-bottom: var(--sp-10);
}

.zone-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
}

.zone-title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  margin: 0;
}

.zone-link {
  font-size: var(--fs-sm);
  color: var(--color-burg);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity var(--transition-fast);
}

.zone-link:hover { opacity: 1; }

/* Attention items */
.attention-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.attention-item {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  background: rgba(16,12,10,0.04);
  border-radius: var(--radius-md);
  border-left: 3px solid transparent;
  transition: background var(--transition-fast);
}

.attention-item:hover { background: rgba(16,12,10,0.05); }

.attention-item.urgency-red    { border-left-color: var(--color-red); }
.attention-item.urgency-orange { border-left-color: var(--color-orange); }
.attention-item.urgency-yellow { border-left-color: var(--color-gold); }

.attention-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.urgency-red    .attention-dot { background: var(--color-red); }
.urgency-orange .attention-dot { background: var(--color-orange); }
.urgency-yellow .attention-dot { background: var(--color-gold); }

.attention-body {
  flex: 1;
  min-width: 0;
}

.attention-title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--color-text);
  margin: 0 0 2px 0;
}

.attention-context {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  margin: 0;
}

.attention-cta {
  flex-shrink: 0;
  font-size: var(--fs-xs);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
  background: rgba(16,12,10,0.05);
  color: var(--color-text);
  text-decoration: none;
  transition: background var(--transition-fast);
  white-space: nowrap;
}

.attention-cta:hover { background: rgba(16,12,10,0.09); }

/* Dash empty state */
.dash-empty {
  padding: var(--sp-6) var(--sp-6);
  text-align: center;
  background: rgba(16,12,10,0.03);
  border-radius: var(--radius-md);
  border: 1px dashed rgba(16,12,10,0.08);
}

.dash-empty-icon {
  font-size: 28px;
  margin-bottom: var(--sp-3);
}

.dash-empty-title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--color-text-muted);
  margin: 0;
}
/* FEATURE: DASHBOARD_V2_STYLES END */

/* ----------------------------------------------------------
   PROJECT CARDS — list + summary cards
   ---------------------------------------------------------- */

/* FEATURE: PROJECT_CARD_STYLES START */
.project-cards-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.project-card {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  background: rgba(16,12,10,0.04);
  border: 1px solid var(--color-line-subtle);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.project-card:hover {
  background: rgba(16,12,10,0.05);
  border-color: rgba(16,12,10,0.09);
}

.project-card-body {
  flex: 1;
  min-width: 0;
}

.project-card-title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  margin: 0 0 var(--sp-2) 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-card-meta {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.project-card-arrow {
  font-size: var(--fs-base);
  color: var(--color-text-muted);
  flex-shrink: 0;
  transition: color var(--transition-fast);
}

.project-card:hover .project-card-arrow { color: var(--color-burg); }

/* Full project row (list page) */
.project-row {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-6);
  background: rgba(16,12,10,0.03);
  border: 1px solid var(--color-line-subtle);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: background var(--transition-fast);
  margin-bottom: var(--sp-2);
}

.project-row:hover { background: rgba(16,12,10,0.05); }

.project-row-title {
  flex: 1;
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  color: var(--color-text);
}

.project-row-meta {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  width: 160px;
  text-align: right;
}
/* FEATURE: PROJECT_CARD_STYLES END */

/* ----------------------------------------------------------
   CANDIDATE CARDS — individual proposal cards
   ---------------------------------------------------------- */

/* FEATURE: CANDIDATE_CARD_STYLES START */
.candidate-card {
  background: rgba(16,12,10,0.04);
  border: 1px solid var(--color-line-subtle);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  margin-bottom: var(--sp-4);
  transition: border-color var(--transition-fast);
}

.candidate-card:hover { border-color: rgba(16,12,10,0.09); }

.candidate-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--sp-3);
  gap: var(--sp-4);
}

.candidate-card-name {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  margin: 0 0 2px 0;
}

.candidate-card-date {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.candidate-card-pitch {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  line-height: var(--lh-relaxed);
  margin: 0 0 var(--sp-4) 0;
  font-style: italic;
}

.candidate-card-strengths {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--sp-3) 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.candidate-card-strengths li {
  font-size: var(--fs-sm);
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.candidate-card-strengths li::before {
  content: '✓';
  color: var(--color-green);
  font-weight: var(--fw-bold);
  flex-shrink: 0;
}

.candidate-card-attention {
  font-size: var(--fs-sm);
  color: var(--color-orange);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
}

.candidate-card-attention::before {
  content: '⚠';
  flex-shrink: 0;
}

.candidate-card-actions {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

/* Declined section (collapsible) */
.candidates-declined-toggle {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  cursor: pointer;
  padding: var(--sp-3) 0;
  border: none;
  background: none;
  transition: color var(--transition-fast);
}

.candidates-declined-toggle:hover { color: var(--color-text); }
/* FEATURE: CANDIDATE_CARD_STYLES END */

/* ----------------------------------------------------------
   SEARCH DIFFICULTY CARD
   ---------------------------------------------------------- */

/* FEATURE: DIFFICULTY_CARD_STYLES START */
.difficulty-card {
  background: rgba(16,12,10,0.04);
  border: 1px solid var(--color-line-subtle);
  border-radius: var(--radius-md);
  padding: var(--sp-5);
  margin-bottom: var(--sp-4);
}

.difficulty-header {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-3);
}

.difficulty-label-text {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

.difficulty-badge {
  font-size: var(--fs-sm) !important;
  padding: 4px 12px !important;
}

.difficulty-bar-wrap {
  flex: 1;
  min-width: 80px;
  height: 6px;
  background: rgba(16,12,10,0.08);
  border-radius: 3px;
  overflow: hidden;
}

.difficulty-bar {
  height: 100%;
  background: var(--color-gold);
  border-radius: 3px;
  transition: width var(--transition-slow);
}

.difficulty-score {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
}

.difficulty-why,
.difficulty-impact {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  line-height: var(--lh-relaxed);
  margin: 0 0 var(--sp-2) 0;
}

.difficulty-why strong { color: var(--color-text); }

.difficulty-tip {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--color-line-subtle);
  margin-top: var(--sp-3);
  font-size: var(--fs-sm);
}

.difficulty-tip-label {
  color: var(--color-text-muted);
  flex-shrink: 0;
}
/* FEATURE: DIFFICULTY_CARD_STYLES END */

/* ----------------------------------------------------------
   TABS — V2 tab navigation
   ---------------------------------------------------------- */

/* FEATURE: TABS_V2_STYLES START */
.page-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--color-line);
  margin-bottom: var(--sp-6);
}

.page-tab {
  padding: var(--sp-3) var(--sp-5);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--color-text-muted);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition-fast);
}

.page-tab:hover { color: var(--color-text); }

.page-tab.active {
  color: var(--color-gold);
  border-bottom-color: var(--color-burg);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }
/* FEATURE: TABS_V2_STYLES END */

/* ----------------------------------------------------------
   INTEGRATION LOCKED CARD (Phase 1 placeholder)
   ---------------------------------------------------------- */

/* FEATURE: INTEGRATION_LOCKED_STYLES START */
.integration-locked-card {
  background: rgba(16,12,10,0.03);
  border: 1px dashed rgba(16,12,10,0.09);
  border-radius: var(--radius-md);
  padding: var(--sp-6) var(--sp-6);
  display: flex;
  align-items: center;
  gap: var(--sp-5);
}

.integration-locked-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.integration-locked-body {
  flex: 1;
}

.integration-locked-title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-text-muted);
  margin: 0 0 4px 0;
}

.integration-locked-desc {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  margin: 0;
  opacity: 0.7;
}
/* FEATURE: INTEGRATION_LOCKED_STYLES END */

/* ----------------------------------------------------------
   PAGE HEADER — breadcrumb + actions layout
   ---------------------------------------------------------- */

/* FEATURE: PAGE_HEADER_STYLES START */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-8);
}

.page-title {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  color: var(--color-text);
  margin: 0 0 4px 0;
}

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

.page-header-actions {
  display: flex;
  gap: var(--sp-3);
  align-items: center;
  flex-shrink: 0;
}
/* FEATURE: PAGE_HEADER_STYLES END */

/* ----------------------------------------------------------
   TIMELINE — project activity log
   ---------------------------------------------------------- */

/* FEATURE: TIMELINE_STYLES START */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  display: flex;
  gap: var(--sp-4);
  padding-bottom: var(--sp-5);
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 18px;
  bottom: 0;
  width: 1px;
  background: var(--color-line);
}

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

.timeline-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-bg2);
  border: 2px solid var(--color-line);
  flex-shrink: 0;
  margin-top: 2px;
}

.timeline-dot.active {
  border-color: var(--color-gold);
  background: rgba(214,179,92,0.2);
}

.timeline-body {
  flex: 1;
}

.timeline-event {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--color-text);
  margin: 0 0 2px 0;
}

.timeline-date {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  margin: 0;
}
/* FEATURE: TIMELINE_STYLES END */

/* ----------------------------------------------------------
   SECTION BLOCKS — used in detail tabs
   ---------------------------------------------------------- */

/* FEATURE: SECTION_BLOCK_STYLES START */
.section-block {
  margin-bottom: var(--sp-8);
}

.section-block-title {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0 0 var(--sp-4) 0;
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--color-line-subtle);
}
/* FEATURE: SECTION_BLOCK_STYLES END */

/* ============================================================
   V3 PORTAL CORE — 27 maart 2026
   Compact premium design system. Single source of truth for
   ALL client portal pages. Cascades over all V1/V2 styles.
   Matches portal/darker/ preview mock exactly.
   ============================================================ */

/* FEATURE: V3_TOKENS START */
:root {
  --sidebar-width: 240px;
  --topbar-height: 60px;
  --sp-5: 20px;
  --sp-7: 28px;
}
/* FEATURE: V3_TOKENS END */

/* FEATURE: V3_PORTAL_LAYOUT START */

/* Grid layout — replaces old flex portal-layout */
.portal-layout {
  display: grid !important;
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: var(--topbar-height) 1fr;
  min-height: 100vh;
  background: var(--color-bg);
}

/* === SIDEBAR === */
.portal-sidebar {
  grid-column: 1;
  grid-row: 1 / -1;
  background: #D4C9BC;
  border-right: 1px solid rgba(16,12,10,0.10);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  position: relative;
  z-index: 10;
}

/* Sidebar logo area */
.sidebar-logo {
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(16,12,10,0.10);
  margin-bottom: 0;
  font-size: inherit;
  display: block;
}

.sidebar-logo-text {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--color-burg);
  letter-spacing: 2px;
  text-transform: uppercase;
  line-height: 1;
}

.sidebar-logo-sub {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-top: 3px;
}

/* Nav wrapper */
.sidebar-nav {
  flex: 1;
  padding: 10px 0;
  display: flex !important;
  flex-direction: column;
  gap: 1px;
  width: 100%;
  margin-top: 0;
  align-items: initial;
}

.nav-section { display: contents; }
.nav-section-title { display: none; }

/* Nav items */
.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  color: rgba(90,74,60,0.80);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border-left: 2.5px solid transparent;
  border-radius: 0;
  background: transparent;
  transition: color 0.13s, background 0.13s;
  white-space: nowrap;
  position: static;
}

.nav-item:hover {
  color: var(--color-text);
  background: rgba(16,12,10,0.06);
}

.nav-item.active {
  color: var(--color-burg);
  background: rgba(255,255,255,0.45);
  border-left-color: var(--color-burg);
  font-weight: 600;
  padding-left: calc(16px - 2.5px + 2.5px);
}

.nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.75;
}
.nav-icon svg { display: block; width: 16px; height: 16px; }

.nav-item-locked,
.nav-item[aria-disabled="true"] {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
}

.nav-lock {
  margin-left: auto;
  font-size: 9px;
  color: var(--color-text-muted);
  background: rgba(16,12,10,0.07);
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  font-weight: 600;
}

.nav-soon {
  margin-left: auto;
  font-size: 9px;
  color: var(--color-text-muted);
  opacity: 0.5;
  letter-spacing: 0.3px;
}

/* Sidebar bottom (user widget + sign out) */
.sidebar-bottom {
  padding: 10px 14px 12px;
  border-top: 1px solid rgba(16,12,10,0.10);
  background: #D4C9BC;
  position: sticky;
  bottom: 0;
  margin-top: auto;
}

.user-widget {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  background: rgba(16,12,10,0.06);
  border-radius: 9px;
  margin-bottom: 7px;
}

.user-avatar {
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-burg), var(--color-burg-2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFF;
  font-weight: 700;
  font-size: 10px;
  flex-shrink: 0;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 10px;
  display: inline-block;
  background: rgba(74,21,40,0.10);
  color: var(--color-burg);
  padding: 1px 5px;
  border-radius: 3px;
  margin-top: 2px;
  font-weight: 500;
}

.btn-logout {
  width: 100%;
  padding: 5px 10px;
  background: transparent;
  border: 1px solid rgba(16,12,10,0.12);
  color: var(--color-text-muted);
  border-radius: 7px;
  font-size: 11px;
  cursor: pointer;
  font-family: var(--font-base);
  transition: background 0.13s, color 0.13s;
  text-align: center;
  display: block;
}

.btn-logout:hover {
  background: rgba(16,12,10,0.07);
  color: var(--color-text);
}

/* Legacy sidebar-bottom (old pages) */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  background: rgba(16,12,10,0.06);
  border-radius: 9px;
}

.sidebar-avatar {
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-burg), var(--color-burg-2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFF;
  font-weight: 700;
  font-size: 10px;
  flex-shrink: 0;
}

.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { font-size: 12px; font-weight: 600; color: var(--color-text); }
.sidebar-user-role { font-size: 10px; color: var(--color-text-muted); }

/* === TOPBAR === */
.portal-topbar {
  grid-column: 2;
  grid-row: 1;
  background: #FFFFFF;
  border-bottom: 1px solid rgba(16,12,10,0.10);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-breadcrumb {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  display: block;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.notification-bell,
.notif-btn {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid rgba(16,12,10,0.10);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  color: var(--color-text-muted);
  transition: background 0.13s;
}

.notification-bell:hover,
.notif-btn:hover { background: rgba(16,12,10,0.05); }

.notification-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: var(--color-burg);
  border-radius: 50%;
  border: 1.5px solid #FFF;
  display: block;
  font-size: 0;
}

/* topbar-avatar / vx-avatar-btn */
#topbar-avatar,
.vx-avatar-btn,
.topbar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-burg), var(--color-burg-2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFF;
  font-weight: 700;
  font-size: 11px;
  cursor: pointer;
  border: none;
  font-family: var(--font-base);
}

/* === MAIN CONTENT === */
.portal-main {
  grid-column: 2;
  grid-row: 2;
  overflow-y: auto;
  padding: 20px 24px;
  background: #F3EFE9;
}

/* FEATURE: V3_PORTAL_LAYOUT END */

/* FEATURE: V3_DASHBOARD_STYLES START */

/* Dashboard header */
.dash-header { margin-bottom: 20px; }

.dash-greeting {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.2px;
  margin: 0 0 3px 0;
  line-height: 1.15;
}

.dash-date {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0;
}

/* Zone layout */
.dash-zone { margin-bottom: 34px; }

.zone-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 11px;
}

.zone-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin: 0;
}

.zone-link {
  font-size: 12px;
  color: var(--color-burg);
  opacity: 0.8;
  text-decoration: none;
  transition: opacity 0.13s;
}

.zone-link:hover { opacity: 1; }

/* Attention items — white cards */
.attention-list { display: flex; flex-direction: column; gap: 5px; }

.attention-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 10px 14px;
  background: #FFFFFF;
  border-radius: 9px;
  border-left: 3px solid transparent;
  box-shadow: 0 1px 3px rgba(16,12,10,0.07);
  transition: box-shadow 0.13s;
}

.attention-item:hover { box-shadow: 0 2px 8px rgba(16,12,10,0.10); }
.attention-item.urgency-red    { border-left-color: var(--color-red); }
.attention-item.urgency-orange { border-left-color: var(--color-orange); }
.attention-item.urgency-yellow { border-left-color: var(--color-gold); }
.attention-item.urgency-burg   { border-left-color: var(--color-burg); }

.attention-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.urgency-red .attention-dot    { background: var(--color-red); }
.urgency-orange .attention-dot { background: var(--color-orange); }
.urgency-yellow .attention-dot { background: var(--color-gold); }
.urgency-burg .attention-dot   { background: var(--color-burg); }

.attention-body { flex: 1; min-width: 0; }
.attention-title  { font-size: 13px; font-weight: 500; color: var(--color-text); margin: 0 0 1px 0; }
.attention-context { font-size: 11px; color: var(--color-text-muted); margin: 0; }

.attention-cta {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid rgba(16,12,10,0.12);
  color: var(--color-burg);
  cursor: pointer;
  font-family: var(--font-base);
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background 0.13s;
}

.attention-cta:hover { background: rgba(74,21,40,0.07); border-color: rgba(74,21,40,0.15); }

/* Project cards — white */
.project-cards-list { display: flex; flex-direction: column; gap: 6px; }

.project-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 14px;
  background: #FFFFFF;
  border: 1px solid rgba(16,12,10,0.09);
  border-radius: 9px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 3px rgba(16,12,10,0.06);
  transition: box-shadow 0.13s, border-color 0.13s;
}

.project-card:hover { box-shadow: 0 2px 8px rgba(16,12,10,0.09); border-color: rgba(74,21,40,0.12); }
.project-card-body { flex: 1; min-width: 0; }
.project-card-title { font-size: 13px; font-weight: 600; color: var(--color-text); margin: 0 0 4px 0; }
.project-card-meta  { font-size: 11px; color: var(--color-text-muted); margin: 0; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.project-card-arrow { font-size: 15px; color: var(--color-text-muted); flex-shrink: 0; transition: color 0.13s; }
.project-card:hover .project-card-arrow { color: var(--color-burg); }

/* Status badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 20px; font-size: 10px; font-weight: 600; }
.badge-active { background: rgba(22,163,74,0.10); color: #16a34a; }
.badge-search  { background: rgba(74,21,40,0.08); color: var(--color-burg); }
.badge-placed  { background: rgba(139,105,20,0.10); color: var(--color-gold); }
.badge-dot     { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* Progress dots */
.dots { display: flex; gap: 3px; align-items: center; }
.dot  { width: 7px; height: 7px; border-radius: 50%; background: rgba(16,12,10,0.13); }
.dot.filled { background: var(--color-burg); }

/* Integration locked card */
.integration-locked-card {
  background: #FFFFFF;
  border: 1px dashed rgba(16,12,10,0.14);
  border-radius: 9px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.integration-locked-body { flex: 1; min-width: 0; }
.integration-locked-icon  { font-size: 22px; flex-shrink: 0; opacity: 0.45; }
.integration-locked-title { font-size: 13px; font-weight: 600; color: var(--color-text-muted); margin: 0 0 3px 0; }
.integration-locked-desc  { font-size: 11px; color: var(--color-text-muted); opacity: 0.75; margin: 0; }

.integration-locked-cta {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 6px;
  border: 1px solid rgba(16,12,10,0.12);
  color: var(--color-text-muted);
  background: transparent;
  cursor: pointer;
  font-family: var(--font-base);
  transition: background 0.13s, color 0.13s;
}

.integration-locked-cta:hover { background: rgba(16,12,10,0.05); color: var(--color-text); }

/* Empty states */
.dash-empty { text-align: center; padding: 24px; color: var(--color-text-muted); }
.dash-empty-icon  { font-size: 26px; margin-bottom: 7px; opacity: 0.4; }
.dash-empty-title { font-size: 13px; font-weight: 500; margin: 0; color: var(--color-text-muted); }

/* FEATURE: V3_DASHBOARD_STYLES END */

/* FEATURE: V3_RESPONSIVE START */
@media (max-width: 767px) {
  .portal-layout {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto 1fr !important;
  }
  .portal-sidebar { display: none !important; }
  .portal-topbar  { grid-column: 1; grid-row: 1; position: static; }
  .portal-main    { grid-column: 1; grid-row: 2; padding: 18px 16px; }
}
/* FEATURE: V3_RESPONSIVE END */
