/* ============================================================
   BUSINESS HUB — STYLES
   ============================================================ */

/* ===== CSS VARIABLES — Warm Greige & Copper ===== */
:root {
  --bg-app: #F5F3EF;
  --bg-surface: #FAF9F6;
  --bg-card: rgba(255,253,250,0.85);
  --bg-card-solid: #FEFCF9;
  --bg-hover: rgba(184,115,85,0.07);
  --bg-input: rgba(255,253,250,0.92);

  --sidebar-bg: #2C2A26;
  --sidebar-border: rgba(245,243,239,0.07);
  --sidebar-text: #9C958A;
  --sidebar-text-active: #F5F3EF;
  --sidebar-hover: rgba(245,243,239,0.07);
  --sidebar-active-bg: rgba(184,115,85,0.20);
  --sidebar-active-border: #B87355;
  --sidebar-section: #7A736B;

  --text-primary: #3A3935;
  --text-secondary: #766F66;
  --text-muted: #A39E93;
  --text-inverse: #F5F3EF;

  --accent: #B87355;
  --accent-hover: #9E6040;
  --accent-light: rgba(184,115,85,0.12);
  --accent-text: #B87355;

  --success: #5A9E7C;
  --success-bg: rgba(90,158,124,0.12);
  --warning: #C8882A;
  --warning-bg: rgba(200,136,42,0.12);
  --danger: #C05C4B;
  --danger-bg: rgba(192,92,75,0.12);
  --info: #6B8FA8;
  --info-bg: rgba(107,143,168,0.12);
  --purple: #9E7A6B;
  --purple-bg: rgba(158,122,107,0.12);

  --border: rgba(196,189,179,0.75);
  --border-card: rgba(245,243,239,0.70);
  --border-input: #D0C9C0;
  --border-focus: #B87355;

  --shadow-xs: 0 1px 3px rgba(58,57,53,0.06);
  --shadow-sm: 0 2px 8px rgba(58,57,53,0.07);
  --shadow-md: 0 4px 20px rgba(58,57,53,0.09);
  --shadow-lg: 0 8px 40px rgba(58,57,53,0.13);
  --shadow-xl: 0 20px 60px rgba(58,57,53,0.18);
  --shadow-accent: 0 4px 20px rgba(184,115,85,0.22);

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-full: 9999px;

  --sidebar-w: 240px;
  --topbar-h: 60px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t: 0.2s;
  --t-slow: 0.35s;

  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] {
  --bg-app: #1A1814;
  --bg-surface: #221F1B;
  --bg-card: rgba(245,243,239,0.04);
  --bg-card-solid: #2A2620;
  --bg-hover: rgba(245,243,239,0.05);
  --bg-input: rgba(245,243,239,0.07);

  --sidebar-bg: #141210;
  --sidebar-border: rgba(245,243,239,0.06);
  --sidebar-text: #6B6459;
  --sidebar-text-active: #EDE8E0;
  --sidebar-hover: rgba(245,243,239,0.05);
  --sidebar-active-bg: rgba(184,115,85,0.18);
  --sidebar-section: #4A443C;

  --text-primary: #EDE8E0;
  --text-secondary: #A39E93;
  --text-muted: #5E5850;

  --accent-light: rgba(184,115,85,0.18);

  --border: rgba(245,243,239,0.07);
  --border-card: rgba(245,243,239,0.08);
  --border-input: rgba(245,243,239,0.10);

  --shadow-xs: 0 1px 3px rgba(0,0,0,0.30);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.35);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.45);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.55);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.70);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); }
input, select, textarea { font-family: var(--font); outline: none; }
ul, ol { list-style: none; }
img { max-width: 100%; }
svg { display: block; }

/* ===== APP LAYOUT ===== */
.app-wrapper {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width var(--t-slow) var(--ease);
  overflow: hidden;
  position: relative;
  z-index: 100;
  border-right: 1px solid var(--sidebar-border);
}
.sidebar.collapsed { width: 64px; }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  height: 60px;
  border-bottom: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}
.brand { display: flex; align-items: center; gap: 10px; overflow: hidden; }
.brand-logo { width: 32px; height: 32px; flex-shrink: 0; }
.brand-logo svg { width: 32px; height: 32px; border-radius: 8px; }
.brand-name {
  font-size: 15px; font-weight: 700; color: #fff;
  white-space: nowrap; letter-spacing: -0.3px;
  transition: opacity var(--t) var(--ease), width var(--t) var(--ease);
}
.sidebar.collapsed .brand-name { opacity: 0; width: 0; }

.sidebar-toggle-btn {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm);
  color: var(--sidebar-text);
  flex-shrink: 0;
  transition: background var(--t), color var(--t);
}
.sidebar-toggle-btn:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar-toggle-btn svg { width: 16px; height: 16px; }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

.nav-section { margin-bottom: 8px; }
.nav-section-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--sidebar-section);
  padding: 10px 16px 4px;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity var(--t);
}
.sidebar.collapsed .nav-section-label { opacity: 0; }

.nav-list { display: flex; flex-direction: column; gap: 1px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  height: 38px;
  border-radius: var(--r-md);
  margin: 0 8px;
  color: var(--sidebar-text);
  font-size: 13.5px;
  font-weight: 500;
  transition: background var(--t), color var(--t), border-color var(--t);
  position: relative;
  border-left: 2px solid transparent;
  white-space: nowrap;
}
.nav-item:hover { background: var(--sidebar-hover); color: #e2e8f0; }
.nav-item.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-text-active);
  border-left-color: var(--sidebar-active-border);
}

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

