/* ═══════════════════════════════════════════════
   BRAND OS · styles.css
   Paleta: #fafafa / #f4f1fd / #a58cf4 / #433075 / #0d0d0d
═══════════════════════════════════════════════ */

/* ─── RESET & BASE ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:          #fafafa;
  --bg-soft:     #f4f1fd;
  --accent:      #a58cf4;
  --accent-deep: #433075;
  --text:        #0d0d0d;
  --text-muted:  #6b6b6b;
  --text-faint:  #9e9e9e;
  --border:      #e8e4f4;
  --border-soft: #f0ecfa;
  --success:     #2db37a;
  --success-bg:  #edfaf4;
  --warning:     #d4811a;
  --warning-bg:  #fff5e6;
  --danger:      #d94f4f;
  --danger-bg:   #fdf0f0;
  --sidebar-w:   248px;
  --topbar-h:    64px;
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --shadow-sm:   0 1px 3px rgba(67,48,117,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:   0 4px 16px rgba(67,48,117,.10), 0 1px 3px rgba(0,0,0,.04);
}

html, body {
  height: 100%;
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ─── LAYOUT SHELL ─── */
body {
  display: flex;
  min-height: 100vh;
}

/* ─── SIDEBAR ─── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--accent-deep);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform .25s cubic-bezier(.4,0,.2,1);
}

.sidebar-brand {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  font-size: 22px;
  color: var(--accent);
  line-height: 1;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 17px;
  color: #fff;
  letter-spacing: -.3px;
}

.brand-version {
  font-size: 11px;
  color: rgba(255,255,255,.4);
  margin-top: 1px;
}

/* ─── SIDEBAR NAV ─── */
.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  color: rgba(255,255,255,.3);
  padding: 4px 8px 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.6);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
  margin-bottom: 2px;
  user-select: none;
}

.nav-item:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}

.nav-item.active {
  background: rgba(165,140,244,.22);
  color: #fff;
}

.nav-item.active .nav-icon {
  color: var(--accent);
}

.nav-icon {
  font-size: 15px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
  transition: color .15s;
}

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

.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 99px;
  line-height: 1.4;
}

/* ─── SIDEBAR USER ─── */
.sidebar-user {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.user-role {
  font-size: 11px;
  color: rgba(255,255,255,.4);
}

/* ─── MAIN CONTENT ─── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── TOPBAR ─── */
.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: var(--bg);
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.breadcrumb {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  letter-spacing: -.2px;
}

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

.topbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  height: 36px;
}

.topbar-search span {
  color: var(--text-faint);
  font-size: 16px;
}

.topbar-search input {
  border: none;
  background: transparent;
  outline: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  color: var(--text);
  width: 200px;
}

.topbar-search input::placeholder {
  color: var(--text-faint);
}

.mobile-menu-btn {
  display: none;
  border: none;
  background: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text);
  padding: 4px;
}

/* ─── VIEWS ─── */
.view {
  display: none;
  padding: 32px;
  flex: 1;
  animation: fadeIn .2s ease;
}

.view.active {
  display: block;
}

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

/* ─── VIEW HEADER ─── */
.view-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}

.view-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 28px;
  color: var(--text);
  letter-spacing: -.5px;
  line-height: 1.15;
}

.view-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.view-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.wave {
  font-style: normal;
}

/* ─── CARDS ─── */
.card {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.card-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  letter-spacing: -.1px;
}

/* ─── BUTTONS ─── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}

.btn-primary:hover {
  background: #9378ef;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(165,140,244,.35);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-back {
  background: none;
  border: none;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: 6px;
  padding: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  display: block;
  transition: color .15s;
}

.btn-back:hover {
  color: var(--accent);
}

/* ─── METRICS GRID ─── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.metric-card {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.metric-card.accent {
  background: var(--accent-deep);
}

.metric-card.accent .metric-value,
.metric-card.accent .metric-label {
  color: #fff;
}

.metric-card.accent .metric-icon {
  color: var(--accent);
}

.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.metric-icon {
  font-size: 16px;
  color: var(--accent);
}

.metric-delta {
  font-size: 11px;
  font-weight: 600;
  border-radius: 99px;
  padding: 2px 8px;
}

.metric-delta.positive {
  background: var(--success-bg);
  color: var(--success);
}

.metric-delta.warning {
  background: var(--warning-bg);
  color: var(--warning);
}

.metric-delta.neutral {
  background: var(--bg-soft);
  color: var(--text-muted);
}

.metric-value {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 36px;
  letter-spacing: -.5px;
  color: var(--text);
  line-height: 1;
  margin-bottom: 6px;
}

.metric-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ─── DASHBOARD GRID ─── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ─── CLIENT ROWS ─── */
.client-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  transition: background .1s;
  border-radius: var(--radius-sm);
}

