/* DN CRM — paleta vinho + cinza + azul-bb. Tema dark padrão / claro toggle. */

:root {
  --vinho-50:  #fbf3f4;
  --vinho-100: #f4dee1;
  --vinho-200: #e7b9bf;
  --vinho-300: #d28b94;
  --vinho-400: #b75c69;
  --vinho-500: #993a48;
  --vinho-600: #7a1f2b;       /* PRIMÁRIA */
  --vinho-700: #621822;
  --vinho-800: #4a121b;
  --vinho-900: #310b13;

  --azul-bb-100: #eaf2fb;
  --azul-bb-200: #cfe0f3;
  --azul-bb-300: #a8c8e8;     /* ACCENT */
  --azul-bb-400: #7aaadb;
  --azul-bb-500: #4f8cce;

  --grey-25:  #fafafa;
  --grey-50:  #f5f5f5;
  --grey-100: #ececec;
  --grey-200: #d8d8d8;
  --grey-300: #b8b8b8;
  --grey-400: #8a8a8a;
  --grey-500: #6b6b6b;
  --grey-600: #4a4a4a;
  --grey-700: #2f2f2f;
  --grey-800: #1f1f1f;
  --grey-900: #141414;
  --grey-950: #0a0a0a;

  --green-500: #3f8c5b;
  --amber-500: #c08a3a;
  --red-500: #b94747;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --shadow-1: 0 1px 2px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.04);
  --shadow-2: 0 4px 14px rgba(0,0,0,.08);
  --shadow-3: 0 12px 32px rgba(0,0,0,.12);
}

/* DARK (padrão) */
:root, [data-theme="dark"] {
  color-scheme: dark;
  --bg:           #0e0d10;
  --bg-elev:      #16151a;
  --bg-elev-2:    #1d1c22;
  --bg-hover:     #232128;
  --surface:      #16151a;
  --border:       #2a282f;
  --border-strong:#3a3741;
  --text:         #efeaee;
  --text-muted:   #a8a3ad;
  --text-dim:     #6f6976;
  --primary:      var(--vinho-500);
  --primary-hover:var(--vinho-400);
  --primary-fg:   #ffffff;
  --accent:       var(--azul-bb-300);
  --accent-soft:  rgba(168,200,232,.12);
  --vinho-soft:   rgba(153,58,72,.16);
  --header-bg:    rgba(20,18,24,.8);
}

