:root {
  --black: #080a0d;
  --navy: #0c1824;
  --steel: #1c2b35;
  --mid: #2e4555;
  --arctic: #4abbe8;
  --frost: #c8e8f0;
  --white: #f4f5f2;
  --ink: #f4f5f2;
  --muted: #8ba4b2;
  --line: rgba(200, 232, 240, 0.16);
  --border: rgba(200, 232, 240, 0.16);
  --surface: rgba(12, 24, 36, 0.94);
  --surface-strong: #101d28;
  --surface-soft: rgba(28, 43, 53, 0.72);
  --page: #070910;
  --green: #4abbe8;
  --green-dark: #2f98c5;
  --blue: #4abbe8;
  --blue-soft: rgba(74, 187, 232, 0.14);
  --red: #f06f79;
  --gold: #e0b35c;
  --shadow: 0 22px 56px rgba(0, 0, 0, 0.35);
  --soft-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: "Barlow", "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: 15px;
}

body.public-tracking-mode {
  overflow-x: hidden;
  background: #132029;
}

body.public-tracking-mode .app-shell,
body.public-tracking-mode .auth-screen,
body.public-tracking-mode .signup-screen,
body.public-tracking-mode .security-warning,
body.public-tracking-mode dialog,
body.public-tracking-mode .print-preview,
body.public-tracking-mode .send-panel {
  display: none !important;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #132029;
}

.security-warning {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  padding: 12px 18px;
  background: #bc4b51;
  color: #ffffff;
  font-weight: 800;
  text-align: center;
}

.auth-screen.is-hidden {
  display: none;
}

.signup-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(ellipse 70% 50% at 72% 16%, rgba(74, 187, 232, 0.14), transparent 64%),
    #070910;
}

.signup-screen.is-hidden {
  display: none;
}

.signup-card {
  width: min(1040px, 100%);
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(200, 232, 240, 0.16);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(12, 24, 36, 0.96), rgba(8, 10, 13, 0.92));
  box-shadow: var(--shadow);
}

.signup-muted {
  margin-bottom: 0;
  color: var(--muted);
}

.signup-grid,
.signup-section {
  display: grid;
  gap: 14px;
}

.signup-section {
  padding: 16px;
  border: 1px solid rgba(200, 232, 240, 0.14);
  border-radius: 8px;
  background: rgba(28, 43, 53, 0.45);
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.plan-option {
  cursor: pointer;
  padding: 14px;
  border: 1px solid rgba(200, 232, 240, 0.16);
  border-radius: 8px;
  background: rgba(8, 10, 13, 0.45);
}

.plan-option input {
  width: auto;
}

.plan-option strong,
.plan-option span {
  display: block;
}

.signup-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ghost-link {
  color: var(--frost);
  font-weight: 800;
}

.three-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.public-tracking-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #132029;
}

.public-tracking-screen.is-hidden {
  display: none;
}

body.public-tracking-mode .public-tracking-screen {
  display: grid !important;
}

.tracking-card {
  width: min(980px, 100%);
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid #2c3c44;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.tracking-card .brand {
  color: var(--ink);
}

.tracking-status {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 12px;
  background: #f4f8f6;
  border: 1px solid var(--line);
}

.tracking-status span {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--green-dark);
  background: #dcefe7;
  font-weight: 800;
  font-size: 0.85rem;
}

.tracking-status h1 {
  margin: 0;
}

.tracking-status p {
  margin: 0;
  color: var(--muted);
}

.tracking-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.tracking-details article {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfc;
}

.tracking-details span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.tracking-map-wrap {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #edf2f3;
}

.tracking-map-wrap iframe {
  width: 100%;
  height: 430px;
  border: 0;
}

.tracking-map-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  color: var(--muted);
  text-align: center;
}

.tracking-map-link {
  width: fit-content;
  text-decoration: none;
}

.auth-card {
  display: grid;
  gap: 14px;
  width: min(420px, 100%);
  padding: 24px;
  border: 1px solid #2c3c44;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.auth-brand {
  color: var(--ink);
}