.nav-label {
  overflow: hidden;
  transition: opacity var(--t), width var(--t);
  white-space: nowrap;
}
.sidebar.collapsed .nav-label { opacity: 0; width: 0; overflow: hidden; }

.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: var(--r-full);
  min-width: 18px;
  text-align: center;
  line-height: 16px;
  transition: opacity var(--t);
}
.nav-badge.danger { background: var(--danger); }
.nav-badge:empty { display: none; }
.sidebar.collapsed .nav-badge { opacity: 0; }

.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}
.sidebar-quick-links {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  justify-content: flex-start;
}
.sidebar.collapsed .sidebar-quick-links { justify-content: center; flex-direction: column; gap: 6px; }
.sq-link {
  width: 30px; height: 30px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--sidebar-text);
  transition: background var(--t), color var(--t);
}
.sq-link:hover { background: var(--sidebar-hover); color: #e2e8f0; }
.sq-link svg { width: 14px; height: 14px; }

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--r-md);
  transition: background var(--t);
  cursor: pointer;
  overflow: hidden;
}
.sidebar-user:hover { background: var(--sidebar-hover); }
.sb-avatar {
  width: 30px; height: 30px;
  border-radius: var(--r-full);
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sb-user-info { overflow: hidden; transition: opacity var(--t); }
.sidebar.collapsed .sb-user-info { opacity: 0; width: 0; }
.sb-user-name { display: block; font-size: 12.5px; font-weight: 600; color: #e2e8f0; white-space: nowrap; }
.sb-user-role { display: block; font-size: 11px; color: var(--sidebar-section); white-space: nowrap; }

/* ===== MAIN CONTAINER ===== */
.main-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* ===== TOPBAR ===== */
.topbar {
  height: var(--topbar-h);
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 16px;
  flex-shrink: 0;
  position: relative;
  z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 12px; flex: 1; max-width: 480px; position: relative; }
.topbar-right { display: flex; align-items: center; gap: 8px; }

.search-wrapper {
  position: relative;
  flex: 1;
}
.search-icon {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px;
  color: var(--text-muted);
  pointer-events: none;
}
.search-input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 34px;
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--r-full);
  font-size: 13px;
  color: var(--text-primary);
  transition: border-color var(--t), box-shadow var(--t);
}
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.search-input::placeholder { color: var(--text-muted); }

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  max-height: 400px;
  overflow-y: auto;
  z-index: 200;
  display: none;
}
.search-dropdown.open { display: block; }
.search-result-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background var(--t);
  border-bottom: 1px solid var(--border);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg-hover); }
.sri-icon { font-size: 16px; width: 24px; text-align: center; }
.sri-content { flex: 1; min-width: 0; }
.sri-name { font-size: 13px; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sri-type { font-size: 11px; color: var(--text-muted); }
.search-no-results { padding: 20px; text-align: center; color: var(--text-muted); font-size: 13px; }

.current-date {
  font-size: 12.5px;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}

.icon-btn {
  width: 36px; height: 36px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: background var(--t), color var(--t);
  position: relative;
}
.icon-btn:hover { background: var(--bg-hover); color: var(--accent); }
.icon-btn svg { width: 17px; height: 17px; }

.notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 7px; height: 7px;
  background: var(--danger);
  border-radius: 50%;
  border: 1.5px solid var(--bg-card);
}
.notif-dot.hidden { display: none; }

.quick-add-btn {
  display: flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px;
  background: var(--accent);
  color: white;
  border-radius: var(--r-full);
  font-size: 13px; font-weight: 600;
  transition: background var(--t), transform var(--t), box-shadow var(--t);
  box-shadow: var(--shadow-accent);
}
.quick-add-btn:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 6px 24px rgba(99,102,241,0.35); }
.quick-add-btn svg { width: 14px; height: 14px; }

.theme-btn .moon-icon { display: none; }
.theme-btn .sun-icon { display: block; }
[data-theme="dark"] .theme-btn .moon-icon { display: block; }
[data-theme="dark"] .theme-btn .sun-icon { display: none; }

.user-menu {
  display: flex; align-items: center; gap: 7px;
  padding: 4px 10px 4px 4px;
  border-radius: var(--r-full);
  cursor: pointer;
  transition: background var(--t);
}
.user-menu:hover { background: var(--bg-hover); }
.avatar {
  width: 30px; height: 30px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.user-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }

/* ===== BREADCRUMB ===== */
.breadcrumb-bar {
  padding: 8px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px;
  color: var(--text-muted);
  flex-shrink: 0;
  min-height: 36px;
  background: var(--bg-app);
}
.breadcrumb-bar:empty { display: none; }
.breadcrumb-item { cursor: pointer; transition: color var(--t); }
.breadcrumb-item:hover { color: var(--accent); }
.breadcrumb-item.active { color: var(--text-primary); font-weight: 500; cursor: default; }
.breadcrumb-sep { color: var(--text-muted); }