/* LIGHT */
[data-theme="light"] {
  color-scheme: light;
  --bg:           #ffffff;
  --bg-elev:      #fbfafb;
  --bg-elev-2:    #f3f1f4;
  --bg-hover:     #efedf1;
  --surface:      #ffffff;
  --border:       #e6e3e8;
  --border-strong:#cdc8d1;
  --text:         #1a181c;
  --text-muted:   #5a5560;
  --text-dim:     #8a8590;
  --primary:      var(--vinho-600);
  --primary-hover:var(--vinho-700);
  --primary-fg:   #ffffff;
  --accent:       var(--azul-bb-500);
  --accent-soft:  rgba(79,140,206,.12);
  --vinho-soft:   rgba(122,31,43,.10);
  --header-bg:    rgba(255,255,255,.85);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
  font-size: 14px;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
input, button, textarea, select { font: inherit; color: inherit; }

/* SVG icons inseridos via data-icon: tamanho garantido */
[data-icon] {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1em; height: 1em; line-height: 1; vertical-align: -0.15em;
  flex-shrink: 0;
}
[data-icon] > svg { width: 100%; height: 100%; display: block; }
img { max-width: 100%; height: auto; }

/* Wrappers maiores: feature da home e ícones do login lateral
   Aumentam font-size pra que [data-icon]:1em fique visível */
.dn-feature .ico { font-size: 20px; }
.dn-feature .ico [data-icon] { width: 20px; height: 20px; }
.dn-icowrap { font-size: 18px; }
.dn-icowrap [data-icon] { width: 18px; height: 18px; }
/* Topbar/sidebar ícones */
.dn-nav-link [data-icon],
.dn-btn [data-icon],
.dn-badge [data-icon] { font-size: 14px; width: 1em; height: 1em; }
/* Hero pill icon */
.dn-hero .pill [data-icon] { width: 14px; height: 14px; }

/* ---------- Utility ---------- */
.dn-container { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.dn-stack { display: flex; flex-direction: column; gap: 16px; }
.dn-row   { display: flex; align-items: center; gap: 12px; }
.dn-grow  { flex: 1; }
.dn-mono  { font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; }
.dn-muted { color: var(--text-muted); }
.dn-dim   { color: var(--text-dim); }
.dn-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dn-hidden { display: none !important; }

/* ---------- Card / surface ---------- */
.dn-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}
.dn-card-pad { padding: 18px; }
.dn-divider { height: 1px; background: var(--border); margin: 12px 0; }

/* ---------- Buttons ---------- */
.dn-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--radius-sm); border: 1px solid transparent;
  padding: 9px 14px; font-weight: 600; font-size: 13.5px;
  cursor: pointer; transition: all .15s ease;
  background: var(--bg-elev-2); color: var(--text);
  border-color: var(--border);
}
.dn-btn:hover { background: var(--bg-hover); }
.dn-btn-primary {
  background: var(--primary); color: var(--primary-fg); border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(122,31,43,.25);
}
.dn-btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.dn-btn-ghost {
  background: transparent; border-color: transparent; color: var(--text-muted);
}
.dn-btn-ghost:hover { background: var(--bg-hover); color: var(--text); }
.dn-btn-danger { background: transparent; border-color: var(--red-500); color: var(--red-500); }
.dn-btn-danger:hover { background: rgba(185,71,71,.1); }
.dn-btn-sm { padding: 6px 10px; font-size: 12.5px; }
.dn-btn-lg { padding: 13px 22px; font-size: 15px; }
.dn-btn-icon { width: 36px; height: 36px; padding: 0; }
.dn-btn-block { width: 100%; }

/* ---------- Inputs ---------- */
.dn-field { display: flex; flex-direction: column; gap: 6px; }
.dn-label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); letter-spacing: .02em; }
.dn-input, .dn-select, .dn-textarea {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px; color: var(--text);
  outline: none; transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
.dn-input:focus, .dn-select:focus, .dn-textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px var(--vinho-soft);
}
.dn-textarea { min-height: 90px; resize: vertical; font-family: inherit; }

/* ---------- Badges ---------- */
.dn-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px;
  border-radius: 999px; font-size: 11.5px; font-weight: 600;
  background: var(--bg-elev-2); color: var(--text-muted); border: 1px solid var(--border);
}
.dn-badge-primary { background: var(--vinho-soft); color: var(--primary); border-color: var(--vinho-soft); }
.dn-badge-accent  { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-soft); }
.dn-badge-success { background: rgba(63,140,91,.14); color: var(--green-500); border-color: rgba(63,140,91,.2); }
.dn-badge-warn    { background: rgba(192,138,58,.14); color: var(--amber-500); border-color: rgba(192,138,58,.2); }
.dn-badge-danger  { background: rgba(185,71,71,.14); color: var(--red-500); border-color: rgba(185,71,71,.2); }

.dn-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dn-dot-hot   { background: #e2554b; box-shadow: 0 0 12px rgba(226,85,75,.6); }
.dn-dot-warm  { background: #c08a3a; }
.dn-dot-cold  { background: #5d8fb2; }

/* ---------- Avatar ---------- */
.dn-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--bg-elev-2);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--primary); font-size: 13px;
  border: 1px solid var(--border); flex-shrink: 0;
}
.dn-avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.dn-avatar-lg { width: 44px; height: 44px; font-size: 14px; }

