/* =============================================
   WELITA CHILA DEMO SUITE — Design System
   ============================================= */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:wght@700&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  /* Brand */
  --wc-purple:    #790061;
  --wc-purple-light: #9B1B82;
  --wc-purple-dark:  #55003F;
  --wc-red:       #CC1027;
  --wc-red-light: #E8334A;
  --wc-green:     #6B9E0B;
  --wc-green-light:#8BC34A;
  --wc-dark:      #0B0B0B;
  --wc-white:     #FFFFFF;

  /* Neutrals */
  --gray-50:  #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;

  /* Semantic */
  --success: #10B981;
  --warning: #F59E0B;
  --danger:  #EF4444;
  --info:    #3B82F6;

  /* Layout */
  --sidebar-w: 260px;
  --topbar-h:  60px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.12);
  --shadow-xl: 0 20px 60px rgba(0,0,0,.15);

  /* Transitions */
  --ease: cubic-bezier(.4,0,.2,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--wc-purple); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
table { border-collapse: collapse; width: 100%; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; color: var(--gray-900); }
h1 { font-size: 1.8rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }
.text-brand { font-family: 'Playfair Display', Georgia, serif; }
.text-purple { color: var(--wc-purple); }
.text-red    { color: var(--wc-red); }
.text-green  { color: var(--wc-green); }
.text-muted  { color: var(--gray-500); }
.text-sm     { font-size: .85rem; }
.text-xs     { font-size: .75rem; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.fw-600      { font-weight: 600; }
.fw-800      { font-weight: 800; }

/* ---------- Utilities ---------- */
.flex  { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-xs { gap: 6px; }
.gap-sm { gap: 10px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }
.wrap   { flex-wrap: wrap; }
.grow   { flex: 1; }
.shrink-0 { flex-shrink: 0; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.mt-lg { margin-top: 24px; }
.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 16px; }
.mb-lg { margin-bottom: 24px; }
.p-sm  { padding: 8px; }
.p-md  { padding: 16px; }
.p-lg  { padding: 24px; }
.px-md { padding-left: 16px; padding-right: 16px; }
.py-sm { padding-top: 8px; padding-bottom: 8px; }
.overflow-auto { overflow: auto; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pointer { cursor: pointer; }
.relative { position: relative; }

/* ---------- Grid ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* =============================================
   LANDING PAGE
   ============================================= */
.landing-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--wc-purple-dark) 0%, var(--wc-purple) 40%, var(--wc-red) 100%);
  color: white;
  text-align: center;
  padding: 40px 20px;
  position: relative;
  overflow: hidden;
}
.landing-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,.04) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(107,158,11,.1) 0%, transparent 40%);
  animation: landingFloat 20s ease-in-out infinite;
}
@keyframes landingFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -30px) rotate(1deg); }
  66% { transform: translate(-20px, 20px) rotate(-1deg); }
}
.landing-hero > * { position: relative; z-index: 1; }
.landing-logo { width: 200px; margin-bottom: 16px; filter: brightness(0) invert(1); }
.landing-title { font-family: 'Playfair Display', serif; font-size: 3rem; margin-bottom: 8px; }
.landing-sub { font-size: 1.15rem; opacity: .85; margin-bottom: 40px; max-width: 500px; }
.landing-btns { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: .9rem;
  border: none;
  cursor: pointer;
  transition: all .2s var(--ease);
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--wc-purple); color: white; }
.btn-primary:hover { background: var(--wc-purple-light); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #059669; }
.btn-warning { background: var(--warning); color: white; }
.btn-outline {
  background: transparent;
  border: 2px solid var(--wc-purple);
  color: var(--wc-purple);
}
.btn-outline:hover { background: var(--wc-purple); color: white; }
.btn-outline-white {
  background: transparent;
  border: 2px solid rgba(255,255,255,.6);
  color: white;
}
.btn-outline-white:hover { background: rgba(255,255,255,.15); border-color: white; }
.btn-white { background: white; color: var(--wc-purple); }
.btn-white:hover { background: var(--gray-100); }
.btn-ghost { background: transparent; color: var(--gray-600); }
.btn-ghost:hover { background: var(--gray-100); }
.btn-sm { padding: 6px 14px; font-size: .8rem; }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; border-radius: var(--radius-lg); }
.btn-icon { padding: 8px; border-radius: var(--radius-sm); }
.btn-icon:hover { background: var(--gray-100); }

