/* sdrs-painel · estilo dark fernandobraga.pro */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg:        #000000;
  --bg-2:      #0a0a0a;
  --bg-3:      #141414;
  --text:      #ffffff;
  --text-2:    #a0a0a0;
  --text-3:    #666666;
  --line:      #1f1f1f;
  --line-2:    #2a2a2a;
  --accent:    #ffffff;
  --accent-soft:rgba(255,255,255,.06);
  --good:      #22c55e;
  --warn:      #f5b400;
  --bad:       #ef4444;
  --info:      #3b82f6;

  /* status badges */
  --s-novo:        #6366f1;
  --s-em-conversa: #06b6d4;
  --s-qualificado: #14b8a6;
  --s-agendado:    #f5b400;
  --s-avaliado:    #f97316;
  --s-fechado:     #22c55e;
  --s-perdido:     #6b7280;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-weight: 300;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -.005em;
  min-height: 100vh;
}

a { color: var(--text); text-decoration: none; }
a:hover { color: var(--text-2); }
button { font-family: inherit; cursor: pointer; }

.mono { font-family: 'JetBrains Mono', monospace; }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.lower { text-transform: lowercase; }
.upper { text-transform: uppercase; letter-spacing: .14em; font-size: 11px; font-weight: 500; }
.small { font-size: 12.5px; }

/* layout */
.shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  padding: 28px 22px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar .brand {
  font-size: 13px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 36px;
  font-weight: 500;
}
.sidebar .brand strong { color: var(--text); font-weight: 500; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: block;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 14px;
  color: var(--text-2);
  transition: all .15s ease;
}
.nav a:hover { background: var(--accent-soft); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--text); }
.nav-section {
  font-size: 10px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 24px 14px 8px;
  font-weight: 600;
}

.main { padding: 40px 48px 80px; max-width: 1200px; width: 100%; }
.page-title {
  font-size: 28px; font-weight: 400; letter-spacing: -.02em; margin-bottom: 6px;
}
.page-sub { color: var(--text-2); font-size: 14px; margin-bottom: 32px; }

/* topbar */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 36px;
}
.topbar .user { display: flex; gap: 12px; align-items: center; font-size: 13px; }
.topbar .logout {
  background: none; border: 1px solid var(--line-2); color: var(--text-2);
  padding: 6px 14px; border-radius: 4px; font-size: 12px;
}
.topbar .logout:hover { color: var(--text); border-color: var(--text-2); }

/* cards */
.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 22px 24px;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.stat .label {
  font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 8px; font-weight: 600;
}
.stat .value {
  font-size: 28px; font-weight: 300; letter-spacing: -.02em;
  font-family: 'JetBrains Mono', monospace;
}
.stat .sub {
  font-size: 11px; color: var(--text-3); margin-top: 4px; letter-spacing: .04em;
}

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--text);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .01em;
  transition: all .15s ease;
}
.btn:hover { border-color: var(--text); background: var(--accent-soft); }
.btn.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn.primary:hover { background: var(--text-2); color: var(--bg); }
.btn.danger { color: var(--bad); border-color: rgba(239,68,68,.3); }
.btn.danger:hover { border-color: var(--bad); background: rgba(239,68,68,.06); }
.btn.small { padding: 6px 12px; font-size: 12px; }

/* table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 4px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
th {
  background: var(--bg-2);
  color: var(--text-3);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
}
td { color: var(--text-2); }
td strong { color: var(--text); font-weight: 500; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-2); }
td.row-actions { text-align: right; white-space: nowrap; }

/* forms */
.field { margin-bottom: 18px; }
.field label {
  display: block; font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-3); margin-bottom: 6px; font-weight: 500;
}
input, select, textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color .15s ease;
}
input:focus, select:focus, textarea:focus { border-color: var(--text-2); }
textarea { resize: vertical; min-height: 80px; font-family: inherit; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-row.three { grid-template-columns: repeat(3, 1fr); }

/* status badges */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .04em;
  border: 1px solid currentColor;
  background: rgba(255,255,255,.02);
}
.badge.novo        { color: var(--s-novo); }
.badge.em-conversa { color: var(--s-em-conversa); }
.badge.qualificado { color: var(--s-qualificado); }
.badge.agendado    { color: var(--s-agendado); }
.badge.avaliado    { color: var(--s-avaliado); }
.badge.fechado     { color: var(--s-fechado); }
.badge.perdido     { color: var(--s-perdido); }

.temp { font-size: 11px; padding: 2px 8px; border-radius: 12px; }
.temp.frio  { color: #60a5fa; }
.temp.morno { color: #fbbf24; }
.temp.quente{ color: #f87171; }

/* kanban */
.kanban {
  display: grid;
  grid-template-columns: repeat(7, minmax(180px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 12px;
}
.kanban-col {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px;
  min-height: 200px;
}
.kanban-col h3 {
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
}
.kanban-col h3 .count {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text);
  font-weight: 500;
}
.kanban-card {
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 4px;
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  font-size: 13px;
  transition: all .15s;
}
.kanban-card:hover { border-color: var(--text-2); }
.kanban-card .name { font-weight: 500; color: var(--text); margin-bottom: 4px; }
.kanban-card .meta { font-size: 11px; color: var(--text-3); display: flex; gap: 8px; }

/* modal */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.75); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 24px;
}
.modal {
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px 32px;
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px;
}
.modal-head h2 { font-size: 18px; font-weight: 500; letter-spacing: -.01em; }
.modal .close {
  background: none; border: none; color: var(--text-3); font-size: 20px; cursor: pointer;
}
.modal .close:hover { color: var(--text); }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px;
  padding-top: 20px; border-top: 1px solid var(--line);
}

/* login */
.login-shell {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 24px;
}
.login-box {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 44px 40px;
  width: 100%;
  max-width: 380px;
}
.login-box h1 {
  font-size: 22px; font-weight: 400; letter-spacing: -.01em;
  margin-bottom: 4px;
}
.login-box .sub {
  font-size: 12px; color: var(--text-3);
  letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: 32px; font-weight: 500;
}
.login-box .btn { width: 100%; justify-content: center; padding: 12px; }
.login-error {
  color: var(--bad); font-size: 12.5px;
  margin-top: 14px; text-align: center;
}

/* utilities */
.flex { display: flex; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.text-right { text-align: right; }

.section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px;
}
.section-header h2 {
  font-size: 18px; font-weight: 500; letter-spacing: -.01em;
}

.empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-3);
  font-size: 14px;
}

@media (max-width: 768px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { height: auto; position: relative; padding: 18px 22px; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .main { padding: 24px 22px 80px; }
  .field-row, .field-row.three { grid-template-columns: 1fr; }
  .kanban { grid-template-columns: 1fr; }
}
