/* ═══════════════════════════════════════════════
   LEONAUTA ADMIN — admin.css
   Paleta: #0a1628 base · #a3e635 accent · #f8fafc text
═══════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0a1628;
  --bg2:       #0d1b2e;
  --bg3:       #152338;
  --panel:     #111f35;
  --border:    rgba(255,255,255,.07);
  --accent:    #a3e635;
  --accent2:   #86d10f;
  --text:      #f8fafc;
  --text2:     #94a3b8;
  --text3:     #64748b;
  --danger:    #ef4444;
  --success:   #22c55e;
  --warn:      #f59e0b;
  --info:      #3b82f6;
  --purple:    #8b5cf6;
  --pink:      #ec4899;
  --sidebar-w: 240px;
  --topbar-h:  60px;
  --radius:    10px;
  --radius-sm: 6px;
}

/* ═══ TEMA CLARO ═══ */
[data-theme="light"] {
  --bg:        #f1f5f9;
  --bg2:       #ffffff;
  --bg3:       #e2e8f0;
  --panel:     #ffffff;
  --border:    rgba(0,0,0,.08);
  --text:      #0f172a;
  --text2:     #475569;
  --text3:     #94a3b8;
  --accent:    #65a30d;
  --accent2:   #4d7c0f;
}

[data-theme="light"] .login-overlay { background: var(--bg); }
[data-theme="light"] .login-btn { color: #fff; }
[data-theme="light"] .btn-save { color: #fff; }
[data-theme="light"] .modal__avatar,
[data-theme="light"] .k-card__avatar,
[data-theme="light"] .cell-avatar,
[data-theme="light"] .recent-lead__avatar { color: #fff; }
[data-theme="light"] .confirm-modal__btn--confirm { color: #fff; }

html, body { height: 100%; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
}

/* ═══════════ LOGIN ═══════════ */
.login-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.login-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 36px;
  width: 360px;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0,0,0,.5);
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.login-logo__icon { width: 40px; height: 40px; }

.login-logo__text {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.5px;
}

.login-logo__sub { color: var(--accent); }

.login-desc {
  color: var(--text2);
  font-size: 13px;
  margin-bottom: 28px;
}

.login-field { margin-bottom: 12px; }

.login-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
}

.login-input:focus { border-color: var(--accent); }

.login-error {
  color: var(--danger);
  font-size: 12px;
  margin-bottom: 12px;
  display: none;
}

.login-error.visible { display: block; }

.login-btn {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: #0a1628;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s, transform .1s;
}

.login-btn:hover { background: var(--accent2); }
.login-btn:active { transform: scale(.98); }

.login-back {
  display: block;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text2);
  text-decoration: none;
  transition: color .2s;
}
.login-back:hover { color: var(--accent); }

/* ═══════════ APP SHELL ═══════════ */
.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ═══════════ SIDEBAR ═══════════ */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, width .25s ease;
  z-index: 100;
  flex-shrink: 0;
}

.sidebar.collapsed {
  transform: translateX(calc(-1 * var(--sidebar-w)));
  position: fixed;
  height: 100%;
}

.sidebar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px;
  border-bottom: 1px solid var(--border);
}

.sidebar__logo-icon { width: 32px; height: 32px; }

.sidebar__logo-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.5px;
  line-height: 1.1;
}

.sidebar__logo-sub {
  display: block;
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
}

.sidebar__nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 10px;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text2);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, color .15s;
  width: 100%;
  text-align: left;
}

.sidebar__link svg { width: 16px; height: 16px; flex-shrink: 0; }

.sidebar__link:hover {
  background: var(--bg3);
  color: var(--text);
}

.sidebar__link.active {
  background: rgba(163, 230, 53, .12);
  color: var(--accent);
}

.sidebar__footer {
  padding: 10px;
  border-top: 1px solid var(--border);
}

.sidebar__logout {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text3);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, color .15s;
  width: 100%;
}

.sidebar__logout svg { width: 16px; height: 16px; }
.sidebar__logout:hover { background: rgba(239,68,68,.1); color: var(--danger); }

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

/* ═══════════ TOPBAR ═══════════ */
.topbar {
  height: var(--topbar-h);
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  flex-shrink: 0;
}