/* ===== CONTENT AREA ===== */
.content-area {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.content-area::-webkit-scrollbar { width: 5px; }
.content-area::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ===== PAGE HEADER ===== */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}
.page-title { font-size: 22px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.4px; }
.page-subtitle { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

/* ===== SECTION TITLE ===== */
.section-title {
  font-size: 14px; font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.section-title .count {
  font-size: 11px; font-weight: 600;
  background: var(--accent-light);
  color: var(--accent);
  padding: 1px 6px;
  border-radius: var(--r-full);
}

/* ===== KPI CARDS ===== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.kpi-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-card);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t), box-shadow var(--t);
  cursor: default;
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kpi-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.kpi-icon-wrap {
  width: 38px; height: 38px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.kpi-trend {
  display: flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 600;
  padding: 3px 7px;
  border-radius: var(--r-full);
}
.kpi-trend.up { color: var(--success); background: var(--success-bg); }
.kpi-trend.down { color: var(--danger); background: var(--danger-bg); }
.kpi-trend.neutral { color: var(--text-muted); background: var(--bg-hover); }
.kpi-value {
  font-size: 26px; font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 4px;
}
.kpi-label { font-size: 12px; color: var(--text-secondary); font-weight: 500; }

/* ===== CARD GRID ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.card-grid-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card-grid-wide { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }

/* ===== GLASS CARD ===== */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-slow) var(--ease), box-shadow var(--t-slow) var(--ease);
  overflow: hidden;
}
.glass-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* ===== BUSINESS CARD ===== */
.business-card { padding: 20px; cursor: pointer; }
.business-card-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 16px;
}
.business-logo {
  width: 48px; height: 48px;
  border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700;
  color: white;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.business-card-actions { display: flex; gap: 4px; }
.card-action-btn {
  width: 28px; height: 28px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: background var(--t), color var(--t);
}
.card-action-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.card-action-btn svg { width: 13px; height: 13px; }
.card-action-btn.danger:hover { background: var(--danger-bg); color: var(--danger); }

.business-name { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; letter-spacing: -0.3px; display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.business-tagline { font-size: 12px; color: var(--text-secondary); margin-bottom: 14px; }
.biz-type-badge { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 20px; text-transform: uppercase; letter-spacing: .4px; }
.biz-type-badge.client { background: #eff6ff; color: #3b82f6; }

.business-stats {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 8px; margin-bottom: 16px;
}
.b-stat { text-align: center; padding: 8px; background: var(--bg-hover); border-radius: var(--r-md); }
.b-stat-val { font-size: 17px; font-weight: 700; color: var(--text-primary); }
.b-stat-lbl { font-size: 10px; color: var(--text-muted); margin-top: 1px; }

.business-card-footer {
  display: flex; align-items: center; justify-content: space-between;
}
.business-revenue { font-size: 14px; font-weight: 700; color: var(--success); }
.business-revenue-lbl { font-size: 10px; color: var(--text-muted); }

/* ===== PROJECT CARD ===== */
.project-card { padding: 18px; }
.project-card-header { display: flex; justify-content: space-between; margin-bottom: 10px; }
.project-name { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.project-business { font-size: 11px; color: var(--text-muted); }
.project-description { font-size: 12.5px; color: var(--text-secondary); margin-bottom: 14px; line-height: 1.5; }
.project-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.meta-tag {
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--text-secondary);
  background: var(--bg-hover);
  padding: 3px 8px;
  border-radius: var(--r-full);
}
.project-footer { display: flex; justify-content: space-between; align-items: center; }
.project-progress { flex: 1; margin-right: 10px; }
.progress-bar {
  height: 4px; background: var(--border);
  border-radius: var(--r-full); overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--accent), var(--purple));
  transition: width 0.5s var(--ease);
}

/* ===== CLIENT CARD ===== */
.client-card { padding: 18px; }
.client-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.client-avatar {
  width: 42px; height: 42px;
  border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700;
  color: white; flex-shrink: 0;
}
.client-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.client-company { font-size: 12px; color: var(--text-secondary); }
.client-info { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.client-info-row { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-secondary); }
.client-info-row svg { width: 13px; height: 13px; color: var(--text-muted); flex-shrink: 0; }

/* ===== CLIENT BIZ CARD (new Clients page layout) ===== */
.client-biz-card { padding: 18px; }
.client-biz-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.client-biz-stats { display: flex; gap: 12px; font-size: 12px; color: var(--text-muted); margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border-card); }
.client-biz-stats span::before { content: '•'; margin-right: 4px; }
.client-biz-stats span:first-child::before { content: ''; margin-right: 0; }
.client-contacts-section { display: flex; flex-direction: column; gap: 6px; }
.client-contacts-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.client-contact-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--r-sm); background: var(--bg-hover); }

/* ===== DOMAIN CARD ===== */
.domain-card { padding: 18px; }
.domain-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.domain-name { font-size: 15px; font-weight: 600; color: var(--text-primary); font-family: 'Courier New', monospace; }
.domain-provider { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.domain-expiry {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--r-full);
}
.domain-expiry.ok { color: var(--success); background: var(--success-bg); }
.domain-expiry.warning { color: var(--warning); background: var(--warning-bg); }
.domain-expiry.critical { color: var(--danger); background: var(--danger-bg); animation: pulse-border 2s infinite; }
@keyframes pulse-border { 0%,100%{opacity:1} 50%{opacity:0.6} }
.domain-connected { font-size: 12px; color: var(--text-secondary); display: flex; align-items: center; gap: 5px; }

/* ===== REPO CARD ===== */
.repo-card { padding: 18px; }
.repo-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.repo-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.repo-url { font-size: 11px; color: var(--accent); margin-top: 2px; font-family: monospace; }
.repo-provider {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600;
  padding: 4px 9px;
  border-radius: var(--r-full);
  background: var(--bg-hover);
  color: var(--text-secondary);
}

/* ===== DEPLOYMENT CARD ===== */
.deployment-card { padding: 18px; }
.deploy-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.deploy-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.deploy-env { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.deploy-url {
  font-size: 12px; color: var(--accent);
  font-family: monospace;
  margin-bottom: 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.deploy-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-secondary); }