/* ---------- App layout ---------- */
.dn-app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; transition: grid-template-columns .18s; }
[data-sidebar="collapsed"] .dn-app { grid-template-columns: 64px 1fr; }
.dn-sidebar {
  background: var(--bg-elev); border-right: 1px solid var(--border);
  padding: 14px 12px 0; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh;
  overflow: hidden;
}
.dn-sidebar > .dn-nav-scroll {
  flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px;
  margin: 0 -12px; padding: 0 12px;
}
.dn-sidebar > .dn-nav-footer {
  flex-shrink: 0; margin: 0 -12px; padding: 10px 12px 12px;
  background: var(--bg-elev); border-top: 1px solid var(--border);
}
[data-sidebar="collapsed"] .dn-sidebar { padding: 14px 8px; }
[data-sidebar="collapsed"] .dn-sidebar .sidebar-label,
[data-sidebar="collapsed"] .dn-sidebar .dn-nav-section,
[data-sidebar="collapsed"] .dn-sidebar-brand .name,
[data-sidebar="collapsed"] .dn-sidebar-brand .sub { display: none; }
[data-sidebar="collapsed"] .dn-nav-link { justify-content: center; padding: 10px 0; }
[data-sidebar="collapsed"] .dn-sidebar-brand { justify-content: center; }
.dn-sidebar-brand {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px 14px;
  border-bottom: 1px solid var(--border); margin-bottom: 10px;
}
.dn-sidebar-brand img { width: 32px; height: 32px; border-radius: 8px; }
.dn-sidebar-brand .name { font-weight: 700; letter-spacing: -.01em; font-size: 15px; }
.dn-sidebar-brand .sub { font-size: 11px; color: var(--text-dim); }

.dn-nav-section { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-dim); padding: 12px 10px 4px; font-weight: 700; }
.dn-nav-link {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: 8px; color: var(--text-muted); font-weight: 500; cursor: pointer;
  transition: all .12s;
}
.dn-nav-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.dn-nav-link:hover { background: var(--bg-hover); color: var(--text); }
.dn-nav-link.active { background: var(--vinho-soft); color: var(--primary); font-weight: 600; }
.dn-nav-link.active svg { color: var(--primary); }

.dn-main { display: flex; flex-direction: column; min-width: 0; }
.dn-topbar {
  height: 60px; padding: 0 24px; border-bottom: 1px solid var(--border);
  background: var(--header-bg); backdrop-filter: blur(8px);
  display: flex; align-items: center; gap: 14px; position: sticky; top: 0; z-index: 30;
}
.dn-topbar h1 { font-size: 17px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.dn-content { padding: 24px; }

/* ---------- Tabs ---------- */
.dn-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); }
.dn-tab {
  padding: 10px 14px; color: var(--text-muted); font-weight: 600; font-size: 13px;
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.dn-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ---------- Table ---------- */
.dn-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dn-table th { text-align: left; font-weight: 600; color: var(--text-muted);
  padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .04em; }
.dn-table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.dn-table tr:hover td { background: var(--bg-hover); }

/* ---------- Pipeline / Kanban ---------- */
.dn-kanban {
  display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px;
  scroll-behavior: smooth;
}
.dn-column {
  flex: 0 0 300px; background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 220px);
}
.dn-column-head {
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px; position: sticky; top: 0;
  background: var(--bg-elev); border-radius: var(--radius) var(--radius) 0 0; z-index: 1;
}
.dn-column-head .name { font-weight: 700; font-size: 13.5px; flex: 1; }
.dn-column-head .count { color: var(--text-muted); font-size: 12px; }
.dn-column-head .total { color: var(--text-dim); font-size: 11.5px; margin-left: 4px; }
.dn-column-body {
  padding: 10px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; flex: 1;
}

