/* ================================================================
   EBCGG CSS FRAMEWORK v2.0
   Export Brazil Commodities Global Group LLC
   developers.exportbrazil.org/ebcgg-css-framework/
   ================================================================

   Single source of truth for ALL EBCGG websites:
   portal, backoffice, verify, whatsapp, welcome, developers.

   Design:  Green primary (#2B6E2B) + Gold accent (#C9A84C)
   Font:    DM Sans (body) + DM Mono (code)
   Method:  CSS variables (--eb-*), BEM components, no Tailwind
   Themes:  Light default, dark via [data-theme="dark"]

   Sections:
     1   Tokens (:root)
     2   Base reset
     3   Typography helpers
     4   Layout
     5   Components (5.01 – 5.51)
     6   Utilities
     7   Animations
     8   Dark theme
     9   Responsive
     10  Print
   ================================================================ */

/* ================================================================
   1. TOKENS
   ================================================================ */
:root {
  /* ---- Brand greens ---- */
  --eb-green-900: #0F2A0F;
  --eb-green-800: #1A3E1A;
  --eb-green-700: #1E5A1E;
  --eb-green-600: #2B6E2B;
  --eb-green-500: #3D8A3D;
  --eb-green-400: #5CAD5C;
  --eb-green-300: #8CC88C;
  --eb-green-200: #BDE0BD;
  --eb-green-100: #DFF0DF;
  --eb-green-50:  #F4FAF4;

  /* ---- Gold accent ---- */
  --eb-gold-700:  #8B5E0A;
  --eb-gold-600:  #A07820;
  --eb-gold-500:  #C9A84C;
  --eb-gold-400:  #D4B870;
  --eb-gold-300:  #E2CC9B;
  --eb-gold-200:  #F0E2C4;
  --eb-gold-100:  #FBF3E0;
  --eb-gold-50:   #FEF9F0;

  /* ---- Semantic surfaces ---- */
  --eb-bg:           #F8FAF8;
  --eb-surface:      #ffffff;
  --eb-surface-2:    #F4F7F4;
  --eb-border:       #E2EAE2;
  --eb-border-light: #EEF2EE;

  /* ---- Text hierarchy ---- */
  --eb-text:   #1A2E1A;
  --eb-text-2: #3D5A3D;
  --eb-text-3: #7A947A;
  --eb-text-4: #A8C0A8;

  /* ---- Primary ---- */
  --eb-primary:        #2B6E2B;
  --eb-primary-hover:  #1E5A1E;
  --eb-primary-active: #1A3E1A;
  --eb-primary-text:   #ffffff;
  --eb-primary-ring:   rgba(43,110,43,0.18);

  /* ---- Accent ---- */
  --eb-accent:       #C9A84C;
  --eb-accent-hover: #B89538;

  /* ---- Status colors ---- */
  --eb-success-bg:   #E8F8EE;  --eb-success-text: #16713B;
  --eb-warning-bg:   #FEF4E5;  --eb-warning-text: #8B5E0A;
  --eb-danger-bg:    #FDECEE;  --eb-danger-text:  #A32D2D;
  --eb-info-bg:      #EBF3FC;  --eb-info-text:    #1A5FA8;
  --eb-purple-bg:    #F0EDFE;  --eb-purple-text:  #5B3AB7;

  /* ---- Sidebar ---- */
  --eb-sidebar-bg:          #ffffff;
  --eb-sidebar-border:      #EEF2EE;
  --eb-sidebar-text:        #3D5A3D;
  --eb-sidebar-text-hover:  #1A2E1A;
  --eb-sidebar-hover-bg:    #F4F7F4;
  --eb-sidebar-active-bg:   #EDF2ED;
  --eb-sidebar-active-text: #2B6E2B;
  --eb-sidebar-section:     #7A947A;
  --eb-sidebar-width:       210px;

  /* ---- Tables ---- */
  --eb-th-bg:    #F8FAF8;
  --eb-th-text:  #7A947A;
  --eb-tr-hover: #F4F7F4;
  --eb-td-border:#EEF2EE;

  /* ---- Forms ---- */
  --eb-input-bg:          #ffffff;
  --eb-input-border:      #E2EAE2;
  --eb-input-text:        #1A2E1A;
  --eb-input-placeholder: #A8C0A8;
  --eb-input-focus-ring:  rgba(43,110,43,0.15);

  /* ---- Spacing (4px base) ---- */
  --eb-space-1:   4px;
  --eb-space-2:   8px;
  --eb-space-3:  12px;
  --eb-space-4:  16px;
  --eb-space-5:  20px;
  --eb-space-6:  24px;
  --eb-space-8:  32px;
  --eb-space-10: 40px;
  --eb-space-12: 48px;

  /* ---- Radius ---- */
  --eb-radius-sm:  5px;
  --eb-radius:     6px;
  --eb-radius-md:  8px;
  --eb-radius-lg: 12px;
  --eb-radius-xl: 16px;

  /* ---- Typography ---- */
  --eb-font:      'DM Sans', system-ui, -apple-system, sans-serif;
  --eb-font-mono: 'DM Mono', 'JetBrains Mono', ui-monospace, monospace;

  /* ---- Shadows ---- */
  --eb-shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --eb-shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --eb-shadow-lg: 0 8px 24px rgba(0,0,0,0.12);

  /* ---- Z-index scale ---- */
  --eb-z-dropdown:  30;
  --eb-z-sidebar:   40;
  --eb-z-modal:     50;
  --eb-z-toast:    100;
  --eb-z-tooltip:  110;
}

/* ================================================================
   2. BASE
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--eb-font);
  font-size: 13px;
  line-height: 1.6;
  color: var(--eb-text);
  background: var(--eb-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--eb-accent); color: #fff; }

a { color: var(--eb-primary); text-decoration: none; transition: color .12s; }
a:hover { color: var(--eb-primary-hover); }

img, svg { display: block; max-width: 100%; }
table { border-collapse: collapse; width: 100%; }
th { white-space: nowrap; }

:focus-visible {
  outline: 2px solid var(--eb-primary);
  outline-offset: 2px;
}
:focus:not(:focus-visible) { outline: none; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--eb-primary) !important;
  box-shadow: 0 0 0 3px var(--eb-input-focus-ring);
}

input[type="checkbox"],
input[type="radio"] { accent-color: var(--eb-primary); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--eb-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--eb-green-300); }

/* ================================================================
   3. TYPOGRAPHY HELPERS
   ================================================================ */
.eb-text-xs   { font-size: 10px; }
.eb-text-sm   { font-size: 11px; }
.eb-text-base { font-size: 13px; }
.eb-text-md   { font-size: 14px; }
.eb-text-lg   { font-size: 16px; }
.eb-text-xl   { font-size: 20px; }

.eb-text-muted { color: var(--eb-text-3); }
.eb-text-faint { color: var(--eb-text-4); }

.eb-mono     { font-family: var(--eb-font-mono); }
.eb-upper    { text-transform: uppercase; letter-spacing: .06em; }
.eb-truncate { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.eb-nowrap   { white-space: nowrap; }

/* Heading helpers */
.eb-h1 { font-size: 28px; font-weight: 700; line-height: 1.2; margin: 0; }
.eb-h2 { font-size: 22px; font-weight: 700; line-height: 1.25; margin: 0; }
.eb-h3 { font-size: 18px; font-weight: 600; line-height: 1.3; margin: 0; }
.eb-h4 { font-size: 16px; font-weight: 600; line-height: 1.35; margin: 0; }
.eb-h5 { font-size: 14px; font-weight: 600; line-height: 1.4; margin: 0; }

/* ================================================================
   4. LAYOUT
   ================================================================ */
.eb-app     { display: flex; min-height: 100vh; }
.eb-main    { margin-left: var(--eb-sidebar-width); min-height: 100vh; flex: 1; background: var(--eb-bg); overflow-x: hidden; overflow-y: auto; }
.eb-content { padding: var(--eb-space-4) var(--eb-space-2); overflow-x: hidden; max-width: 100%; box-sizing: border-box; }

/* Flex helpers */
.eb-flex          { display: flex; }
.eb-flex-col      { display: flex; flex-direction: column; }
.eb-items-center  { align-items: center; }
.eb-items-start   { align-items: flex-start; }
.eb-items-end     { align-items: flex-end; }
.eb-justify-between { justify-content: space-between; }
.eb-justify-center  { justify-content: center; }
.eb-justify-end     { justify-content: flex-end; }
.eb-flex-1        { flex: 1; }
.eb-flex-wrap     { flex-wrap: wrap; }
.eb-gap-1 { gap: var(--eb-space-1); }
.eb-gap-2 { gap: var(--eb-space-2); }
.eb-gap-3 { gap: var(--eb-space-3); }
.eb-gap-4 { gap: var(--eb-space-4); }
.eb-gap-5 { gap: var(--eb-space-5); }
.eb-gap-6 { gap: var(--eb-space-6); }
.eb-gap-8 { gap: var(--eb-space-8); }

/* Grid helpers */
.eb-grid-2    { display: grid; grid-template-columns: 1fr 1fr; gap: var(--eb-space-4); }
.eb-grid-3    { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--eb-space-4); }
.eb-grid-4    { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--eb-space-4); }
.eb-grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--eb-space-4); }

.eb-divider { border: none; border-top: 1px solid var(--eb-border-light); margin: var(--eb-space-4) 0; }
.eb-w-full  { width: 100%; }

/* ================================================================
   5.01  SIDEBAR
   ================================================================ */
.sidebar {
  width: var(--eb-sidebar-width);
  height: 100vh;
  position: fixed; top: 0; left: 0;
  z-index: var(--eb-z-sidebar);
  display: flex; flex-direction: column;
  background: var(--eb-sidebar-bg);
  border-right: 1px solid var(--eb-sidebar-border);
  overflow: hidden;
}
.sidebar-header {
  padding: var(--eb-space-4);
  border-bottom: 1px solid var(--eb-sidebar-border);
  display: flex; align-items: center; gap: var(--eb-space-2);
  flex-shrink: 0;
}
.sidebar-logo {
  width: 32px; height: 32px;
  border-radius: var(--eb-radius-md);
  background: linear-gradient(135deg, var(--eb-green-600), var(--eb-green-700));
  color: #fff; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-title    { font-size: 12px; font-weight: 700; color: var(--eb-text); letter-spacing: .04em; }
.sidebar-subtitle { font-size: 10px; color: var(--eb-text-3); }
.sidebar-nav {
  flex: 1; padding: var(--eb-space-2);
  overflow-y: auto; overflow-x: hidden;
}
.sidebar-section {
  padding: var(--eb-space-4) var(--eb-space-3) var(--eb-space-1);
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--eb-sidebar-section);
}
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: var(--eb-space-2) var(--eb-space-3);
  border-radius: var(--eb-radius-md);
  margin-bottom: 2px;
  font-size: 13px; color: var(--eb-sidebar-text);
  text-decoration: none;
  transition: background .12s, color .12s;
  cursor: pointer;
}
.sidebar-link:hover {
  background: var(--eb-sidebar-hover-bg);
  color: var(--eb-sidebar-text-hover);
}
.sidebar-link.active {
  background: var(--eb-sidebar-active-bg);
  color: var(--eb-sidebar-active-text);
  font-weight: 500;
}
.sidebar-badge {
  margin-left: auto;
  background: var(--eb-primary); color: #fff;
  font-size: 9px; font-weight: 800;
  border-radius: 9px; padding: 1px 6px;
  min-width: 18px; text-align: center;
}
.sidebar-footer {
  padding: var(--eb-space-4);
  border-top: 1px solid var(--eb-sidebar-border);
  flex-shrink: 0;
}
.sidebar-user { font-size: 12px; font-weight: 500; color: var(--eb-text-2); }
.sidebar-role { font-size: 10px; color: var(--eb-text-4); }

/* ================================================================
   5.02  PAGE HEADER
   ================================================================ */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--eb-space-3); gap: var(--eb-space-3);
  padding-left: 2px; min-height: 32px;
}
.page-title    { font-size: 15px; font-weight: 600; color: var(--eb-text); margin: 0; white-space: nowrap; }
.page-subtitle { font-size: 11px; color: var(--eb-text-3); margin: 0; margin-left: var(--eb-space-2); white-space: nowrap; }
.page-actions  { display: flex; align-items: center; gap: var(--eb-space-1); flex-wrap: nowrap; flex-shrink: 0; margin-left: auto; }

/* When sidebar collapsed: compact header, reduce vertical space */
.page-header-mode-collapsed .page-header {
  margin-bottom: var(--eb-space-1);
  min-height: 24px;
  padding-left: 42px;
  padding-top: 3px;
  padding-bottom: 3px;
  padding-right: 8px;
  border: 1px solid var(--eb-border-light);
  border-radius: var(--eb-radius);
  margin-top: -2px;
  gap: var(--eb-space-2);
}
.page-header-mode-collapsed .page-header .page-title { font-size: 12px; }
.page-header-mode-collapsed .page-header .page-subtitle { display: none; }
.page-header-mode-collapsed .page-header .page-actions .btn { padding: 2px 6px; font-size: 10px; }
.page-header-mode-collapsed .tab-bar { margin-bottom: var(--eb-space-1); }
.page-header-mode-collapsed .tab-btn { padding: 4px 8px; font-size: 10px; }
.page-header-mode-collapsed .tab-btn span:not(.tag) { display: none; }
.page-header-mode-collapsed .filter-bar { margin-bottom: var(--eb-space-1); }
.page-header-mode-collapsed .filter-btn { padding: 3px 8px; font-size: 10px; }
.page-header-mode-collapsed .page-header-tab-label { display: none; }

/* ================================================================
   5.03  CARDS
   ================================================================ */
.card {
  background: var(--eb-surface);
  border: 1px solid var(--eb-border);
  border-radius: var(--eb-radius-lg);
  padding: var(--eb-space-5);
}
.card-sm    { padding: var(--eb-space-3); }
.card-lg    { padding: var(--eb-space-6) var(--eb-space-8); }
.card-flush { padding: 0; }
.card-hover {
  transition: border-color .15s, box-shadow .15s;
  cursor: pointer;
}
.card-hover:hover {
  border-color: var(--eb-green-300);
  box-shadow: var(--eb-shadow-sm);
}

.card-accent-green { border-left: 3px solid var(--eb-primary); border-radius: 0 var(--eb-radius-lg) var(--eb-radius-lg) 0; }
.card-accent-gold  { border-left: 3px solid var(--eb-accent);  border-radius: 0 var(--eb-radius-lg) var(--eb-radius-lg) 0; }
.card-accent-red   { border-left: 3px solid var(--eb-danger-text); border-radius: 0 var(--eb-radius-lg) var(--eb-radius-lg) 0; }

.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--eb-space-4); gap: var(--eb-space-3);
}
.card-title { font-size: 14px; font-weight: 600; color: var(--eb-text); margin: 0; }

/* ================================================================
   5.04  KPI
   ================================================================ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--eb-space-4);
  margin-bottom: var(--eb-space-6);
}
.kpi {
  background: var(--eb-surface);
  border: 1px solid var(--eb-border);
  border-radius: var(--eb-radius-lg);
  padding: var(--eb-space-4);
}
.kpi-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--eb-text-3);
  margin-bottom: var(--eb-space-1);
}
.kpi-value    { font-size: 28px; font-weight: 700; color: var(--eb-text); line-height: 1; }
.kpi-value-md { font-size: 22px; }
.kpi-value-sm { font-size: 18px; }
.kpi-subvalue { font-size: 11px; color: var(--eb-text-4); margin-top: var(--eb-space-1); }
.kpi-trend-up   { color: var(--eb-success-text); }
.kpi-trend-down { color: var(--eb-danger-text); }

/* ================================================================
   5.05  TABLES
   ================================================================ */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
thead tr { background: var(--eb-th-bg); border-bottom: 1px solid var(--eb-td-border); }
th {
  padding: 9px var(--eb-space-4);
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--eb-th-text);
  text-align: left;
}
td {
  padding: 9px var(--eb-space-4);
  border-bottom: 1px solid var(--eb-td-border);
  color: var(--eb-text); vertical-align: middle;
  font-size: 13px;
}
tbody tr:hover { background: var(--eb-tr-hover); }
tbody tr:last-child td { border-bottom: none; }

th.text-right, td.text-right   { text-align: right; }
th.text-center, td.text-center { text-align: center; }

.table-sm th { padding: 6px var(--eb-space-3); }
.table-sm td { padding: 6px var(--eb-space-3); }