.login-hint {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.check-option {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.check-option input {
  width: auto;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-chip span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

.is-locked {
  filter: blur(2px);
  pointer-events: none;
  user-select: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 22px 16px;
  color: #f8fbf9;
  background: #132029;
  border-right: 1px solid #263640;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 10px;
  background: var(--green);
  font-weight: 800;
  box-shadow: inset 0 -10px 18px rgba(0, 0, 0, 0.12);
}

.brand strong,
.brand span,
.sidebar-footer span,
.sidebar-footer strong {
  display: block;
}

.brand span,
.sidebar-footer span {
  color: #a9b6b2;
  font-size: 0.82rem;
  margin-top: 2px;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 12px 13px;
  color: #dce7e3;
  background: transparent;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  background: #233138;
  color: #ffffff;
}

.nav-item.active {
  box-shadow: inset 3px 0 0 var(--green);
}

.icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #b5d8c9;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px;
  border: 1px solid #2c3c44;
  border-radius: 8px;
}

.workspace {
  width: min(100%, 1480px);
  padding: 24px;
  overflow-x: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 4;
  margin: -24px -24px 22px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 246, 248, 0.94);
  backdrop-filter: blur(10px);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--green-dark);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.7rem, 4vw, 2.25rem);
  letter-spacing: 0;
}

h2 {
  margin-bottom: 4px;
  font-size: 1rem;
}

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

.tenant-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 220px;
  padding: 9px 11px;
  border: 1px solid rgba(200, 232, 240, 0.16);
  border-radius: 10px;
  background: rgba(8, 10, 13, 0.56);
}

.tenant-chip img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: contain;
}

.tenant-chip span {
  overflow: hidden;
  color: var(--frost);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(430px, 42vw);
  min-width: 240px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 12px 0;
  background: transparent;
}

.primary-button,
.secondary-button,
.small-button,
.ghost-button {
  border: 0;
  border-radius: 10px;
  padding: 12px 16px;
  color: #ffffff;
  background: var(--green);
  font-weight: 700;
  box-shadow: var(--soft-shadow);
}

.secondary-button {
  background: var(--blue);
}

.small-button {
  align-self: start;
  white-space: nowrap;
  padding: 10px 12px;
  font-size: 0.9rem;
}

.small-button.blue {
  background: var(--blue);
}

.ghost-button {
  border: 1px solid var(--line);
  color: var(--muted);
  background: #ffffff;
}

.primary-button:hover,
.secondary-button:hover,
.small-button:hover {
  filter: brightness(0.95);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.quick-panel {
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.quick-panel h2 {
  margin-bottom: 12px;
}

.quick-link-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.quick-link {
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f9fbfa;
  color: var(--ink);
  font-weight: 700;
}

.quick-link:hover {
  border-color: #a7cfc0;
  background: #edf7f3;
}

.metric,
.panel,
.form-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric {
  position: relative;
  overflow: hidden;
  padding: 18px;
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--green);
}

.metric span,
.metric small,
.panel-header p {
  color: var(--muted);
}

.metric strong {
  display: block;
  margin: 8px 0;
  font-size: 1.75rem;
}

.metric.alert strong {
  color: var(--red);
}

.dashboard-grid,
.report-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
}

.wide {
  min-width: 0;
}

.panel {
  padding: 18px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.stage {
  min-height: 250px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfa;
}

.stage h3 {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 0.92rem;
}

.deal-card,
.record-card,
.task-row,
.calendar-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.deal-card {
  display: grid;
  gap: 6px;
  padding: 10px;
  margin-bottom: 8px;
}

.deal-card strong,
.record-card strong,
.calendar-item strong {
  line-height: 1.25;
}

.tag {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--green-dark);
  background: #dfeee8;
  font-size: 0.78rem;
  font-weight: 700;
}

.tag.status-agendado,
.tag.status-novo,
.tag.status-confirmacao-pendente {
  color: #28506b;
  background: var(--blue-soft);
}

.tag.status-em-rota,
.tag.status-enviado,
.tag.status-aguardando-resposta,
.tag.status-reagendar-contato,
.tag.status-aguardando-pagamento {
  color: #79520c;
  background: #f7e9cb;
}