/* =============================================
   BADGES
   ============================================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
}
.badge-purple  { background: #F3E8FF; color: #7C3AED; }
.badge-red     { background: #FEE2E2; color: var(--wc-red); }
.badge-green   { background: #D1FAE5; color: #065F46; }
.badge-yellow  { background: #FEF3C7; color: #92400E; }
.badge-blue    { background: #DBEAFE; color: #1E40AF; }
.badge-gray    { background: var(--gray-200); color: var(--gray-700); }
.badge-dark    { background: var(--gray-800); color: white; }
.badge-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* =============================================
   LOGIN PAGE
   ============================================= */
.login-page {
  min-height: 100vh;
  display: flex;
  background: var(--gray-100);
}
.login-left {
  flex: 1;
  background: linear-gradient(135deg, var(--wc-purple-dark), var(--wc-purple) 50%, var(--wc-red));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  padding: 60px 40px;
  position: relative;
  overflow: hidden;
}
.login-left::after {
  content: '';
  position: absolute;
  bottom: -80px;
  right: -80px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
}
.login-left img { width: 160px; margin-bottom: 24px; filter: brightness(0) invert(1); }
.login-left h1 { font-family: 'Playfair Display', serif; font-size: 2.2rem; margin-bottom: 8px; }
.login-left p { opacity: .8; font-size: .95rem; }
.login-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.login-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  width: 100%;
  max-width: 420px;
}
.login-card h2 { margin-bottom: 8px; }
.login-card .text-muted { margin-bottom: 24px; }
.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--gray-400);
  font-size: .8rem;
}
.login-divider::before,
.login-divider::after { content: ''; flex: 1; height: 1px; background: var(--gray-200); }
.quick-login-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-login-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 12px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all .2s var(--ease);
  background: white;
  text-align: center;
}
.quick-login-btn:hover { border-color: var(--wc-purple); background: #F9F0FF; }
.quick-login-btn .icon { font-size: 1.6rem; }
.quick-login-btn .label { font-weight: 600; font-size: .82rem; color: var(--gray-800); }
.quick-login-btn .desc { font-size: .7rem; color: var(--gray-500); }
@media (max-width: 768px) {
  .login-left { display: none; }
  .login-right { padding: 20px; }
}

/* =============================================
   APP LAYOUT (CRM & Portal)
   ============================================= */
.app-layout {
  display: flex;
  min-height: 100vh;
}
/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--wc-purple-dark) 0%, var(--wc-purple) 100%);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  overflow-y: auto;
  transition: transform .3s var(--ease);
}
.sidebar-header {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar-header img { width: 42px; filter: brightness(0) invert(1); }
.sidebar-header .app-name { font-weight: 700; font-size: .95rem; }
.sidebar-header .app-sub { font-size: .7rem; opacity: .6; }
.sidebar-nav { flex: 1; padding: 12px 0; }
.nav-section { padding: 8px 20px 4px; font-size: .65rem; text-transform: uppercase; letter-spacing: .1em; opacity: .45; font-weight: 600; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: rgba(255,255,255,.7);
  font-size: .88rem;
  font-weight: 500;
  transition: all .15s var(--ease);
  cursor: pointer;
  border-left: 3px solid transparent;
  text-decoration: none;
}
.nav-link:hover { background: rgba(255,255,255,.08); color: white; text-decoration: none; }
.nav-link.active {
  background: rgba(255,255,255,.12);
  color: white;
  border-left-color: var(--wc-green);
  font-weight: 600;
}
.nav-link .nav-icon { width: 20px; text-align: center; font-size: 1.1rem; }
.nav-link .nav-badge {
  margin-left: auto;
  background: var(--wc-red);
  color: white;
  font-size: .65rem;
  padding: 2px 7px;
  border-radius: 50px;
  font-weight: 700;
}
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.1);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .85rem;
}
.sidebar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--wc-green);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .85rem;
}