/* ===== STATUS BADGES ===== */
.status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--r-full);
  white-space: nowrap;
}
.status-badge::before {
  content: ''; display: block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.status-planning { color: var(--info); background: var(--info-bg); }
.status-development { color: var(--warning); background: var(--warning-bg); }
.status-testing { color: var(--purple); background: var(--purple-bg); }
.status-live { color: var(--success); background: var(--success-bg); }
.status-maintenance { color: var(--text-muted); background: var(--bg-hover); }
.status-active { color: var(--success); background: var(--success-bg); }
.status-inactive { color: var(--text-muted); background: var(--bg-hover); }
.status-lead { color: var(--text-secondary); background: var(--bg-hover); }
.status-proposal { color: var(--info); background: var(--info-bg); }
.status-negotiation { color: var(--warning); background: var(--warning-bg); }
.status-completed { color: var(--purple); background: var(--purple-bg); }
.status-failed { color: var(--danger); background: var(--danger-bg); }
.status-building { color: var(--warning); background: var(--warning-bg); }

/* Priority badges */
.priority-low { color: var(--success); background: var(--success-bg); }
.priority-medium { color: var(--info); background: var(--info-bg); }
.priority-high { color: var(--warning); background: var(--warning-bg); }
.priority-critical { color: var(--danger); background: var(--danger-bg); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px;
  border-radius: var(--r-md);
  font-size: 13px; font-weight: 600;
  transition: all var(--t) var(--ease);
  white-space: nowrap;
}
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn-lg { height: 40px; padding: 0 20px; font-size: 14px; }
.btn svg { width: 14px; height: 14px; }

.btn-primary { background: var(--accent); color: white; box-shadow: var(--shadow-accent); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 6px 24px rgba(99,102,241,0.35); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border-input); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-focus); }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }

.btn-success { background: var(--success); color: white; }
.btn-link { background: none; color: var(--accent); font-size: 12.5px; font-weight: 500; padding: 0; }
.btn-link:hover { text-decoration: underline; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-label {
  display: block;
  font-size: 12.5px; font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 5px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--r-md);
  font-size: 13.5px;
  color: var(--text-primary);
  transition: border-color var(--t), box-shadow var(--t);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6,9 12,15 18,9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 14px; padding-right: 30px; }

/* ===== TABS ===== */
.tabs { display: flex; gap: 2px; margin-bottom: 20px; background: var(--bg-hover); padding: 4px; border-radius: var(--r-lg); width: fit-content; }
.tab-btn {
  padding: 7px 16px;
  font-size: 13px; font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--r-md);
  transition: all var(--t);
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { background: var(--bg-card-solid); color: var(--text-primary); font-weight: 600; box-shadow: var(--shadow-xs); }

/* ===== TABLE ===== */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left; padding: 10px 12px;
  font-size: 11.5px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 12px; border-bottom: 1px solid var(--border);
  font-size: 13px; color: var(--text-primary);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-hover); }