/* ================================================================
   5.06  BUTTONS  (hover via ::before -- Ecwid technique)
   ================================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--eb-space-2);
  padding: 8px var(--eb-space-4);
  border-radius: var(--eb-radius);
  font-size: 13px; font-weight: 500;
  font-family: var(--eb-font);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  position: relative;
  z-index: 1;
  overflow: hidden;
  transition: transform .1s ease-out, color .1s ease-out;
  -webkit-user-select: none; user-select: none;
  line-height: 1.4;
}

/* Hover overlay */
.btn::before {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  opacity: 0;
  border-radius: inherit;
  transition: opacity .1s ease-out;
  pointer-events: none;
}
.btn:hover::before { opacity: 1; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* Primary */
.btn-primary { background: var(--eb-primary); color: var(--eb-primary-text); border-color: var(--eb-primary); }
.btn-primary::before { background: rgba(0,0,0,.12); }
.btn-primary:hover { color: var(--eb-primary-text); }

/* Secondary */
.btn-secondary { background: var(--eb-surface); color: var(--eb-text); border-color: var(--eb-border); }
.btn-secondary::before { background: var(--eb-green-50); }
.btn-secondary:hover { border-color: var(--eb-green-300); color: var(--eb-text); }

/* Danger */
.btn-danger { background: var(--eb-danger-bg); color: var(--eb-danger-text); border-color: var(--eb-danger-bg); }
.btn-danger::before { background: rgba(163,45,45,.08); }
.btn-danger:hover { color: var(--eb-danger-text); }

/* Ghost */
.btn-ghost { background: transparent; color: var(--eb-text-3); border-color: transparent; }
.btn-ghost::before { background: var(--eb-surface-2); }
.btn-ghost:hover { color: var(--eb-text); }

/* Accent (gold) */
.btn-accent { background: var(--eb-accent); color: #fff; border-color: var(--eb-accent); }
.btn-accent::before { background: rgba(0,0,0,.1); }
.btn-accent:hover { color: #fff; }

/* Sizes */
.btn-xs    { padding: 3px var(--eb-space-2); font-size: 10px; border-radius: 4px; }
.btn-sm    { padding: 5px 10px; font-size: 11px; }
.btn-lg    { padding: 11px var(--eb-space-6); font-size: 14px; border-radius: var(--eb-radius-md); }
.btn-block { display: flex; width: 100%; }

/* Loading -- SVG spinner as data URI */
.btn-loading { color: transparent !important; pointer-events: none; }
.btn-loading::after {
  content: '';
  position: absolute; top: 50%; left: 50%;
  width: 16px; height: 16px;
  margin: -8px 0 0 -8px;
  background: transparent url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' height='100' width='100' viewBox='0 0 100 100' fill='none' stroke-width='7'%3E%3Ccircle cx='50' cy='50' r='44' stroke-linecap='round' stroke-dasharray='207 69' stroke='%23ffffff'/%3E%3C/svg%3E") center no-repeat;
  background-size: contain;
  animation: eb-spin .6s linear infinite;
}
/* Green spinner for secondary/ghost */
.btn-secondary.btn-loading::after,
.btn-ghost.btn-loading::after {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' height='100' width='100' viewBox='0 0 100 100' fill='none' stroke-width='7'%3E%3Ccircle cx='50' cy='50' r='44' stroke-linecap='round' stroke-dasharray='207 69' stroke='%232B6E2B'/%3E%3C/svg%3E");
}

/* ================================================================
   5.07  FORMS
   ================================================================ */
.form-group { margin-bottom: var(--eb-space-4); }
.form-label {
  display: block;
  font-size: 10px; font-weight: 700; color: var(--eb-text-3);
  margin-bottom: var(--eb-space-1);
  text-transform: uppercase; letter-spacing: .04em;
}
.form-label-required::after { content: ' *'; color: var(--eb-danger-text); }

.form-input, .form-select, .form-textarea {
  width: 100%; padding: 8px var(--eb-space-3);
  border: 1px solid var(--eb-input-border);
  border-radius: var(--eb-radius);
  font-size: 13px; font-family: var(--eb-font);
  color: var(--eb-input-text);
  background: var(--eb-input-bg);
  transition: border-color .12s, box-shadow .12s;
  appearance: none; -webkit-appearance: none;
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--eb-input-placeholder); }

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237A947A' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
  cursor: pointer;
}

.form-textarea { resize: vertical; min-height: 90px; line-height: 1.5; }

.form-input-sm, .form-select-sm { padding: 5px 10px; font-size: 11px; }

.form-input.is-valid   { border-color: var(--eb-success-text); }
.form-input.is-invalid { border-color: var(--eb-danger-text); }

.form-hint  { font-size: 11px; color: var(--eb-text-3); margin-top: var(--eb-space-1); }
.form-error { font-size: 11px; color: var(--eb-danger-text); margin-top: var(--eb-space-1); }

.form-row      { display: grid; grid-template-columns: 1fr 1fr; gap: var(--eb-space-3); }
.form-row-3    { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--eb-space-3); }
.form-col-full { grid-column: 1 / -1; }

/* Input group with icon */
.input-group { position: relative; display: flex; align-items: center; }
.input-group .form-input { padding-left: 34px; }
.input-group-icon {
  position: absolute; left: 10px;
  color: var(--eb-text-3); pointer-events: none;
  display: flex; align-items: center;
}

/* Checkbox / radio wrapper */
.form-check {
  display: flex; align-items: center; gap: var(--eb-space-2);
  font-size: 13px; color: var(--eb-text);
  cursor: pointer; margin-bottom: var(--eb-space-2);
}
.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 16px; height: 16px; margin: 0;
  cursor: pointer;
}

/* Toggle switch (CSS only) */
.form-toggle {
  position: relative;
  display: inline-flex; align-items: center;
  cursor: pointer; gap: var(--eb-space-2);
  font-size: 13px; color: var(--eb-text);
}
.form-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.form-toggle-track {
  width: 36px; height: 20px;
  background: var(--eb-border);
  border-radius: 10px;
  position: relative;
  transition: background .2s;
  flex-shrink: 0;
}
.form-toggle-track::after {
  content: '';
  position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.form-toggle input:checked + .form-toggle-track {
  background: var(--eb-primary);
}
.form-toggle input:checked + .form-toggle-track::after {
  transform: translateX(16px);
}
.form-toggle input:focus-visible + .form-toggle-track {
  outline: 2px solid var(--eb-primary);
  outline-offset: 2px;
}

/* ================================================================
   5.08  TAGS & BADGES
   ================================================================ */
.tag {
  display: inline-flex; align-items: center; gap: var(--eb-space-1);
  padding: 2px var(--eb-space-2);
  border-radius: 5px; font-size: 10px; font-weight: 600;
  white-space: nowrap;
}
.tag::before {
  content: ''; width: 5px; height: 5px;
  border-radius: 50%; background: currentColor; flex-shrink: 0;
}

.tag-green  { background: var(--eb-success-bg); color: var(--eb-success-text); }
.tag-amber  { background: var(--eb-warning-bg); color: var(--eb-warning-text); }
.tag-red    { background: var(--eb-danger-bg);  color: var(--eb-danger-text); }
.tag-blue   { background: var(--eb-info-bg);    color: var(--eb-info-text); }
.tag-gray   { background: var(--eb-surface-2);  color: var(--eb-text-2); }
.tag-purple { background: var(--eb-purple-bg);  color: var(--eb-purple-text); }
.tag-gold   { background: var(--eb-gold-100);   color: var(--eb-gold-700); }

.tag-sm { font-size: 9px; padding: 1px 6px; }
.tag-lg { font-size: 11px; padding: 4px 10px; border-radius: var(--eb-radius-md); }

/* Inline text tag */
.inline-text-tag {
  display: inline-block; margin: 0 2px;
  padding: 2px 6px; border-radius: 3px;
  font-size: 11px; font-weight: 600;
  vertical-align: baseline;
}
.inline-text-tag-green { background: var(--eb-success-bg); color: var(--eb-success-text); }
.inline-text-tag-amber { background: var(--eb-warning-bg); color: var(--eb-warning-text); }
.inline-text-tag-red   { background: var(--eb-danger-bg);  color: var(--eb-danger-text); }
.inline-text-tag-blue  { background: var(--eb-info-bg);    color: var(--eb-info-text); }

/* Badge counter */
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 10px; font-size: 10px; font-weight: 700;
  background: var(--eb-primary); color: #fff;
}
.badge-secondary { background: var(--eb-surface-2); color: var(--eb-text-2); }
.badge-danger    { background: var(--eb-danger-bg); color: var(--eb-danger-text); }
.badge-highlight { background: var(--eb-gold-100);  color: var(--eb-gold-700); }
.badge-light     { background: var(--eb-surface-2); color: var(--eb-text-3); border: 1px solid var(--eb-border); }

/* Chip -- interactive circular tag */
.chip {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 12px; min-width: 32px; height: 32px;
  border-radius: 16px;
  background: var(--eb-surface); border: 1px solid var(--eb-border);
  font-size: 12px; font-weight: 500; color: var(--eb-text-2);
  cursor: pointer; transition: all .12s;
}
.chip:hover {
  border-color: var(--eb-primary); color: var(--eb-primary);
  background: var(--eb-green-50);
}
.chip.active {
  background: var(--eb-primary); color: #fff;
  border-color: var(--eb-primary);
}
.chip-sm { height: 26px; min-width: 26px; padding: 0 8px; font-size: 11px; border-radius: 13px; }
.chip-lg { height: 40px; min-width: 40px; padding: 0 16px; font-size: 13px; border-radius: 20px; }

/* ================================================================
   5.09  MODALS
   ================================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(26,46,26,.45);
  z-index: var(--eb-z-modal);
  display: flex; align-items: center; justify-content: center;
  padding: var(--eb-space-4);
  animation: eb-fade-in .15s ease;
}
.modal {
  background: var(--eb-surface);
  border-radius: var(--eb-radius-xl);
  padding: var(--eb-space-6);
  max-width: 600px; width: 100%; max-height: 88vh;
  overflow-y: auto;
  border: 1px solid var(--eb-border-light);
  animation: eb-slide-up .2s ease;
}
.modal-sm { max-width: 400px; }
.modal-lg { max-width: 800px; }
.modal-xl { max-width: 1000px; }

.modal-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: var(--eb-space-5); gap: var(--eb-space-4);
}
.modal-title    { font-size: 18px; font-weight: 700; color: var(--eb-text); margin: 0; }
.modal-subtitle { font-size: 12px; color: var(--eb-text-3); margin-top: var(--eb-space-1); }
.modal-close {
  width: 28px; height: 28px; border-radius: var(--eb-radius-sm);
  border: none; background: transparent; color: var(--eb-text-3);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0; transition: all .12s; padding: 0;
}
.modal-close:hover { background: var(--eb-surface-2); color: var(--eb-text); }
.modal-footer {
  display: flex; align-items: center; justify-content: flex-end;
  gap: var(--eb-space-2); margin-top: var(--eb-space-5);
  padding-top: var(--eb-space-4); border-top: 1px solid var(--eb-border-light);
}

/* ================================================================
   5.10  TOASTS
   ================================================================ */
.toast {
  position: fixed; bottom: var(--eb-space-6); right: var(--eb-space-6);
  padding: var(--eb-space-3) var(--eb-space-5);
  border-radius: var(--eb-radius-lg);
  font-size: 13px; font-weight: 500;
  z-index: var(--eb-z-toast);
  display: flex; align-items: center; gap: var(--eb-space-2);
  box-shadow: var(--eb-shadow-lg); max-width: 380px;
  animation: eb-slide-up .25s ease;
  border: 1px solid transparent;
}
.toast--removing { animation: eb-slide-out .2s ease forwards; }

