/* ============================================================================
   AVP Mini CRM - Design System
   Brand: AVP Tech Solution
   ============================================================================ */

:root {
  /* Brand palette */
  --color-primary: #6326E1;
  --color-secondary: #A842F5;
  --color-accent: #E167F4;
  --color-blue: #2A52BE;
  --color-bright-blue: #1D91F2;

  --color-primary-hover: #521fc2;
  --gradient-brand: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);

  /* Semantic */
  --color-success: #16A34A;
  --color-success-bg: #ECFDF3;
  --color-warning: #D97706;
  --color-warning-bg: #FFFBEB;
  --color-danger: #DC2626;
  --color-danger-bg: #FEF2F2;
  --color-info: var(--color-bright-blue);
  --color-info-bg: #EFF6FF;

  /* Neutrals */
  --color-bg: #F7F7FB;
  --color-surface: #FFFFFF;
  --color-border: #E7E5F0;
  --color-text: #1B1730;
  --color-text-muted: #6B6980;
  --color-text-subtle: #9C99AE;

  /* Layout */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(27, 23, 48, 0.06);
  --shadow-md: 0 4px 16px rgba(27, 23, 48, 0.08);
  --shadow-lg: 0 12px 32px rgba(27, 23, 48, 0.12);
  --sidebar-width: 264px;
  --topbar-height: 68px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { margin: 0 0 8px; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 12px; color: var(--color-text-muted); }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------------------------------------------------------------- */
/* Buttons                                                                 */
/* ---------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease, border-color 0.15s ease;
  min-height: 44px;
  line-height: 1;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { box-shadow: var(--shadow-md); }

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-primary);
  border-color: var(--color-border);
}
.btn-secondary:hover { border-color: var(--color-primary); }

.btn-ghost {
  background: transparent;
  color: var(--color-text);
}
.btn-ghost:hover { background: rgba(99, 38, 225, 0.06); }

.btn-danger {
  background: var(--color-danger);
  color: #fff;
}

.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; min-height: 36px; font-size: 0.85rem; }

/* ---------------------------------------------------------------------- */
/* Forms                                                                   */
/* ---------------------------------------------------------------------- */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 6px;
  color: var(--color-text);
}
.form-control {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  min-height: 46px;
}
.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(99, 38, 225, 0.12);
}
textarea.form-control { min-height: 100px; resize: vertical; }
.form-hint { font-size: 0.8rem; color: var(--color-text-subtle); margin-top: 6px; }
.form-error { font-size: 0.8rem; color: var(--color-danger); margin-top: 6px; }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }
.form-check { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--color-text-muted); }

@media (max-width: 640px) {
  .form-row { flex-direction: column; gap: 0; }
}