.tag.status-em-execucao,
.tag.status-servico-iniciado,
.tag.status-equipe-a-caminho {
  color: #734b00;
  background: #ffe7b8;
}

.tag.status-finalizado,
.tag.status-aprovado,
.tag.status-ativo,
.tag.status-confirmado,
.tag.status-servico-finalizado,
.tag.status-pago,
.tag.status-concluido,
.tag.status-cliente-recorrente {
  color: var(--green-dark);
  background: #dcefe7;
}

.tag.status-rejeitado,
.tag.status-recusado,
.tag.status-perdido,
.tag.status-inativo {
  color: var(--red);
  background: #f5dddd;
}

.timeline,
.alert-list,
.record-list,
.calendar-list,
.report-list,
.confirmation-list,
.catalog-grid {
  display: grid;
  gap: 10px;
}

.catalog-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.catalog-card {
  display: grid;
  gap: 8px;
  min-height: 88px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f9fbfa;
}

.catalog-card small {
  color: var(--muted);
  line-height: 1.35;
}

.timeline-item,
.alert-item,
.report-row,
.confirmation-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-item:last-child,
.alert-item:last-child,
.report-row:last-child,
.confirmation-item:last-child {
  border-bottom: 0;
}

.confirmation-item {
  align-items: flex-start;
}

.confirmation-item div {
  min-width: 0;
}

.alert-item strong {
  color: var(--red);
}

.task-table {
  display: grid;
  gap: 8px;
}

.task-row {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr 0.75fr 0.7fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(300px, 380px) 1fr;
  gap: 16px;
}

.split-layout.form-closed {
  grid-template-columns: 1fr;
}

.bottom-space {
  margin-top: 14px;
}

.form-panel {
  display: grid;
  align-content: start;
  gap: 13px;
  padding: 18px;
}

.settings-panel {
  max-width: 920px;
}

.form-panel.is-hidden {
  display: none;
}

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

.form-actions button {
  flex: 1;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  color: var(--ink);
  background: #ffffff;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  transform: translateY(-50%);
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(200, 232, 240, 0.74);
  background: transparent;
  box-shadow: none;
  line-height: 0;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  border-color: rgba(74, 187, 232, 0.28);
  color: var(--arctic);
  background: rgba(74, 187, 232, 0.1);
  outline: 0;
}

.password-toggle svg {
  width: 19px;
  height: 19px;
}

.password-toggle .eye-shape,
.password-toggle .eye-dot,
.password-toggle .eye-slash {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle .eye-dot {
  fill: currentColor;
  stroke-width: 0;
}

.password-toggle .eye-slash {
  opacity: 0;
  transform-origin: center;
  transition: opacity 0.16s ease;
}

.password-toggle:not(.is-visible) .eye-slash {
  opacity: 1;
}

input:focus,
select:focus {
  outline: 2px solid rgba(47, 125, 98, 0.18);
  border-color: var(--green);
}

.two-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.list-panel {
  min-height: 360px;
}

.record-card,
.calendar-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  box-shadow: 0 1px 0 rgba(23, 32, 38, 0.03);
}

.record-card:hover,
.calendar-item:hover {
  border-color: #c4d1d8;
  box-shadow: var(--soft-shadow);
}

.record-card > div:last-child {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.record-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.record-actions button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 10px;
  color: var(--ink);
  background: #ffffff;
  font-weight: 700;
}

.record-actions .status-primary {
  border-color: var(--green);
  color: #ffffff;
  background: var(--green);
}

.record-actions button:hover {
  border-color: #a7cfc0;
  background: #edf7f3;
}

.record-actions .status-primary:hover {
  border-color: var(--green-dark);
  background: var(--green-dark);
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.checklist-grid label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
}

.checklist-grid input {
  width: auto;
}

.photo-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.photo-upload-box {
  display: grid;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  background: #f8fbfa;
}

.photo-upload-box strong {
  font-size: 0.82rem;
}

.photo-preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 8px;
}

.photo-preview-item {
  position: relative;
}