.topbar__menu {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  color: var(--text2);
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.topbar__menu:hover { background: var(--bg3); color: var(--text); }
.topbar__menu svg { width: 20px; height: 20px; }

.topbar__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.topbar__actions { display: flex; align-items: center; gap: 10px; }

.btn-seed {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s;
}

.btn-seed svg { width: 14px; height: 14px; }
.btn-seed:hover { border-color: var(--accent); color: var(--accent); }

.topbar__badge {
  padding: 4px 12px;
  background: rgba(163,230,53,.1);
  border: 1px solid rgba(163,230,53,.2);
  border-radius: 20px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

/* ═══════════ VIEWS ═══════════ */
.view {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.view.active { display: flex; flex-direction: column; gap: 20px; }

/* scrollbar */
.view::-webkit-scrollbar { width: 6px; }
.view::-webkit-scrollbar-track { background: transparent; }
.view::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 3px; }

/* ═══════════ DASHBOARD ═══════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color .2s;
}

.stat-card:hover { border-color: rgba(163,230,53,.2); }

.stat-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-card__icon svg { width: 22px; height: 22px; }

.stat-card__value {
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}

.stat-card__label {
  font-size: 12px;
  color: var(--text2);
  margin-top: 4px;
}

.dash-row {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
}

.dash-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.dash-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.dash-panel__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.dash-panel__link {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}

.dash-panel__link:hover { text-decoration: underline; }

/* recent leads list */
.recent-lead {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .15s;
}

.recent-lead:last-child { border-bottom: none; }
.recent-lead:hover { background: rgba(255,255,255,.02); }

.recent-lead__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  color: #0a1628;
}

.recent-lead__info { flex: 1; min-width: 0; }

.recent-lead__name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-lead__sub {
  font-size: 11px;
  color: var(--text3);
  margin-top: 1px;
}

.recent-lead__time {
  font-size: 11px;
  color: var(--text3);
  flex-shrink: 0;
}

/* service chart */
.service-bar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.service-bar-label {
  font-size: 12px;
  color: var(--text2);
  width: 80px;
  flex-shrink: 0;
}

.service-bar-track {
  flex: 1;
  height: 6px;
  background: var(--bg3);
  border-radius: 3px;
  overflow: hidden;
}

.service-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .6s ease;
}

.service-bar-count {
  font-size: 12px;
  color: var(--text2);
  width: 20px;
  text-align: right;
  flex-shrink: 0;
}

/* ═══════════ PIPELINE ═══════════ */
.view--pipeline.active {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
}

.pipeline-board {
  display: flex;
  gap: 14px;
  height: 100%;
  min-width: max-content;
  align-items: flex-start;
}

.pipeline-col {
  width: 240px;
  flex-shrink: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - var(--topbar-h) - 48px);
}

.pipeline-col.drag-over {
  border-color: var(--accent);
  background: rgba(163,230,53,.04);
}

.pipeline-col__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

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

.pipeline-col__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  margin-left: 8px;
}

.pipeline-col__count {
  font-size: 11px;
  background: var(--bg3);
  color: var(--text2);
  padding: 2px 7px;
  border-radius: 10px;
}

.pipeline-col__cards {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 80px;
}

.pipeline-col__cards::-webkit-scrollbar { width: 4px; }
.pipeline-col__cards::-webkit-scrollbar-thumb { background: var(--bg3); }

.pipeline-col__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  color: var(--text3);
  font-size: 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
}

/* kanban card */
.k-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  user-select: none;
}

.k-card:hover {
  border-color: rgba(255,255,255,.15);
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
}

.k-card.dragging {
  opacity: .4;
}

.k-card[data-waiting="true"] {
  border-left: 3px solid var(--warn);
  position: relative;
}

.k-card[data-waiting="true"]::after {
  content: '⏳ Aguardando Resposta';
  display: block;
  font-size: 10px;
  color: var(--warn);
  background: rgba(245,158,11,.1);
  border: 1px solid rgba(245,158,11,.2);
  padding: 4px 6px;
  border-radius: 4px;
  margin-top: 10px;
  text-align: center;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.k-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.k-card__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #0a1628;
  flex-shrink: 0;
}

.k-card__priority {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 3px;
}