/* Main content */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Topbar */
.topbar {
  height: var(--topbar-h);
  background: white;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-left h1 { font-size: 1.15rem; }
.breadcrumbs { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--gray-400); }
.breadcrumbs a { color: var(--gray-500); }
.breadcrumbs .sep { color: var(--gray-300); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-100);
  border-radius: var(--radius-md);
  padding: 7px 14px;
  color: var(--gray-400);
  font-size: .85rem;
  min-width: 200px;
}
.topbar-search input {
  border: none;
  background: none;
  outline: none;
  flex: 1;
  color: var(--gray-800);
}
.notif-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--gray-100);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--gray-600);
  transition: all .15s;
}
.notif-btn:hover { background: var(--gray-200); }
.notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--wc-red);
}

/* Page body */
.page-body { padding: 24px; flex: 1; }

/* =============================================
   CARDS
   ============================================= */
.card {
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: box-shadow .2s var(--ease);
}
.card:hover { box-shadow: var(--shadow-sm); }
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-header h3 { font-size: 1rem; }
.card-body { padding: 20px; }
.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
}

/* KPI Cards */
.kpi-card {
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all .2s var(--ease);
}
.kpi-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.kpi-icon.purple { background: #F3E8FF; color: var(--wc-purple); }
.kpi-icon.red    { background: #FEE2E2; color: var(--wc-red); }
.kpi-icon.green  { background: #D1FAE5; color: var(--wc-green); }
.kpi-icon.blue   { background: #DBEAFE; color: var(--info); }
.kpi-icon.yellow { background: #FEF3C7; color: var(--warning); }
.kpi-value { font-size: 1.75rem; font-weight: 800; color: var(--gray-900); line-height: 1; }
.kpi-label { font-size: .82rem; color: var(--gray-500); margin-top: 4px; }
.kpi-change { display: inline-flex; align-items: center; gap: 3px; font-size: .75rem; font-weight: 600; margin-top: 4px; }
.kpi-change.up   { color: var(--success); }
.kpi-change.down { color: var(--danger); }

/* =============================================
   TABLES
   ============================================= */
.table-container {
  overflow-x: auto;
}
.data-table {
  width: 100%;
  font-size: .85rem;
}
.data-table thead { background: var(--gray-50); }
.data-table th {
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  color: var(--gray-600);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 2px solid var(--gray-200);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.data-table th:hover { color: var(--wc-purple); }
.data-table th .sort-icon { opacity: .3; margin-left: 4px; }
.data-table th.sorted .sort-icon { opacity: 1; color: var(--wc-purple); }
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
.data-table tbody tr { transition: background .1s; }
.data-table tbody tr:hover { background: var(--gray-50); }
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.table-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  min-width: 220px;
}
.table-search input {
  border: none;
  background: none;
  outline: none;
  flex: 1;
  font-size: .85rem;
  color: var(--gray-800);
}
.table-filters { display: flex; align-items: center; gap: 8px; }
.filter-select {
  padding: 7px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: .82rem;
  color: var(--gray-700);
  background: white;
  cursor: pointer;
}
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 20px;
  justify-content: center;
}
.pagination button {
  padding: 6px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: white;
  cursor: pointer;
  font-size: .82rem;
  color: var(--gray-600);
  transition: all .15s;
}
.pagination button:hover { background: var(--gray-100); }
.pagination button.active { background: var(--wc-purple); color: white; border-color: var(--wc-purple); }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }
.pagination .page-info { font-size: .82rem; color: var(--gray-500); margin: 0 8px; }

/* =============================================
   MODALS
   ============================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn .2s ease;
  backdrop-filter: blur(2px);
}
.modal {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: slideUp .25s var(--ease);
}
.modal-lg { max-width: 780px; }
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 { font-size: 1.1rem; }
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--gray-100);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--gray-500);
  transition: all .15s;
}
.modal-close:hover { background: var(--gray-200); color: var(--gray-800); }
.modal-body { padding: 24px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* =============================================
   FORMS
   ============================================= */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 9px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: .88rem;
  color: var(--gray-800);
  background: white;
  transition: border-color .15s;
  outline: none;
}
.form-control:focus { border-color: var(--wc-purple); box-shadow: 0 0 0 3px rgba(121,0,97,.1); }
textarea.form-control { min-height: 80px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-hint { font-size: .75rem; color: var(--gray-400); margin-top: 4px; }

/* =============================================
   TOASTS
   ============================================= */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--gray-300);
  min-width: 280px;
  max-width: 420px;
  animation: toastIn .3s var(--ease);
  font-size: .88rem;
}
.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast.info    { border-left-color: var(--info); }
.toast-icon { font-size: 1.2rem; }
.toast-close { margin-left: auto; cursor: pointer; opacity: .4; transition: opacity .15s; font-size: 1.1rem; background: none; border: none; }
.toast-close:hover { opacity: 1; }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }

/* =============================================
   KANBAN
   ============================================= */
.kanban-board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
  min-height: 400px;
}
.kanban-column {
  min-width: 260px;
  max-width: 300px;
  flex-shrink: 0;
  background: var(--gray-100);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
}
.kanban-column-header {
  padding: 14px 16px;
  font-weight: 700;
  font-size: .88rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid transparent;
}
.kanban-column-body { padding: 10px; flex: 1; min-height: 100px; }
.kanban-card {
  background: white;
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  cursor: grab;
  transition: all .15s var(--ease);
}
.kanban-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kanban-card.dragging { opacity: .5; transform: rotate(2deg); }
.kanban-card-title { font-weight: 600; font-size: .88rem; margin-bottom: 6px; }
.kanban-card-meta { font-size: .75rem; color: var(--gray-500); }
.kanban-card-amount { font-weight: 700; color: var(--wc-purple); font-size: .9rem; margin-top: 8px; }
.kanban-count {
  background: var(--gray-200);
  color: var(--gray-700);
  font-size: .7rem;
  padding: 2px 8px;
  border-radius: 50px;
  font-weight: 700;
}
.drag-over { background: rgba(121,0,97,.05); border: 2px dashed var(--wc-purple); }

/* =============================================
   SKELETON LOADERS
   ============================================= */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 37%, var(--gray-100) 63%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-title { height: 22px; width: 40%; margin-bottom: 12px; }
.skeleton-card { height: 100px; margin-bottom: 12px; border-radius: var(--radius-md); }
.skeleton-circle { width: 48px; height: 48px; border-radius: 50%; }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* =============================================
   SCREENSHOT MODE
   ============================================= */
body.screenshot-mode .demo-only { display: none !important; }
body.screenshot-mode .tooltip { display: none !important; }
body.screenshot-mode .page-body { padding: 16px; }
body.screenshot-mode .topbar { height: 50px; }
body.screenshot-mode .sidebar { width: 220px; }
body.screenshot-mode .main-content { margin-left: 220px; }
body.screenshot-mode.ss-1366 .main-content { max-width: 1106px; }
body.screenshot-mode.ss-1440 .main-content { max-width: 1180px; }
body.screenshot-mode.ss-1920 .main-content { max-width: 1660px; }

/* =============================================
   GUIDED TOUR
   ============================================= */
.tour-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 3000;
  transition: opacity .3s;
}
.tour-highlight {
  position: fixed;
  z-index: 3001;
  box-shadow: 0 0 0 4000px rgba(0,0,0,.5);
  border-radius: var(--radius-md);
  transition: all .4s var(--ease);
}
.tour-tooltip {
  position: fixed;
  z-index: 3002;
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  padding: 20px 24px;
  max-width: 340px;
  animation: slideUp .3s var(--ease);
}
.tour-tooltip h4 { margin-bottom: 8px; color: var(--wc-purple); }
.tour-tooltip p { font-size: .88rem; color: var(--gray-600); margin-bottom: 14px; }
.tour-nav { display: flex; justify-content: space-between; align-items: center; }
.tour-dots { display: flex; gap: 6px; }
.tour-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray-300);
  transition: all .2s;
}
.tour-dot.active { background: var(--wc-purple); width: 20px; border-radius: 4px; }