.photo-preview-list a {
  position: relative;
  display: block;
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.photo-preview-item > button {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: #be123c;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(15, 30, 38, 0.18);
}

.photo-preview-item.is-uploading {
  opacity: 0.72;
}

.photo-preview-item.is-uploading > button {
  display: none;
}

.photo-preview-list img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-preview-list span {
  position: absolute;
  inset: auto 4px 4px 4px;
  border-radius: 4px;
  background: rgba(15, 30, 38, 0.76);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  text-align: center;
  padding: 3px 4px;
}

.photo-preview-list img.is-broken {
  opacity: 0;
}

.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(10, 22, 30, 0.72);
}

.photo-viewer.is-hidden {
  display: none;
}

.photo-viewer-card {
  width: min(920px, 96vw);
  max-height: 92vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.photo-viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.photo-viewer-toolbar strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-viewer-image-wrap {
  overflow: auto;
  max-height: calc(92vh - 78px);
  background: #eef3f2;
  border-radius: 8px;
  display: grid;
  place-items: start center;
}

.photo-viewer img {
  width: auto;
  height: auto;
  max-width: none;
  min-width: min(100%, 760px);
  display: block;
}

.week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(72px, 1fr));
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 14px;
  padding-bottom: 2px;
}

.week-strip button {
  display: grid;
  gap: 4px;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f9fbfa;
  color: var(--muted);
}

.week-strip button.active {
  border-color: var(--green);
  background: #dfeee8;
  color: var(--green-dark);
}

.week-strip span {
  text-transform: capitalize;
}

.finance-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.finance-summary article {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f9fbfa;
}

.finance-summary span {
  color: var(--muted);
}

.finance-summary strong {
  font-size: 1.25rem;
}

.record-card small,
.calendar-item small,
.deal-card small,
.task-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.delete-button,
.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #ffffff;
}

.delete-button:hover,
.icon-button:hover {
  color: var(--red);
  border-color: #e6b4b7;
}

.kanban {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
}

.kanban-column {
  min-height: 390px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfa;
}

.kanban-column h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
}