.table-wrap {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-card);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* ===== KANBAN BOARD ===== */
.kanban-page { display: flex; flex-direction: column; height: 100%; }
.kanban-board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
  flex: 1;
  align-items: flex-start;
}
.kanban-col {
  width: 280px;
  min-width: 280px;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-card);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 220px);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t);
}
.kanban-col.drag-over {
  box-shadow: 0 0 0 2px var(--accent), var(--shadow-md);
}
.kanban-col-header {
  padding: 14px 14px 10px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.kanban-col-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--text-primary);
}
.col-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.col-count {
  font-size: 11px; font-weight: 600;
  background: var(--bg-hover);
  color: var(--text-muted);
  padding: 1px 6px;
  border-radius: var(--r-full);
}
.kanban-col-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 80px;
  scrollbar-width: thin;
}
.kanban-col-body::-webkit-scrollbar { width: 3px; }
.kanban-col-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.task-card {
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px;
  cursor: grab;
  transition: transform var(--t), box-shadow var(--t), opacity var(--t);
  user-select: none;
}
.task-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.task-card.dragging { opacity: 0.4; cursor: grabbing; transform: rotate(2deg) scale(0.98); }
.task-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; line-height: 1.4; }
.task-desc { font-size: 11.5px; color: var(--text-secondary); margin-bottom: 8px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.task-meta { display: flex; align-items: center; justify-content: space-between; }
.task-due { font-size: 11px; color: var(--text-muted); }
.task-due.overdue { color: var(--danger); font-weight: 600; }
.task-actions-row { display: flex; gap: 4px; align-items: center; }
.task-actions { display: flex; gap: 3px; }
.task-action-btn {
  width: 22px; height: 22px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: background var(--t), color var(--t);
}
.task-action-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.task-action-btn.danger:hover { background: var(--danger-bg); color: var(--danger); }
.task-action-btn svg { width: 11px; height: 11px; }

.kanban-add-btn {
  width: 100%; padding: 8px;
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 500;
  color: var(--text-muted);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  border-top: 1px solid var(--border);
  transition: background var(--t), color var(--t);
  flex-shrink: 0;
}
.kanban-add-btn:hover { background: var(--bg-hover); color: var(--accent); }
.kanban-add-btn svg { width: 13px; height: 13px; }

/* ===== COMPLETED TASKS SECTION ===== */
.completed-tasks-section {
  margin-top: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.completed-tasks-header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  font-size: 12.5px; font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: background var(--t);
}
.completed-tasks-header:hover { background: var(--bg-hover); }
.completed-tasks-body { padding: 4px 8px 8px; display: flex; flex-direction: column; gap: 2px; }
.completed-task-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px;
  border-radius: var(--r-sm);
  transition: background var(--t);
}
.completed-task-row:hover { background: var(--bg-hover); }
.completed-task-title {
  font-size: 12.5px; color: var(--text-secondary);
  text-decoration: line-through; opacity: .7;
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ===== DOCUMENTS ===== */
.doc-category { margin-bottom: 24px; }
.doc-category-title {
  font-size: 13px; font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.doc-items { display: flex; flex-wrap: wrap; gap: 10px; }
.doc-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
  transition: transform var(--t), box-shadow var(--t);
  max-width: 280px;
  min-width: 200px;
}
.doc-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.doc-icon { font-size: 20px; flex-shrink: 0; }
.doc-name { font-size: 13px; font-weight: 500; color: var(--text-primary); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-link { color: var(--accent); font-size: 11px; }
.doc-actions { display: flex; gap: 3px; }

/* ===== ANALYTICS ===== */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.chart-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-card);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.chart-title { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 16px; }
.chart-canvas-wrap { position: relative; height: 220px; }

/* ===== DASHBOARD WIDGETS ===== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}
.widget-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-card);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.widget-title {
  font-size: 13.5px; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 7px;
}
.widget-title span { font-size: 16px; }
.activity-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 5px;
  flex-shrink: 0;
}
.activity-text { font-size: 12.5px; color: var(--text-primary); line-height: 1.4; }
.activity-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.deadline-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--border);
}
.deadline-item:last-child { border-bottom: none; }
.deadline-name { font-size: 12.5px; font-weight: 500; color: var(--text-primary); }
.deadline-project { font-size: 11px; color: var(--text-muted); }
.deadline-days {
  font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: var(--r-full);
}
.deadline-days.urgent { color: var(--danger); background: var(--danger-bg); }
.deadline-days.soon { color: var(--warning); background: var(--warning-bg); }
.deadline-days.ok { color: var(--success); background: var(--success-bg); }

/* ===== SETTINGS ===== */
.settings-section {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-card);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.settings-section-title { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.settings-row:last-child { border-bottom: none; }
.settings-label { font-size: 13.5px; font-weight: 500; color: var(--text-primary); }
.settings-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.toggle-switch {
  width: 44px; height: 24px;
  background: var(--border);
  border-radius: var(--r-full);
  position: relative;
  cursor: pointer;
  transition: background var(--t);
  flex-shrink: 0;
}
.toggle-switch.active { background: var(--accent); }
.toggle-switch::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  background: white;
  border-radius: 50%;
  top: 3px; left: 3px;
  transition: transform var(--t);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-switch.active::after { transform: translateX(20px); }

/* ===== BUSINESS WORKSPACE ===== */
.workspace-header {
  display: flex; align-items: center; gap: 16px;
  padding: 20px;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-card);
  border-radius: var(--r-lg);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.workspace-logo {
  width: 60px; height: 60px;
  border-radius: var(--r-xl);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800;
  color: white; flex-shrink: 0;
}
.workspace-title { font-size: 22px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.5px; }
.workspace-subtitle { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.workspace-stats { display: flex; gap: 20px; margin-left: auto; }
.ws-stat { text-align: center; }
.ws-stat-val { font-size: 20px; font-weight: 700; color: var(--text-primary); }
.ws-stat-lbl { font-size: 11px; color: var(--text-muted); }
.workspace-actions { display: flex; gap: 8px; margin-left: 16px; }

/* ===== EMPTY STATE ===== */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 20px;
  color: var(--text-muted);
  text-align: center;
}
.empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.empty-title { font-size: 16px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.empty-desc { font-size: 13px; margin-bottom: 20px; }

/* ===== MODAL ===== */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn var(--t) var(--ease);
}
.modal-backdrop.hidden { display: none; }

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

.modal-box {
  background: var(--bg-card-solid);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.25s var(--ease);
  border: 1px solid var(--border-card);
}
.modal-box.modal-lg { max-width: 680px; }
.modal-box.modal-sm { max-width: 380px; }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-header h3 { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.modal-close-btn {
  width: 28px; height: 28px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: background var(--t), color var(--t);
}
.modal-close-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.modal-close-btn svg { width: 16px; height: 16px; }

.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 8px;
  flex-shrink: 0;
}

/* Quick Add */
.quick-add-box { max-width: 400px; }
.quick-add-grid {
  padding: 16px 20px 20px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.qa-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 8px;
  border-radius: var(--r-lg);
  background: var(--bg-hover);
  border: 1px solid var(--border);
  font-size: 12.5px; font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--t);
}
.qa-item:hover { background: var(--accent-light); color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.qa-icon { font-size: 24px; }

/* Confirm Dialog */
.confirm-box {
  max-width: 360px; text-align: center;
  padding: 32px 28px;
}
.confirm-icon { font-size: 40px; margin-bottom: 12px; }
.confirm-box h3 { font-size: 17px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.confirm-box p { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; }
.confirm-actions { display: flex; gap: 10px; justify-content: center; }

/* ===== COMMAND PALETTE ===== */
.cmd-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 15vh;
  z-index: 2000;
  animation: fadeIn var(--t) var(--ease);
}
.cmd-backdrop.hidden { display: none; }

.cmd-palette {
  width: 100%;
  max-width: 580px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-card);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  animation: slideUp 0.2s var(--ease);
}
.cmd-search-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.cmd-search-bar svg { width: 17px; height: 17px; color: var(--text-muted); flex-shrink: 0; }
.cmd-search-bar input {
  flex: 1;
  background: none;
  border: none;
  font-size: 15px;
  color: var(--text-primary);
}
.cmd-search-bar input::placeholder { color: var(--text-muted); }
.cmd-esc-badge {
  font-size: 10px; font-weight: 600;
  background: var(--bg-hover);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.cmd-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 8px;
  scrollbar-width: thin;
}
.cmd-section { margin-bottom: 4px; }
.cmd-section-title {
  font-size: 10.5px; font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.6px;
  padding: 6px 8px 4px;
}
.cmd-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--t);
  font-size: 13.5px;
  color: var(--text-primary);
}
.cmd-item:hover, .cmd-item.selected {
  background: var(--accent-light);
  color: var(--accent);
}
.cmd-item-icon { font-size: 15px; width: 22px; text-align: center; flex-shrink: 0; }
.cmd-item-label { flex: 1; }
.cmd-shortcut {
  font-size: 10px; font-weight: 600;
  background: var(--bg-hover);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* ===== NOTIFICATION PANEL ===== */
.notif-panel {
  position: fixed;
  top: 68px; right: 16px;
  width: 340px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  z-index: 500;
  display: none;
  overflow: hidden;
  animation: slideUp 0.2s var(--ease);
}
.notif-panel.open { display: block; }
.notif-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.notif-panel-header h4 { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--t);
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg-hover); }
.notif-item.unread { background: var(--accent-light); }
.notif-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.notif-text { font-size: 12.5px; color: var(--text-primary); line-height: 1.4; }
.notif-time { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.notif-footer { padding: 10px 16px; border-top: 1px solid var(--border); text-align: center; }
.notif-empty { padding: 30px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 9999;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: var(--text-primary);
  color: var(--text-inverse);
  border-radius: var(--r-lg);
  font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s var(--ease);
  min-width: 250px;
  max-width: 360px;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); color: #1a1a1a; }
.toast.info { background: var(--info); }
.toast-icon { font-size: 16px; flex-shrink: 0; }
.toast-msg { flex: 1; }
.toast-close { cursor: pointer; opacity: 0.7; font-size: 16px; margin-left: 4px; }
.toast-close:hover { opacity: 1; }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOutRight {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

/* ===== LOADING ===== */
.loading-spinner {
  display: flex; align-items: center; justify-content: center;
  height: 100%;
  min-height: 200px;
}
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== FILTER BAR ===== */
.filter-bar {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.filter-chip {
  padding: 5px 13px;
  font-size: 12px; font-weight: 500;
  border-radius: var(--r-full);
  background: var(--bg-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--t);
}
.filter-chip:hover { background: var(--accent-light); color: var(--accent); border-color: var(--accent); }
.filter-chip.active { background: var(--accent); color: white; border-color: var(--accent); }

/* ===== DIVIDER ===== */
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* ===== SCROLLBAR (content area) ===== */
.content-area::-webkit-scrollbar { width: 5px; }
.content-area::-webkit-scrollbar-track { background: transparent; }
.content-area::-webkit-scrollbar-thumb { background: var(--border); border-radius: 5px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  :root { --sidebar-w: 200px; }
  .analytics-grid { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sidebar { position: absolute; height: 100%; z-index: 200; transform: translateX(-100%); }
  .sidebar.mobile-open { transform: translateX(0); }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar { padding: 0 14px; }
  .current-date { display: none; }
}
@media (max-width: 600px) {
  .content-area { padding: 16px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card-grid { grid-template-columns: 1fr; }
  .kanban-board { flex-direction: column; }
  .kanban-col { width: 100%; min-width: unset; max-height: unset; }
  .form-row { grid-template-columns: 1fr; }
  .quick-add-grid { grid-template-columns: 1fr 1fr; }
}

/* ===== WORKSPACE LAUNCHER ===== */
.workspace-launcher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(460px, 1fr));
  gap: 20px;
}
.ws-launcher-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.ws-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--border-card);
}
.ws-card-logo {
  width: 42px; height: 42px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: white;
  flex-shrink: 0; letter-spacing: 0.02em;
}
.ws-card-title-group { flex: 1; min-width: 0; }
.ws-card-name {
  font-size: 15px; font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ws-card-profile {
  font-size: 11.5px; color: var(--text-muted);
  margin-top: 2px; font-family: 'SF Mono', 'Fira Code', monospace;
}
.ws-card-header-right {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}

/* Asset registry table */
.ws-asset-grid {
  padding: 14px 20px;
  display: flex; flex-direction: column; gap: 7px;
  border-bottom: 1px solid var(--border-card);
}
.ws-asset-row {
  display: flex; align-items: center; gap: 10px;
}
.ws-asset-icon {
  width: 16px; height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.ws-asset-icon svg { width: 13px; height: 13px; }
.ws-asset-label {
  min-width: 76px; max-width: 76px;
  font-size: 11.5px; color: var(--text-muted);
  flex-shrink: 0; font-weight: 500;
}
.ws-asset-value {
  font-size: 12.5px; color: var(--text-secondary);
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ws-link {
  color: var(--accent); text-decoration: none; font-weight: 500;
}
.ws-link:hover { text-decoration: underline; }
.ws-tag {
  font-size: 10.5px; color: var(--text-muted);
  background: var(--bg-hover); border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 6px; margin-left: 4px;
  display: inline-block;
}

/* Quick launch */
.ws-quick-launch {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-card);
}
.ws-section-label {
  font-size: 10.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-muted); margin-bottom: 10px;
}
.ws-quick-btns {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.ws-quick-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px;
  font-size: 11.5px; font-weight: 500;
  border-radius: var(--r-md);
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t);
}
.ws-quick-btn svg { width: 12px; height: 12px; flex-shrink: 0; }
.ws-quick-btn:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

/* Launch settings */
.ws-launch-settings {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-card);
}
.ws-launch-checkboxes {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
}
.ws-launch-cb {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-secondary);
  cursor: pointer; user-select: none;
}
.ws-launch-cb input[type="checkbox"] {
  width: 13px; height: 13px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* Open workspace button */
.ws-open-btn {
  margin: 14px 20px 18px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 13px;
}

/* Launch app checkboxes in modal form */
.launch-app-checkboxes {
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  padding: 8px 0 4px;
}
.launch-app-cb {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-secondary);
  cursor: pointer; user-select: none;
}
.launch-app-cb input[type="checkbox"] {
  width: 13px; height: 13px;
  accent-color: var(--accent);
  cursor: pointer;
}