.k-card__name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.k-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.k-card__time {
  font-size: 10px;
  color: var(--text3);
}

/* ═══════════ CLIENTES ═══════════ */
.clientes-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text3);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
}

.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text3); }

.filter-group { display: flex; gap: 8px; }

.filter-select {
  padding: 9px 36px 9px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: all .2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
}

.filter-select:hover { border-color: rgba(163,230,53,.3); color: var(--text); }
.filter-select:focus { border-color: var(--accent); color: var(--text); box-shadow: 0 0 0 3px rgba(163,230,53,.1); }
.filter-select option { background: #1a2d4a; color: #f8fafc; }

.table-wrap { overflow-x: auto; }

.leads-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.leads-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
}

.leads-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text);
  vertical-align: middle;
}

.leads-table th:last-child,
.leads-table td:last-child {
  text-align: right;
  width: 100px;
}
.leads-table tbody tr { border-bottom: 1px solid var(--border); transition: background .15s; }
.leads-table tbody tr:hover { background: rgba(255,255,255,.02); }
.leads-table tbody tr.row-waiting { background: rgba(245, 158, 11, 0.06); }
.leads-table tbody tr.row-waiting:hover { background: rgba(245, 158, 11, 0.12); }
.leads-table tbody tr.row-active { background: rgba(163, 230, 53, 0.06); }
.leads-table tbody tr.row-active:hover { background: rgba(163, 230, 53, 0.12); }

.cell-client { display: flex; align-items: center; gap: 10px; }

.cell-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #0a1628;
  flex-shrink: 0;
}

.cell-name { font-weight: 500; }

.cell-email {
  font-size: 11px;
  color: var(--text3);
  margin-top: 1px;
}