.dn-leadcard {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px; cursor: grab;
  transition: all .12s ease; display: flex; flex-direction: column; gap: 8px;
}
.dn-leadcard:hover { border-color: var(--border-strong); box-shadow: var(--shadow-2); transform: translateY(-1px); }
.dn-leadcard.sortable-chosen { box-shadow: var(--shadow-3); }
.dn-leadcard .row1 { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.dn-leadcard .name { font-weight: 600; font-size: 13.5px; line-height: 1.3; }
.dn-leadcard .company { font-size: 11.5px; color: var(--text-muted); }
.dn-leadcard .value { font-weight: 700; color: var(--primary); font-size: 13px; }
.dn-leadcard .meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 11px; color: var(--text-muted); }
.dn-leadcard .meta svg { width: 13px; height: 13px; }
.dn-leadcard .footer {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border-top: 1px solid var(--border); padding-top: 8px; margin-top: 4px;
}
.dn-leadcard .ai-pill {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px;
  padding: 2px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent);
}
.dn-leadcard .score-bar {
  height: 4px; background: var(--bg-elev-2); border-radius: 2px; overflow: hidden; flex: 1;
}
.dn-leadcard .score-bar > i {
  display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--primary));
}

/* ---------- Conversations / Chat ---------- */
.dn-chat { display: grid; grid-template-columns: 320px 1fr 360px; height: calc(100vh - 60px); }
.dn-chat-list { background: var(--bg-elev); border-right: 1px solid var(--border); overflow-y: auto; }
.dn-chat-item {
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  display: flex; gap: 10px; cursor: pointer;
}
.dn-chat-item:hover { background: var(--bg-hover); }
.dn-chat-item.active { background: var(--vinho-soft); }
.dn-chat-item .preview { font-size: 12px; color: var(--text-muted); max-width: 200px; }

.dn-chat-window { display: flex; flex-direction: column; min-width: 0; }
.dn-chat-head { height: 56px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px; padding: 0 16px; }
.dn-chat-body { flex: 1; overflow-y: auto; padding: 16px; background:
  linear-gradient(180deg, var(--bg) 0%, var(--bg-elev) 100%); }
.dn-bubble { max-width: 65%; padding: 9px 12px; border-radius: 12px; margin-bottom: 6px; font-size: 13.5px;
  word-wrap: break-word; }
.dn-bubble.in {
  background: var(--bg-elev); border: 1px solid var(--border); border-bottom-left-radius: 4px;
  margin-right: auto;
}
.dn-bubble.out {
  background: var(--primary); color: var(--primary-fg); border-bottom-right-radius: 4px;
  margin-left: auto;
}
.dn-bubble .when { font-size: 10.5px; opacity: .7; margin-top: 4px; }
.dn-chat-input {
  border-top: 1px solid var(--border); padding: 12px 16px;
  display: flex; gap: 10px; align-items: flex-end;
}
.dn-chat-input textarea {
  flex: 1; border: 1px solid var(--border); background: var(--bg-elev);
  border-radius: var(--radius-sm); padding: 9px 12px; color: var(--text);
  resize: none; max-height: 140px; min-height: 42px;
}

.dn-chat-side { background: var(--bg-elev); border-left: 1px solid var(--border); overflow-y: auto; padding: 16px; }
.dn-copilot-suggestion {
  background: linear-gradient(135deg, var(--vinho-soft), var(--accent-soft));
  border: 1px solid var(--accent-soft); border-radius: var(--radius-sm); padding: 12px;
  position: relative;
}
.dn-copilot-suggestion .ai-tag {
  position: absolute; top: -8px; left: 12px;
  background: var(--primary); color: var(--primary-fg); font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px; letter-spacing: .04em;
}