@media (max-width: 1100px) {
  .workspace-launcher-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .workspace-launcher-grid { grid-template-columns: 1fr; }
  .ws-quick-btns { gap: 4px; }
}

/* ===== ICON SIZING (SVG replacements for emoji) ===== */
.kpi-icon-wrap svg { width: 20px; height: 20px; flex-shrink: 0; }
.empty-icon { display: flex; align-items: center; justify-content: center; margin-bottom: 16px; opacity: 0.45; }
.empty-icon svg { width: 48px; height: 48px; }
.confirm-icon { display: flex; align-items: center; justify-content: center; margin-bottom: 12px; color: var(--warning); }
.confirm-icon svg { width: 40px; height: 40px; }
.qa-icon { display: flex; align-items: center; justify-content: center; }
.qa-icon svg { width: 24px; height: 24px; }
.wt-icon { display: inline-flex; align-items: center; width: 16px; height: 16px; vertical-align: -3px; flex-shrink: 0; }
.wt-icon svg { width: 16px; height: 16px; }
.notif-icon svg { width: 14px; height: 14px; }
.toast-icon svg { width: 16px; height: 16px; }
.doc-icon { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--r-md); background: var(--bg-hover); flex-shrink: 0; }
.doc-icon svg { width: 18px; height: 18px; }
.meta-tag svg { width: 11px; height: 11px; vertical-align: -2px; opacity: 0.65; margin-right: 2px; }
.meta-tag-icon { display: inline-flex; align-items: center; width: 12px; height: 12px; vertical-align: -2px; opacity: 0.65; margin-right: 3px; }
.meta-tag-icon svg { width: 12px; height: 12px; }
.activity-icon { display: inline-flex; align-items: center; width: 14px; height: 14px; flex-shrink: 0; vertical-align: -2px; }
.activity-icon svg { width: 14px; height: 14px; }
.search-ri-icon svg { width: 14px; height: 14px; }