.task-card {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.task-actions {
  display: flex;
  gap: 6px;
}

.task-actions button {
  min-width: 34px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.priority-Alta {
  color: var(--red);
}

.priority-Media {
  color: var(--gold);
}

.priority-Baixa {
  color: var(--green-dark);
}

.next-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.next-steps span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 12px;
  background: #f9fbfa;
  color: var(--muted);
}

dialog {
  width: min(440px, calc(100vw - 32px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(23, 32, 38, 0.42);
}

.print-preview {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
  padding: 16px;
  background: #dfe5e8;
}

.print-preview.is-hidden {
  display: none;
}

.print-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.print-toolbar div {
  display: flex;
  gap: 8px;
}

.print-toolbar button {
  min-height: 40px;
}

.print-frame {
  width: min(100%, 980px);
  height: 100%;
  justify-self: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.send-panel {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(19, 32, 41, 0.48);
}

.send-panel.is-hidden {
  display: none;
}

.send-card {
  width: min(520px, 100%);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.send-card p {
  color: var(--muted);
  line-height: 1.45;
}

.tracking-link-card {
  width: min(620px, 100%);
}

.clickable-link {
  display: block;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #b7d4e8;
  border-radius: 8px;
  color: var(--blue);
  background: #f4f9fc;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-decoration: underline;
}

.send-actions {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  margin-top: 16px;
}

.tracking-link-actions {
  grid-template-columns: 1fr 1fr auto;
}

.dialog-card {
  position: relative;
  padding: 22px;
}

.close-dialog {
  position: absolute;
  top: 14px;
  right: 14px;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.quick-actions button {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfa;
  font-weight: 700;
}

.empty {
  padding: 18px;
  color: var(--muted);
  border: 1px dashed #c9d3d7;
  border-radius: 8px;
  background: #fbfcfc;
}

.company-logo-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: center;
}

.company-logo-preview {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(74, 187, 232, 0.28);
  border-radius: 12px;
  color: var(--arctic);
  background: rgba(8, 10, 13, 0.62);
  font-family: "Bebas Neue", sans-serif;
  font-size: 2rem;
}

.company-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.subscription-box {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(200, 232, 240, 0.14);
  border-radius: 8px;
  background: rgba(28, 43, 53, 0.45);
}

/* ARKEN visual identity */
body {
  background:
    radial-gradient(ellipse 70% 58% at 86% 8%, rgba(74, 187, 232, 0.12), transparent 62%),
    radial-gradient(ellipse 48% 55% at 8% 88%, rgba(46, 69, 85, 0.54), transparent 62%),
    linear-gradient(135deg, #070910 0%, #0c1824 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(74, 187, 232, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 187, 232, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 80% at 80% 20%, black 0%, transparent 100%);
}

.app-shell {
  position: relative;
  background: transparent;
}

.sidebar {
  background: rgba(8, 10, 13, 0.96);
  border-right: 1px solid rgba(74, 187, 232, 0.18);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.03);
}

.workspace {
  position: relative;
  z-index: 1;
}

.topbar {
  border-bottom: 1px solid rgba(74, 187, 232, 0.16);
  background: rgba(7, 9, 16, 0.88);
  backdrop-filter: blur(14px);
}

.brand {
  min-width: 0;
}

.brand-mark {
  overflow: hidden;
  background: #080a0d;
  border: 1px solid rgba(74, 187, 232, 0.32);
  border-radius: 50%;
  color: var(--arctic);
  box-shadow: 0 0 28px rgba(74, 187, 232, 0.12), inset 0 0 0 1px rgba(74, 187, 232, 0.08);
}

.arken-mark svg {
  display: block;
  width: 25px;
  height: 25px;
  fill: none;
}

.arken-mark path,
.arken-mark line {
  stroke: currentColor;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.arken-mark line:nth-of-type(2) {
  opacity: 0.75;
}

.arken-mark line:nth-of-type(3) {
  opacity: 0.45;
}

.arken-mark line:nth-of-type(4) {
  opacity: 0.25;
}

.arken-mark circle {
  fill: currentColor;
}

.brand strong {
  font-family: "Bebas Neue", "Arial Narrow", sans-serif;
  color: var(--white);
  font-size: 1.35rem;
  letter-spacing: 0.24em;
  line-height: 1;
}

.brand span,
.sidebar-footer span {
  color: rgba(200, 232, 240, 0.58);
  font-family: "Barlow Condensed", "Segoe UI", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.sidebar-footer {
  border-color: rgba(74, 187, 232, 0.18);
  background: rgba(12, 24, 36, 0.74);
}

.nav-item {
  border: 1px solid transparent;
  color: rgba(244, 245, 242, 0.74);
  font-family: "Barlow Condensed", "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-item:hover,
.nav-item.active {
  border-color: rgba(74, 187, 232, 0.22);
  background: rgba(74, 187, 232, 0.1);
  color: var(--white);
}

.nav-item.active {
  box-shadow: inset 3px 0 0 var(--arctic);
}

.icon {
  color: var(--arctic);
  font-family: "Barlow Condensed", "Segoe UI", sans-serif;
  font-weight: 800;
}

.eyebrow,
.type-role {
  color: var(--arctic);
  font-family: "Barlow Condensed", "Segoe UI", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

h1 {
  color: var(--white);
  font-family: "Barlow Condensed", "Segoe UI", sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
}

h2,
h3,
.panel-header strong {
  color: var(--white);
  font-family: "Barlow Condensed", "Segoe UI", sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.search,
.metric,
.panel,
.form-panel,
.quick-panel,
.auth-card,
.tracking-card,
.send-card,
.print-toolbar,
dialog,
.dialog-card {
  border: 1px solid rgba(200, 232, 240, 0.16);
  background: linear-gradient(145deg, rgba(12, 24, 36, 0.96), rgba(8, 10, 13, 0.92));
  box-shadow: var(--shadow);
}

.metric,
.panel,
.form-panel,
.quick-panel,
.auth-card,
.send-card {
  border-radius: 10px;
}

.metric::before {
  width: 3px;
  background: linear-gradient(180deg, var(--arctic), rgba(74, 187, 232, 0));
}

.quick-link,
.stage,
.deal-card,
.record-card,
.task-row,
.calendar-item,
.catalog-card,
.finance-summary article,
.week-strip button,
.kanban-column,
.task-card,
.next-steps span,
.photo-upload-box,
.empty,
.tracking-status,
.tracking-details article {
  border-color: rgba(200, 232, 240, 0.14);
  background: rgba(28, 43, 53, 0.52);
  color: var(--ink);
}

.record-card,
.calendar-item,
.task-card,
.deal-card {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.record-card:hover,
.calendar-item:hover,
.quick-link:hover,
.week-strip button:hover,
.record-actions button:hover {
  border-color: rgba(74, 187, 232, 0.42);
  background: rgba(74, 187, 232, 0.09);
  box-shadow: var(--soft-shadow);
}

.metric span,
.metric small,
.panel-header p,
.record-card small,
.calendar-item small,
.deal-card small,
.task-row small,
.finance-summary span,
label,
.send-card p,
.empty {
  color: var(--muted);
}

input,
select {
  border-color: rgba(200, 232, 240, 0.17);
  color: var(--white);
  background: rgba(8, 10, 13, 0.7);
}

input::placeholder {
  color: rgba(200, 232, 240, 0.44);
}

input:focus,
select:focus {
  outline: 2px solid rgba(74, 187, 232, 0.22);
  border-color: var(--arctic);
}

.primary-button,
.secondary-button,
.small-button {
  border: 1px solid rgba(74, 187, 232, 0.42);
  color: #080a0d;
  background: linear-gradient(135deg, var(--arctic), #77d5f4);
  font-family: "Barlow Condensed", "Segoe UI", sans-serif;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.secondary-button,
.small-button.blue {
  color: var(--white);
  background: rgba(74, 187, 232, 0.18);
}

.ghost-button,
.delete-button,
.icon-button,
.record-actions button,
.task-actions button,
.quick-actions button {
  border-color: rgba(200, 232, 240, 0.16);
  color: var(--frost);
  background: rgba(8, 10, 13, 0.56);
}

.record-actions .status-primary {
  border-color: rgba(74, 187, 232, 0.52);
  color: #080a0d;
  background: var(--arctic);
}

.tag {
  color: var(--frost);
  background: rgba(74, 187, 232, 0.12);
  border: 1px solid rgba(74, 187, 232, 0.18);
}

.tag.status-agendado,
.tag.status-novo,
.tag.status-confirmacao-pendente,
.tag.status-em-rota,
.tag.status-enviado,
.tag.status-aguardando-resposta,
.tag.status-reagendar-contato,
.tag.status-aguardando-pagamento,
.tag.status-em-execucao,
.tag.status-servico-iniciado,
.tag.status-equipe-a-caminho {
  color: var(--frost);
  background: rgba(74, 187, 232, 0.13);
}

.tag.status-finalizado,
.tag.status-aprovado,
.tag.status-ativo,
.tag.status-confirmado,
.tag.status-servico-finalizado,
.tag.status-pago,
.tag.status-concluido,
.tag.status-cliente-recorrente {
  color: #080a0d;
  background: var(--arctic);
}

.tag.status-rejeitado,
.tag.status-recusado,
.tag.status-perdido,
.tag.status-inativo {
  color: #ffd9dd;
  background: rgba(240, 111, 121, 0.14);
  border-color: rgba(240, 111, 121, 0.32);
}

.week-strip button.active {
  border-color: var(--arctic);
  background: rgba(74, 187, 232, 0.16);
  color: var(--white);
}

.clickable-link {
  border-color: rgba(74, 187, 232, 0.4);
  color: var(--arctic);
  background: rgba(74, 187, 232, 0.08);
}

.public-tracking-screen,
.auth-screen {
  background:
    radial-gradient(ellipse 60% 50% at 78% 18%, rgba(74, 187, 232, 0.15), transparent 62%),
    #070910;
}

.auth-screen {
  overflow: hidden;
}

.auth-screen::before {
  content: "";
  position: absolute;
  inset: -55%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 34% 24% at 22% 30%, rgba(74, 187, 232, 0.2), transparent 72%),
    radial-gradient(ellipse 44% 32% at 72% 72%, rgba(46, 69, 85, 0.72), transparent 70%),
    radial-gradient(ellipse 32% 24% at 48% 52%, rgba(200, 232, 240, 0.08), transparent 66%),
    linear-gradient(125deg, transparent 24%, rgba(74, 187, 232, 0.07) 48%, transparent 74%);
  filter: blur(10px);
  opacity: 0.96;
  animation: arkenShadowOrbit 30s linear infinite;
}

.auth-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(74, 187, 232, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 187, 232, 0.026) 1px, transparent 1px);
  background-size: 58px 58px;
  opacity: 0.7;
  animation: arkenGridDrift 28s linear infinite;
}

.auth-card {
  position: relative;
  z-index: 2;
}

@keyframes arkenShadowOrbit {
  0% {
    transform: rotate(0deg) translate3d(14%, -10%, 0) scale(1.08) rotate(0deg);
  }
  100% {
    transform: rotate(360deg) translate3d(14%, -10%, 0) scale(1.08) rotate(-360deg);
  }
}

@keyframes arkenGridDrift {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 58px 58px, 58px 58px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-screen::before,
  .auth-screen::after {
    animation: none;
  }
}

.tracking-card {
  width: min(920px, 100%);
}

.tracking-status span {
  color: #080a0d;
  background: var(--arctic);
}

.tracking-map-wrap {
  border-color: rgba(74, 187, 232, 0.24);
  background: rgba(8, 10, 13, 0.72);
}

.print-preview {
  background: rgba(7, 9, 16, 0.92);
}

dialog::backdrop,
.send-panel {
  background: rgba(7, 9, 16, 0.78);
  backdrop-filter: blur(8px);
}

table,
th,
td {
  border-color: rgba(200, 232, 240, 0.18);
}

th {
  background: rgba(74, 187, 232, 0.16);
  color: var(--white);
}

@media (max-width: 1050px) {
  .app-shell {
    grid-template-columns: 88px 1fr;
  }

  .sidebar .brand div:last-child,
  .nav-item:not(.active) {
    font-size: 0;
  }

  .nav-item {
    justify-content: center;
  }

  .sidebar-footer {
    display: none;
  }

  .metric-grid,
  .quick-link-grid,
  .dashboard-grid,
  .report-grid,
  .tracking-details,
  .split-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: block;
    padding: 12px;
  }

  .sidebar > .brand,
  .sidebar-footer {
    display: none;
  }

  .nav-list {
    display: flex;
    overflow-x: auto;
  }

  .nav-item,
  .nav-item:not(.active) {
    flex: 0 0 auto;
    font-size: 0.9rem;
  }

  .workspace {
    padding: 16px;
  }

  .topbar {
    margin: -16px -16px 16px;
    padding: 16px;
  }

  .topbar,
  .topbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .search {
    width: 100%;
    min-width: 0;
  }

  .metric-grid,
  .quick-link-grid,
  .finance-summary,
  .kanban,
  .catalog-grid,
  .quick-actions,
  .plan-grid,
  .three-fields,
  .company-logo-row {
    grid-template-columns: 1fr;
  }

  .task-row,
  .record-card,
  .calendar-item {
    grid-template-columns: 1fr;
  }

  .record-actions {
    justify-content: flex-start;
  }

  .record-card > div:last-child {
    justify-items: start;
  }

  .two-fields {
    grid-template-columns: 1fr;
  }

  .print-preview {
    padding: 8px;
  }

  .print-toolbar,
  .print-toolbar div {
    align-items: stretch;
    flex-direction: column;
  }

  .send-actions {
    grid-template-columns: 1fr;
  }

  .tracking-card {
    padding: 14px;
  }

  .public-tracking-screen {
    place-items: start center;
    padding: 18px;
  }

  .tracking-map-wrap,
  .tracking-map-wrap iframe {
    min-height: 330px;
    height: 330px;
  }
}