.toast-success { background: var(--eb-success-bg); color: var(--eb-success-text); border-color: #b7e8c8; }
.toast-error   { background: var(--eb-danger-bg);  color: var(--eb-danger-text);  border-color: #f5c5c9; }
.toast-warning { background: var(--eb-warning-bg); color: var(--eb-warning-text); border-color: #f5daa0; }
.toast-info    { background: var(--eb-info-bg);    color: var(--eb-info-text);    border-color: #bed5f0; }

/* ================================================================
   5.11  ALERT STRIPS
   ================================================================ */
.alert-strip {
  background: var(--eb-surface);
  border: 1px solid var(--eb-border);
  border-left: 3px solid var(--eb-primary);
  border-radius: 0 var(--eb-radius-md) var(--eb-radius-md) 0;
  padding: 12px var(--eb-space-4);
  margin-bottom: var(--eb-space-4);
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--eb-space-3); box-shadow: var(--eb-shadow-sm);
}
.alert-strip-warning { border-left-color: var(--eb-accent); }
.alert-strip-danger  { border-left-color: var(--eb-danger-text); }
.alert-strip-info    { border-left-color: #1A5FA8; }
.alert-strip-title   { font-size: 13px; font-weight: 600; color: var(--eb-text); margin-bottom: 2px; }
.alert-strip-text    { font-size: 12px; color: var(--eb-text-2); }

/* ================================================================
   5.12  PROGRESS BARS
   ================================================================ */
.pbar-wrap {
  background: var(--eb-surface-2); border-radius: 3px;
  height: 6px; overflow: hidden;
}
.pbar {
  height: 100%; border-radius: 3px;
  transition: width .4s ease;
  background: var(--eb-primary);
}
.pbar-thin  { height: 4px; }
.pbar-thick { height: 8px; }
.pbar-gold  { background: var(--eb-accent); }
.pbar-red   { background: var(--eb-danger-text); }
.pbar-row {
  display: flex; align-items: center; gap: var(--eb-space-3);
  margin-bottom: var(--eb-space-2); font-size: 11px;
}
.pbar-label { color: var(--eb-text-2); min-width: 90px; flex-shrink: 0; }
.pbar-pct   { color: var(--eb-text-3); width: 30px; text-align: right; flex-shrink: 0; }

/* ================================================================
   5.13  FILTER BUTTONS & TABS
   ================================================================ */
.filter-bar {
  display: flex; align-items: center; gap: var(--eb-space-1);
  flex-wrap: wrap; margin-bottom: var(--eb-space-4);
}
.filter-btn {
  background: transparent; border: 1px solid var(--eb-border);
  color: var(--eb-text-2); border-radius: var(--eb-radius-sm);
  padding: 4px 12px; font-size: 11px; font-weight: 600;
  cursor: pointer; font-family: var(--eb-font); transition: all .12s;
}
.filter-btn:hover {
  background: var(--eb-surface-2); border-color: var(--eb-green-300);
}
.filter-btn.active {
  background: var(--eb-primary); color: #fff; border-color: var(--eb-primary);
}

.tab-bar {
  display: flex; background: var(--eb-surface-2);
  border-radius: var(--eb-radius-md); padding: 3px; gap: 2px;
  width: fit-content; margin-bottom: var(--eb-space-4);
}
.tab-btn {
  background: transparent; border: none;
  border-radius: var(--eb-radius-sm);
  padding: 6px var(--eb-space-4); font-size: 12px; font-weight: 500;
  color: var(--eb-text-3); cursor: pointer; font-family: var(--eb-font);
  transition: all .12s;
}
.tab-btn:hover { color: var(--eb-text); }
.tab-btn.active {
  background: var(--eb-surface); color: var(--eb-text);
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

/* ================================================================
   5.14  EMPTY STATES
   ================================================================ */
.empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: var(--eb-space-12) var(--eb-space-6);
  color: var(--eb-text-4);
}
.empty-icon  { font-size: 36px; margin-bottom: var(--eb-space-3); opacity: .4; }
.empty-title { font-size: 14px; font-weight: 600; color: var(--eb-text-3); margin-bottom: var(--eb-space-2); }
.empty-text  { font-size: 13px; color: var(--eb-text-4); max-width: 360px; margin-bottom: var(--eb-space-4); }
.empty-sm    { padding: var(--eb-space-8) var(--eb-space-6); }

/* ================================================================
   5.15  PAGINATION
   ================================================================ */
.pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px var(--eb-space-4);
  border-top: 1px solid var(--eb-border-light);
  font-size: 11px; color: var(--eb-text-3);
}
.pagination-controls { display: flex; align-items: center; gap: var(--eb-space-1); }

/* ================================================================
   5.16  NAMED AREA
   ================================================================ */
.named-area { margin-bottom: var(--eb-space-8); }
.named-area--headless .named-area-header { display: none; }

.named-area-header { margin-bottom: var(--eb-space-4); max-width: 980px; }
.named-area-title  { font-size: 16px; font-weight: 700; color: var(--eb-text); margin-bottom: var(--eb-space-1); }
.named-area-desc   { font-size: 12px; color: var(--eb-text-3); line-height: 1.55; }
.named-area-body   { max-width: 980px; }

/* ================================================================
   5.17  COLLAPSIBLE
   ================================================================ */
.collapsible-card {
  background: var(--eb-surface);
  border: 1px solid var(--eb-border);
  border-radius: var(--eb-radius-md);
  margin-bottom: 6px; overflow: hidden;
  transition: border-color .15s;
}
.collapsible-card:hover { border-color: var(--eb-green-300); }

.collapsible-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px var(--eb-space-4); cursor: pointer;
  transition: background .12s;
}
.collapsible-header:hover { background: var(--eb-tr-hover); }
.collapsible-title    { font-size: 13px; font-weight: 600; color: var(--eb-text); }
.collapsible-subtitle { font-size: 11px; color: var(--eb-text-3); margin-top: 2px; }
.collapsible-chevron {
  font-size: 10px; color: var(--eb-text-3);
  transition: transform .15s; flex-shrink: 0;
}
.collapsible-chevron.open { transform: rotate(90deg); }
.collapsible-body {
  border-top: 1px solid var(--eb-border-light);
  padding: 12px var(--eb-space-4);
  display: none;
}
.collapsible-body.open { display: block; }

/* ================================================================
   5.18  MEDIA PICKER
   ================================================================ */
.media-picker {
  border: 2px dashed var(--eb-border);
  border-radius: var(--eb-radius-lg);
  padding: var(--eb-space-6); text-align: center;
  transition: all .15s; cursor: pointer;
  background: var(--eb-surface);
}
.media-picker:hover,
.media-picker.drag-over {
  border-color: var(--eb-primary); background: var(--eb-green-50);
}
.media-picker-icon  { font-size: 28px; margin-bottom: var(--eb-space-2); opacity: .4; }
.media-picker-title { font-size: 13px; font-weight: 600; color: var(--eb-text); margin-bottom: 3px; }
.media-picker-sub   { font-size: 11px; color: var(--eb-text-3); }
.media-picker-types {
  display: flex; gap: var(--eb-space-1); justify-content: center;
  flex-wrap: wrap; margin-top: var(--eb-space-2);
}
.media-picker-type {
  font-size: 10px; padding: 2px 7px; border-radius: 4px;
  background: var(--eb-surface-2); color: var(--eb-text-3); font-weight: 600;
}

/* Compact variant */
.media-picker-sm {
  border: 2px dashed var(--eb-border); border-radius: var(--eb-radius-md);
  padding: 14px 10px; text-align: center;
  transition: all .15s; cursor: pointer; background: var(--eb-surface);
}
.media-picker-sm:hover { border-color: var(--eb-primary); background: var(--eb-green-50); }
.media-picker-sm.uploaded {
  border-style: solid; border-color: var(--eb-success-text);
  background: var(--eb-success-bg);
}

/* File list */
.media-file-list { border: 1px solid var(--eb-border); border-radius: var(--eb-radius-lg); overflow: hidden; }
.media-file-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px var(--eb-space-3);
  border-bottom: 1px solid var(--eb-border-light);
  transition: background .12s;
}
.media-file-item:last-child { border-bottom: none; }
.media-file-item:hover { background: var(--eb-green-50); }
.media-file-icon {
  width: 32px; height: 32px; border-radius: var(--eb-radius);
  background: var(--eb-info-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.media-file-name { flex: 1; font-size: 12px; font-weight: 500; color: var(--eb-text); }
.media-file-meta { font-size: 11px; color: var(--eb-text-3); }
.media-file-del {
  background: none; border: none; color: var(--eb-text-4);
  cursor: pointer; font-size: 16px; padding: 2px 6px;
  border-radius: 4px; transition: all .12s;
}
.media-file-del:hover { background: var(--eb-danger-bg); color: var(--eb-danger-text); }

/* ================================================================
   5.19  DRAGGABLE ITEMS
   ================================================================ */
.draggable-area { display: flex; flex-direction: column; gap: var(--eb-space-1); }
.draggable-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px var(--eb-space-3);
  background: var(--eb-surface); border: 1px solid var(--eb-border);
  border-radius: var(--eb-radius); cursor: grab;
  transition: all .15s; user-select: none;
}
.draggable-item:hover { border-color: var(--eb-green-300); box-shadow: var(--eb-shadow-sm); }
.draggable-item.is-dragging { opacity: .45; border-style: dashed; }
.draggable-item.is-over {
  border-color: var(--eb-primary); background: var(--eb-green-50);
  transform: scale(1.01);
}
.draggable-handle { color: var(--eb-text-4); font-size: 14px; cursor: grab; flex-shrink: 0; }
.draggable-content { flex: 1; min-width: 0; }
.draggable-label { font-size: 12px; font-weight: 500; color: var(--eb-text); }
.draggable-sub   { font-size: 11px; color: var(--eb-text-3); margin-top: 1px; }

/* ================================================================
   5.20  FORWARD BLOCK
   ================================================================ */
.forward-block {
  display: flex; align-items: center; gap: var(--eb-space-3);
  padding: 12px var(--eb-space-4);
  background: var(--eb-surface); border: 1px solid var(--eb-border);
  border-radius: var(--eb-radius-md); cursor: pointer;
  transition: all .12s; text-decoration: none; margin-bottom: 6px;
}
.forward-block:hover { border-color: var(--eb-green-300); background: var(--eb-green-50); }
.forward-block-icon {
  width: 36px; height: 36px; border-radius: var(--eb-radius-md);
  background: var(--eb-green-50);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.forward-block-content { flex: 1; min-width: 0; }
.forward-block-title { font-size: 13px; font-weight: 600; color: var(--eb-text); }
.forward-block-sub   { font-size: 11px; color: var(--eb-text-3); margin-top: 2px; }
.forward-block-arrow { color: var(--eb-text-4); font-size: 14px; flex-shrink: 0; }

/* ================================================================
   5.21  BUBBLE TOOLTIP
   ================================================================ */
.bubble {
  position: relative; display: inline-block;
  padding: 8px 12px; border-radius: var(--eb-radius-md);
  font-size: 12px; font-weight: 500;
  animation: eb-zoom .1s ease, eb-fade-in .1s ease;
}
.bubble::before {
  content: ''; position: absolute; bottom: -7px; left: 18px;
  width: 0; height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
}
.bubble-success { background: var(--eb-success-bg); color: var(--eb-success-text); }
.bubble-success::before { border-top: 7px solid var(--eb-success-bg); }
.bubble-warning { background: var(--eb-warning-bg); color: var(--eb-warning-text); }
.bubble-warning::before { border-top: 7px solid var(--eb-warning-bg); }
.bubble-danger  { background: var(--eb-danger-bg);  color: var(--eb-danger-text); }
.bubble-danger::before  { border-top: 7px solid var(--eb-danger-bg); }
.bubble-info    { background: var(--eb-info-bg);    color: var(--eb-info-text); }
.bubble-info::before    { border-top: 7px solid var(--eb-info-bg); }

/* ================================================================
   5.22  SECTION LABEL & FIELD DISPLAY
   ================================================================ */
.section-label {
  font-size: 10px; font-weight: 700; color: var(--eb-text-2);
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: var(--eb-space-3);
}

.field {
  margin-bottom: 10px; padding-bottom: 10px;
  border-bottom: 1px solid var(--eb-border-light);
}
.field:last-child { border-bottom: none; margin: 0; padding: 0; }
.field-label {
  font-size: 9px; color: var(--eb-text-3);
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 2px;
}
.field-value { font-size: 13px; font-weight: 600; color: var(--eb-text); }
.field-value-mono { font-family: var(--eb-font-mono); font-size: 12px; }

/* Buckets (commission chain) */
.bucket {
  background: var(--eb-surface); border: 1px solid var(--eb-border);
  border-radius: var(--eb-radius-sm); padding: 10px;
}
.bucket-blue   { border-left: 3px solid #2B7CD4; }
.bucket-green  { border-left: 3px solid #22A85A; }
.bucket-gold   { border-left: 3px solid var(--eb-accent); }
.bucket-red    { border-left: 3px solid var(--eb-danger-text); }
.bucket-purple { border-left: 3px solid var(--eb-purple-text); }
.bucket-label {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: var(--eb-text-3); margin-bottom: 4px;
}

/* Locked overlay */
.locked-overlay { position: relative; pointer-events: none; user-select: none; }
.locked-overlay::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(2px);
  border-radius: var(--eb-radius-md); z-index: 10;
}

/* ================================================================
   5.23  CHAT / MESSAGES
   ================================================================ */
.chat-layout {
  display: flex; height: calc(100vh - 120px);
  border: 1px solid var(--eb-border); border-radius: var(--eb-radius-lg);
  overflow: hidden; background: var(--eb-surface);
}
.chat-sidebar {
  width: 280px; min-width: 280px;
  border-right: 1px solid var(--eb-border-light);
  display: flex; flex-direction: column;
}
.chat-main {
  flex: 1; display: flex; flex-direction: column;
  background: var(--eb-bg); min-width: 0;
}
.chat-messages { flex: 1; overflow-y: auto; padding: var(--eb-space-4) var(--eb-space-5); }
.chat-message  { margin-bottom: var(--eb-space-3); max-width: 72%; }
.chat-message.mine { margin-left: auto; }
.chat-bubble {
  padding: 8px var(--eb-space-3); border-radius: 10px;
  font-size: 13px; line-height: 1.5;
}
.chat-message.mine .chat-bubble {
  background: var(--eb-primary); color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-message.other .chat-bubble {
  background: var(--eb-surface); border: 1px solid var(--eb-border);
  color: var(--eb-text); border-bottom-left-radius: 4px;
}
.chat-input-area {
  padding: var(--eb-space-3) var(--eb-space-5);
  border-top: 1px solid var(--eb-border-light);
  background: var(--eb-surface);
  display: flex; gap: var(--eb-space-2); align-items: flex-end;
  flex-shrink: 0;
}

/* ================================================================
   5.24  DOC VIEWER
   ================================================================ */
.doc-viewer {
  border: 1px solid var(--eb-border); border-radius: var(--eb-radius-md);
  padding: var(--eb-space-6); max-height: 500px; overflow-y: auto;
  font-size: 13px; line-height: 1.7;
  background: var(--eb-surface); cursor: text; user-select: text;
}
.doc-viewer mark.var-highlight {
  background: var(--eb-success-bg); color: var(--eb-success-text);
  border-radius: 3px; padding: 1px 4px;
  font-family: var(--eb-font-mono); font-size: 11px; cursor: pointer;
}
.doc-viewer mark.var-highlight.modified {
  background: var(--eb-warning-bg); color: var(--eb-warning-text);
}

/* ================================================================
   5.25  PIPELINE / STEPS (NEW in v2.0)
   ================================================================ */
.pipeline {
  display: flex; align-items: flex-start;
  gap: 0; padding: var(--eb-space-4) 0;
}
.pipeline-step {
  display: flex; flex-direction: column; align-items: center;
  position: relative; flex: 1; text-align: center;
}
.pipeline-step::before {
  content: '';
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--eb-border);
  background: var(--eb-surface);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--eb-space-2);
  z-index: 1;
  transition: all .2s;
}
.pipeline-step::after {
  content: '';
  position: absolute; top: 13px;
  left: calc(50% + 14px); right: calc(-50% + 14px);
  height: 2px; background: var(--eb-border);
  z-index: 0;
}
.pipeline-step:last-child::after { display: none; }

.pipeline-step.completed::before {
  background: var(--eb-primary); border-color: var(--eb-primary);
}
.pipeline-step.completed::after { background: var(--eb-primary); }
.pipeline-step.active::before {
  border-color: var(--eb-primary); background: var(--eb-green-50);
  box-shadow: 0 0 0 4px var(--eb-primary-ring);
}
.pipeline-step.pending::before {
  border-color: var(--eb-border); background: var(--eb-surface-2);
}

.pipeline-label {
  font-size: 10px; font-weight: 600; color: var(--eb-text-3);
  margin-top: var(--eb-space-1); max-width: 80px;
}
.pipeline-step.completed .pipeline-label { color: var(--eb-primary); }
.pipeline-step.active .pipeline-label { color: var(--eb-text); font-weight: 700; }

.pipeline-connector {
  flex-shrink: 0; width: 40px; height: 2px;
  background: var(--eb-border); align-self: center;
  margin-top: -14px;
}
.pipeline-connector.completed { background: var(--eb-primary); }

/* ================================================================
   5.26  STEP INDICATOR (NEW in v2.0)
   ================================================================ */
.step-indicator {
  display: flex; align-items: center; justify-content: center;
  gap: var(--eb-space-2); padding: var(--eb-space-3) 0;
}
.step-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--eb-border);
  transition: all .2s;
}
.step-dot.completed { background: var(--eb-primary); }
.step-dot.active {
  background: var(--eb-primary);
  box-shadow: 0 0 0 3px var(--eb-primary-ring);
  transform: scale(1.2);
}
.step-dot.pending { background: var(--eb-border); }

/* ================================================================
   5.27  OTP INPUT (NEW in v2.0)
   ================================================================ */
.otp-group {
  display: flex; gap: var(--eb-space-2);
  justify-content: center;
}
.otp-input {
  width: 48px; height: 56px;
  border: 2px solid var(--eb-input-border);
  border-radius: var(--eb-radius-md);
  font-family: var(--eb-font-mono);
  font-size: 24px; font-weight: 700;
  text-align: center;
  color: var(--eb-text); background: var(--eb-input-bg);
  transition: border-color .12s, box-shadow .12s;
  appearance: none; -webkit-appearance: none;
}
.otp-input:focus {
  outline: none;
  border-color: var(--eb-primary) !important;
  box-shadow: 0 0 0 3px var(--eb-input-focus-ring);
}
.otp-input::placeholder { color: var(--eb-text-4); font-weight: 400; }

/* ================================================================
   5.28  SPEC SHEET (NEW in v2.0)
   ================================================================ */
.spec-sheet {
  background: var(--eb-surface);
  border: 1px solid var(--eb-border);
  border-radius: var(--eb-radius-lg);
  overflow: hidden;
}
.spec-sheet-header {
  padding: var(--eb-space-5);
  border-bottom: 1px solid var(--eb-border);
  background: var(--eb-green-50);
}
.spec-sheet-title {
  font-size: 16px; font-weight: 700; color: var(--eb-text);
  margin: 0 0 var(--eb-space-1);
}
.spec-sheet-subtitle {
  font-size: 12px; color: var(--eb-text-3);
}
.spec-sheet-group {
  padding: var(--eb-space-4) var(--eb-space-5);
  border-bottom: 1px solid var(--eb-border-light);
}
.spec-sheet-group:last-of-type { border-bottom: none; }
.spec-sheet-group-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--eb-primary);
  margin-bottom: var(--eb-space-3);
}
.spec-sheet-table {
  width: 100%; border-collapse: collapse;
}
.spec-sheet-table th {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--eb-text-3);
  padding: 6px var(--eb-space-2); text-align: left;
  border-bottom: 1px solid var(--eb-border-light);
}
.spec-sheet-table td {
  font-size: 12px; padding: 6px var(--eb-space-2);
  border-bottom: 1px solid var(--eb-border-light);
  color: var(--eb-text);
}
.spec-sheet-table tr:last-child td { border-bottom: none; }
.spec-sheet-table td:nth-child(2),
.spec-sheet-table td:nth-child(3) {
  font-family: var(--eb-font-mono); font-size: 11px;
  text-align: center; color: var(--eb-text-2);
}
.spec-sheet-table td:nth-child(4) {
  font-size: 10px; color: var(--eb-text-3); text-align: center;
}
.spec-sheet-footer {
  padding: var(--eb-space-3) var(--eb-space-5);
  border-top: 1px solid var(--eb-border);
  background: var(--eb-surface-2);
  font-size: 11px; color: var(--eb-text-3);
}

/* ================================================================
   5.29  ENTITY CARD (NEW in v2.0)
   ================================================================ */
.entity-card {
  display: flex; align-items: center; gap: var(--eb-space-3);
  padding: var(--eb-space-3);
  border: 1px solid var(--eb-border); border-radius: var(--eb-radius-md);
  background: var(--eb-surface);
  transition: border-color .12s, box-shadow .12s;
}
.entity-card:hover { border-color: var(--eb-green-300); box-shadow: var(--eb-shadow-sm); }

.entity-card-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--eb-green-100); color: var(--eb-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; flex-shrink: 0;
}
.entity-card-info { flex: 1; min-width: 0; }
.entity-card-name {
  font-size: 13px; font-weight: 600; color: var(--eb-text);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.entity-card-code {
  font-size: 10px; color: var(--eb-text-3);
  font-family: var(--eb-font-mono);
}

.entity-badge-autonomous {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 4px;
  background: var(--eb-info-bg); color: var(--eb-info-text);
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em;
}
.entity-badge-company {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 4px;
  background: var(--eb-gold-100); color: var(--eb-gold-700);
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em;
}

.verification-badges {
  display: inline-flex; align-items: center; gap: 4px;
  margin-left: var(--eb-space-2);
}
.verification-badges .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--eb-border);
}
.verification-badges .dot.verified { background: var(--eb-success-text); }
.verification-badges .dot.pending  { background: var(--eb-warning-text); }
.verification-badges .dot.rejected { background: var(--eb-danger-text); }

/* ================================================================
   5.30  PUBLIC PAGE (NEW in v2.0)
   ================================================================ */
.public-page {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: var(--eb-bg);
  padding: var(--eb-space-6);
}
.public-card {
  max-width: 440px; width: 100%;
  background: var(--eb-surface);
  border: 1px solid var(--eb-border);
  border-radius: var(--eb-radius-xl);
  padding: var(--eb-space-8);
  box-shadow: var(--eb-shadow-md);
}
.public-logo {
  width: 48px; height: 48px;
  border-radius: var(--eb-radius-lg);
  background: linear-gradient(135deg, var(--eb-green-600), var(--eb-green-700));
  color: #fff; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--eb-space-4);
}
.public-brand {
  text-align: center; font-size: 18px; font-weight: 700;
  color: var(--eb-text); margin-bottom: var(--eb-space-6);
}
.public-footer {
  text-align: center; margin-top: var(--eb-space-6);
  font-size: 11px; color: var(--eb-text-4);
}

/* ================================================================
   5.31  DROPDOWN MENU (NEW in v2.0)
   ================================================================ */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  position: absolute; top: 100%; right: 0;
  min-width: 180px;
  background: var(--eb-surface);
  border: 1px solid var(--eb-border);
  border-radius: var(--eb-radius-md);
  box-shadow: var(--eb-shadow-md);
  padding: var(--eb-space-1) 0;
  z-index: var(--eb-z-dropdown);
  display: none;
  animation: eb-slide-down .12s ease;
}
.dropdown-menu.open { display: block; }

.dropdown-item {
  display: flex; align-items: center; gap: var(--eb-space-2);
  padding: 7px var(--eb-space-3);
  font-size: 13px; color: var(--eb-text);
  cursor: pointer; transition: background .1s;
  border: none; background: none; width: 100%;
  text-align: left; font-family: var(--eb-font);
  text-decoration: none;
}
.dropdown-item:hover { background: var(--eb-green-50); color: var(--eb-primary); }
.dropdown-item:active { background: var(--eb-green-100); }

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

/* ================================================================
   5.32  WIZARD / STEPPER (NEW in v2.0)
   ================================================================ */
.wizard { max-width: 700px; }

.wizard-steps {
  display: flex; align-items: center;
  margin-bottom: var(--eb-space-6);
  padding: 0 var(--eb-space-2);
}
.wizard-step {
  display: flex; flex-direction: column; align-items: center;
  flex: 1; position: relative; text-align: center;
}
.wizard-step-number {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--eb-border);
  background: var(--eb-surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--eb-text-3);
  margin-bottom: var(--eb-space-2);
  z-index: 1; transition: all .2s;
}
.wizard-step-label {
  font-size: 10px; font-weight: 600; color: var(--eb-text-3);
}
.wizard-step::after {
  content: '';
  position: absolute; top: 15px;
  left: calc(50% + 16px); right: calc(-50% + 16px);
  height: 2px; background: var(--eb-border);
}
.wizard-step:last-child::after { display: none; }

.wizard-step.completed .wizard-step-number {
  background: var(--eb-primary); border-color: var(--eb-primary); color: #fff;
}
.wizard-step.completed::after { background: var(--eb-primary); }
.wizard-step.completed .wizard-step-label { color: var(--eb-primary); }

.wizard-step.active .wizard-step-number {
  border-color: var(--eb-primary); color: var(--eb-primary);
  background: var(--eb-green-50);
  box-shadow: 0 0 0 4px var(--eb-primary-ring);
}
.wizard-step.active .wizard-step-label { color: var(--eb-text); font-weight: 700; }

.wizard-content {
  background: var(--eb-surface);
  border: 1px solid var(--eb-border);
  border-radius: var(--eb-radius-lg);
  padding: var(--eb-space-6);
  margin-bottom: var(--eb-space-4);
}
.wizard-actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--eb-space-3);
}

