/* CSS do frontend do Sistema de Avaliação de Veículos — Marcos.
   Paleta e componentes espelhados do CRM Yasmin (projeto 1) pra manter
   identidade visual consistente entre os dois sistemas do mesmo cliente.
   Inclui modo claro/escuro completo, sidebar recolhível e responsivo mobile. */

* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }

:root {
  --primary: #c9a84c;
  --primary-dark: #b2903b;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --bg: #f5f6f8;
  --bg-card: #ffffff;
  --bg-hover: #f3f4f6;
  --border: #e8eaed;
  --text: #1f2937;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
}

body {
  font-family: 'Inter', sans-serif;
  background: #f5f6f8;
  color: #2b2e33;
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ======================= SIDEBAR ======================= */
.sidebar {
  width: 220px;
  background: #fff;
  border-right: 1px solid #e8eaed;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width .2s;
}
.sidebar.collapsed { width: 72px; }
.sidebar.collapsed .sidebar-logo .brand,
.sidebar.collapsed .sidebar-logo .sub,
.sidebar.collapsed .logo-full,
.sidebar.collapsed .logo-dark { display: none !important; }
@media(min-width:601px) { .sidebar.collapsed .logo-icon { display: block !important; } }
.sidebar.collapsed .nav-section-title { display: none; }
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .nav-item .badge { display: none; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 12px; }
.sidebar.collapsed .wpp-badge span { display: none; }
.sidebar.collapsed .sidebar-footer { padding: 12px; }
.sidebar.collapsed .wpp-badge { justify-content: center; padding: 8px; }

.sidebar-logo {
  padding: 20px 4px 20px 4px;
  border-bottom: 1px solid #e8eaed;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.sidebar-toggle {
  background: none; border: none; cursor: pointer; color: #9ca3af;
  padding: 4px; border-radius: 4px; transition: all .15s;
}
.sidebar-toggle:hover { background: #f3f4f6; color: #4b5563; }
.sidebar-toggle svg { width: 18px; height: 18px; }

.sidebar-nav { padding: 12px 0; flex: 1; overflow-y: auto; }
.nav-section { padding: 0 12px; margin-bottom: 8px; }
.nav-section-title {
  font-size: 10px; font-weight: 600; color: #9ca3af;
  text-transform: uppercase; letter-spacing: 1px; padding: 8px 8px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px; cursor: pointer;
  font-size: 14px; font-weight: 500; color: #4b5563;
  transition: all .15s;
}
.nav-item:hover { background: #f3f4f6; }
.nav-item.active { background: #fdf9ed; color: var(--primary-dark); }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .7; }
.nav-item.active svg { opacity: 1; }
.nav-item .badge {
  margin-left: auto; font-size: 10px;
  background: #e5e7eb; color: #6b7280;
  padding: 1px 6px; border-radius: 8px; font-weight: 600;
}
.nav-item.active .badge { background: rgba(201,168,76,.2); color: var(--primary-dark); }

.sidebar-footer { padding: 16px 18px; border-top: 1px solid #e8eaed; flex-shrink: 0; }
.wpp-badge {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 8px;
  font-size: 12px; font-weight: 500;
  background: #f0fdf4; color: #166534;
}
.wpp-badge.offline { background: #fef2f2; color: #991b1b; }
.wpp-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; animation: pulse 2s infinite; }
.wpp-dot.offline { background: #ef4444; animation: none; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .4 } }

/* ======================= MAIN ======================= */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.topbar {
  height: 56px; background: #fff;
  border-bottom: 1px solid #e8eaed;
  display: flex; align-items: center;
  padding: 0 24px; gap: 20px; flex-shrink: 0;
}
.topbar-title { font-size: 18px; font-weight: 700; color: #1f2937; }
.topbar-search { position: relative; flex: 1; max-width: 320px; }
.topbar-search svg {
  position: absolute; left: 10px; top: 50%;
  transform: translateY(-50%); width: 16px; height: 16px; color: #9ca3af;
}
.topbar-search input {
  width: 100%; height: 36px; padding: 0 12px 0 34px;
  border: 1px solid #e5e7eb; border-radius: 8px;
  font-size: 13px; font-family: inherit; background: #f9fafb;
  transition: all .2s;
}
.topbar-search input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(201,168,76,.1); background: #fff;
}
.topbar-stats { display: flex; gap: 20px; margin-left: auto; }
.stat { text-align: center; }
.stat-value { font-size: 18px; font-weight: 700; color: #1f2937; }
.stat-label {
  font-size: 10px; color: #9ca3af;
  text-transform: uppercase; letter-spacing: .5px; font-weight: 600;
}

.page { display: none; flex: 1; overflow: auto; }
.page.active { display: flex; flex-direction: column; }

/* ======================= BUTTONS ======================= */
.btn {
  padding: 8px 16px; border-radius: 8px;
  font-size: 13px; font-weight: 600;
  border: none; cursor: pointer; transition: all .15s;
  font-family: inherit;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-success { background: var(--success); color: #fff; }
.btn-warning { background: var(--warning); color: #000; }
.btn-danger { background: var(--danger); color: #fff; }

/* ======================= PIPELINE TABS ======================= */
.pipeline-tabs {
  display: flex; background: #fff;
  border-bottom: 1px solid #e8eaed;
  padding: 0 24px; flex-shrink: 0;
  align-items: center; gap: 4px;
}
.pipeline-tab {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 20px;
  font-size: 13px; font-weight: 600; color: #6b7280;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all .15s; user-select: none;
}
.pipeline-tab:hover { color: #374151; background: #f9fafb; }
.pipeline-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.pipeline-tab .tab-count {
  background: #e5e7eb; color: #4b5563;
  font-size: 11px; font-weight: 700;
  padding: 1px 7px; border-radius: 10px;
}
.pipeline-tab.active .tab-count { background: #dbeafe; color: var(--accent); }
.tab-dot { width: 8px; height: 8px; border-radius: 50%; }
.tab-dot.novo    { background: #6b7280; }
.tab-dot.contato { background: #3b82f6; }
.tab-dot.negociando { background: #f59e0b; }
.tab-dot.sinal   { background: #22c55e; }

/* ======================= KANBAN ======================= */
.kanban-area { flex: 1; overflow: auto; padding: 20px 24px; }
.kanban { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; height: 100%; }
.column {
  display: flex; flex-direction: column;
  background: #fff; border-radius: 10px;
  border: 1px solid #e8eaed; overflow: hidden;
}
.column[data-stage="enviada"]    { border-top: 3px solid #6b7280; }
.column[data-stage="em_analise"] { border-top: 3px solid #3b82f6; }
.column[data-stage="aprovada"]   { border-top: 3px solid #22c55e; }
.column[data-stage="repasse"]    { border-top: 3px solid #a855f7; }

.column-header {
  padding: 14px 16px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid #e8eaed;
}
.column-dot { width: 10px; height: 10px; border-radius: 50%; }
.column[data-stage="enviada"]    .column-dot { background: #6b7280; }
.column[data-stage="em_analise"] .column-dot { background: #3b82f6; }
.column[data-stage="aprovada"]   .column-dot { background: #22c55e; }
.column[data-stage="repasse"]    .column-dot { background: #a855f7; }

.column-title { font-size: 13px; font-weight: 600; color: #374151; flex: 1; }
.column-count {
  font-size: 11px; font-weight: 700; color: #6b7280;
  background: #f3f4f6; padding: 2px 8px; border-radius: 10px;
}
.column-cards {
  flex: 1; overflow-y: auto;
  padding: 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.column-cards::-webkit-scrollbar { width: 4px; }
.column-cards::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }

.card {
  background: #fff; border: 1px solid #e8eaed;
  border-radius: 8px; padding: 14px 16px;
  cursor: pointer; transition: all .15s;
  position: relative;
}
.card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); transform: translateY(-1px); }
.column[data-stage="enviada"]    .card { border-left: 3px solid #d1d5db; }
.column[data-stage="em_analise"] .card { border-left: 3px solid #3b82f6; }
.column[data-stage="aprovada"]   .card { border-left: 3px solid #22c55e; }
.column[data-stage="repasse"]    .card { border-left: 3px solid #a855f7; }
.card-name { font-size: 14px; font-weight: 600; color: #1f2937; }
.card-meta { font-family: 'SF Mono','Courier New',monospace; font-size: 12px; color: #9ca3af; margin: 6px 0; }
.card-valor { font-size: 13px; font-weight: 600; color: var(--success); margin-top: 4px; }
.card-footer { display: flex; justify-content: flex-end; font-size: 10px; color: #9ca3af; margin-top: 6px; }
.empty-state { text-align: center; padding: 32px 16px; color: #9ca3af; font-size: 13px; }

/* ======================= TABLE ======================= */
.table-wrap { flex: 1; overflow: auto; padding: 24px; }
table {
  width: 100%; border-collapse: collapse;
  background: #fff; border-radius: 10px;
  overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
th {
  background: #f9fafb; font-size: 11px; font-weight: 600;
  color: #6b7280; text-transform: uppercase; letter-spacing: .5px;
  padding: 12px 16px; text-align: left;
  border-bottom: 1px solid #e8eaed;
}
td { padding: 12px 16px; font-size: 13px; border-bottom: 1px solid #f3f4f6; }
tr { cursor: pointer; }
tr:hover td { background: #f9fafb; }

.status-badge {
  display: inline-block; font-size: 10px; font-weight: 600;
  padding: 3px 8px; border-radius: 4px;
}
.status-badge.enviada    { background: #f3f4f6; color: #6b7280; }
.status-badge.em_analise { background: #dbeafe; color: #2563eb; }
.status-badge.aprovada   { background: #dcfce7; color: #16a34a; }
.status-badge.ajustar    { background: #fef3c7; color: #d97706; }
.status-badge.repasse    { background: #f3e8ff; color: #9333ea; }

/* ======================= DASHBOARD ======================= */
.dashboard { flex: 1; overflow: auto; padding: 24px; }
.dash-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.dash-card { background: #fff; border: 1px solid #e8eaed; border-radius: 10px; padding: 20px; }
.dash-card-label {
  font-size: 11px; font-weight: 600; color: #9ca3af;
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px;
}
.dash-card-value { font-size: 28px; font-weight: 700; color: #1f2937; }
.dash-card-sub { font-size: 12px; color: #6b7280; margin-top: 4px; }
.dash-card.green .dash-card-value { color: #16a34a; }
.dash-card.blue .dash-card-value  { color: #2563eb; }
.dash-card.amber .dash-card-value { color: #d97706; }

.funnel {
  background: #fff; border: 1px solid #e8eaed;
  border-radius: 10px; padding: 24px;
}
.funnel-title { font-size: 14px; font-weight: 600; color: #374151; margin-bottom: 16px; }
.funnel-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.funnel-label { font-size: 13px; color: #4b5563; width: 160px; }
.funnel-track {
  flex: 1; height: 28px;
  background: #f3f4f6;
  border-radius: 6px; overflow: hidden;
}
.funnel-fill {
  height: 100%; border-radius: 6px;
  display: flex; align-items: center; padding: 0 10px;
  font-size: 11px; font-weight: 600; color: #fff;
  transition: width .5s;
}
.funnel-fill.enviada    { background: #6b7280; }
.funnel-fill.em_analise { background: #3b82f6; }
.funnel-fill.aprovada   { background: #22c55e; }
.funnel-fill.repasse    { background: #a855f7; }

/* ======================= MODAL ======================= */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  backdrop-filter: blur(2px);
  z-index: 200;
  align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
  background: #fff; border-radius: 12px;
  width: 90%; max-width: 580px; max-height: 85vh;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.15);
  animation: modalIn .2s;
}
@keyframes modalIn { from { transform: scale(.95); opacity: 0 } to { transform: scale(1); opacity: 1 } }

.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 24px; border-bottom: 1px solid #e8eaed;
}
.modal-title { font-size: 16px; font-weight: 700; color: #1f2937; }
.modal-close {
  background: none; border: none; color: #9ca3af;
  cursor: pointer; font-size: 22px; padding: 4px; border-radius: 6px;
}
.modal-close:hover { background: #f3f4f6; color: #374151; }
.modal-body { flex: 1; overflow-y: auto; padding: 24px; }

.modal-field { background: #f9fafb; border-radius: 8px; padding: 12px; }
.modal-label {
  font-size: 10px; font-weight: 600; color: #9ca3af;
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px;
}
.modal-value { font-size: 14px; font-weight: 500; color: #1f2937; }

.chat-header {
  font-size: 12px; font-weight: 600; color: #6b7280;
  text-transform: uppercase; letter-spacing: .5px;
  margin: 12px 0 8px 0;
}

/* ======================= FORMS / INPUTS ======================= */
input, textarea, select, .field-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px; font-family: inherit;
  background: #fff; color: #1f2937;
}
input:focus, textarea:focus, select:focus, .field-input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(201,168,76,.1);
}
.form-label, label.form-label {
  display: block; font-size: 12px; font-weight: 600;
  color: #6b7280; margin-bottom: 4px;
}

.feedback {
  margin-top: 10px; padding: 10px 12px;
  border-radius: 6px; font-size: 13px; display: none;
}
.feedback.success { display: block; background: #dcfce7; color: #166534; }
.feedback.error   { display: block; background: #fee2e2; color: #991b1b; }

/* ======================= CHECKLIST ======================= */
.checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}
.checklist-item {
  background: #f9fafb;
  border: 1px solid #e8eaed;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.checklist-item .item-name { font-weight: 600; font-size: 13px; color: #1f2937; }
.checklist-item select { padding: 6px 8px; font-size: 13px; }
.checklist-item input  { padding: 6px 8px; font-size: 12px; }

/* ======================= MANUT LIST ======================= */
.manut-list { list-style: none; padding: 0; margin: 4px 0 10px 0; }
.manut-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; background: #f9fafb;
  border: 1px solid #e8eaed; border-radius: 6px;
  margin-bottom: 6px; font-size: 13px;
}
.manut-list button {
  background: none; border: none; color: var(--danger);
  font-size: 18px; cursor: pointer;
}

/* ======================= VALOR FINAL ======================= */
.valor-final-wrap {
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 16px 20px;
  text-align: center;
}
.valor-final {
  font-size: 32px; font-weight: 700; color: #16a34a;
  font-family: 'Inter', sans-serif;
}
.hint { font-size: 11px; color: #6b7280; margin-top: 4px; }

.actions { display: flex; gap: 10px; }

/* ======================= MODULE WRAP / LIST ======================= */
.module-wrap { flex: 1; overflow: auto; padding: 24px; }
.module-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
}
.module-title { font-size: 16px; font-weight: 600; color: #374151; }

.item-card {
  background: #fff; border: 1px solid #e8eaed;
  border-radius: 8px; padding: 16px; margin-bottom: 10px;
  transition: all .15s;
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
}
.item-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.item-card .name { font-weight: 600; color: #1f2937; }
.item-card .meta { font-size: 12px; color: #9ca3af; margin-top: 2px; }
.item-card .valor { font-size: 14px; font-weight: 600; color: #16a34a; }

/* ======================= CONFIG ======================= */
.config-page { flex: 1; overflow: auto; padding: 24px; }
.config-card {
  background: #fff; border: 1px solid #e8eaed;
  border-radius: 10px; padding: 24px; margin-bottom: 16px;
}
.config-title { font-size: 16px; font-weight: 600; color: #1f2937; margin-bottom: 16px; }
.config-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0; border-bottom: 1px solid #f3f4f6;
}
.config-row:last-child { border-bottom: none; }
.config-label { font-size: 14px; color: #4b5563; }
.config-value { font-size: 14px; font-weight: 600; color: #1f2937; }

/* ======================= DARK MODE ======================= */
body.dark {
  background: #1a1d23; color: #e4e4e7;
  --bg: #1a1d23;
  --bg-card: #1e2128;
  --bg-hover: #252930;
  --border: #2a2e35;
  --text: #e4e4e7;
  --muted: #9ca3af;
  --muted-2: #6b7280;
}
body.dark .sidebar { background: #1e2128; border-color: #2a2e35; }
body.dark .sidebar-logo { border-color: #2a2e35; }
body.dark .logo-light { display: none !important; }
body.dark .logo-dark  { display: block !important; }
body.dark .nav-item { color: #9ca3af; }
body.dark .nav-item:hover { background: #252930; }
body.dark .nav-item.active { background: #2a2516; color: var(--primary); }
body.dark .nav-item.active .badge { background: rgba(201,168,76,.25); color: var(--primary); }
body.dark .sidebar-footer { border-color: #2a2e35; }
body.dark .wpp-badge { background: #0f2b1a; color: #86efac; }
body.dark .wpp-badge.offline { background: #2a1215; color: #fca5a5; }

body.dark .topbar { background: #1e2128; border-color: #2a2e35; }
body.dark .topbar-title { color: #e4e4e7; }
body.dark .topbar-search input { background: #252930; border-color: #2a2e35; color: #e4e4e7; }
body.dark .topbar-search input:focus { border-color: var(--primary); background: #2a2e35; }
body.dark .stat-value { color: #e4e4e7; }

body.dark .pipeline-tabs { background: #1e2128; border-color: #2a2e35; }
body.dark .pipeline-tab { color: #9ca3af; }
body.dark .pipeline-tab:hover { background: #252930; color: #e4e4e7; }
body.dark .pipeline-tab.active { color: #60a5fa; border-bottom-color: #60a5fa; }
body.dark .pipeline-tab.active .tab-count { background: rgba(96,165,250,.2); color: #60a5fa; }

body.dark .column { background: #1e2128; border-color: #2a2e35; }
body.dark .column-header { border-color: #2a2e35; }
body.dark .column-title { color: #d1d5db; }
body.dark .column-count { background: #252930; }
body.dark .card { background: #252930; border-color: #2a2e35; }
body.dark .card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.3); }
body.dark .card-name { color: #e4e4e7; }

body.dark table { background: #1e2128; }
body.dark th { background: #252930; color: #9ca3af; border-color: #2a2e35; }
body.dark td { border-color: #2a2e35; color: #d1d5db; }
body.dark tr:hover td { background: #252930; }

body.dark .status-badge.enviada    { background: #2a2e35; color: #9ca3af; }
body.dark .status-badge.em_analise { background: #1e3a5f; color: #60a5fa; }
body.dark .status-badge.aprovada   { background: #14532d; color: #86efac; }
body.dark .status-badge.ajustar    { background: #78350f; color: #fcd34d; }
body.dark .status-badge.repasse    { background: #4c1d95; color: #c4b5fd; }

body.dark .dash-card { background: #1e2128; border-color: #2a2e35; }
body.dark .dash-card-value { color: #e4e4e7; }
body.dark .funnel { background: #1e2128; border-color: #2a2e35; }
body.dark .funnel-title { color: #d1d5db; }
body.dark .funnel-track { background: #252930; }

body.dark .modal { background: #1e2128; border-color: #2a2e35; }
body.dark .modal-header { border-color: #2a2e35; }
body.dark .modal-title { color: #e4e4e7; }
body.dark .modal-field { background: #252930; }
body.dark .modal-value { color: #e4e4e7; }
body.dark .chat-header { color: #9ca3af; }

body.dark input, body.dark textarea, body.dark select, body.dark .field-input {
  background: #252930; border-color: #3a3f47; color: #e4e4e7;
}
body.dark input:focus, body.dark textarea:focus, body.dark select:focus {
  background: #2a2e35;
}

body.dark .checklist-item { background: #252930; border-color: #3a3f47; }
body.dark .checklist-item .item-name { color: #e4e4e7; }

body.dark .manut-list li { background: #252930; border-color: #3a3f47; color: #d1d5db; }

body.dark .valor-final-wrap { background: linear-gradient(135deg, #052e16, #064e3b); border-color: #14532d; }
body.dark .valor-final { color: #86efac; }
body.dark .hint { color: #9ca3af; }

body.dark .config-card { background: #1e2128; border-color: #2a2e35; }
body.dark .config-title { color: #e4e4e7; }
body.dark .config-row { border-color: #2a2e35; }
body.dark .config-label { color: #9ca3af; }
body.dark .config-value { color: #e4e4e7; }

body.dark .item-card { background: #1e2128; border-color: #2a2e35; }
body.dark .item-card:hover { background: #252930; }
body.dark .item-card .name { color: #e4e4e7; }

body.dark .module-title { color: #d1d5db; }

body.dark .feedback.success { background: #052e16; color: #bbf7d0; }
body.dark .feedback.error   { background: #450a0a; color: #fca5a5; }

/* ======================= TABLET & MOBILE ======================= */
@media (min-width: 601px) and (max-width: 1024px) {
  .sidebar { width: 72px; }
  .sidebar-logo .brand, .sidebar-logo .sub { display: none; }
  .logo-full { display: none !important; } .logo-icon { display: block !important; }
  .nav-section-title { display: none; }
  .nav-item span, .nav-item .badge { display: none; }
  .nav-item { justify-content: center; padding: 12px; }
  .kanban { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 1000; visibility: hidden; opacity: 0; }
  .sidebar.mobile-open { visibility: visible; opacity: 1; box-shadow: 4px 0 20px rgba(0,0,0,.15); }
  .mobile-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 999; }
  .mobile-overlay.active { display: block; }
  .mobile-menu-btn { display: flex !important; }
  .topbar { padding: 0 12px; gap: 10px; }
  .topbar-search { max-width: none; }
  .topbar-stats { display: none; }
  .kanban-area { overflow-x: auto; overflow-y: auto; padding: 12px; }
  .kanban { display: flex; gap: 12px; min-width: max-content; height: auto; }
  .kanban .column { min-width: 260px; width: 260px; flex-shrink: 0; }
  .kanban .column-cards { overflow-y: visible; flex: none; }
  .dash-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-charts { grid-template-columns: 1fr !important; }
  .module-wrap, .dashboard, .config-page { padding: 12px; }
  .modal { width: 95%; max-height: 90vh; }
  .pipeline-tabs { flex-wrap: wrap; gap: 4px; padding: 0 12px; }
  .checklist-grid { grid-template-columns: 1fr; }
  body, .main { overflow: auto; }
}