.client-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.client-row:first-child {
  padding-top: 0;
}

.client-row:hover .client-name {
  color: var(--accent);
}

.client-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.av-purple { background: #ede8fc; color: #433075; }
.av-teal   { background: #e2f5f0; color: #0d6e56; }
.av-amber  { background: #fef3e2; color: #9a5f10; }
.av-blue   { background: #e3f0fc; color: #1a5fa0; }
.av-rose   { background: #fde8e8; color: #962b2b; }

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

.client-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  transition: color .15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-sub {
  font-size: 11.5px;
  color: var(--text-faint);
  margin-top: 2px;
}

/* ─── PROGRESS BAR ─── */
.prog-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 130px;
  flex-shrink: 0;
}

.prog-bar {
  flex: 1;
  height: 5px;
  background: var(--bg-soft);
  border-radius: 99px;
  overflow: hidden;
}

.prog-fill {
  height: 100%;
  border-radius: 99px;
  transition: width .4s ease;
}

.prog-pct {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 30px;
  text-align: right;
}

/* ─── BADGES ─── */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 99px;
  white-space: nowrap;
}

.badge.active   { background: var(--success-bg); color: var(--success); }
.badge.warning  { background: var(--warning-bg); color: var(--warning); }
.badge.blocked  { background: var(--danger-bg);  color: var(--danger); }
.badge.paused   { background: var(--bg-soft);    color: var(--text-muted); }
.badge.today    { background: #edf0fe; color: #3b5bdb; }

.badge-count {
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-status {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
}

.badge-status.active  { background: var(--success-bg); color: var(--success); }
.badge-status.warning { background: var(--warning-bg); color: var(--warning); }
.badge-status.blocked { background: var(--danger-bg);  color: var(--danger); }

/* ─── ALERTS ─── */
.alert-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-soft);
}

.alert-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.alert-item:first-child {
  padding-top: 0;
}

.alert-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.alert-content {
  flex: 1;
}

.alert-text {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

.alert-meta {
  font-size: 11.5px;
  color: var(--text-faint);
  margin-top: 2px;
}

/* ─── PROGRESS LIST (dashboard) ─── */
.progress-item {
  margin-bottom: 14px;
}

.progress-item:last-child {
  margin-bottom: 0;
}

.progress-item-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.progress-item-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}

.progress-item-pct {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

/* ─── TASK ROWS ─── */
.task-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}

.task-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.task-row:first-child {
  padding-top: 0;
}

.task-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.task-text {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

/* ─── CLIENTS TABLE ─── */
.clients-table-header {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr 100px 120px 60px;
  gap: 12px;
  padding: 8px 0 12px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-faint);
  margin-bottom: 4px;
}

.client-table-row {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr 100px 120px 60px;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  transition: background .1s;
  border-radius: var(--radius-sm);
}

.client-table-row:last-child {
  border-bottom: none;
}

.client-table-row:hover {
  background: var(--bg-soft);
  padding-left: 8px;
  padding-right: 8px;
}

.client-table-row:hover .ct-name {
  color: var(--accent);
}

.ct-name-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ct-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  transition: color .15s;
}

.ct-industry {
  font-size: 11.5px;
  color: var(--text-faint);
}

.ct-stage {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.ct-stage-sub {
  font-size: 11px;
  color: var(--text-faint);
}

.ct-date {
  font-size: 12px;
  color: var(--text-muted);
}

.ct-action-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
  color: var(--text-muted);
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: all .15s;
}

.ct-action-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ─── FILTER TABS ─── */
.filter-tabs {
  display: flex;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 2px;
}

.filter-tab {
  padding: 6px 14px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: all .15s;
  white-space: nowrap;
}

.filter-tab.active {
  background: #fff;
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* ─── STEP TRAIL ─── */
.step-trail {
  display: flex;
  align-items: center;
  padding: 8px 0 4px;
  overflow-x: auto;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 80px;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  border: 2px solid transparent;
  flex-shrink: 0;
  transition: all .2s;
}

.step-done   { background: var(--success); color: #fff; border-color: var(--success); }
.step-active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(165,140,244,.2); }
.step-todo   { background: var(--bg-soft); color: var(--text-faint); border-color: var(--border); }

.step-label {
  font-size: 10.5px;
  color: var(--text-muted);
  text-align: center;
  max-width: 72px;
  font-weight: 500;
  line-height: 1.3;
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  min-width: 20px;
  margin-bottom: 24px;
}

.step-line-done {
  background: var(--success);
}

/* ─── DETAIL GRID ─── */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ─── MODULE PROGRESS ─── */
.module-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.module-row:last-child {
  margin-bottom: 0;
}

.module-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  width: 100px;
  flex-shrink: 0;
}

.module-pct {
  font-size: 12px;
  font-weight: 700;
  min-width: 34px;
  text-align: right;
}

/* ─── CLIENT INFO LIST ─── */
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}

.info-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.info-row:first-child {
  padding-top: 0;
}

.info-label {
  font-size: 12px;
  color: var(--text-faint);
  font-weight: 500;
}

.info-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-align: right;
}