.table-empty {
  padding: 48px;
  text-align: center;
  color: var(--text3);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.table-empty svg { width: 32px; height: 32px; }

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

/* service badges */
.badge--sites    { background: rgba(59,130,246,.15);  color: #60a5fa; }
.badge--apps     { background: rgba(139,92,246,.15);  color: #a78bfa; }
.badge--sistemas { background: rgba(245,158,11,.15);  color: #fbbf24; }
.badge--branding { background: rgba(236,72,153,.15);  color: #f472b6; }

/* status badges */
.badge--novo       { background: rgba(100,116,139,.15); color: #94a3b8; }
.badge--analise    { background: rgba(59,130,246,.15);  color: #60a5fa; }
.badge--proposta   { background: rgba(245,158,11,.15);  color: #fbbf24; }
.badge--negociacao { background: rgba(139,92,246,.15);  color: #a78bfa; }
.badge--ativo      { background: rgba(163,230,53,.15);  color: #a3e635; }
.badge--concluido  { background: rgba(34,197,94,.15);   color: #4ade80; }

/* priority */
.priority--low    { background: #22c55e; }
.priority--medium { background: #f59e0b; }
.priority--high   { background: #ef4444; }

/* avatar colors by service */
.av--sites    { background: #3b82f6; }
.av--apps     { background: #8b5cf6; }
.av--sistemas { background: #f59e0b; }
.av--branding { background: #ec4899; }

/* table action buttons */
.tbl-actions { display: flex; gap: 6px; }

.tbl-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text2);
  cursor: pointer;
  transition: all .15s;
}

.tbl-btn:hover { border-color: var(--accent); color: var(--accent); }
.tbl-btn svg { width: 14px; height: 14px; }

.tbl-btn--danger:hover { border-color: var(--danger); color: var(--danger); }

/* ═══════════ MODAL ═══════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 32px 100px rgba(0,0,0,.6);
}

.modal::-webkit-scrollbar { width: 4px; }
.modal::-webkit-scrollbar-thumb { background: var(--bg3); }

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}

.modal__close:hover { border-color: var(--danger); color: var(--danger); }
.modal__close svg { width: 14px; height: 14px; }

.modal__header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 56px 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #0a1628;
  flex-shrink: 0;
}

.modal__info { flex: 1; }

.modal__name { font-size: 18px; font-weight: 700; color: var(--text); }

.modal__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.modal__meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text2);
}

.modal__meta-item svg { width: 12px; height: 12px; }

.modal__meta-wa {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 3px 7px;
  background: var(--accent);
  color: #0a1628;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity .15s;
}

.modal__meta-wa:hover { opacity: .85; }

[data-theme="light"] .modal__meta-wa { color: #0a1628; }

.modal__body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0;
  padding: 0;
}

.modal__col--main {
  border-right: 1px solid var(--border);
  padding: 20px 24px;
}

.modal__col--comments {
  padding: 20px 20px;
  display: flex;
  flex-direction: column;
}

.modal__section { margin-bottom: 20px; }

.modal__section:last-child { margin-bottom: 0; }

.modal__section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 12px;
}

.modal__dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.modal__dl-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

.modal__dl-item--full { grid-column: 1 / -1; }

.modal__dl dt {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text3);
}

.modal__dl dd {
  font-size: 13px;
  color: var(--text);
  word-break: break-word;
  line-height: 1.4;
}

.modal__field-group { margin-bottom: 14px; }

.modal__label {
  display: block;
  font-size: 11px;
  color: var(--text3);
  margin-bottom: 6px;
}

.modal__select {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: border-color .2s;
}

.modal__select:focus { border-color: var(--accent); }
.modal__select option { background: var(--panel); }

.modal__priority-btns {
  display: flex;
  gap: 6px;
}

.priority-btn {
  flex: 1;
  padding: 7px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s;
}

.priority-btn.active[data-priority="low"]    { background: rgba(34,197,94,.15);  border-color: #22c55e; color: #4ade80; }
.priority-btn.active[data-priority="medium"] { background: rgba(245,158,11,.15); border-color: #f59e0b; color: #fbbf24; }
.priority-btn.active[data-priority="high"]   { background: rgba(239,68,68,.15);  border-color: #ef4444; color: #f87171; }

.modal__notes {
  width: 100%;
  min-height: 100px;
  padding: 10px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  outline: none;
  transition: border-color .2s;
}

.modal__field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal__section-actions {
  display: flex;
  gap: 8px;
}

.btn-generate-proposal {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(163,230,53,.1);
  border: 1px solid rgba(163,230,53,.3);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
}

.btn-generate-proposal:hover {
  background: var(--accent);
  color: #0a1628;
}

.modal__proposal-history {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}

.modal__sub-title {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text3);
  letter-spacing: .5px;
  margin-bottom: 12px;
}

.proposal-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.proposal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.proposal-item__info {
  display: flex;
  flex-direction: column;
}

.proposal-item__title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.proposal-item__date {
  font-size: 10px;
  color: var(--text3);
}

.btn-download-proposal {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background .2s;
}

.btn-download-proposal:hover {
  background: rgba(163,230,53,.1);
}
.modal__notes::placeholder { color: var(--text3); }

.modal__section--danger { margin-top: 8px; }

.btn-delete {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.2);
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s;
}

.btn-delete:hover { background: rgba(239,68,68,.15); border-color: var(--danger); }
.btn-delete svg { width: 14px; height: 14px; }

.modal__footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}

.btn-save {
  padding: 10px 24px;
  background: var(--accent);
  color: #0a1628;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, transform .1s;
}

.btn-save:hover { background: var(--accent2); }
.btn-save:active { transform: scale(.98); }
.btn-save.saved { background: var(--success); color: #fff; }

/* ═══════════ MODAL INPUT ═══════════ */
.modal__input {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
}
.modal__input:focus { border-color: var(--accent); }
.modal__input::placeholder { color: var(--text3); }

/* ═══════════ NEGOTIATION ═══════════ */
.modal__section--negotiation {
  border: 1px solid rgba(245,158,11,.2);
  background: rgba(245,158,11,.04);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 16px;
}

.modal__section--negotiation .modal__section-header {
  margin-bottom: 0;
}

.modal__section--negotiation .modal__section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text2);
}

/* Botão "Preencher Orçamento" */
.btn-toggle-neg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.btn-toggle-neg:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(163,230,53,.08);
}

/* Botão "Proposta Aceita (Projeto Fechado!)" */
.btn-accept-proposal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 12px;
  padding: 10px 16px;
  background: rgba(34,197,94,.1);
  border: 1px solid rgba(34,197,94,.35);
  border-radius: var(--radius-sm);
  color: #22c55e;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s;
}
.btn-accept-proposal:hover {
  background: #22c55e;
  color: #0a1628;
}

/* Histórico de propostas — espaçamento */
.proposal-history {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

/* ═══════════ COMMENTS ═══════════ */
.comment-input-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.comment-input {
  width: 100%;
  min-height: 72px;
  padding: 10px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  outline: none;
  transition: border-color .2s;
}

.comment-input:focus { border-color: var(--accent); }
.comment-input::placeholder { color: var(--text3); }

.comment-send {
  align-self: flex-end;
  padding: 7px 18px;
  background: var(--accent);
  color: #0a1628;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s;
}

.comment-send:hover { background: var(--accent2); }

[data-theme="light"] .comment-send { color: #fff; }

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.comment-item {
  display: flex;
  gap: 10px;
}

.comment-item__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #0a1628;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.comment-item__body { flex: 1; }

.comment-item__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.comment-item__author {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.comment-item__time {
  font-size: 11px;
  color: var(--text3);
}

.comment-item__text {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
  word-break: break-word;
  background: var(--bg3);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

.comment-item__remove {
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  transition: color .15s;
  margin-left: auto;
  flex-shrink: 0;
}

.comment-item__remove:hover { color: var(--danger); }

.comment-empty {
  font-size: 12px;
  color: var(--text3);
  text-align: center;
  padding: 20px 0;
}

/* ═══════════ CHECKLIST ═══════════ */
.modal__section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.modal__section-header .modal__section-title { margin-bottom: 0; }

.checklist-new-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-size: 11px;
  font-family: inherit;
  padding: 4px 10px;
  cursor: pointer;
  transition: all .15s;
}
.checklist-new-btn:hover { border-color: var(--accent); color: var(--accent); }

.checklist-new-form {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.checklist-block {
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg3);
}

.checklist-block__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 0;
}

.checklist-block__name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.checklist-block__progress {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(163,230,53,.1);
  border-radius: 99px;
  padding: 2px 8px;
  min-width: 36px;
  text-align: center;
}

.checklist-block__delete {
  width: 22px;
  height: 22px;
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color .15s, background .15s;
  flex-shrink: 0;
}
.checklist-block__delete:hover { color: var(--danger); background: rgba(239,68,68,.1); }

.checklist-progress-bar {
  height: 4px;
  background: rgba(255,255,255,.07);
  margin: 10px 14px 0;
  border-radius: 0;
  overflow: hidden;
}

.checklist-progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width .35s ease;
}

.checklist-block .checklist-list {
  padding: 8px 14px 0;
}

.checklist-block .checklist-add {
  display: flex;
  gap: 6px;
  padding: 8px 14px 10px;
  margin: 0;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,.1);
}

.checklist-add {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.checklist-add__input {
  flex: 1;
  padding: 8px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 12px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
}
.checklist-add__input:focus { border-color: var(--accent); }
.checklist-add__input::placeholder { color: var(--text3); }

.checklist-block .checklist-add__input {
  background: transparent;
  border-color: transparent;
  font-size: 12px;
}
.checklist-block .checklist-add__input:focus { border-color: var(--accent); background: var(--bg3); }

.checklist-add__btn {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  color: #0a1628;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  flex-shrink: 0;
}
.checklist-add__btn:hover { background: var(--accent2); }
.checklist-add__btn svg { width: 14px; height: 14px; }

.checklist-list { display: flex; flex-direction: column; gap: 4px; }

.checklist-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: var(--bg3);
  border-radius: var(--radius-sm);
  transition: background .15s;
}

.checklist-item:hover { background: rgba(255,255,255,.06); }

.checklist-item__check {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.checklist-item__text {
  flex: 1;
  font-size: 12px;
  color: var(--text);
  line-height: 1.4;
}

.checklist-item__text--done {
  text-decoration: line-through;
  color: var(--text3);
}

.checklist-item__remove {
  width: 20px;
  height: 20px;
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color .15s, background .15s;
  flex-shrink: 0;
}
.checklist-item__remove:hover { color: var(--danger); background: rgba(239,68,68,.1); }

/* ═══════════ ATTACHMENTS ═══════════ */
.attachment-area { margin-bottom: 10px; }

.attachment-upload {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text3);
  font-size: 12px;
  cursor: pointer;
  transition: all .2s;
}
.attachment-upload:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(163,230,53,.04);
}
.attachment-upload svg { width: 18px; height: 18px; }

.attachment-list { display: flex; flex-direction: column; gap: 4px; }

.attachment-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: var(--bg3);
  border-radius: var(--radius-sm);
}

.attachment-item__icon { font-size: 14px; flex-shrink: 0; }
.attachment-item__name {
  flex: 1;
  font-size: 12px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-item__remove {
  width: 20px;
  height: 20px;
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color .15s, background .15s;
  flex-shrink: 0;
}
.attachment-item__remove:hover { color: var(--danger); background: rgba(239,68,68,.1); }

/* ═══════════ TAG SELECTOR (in modal) ═══════════ */
.tag-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.tag-selector__item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text2);
  background: var(--bg3);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all .15s;
  user-select: none;
}

.tag-selector__item.active {
  background: color-mix(in srgb, var(--tag-clr) 18%, transparent);
  border-color: var(--tag-clr);
  color: var(--text);
}

.tag-selector__item:hover { border-color: var(--tag-clr, var(--accent)); }

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

.tag-selector__manage {
  width: 24px;
  height: 24px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.tag-selector__manage:hover { color: var(--accent); border-color: var(--accent); }

/* ═══════════ TAG MANAGER ═══════════ */
.tag-manager-form {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  margin-top: 16px;
}

.tag-color-picker {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg3);
  cursor: pointer;
  padding: 2px;
  flex-shrink: 0;
}

.tag-manager-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 200px;
  overflow-y: auto;
}

.tag-manager-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: var(--bg3);
  border-radius: var(--radius-sm);
}

.tag-manager-item__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tag-manager-item__name {
  flex: 1;
  font-size: 13px;
  color: var(--text);
}

/* ═══════════ KANBAN CARD TAGS ═══════════ */
.k-card__tags {
  display: flex;
  gap: 3px;
  margin-bottom: 6px;
  position: relative;
}

.k-card__tag {
  width: 22px;
  height: 4px;
  border-radius: 2px;
  display: inline-block;
}

.k-card__tags-tooltip {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  z-index: 20;
  min-width: 120px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}

.k-card__tags:hover .k-card__tags-tooltip { display: flex; flex-direction: column; gap: 4px; }

.k-card__tag-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text);
  white-space: nowrap;
}

.k-card__tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ═══════════ PROPOSAL SWITCHER ═══════════ */
.k-card__switcher {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .15s, background .15s;
  flex-shrink: 0;
  background: var(--bg3);
}
.k-card__switcher:hover { transform: scale(1.2); background: var(--border); }
.k-card__switcher-icon { font-size: 12px; line-height: 1; }

/* ═══════════ THEME TOGGLE ═══════════ */
.btn-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text2);
  cursor: pointer;
  transition: all .15s;
}
.btn-theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.btn-theme-toggle svg { width: 16px; height: 16px; }

/* ═══════════ CONFIRM MODAL ═══════════ */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* ═══════════ PDF TEMPLATE STYLES ═══════════ */
.pdf-container {
  font-family: 'Inter', 'Helvetica', 'Arial', sans-serif;
  color: #050d1a;
  background: #ffffff;
  padding: 40px;
  width: 800px; /* fixed width for pdf generation */
}

.pdf-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 3px solid #a3e635;
  padding-bottom: 20px;
  margin-bottom: 40px;
}

.pdf-logo {
  font-size: 32px;
  font-weight: 800;
  color: #0a1628;
  letter-spacing: -1px;
}

.pdf-date {
  font-size: 14px;
  color: #64748b;
}

.pdf-title {
  font-size: 24px;
  font-weight: 700;
  color: #0a1628;
  text-align: center;
  margin-bottom: 40px;
  letter-spacing: 2px;
}

.pdf-section {
  margin-bottom: 40px;
}

.pdf-subtitle {
  font-size: 14px;
  font-weight: 700;
  color: #a3e635;
  text-transform: uppercase;
  margin-bottom: 16px;
  letter-spacing: 1px;
  background: #0a1628;
  padding: 6px 12px;
  display: inline-block;
  border-radius: 4px;
}

.pdf-table {
  width: 100%;
  border-collapse: collapse;
}

.pdf-table th {
  text-align: left;
  padding: 12px;
  font-weight: 600;
  color: #1e3a5f;
  border-bottom: 1px solid #e2e8f0;
  width: 35%;
}

.pdf-table td {
  padding: 12px;
  color: #0f172a;
  border-bottom: 1px solid #e2e8f0;
}

.pdf-table--pricing th, .pdf-table--pricing td {
  background: #f8fafc;
}

.pdf-highlight {
  font-size: 20px;
  font-weight: 800;
  color: #a3e635 !important;
  background: #0a1628;
  border-radius: 4px;
  padding: 4px 12px !important;
  display: inline-block;
}

.pdf-notes {
  font-size: 14px;
  line-height: 1.6;
  color: #475569;
  background: #f1f5f9;
  padding: 16px;
  border-left: 4px solid #a3e635;
}

.pdf-footer {
  margin-top: 60px;
  border-top: 1px solid #e2e8f0;
  padding-top: 20px;
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
}

.confirm-modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0,0,0,.5);
}