/* ---------- Toggles ---------- */
.dn-switch { position: relative; display: inline-block; width: 38px; height: 22px; }
.dn-switch input { opacity: 0; width: 0; height: 0; }
.dn-switch span {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: 999px; transition: .2s;
}
.dn-switch span::before {
  content: ""; position: absolute; height: 16px; width: 16px; left: 2px; top: 2px;
  background: var(--text-muted); border-radius: 50%; transition: .2s;
}
.dn-switch input:checked + span { background: var(--primary); border-color: var(--primary); }
.dn-switch input:checked + span::before { transform: translateX(16px); background: #fff; }

/* ---------- Toasts ---------- */
.dn-toast-stack { position: fixed; top: 16px; right: 16px; z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.dn-toast {
  background: var(--bg-elev-2); border: 1px solid var(--border);
  padding: 10px 14px; border-radius: var(--radius-sm); box-shadow: var(--shadow-2);
  display: flex; align-items: center; gap: 10px; font-size: 13px;
  animation: slidein .25s ease;
}
@keyframes slidein { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ---------- Public / Landing ---------- */
.dn-hero {
  position: relative; padding: 90px 0 60px;
  background: radial-gradient(1100px 600px at 80% -10%, rgba(122,31,43,.22), transparent 60%),
              radial-gradient(800px 400px at 0% 110%, rgba(168,200,232,.12), transparent 60%);
}
.dn-hero h1 {
  font-size: 56px; line-height: 1.05; letter-spacing: -.025em; font-weight: 800; margin: 0 0 18px;
  background: linear-gradient(180deg, var(--text), var(--text-muted));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.dn-hero .lead { font-size: 18px; color: var(--text-muted); max-width: 620px; line-height: 1.55; }
.dn-hero .pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px;
  background: var(--vinho-soft); border: 1px solid var(--vinho-soft); color: var(--primary);
  font-size: 12px; font-weight: 600; letter-spacing: .02em; margin-bottom: 18px;
}
.dn-features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; padding: 40px 0;
}
.dn-feature {
  padding: 22px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); transition: all .2s;
}
.dn-feature:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: var(--shadow-2); }
.dn-feature .ico {
  width: 38px; height: 38px; border-radius: 10px; background: var(--vinho-soft);
  display: inline-flex; align-items: center; justify-content: center; color: var(--primary); margin-bottom: 12px;
}
.dn-feature h3 { margin: 0 0 6px; font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.dn-feature p { margin: 0; color: var(--text-muted); font-size: 13.5px; line-height: 1.55; }

/* ---------- Login (premium) ---------- */
.dn-login-wrap {
  min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr;
}
.dn-login-side {
  background: linear-gradient(135deg, var(--vinho-700) 0%, var(--vinho-900) 70%);
  color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.dn-login-side::before {
  content: ""; position: absolute; inset: -50%;
  background: radial-gradient(closest-side, rgba(168,200,232,.18), transparent 60%),
              radial-gradient(closest-side at 80% 90%, rgba(255,255,255,.06), transparent 60%);
  pointer-events: none;
}
.dn-login-form {
  display: flex; align-items: center; justify-content: center; padding: 40px;
  background: var(--bg);
}
.dn-login-card {
  width: 100%; max-width: 420px; padding: 36px;
}
.dn-login-card h2 { font-size: 26px; letter-spacing: -.02em; margin: 0 0 6px; }
.dn-login-card p.lead { color: var(--text-muted); margin: 0 0 24px; font-size: 14px; }
@media (max-width: 900px) {
  .dn-login-wrap { grid-template-columns: 1fr; }
  .dn-login-side { display: none; }
}

/* ---------- Misc ---------- */
.dn-empty {
  padding: 40px 20px; text-align: center; color: var(--text-muted);
  border: 1px dashed var(--border); border-radius: var(--radius);
}
.kbd { font-family: 'JetBrains Mono', monospace; font-size: 11px;
  padding: 2px 6px; border-radius: 4px; background: var(--bg-elev-2); border: 1px solid var(--border); }

/* ============== RESPONSIVO ============== */

/* Tablet (≤ 1024px) */
@media (max-width: 1024px) {
  .dn-app { grid-template-columns: 64px 1fr; }
  .dn-sidebar .sidebar-label,
  .dn-sidebar .dn-nav-section,
  .dn-sidebar-brand .name,
  .dn-sidebar-brand .sub { display: none; }
  .dn-nav-link { justify-content: center; padding: 10px 0; }
  .dn-sidebar-brand { justify-content: center; padding: 8px 0 14px; }
  [data-sidebar="collapsed"] .dn-app { grid-template-columns: 64px 1fr; }
  .dn-chat { grid-template-columns: 280px 1fr; }
  .dn-chat-side { display: none; }
  .dn-hero h1 { font-size: 42px; }
  .dn-hero { padding: 60px 0 40px; }
  .dn-content { padding: 18px; }
}

/* Mobile (≤ 768px) */
@media (max-width: 768px) {
  body { font-size: 13.5px; }
  .dn-container { padding: 0 16px; }

  /* Sidebar vira drawer */
  .dn-app { grid-template-columns: 1fr; }
  .dn-sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 240px;
    z-index: 100; transform: translateX(-100%); transition: transform .2s;
    box-shadow: var(--shadow-3);
  }
  [data-sidebar="open"] .dn-sidebar { transform: translateX(0); }
  [data-sidebar="open"]::after {
    content:""; position:fixed; inset:0; background:rgba(0,0,0,.55); z-index:90;
  }
  .dn-sidebar .sidebar-label,
  .dn-sidebar .dn-nav-section,
  .dn-sidebar-brand .name,
  .dn-sidebar-brand .sub { display: revert; }
  .dn-sidebar-brand .name { display: block; }
  .dn-nav-link { justify-content: flex-start; padding: 8px 10px; }
  .dn-sidebar-brand { justify-content: flex-start; }

  .dn-topbar { height: 56px; padding: 0 14px; gap: 8px; }
  .dn-topbar h1 { font-size: 14.5px; }
  .dn-content { padding: 14px; }

  /* Hero */
  .dn-hero { padding: 48px 0 30px; }
  .dn-hero h1 { font-size: 30px; line-height: 1.1; }
  .dn-hero .lead { font-size: 15px; }

  /* Features grid: 1 coluna */
  .dn-features { grid-template-columns: 1fr; }

  /* Diferenciais: 1 coluna */
  #diferenciais > div, #planos > div, #features > div { grid-template-columns: 1fr !important; }

  /* Login: empilha (sidebar some) */
  .dn-login-wrap { grid-template-columns: 1fr; }
  .dn-login-side { display: none; }
  .dn-login-card { padding: 24px; }
  .dn-login-card h2 { font-size: 22px; }

  /* Tabela rolante */
  .dn-table { font-size: 12.5px; }
  .dn-table th, .dn-table td { padding: 8px 6px; }
  .dn-card-pad { padding: 14px; }

  /* Kanban: deixa scroll horizontal natural, colunas mais estreitas */
  .dn-column { flex: 0 0 280px; }

  /* Chat: 1 coluna por vez (lista OU window) */
  .dn-chat { grid-template-columns: 1fr; height: calc(100vh - 56px); margin: -14px !important; }
  .dn-chat-list { display: none; }
  .dn-chat-side { display: none; }
  [data-chat-view="list"] .dn-chat-list { display: block; }
  [data-chat-view="list"] .dn-chat-window { display: none; }

  /* Header público */
  .dn-hero h1 { background-size: 100% 100%; }
  header nav { gap: 14px !important; }
  header nav a:not(.dn-btn) { display: none; }

  /* Forms em grid 2-col viram 1-col */
  form > div[style*="grid-template-columns:1fr 1fr"],
  form > div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

/* Mobile pequeno (≤ 480px) */
@media (max-width: 480px) {
  .dn-hero h1 { font-size: 26px; }
  .dn-btn { padding: 8px 12px; font-size: 13px; }
  .dn-btn-lg { padding: 11px 18px; font-size: 14px; }
}