/* ================================================================
   5.33  FIELD PREFIX / SUFFIX
   ================================================================ */
.input-addon { display: flex; align-items: stretch; }
.input-addon .form-input { border-radius: 0; flex: 1; }
.input-addon-prefix {
  padding: 0 12px; display: flex; align-items: center;
  background: var(--eb-surface-2); border: 1px solid var(--eb-input-border);
  border-right: none; border-radius: var(--eb-radius) 0 0 var(--eb-radius);
  font-size: 12px; color: var(--eb-text-3); white-space: nowrap;
}
.input-addon-suffix {
  padding: 0 12px; display: flex; align-items: center;
  background: var(--eb-surface-2); border: 1px solid var(--eb-input-border);
  border-left: none; border-radius: 0 var(--eb-radius) var(--eb-radius) 0;
  font-size: 12px; color: var(--eb-text-3); white-space: nowrap;
}
.input-addon .form-input:first-child { border-radius: var(--eb-radius) 0 0 var(--eb-radius); }
.input-addon .form-input:last-child  { border-radius: 0 var(--eb-radius) var(--eb-radius) 0; }

/* ================================================================
   5.34  EDITABLE DATA
   ================================================================ */
.editable-data { cursor: pointer; }
.editable-data-value {
  display: flex; align-items: center; gap: 6px; padding: 4px 0;
  transition: color .12s;
}
.editable-data-value:hover { color: var(--eb-primary); }
.editable-data-edit-icon {
  color: var(--eb-text-4); font-size: 12px;
  opacity: 0; transition: opacity .12s;
}
.editable-data:hover .editable-data-edit-icon { opacity: 1; }
.editable-data--editing .editable-data-value { display: none; }
.editable-data--editing .editable-data-input { display: flex; }
.editable-data-input { display: none; gap: 6px; align-items: center; }

/* ================================================================
   5.35  FEATURE CARD
   ================================================================ */
.feature-card {
  display: flex; gap: 24px; align-items: flex-start;
}
.feature-card-icon {
  width: 48px; height: 48px; border-radius: var(--eb-radius-md);
  background: var(--eb-green-50);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--eb-primary);
}
.feature-card-content { flex: 1; min-width: 0; }
.feature-card-title {
  font-size: 16px; font-weight: 700; color: var(--eb-text); margin-bottom: 4px;
}
.feature-card-text {
  font-size: 13px; color: var(--eb-text-3); line-height: 1.6; margin-bottom: 12px;
}
.feature-card-picture {
  max-width: 200px; flex-shrink: 0;
  border-radius: var(--eb-radius-md); overflow: hidden;
}
.feature-card-picture img { width: 100%; display: block; }
.feature-card--vertical {
  flex-direction: column; text-align: center; align-items: center;
}
.feature-card--vertical .feature-card-icon { width: 64px; height: 64px; }

/* ================================================================
   5.36  CTA BLOCK
   ================================================================ */
.cta-block {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 20px; background: var(--eb-green-50);
  border: 1px solid var(--eb-green-200);
  border-radius: var(--eb-radius-lg);
}
.cta-block-icon {
  width: 40px; height: 40px; border-radius: var(--eb-radius-md);
  background: var(--eb-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cta-block-content { flex: 1; }
.cta-block-title {
  font-size: 14px; font-weight: 600; color: var(--eb-text); margin-bottom: 2px;
}
.cta-block-text { font-size: 12px; color: var(--eb-text-3); }
.cta-block-action { flex-shrink: 0; align-self: center; }
/* Gold variant */
.cta-block--gold { background: var(--eb-gold-50); border-color: var(--eb-gold-300); }
.cta-block--gold .cta-block-icon { background: var(--eb-accent); }

/* ================================================================
   5.37  STATUS BLOCK
   ================================================================ */
.status-block {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: var(--eb-surface);
  border: 1px solid var(--eb-border);
  border-radius: var(--eb-radius-md);
}
.status-block-icon {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.status-block-icon--success { background: var(--eb-success-bg); color: var(--eb-success-text); }
.status-block-icon--warning { background: var(--eb-warning-bg); color: var(--eb-warning-text); }
.status-block-icon--danger  { background: var(--eb-danger-bg);  color: var(--eb-danger-text); }
.status-block-icon--info    { background: var(--eb-info-bg);    color: var(--eb-info-text); }
.status-block-content { flex: 1; min-width: 0; }
.status-block-title   { font-size: 13px; font-weight: 600; color: var(--eb-text); }
.status-block-subtitle { font-size: 11px; color: var(--eb-text-3); margin-top: 1px; }
.status-block-actions { display: flex; gap: 6px; flex-shrink: 0; }
.status-block--disabled { opacity: .5; pointer-events: none; }

/* ================================================================
   5.38  PROMO ROW
   ================================================================ */
.promo-row { display: flex; gap: 32px; align-items: center; }
.promo-row-content { flex: 1; }
.promo-row-image { flex-shrink: 0; max-width: 280px; }
.promo-row-image img { width: 100%; border-radius: var(--eb-radius-lg); }

/* ================================================================
   5.39  TITLED ITEMS LIST
   ================================================================ */
.titled-list { list-style: none; padding: 0; margin: 0; counter-reset: titled-list; }
.titled-list-item {
  padding: 8px 0; border-bottom: 1px solid var(--eb-border-light);
}
.titled-list-item:last-child { border-bottom: none; }
.titled-list-item-title {
  font-size: 13px; font-weight: 600; color: var(--eb-text); margin-bottom: 2px;
}
.titled-list-item-content {
  font-size: 12px; color: var(--eb-text-3); line-height: 1.5;
}
.titled-list--ordered .titled-list-item {
  counter-increment: titled-list; padding-left: 32px; position: relative;
}
.titled-list--ordered .titled-list-item::before {
  content: counter(titled-list);
  position: absolute; left: 0; top: 8px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--eb-primary); color: #fff;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ================================================================
   5.40  SKELETON / PAGE PLACEHOLDER
   ================================================================ */
.skeleton {
  background: linear-gradient(90deg, var(--eb-surface-2) 25%, var(--eb-border-light) 50%, var(--eb-surface-2) 75%);
  background-size: 200% 100%;
  animation: eb-skeleton 1.5s ease-in-out infinite;
  border-radius: var(--eb-radius-sm);
}
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-text:last-child { width: 60%; }
.skeleton-title { height: 22px; width: 40%; margin-bottom: 12px; }
.skeleton-avatar { width: 40px; height: 40px; border-radius: 50%; }
.skeleton-button { height: 36px; width: 120px; border-radius: var(--eb-radius); }
.skeleton-card { height: 120px; border-radius: var(--eb-radius-lg); }
.skeleton-row { display: flex; gap: 12px; align-items: center; padding: 12px 0; }

/* ================================================================
   5.41  BOARD LAYOUT
   ================================================================ */
.board-layout { display: flex; gap: 12px; width: 100%; min-width: 0; overflow: hidden; }
.board-layout-content { flex: 1; min-width: 0; overflow: hidden; }
.board-layout-sidebar { width: 320px; flex-shrink: 0; }
.board-layout--sidebar-left { flex-direction: row-reverse; }
.board-layout-sidebar--sticky {
  position: sticky; top: 8px; align-self: flex-start;
  max-height: calc(100vh - 16px); overflow-y: auto;
}

/* ================================================================
   5.42  LIST ELEMENT
   ================================================================ */
.list-element {
  display: flex; align-items: center; gap: 12px;
  padding: 12px var(--eb-space-4);
  border-bottom: 1px solid var(--eb-border-light);
  transition: background .12s;
}
.list-element:last-child { border-bottom: none; }
.list-element:hover { background: var(--eb-tr-hover); }
.list-element-image {
  width: 44px; height: 44px; border-radius: var(--eb-radius);
  overflow: hidden; flex-shrink: 0; background: var(--eb-surface-2);
  display: flex; align-items: center; justify-content: center;
}
.list-element-image img { width: 100%; height: 100%; object-fit: cover; }
.list-element-content { flex: 1; min-width: 0; }
.list-element-title { font-size: 13px; font-weight: 600; color: var(--eb-text); }
.list-element-subtitle { font-size: 11px; color: var(--eb-text-3); margin-top: 1px; }
.list-element-info { text-align: right; flex-shrink: 0; }
.list-element-price { font-size: 13px; font-weight: 600; color: var(--eb-text); }
.list-element-meta { font-size: 10px; color: var(--eb-text-4); margin-top: 2px; }
.list-element-actions { display: flex; gap: 4px; flex-shrink: 0; }
.list-element--disabled { opacity: .5; pointer-events: none; }
.list-element--selected { background: var(--eb-green-50); }
.list-element--compact { padding: 8px var(--eb-space-3); }
.list-element--compact .list-element-image { width: 32px; height: 32px; }

/* ================================================================
   5.43  STATISTICS GRID
   ================================================================ */
.stat-grid {
  display: grid; gap: 1px; background: var(--eb-border-light);
  border: 1px solid var(--eb-border);
  border-radius: var(--eb-radius-lg); overflow: hidden;
}
.stat-grid--cols-2 { grid-template-columns: 1fr 1fr; }
.stat-grid--cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.stat-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }
.stat-grid-item { background: var(--eb-surface); padding: 16px; }
.stat-grid-title {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--eb-text-3); margin-bottom: 4px;
}
.stat-grid-value {
  font-size: 22px; font-weight: 700; color: var(--eb-text); line-height: 1;
}
.stat-grid-sub { font-size: 11px; color: var(--eb-text-4); margin-top: 4px; }
.stat-grid--compact .stat-grid-item { padding: 12px; }
.stat-grid--compact .stat-grid-value { font-size: 18px; }

/* ================================================================
   5.44  BUTTON GROUP
   ================================================================ */
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: var(--eb-radius) 0 0 var(--eb-radius); margin-left: 0; }
.btn-group .btn:last-child  { border-radius: 0 var(--eb-radius) var(--eb-radius) 0; }
.btn-group .btn:hover,
.btn-group .btn.active { z-index: 1; }

/* ================================================================
   5.45  NOTIFICATION BANNER
   ================================================================ */
.notif-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; border-radius: var(--eb-radius-lg);
  color: #fff; font-size: 13px; font-weight: 500;
  margin-bottom: var(--eb-space-4);
  animation: eb-slide-down .25s ease;
}
.notif-banner-content { flex: 1; }
.notif-banner-title { font-weight: 700; margin-bottom: 2px; }
.notif-banner-text { font-size: 12px; opacity: .9; }
.notif-banner-action { flex-shrink: 0; }
.notif-banner-close {
  background: none; border: none; color: inherit; cursor: pointer;
  opacity: .7; padding: 4px; font-size: 16px;
  transition: opacity .12s;
}
.notif-banner-close:hover { opacity: 1; }
.notif-banner--info    { background: linear-gradient(135deg, var(--eb-green-700), var(--eb-green-600)); }
.notif-banner--success { background: linear-gradient(135deg, #0a8a35, #16713B); }
.notif-banner--warning { background: linear-gradient(135deg, var(--eb-gold-600), var(--eb-gold-500)); }
.notif-banner--danger  { background: linear-gradient(135deg, #8B2020, #A32D2D); }

/* ================================================================
   5.46  RESPONSIVE VISIBILITY
   ================================================================ */
.eb-show-mobile  { display: none !important; }
.eb-show-tablet  { display: none !important; }
.eb-show-desktop { /* visible by default */ }
.eb-hide-mobile  { /* visible by default */ }
.eb-hide-tablet  { /* visible by default */ }
.eb-hide-desktop { display: none !important; }

/* ================================================================
   5.47  AVATAR
   ================================================================ */
/* Circular avatar with image or initials fallback */
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--eb-green-100); color: var(--eb-primary);
  font-size: 14px; font-weight: 700; text-transform: uppercase;
  border: 2px solid var(--eb-border-light);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar svg { width: 60%; height: 60%; color: var(--eb-primary); }

/* Sizes */
.avatar-xs  { width: 24px; height: 24px; font-size: 9px;  border-width: 1px; }
.avatar-sm  { width: 32px; height: 32px; font-size: 11px; border-width: 1px; }
.avatar-md  { width: 48px; height: 48px; font-size: 16px; }
.avatar-lg  { width: 64px; height: 64px; font-size: 22px; border-width: 3px; }
.avatar-xl  { width: 96px; height: 96px; font-size: 32px; border-width: 3px; }
.avatar-2xl { width: 128px; height: 128px; font-size: 42px; border-width: 4px; }

/* Shape variants */
.avatar-square { border-radius: var(--eb-radius-md); }

/* Status indicator on avatar */
.avatar-wrap { position: relative; display: inline-flex; }
.avatar-status {
  position: absolute; bottom: 0; right: 0;
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--eb-surface);
}
.avatar-status--online  { background: var(--eb-success-text); }
.avatar-status--offline { background: var(--eb-text-4); }
.avatar-status--busy    { background: var(--eb-danger-text); }
.avatar-status--away    { background: var(--eb-warning-text); }
.avatar-sm + .avatar-status,
.avatar-xs + .avatar-status { width: 8px; height: 8px; border-width: 1px; }
.avatar-lg + .avatar-status,
.avatar-xl + .avatar-status { width: 16px; height: 16px; border-width: 3px; }

/* Avatar group (stacked) */
.avatar-group { display: inline-flex; }
.avatar-group .avatar { margin-left: -8px; border: 2px solid var(--eb-surface); }
.avatar-group .avatar:first-child { margin-left: 0; }
.avatar-group .avatar:hover { z-index: 1; transform: translateY(-2px); }

/* Color variants for initials */
.avatar--green  { background: var(--eb-green-100);   color: var(--eb-green-700); }
.avatar--gold   { background: var(--eb-gold-100);    color: var(--eb-gold-700); }
.avatar--blue   { background: var(--eb-info-bg);     color: var(--eb-info-text); }
.avatar--red    { background: var(--eb-danger-bg);   color: var(--eb-danger-text); }
.avatar--purple { background: var(--eb-purple-bg);   color: var(--eb-purple-text); }
.avatar--gray   { background: var(--eb-surface-2);   color: var(--eb-text-3); }

/* ================================================================
   5.48  LOGO / BRAND
   ================================================================ */
/* Logo display — image or SVG with fallback */
.logo {
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.logo img, .logo svg { display: block; max-width: 100%; max-height: 100%; }

/* Predefined sizes */
.logo-xs { width: 24px; height: 24px; }
.logo-sm { width: 32px; height: 32px; }
.logo-md { width: 48px; height: 48px; }
.logo-lg { width: 64px; height: 64px; }
.logo-xl { width: 96px; height: 96px; }
.logo-full { width: auto; height: 40px; } /* Full logo with text */
.logo-full img, .logo-full svg { height: 100%; width: auto; }

/* Brand block — logo + text */
.brand {
  display: flex; align-items: center; gap: 10px;
}
.brand-name { font-size: 15px; font-weight: 700; color: var(--eb-text); letter-spacing: .04em; }
.brand-sub  { font-size: 10px; color: var(--eb-text-3); display: block; }

/* Brand block sizes */
.brand-sm .brand-name { font-size: 12px; }
.brand-sm .brand-sub  { font-size: 9px; }
.brand-lg .brand-name { font-size: 20px; }
.brand-lg .brand-sub  { font-size: 12px; }

/* ================================================================
   5.49  IMAGE CONTAINER
   ================================================================ */
/* Generic image wrapper with aspect ratio, border, loading */
.img-container {
  position: relative; overflow: hidden;
  background: var(--eb-surface-2);
  border: 1px solid var(--eb-border);
  border-radius: var(--eb-radius-md);
  display: flex; align-items: center; justify-content: center;
}
.img-container img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .2s ease;
}
.img-container svg {
  width: 100%; height: 100%; display: block;
}

/* Aspect ratios */
.img-1x1    { aspect-ratio: 1 / 1; }
.img-4x3    { aspect-ratio: 4 / 3; }
.img-16x9   { aspect-ratio: 16 / 9; }
.img-3x2    { aspect-ratio: 3 / 2; }
.img-free   { /* no fixed ratio, uses natural size */ }

/* Fixed sizes */
.img-thumb  { width: 48px; height: 48px; }
.img-sm     { width: 80px; height: 80px; }
.img-md     { width: 160px; height: 160px; }
.img-lg     { width: 280px; height: 280px; }
.img-full   { width: 100%; }

/* Variants */
.img-container--rounded { border-radius: var(--eb-radius-lg); }
.img-container--circle  { border-radius: 50%; }
.img-container--no-border { border: none; }
.img-container--zoomable:hover img { transform: scale(1.05); cursor: zoom-in; }

/* SVG display — preserves aspect and colors */
.img-container--svg { background: transparent; border: none; }
.img-container--svg svg { object-fit: contain; }

/* Placeholder when no image */
.img-placeholder {
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 6px;
  color: var(--eb-text-4); font-size: 11px;
  width: 100%; height: 100%;
}
.img-placeholder-icon { font-size: 24px; opacity: .4; }

/* ================================================================
   5.50  DOCUMENT THUMBNAIL / PREVIEW
   ================================================================ */
/* Thumbnails for documents, scans, certificates */
.doc-thumb {
  position: relative; overflow: hidden;
  width: 120px; height: 160px;
  background: var(--eb-surface); border: 1px solid var(--eb-border);
  border-radius: var(--eb-radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 6px;
  transition: border-color .15s, box-shadow .15s;
  cursor: pointer;
}
.doc-thumb:hover { border-color: var(--eb-green-300); box-shadow: var(--eb-shadow-sm); }
.doc-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  position: absolute; inset: 0;
}

/* Type icon overlay when showing image */
.doc-thumb-type {
  position: absolute; bottom: 6px; left: 6px;
  background: rgba(0,0,0,.6); color: #fff;
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  padding: 2px 6px; border-radius: 3px; letter-spacing: .04em;
}

/* Empty state (no image, just icon) */
.doc-thumb-icon { font-size: 28px; color: var(--eb-text-4); opacity: .5; }
.doc-thumb-label { font-size: 10px; color: var(--eb-text-3); text-align: center; max-width: 90%; }

/* Sizes */
.doc-thumb-sm { width: 80px; height: 106px; }
.doc-thumb-sm .doc-thumb-icon { font-size: 20px; }
.doc-thumb-sm .doc-thumb-label { font-size: 8px; }
.doc-thumb-lg { width: 180px; height: 240px; }

/* Status badge on thumb */
.doc-thumb-badge {
  position: absolute; top: 6px; right: 6px;
}

/* Document preview (full-width, scrollable) */
.doc-preview {
  background: var(--eb-surface); border: 1px solid var(--eb-border);
  border-radius: var(--eb-radius-lg); overflow: hidden;
}
.doc-preview-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px var(--eb-space-4); border-bottom: 1px solid var(--eb-border-light);
  background: var(--eb-surface-2);
}
.doc-preview-title { font-size: 12px; font-weight: 600; color: var(--eb-text); }
.doc-preview-actions { display: flex; gap: 4px; }
.doc-preview-body {
  padding: var(--eb-space-2);
  max-height: 500px; overflow: auto;
  display: flex; align-items: flex-start; justify-content: center;
}
.doc-preview-body img {
  max-width: 100%; height: auto; display: block;
}
.doc-preview-body svg {
  max-width: 100%; height: auto;
}
.doc-preview-body--pdf {
  background: #525659; padding: 0;
}
.doc-preview-body--pdf iframe,
.doc-preview-body--pdf embed,
.doc-preview-body--pdf object {
  width: 100%; height: 500px; border: none;
}

/* ================================================================
   5.51  IMAGE GALLERY
   ================================================================ */
/* Grid of images/documents with selection, reorder */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--eb-space-3);
}
.gallery-item {
  position: relative; overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--eb-surface-2); border: 2px solid var(--eb-border);
  border-radius: var(--eb-radius-md);
  cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.gallery-item:hover { border-color: var(--eb-green-300); box-shadow: var(--eb-shadow-sm); }