/* ---------------------------------------------------------------------- */
/* Cards / badges / alerts                                                 */
/* ---------------------------------------------------------------------- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge-success { background: var(--color-success-bg); color: var(--color-success); }
.badge-warning { background: var(--color-warning-bg); color: var(--color-warning); }
.badge-danger  { background: var(--color-danger-bg); color: var(--color-danger); }
.badge-info    { background: var(--color-info-bg); color: var(--color-info); }
.badge-muted   { background: var(--color-bg); color: var(--color-text-muted); }

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 20px;
  border: 1px solid transparent;
}
.alert-success { background: var(--color-success-bg); color: var(--color-success); border-color: rgba(22,163,74,0.2); }
.alert-error   { background: var(--color-danger-bg); color: var(--color-danger); border-color: rgba(220,38,38,0.2); }
.alert-info    { background: var(--color-info-bg); color: var(--color-blue); border-color: rgba(29,145,242,0.2); }

/* ---------------------------------------------------------------------- */
/* Toasts                                                                   */
/* ---------------------------------------------------------------------- */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 340px;
}
.toast {
  background: var(--color-text);
  color: #fff;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.88rem;
  animation: toast-in 0.2s ease;
}
.toast.toast-success { background: var(--color-success); }
.toast.toast-error { background: var(--color-danger); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------------------------------------------------------------------- */
/* Empty / loading states                                                  */
/* ---------------------------------------------------------------------- */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--color-text-muted);
}
.empty-state .empty-icon {
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--color-info-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.empty-state h3 { color: var(--color-text); margin-bottom: 6px; }

/* ---------------------------------------------------------------------- */
/* Public site (landing)                                                   */
/* ---------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--color-text); }
.brand .brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--gradient-brand);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 1rem;
}
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a { color: var(--color-text-muted); font-weight: 600; font-size: 0.92rem; }
.site-nav a:hover { color: var(--color-text); text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: 12px; }

.hero { padding: 88px 0 64px; text-align: center; }
.hero .eyebrow {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: var(--color-info-bg); color: var(--color-primary);
  font-weight: 700; font-size: 0.78rem; margin-bottom: 20px;
}
.hero h1 { font-size: 3rem; max-width: 780px; margin: 0 auto 16px; }
.hero .subhead { font-size: 1.15rem; max-width: 640px; margin: 0 auto 32px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.section { padding: 72px 0; }
.section-header { text-align: center; max-width: 620px; margin: 0 auto 44px; }
.section-header .eyebrow { color: var(--color-primary); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.feature-card { padding: 28px; }
.feature-card .feature-icon {
  width: 46px; height: 46px; border-radius: var(--radius-sm);
  background: var(--gradient-brand);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.2rem; margin-bottom: 16px;
}

.pricing-card { text-align: center; max-width: 420px; margin: 0 auto; padding: 40px; border: 2px solid var(--color-primary); }
.pricing-card .price { font-size: 3rem; font-weight: 800; margin: 10px 0; }
.pricing-card .price small { font-size: 1rem; font-weight: 500; color: var(--color-text-muted); }
.pricing-feature-list { list-style: none; padding: 0; margin: 24px 0; text-align: left; }
.pricing-feature-list li { padding: 8px 0; display: flex; gap: 10px; align-items: center; color: var(--color-text); }

.upgrade-banner {
  background: linear-gradient(135deg, #1B1730 0%, #33235E 100%);
  color: #fff; border-radius: var(--radius-lg); padding: 48px; text-align: center;
}
.upgrade-banner h2 { color: #fff; }
.upgrade-banner p { color: rgba(255,255,255,0.75); }
.upgrade-banner .price-compare { display: flex; gap: 40px; justify-content: center; margin: 24px 0; flex-wrap: wrap; }
.upgrade-banner .price-compare .amount { font-size: 1.6rem; font-weight: 800; }

.faq-item { border-bottom: 1px solid var(--color-border); padding: 20px 0; }
.faq-item h4 { margin-bottom: 6px; }

.site-footer { border-top: 1px solid var(--color-border); padding: 40px 0; color: var(--color-text-subtle); font-size: 0.85rem; }
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }

@media (max-width: 900px) {
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 2.2rem; }
}
@media (max-width: 640px) {
  .site-nav { display: none; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 40px; }
  .hero h1 { font-size: 1.8rem; }
  .upgrade-banner { padding: 28px; }
}

/* ---------------------------------------------------------------------- */
/* Guest / auth pages                                                       */
/* ---------------------------------------------------------------------- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at top, #F1ECFE 0%, var(--color-bg) 55%);
}
.auth-card { width: 100%; max-width: 440px; padding: 40px; }
.auth-card .brand { justify-content: center; margin-bottom: 24px; }
.auth-card h1 { text-align: center; font-size: 1.5rem; }
.auth-card .subhead { text-align: center; margin-bottom: 28px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 0.9rem; color: var(--color-text-muted); }

/* ---------------------------------------------------------------------- */
/* Authenticated app shell                                                  */
/* ---------------------------------------------------------------------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: transform 0.2s ease;
}
.sidebar .brand { padding: 22px 24px; border-bottom: 1px solid var(--color-border); }
.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: var(--radius-sm);
  color: var(--color-text-muted); font-weight: 600; font-size: 0.92rem;
  margin-bottom: 2px;
}
.sidebar-nav a:hover { background: var(--color-bg); text-decoration: none; color: var(--color-text); }
.sidebar-nav a.active { background: var(--color-info-bg); color: var(--color-primary); }
.sidebar-nav .nav-icon { width: 20px; text-align: center; flex-shrink: 0; }
.sidebar-nav .nav-section-title {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--color-text-subtle); padding: 16px 14px 6px;
}
.sidebar-footer { padding: 16px; border-top: 1px solid var(--color-border); }

.upgrade-card-mini {
  margin: 12px 12px 4px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--gradient-brand);
  color: #fff;
}
.upgrade-card-mini h4 { color: #fff; font-size: 0.9rem; margin-bottom: 4px; }
.upgrade-card-mini p { color: rgba(255,255,255,0.85); font-size: 0.78rem; margin-bottom: 10px; }
.upgrade-card-mini .btn { background: #fff; color: var(--color-primary); width: 100%; padding: 8px; min-height: 34px; font-size: 0.8rem; }

.main-content { flex: 1; margin-left: var(--sidebar-width); display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: var(--topbar-height);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  position: sticky; top: 0; z-index: 100;
  gap: 16px;
}
.topbar-search { flex: 1; max-width: 380px; position: relative; }
.topbar-search input {
  width: 100%; padding: 10px 14px 10px 38px; border-radius: 999px;
  border: 1.5px solid var(--color-border); background: var(--color-bg); font-size: 0.88rem;
}
.topbar-search .search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--color-text-subtle); }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.hamburger { display: none; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--color-text); }

.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-bg); border: none; cursor: pointer; position: relative;
  color: var(--color-text-muted); font-size: 1.05rem;
}
.icon-btn .dot { position: absolute; top: 6px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--color-danger); border: 2px solid var(--color-surface); }

.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--gradient-brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; flex-shrink: 0;
}

.page-body { padding: 28px; flex: 1; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.page-header h1 { margin-bottom: 2px; }
.page-header .subhead { margin: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 28px; }
.stat-card { padding: 20px; }
.stat-card .stat-label { font-size: 0.8rem; color: var(--color-text-muted); font-weight: 600; margin-bottom: 8px; }
.stat-card .stat-value { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.02em; }
.stat-card .stat-value.text-danger { color: var(--color-danger); }
.stat-card .stat-value.text-success { color: var(--color-success); }

.dashboard-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; }

.bottom-nav { display: none; }

@media (max-width: 1080px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .main-content { margin-left: 0; }
  .hamburger { display: inline-flex; }
  .topbar-search { display: none; }
  .page-body { padding: 18px 16px 84px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }

  .bottom-nav {
    display: flex;
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--color-surface); border-top: 1px solid var(--color-border);
    justify-content: space-around; padding: 8px 0; z-index: 150;
  }
  .bottom-nav a {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    font-size: 0.68rem; color: var(--color-text-subtle); font-weight: 600; padding: 4px 10px;
  }
  .bottom-nav a.active { color: var(--color-primary); }
  .bottom-nav a:hover { text-decoration: none; }
  .bottom-nav-more {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    font-size: 0.68rem; color: var(--color-text-subtle); font-weight: 600; padding: 4px 10px;
    background: none; border: none; font-family: inherit; cursor: pointer;
  }
}

.sidebar-backdrop {
  display: none;
  position: fixed; inset: 0; background: rgba(27,23,48,0.4); z-index: 190;
}
.sidebar-backdrop.open { display: block; }

.sidebar-nav a.disabled {
  pointer-events: none;
  color: var(--color-text-subtle);
  display: flex; justify-content: space-between; align-items: center;
}
.soon-chip {
  font-size: 0.62rem; font-weight: 700; text-transform: uppercase;
  background: var(--color-bg); color: var(--color-text-subtle);
  padding: 2px 7px; border-radius: 999px; letter-spacing: 0.03em;
}

.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 10px);
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  min-width: 220px; padding: 8px; display: none; z-index: 300;
}
.dropdown-menu.open { display: block; }
.dropdown-menu .dropdown-header { padding: 10px 12px; border-bottom: 1px solid var(--color-border); margin-bottom: 6px; }
.dropdown-menu .dropdown-header strong { display: block; font-size: 0.88rem; }
.dropdown-menu .dropdown-header span { font-size: 0.76rem; color: var(--color-text-subtle); }
.dropdown-menu a, .dropdown-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 12px; border-radius: var(--radius-sm); border: none; background: none;
  font-size: 0.86rem; color: var(--color-text); text-align: left; cursor: pointer; font-family: inherit;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--color-bg); text-decoration: none; }

/* ---------------------------------------------------------------------- */
/* Filter bar / toolbar                                                    */
/* ---------------------------------------------------------------------- */
.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: 14px 16px; margin-bottom: 18px;
}
.toolbar .form-control { min-height: 40px; padding: 8px 12px; font-size: 0.85rem; }
.toolbar-search { flex: 1; min-width: 180px; }
.toolbar select.form-control { width: auto; min-width: 130px; }
.toolbar-spacer { flex: 1; }