.confirm-modal__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(245,158,11,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--warn);
}

.confirm-modal__icon svg { width: 24px; height: 24px; }

.confirm-modal__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.confirm-modal__desc {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 24px;
  line-height: 1.5;
}

.confirm-modal__actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.confirm-modal__btn {
  flex: 1;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s;
  border: none;
}

.confirm-modal__btn--cancel {
  background: var(--bg3);
  color: var(--text2);
  border: 1px solid var(--border);
}

.confirm-modal__btn--cancel:hover { color: var(--text); border-color: rgba(255,255,255,.15); }

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

.confirm-modal__btn--confirm:hover { background: #dc2626; }

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

/* ═══════════ CALENDAR VIEW ═══════════ */
.view--calendario.active {
  display: flex;
  flex-direction: column;
  padding: 24px;
  overflow: hidden; /* We'll let the grid scroll if needed */
}

.calendar-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  background: var(--panel);
  padding: 12px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.calendar-month-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  text-transform: capitalize;
}

.btn-cal-nav {
  padding: 8px 16px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text2);
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
}

.btn-cal-nav:hover {
  background: var(--accent);
  color: #0a1628;
  border-color: var(--accent);
}

.calendar-days-wrapper {
  flex: 1;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  display: flex;
  flex-direction: column;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-bottom: 1px solid var(--border);
}