.gallery-item.selected { border-color: var(--eb-primary); box-shadow: 0 0 0 2px var(--eb-primary-ring); }
.gallery-item.main::after {
  content: '★'; position: absolute; top: 4px; left: 4px;
  background: var(--eb-accent); color: #fff;
  font-size: 9px; width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-item svg { width: 60%; height: 60%; margin: auto; color: var(--eb-text-4); }

/* Gallery overlay actions (shown on hover) */
.gallery-item-actions {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.4); opacity: 0;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: opacity .15s;
}
.gallery-item:hover .gallery-item-actions { opacity: 1; }
.gallery-item-action {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.9); border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--eb-text); font-size: 14px;
  transition: background .12s;
}
.gallery-item-action:hover { background: #fff; }

/* Gallery label */
.gallery-item-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.6));
  padding: 16px 8px 6px; color: #fff; font-size: 10px; font-weight: 500;
}

/* Gallery sizes */
.gallery--sm { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: var(--eb-space-2); }
.gallery--lg { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

/* Gallery add button */
.gallery-add {
  aspect-ratio: 1 / 1;
  border: 2px dashed var(--eb-border);
  border-radius: var(--eb-radius-md);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; cursor: pointer; color: var(--eb-text-4);
  font-size: 11px; transition: border-color .15s, color .15s;
}
.gallery-add:hover { border-color: var(--eb-primary); color: var(--eb-primary); }
.gallery-add-icon { font-size: 24px; }

/* ================================================================
   5.X  FORM AREA
   ================================================================ */
.form-area { max-width: 700px; }
.form-area-title {
  font-size: 16px; font-weight: 700; color: var(--eb-text);
  margin-bottom: var(--eb-space-1);
}
.form-area-subtitle {
  font-size: 12px; color: var(--eb-text-3); margin-bottom: var(--eb-space-5);
}
.form-area-content {
  background: var(--eb-surface); border: 1px solid var(--eb-border);
  border-radius: var(--eb-radius-lg); padding: var(--eb-space-5);
}

/* ================================================================
   5.X  RANGE SLIDER
   ================================================================ */
.range-wrap { position: relative; padding-top: 20px; }
.range-tooltip {
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  background: var(--eb-primary); color: #fff;
  padding: 2px 8px; border-radius: var(--eb-radius-sm);
  font-size: 11px; font-weight: 600; white-space: nowrap;
  pointer-events: none;
}
.range-tooltip::after {
  content: ''; position: absolute; bottom: -4px; left: 50%;
  transform: translateX(-50%);
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 4px solid var(--eb-primary);
}
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px;
  background: var(--eb-surface-2); border-radius: 3px;
  outline: none; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--eb-primary); border: 2px solid #fff;
  box-shadow: var(--eb-shadow-sm); cursor: pointer;
  transition: transform .12s;
}
input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--eb-primary); border: 2px solid #fff;
  box-shadow: var(--eb-shadow-sm); cursor: pointer;
  transition: transform .12s;
}
input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.15);
}
input[type="range"]:focus::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px var(--eb-primary-ring);
}
input[type="range"]:focus::-moz-range-thumb {
  box-shadow: 0 0 0 3px var(--eb-primary-ring);
}

/* ================================================================
   5.X  EXPANDABLE AREA
   ================================================================ */
.expandable {
  overflow: hidden; max-height: 0;
  transition: max-height .3s ease;
}
.expandable.open { max-height: 2000px; }

/* ================================================================
   6. UTILITIES
   ================================================================ */

/* Display */
.eb-hidden     { display: none !important; }
.eb-block      { display: block; }
.eb-inline-flex { display: inline-flex; }

/* Text alignment */
.eb-text-left   { text-align: left; }
.eb-text-center { text-align: center; }
.eb-text-right  { text-align: right; }

/* Font weight */
.eb-font-medium { font-weight: 500; }
.eb-font-bold   { font-weight: 700; }

/* Spacing */
.eb-mt-1 { margin-top: var(--eb-space-1); }
.eb-mt-2 { margin-top: var(--eb-space-2); }
.eb-mt-3 { margin-top: var(--eb-space-3); }
.eb-mt-4 { margin-top: var(--eb-space-4); }
.eb-mt-6 { margin-top: var(--eb-space-6); }
.eb-mb-1 { margin-bottom: var(--eb-space-1); }
.eb-mb-2 { margin-bottom: var(--eb-space-2); }
.eb-mb-3 { margin-bottom: var(--eb-space-3); }
.eb-mb-4 { margin-bottom: var(--eb-space-4); }
.eb-mb-6 { margin-bottom: var(--eb-space-6); }
.eb-ml-auto { margin-left: auto; }
.eb-mr-auto { margin-right: auto; }
.eb-mx-auto { margin-left: auto; margin-right: auto; }

.eb-p-0 { padding: 0; }
.eb-p-2 { padding: var(--eb-space-2); }
.eb-p-3 { padding: var(--eb-space-3); }
.eb-p-4 { padding: var(--eb-space-4); }
.eb-p-6 { padding: var(--eb-space-6); }

/* Cursor */
.eb-cursor-pointer { cursor: pointer; }

/* Border radius */
.eb-rounded-sm   { border-radius: var(--eb-radius-sm); }
.eb-rounded      { border-radius: var(--eb-radius); }
.eb-rounded-md   { border-radius: var(--eb-radius-md); }
.eb-rounded-lg   { border-radius: var(--eb-radius-lg); }
.eb-rounded-full { border-radius: 9999px; }

/* Overflow */
.eb-overflow-auto   { overflow: auto; }
.eb-overflow-x-auto { overflow-x: auto; }
.eb-overflow-hidden { overflow: hidden; }

/* Width */
.eb-w-full { width: 100%; }
.eb-min-w-0 { min-width: 0; }

/* Position */
.eb-relative { position: relative; }
.eb-absolute { position: absolute; }

/* ─── Text colors ─── */
.eb-text-primary { color: var(--eb-primary); }
.eb-text-accent  { color: var(--eb-accent); }
.eb-text-success { color: var(--eb-success-text); }
.eb-text-warning { color: var(--eb-warning-text); }
.eb-text-danger  { color: var(--eb-danger-text); }
.eb-text-info    { color: var(--eb-info-text); }
.eb-text-white   { color: #fff; }

/* ─── Background colors ─── */
.eb-bg-primary   { background: var(--eb-primary); }
.eb-bg-accent    { background: var(--eb-accent); }
.eb-bg-success   { background: var(--eb-success-bg); }
.eb-bg-warning   { background: var(--eb-warning-bg); }
.eb-bg-danger    { background: var(--eb-danger-bg); }
.eb-bg-info      { background: var(--eb-info-bg); }
.eb-bg-surface   { background: var(--eb-surface); }
.eb-bg-surface-2 { background: var(--eb-surface-2); }
.eb-bg-transparent { background: transparent; }

/* ─── Additional spacing ─── */
.eb-p-1  { padding: var(--eb-space-1); }
.eb-p-5  { padding: var(--eb-space-5); }
.eb-p-8  { padding: var(--eb-space-8); }
.eb-px-2 { padding-left: var(--eb-space-2); padding-right: var(--eb-space-2); }
.eb-px-3 { padding-left: var(--eb-space-3); padding-right: var(--eb-space-3); }
.eb-px-4 { padding-left: var(--eb-space-4); padding-right: var(--eb-space-4); }
.eb-px-6 { padding-left: var(--eb-space-6); padding-right: var(--eb-space-6); }
.eb-py-1 { padding-top: var(--eb-space-1); padding-bottom: var(--eb-space-1); }
.eb-py-2 { padding-top: var(--eb-space-2); padding-bottom: var(--eb-space-2); }
.eb-py-3 { padding-top: var(--eb-space-3); padding-bottom: var(--eb-space-3); }
.eb-py-4 { padding-top: var(--eb-space-4); padding-bottom: var(--eb-space-4); }
.eb-py-6 { padding-top: var(--eb-space-6); padding-bottom: var(--eb-space-6); }
.eb-py-8 { padding-top: var(--eb-space-8); padding-bottom: var(--eb-space-8); }
.eb-mb-0 { margin-bottom: 0; }
.eb-mb-5 { margin-bottom: var(--eb-space-5); }
.eb-mb-8 { margin-bottom: var(--eb-space-8); }
.eb-mt-0 { margin-top: 0; }
.eb-mt-5 { margin-top: var(--eb-space-5); }
.eb-mt-8 { margin-top: var(--eb-space-8); }

/* ─── Width/Height ─── */
.eb-w-auto   { width: auto; }
.eb-h-full   { height: 100%; }
.eb-max-w-sm { max-width: 400px; }
.eb-max-w-md { max-width: 600px; }
.eb-max-w-lg { max-width: 800px; }
.eb-max-w-xl { max-width: 1000px; }

/* ─── Flex shrink/grow ─── */
.eb-shrink-0    { flex-shrink: 0; }
.eb-grow-0      { flex-grow: 0; }
.eb-grow-1      { flex-grow: 1; }
.eb-self-center { align-self: center; }
.eb-self-start  { align-self: flex-start; }
.eb-self-end    { align-self: flex-end; }

/* ─── Grid extensions ─── */
.eb-grid-5    { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--eb-space-4); }
.eb-grid-6    { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--eb-space-4); }
.eb-col-span-2 { grid-column: span 2; }
.eb-col-span-3 { grid-column: span 3; }
.eb-col-full   { grid-column: 1 / -1; }

/* ─── Borders ─── */
.eb-border       { border: 1px solid var(--eb-border); }
.eb-border-b     { border-bottom: 1px solid var(--eb-border); }
.eb-border-t     { border-top: 1px solid var(--eb-border); }
.eb-border-light { border: 1px solid var(--eb-border-light); }
.eb-border-none  { border: none; }

/* ─── Shadows ─── */
.eb-shadow-sm { box-shadow: var(--eb-shadow-sm); }
.eb-shadow-md { box-shadow: var(--eb-shadow-md); }
.eb-shadow-lg { box-shadow: var(--eb-shadow-lg); }
.eb-shadow-none { box-shadow: none; }

/* ─── Opacity ─── */
.eb-opacity-40 { opacity: 0.4; }
.eb-opacity-50 { opacity: 0.5; }
.eb-opacity-60 { opacity: 0.6; }
.eb-opacity-70 { opacity: 0.7; }
.eb-opacity-80 { opacity: 0.8; }

/* ─── Pointer/select ─── */
.eb-select-none    { user-select: none; }
.eb-pointer-none   { pointer-events: none; }
.eb-cursor-default { cursor: default; }

/* ─── Line height ─── */
.eb-leading-tight  { line-height: 1.2; }
.eb-leading-normal { line-height: 1.5; }
.eb-leading-loose  { line-height: 1.8; }

/* ─── Font weight ─── */
.eb-font-normal    { font-weight: 400; }
.eb-font-semibold  { font-weight: 600; }

/* ─── Whitespace ─── */
.eb-break-all  { word-break: break-all; }
.eb-break-word { overflow-wrap: break-word; }

/* ─── Spinner ─── */
.eb-spinner {
  width: 24px; height: 24px;
  border: 3px solid var(--eb-border);
  border-top-color: var(--eb-primary);
  border-radius: 50%;
}
.eb-spinner-sm {
  width: 20px; height: 20px;
  border: 2px solid var(--eb-border);
  border-top-color: var(--eb-primary);
  border-radius: 50%;
}

/* ─── Icon inline ─── */
.eb-icon-inline {
  display: inline;
  vertical-align: middle;
  margin-right: 6px;
}
.eb-icon-inline-sm {
  display: inline;
  vertical-align: middle;
  margin-right: 4px;
}
.eb-flex-shrink-0 { flex-shrink: 0; }
.eb-ml-auto { margin-left: auto; }

/* ─── Additional typography sizes ─── */
.eb-text-2xs { font-size: 9px; }
.eb-text-3xs { font-size: 8px; }
.eb-text-sm2 { font-size: 12px; }

/* ─── Additional margins ─── */
.eb-ml-1 { margin-left: var(--eb-space-1); }
.eb-ml-2 { margin-left: var(--eb-space-2); }
.eb-ml-3 { margin-left: var(--eb-space-3); }
.eb-mr-1 { margin-right: var(--eb-space-1); }
.eb-mr-2 { margin-right: var(--eb-space-2); }
.eb-mb-px2 { margin-bottom: 2px; }

/* ─── Additional flex ─── */
.eb-flex-2 { flex: 2; }
.eb-inline { display: inline; }

/* ─── Overflow ─── */
.eb-overflow-y-auto { overflow-y: auto; }

/* ─── White-space ─── */
.eb-pre-line { white-space: pre-line; }

/* ─── Height ─── */
.eb-h-screen { height: 100vh; }

/* ─── Vertical separator ─── */
.eb-vsep {
  width: 1px;
  height: 14px;
  background: var(--eb-border);
  flex-shrink: 0;
}
.eb-vsep-lg { height: 18px; }
.eb-vsep-sm { height: 10px; }

/* ─── Field group ─── */
.eb-field { flex: 1; margin-bottom: 0; }

/* ─── Scroll panel ─── */
.eb-scroll-panel {
  max-height: 600px;
  overflow-y: auto;
}
.eb-scroll-panel-sm { max-height: 300px; }
.eb-scroll-panel-xs { max-height: 200px; }

/* ─── Workbench toolbar button ─── */