/* ---------------------------------------------------------------------- */
/* Tables                                                                   */
/* ---------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
table.data-table { width: 100%; border-collapse: collapse; min-width: 720px; }
table.data-table th {
  text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--color-text-subtle); font-weight: 700; padding: 12px 16px; border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}
table.data-table td { padding: 14px 16px; border-bottom: 1px solid var(--color-border); font-size: 0.88rem; vertical-align: middle; }
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr:hover td { background: var(--color-bg); }
table.data-table .cell-primary { font-weight: 700; color: var(--color-text); }
table.data-table .cell-muted { color: var(--color-text-subtle); font-size: 0.82rem; }
table.data-table a.row-link { color: var(--color-text); }
table.data-table a.row-link:hover { color: var(--color-primary); text-decoration: none; }

.priority-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.priority-High { background: var(--color-danger); }
.priority-Medium { background: var(--color-warning); }
.priority-Low { background: var(--color-text-subtle); }

.tag-pill {
  display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px;
  font-size: 0.7rem; font-weight: 700; background: var(--color-info-bg); color: var(--color-blue); margin: 2px 3px 2px 0;
}

/* ---------------------------------------------------------------------- */
/* Pagination                                                               */
/* ---------------------------------------------------------------------- */
.pagination { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; flex-wrap: wrap; gap: 12px; }
.pagination .page-links { display: flex; gap: 6px; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--color-border); font-size: 0.85rem; color: var(--color-text);
}
.pagination a:hover { border-color: var(--color-primary); text-decoration: none; }
.pagination .current { background: var(--gradient-brand); color: #fff; border-color: transparent; font-weight: 700; }
.pagination .disabled { opacity: 0.4; pointer-events: none; }
.result-count { font-size: 0.85rem; color: var(--color-text-muted); }

/* ---------------------------------------------------------------------- */
/* Kanban / Pipeline                                                        */
/* ---------------------------------------------------------------------- */
.kanban-board { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.kanban-column { min-width: 280px; max-width: 280px; background: var(--color-bg); border-radius: var(--radius-lg); padding: 12px; flex-shrink: 0; }
.kanban-column-header { display: flex; justify-content: space-between; align-items: center; padding: 6px 6px 12px; }
.kanban-column-header h4 { margin: 0; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--color-text-muted); }
.kanban-count { background: var(--color-surface); border-radius: 999px; padding: 2px 9px; font-size: 0.75rem; font-weight: 700; color: var(--color-text-subtle); }
.kanban-cards { display: flex; flex-direction: column; gap: 10px; min-height: 60px; }
.kanban-card {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md);
  padding: 14px; cursor: grab; box-shadow: var(--shadow-sm); transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.kanban-card:hover { box-shadow: var(--shadow-md); }
.kanban-card.dragging { opacity: 0.4; }
.kanban-card .kc-name { font-weight: 700; font-size: 0.9rem; margin-bottom: 2px; }
.kanban-card .kc-company { font-size: 0.78rem; color: var(--color-text-subtle); margin-bottom: 8px; }
.kanban-card .kc-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.78rem; color: var(--color-text-muted); }
.kanban-card .kc-value { font-weight: 700; color: var(--color-text); }
.kanban-column.drag-over { background: var(--color-info-bg); }