.calendar-header-day {
  padding: 12px;
  text-align: center;
  font-weight: 600;
  color: var(--text2);
  font-size: 13px;
  border-right: 1px solid var(--border);
  background: var(--bg2);
}

.calendar-header-day:last-child {
  border-right: none;
}

.calendar-days {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-rows: minmax(100px, auto);
}

.calendar-day {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 8px;
  background: var(--panel);
  min-height: 100px;
  transition: background .2s;
}

.calendar-day:nth-child(7n) {
  border-right: none;
}

/* ═══════════ PRINT MEDIA QUERY (For PDF) ═══════════ */
@media print {
  body * {
    visibility: hidden;
  }
  
  body.print-mode {
    background: white;
  }
  
  #pdfTemplate, #pdfTemplate * {
    visibility: visible;
  }
  
  #pdfTemplate {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  
  .pdf-container {
    width: 100% !important;
    padding: 20px !important;
  }
}

.calendar-day:hover {
  background: rgba(255,255,255,.02);
}

.calendar-day.empty {
  background: var(--bg2);
  opacity: 0.5;
}

.calendar-day__number {
  font-size: 14px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 8px;
  display: inline-block;
  width: 24px;
  height: 24px;
  text-align: center;
  line-height: 24px;
  border-radius: 50%;
}