/* ─── Color additions ─── */
.eb-text-purple { color: var(--eb-purple-text, #7C3AED); }
.eb-bg-border { background: var(--eb-border); }

/* ─── Syntax highlight colors ─── */

/* ================================================================
   7. ANIMATIONS
   ================================================================ */
@keyframes eb-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes eb-fade-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}
@keyframes eb-slide-up {
  from { transform: translateY(14px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
@keyframes eb-slide-out {
  from { transform: translateY(0); opacity: 1; }
  to   { transform: translateY(-14px); opacity: 0; }
}
@keyframes eb-slide-down {
  from { transform: translateY(-10px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
@keyframes eb-spin {
  to { transform: rotate(360deg); }
}
@keyframes eb-zoom {
  from { transform: scale(.85); }
  to   { transform: scale(1); }
}
@keyframes eb-skeleton {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes eb-pulse-red {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,.4); }
  50%      { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
}
@keyframes eb-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

.eb-animate-spin   { animation: eb-spin 1s linear infinite; }
.eb-animate-pulse  { animation: eb-pulse-red 2s ease-in-out infinite; }
.eb-animate-bounce { animation: eb-bounce 1.2s ease-in-out infinite; }

/* ================================================================
   8. DARK THEME
   ================================================================ */
[data-theme="dark"] {
  /* Surfaces */
  --eb-bg:           #0F1A0F;
  --eb-surface:      #1A2E1A;
  --eb-surface-2:    #203520;
  --eb-border:       #2D4A2D;
  --eb-border-light: #243A24;

  /* Text */
  --eb-text:   #E8F5E8;
  --eb-text-2: #B8D4B8;
  --eb-text-3: #7A9E7A;
  --eb-text-4: #4D6A4D;

  /* Primary */
  --eb-primary:        #4CAF4C;
  --eb-primary-hover:  #3D8A3D;
  --eb-primary-active: #2B6E2B;
  --eb-primary-text:   #ffffff;
  --eb-primary-ring:   rgba(76,175,76,.22);

  /* Accent */
  --eb-accent:       #D4B870;
  --eb-accent-hover: #C9A84C;

  /* Gold (dark adjustments) */
  --eb-gold-100: #2E2510;
  --eb-gold-50:  #241E0D;
  --eb-gold-700: #D4B870;

  /* Status */
  --eb-success-bg:   #0D3020; --eb-success-text: #6BCF8E;
  --eb-warning-bg:   #2E1E08; --eb-warning-text: #D4B870;
  --eb-danger-bg:    #2E0D0D; --eb-danger-text:  #E87878;
  --eb-info-bg:      #0D1E30; --eb-info-text:    #78AEDE;
  --eb-purple-bg:    #1A0D35; --eb-purple-text:  #A888E8;

  /* Sidebar */
  --eb-sidebar-bg:          #0F1A0F;
  --eb-sidebar-border:      #1E3020;
  --eb-sidebar-text:        #7A9E7A;
  --eb-sidebar-text-hover:  #E8F5E8;
  --eb-sidebar-hover-bg:    #1A2E1A;
  --eb-sidebar-active-bg:   #1E3820;
  --eb-sidebar-active-text: #4CAF4C;
  --eb-sidebar-section:     #4D6A4D;

  /* Tables */
  --eb-th-bg:     #1A2E1A;
  --eb-th-text:   #4D6A4D;
  --eb-tr-hover:  #1E3020;
  --eb-td-border: #243A24;

  /* Forms */
  --eb-input-bg:          #1A2E1A;
  --eb-input-border:      #2D4A2D;
  --eb-input-text:        #E8F5E8;
  --eb-input-placeholder: #4D6A4D;
  --eb-input-focus-ring:  rgba(76,175,76,.18);

  /* Shadows */
  --eb-shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
  --eb-shadow-md: 0 4px 12px rgba(0,0,0,0.3);
  --eb-shadow-lg: 0 8px 24px rgba(0,0,0,0.4);
}

/* Dark theme overrides for specific components */
[data-theme="dark"] .locked-overlay::after {
  background: rgba(15,26,15,.72);
}

[data-theme="dark"] .btn-secondary.btn-loading::after,
[data-theme="dark"] .btn-ghost.btn-loading::after {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' height='100' width='100' viewBox='0 0 100 100' fill='none' stroke-width='7'%3E%3Ccircle cx='50' cy='50' r='44' stroke-linecap='round' stroke-dasharray='207 69' stroke='%234CAF4C'/%3E%3C/svg%3E");
}

[data-theme="dark"] .modal-overlay {
  background: rgba(0,0,0,.6);
}

[data-theme="dark"] .toast-success { border-color: #1A4D2A; }
[data-theme="dark"] .toast-error   { border-color: #4D1A1A; }
[data-theme="dark"] .toast-warning { border-color: #4D3A1A; }
[data-theme="dark"] .toast-info    { border-color: #1A2E4D; }

[data-theme="dark"] .spec-sheet-header { background: #1A2E1A; }
[data-theme="dark"] .public-card { box-shadow: 0 4px 20px rgba(0,0,0,.4); }

[data-theme="dark"] .form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237A9E7A' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

[data-theme="dark"] .otp-input {
  border-color: var(--eb-border);
}

[data-theme="dark"] .chat-message.other .chat-bubble {
  background: var(--eb-surface-2);
  border-color: var(--eb-border);
}

[data-theme="dark"] .entity-card-avatar {
  background: #1E3820;
}

[data-theme="dark"] .verification-badges .dot {
  background: var(--eb-border);
}

/* Dark overrides for 5.33+ components */
[data-theme="dark"] .input-addon-prefix,
[data-theme="dark"] .input-addon-suffix {
  background: var(--eb-surface-2);
  border-color: var(--eb-input-border);
  color: var(--eb-text-3);
}

[data-theme="dark"] .feature-card-icon {
  background: #1E3820;
}

[data-theme="dark"] .cta-block {
  background: #1E3820; border-color: #2D4A2D;
}
[data-theme="dark"] .cta-block--gold {
  background: #2E2510; border-color: #4D3A1A;
}

/* Dark: avatar */
[data-theme="dark"] .avatar { background: #1E3820; color: var(--eb-primary); border-color: var(--eb-border); }
[data-theme="dark"] .avatar-status { border-color: var(--eb-surface); }
[data-theme="dark"] .avatar-group .avatar { border-color: var(--eb-surface); }

/* ═══════════════════════════════════════════════════════════════════════
   ENTERPRISE THEME
   Professional corporate look — neutral grays, subtle green accent,
   sharper borders, more contrast.
   ═══════════════════════════════════════════════════════════════════════ */

[data-theme="enterprise"] {
  /* Surfaces — cool neutral grays */
  --eb-bg:           #F3F4F6;
  --eb-surface:      #FFFFFF;
  --eb-surface-2:    #F9FAFB;
  --eb-border:       #D1D5DB;
  --eb-border-light: #E5E7EB;

  /* Text — darker for sharper contrast */
  --eb-text:   #111827;
  --eb-text-2: #374151;
  --eb-text-3: #6B7280;
  --eb-text-4: #9CA3AF;

  /* Primary — muted corporate green */
  --eb-primary:        #15803D;
  --eb-primary-hover:  #166534;
  --eb-primary-active: #14532D;
  --eb-primary-text:   #FFFFFF;
  --eb-primary-ring:   rgba(21,128,61,.15);

  /* Accent — refined gold */
  --eb-accent:       #B8860B;
  --eb-accent-hover: #996F00;

  /* Green palette adjustments */
  --eb-green-50:  #F0FDF4;
  --eb-green-100: #DCFCE7;
  --eb-green-200: #BBF7D0;
  --eb-green-400: #4ADE80;
  --eb-green-600: #15803D;

  /* Gold palette adjustments */
  --eb-gold-50:  #FFFBEB;
  --eb-gold-100: #FEF3C7;
  --eb-gold-700: #B8860B;

  /* Status — professional tones */
  --eb-success-bg:   #F0FDF4; --eb-success-text: #15803D;
  --eb-warning-bg:   #FFFBEB; --eb-warning-text: #92400E;
  --eb-danger-bg:    #FEF2F2; --eb-danger-text:  #991B1B;
  --eb-info-bg:      #EFF6FF; --eb-info-text:    #1E40AF;
  --eb-purple-bg:    #F5F3FF; --eb-purple-text:  #6D28D9;

  /* Sidebar — clean corporate */
  --eb-sidebar-bg:          #FFFFFF;
  --eb-sidebar-border:      #E5E7EB;
  --eb-sidebar-text:        #374151;
  --eb-sidebar-text-hover:  #111827;
  --eb-sidebar-hover-bg:    #F9FAFB;
  --eb-sidebar-active-bg:   #F0FDF4;
  --eb-sidebar-active-text: #15803D;
  --eb-sidebar-section:     #9CA3AF;

  /* Tables — crisp lines */
  --eb-th-bg:     #F9FAFB;
  --eb-th-text:   #6B7280;
  --eb-tr-hover:  #F9FAFB;
  --eb-td-border: #E5E7EB;

  /* Forms — clean corporate */
  --eb-input-bg:          #FFFFFF;
  --eb-input-border:      #D1D5DB;
  --eb-input-text:        #111827;
  --eb-input-placeholder: #9CA3AF;
  --eb-input-focus-ring:  rgba(21,128,61,.12);

  /* Shadows — sharper */
  --eb-shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --eb-shadow-md: 0 4px 6px rgba(0,0,0,0.07);
  --eb-shadow-lg: 0 10px 15px rgba(0,0,0,0.1);

  /* Font — slightly more formal */
  --eb-font: 'Inter', 'DM Sans', system-ui, -apple-system, sans-serif;
}

/* Enterprise component overrides */
[data-theme="enterprise"] .card {
  border-radius: var(--eb-radius);
  box-shadow: var(--eb-shadow-sm);
}
[data-theme="enterprise"] .modal {
  border-radius: var(--eb-radius-md);
}
[data-theme="enterprise"] .btn {
  border-radius: var(--eb-radius-sm);
}
[data-theme="enterprise"] .form-input,
[data-theme="enterprise"] .form-select,
[data-theme="enterprise"] .form-textarea {
  border-radius: var(--eb-radius-sm);
}
[data-theme="enterprise"] .sidebar-logo {
  background: linear-gradient(135deg, #15803D, #166534);
}
[data-theme="enterprise"] .tag {
  border-radius: var(--eb-radius-sm);
}
[data-theme="enterprise"] .public-card {
  box-shadow: var(--eb-shadow-md);
}
[data-theme="enterprise"] .avatar {
  background: #F0FDF4; color: #15803D;
}
[data-theme="enterprise"] .form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Dark: image containers */
[data-theme="dark"] .img-container { background: var(--eb-surface-2); border-color: var(--eb-border); }
[data-theme="dark"] .img-placeholder { color: var(--eb-text-4); }

/* Dark: doc thumbnails */
[data-theme="dark"] .doc-thumb { background: var(--eb-surface); border-color: var(--eb-border); }
[data-theme="dark"] .doc-preview { border-color: var(--eb-border); }
[data-theme="dark"] .doc-preview-header { background: var(--eb-surface-2); border-color: var(--eb-border); }

/* Dark: gallery */
[data-theme="dark"] .gallery-item { background: var(--eb-surface-2); border-color: var(--eb-border); }
[data-theme="dark"] .gallery-add { border-color: var(--eb-border); color: var(--eb-text-4); }

[data-theme="dark"] .skeleton {
  background: linear-gradient(90deg, var(--eb-surface-2) 25%, var(--eb-border) 50%, var(--eb-surface-2) 75%);
  background-size: 200% 100%;
}

[data-theme="dark"] .list-element--selected {
  background: #1E3820;
}

[data-theme="dark"] .stat-grid {
  background: var(--eb-border);
}

[data-theme="dark"] .notif-banner--info {
  background: linear-gradient(135deg, #1A3E1A, #1E5A1E);
}
[data-theme="dark"] .notif-banner--success {
  background: linear-gradient(135deg, #0D3020, #16713B);
}
[data-theme="dark"] .notif-banner--warning {
  background: linear-gradient(135deg, #4D3A1A, #8B5E0A);
}
[data-theme="dark"] .notif-banner--danger {
  background: linear-gradient(135deg, #4D1A1A, #8B2020);
}

[data-theme="dark"] .range-tooltip {
  background: var(--eb-primary);
}
[data-theme="dark"] .range-tooltip::after {
  border-top-color: var(--eb-primary);
}
[data-theme="dark"] input[type="range"] {
  background: var(--eb-surface-2);
}
[data-theme="dark"] input[type="range"]::-webkit-slider-thumb {
  border-color: var(--eb-surface);
}
[data-theme="dark"] input[type="range"]::-moz-range-thumb {
  border-color: var(--eb-surface);
}

[data-theme="dark"] .titled-list--ordered .titled-list-item::before {
  background: var(--eb-primary);
}

/* ================================================================
   9. RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
  :root { --eb-sidebar-width: 220px; }

  .pipeline { gap: 0; }
  .pipeline-label { font-size: 9px; }

  .wizard-step-number { width: 28px; height: 28px; font-size: 11px; }
  .wizard-step::after { top: 13px; left: calc(50% + 14px); right: calc(-50% + 14px); }

  /* Board layout */
  .board-layout-sidebar { width: 280px; }

  /* Stat grid */
  .stat-grid--cols-4 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  /* Gallery responsive */
  .gallery { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
  .gallery--lg { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .doc-thumb { width: 100px; height: 133px; }
  .doc-thumb-lg { width: 140px; height: 186px; }
  .avatar-xl { width: 64px; height: 64px; font-size: 22px; }
  .avatar-2xl { width: 80px; height: 80px; font-size: 28px; }

  .sidebar { display: none; }
  .eb-main { margin-left: 0; }
  .eb-content { padding: var(--eb-space-4); }

  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .eb-grid-3, .eb-grid-4, .eb-grid-5 { grid-template-columns: 1fr 1fr; }

  .modal { padding: var(--eb-space-4); border-radius: var(--eb-radius-lg); }
  .modal-lg, .modal-xl { max-width: 100%; }

  .toast { left: var(--eb-space-4); right: var(--eb-space-4); max-width: unset; }

  .page-header { flex-direction: column; }
  .page-actions { width: 100%; }

  /* Chat responsive */
  .chat-layout { flex-direction: column; height: auto; min-height: 400px; }
  .chat-sidebar { width: 100%; min-width: 100%; border-right: none; border-bottom: 1px solid var(--eb-border-light); max-height: 200px; }

  /* Pipeline stacks */
  .pipeline { flex-direction: column; align-items: flex-start; gap: var(--eb-space-2); }
  .pipeline-step { flex-direction: row; text-align: left; }
  .pipeline-step::after { display: none; }

  /* Wizard stacks */
  .wizard-steps { flex-direction: column; gap: var(--eb-space-2); align-items: flex-start; }
  .wizard-step { flex-direction: row; gap: var(--eb-space-2); }
  .wizard-step::after { display: none; }
  .wizard-step-number { margin-bottom: 0; }

  /* Public page */
  .public-card { padding: var(--eb-space-5); }

  /* Spec sheet */
  .spec-sheet-table { font-size: 11px; }

  /* Promo row stacks */
  .promo-row { flex-direction: column; }
  .promo-row-image { max-width: 100%; }

  /* Board layout stacks */
  .board-layout { flex-direction: column; }
  .board-layout-sidebar { width: 100%; }
  .board-layout--sidebar-left { flex-direction: column; }

  /* Feature card stacks */
  .feature-card { flex-direction: column; }
  .feature-card-picture { max-width: 100%; }

  /* Stat grid adjusts */
  .stat-grid--cols-3,
  .stat-grid--cols-4 { grid-template-columns: 1fr 1fr; }

  /* Notif banner stacks */
  .notif-banner { flex-direction: column; text-align: center; gap: 8px; }
  .notif-banner-action { align-self: stretch; }

  /* CTA block stacks */
  .cta-block { flex-direction: column; text-align: center; }
  .cta-block-action { align-self: stretch; }

  /* Status block stacks */
  .status-block { flex-wrap: wrap; }

  /* Responsive visibility */
  .eb-show-mobile  { display: block !important; }
  .eb-hide-mobile  { display: none !important; }
  .eb-show-desktop { display: none !important; }
  .eb-hide-desktop { display: block !important; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .eb-show-tablet { display: block !important; }
  .eb-hide-tablet { display: none !important; }
}

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

  .kpi-value { font-size: 22px; }

  .otp-input { width: 40px; height: 48px; font-size: 20px; }

  .tab-bar { width: 100%; overflow-x: auto; }

  .filter-bar { gap: var(--eb-space-1); }
  .filter-btn { padding: 3px 8px; font-size: 10px; }

  .btn-lg { padding: 9px var(--eb-space-4); font-size: 13px; }
  .btn-block { padding-left: var(--eb-space-2); padding-right: var(--eb-space-2); }

  .public-card { padding: var(--eb-space-4); margin: 0 var(--eb-space-2); }
  .public-logo { width: 40px; height: 40px; }

  /* Stat grid single column */
  .stat-grid--cols-2,
  .stat-grid--cols-3,
  .stat-grid--cols-4 { grid-template-columns: 1fr; }

  /* List element compact on small */
  .list-element { padding: 8px var(--eb-space-3); }
  .list-element-image { width: 32px; height: 32px; }

  /* Btn group wraps */
  .btn-group { flex-wrap: wrap; }
}

/* ================================================================
   SECTION 11: DOCUMENT COMPONENTS (for PDF generation)
   Reusable blocks for contractual/trade documents
   ================================================================ */

/* 11.01 Document page setup */
.doc-page {
  font-family: 'Garamond', 'Times New Roman', serif;
  font-size: 11pt;
  color: #1B2A4A;
  line-height: 1.5;
  max-width: 210mm;
  margin: 0 auto;
}
.doc-page--seller { --doc-accent: #A0872C; }
.doc-page--buyer  { --doc-accent: #2B5EA7; }

/* 11.02 Document title block */
.doc-title {
  text-align: center;
  margin-bottom: 20px;
}
.doc-title-main {
  font-size: 22pt;
  font-weight: 700;
  color: #1B2A4A;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0;
}
.doc-title-sub {
  font-size: 12pt;
  font-style: italic;
  color: #666;
  margin: 4px 0 0;
}

/* 11.03 Document reference header (top-right of each page) */
.doc-ref-header {
  text-align: right;
  font-size: 10pt;
  font-style: italic;
  color: var(--doc-accent, #A0872C);
  margin-bottom: 16px;
}

/* 11.04 Section header (colored bar with white text) */
.doc-section {
  background: #1B2A4A;
  color: #fff;
  padding: 6px 12px;
  font-size: 10pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 20px 0 10px;
  border-radius: 2px;
}
.doc-section--accent {
  background: var(--doc-accent, #A0872C);
}

/* 11.05 Key-Value table (2 columns: label + value) */
.doc-kv {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
  font-size: 10pt;
}
.doc-kv td {
  padding: 5px 10px;
  border: 0.5px solid #ccc;
  vertical-align: top;
}
.doc-kv-label {
  width: 35%;
  font-weight: 700;
  color: #1B2A4A;
  background: #F5F0E8;
}
.doc-kv-value {
  background: #FEFCF8;
}

/* 11.06 Signature block */
.doc-signature {
  margin-top: 40px;
  min-width: 280px;
  display: inline-block;
  vertical-align: top;
}
.doc-signature-title {
  font-size: 10pt;
  font-weight: 700;
  color: #1B2A4A;
  margin-bottom: 30px;
}
.doc-signature-line {
  border-top: 1px solid #1B2A4A;
  padding-top: 6px;
  margin-bottom: 4px;
}
.doc-signature-name {
  font-size: 10pt;
  font-weight: 700;
}
.doc-signature-role {
  font-size: 9pt;
  color: #666;
  font-style: italic;
}
.doc-signature-date {
  font-size: 9pt;
  color: #999;
  margin-top: 4px;
}

/* 11.07 Dual signature (two side by side) */
.doc-signatures-dual {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin-top: 40px;
}
.doc-signatures-dual .doc-signature {
  flex: 1;
  margin-top: 0;
}

/* 11.08 Clause block (numbered legal clause) */
.doc-clause {
  margin-bottom: 12px;
  text-align: justify;
}
.doc-clause-number {
  font-weight: 700;
  color: #1B2A4A;
  margin-right: 6px;
}
.doc-clause-title {
  font-weight: 700;
  color: #1B2A4A;
  text-transform: uppercase;
  font-size: 10pt;
}
.doc-clause-text {
  font-size: 10pt;
  margin-top: 4px;
  line-height: 1.6;
}

/* 11.09 Disclaimer / notice block */
.doc-disclaimer {
  border-left: 3px solid var(--doc-accent, #A0872C);
  padding: 10px 14px;
  margin: 16px 0;
  background: #FEFCF8;
}
.doc-disclaimer-label {
  font-size: 9pt;
  font-weight: 700;
  color: var(--doc-accent, #A0872C);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.doc-disclaimer-text {
  font-size: 9pt;
  font-style: italic;
  color: #666;
  line-height: 1.5;
}

/* 11.10 Confidentiality footer */
.doc-footer-conf {
  text-align: center;
  font-size: 8pt;
  font-weight: 700;
  color: var(--doc-accent, #A0872C);
  margin-top: 40px;
  padding-top: 10px;
  border-top: 0.5px solid #ccc;
}

/* 11.11 Document watermark (diagonal repeated text) */
.doc-watermark {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  transform: rotate(-45deg);
  pointer-events: none;
  z-index: 0;
  opacity: 0.04;
  font-size: 14px;
  font-weight: 700;
  color: #1B2A4A;
  line-height: 80px;
  letter-spacing: 2px;
  overflow: hidden;
}

/* 11.12 Document page footer (page number etc) */
.doc-page-footer {
  position: fixed;
  bottom: 10mm;
  left: 15mm;
  right: 15mm;
  font-size: 8pt;
  color: #999;
  display: flex;
  justify-content: space-between;
}

/* 11.13 Party block (entity info as card) */
.doc-party {
  border: 0.5px solid #ccc;
  border-radius: 4px;
  padding: 12px;
  margin-bottom: 12px;
  background: #FEFCF8;
}
.doc-party-name {
  font-size: 12pt;
  font-weight: 700;
  color: #1B2A4A;
  margin-bottom: 6px;
}
.doc-party-detail {
  font-size: 9pt;
  color: #444;
  line-height: 1.6;
}

/* 11.14 Commercial terms table */
.doc-terms {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 10pt;
}
.doc-terms th {
  background: #1B2A4A;
  color: #fff;
  padding: 6px 10px;
  text-align: left;
  font-size: 9pt;
  text-transform: uppercase;
}
.doc-terms td {
  padding: 5px 10px;
  border-bottom: 0.5px solid #ddd;
}
.doc-terms tr:nth-child(even) td {
  background: #FAFAF5;
}

/* 11.15 Buyer-side marker */
.doc-buyer-marker {
  text-align: center;
  font-size: 9pt;
  font-style: italic;
  color: #2B5EA7;
  margin-bottom: 16px;
  padding: 6px;
  border: 1px dashed #2B5EA7;
  border-radius: 4px;
}

/* 11.16 Execution page */
.doc-execution {
  text-align: center;
  margin-top: 40px;
}
.doc-execution-title {
  font-size: 14pt;
  font-weight: 700;
  color: #1B2A4A;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.doc-execution-text {
  font-size: 10pt;
  font-style: italic;
  color: #444;
  max-width: 500px;
  margin: 0 auto 30px;
  line-height: 1.6;
}

/* 11.17 Commodity checkbox grid */
.doc-commodity-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px 16px;
  font-size: 10pt;
  margin-bottom: 12px;
}
.doc-commodity-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.doc-commodity-check {
  width: 12px;
  height: 12px;
  border: 1px solid #1B2A4A;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
}
.doc-commodity-check--checked {
  background: #1B2A4A;
  color: #fff;
}

/* 11.18 Document header with logo */
.doc-header-logo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #1B2A4A;
}
.doc-header-logo img {
  height: 50px;
  width: auto;
}
.doc-header-logo-info {
  text-align: right;
  font-size: 9pt;
  color: #666;
}

/* 11.19 Document QR verification block */
.doc-qr-block {
  text-align: center;
  margin-top: 20px;
  padding: 12px;
  border: 1px dashed #ccc;
  border-radius: 6px;
}
.doc-qr-block img {
  width: 80px;
  height: 80px;
  margin-bottom: 6px;
}
.doc-qr-block-text {
  font-size: 8pt;
  color: #999;
}
.doc-qr-block-url {
  font-size: 7pt;
  color: #999;
  font-family: monospace;
}

/* 11.20 Document spacer */
.doc-spacer     { height: 10px; }
.doc-spacer-sm  { height: 5px; }
.doc-spacer-md  { height: 20px; }
.doc-spacer-lg  { height: 40px; }
.doc-spacer-xl  { height: 60px; }

/* 11.21 Page break */
.doc-page-break {
  page-break-after: always;
  break-after: page;
}

/* 11.22 Document body paragraph */
.doc-paragraph {
  font-size: 10pt;
  text-align: justify;
  line-height: 1.6;
  margin-bottom: 8px;
}
.doc-paragraph strong { color: #1B2A4A; }

/* 11.23 Document separator */
.doc-separator {
  border: none;
  border-top: 1px solid #ccc;
  margin: 16px 0;
}
.doc-separator--thick {
  border-top: 2px solid #1B2A4A;
}
.doc-separator--accent {
  border-top: 2px solid var(--doc-accent, #A0872C);
}

/* 11.24 Document columns layout */
.doc-columns {
  display: flex;
  gap: 20px;
}
.doc-columns > * { flex: 1; }

/* 11.25 Numbered list in document */
.doc-numbered-list {
  counter-reset: doc-list;
  padding-left: 0;
  list-style: none;
}
.doc-numbered-list li {
  counter-increment: doc-list;
  margin-bottom: 8px;
  padding-left: 24px;
  position: relative;
  font-size: 10pt;
  line-height: 1.6;
}
.doc-numbered-list li::before {
  content: counter(doc-list) ".";
  position: absolute;
  left: 0;
  font-weight: 700;
  color: #1B2A4A;
}

/* 11.25b Titled numbered list (title + numbered items) */
.doc-titled-list {
  margin-bottom: 12px;
}
.doc-titled-list-title {
  font-size: 10pt;
  font-weight: 700;
  color: #1B2A4A;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.doc-titled-list ol {
  counter-reset: doc-titled-list;
  padding-left: 0;
  list-style: none;
  margin: 0;
}
.doc-titled-list ol li {
  counter-increment: doc-titled-list;
  margin-bottom: 6px;
  padding-left: 24px;
  position: relative;
  font-size: 10pt;
  line-height: 1.6;
}
.doc-titled-list ol li::before {
  content: counter(doc-titled-list) ".";
  position: absolute;
  left: 0;
  font-weight: 700;
  color: #1B2A4A;
}
/* Roman numeral variant */
.doc-titled-list--roman ol li::before {
  content: counter(doc-titled-list, lower-roman) ".";
}
/* Letter variant */
.doc-titled-list--alpha ol li::before {
  content: "(" counter(doc-titled-list, lower-alpha) ")";
}

/* 11.25c Bullet list (title + bullet items with selectable bullet type) */
.doc-bullet-list {
  margin-bottom: 12px;
}
.doc-bullet-list-title {
  font-size: 10pt;
  font-weight: 700;
  color: #1B2A4A;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.doc-bullet-list ul {
  padding-left: 0;
  list-style: none;
  margin: 0;
}
.doc-bullet-list ul li {
  margin-bottom: 4px;
  padding-left: 20px;
  position: relative;
  font-size: 10pt;
  line-height: 1.6;
}
.doc-bullet-list ul li::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: #1B2A4A;
  font-weight: 700;
}
/* Bullet variants */
.doc-bullet-list--circle ul li::before { content: "○"; }
.doc-bullet-list--square ul li::before { content: "■"; font-size: 8px; top: 3px; }
.doc-bullet-list--arrow ul li::before { content: "▸"; }
.doc-bullet-list--dash ul li::before { content: "—"; }
.doc-bullet-list--check ul li::before { content: "✓"; color: #2B6E2B; }
.doc-bullet-list--star ul li::before { content: "★"; font-size: 8px; color: #A0872C; top: 2px; }

/* 11.26 Product specifications table (4 columns: Parameter, Min, Max, Unit) */
.doc-specs-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 9pt;
}
.doc-specs-table th {
  background: #1B2A4A;
  color: #fff;
  padding: 5px 8px;
  text-align: left;
  font-size: 8pt;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.doc-specs-table td {
  padding: 4px 8px;
  border: 0.5px solid #ddd;
}
.doc-specs-table tr:nth-child(even) td {
  background: #FAFAF5;
}
.doc-specs-table-category {
  background: #F5F0E8 !important;
  font-weight: 700;
  color: #1B2A4A;
  font-size: 9pt;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* 11.27 Banking details block */
.doc-bank {
  border: 0.5px solid #ccc;
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 12px;
  background: #FEFCF8;
}
.doc-bank-title {
  font-size: 10pt;
  font-weight: 700;
  color: #1B2A4A;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #eee;
}
.doc-bank-row {
  display: flex;
  font-size: 9pt;
  padding: 2px 0;
}
.doc-bank-label {
  width: 140px;
  font-weight: 600;
  color: #1B2A4A;
  flex-shrink: 0;
}
.doc-bank-value {
  flex: 1;
  color: #333;
}
.doc-bank-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* 11.28 Timeline / milestones table */
.doc-timeline {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 9pt;
}
.doc-timeline th {
  background: #1B2A4A;
  color: #fff;
  padding: 5px 10px;
  text-align: left;
  font-size: 8pt;
  text-transform: uppercase;
}
.doc-timeline td {
  padding: 5px 10px;
  border-bottom: 0.5px solid #eee;
}
.doc-timeline td:first-child {
  font-weight: 600;
  color: #1B2A4A;
  width: 55%;
}
.doc-timeline td:last-child {
  color: #666;
  text-align: right;
}
.doc-timeline tr:nth-child(even) td {
  background: #FAFAF5;
}

/* 11.29 Document security block (full security appendix) */
.doc-security {
  border: 1px solid #1B2A4A;
  border-radius: 6px;
  overflow: hidden;
  margin: 20px 0;
  font-size: 9pt;
}
.doc-security-header {
  background: #1B2A4A;
  color: #fff;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 10pt;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}
.doc-security-body {
  padding: 14px;
}
.doc-security-row {
  display: flex;
  padding: 4px 0;
  border-bottom: 0.5px solid #eee;
}
.doc-security-label {
  width: 160px;
  font-weight: 600;
  color: #1B2A4A;
  flex-shrink: 0;
  font-size: 8pt;
  text-transform: uppercase;
}
.doc-security-value {
  flex: 1;
  font-family: 'Courier New', monospace;
  font-size: 8pt;
  word-break: break-all;
}
.doc-security-qr {
  text-align: center;
  padding: 12px 0;
  border-top: 0.5px solid #eee;
  margin-top: 8px;
}
.doc-security-verify {
  background: #F5F0E8;
  padding: 10px 14px;
  border-radius: 4px;
  margin-top: 10px;
  font-size: 8pt;
  line-height: 1.6;
}
.doc-security-verify-title {
  font-weight: 700;
  color: #1B2A4A;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.doc-security-verify ol {
  margin: 4px 0;
  padding-left: 18px;
}

/* 11.30 Anti-fraud warning block */
.doc-antifraud {
  border: 2px solid #B91C1C;
  border-radius: 6px;
  padding: 12px 16px;
  margin: 16px 0;
  background: #FEF2F2;
}
.doc-antifraud-title {
  font-size: 10pt;
  font-weight: 700;
  color: #B91C1C;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.doc-antifraud-title::before {
  content: "⚠";
  font-size: 14pt;
}
.doc-antifraud-text {
  font-size: 9pt;
  color: #7F1D1D;
  line-height: 1.6;
}
.doc-antifraud-items {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
}
.doc-antifraud-items li {
  padding: 3px 0 3px 16px;
  position: relative;
  font-size: 9pt;
  color: #7F1D1D;
}
.doc-antifraud-items li::before {
  content: "✗";
  position: absolute;
  left: 0;
  color: #B91C1C;
  font-weight: 700;
}

/* 11.31 Version control table */
.doc-version-control {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 9pt;
}
.doc-version-control th {
  background: #F5F0E8;
  color: #1B2A4A;
  padding: 5px 10px;
  text-align: left;
  font-weight: 700;
  font-size: 8pt;
  text-transform: uppercase;
  border-bottom: 1px solid #ccc;
}
.doc-version-control td {
  padding: 4px 10px;
  border-bottom: 0.5px solid #eee;
  font-size: 9pt;
}
.doc-version-control td:first-child {
  font-weight: 600;
  font-family: monospace;
  color: #1B2A4A;
}

/* 11.32 Table of contents */
.doc-toc {
  margin: 16px 0;
  font-size: 10pt;
}
.doc-toc-title {
  font-size: 12pt;
  font-weight: 700;
  color: #1B2A4A;
  text-transform: uppercase;
  margin-bottom: 10px;
  text-align: center;
}
.doc-toc-item {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  border-bottom: 0.5px dotted #ccc;
}
.doc-toc-item-number {
  font-weight: 600;
  color: #1B2A4A;
  width: 60px;
  flex-shrink: 0;
}
.doc-toc-item-title {
  flex: 1;
}
.doc-toc-item-page {
  color: #999;
  font-size: 9pt;
  flex-shrink: 0;
  margin-left: 8px;
}
.doc-toc-item--sub {
  padding-left: 30px;
  font-size: 9pt;
}

/* 11.33 Cross-reference badge */
.doc-crossref {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 8pt;
  font-family: monospace;
  background: #EEF2FF;
  color: #3730A3;
  padding: 1px 6px;
  border-radius: 3px;
  border: 0.5px solid #C7D2FE;
  text-decoration: none;
}
.doc-crossref::before {
  content: "§";
  font-weight: 700;
}

/* 11.34 E-signature notice */
.doc-esign {
  text-align: center;
  font-size: 8pt;
  font-style: italic;
  color: #888;
  margin: 12px 0;
  padding: 8px;
  border: 0.5px dashed #ccc;
  border-radius: 4px;
}

/* 11.35 End of document marker */
.doc-end-marker {
  text-align: center;
  margin: 30px 0;
  font-size: 9pt;
  font-weight: 700;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.doc-end-marker::before,
.doc-end-marker::after {
  content: "————————";
  margin: 0 12px;
  color: #ddd;
}

/* 11.36 Callout / highlight box */
.doc-callout {
  border: 1px solid #D1D5DB;
  border-left: 4px solid #1B2A4A;
  border-radius: 4px;
  padding: 12px 16px;
  margin: 12px 0;
  background: #F9FAFB;
}
.doc-callout--warning {
  border-left-color: #F59E0B;
  background: #FFFBEB;
}
.doc-callout--danger {
  border-left-color: #B91C1C;
  background: #FEF2F2;
}
.doc-callout--info {
  border-left-color: #2563EB;
  background: #EFF6FF;
}
.doc-callout--success {
  border-left-color: #16A34A;
  background: #F0FDF4;
}
.doc-callout-title {
  font-size: 9pt;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 4px;
  color: #1B2A4A;
}
.doc-callout--warning .doc-callout-title { color: #92400E; }
.doc-callout--danger .doc-callout-title { color: #7F1D1D; }
.doc-callout--info .doc-callout-title { color: #1E40AF; }
.doc-callout--success .doc-callout-title { color: #166534; }
.doc-callout-text {
  font-size: 9pt;
  line-height: 1.6;
  color: #374151;
}

/* 11.37 Annex header */
.doc-annex-header {
  margin-top: 30px;
  margin-bottom: 16px;
  text-align: center;
}
.doc-annex-header-label {
  font-size: 10pt;
  font-weight: 700;
  color: var(--doc-accent, #A0872C);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.doc-annex-header-title {
  font-size: 14pt;
  font-weight: 700;
  color: #1B2A4A;
  margin-top: 4px;
}
.doc-annex-header-line {
  width: 60px;
  height: 2px;
  background: var(--doc-accent, #A0872C);
  margin: 8px auto 0;
}

/* 11.38 Option selector (radio/checkbox style A/B/C) */
.doc-options {
  margin: 12px 0;
}
.doc-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  font-size: 10pt;
}
.doc-option-marker {
  width: 16px;
  height: 16px;
  border: 1.5px solid #1B2A4A;
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}
.doc-option-marker--selected {
  background: #1B2A4A;
  color: #fff;
}
.doc-option-label {
  font-weight: 700;
  color: #1B2A4A;
  min-width: 80px;
}
.doc-option-text {
  flex: 1;
  font-size: 9pt;
  line-height: 1.5;
}

/* 11.39 Signature grid (N×2 layout for multi-party signing) */
.doc-signature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px 40px;
  margin: 20px 0;
}
.doc-signature-grid .doc-signature {
  margin-top: 0;
  min-width: 0;
}
.doc-signature-grid-section {
  grid-column: 1 / -1;
  font-size: 10pt;
  font-weight: 700;
  color: #1B2A4A;
  text-transform: uppercase;
  padding: 8px 0 4px;
  border-bottom: 1px solid #ccc;
  margin-bottom: 0;
}

/* ================================================================
   SECTION 12: WORKBENCH LAYOUT
   Full-screen editor/viewer with fixed header, footer, and split body
   ================================================================ */

.workbench {
  position: fixed;
  top: 0;
  left: var(--eb-sidebar-width);
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  background: var(--eb-bg);
  z-index: 10;
  transition: left 0.25s ease;
}

.workbench-header {
  display: flex;
  align-items: center;
  gap: var(--eb-space-2);
  padding: 4px 12px;
  border-bottom: 1px solid var(--eb-border-light);
  background: var(--eb-surface);
  flex-shrink: 0;
  min-height: 32px;
}

.workbench-body {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-height: 0;
}

.workbench-canvas {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--eb-space-3);
  min-width: 0;
}

.workbench-tools {
  width: 280px;
  flex-shrink: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--eb-space-3);
  border-left: 1px solid var(--eb-border-light);
  background: var(--eb-surface);
}

.workbench-footer {
  display: flex;
  align-items: center;
  gap: var(--eb-space-2);
  padding: 4px 12px;
  border-top: 1px solid var(--eb-border-light);
  background: var(--eb-surface-2);
  flex-shrink: 0;
  min-height: 28px;
  font-size: 10px;
}

/* Responsive: on small screens, tools go below canvas */
@media (max-width: 768px) {
  .workbench { left: 0; }
  .workbench-body { flex-direction: column; }
  .workbench-tools { width: 100%; border-left: none; border-top: 1px solid var(--eb-border-light); max-height: 40vh; }
}

/* ================================================================
   10. PRINT
   ================================================================ */
@media print {
  .sidebar, .page-actions, .btn, .toast, .modal-overlay,
  .filter-bar, .tab-bar, .pagination, .chat-input-area,
  .no-print { display: none !important; }

  .eb-main { margin-left: 0 !important; }
  .eb-content { padding: 0 !important; max-width: 100% !important; }

  .card {
    border: 1px solid #ddd;
    box-shadow: none;
    break-inside: avoid;
  }

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

  body { font-size: 12px; color: #000; background: #fff; }

  a { color: #000; text-decoration: underline; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 10px; color: #555; }
  a[href^="#"]::after, a[href^="javascript"]::after { content: ""; }

  .spec-sheet { break-inside: avoid; }
  .spec-sheet-header { background: #f5f5f5 !important; }

  table { page-break-inside: auto; }
  tr { page-break-inside: avoid; }
  thead { display: table-header-group; }

  /* New components print rules */
  .notif-banner { display: none !important; }
  .skeleton { display: none !important; }

  .board-layout { flex-direction: column; }
  .board-layout-sidebar { width: 100%; }

  .stat-grid { break-inside: avoid; border: 1px solid #ddd; }
  .stat-grid-item { background: #fff; }

  .feature-card { break-inside: avoid; }
  .cta-block { break-inside: avoid; border: 1px solid #ddd; background: #f9f9f9 !important; }
  .status-block { break-inside: avoid; border: 1px solid #ddd; }

  .list-element { break-inside: avoid; }
  .list-element:hover { background: transparent; }

  .promo-row { break-inside: avoid; }
  .promo-row-image { max-width: 200px; }

  .expandable { max-height: none !important; overflow: visible; }

  .btn-group { display: none !important; }

  .editable-data-edit-icon { display: none !important; }
  .editable-data-input { display: none !important; }
}

/* === Portal inline-style migration utilities === */
.eb-min-h-screen { min-height: 100vh; }
.eb-relative { position: relative; }
.eb-absolute { position: absolute; }
.eb-overflow-hidden { overflow: hidden; }
.eb-overflow-y-auto { overflow-y: auto; }
.eb-uppercase { text-transform: uppercase; }
.eb-tracking-wide { letter-spacing: 1px; }
.eb-text-left { text-align: left; }
.eb-select-none { user-select: none; }
.eb-text-purple { color: var(--eb-purple-text); }
.eb-text-secondary { color: var(--eb-text-2); }
.eb-text-xl { font-size: 1.25rem; }
.eb-text-lg { font-size: 1.125rem; }
.eb-font-normal { font-weight: 400; }
.eb-resize-none { resize: none; }
.eb-bg-surface { background: var(--eb-surface); }
.eb-border-b { border-bottom: 1px solid var(--eb-border-light); }
.eb-border-l { border-left: 1px solid var(--eb-border-light); }
.eb-border { border: 1px solid var(--eb-border); }
.eb-rounded-md { border-radius: var(--eb-radius-md); }
.eb-rounded-lg { border-radius: var(--eb-radius-lg); }
.eb-block { display: block; }
.eb-px-3 { padding-left: var(--eb-space-3); padding-right: var(--eb-space-3); }
.eb-px-4 { padding-left: var(--eb-space-4); padding-right: var(--eb-space-4); }
.eb-px-5 { padding-left: var(--eb-space-5); padding-right: var(--eb-space-5); }
.eb-py-2 { padding-top: var(--eb-space-2); padding-bottom: var(--eb-space-2); }
.eb-py-3 { padding-top: var(--eb-space-3); padding-bottom: var(--eb-space-3); }
.eb-mx-2 { margin-left: var(--eb-space-2); margin-right: var(--eb-space-2); }
.eb-my-1 { margin-top: var(--eb-space-1); margin-bottom: var(--eb-space-1); }
.eb-pl-5 { padding-left: 1.25rem; }
.eb-m-0 { margin: 0; }
.eb-mr-1 { margin-right: 0.25rem; }

/* ================================================================
   GESTION: Inline-style migration batch 1 — reusable classes
   ================================================================ */

/* --- Loading / centering --- */
.eb-loading-area { display: flex; align-items: center; justify-content: center; padding: 60px 0; }
.eb-loading-area-sm { display: flex; align-items: center; justify-content: center; padding: 40px 0; }

/* --- Full-page centering (100vh) --- */
.eb-center-page { display: flex; align-items: center; justify-content: center; flex-direction: column; height: 100vh; }

/* --- Text underline --- */
.eb-underline { text-decoration: underline; }

/* --- Spinner (loading circle) --- */
.eb-loading-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--eb-border);
  border-top: 3px solid var(--eb-accent);
  border-radius: 50%;
  margin: 0 auto;
  animation: spin 0.8s linear infinite;
}
.eb-loading-spinner-sm {
  width: 20px; height: 20px;
  border: 2px solid var(--eb-border);
  border-top-color: var(--eb-primary);
  border-radius: 50%;
}

/* --- Text colors for semantic states --- */
.eb-text-info    { color: var(--eb-info-text); }
.eb-text-success { color: var(--eb-success-text); }
.eb-text-warning { color: var(--eb-warning-text); }

/* --- Inline icon alignment --- */
.eb-icon-inline { display: inline; vertical-align: middle; margin-right: 4px; }
.eb-icon-inline-6 { display: inline; vertical-align: middle; margin-right: 6px; }

/* --- Max-widths for input-groups --- */
.eb-max-w-input-xs { max-width: 100px; }
.eb-max-w-input-sm { max-width: 140px; }
.eb-max-w-input    { max-width: 180px; }
.eb-max-w-input-md { max-width: 220px; }
.eb-max-w-input-lg { max-width: 280px; }
.eb-max-w-input-xl { max-width: 300px; }
.eb-max-w-input-2xl { max-width: 400px; }

/* --- Fixed widths for filter inputs --- */
.eb-w-input-xs { width: 100px; }
.eb-w-input-sm { width: 120px; }
.eb-w-input    { width: 150px; }
.eb-w-input-md { width: 160px; }
.eb-w-input-lg { width: 180px; }
.eb-w-input-xl { width: 200px; }
.eb-w-input-2xl { width: 260px; }

/* --- Flex-1 with min-width 0 --- */
.eb-min-w-0 { min-width: 0; }

/* --- Avatar component --- */
.eb-avatar {
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; flex-shrink: 0;
  background: var(--eb-bg-muted, var(--eb-surface-2));
  color: var(--eb-text-muted, var(--eb-text-3));
}
.eb-avatar-sm { width: 32px; height: 32px; font-size: 11px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 600; flex-shrink: 0; background: var(--eb-primary-ring, rgba(43,110,43,0.18)); color: var(--eb-primary, #2B6E2B); overflow: hidden; position: relative; }
.eb-avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.eb-avatar-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.5); color: #fff; opacity: 0; transition: opacity 0.2s; border-radius: 50%; }
.eb-avatar-sm:hover .eb-avatar-overlay { opacity: 1; }
.eb-cursor-pointer { cursor: pointer; }
.eb-avatar img { border-radius: 50%; object-fit: cover; flex-shrink: 0; }
img.eb-avatar { object-fit: cover; }

/* --- Table cell truncation --- */
.eb-cell-truncate { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eb-cell-truncate-200 { display: block; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eb-cell-truncate-250 { display: block; max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eb-cell-truncate-280 { display: block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eb-cell-truncate-400 { display: block; max-width: 400px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Scrollable table wrapper --- */
.eb-table-scroll { max-height: 600px; overflow-y: auto; }

/* --- Empty table cell padding --- */
.eb-empty-cell { padding: 40px; }
.eb-empty-cell-sm { padding: 30px; }

/* --- Card header between layout --- */
.card-header-between {
  padding: 14px 20px;
  border-bottom: 1px solid var(--eb-td-border);
  display: flex; align-items: center; justify-content: space-between;
}

/* --- Sidebar toggle button (collapsed state) --- */
.eb-sidebar-toggle {
  position: fixed; top: 6px; left: 8px; z-index: 50;
  width: 28px; height: 28px; border-radius: var(--eb-radius);
  background: var(--eb-surface); border: 1px solid var(--eb-border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: var(--eb-shadow-sm);
}

/* --- Sidebar collapse button --- */
.eb-sidebar-collapse-btn {
  background: none; border: none; cursor: pointer;
  color: var(--eb-sidebar-text); opacity: 0.6; padding: 2px;
  display: flex; align-items: center;
}

/* --- Sidebar logo wrapper --- */
.eb-sidebar-logo { width: 28px; height: 36px; flex-shrink: 0; }

/* --- Sidebar badge (unread count) --- */
.eb-sidebar-unread-badge {
  background: var(--eb-danger, #dc2626);
  color: #fff; font-size: 10px; font-weight: 700;
  border-radius: 10px; padding: 1px 6px;
  min-width: 18px; text-align: center; line-height: 16px;
}

/* --- Fade in animation --- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.eb-fade-in { animation: fadeIn 0.3s ease; }

/* --- Progress bar (inline patterns) --- */
.eb-progress-track { flex: 1; height: 6px; border-radius: 3px; background: var(--eb-bg-3, var(--eb-surface-2)); min-width: 60px; }
.eb-progress-fill { height: 100%; border-radius: 3px; background: var(--eb-accent); }
.eb-progress-fill-done { height: 100%; border-radius: 3px; background: var(--eb-success-text); }

/* --- KPI card flex pattern --- */
.eb-kpi-flex { flex: 1; min-width: 180px; }

/* --- Chat info panel --- */
.eb-chat-info-panel {
  width: 260px; min-width: 260px;
  border-left: 1px solid var(--eb-border-light);
  background: var(--eb-surface);
  padding: var(--eb-space-4); overflow-y: auto;
}

/* --- Chat header bar --- */
.eb-chat-header {
  padding: var(--eb-space-3) var(--eb-space-5);
  border-bottom: 1px solid var(--eb-border-light);
  background: var(--eb-surface); flex-shrink: 0;
}

/* --- Messages sidebar header/search --- */
.eb-chat-sidebar-header {
  padding: var(--eb-space-3) var(--eb-space-4);
  border-bottom: 1px solid var(--eb-border-light);
}
.eb-chat-sidebar-search {
  padding: var(--eb-space-2) var(--eb-space-3);
  border-bottom: 1px solid var(--eb-border-light);
}
.eb-chat-sidebar-list { flex: 1; overflow-y: auto; }

/* --- Messages chat group item --- */
.eb-chat-group-item {
  margin: var(--eb-space-1) var(--eb-space-2);
  border-radius: var(--eb-radius-md);
  cursor: pointer;
}

/* --- System message --- */
.eb-system-message { text-align: center; padding: var(--eb-space-2) 0; }

/* --- Overlay preview box --- */
.eb-overlay-preview {
  padding: 40px; background: #fff; border: 1px solid var(--eb-border);
  border-radius: 8px; text-align: center; position: relative; overflow: hidden;
  min-height: 120px;
}
.eb-overlay-preview-inner {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}

/* --- Overlay config type item --- */
.eb-overlay-type-item {
  padding: 8px 12px; border-radius: 6px; cursor: pointer;
  border: 1px solid transparent;
}
.eb-overlay-type-item.active {
  background: var(--eb-tr-hover);
  border-color: var(--eb-primary);
}

/* --- Calendar grid --- */
.eb-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; }
.eb-cal-header-cell { padding: 8px 4px; text-align: center; font-size: 12px; color: var(--eb-text-3); border-bottom: 1px solid var(--eb-border-light); }
.eb-cal-cell {
  min-height: 80px; padding: 4px;
  border-bottom: 1px solid var(--eb-border-light);
  border-right: 1px solid var(--eb-border-light);
  cursor: pointer;
}
.eb-cal-cell-empty {
  min-height: 80px;
  border-bottom: 1px solid var(--eb-border-light);
  border-right: 1px solid var(--eb-border-light);
  background: var(--eb-surface-dim, var(--eb-surface-2));
}
.eb-cal-day { font-size: 13px; color: var(--eb-text-1, var(--eb-text)); margin-bottom: 2px; }
.eb-cal-day-today { font-weight: 700; color: var(--eb-accent); }
.eb-cal-event {
  font-size: 10px; padding: 1px 4px; margin-bottom: 1px; border-radius: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--eb-text-1, var(--eb-text));
}
.eb-cal-event-deadline { background: var(--eb-danger-bg); }
.eb-cal-event-meeting { background: var(--eb-info-bg); }
.eb-cal-event-default { background: var(--eb-accent-bg, var(--eb-gold-100)); }
.eb-cal-more { font-size: 9px; color: var(--eb-text-3); }

/* --- Step indicator circle --- */
.eb-step-circle {
  width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px;
}
.eb-step-circle-active { background: var(--eb-accent); color: #fff; }
.eb-step-circle-inactive { background: var(--eb-bg-3, var(--eb-surface-2)); color: var(--eb-text-3); }

/* --- Template card hover --- */
.eb-card-selectable {
  cursor: pointer;
  border: 1px solid var(--eb-border-light);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.eb-card-selectable:hover { border-color: var(--eb-accent); box-shadow: var(--eb-shadow-sm); }

/* --- Grid auto-fill for template cards --- */
.eb-grid-auto-280 { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }

/* --- KPI grid 5 cols --- */
.kpi-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--eb-space-4);
  margin-bottom: var(--eb-space-6);
}

/* --- Audit log entry row --- */
.eb-audit-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; font-size: 12px;
}
.eb-audit-row:not(:last-child) { border-bottom: 1px solid var(--eb-td-border); }

/* --- Activity dot --- */
.eb-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--eb-primary); flex-shrink: 0;
}

/* --- Unread indicator dot --- */
.eb-unread-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--eb-primary);
}

/* --- WhatsApp row unread background --- */
tr.eb-row-unread { background: var(--eb-bg-accent, #f0f7f0); }

/* --- Theme card (Settings) --- */
.eb-theme-card {
  min-width: 140px; cursor: pointer;
}
.eb-theme-card.active {
  border-color: var(--eb-primary);
  background: var(--eb-green-50);
}

/* --- Onboarding success box --- */
.eb-success-box {
  background: var(--eb-success-bg);
  border-radius: 8px; padding: 16px;
}

/* --- Grid with align-items start --- */
.eb-grid-2-start { display: grid; grid-template-columns: 1fr 1fr; gap: var(--eb-space-4); align-items: start; }

/* --- Form check centered --- */
.form-check-center { justify-content: center; }

/* --- Auto margin center spinner --- */
.eb-mx-auto-mb-2 { margin: 0 auto 8px; }

/* WelcomeTour component classes */

/* Header bar */

/* --- Table row interactive states --- */
.eb-row-clickable { cursor: pointer; }
.eb-row-clickable.active { background: var(--eb-tr-hover); }
.eb-z-1 { z-index: 1; position: relative; }

/* Hide native number input spinners */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

/* ── Glossary Tooltip ────────────────────────────────────────── */
.glossary-tip-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  cursor: help;
}
.glossary-tip-icon {
  color: var(--eb-text-muted);
  opacity: 0.5;
  transition: opacity 0.15s;
}
.glossary-tip-wrap:hover .glossary-tip-icon { opacity: 1; color: var(--eb-accent); }
.glossary-tip-bubble {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--eb-surface-2);
  border: 1px solid var(--eb-border);
  border-radius: var(--eb-radius-md);
  padding: var(--eb-space-2) var(--eb-space-3);
  min-width: 200px;
  max-width: 300px;
  box-shadow: var(--eb-shadow-lg);
  z-index: 50;
  pointer-events: none;
}
.glossary-tip-term {
  font-size: 11px;
  font-weight: 700;
  color: var(--eb-accent);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.glossary-tip-def {
  font-size: 12px;
  line-height: 1.5;
  color: var(--eb-text-secondary);
}

/* ── Additional Utilities (dropdown/picker support) ──────────── */
.eb-z-50 { z-index: 50; }
.eb-w-full { width: 100%; }
.eb-max-h-180 { max-height: 180px; }
.eb-max-h-280 { max-height: 280px; }
.eb-uppercase { text-transform: uppercase; }
.eb-tracking-wide { letter-spacing: 0.05em; }
.eb-accent-check input[type="checkbox"] { accent-color: var(--eb-primary); }
.eb-inline-close {
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  color: var(--eb-text-muted);
}
.eb-inline-close:hover { color: var(--eb-danger); }
.eb-dropdown-open { display: block; }

/* ── Photo Overlay — generic overlay for background-image sections ── */
.eb-photo-overlay {
  position: relative;
  background-size: cover;
  background-position: center;
  --eb-text: #fff;
  --eb-text-2: rgba(255,255,255,0.75);
  --eb-text-3: rgba(255,255,255,0.50);
  --eb-text-4: rgba(255,255,255,0.35);
  --eb-accent: #c9a84c;
  --eb-primary: #4caf4c;
  --eb-border: rgba(255,255,255,0.12);
  --eb-surface: rgba(255,255,255,0.07);
  --eb-surface-2: rgba(255,255,255,0.04);
}
.eb-photo-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(170deg, rgba(10,20,10,0.60) 0%, rgba(10,20,10,0.35) 40%, rgba(10,20,10,0.20) 100%);
}
.eb-photo-overlay > * { position: relative; z-index: 1; }
.eb-photo-overlay .card {
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: rgba(255,255,255,0.12);
}
.eb-photo-overlay .tag-green { background: rgba(76,175,76,0.25); color: #4caf4c; }
.eb-photo-overlay .tag-gold { background: rgba(201,168,76,0.20); color: #c9a84c; }
.eb-photo-overlay .tag-amber { background: rgba(201,168,76,0.20); color: #c9a84c; }
.eb-photo-overlay .stat-grid-value { color: #fff; }
.eb-photo-overlay .stat-grid-sub { color: rgba(255,255,255,0.60); }