/* ─── KANBAN ─── */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: start;
}

.kanban-col {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.kanban-col-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.kanban-count {
  background: var(--border);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kanban-card {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s;
  cursor: pointer;
}

.kanban-card:last-child {
  margin-bottom: 0;
}

.kanban-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kanban-card-client {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.kanban-avatar {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  flex-shrink: 0;
}

.kanban-client-name {
  font-size: 11px;
  color: var(--text-faint);
  font-weight: 600;
}

.kanban-task {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 10px;
}

.kanban-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ─── FORM ─── */
.form-container {
  max-width: 580px;
}

.form-steps {
  display: flex;
  align-items: center;
  margin-bottom: 28px;
}

.form-step {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.form-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 2px solid var(--border);
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}

.form-step span {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-faint);
  transition: color .2s;
}

.form-step.active .form-step-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(165,140,244,.2);
}

.form-step.active span {
  color: var(--text);
  font-weight: 600;
}

.form-step.done .form-step-dot {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.form-step.done span {
  color: var(--text-muted);
}

.form-step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 12px;
  transition: background .3s;
  min-width: 40px;
}

.form-panel {
  display: none;
  animation: fadeIn .2s ease;
}

.form-panel.active {
  display: block;
}

.form-group {
  margin-bottom: 20px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13.5px;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(165,140,244,.15);
}

.form-input::placeholder {
  color: var(--text-faint);
}

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

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
}

/* ─── CHIPS ─── */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 7px 16px;
  border: 1.5px solid var(--border);
  border-radius: 99px;
  background: transparent;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.chip.selected {
  border-color: var(--accent);
  background: rgba(165,140,244,.1);
  color: var(--accent-deep);
  font-weight: 600;
}

/* ─── PACKAGE CARDS ─── */
.package-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.package-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: all .15s;
  text-align: left;
}

.package-card:hover {
  border-color: var(--accent);
}

.package-card.selected {
  border-color: var(--accent);
  background: rgba(165,140,244,.06);
}

.package-name {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 4px;
}

.package-desc {
  font-size: 11.5px;
  color: var(--text-faint);
  margin-bottom: 10px;
  line-height: 1.4;
}

.package-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-deep);
}

/* ─── TOAST ─── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--accent-deep);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  opacity: 0;
  transition: all .3s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
  z-index: 9999;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1100px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .clients-table-header,
  .client-table-row {
    grid-template-columns: 2fr 1.5fr 1fr 100px;
  }

  .clients-table-header > span:nth-child(5),
  .clients-table-header > span:nth-child(6),
  .client-table-row > *:nth-child(5),
  .client-table-row > *:nth-child(6) {
    display: none;
  }

  .kanban-board {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  :root { --sidebar-w: 0px; }

  .sidebar {
    transform: translateX(-248px);
    width: 248px;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-menu-btn {
    display: block;
  }

  .main-content {
    margin-left: 0;
  }

  .topbar { padding: 0 20px; }
  .view   { padding: 20px; }

  .topbar-search { display: none; }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-grid .card[style*="span 2"] {
    grid-column: span 1;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-grid .card[style*="span 2"] {
    grid-column: span 1;
  }

  .kanban-board {
    grid-template-columns: 1fr;
  }

  .package-grid {
    grid-template-columns: 1fr;
  }
}

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

  .view-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .view-actions {
    flex-wrap: wrap;
  }

  .clients-table-header { display: none; }

  .client-table-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .client-table-row > *:nth-child(3),
  .client-table-row > *:nth-child(4),
  .client-table-row > *:nth-child(5),
  .client-table-row > *:nth-child(6) {
    display: none;
  }
}