.calendar-day.today .calendar-day__number {
  background: var(--accent);
  color: #0a1628;
}

.calendar-leads {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

  .calendar-lead {
    font-size: 11px;
    padding: 4px 6px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all .2s;
    position: relative;
  }

  .calendar-lead-text {
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
  }

  .calendar-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: var(--panel);
    border: 1px solid var(--border);
    padding: 14px 16px;
    border-radius: var(--radius);
    min-width: 220px;
    max-width: 280px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: all 0.2s ease;
    border-left: 3px solid var(--tag-clr);
    text-align: left;
    white-space: normal;
  }

  .calendar-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0 6px;
    border-style: solid;
    border-color: var(--panel) transparent transparent transparent;
  }

  .calendar-lead:hover .calendar-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }

  .calendar-tooltip__name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
  }

  .calendar-tooltip__row {
    font-size: 11px;
    color: var(--text2);
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
  }

  .calendar-tooltip__row strong {
    color: var(--text);
    font-weight: 600;
  }

  .calendar-tooltip__action {
    font-size: 10px;
    color: var(--accent);
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid var(--border);
    text-align: center;
    opacity: 0.7;
  }

  .calendar-lead:hover {
    border-color: var(--accent);
    background: rgba(163,230,53,.1);
  }

.calendar-lead__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ═══════════ ORGANIZADOR INLINE FORMS ═══════════ */
.pipeline-col__head {
  position: relative; /* Base para o dropdown */
}