/* ===== KPI SPARKLINE ===== */
.kpi-sparkline {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 22px;
  margin-top: 10px;
}
.spark-bar {
  flex: 1;
  border-radius: 2px 2px 0 0;
  min-height: 3px;
  opacity: 0.35;
  transition: opacity var(--t);
}
.kpi-card:hover .spark-bar { opacity: 0.55; }

/* ===== UNDO TOAST BUTTON ===== */
.toast-undo-btn {
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.32);
  color: white;
  padding: 3px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 600;
  margin-left: 6px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.15s;
  flex-shrink: 0;
  letter-spacing: 0.01em;
}
.toast-undo-btn svg { width: 11px; height: 11px; }
.toast-undo-btn:hover { background: rgba(255,255,255,0.3); }
.toast.warning .toast-undo-btn { color: #1a1a1a; border-color: rgba(0,0,0,0.18); }
.toast.warning .toast-undo-btn:hover { background: rgba(0,0,0,0.1); }

/* ===== USER GUIDE PAGE ===== */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(460px, 1fr));
  gap: 20px;
}
.guide-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.guide-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  background: var(--bg-hover);
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.guide-section-title svg { width: 17px; height: 17px; color: var(--accent); flex-shrink: 0; }
.guide-section-body { padding: 18px 20px; }
.guide-section-body p { font-size: 13.5px; line-height: 1.75; color: var(--text-secondary); margin: 0 0 10px; }
.guide-section-body p:last-child { margin-bottom: 0; }
.guide-steps { padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.guide-step { display: flex; align-items: flex-start; gap: 12px; }
.step-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.step-content { flex: 1; }
.step-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 3px; }
.step-desc { font-size: 12.5px; color: var(--text-secondary); line-height: 1.55; }
.guide-featured .guide-section-title { background: var(--accent-light); color: var(--accent); border-bottom-color: rgba(99,102,241,0.15); }
.guide-featured .guide-section-title svg { color: var(--accent); }
.guide-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  background: var(--accent-light);
  border-radius: var(--r-md);
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--accent-text);
  line-height: 1.55;
}
.guide-tip svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; }
.guide-shortcut-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
}
.guide-shortcut-row:last-child { border-bottom: none; }
.guide-shortcut-row kbd {
  font-size: 11px;
  background: var(--bg-hover);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: monospace;
  letter-spacing: 0.02em;
}
.guide-features-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.guide-features-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.guide-features-list li svg { width: 14px; height: 14px; color: var(--success); flex-shrink: 0; margin-top: 2px; }
.guide-section-full { grid-column: 1 / -1; }
@media (max-width: 860px) {
  .guide-grid { grid-template-columns: 1fr; }
}