/* =============================================
   TIMELINE
   ============================================= */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--gray-200);
}
.timeline-item { position: relative; padding-bottom: 20px; }
.timeline-dot {
  position: absolute;
  left: -24px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--wc-purple);
  border: 2px solid white;
  box-shadow: 0 0 0 2px var(--gray-200);
}
.timeline-item.success .timeline-dot { background: var(--success); }
.timeline-item.warning .timeline-dot { background: var(--warning); }
.timeline-item.danger  .timeline-dot { background: var(--danger); }
.timeline-time { font-size: .72rem; color: var(--gray-400); }
.timeline-text { font-size: .88rem; }

/* =============================================
   MINI CALENDAR
   ============================================= */
.mini-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  font-size: .78rem;
}
.mini-calendar .day-header {
  text-align: center;
  font-weight: 600;
  color: var(--gray-400);
  padding: 6px;
  font-size: .7rem;
  text-transform: uppercase;
}
.mini-calendar .day {
  text-align: center;
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .1s;
  position: relative;
}
.mini-calendar .day:hover { background: var(--gray-100); }
.mini-calendar .day.today { background: var(--wc-purple); color: white; font-weight: 700; border-radius: 50%; }
.mini-calendar .day.has-event::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--wc-red);
}

/* =============================================
   TICKET / SUPPORT THREAD
   ============================================= */
.ticket-thread { display: flex; flex-direction: column; gap: 14px; }
.thread-msg {
  max-width: 80%;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: .88rem;
  line-height: 1.5;
}
.thread-msg.sent {
  align-self: flex-end;
  background: var(--wc-purple);
  color: white;
  border-bottom-right-radius: 4px;
}
.thread-msg.received {
  align-self: flex-start;
  background: var(--gray-100);
  color: var(--gray-800);
  border-bottom-left-radius: 4px;
}
.thread-msg .msg-time { font-size: .7rem; opacity: .6; margin-top: 6px; display: block; }

/* =============================================
   PORTAL-SPECIFIC (B2B feel)
   ============================================= */
.portal-layout .sidebar {
  background: linear-gradient(180deg, var(--gray-900) 0%, var(--gray-800) 100%);
}
.portal-layout .nav-link.active { border-left-color: var(--wc-green); }
.portal-layout .kpi-card { border-left: 3px solid var(--wc-green); }

/* =============================================
   PRINT / EXPORT VIEW
   ============================================= */
.print-view {
  background: white;
  padding: 40px;
  max-width: 800px;
  margin: 0 auto;
}
.print-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--gray-200);
}
.print-header .company-logo { width: 120px; }
.print-header .doc-info { text-align: right; }
.print-table th {
  background: var(--gray-100);
  padding: 8px 12px;
  font-size: .8rem;
  font-weight: 600;
  text-align: left;
  border-bottom: 2px solid var(--gray-300);
}
.print-table td { padding: 8px 12px; border-bottom: 1px solid var(--gray-200); font-size: .85rem; }
.print-totals { text-align: right; margin-top: 20px; }
.print-totals .total-line { display: flex; justify-content: flex-end; gap: 40px; padding: 4px 0; font-size: .9rem; }
.print-totals .grand-total { font-weight: 800; font-size: 1.1rem; border-top: 2px solid var(--gray-800); padding-top: 8px; margin-top: 4px; }
@media print {
  .sidebar, .topbar, .demo-only, .btn:not(.print-btn) { display: none !important; }
  .main-content { margin-left: 0 !important; }
  .page-body { padding: 0 !important; }
}

/* =============================================
   DEMO SCENARIO BAR
   ============================================= */
.demo-bar {
  background: linear-gradient(90deg, #FEF3C7, #FDE68A);
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .82rem;
  border-bottom: 1px solid #F59E0B;
}
.demo-bar .demo-label { font-weight: 700; color: #92400E; }