.org-col-menu-btn {
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  transition: all .2s;
}

.org-col-menu-btn:hover {
  background: rgba(255,255,255,.05);
  color: var(--text);
}

.org-dropdown {
  position: absolute;
  top: 100%;
  right: 14px;
  width: 220px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 100;
  padding: 12px;
  display: none; /* Animado via JS */
  flex-direction: column;
  gap: 12px;
}

.org-dropdown.active {
  display: flex;
  animation: modalIn .2s ease-out;
}

.org-dropdown__title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 4px;
}

.org-color-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.org-color-opt {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .2s;
}

.org-color-opt:hover {
  transform: scale(1.1);
}

.org-color-opt.active {
  border-color: #fff;
}

.org-dropdown__divider {
  height: 1px;
  background: var(--border);
}

.org-dropdown__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: background .2s;
}

.org-dropdown__item:hover {
  background: rgba(255,255,255,.05);
}

.org-dropdown__item--danger {
  color: #ef4444;
}

.org-dropdown__item--danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

.org-add-card-area {
  padding: 6px 0 0;
}

.org-add-card-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 8px 10px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text3);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s;
}
.org-add-card-trigger:hover {
  background: rgba(255,255,255,.04);
  color: var(--text);
}

.org-card-input,
.org-col-input {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg3);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
}
.org-card-input:focus,
.org-col-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(163,230,53,.15);
}
.org-card-input::placeholder,
.org-col-input::placeholder {
  color: var(--text3);
}

.org-add-card-confirm {
  padding: 6px 14px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  color: #0a1628;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity .15s;
}
.org-add-card-confirm:hover { opacity: .85; }

.org-add-card-cancel {
  padding: 6px 10px;
  background: none;
  border: none;
  color: var(--text3);
  font-size: 14px;
  cursor: pointer;
  transition: color .15s;
  font-family: inherit;
}
.org-add-card-cancel:hover { color: var(--text); }

.org-add-col-wrapper {
  min-width: 260px;
  flex-shrink: 0;
  align-self: flex-start;
}

.org-add-col-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 14px;
  background: rgba(255,255,255,.04);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text2);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s;
}
.org-add-col-trigger:hover {
  background: rgba(255,255,255,.08);
  border-color: var(--accent);
  color: var(--accent);
}
.org-add-col-trigger svg { width: 14px; height: 14px; }

.org-add-col-form {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}

@media (max-width: 800px) {
  :root { --sidebar-w: 220px; }

  .sidebar {
    position: fixed;
    height: 100%;
    transform: translateX(calc(-1 * var(--sidebar-w)));
    transition: transform .25s ease;
  }

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

  .topbar__menu { display: flex; }

  .view { padding: 16px; }

  .modal__body { grid-template-columns: 1fr; }
  .modal__col--main { border-right: none; border-bottom: 1px solid var(--border); }
  .modal__col--comments { padding: 20px 24px; }

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

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .clientes-toolbar { flex-direction: column; align-items: stretch; }
  .filter-group { flex-direction: column; }
  .modal__header { flex-direction: column; align-items: flex-start; }
  .modal__meta { flex-wrap: wrap; }
}