/* ===== UNDO HISTORY (Settings) ===== */
.undo-history-empty { font-size: 13px; color: var(--text-muted); padding: 8px 0; }
.undo-history-list { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.undo-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-hover);
  border-radius: var(--r-sm);
  font-size: 12.5px;
}
.undo-history-item .undo-label { color: var(--text-secondary); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.undo-history-item .undo-idx { font-size: 11px; color: var(--text-muted); margin-left: 8px; }

/* ===== LOGIN SCREEN ===== */
.login-screen {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: row;
}

/* — Left brand panel — */
.login-brand {
  position: relative; overflow: hidden;
  flex: 0 0 55%; display: flex; align-items: center;
  background: linear-gradient(145deg, #3D3228 0%, #2E2520 60%, #372C23 100%);
}
.login-brand-inner {
  position: relative; z-index: 2;
  padding: 56px 64px;
}
.login-brand-logo {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 52px;
}
.login-brand-logo svg { width: 36px; height: 36px; flex-shrink: 0; }
.login-brand-name {
  font-size: 15px; font-weight: 700; color: #EDE8E0;
  letter-spacing: 0.2px;
}
.login-brand-headline {
  font-size: 40px; font-weight: 800; line-height: 1.18;
  color: #F5F3EF; letter-spacing: -1px;
  margin: 0 0 16px;
}
.login-brand-tagline {
  font-size: 14px; color: #8C7E74; line-height: 1.7;
  margin: 0;
}

/* Animated decorative orbs */
.login-brand-deco {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
}
@keyframes orbFloat1 {
  0%,100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(-30px, 24px) scale(1.08); }
}
@keyframes orbFloat2 {
  0%,100% { transform: translate(0,0) scale(1); }
  40%     { transform: translate(20px,-35px) scale(0.92); }
  80%     { transform: translate(-15px, 10px) scale(1.05); }
}
@keyframes orbFloat3 {
  0%,100% { transform: translate(0,0); }
  60%     { transform: translate(18px, 28px); }
}
@keyframes gridShift {
  0%,100% { opacity: 0.25; transform: translateY(0); }
  50%     { opacity: 0.35; transform: translateY(-8px); }
}
.deco-orb {
  position: absolute; border-radius: 50%;
  filter: blur(70px);
}
.deco-orb-1 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(184,115,85,0.35) 0%, transparent 70%);
  top: -80px; right: -100px;
  animation: orbFloat1 9s ease-in-out infinite;
}
.deco-orb-2 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(200,136,42,0.22) 0%, transparent 70%);
  bottom: -60px; left: -40px;
  animation: orbFloat2 12s ease-in-out infinite;
}
.deco-orb-3 {
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(90,158,124,0.18) 0%, transparent 70%);
  top: 45%; right: 10%;
  animation: orbFloat3 7s ease-in-out infinite;
}
.deco-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(245,243,239,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245,243,239,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: gridShift 16s ease-in-out infinite;
}

/* — Right form panel — */
.login-form-panel {
  flex: 1; display: flex; align-items: center;
  background: #F5F3EF;
  padding: 48px 64px;
}
.login-form-inner { width: 100%; max-width: 340px; }
.login-form-eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; color: #B87355;
  margin: 0 0 10px;
}
.login-form-title {
  font-size: 30px; font-weight: 800; color: #3A3935;
  letter-spacing: -0.5px; margin: 0 0 32px;
}
.login-form { text-align: left; }
.login-field { margin-bottom: 18px; }
.login-label {
  display: block; font-size: 12px; font-weight: 600;
  color: #766F66; margin-bottom: 7px; letter-spacing: 0.2px;
}
.login-input {
  width: 100%; box-sizing: border-box;
  padding: 11px 14px; border-radius: 10px;
  background: #FEFCF9;
  border: 1.5px solid #D0C9C0;
  color: #3A3935; font-size: 14px; font-family: inherit;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.login-input::placeholder { color: #C4BDB5; }
.login-input:focus {
  border-color: #B87355;
  box-shadow: 0 0 0 3px rgba(184,115,85,0.12);
}
.login-error {
  font-size: 12.5px; color: #C05C4B; min-height: 18px;
  margin: -4px 0 14px;
}
.login-btn {
  width: 100%; padding: 12px; border-radius: 10px;
  background: #3A3935; color: #F5F3EF;
  font-size: 14px; font-weight: 600; font-family: inherit;
  border: none; cursor: pointer;
  transition: background 0.2s, transform 0.1s, opacity 0.2s;
  margin-top: 6px;
  letter-spacing: 0.2px;
}
.login-btn:hover:not(:disabled) { background: #B87355; }
.login-btn:active:not(:disabled) { transform: scale(0.98); }
.login-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.login-forgot { margin: 10px 0 0; text-align: right; }
.login-forgot-btn {
  font-size: 12px; color: #A39E93;
  background: none; border: none; cursor: pointer; padding: 0;
  transition: color .15s;
}
.login-forgot-btn:hover { color: #B87355; text-decoration: underline; }
.login-hint {
  margin: 20px 0 0; font-size: 11.5px;
  color: #A39E93; text-align: center;
}

/* Mobile: stack vertically, hide brand panel */
@media (max-width: 640px) {
  .login-screen { flex-direction: column; }
  .login-brand { flex: 0 0 auto; padding: 0; }
  .login-brand-inner { padding: 28px 24px 20px; }
  .login-brand-headline { font-size: 24px; margin-bottom: 8px; }
  .login-brand-tagline, .login-biz-list { display: none; }
  .login-brand-logo { margin-bottom: 0; }
  .login-form-panel { padding: 28px 24px 40px; align-items: flex-start; }
  .login-form-inner { max-width: 100%; }
  .login-form-title { font-size: 22px; margin-bottom: 24px; }
}

