:root {
  color-scheme: dark;
  --bg: #050b16;
  --surface: rgba(12, 24, 43, 0.82);
  --surface-strong: #0d192b;
  --line: rgba(130, 162, 210, 0.18);
  --text: #f4f7fb;
  --muted: #8fa1ba;
  --blue: #2b6cff;
  --cyan: #3b82f6;
  --red: #ef233c;
  --green: #25d187;
  --radius: 16px;
  font-family: Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--text); background: radial-gradient(circle at 15% 0%, rgba(43,108,255,.16), transparent 34%), radial-gradient(circle at 90% 25%, rgba(239,35,60,.08), transparent 25%), linear-gradient(150deg, #050b16 0%, #081221 55%, #050914 100%); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid #78a6ff; outline-offset: 2px; }

.topbar { position: sticky; top: 0; z-index: 10; min-height: 84px; padding: 14px clamp(18px, 3vw, 44px); display: flex; align-items: center; gap: 28px; background: rgba(5,11,22,.88); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 48px; height: 48px; display: grid; place-items: center; font: 800 1.5rem Montserrat, sans-serif; background: linear-gradient(145deg, var(--blue), #123eaf); transform: skew(-7deg); border-radius: 10px; box-shadow: 0 0 28px rgba(43,108,255,.38); }
.eyebrow { margin: 0 0 4px; color: #78a6ff; font-size: .7rem; font-weight: 800; letter-spacing: .17em; }
h1 { margin: 0; font: 800 1.35rem Montserrat, sans-serif; letter-spacing: .08em; }
h1 span { color: var(--blue); }
.event-meta { display: grid; gap: 4px; padding-left: 28px; border-left: 1px solid var(--line); color: var(--muted); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.event-meta span:first-child { color: var(--text); }
.view-tabs { display: flex; margin-left: auto; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.025); }
.tab-button { border: 0; border-radius: 9px; padding: 10px 16px; cursor: pointer; background: transparent; color: var(--muted); font-weight: 700; }
.tab-button.active { color: white; background: var(--blue); box-shadow: 0 5px 18px rgba(43,108,255,.28); }

main { padding: 28px clamp(18px, 3vw, 44px) 48px; }
.view { display: none; }
.view.active { display: block; }
.summary { display: grid; grid-template-columns: repeat(9, minmax(125px, 1fr)); gap: 10px; margin-bottom: 24px; overflow-x: auto; padding-bottom: 4px; }
.kpi { min-width: 125px; min-height: 92px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(145deg, rgba(18,34,57,.84), rgba(8,18,33,.82)); box-shadow: inset 0 1px 0 rgba(255,255,255,.035); }
.kpi span { color: var(--muted); font-size: .72rem; line-height: 1.3; text-transform: uppercase; letter-spacing: .05em; }
.kpi strong { font: 800 1.3rem Montserrat, sans-serif; white-space: nowrap; }
.kpi.featured { min-width: 180px; border-color: rgba(43,108,255,.55); background: linear-gradient(145deg, rgba(43,108,255,.22), rgba(9,24,49,.82)); box-shadow: 0 0 26px rgba(43,108,255,.13); }
.kpi.featured strong { color: #81a9ff; }
.kpi.waiting { border-bottom-color: rgba(239,35,60,.7); }
.kpi.alert { border-color: rgba(239,35,60,.6); background: linear-gradient(145deg, rgba(239,35,60,.16), rgba(9,24,49,.82)); }
.kpi.alert strong { color: #ff7787; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.search-field { width: min(460px, 100%); height: 46px; padding: 0 14px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 12px; background: rgba(8,19,34,.8); }
.search-field span { color: #6e88aa; font-size: 1.4rem; }
.search-field input { width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; }
input::placeholder, textarea::placeholder { color: #60738e; }
.primary-button, .secondary-button, .icon-button { border: 0; cursor: pointer; font-weight: 700; }
.primary-button { min-height: 44px; padding: 0 18px; border-radius: 11px; background: linear-gradient(135deg, var(--blue), #174fd1); box-shadow: 0 8px 20px rgba(43,108,255,.24); }
.primary-button:hover { filter: brightness(1.13); }
.secondary-button { min-height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: 11px; background: #121e30; }

.kanban { display: grid; grid-template-columns: repeat(4, minmax(260px, 1fr)); gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 10px; }
.column { min-width: 260px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(7,16,29,.68); overflow: hidden; }
.column > header { padding: 15px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.02); }
.column > header div { display: flex; align-items: center; gap: 9px; }
.column h2 { margin: 0; font: 800 .83rem Montserrat, sans-serif; text-transform: uppercase; letter-spacing: .05em; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #657994; box-shadow: 0 0 10px currentColor; }
.column[data-status="confirmado"] .status-dot { background: var(--blue); }
.column[data-status="confirmado_bonus"] .status-dot { background: #a855f7; }
.column[data-status="pagou"] .status-dot { background: var(--green); }
.count { min-width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; background: rgba(255,255,255,.06); color: var(--muted); font-size: .8rem; font-weight: 800; }
.dropzone { min-height: 180px; padding: 10px; display: grid; gap: 10px; align-content: start; transition: background .18s ease; }
.dropzone.drag-over { background: rgba(43,108,255,.11); box-shadow: inset 0 0 0 2px rgba(43,108,255,.42); }
.empty-state { padding: 44px 16px; color: #60738e; font-size: .82rem; text-align: center; }

.person-card { padding: 14px; border: 1px solid rgba(133,162,204,.17); border-radius: 12px; background: linear-gradient(150deg, rgba(19,34,56,.96), rgba(10,21,38,.96)); box-shadow: 0 8px 25px rgba(0,0,0,.18); cursor: pointer; transition: border-color .15s, transform .1s; }
.person-card:hover { border-color: rgba(43,108,255,.5); }
.person-card:active { cursor: grabbing; transform: scale(.99); }
.person-card.dragging { opacity: .45; }
.person-card.incompleto { border-color: rgba(239,35,60,.55); }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.card-top h3 { margin: 0; font-size: .96rem; line-height: 1.35; }
.card-actions { display: flex; gap: 5px; }
.card-actions button { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; background: rgba(255,255,255,.035); color: #aebbd0; }
.card-actions button:hover { color: white; border-color: rgba(43,108,255,.65); }
.card-actions .delete:hover { color: #ff7787; border-color: rgba(239,35,60,.65); }
.card-meta { margin-top: 11px; display: flex; flex-wrap: wrap; gap: 6px; }
.pill { padding: 4px 7px; border-radius: 6px; color: #9fb0c9; background: rgba(255,255,255,.045); font-size: .7rem; line-height: 1.25; }
.pill.money { color: #65e5aa; background: rgba(37,209,135,.1); }
.pill.warn { color: #ff7787; background: rgba(239,35,60,.12); }
.phone { margin: 10px 0 0; color: #8193ad; font-size: .78rem; }

.section-heading { max-width: 1100px; margin: 14px auto 28px; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.section-heading h2 { margin: 0 0 7px; font: 800 clamp(1.6rem, 3vw, 2.5rem) Montserrat, sans-serif; letter-spacing: -.03em; }
.section-heading p:last-child { margin: 0; color: var(--muted); }
.links-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.link-card { padding: 19px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.link-card.pix { border-color: rgba(37,209,135,.4); }
.link-tipo { display: block; margin-bottom: 8px; color: var(--muted); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.link-card.pix .link-tipo { color: var(--green); }
.link-card h3 { margin: 0 0 7px; }
.link-card .link-url { margin: 0; color: #7890af; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .8rem; }
.link-value { display: block; margin-top: 18px; color: #8bacff; font-weight: 800; }
.link-actions { margin-top: 18px; display: flex; gap: 7px; }
.link-actions button { min-height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; background: #111e31; }
.link-actions .copy { flex: 1; color: white; background: #174fcf; }
.links-grid > .empty-state { grid-column: 1 / -1; border: 1px dashed var(--line); border-radius: 15px; }

.modal { width: min(680px, calc(100vw - 28px)); padding: 0; border: 1px solid rgba(102,141,200,.3); border-radius: 18px; color: var(--text); background: #0a1424; box-shadow: 0 28px 90px rgba(0,0,0,.72), 0 0 42px rgba(43,108,255,.12); }
.modal.small { width: min(520px, calc(100vw - 28px)); }
.modal::backdrop { background: rgba(1,5,12,.76); backdrop-filter: blur(6px); }
.modal form { padding: 24px; }
.modal-heading { margin-bottom: 22px; display: flex; align-items: flex-start; justify-content: space-between; }
.modal-heading h2 { margin: 0; font: 800 1.45rem Montserrat, sans-serif; }
.icon-button { width: 36px; height: 36px; border-radius: 9px; background: rgba(255,255,255,.055); color: var(--muted); font-size: 1.5rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-grid label { display: grid; gap: 7px; color: #a7b5c9; font-size: .78rem; font-weight: 700; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: #0f1d30; }
.form-grid textarea { resize: vertical; }
.form-grid label[hidden] { display: none; }
.form-error { min-height: 19px; margin: 12px 0 0; color: #ff7787; font-size: .8rem; }
.modal-actions { margin-top: 10px; display: flex; justify-content: flex-end; gap: 9px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 30; padding: 12px 17px; border: 1px solid rgba(43,108,255,.5); border-radius: 10px; background: #10213a; box-shadow: 0 12px 35px rgba(0,0,0,.45); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; gap: 12px; }
  .event-meta { display: none; }
  .view-tabs { width: 100%; margin: 0; }
  .tab-button { flex: 1; }
  main { padding-top: 20px; }
  .summary { grid-template-columns: repeat(9, 145px); }
}
@media (max-width: 560px) {
  .toolbar, .section-heading { align-items: stretch; flex-direction: column; }
  .toolbar .primary-button, .section-heading .primary-button { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .modal form { padding: 19px; }
  .kanban { grid-template-columns: 1fr; overflow-x: visible; }
  .column { min-width: 100%; }
  .summary { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