/* ---------------------------------------------------------------------- */
/* Modal                                                                     */
/* ---------------------------------------------------------------------- */
.modal-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(27,23,48,0.45); z-index: 500;
  align-items: center; justify-content: center; padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal { background: var(--color-surface); border-radius: var(--radius-lg); width: 100%; max-width: 480px; padding: 26px; box-shadow: var(--shadow-lg); max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-close { background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--color-text-subtle); }

/* ---------------------------------------------------------------------- */
/* Detail page                                                              */
/* ---------------------------------------------------------------------- */
.detail-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.detail-header h1 { margin-bottom: 4px; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 20px; align-items: start; }
.info-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--color-border); font-size: 0.88rem; }
.info-row:last-child { border-bottom: none; }
.info-row .info-label { color: var(--color-text-subtle); }
.info-row .info-value { font-weight: 600; text-align: right; }

.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 2px; background: var(--color-border); }
.timeline-item { position: relative; padding-bottom: 20px; }
.timeline-item::before { content: ''; position: absolute; left: -24px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--gradient-brand); border: 2px solid var(--color-surface); }
.timeline-item .ti-desc { font-size: 0.88rem; color: var(--color-text); }
.timeline-item .ti-time { font-size: 0.75rem; color: var(--color-text-subtle); margin-top: 2px; }

@media (max-width: 900px) {
  .detail-grid { grid-template-columns: 1fr; }
}

.checkbox-cell { width: 36px; }
.file-drop {
  border: 2px dashed var(--color-border); border-radius: var(--radius-md); padding: 40px 20px;
  text-align: center; color: var(--color-text-muted); cursor: pointer; transition: border-color 0.15s ease;
}
.file-drop:hover { border-color: var(--color-primary); }
.stepper { display: flex; gap: 8px; margin-bottom: 24px; }
.stepper .step { flex: 1; text-align: center; padding: 8px; border-radius: var(--radius-sm); font-size: 0.78rem; font-weight: 700; background: var(--color-bg); color: var(--color-text-subtle); }
.stepper .step.active { background: var(--color-info-bg); color: var(--color-primary); }
.stepper .step.done { background: var(--color-success-bg); color: var(--color-success); }

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.d-flex { display: flex; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
