/* =========================================================
   DODÔ Ponto — base: tokens, reset, typography, controls
   ========================================================= */
:root {
  --orange: #F26A1B;
  --orange-bright: #FF7E2E;
  --orange-dark: #D9580D;
  --orange-soft: #FFF1E7;
  --orange-pale: #FFF8F3;
  --black: #0A0A0A;
  --ink: #141414;
  --ink-soft: #2A2A2A;
  --paper: #F4F3F0;
  --white: #FFFFFF;
  --gray-50: #FAFAF8;
  --gray-100: #F1F0EC;
  --gray-200: #E5E3DE;
  --gray-300: #D3D1CB;
  --gray-400: #9D9B95;
  --gray-500: #706E68;
  --gray-600: #4C4A45;
  --green: #1F9D63;
  --green-soft: #E8F6EE;
  --red: #D94A3D;
  --red-soft: #FDECEA;
  --amber: #B27A08;
  --amber-soft: #FFF7E0;
  --line: rgba(20, 20, 20, 0.09);
  --line-strong: rgba(20, 20, 20, 0.16);
  --shadow-card: 0 1px 2px rgba(20, 20, 20, 0.02), 0 12px 34px rgba(20, 20, 20, 0.045);
  --shadow-float: 0 24px 70px rgba(20, 20, 20, 0.18);
  --font-sans: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "Cascadia Mono", "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --sidebar-w: 278px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open { overflow: hidden; }

button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg { display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: var(--orange); color: #fff; }

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: rgba(20,20,20,.22) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(20,20,20,.18); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(20,20,20,.3); }

/* Icons */
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 32px; height: 32px; }
.icon-fill { fill: currentColor; stroke: none; }

/* Typography helpers */
.eyebrow {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray-400);
}
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--gray-500); }
.small { font-size: 11px; }
.positive { color: var(--green) !important; }
.negative { color: var(--red) !important; }
.neutral { color: var(--ink) !important; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.005em;
  white-space: nowrap;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.985); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn .icon { width: 17px; height: 17px; }

.btn-primary {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 9px 22px rgba(242, 106, 27, .22);
}
.btn-primary:hover { background: var(--orange-bright); box-shadow: 0 12px 28px rgba(242, 106, 27, .3); }
.btn-dark { background: var(--black); color: #fff; }
.btn-dark:hover { background: #242424; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--gray-600); }
.btn-ghost:hover { border-color: rgba(242,106,27,.35); color: var(--orange-dark); background: var(--orange-pale); }
.btn-danger { background: var(--red); color: #fff; box-shadow: 0 8px 20px rgba(217,74,61,.2); }
.btn-danger:hover { background: #C43E32; }
.btn-danger-ghost { background: #fff; border-color: rgba(217,74,61,.25); color: var(--red); }
.btn-danger-ghost:hover { background: var(--red-soft); border-color: rgba(217,74,61,.4); }
.btn-sm { min-height: 34px; padding: 7px 12px; font-size: 11px; border-radius: 9px; }
.btn-xs { min-height: 28px; padding: 5px 9px; font-size: 10px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-icon-only { width: 42px; padding: 0; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--gray-500);
  transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
}
.icon-btn:hover { color: var(--orange-dark); border-color: rgba(242,106,27,.3); background: var(--orange-pale); transform: translateY(-1px); }
.icon-btn:active { transform: scale(.96); }
.icon-btn .icon { width: 18px; height: 18px; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label,
.filter-field > label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-400);
}
.field input,
.field select,
.field textarea,
.filter-field input,
.filter-field select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 12.5px;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.field textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.field input:hover,
.field select:hover,
.field textarea:hover,
.filter-field input:hover,
.filter-field select:hover { border-color: var(--line-strong); }
.field input:focus,
.field select:focus,
.field textarea:focus,
.filter-field input:focus,
.filter-field select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(242, 106, 27, .1);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--gray-300); }
.field select,
.filter-field select { appearance: none; cursor: pointer; }
.field input[type="time"],
.field input[type="date"],
.field input[type="month"] { font-family: var(--font-mono); font-size: 12px; }
.field input[type="time"]::-webkit-calendar-picker-indicator,
.field input[type="date"]::-webkit-calendar-picker-indicator,
.field input[type="month"]::-webkit-calendar-picker-indicator { opacity: .45; cursor: pointer; }

.form-grid { display: grid; gap: 13px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-section-title {
  margin: 20px 0 11px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-400);
}
.form-hint { margin-top: 9px; font-size: 10px; color: var(--gray-400); }
.form-error { margin-top: 9px; font-size: 10.5px; color: var(--red); display: none; }
.form-error.show { display: block; }

/* Pills and badges */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.status-pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.status-pill.is-fora { background: var(--gray-100); color: var(--gray-500); }
.status-pill.is-jornada { background: var(--orange-soft); color: var(--orange-dark); }
.status-pill.is-intervalo { background: var(--amber-soft); color: var(--amber); }
.status-pill.is-completo { background: var(--green-soft); color: var(--green); }
.status-pill.is-pendente { background: var(--red-soft); color: var(--red); }
.status-pill.no-dot::before { display: none; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--gray-600);
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
}
.pill.orange { background: var(--orange-soft); color: var(--orange-dark); }
.pill.dark { background: var(--black); color: #fff; }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.red { background: var(--red-soft); color: var(--red); }

.avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 13px;
  background: linear-gradient(140deg, var(--orange) 0%, #FF9B4F 100%);
  color: #1A0D04;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}
.avatar.dark { background: linear-gradient(140deg, #1D1D1D, #070707); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.avatar.sm { width: 34px; height: 34px; border-radius: 10px; font-size: 10px; }
.avatar.lg { width: 50px; height: 50px; border-radius: 15px; font-size: 14px; }

/* Utilities */
.spacer { flex: 1; }
.hidden, [hidden] { display: none !important; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Animations */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(242,106,27,.38); }
  50% { box-shadow: 0 0 0 5px rgba(242,106,27,0); }
}
@keyframes nodePulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(242,106,27,.10); }
  50% { box-shadow: 0 0 0 8px rgba(242,106,27,.02); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(18px); } }
@keyframes scanLine { 0% { transform: translateY(-120%); opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { transform: translateY(120%); opacity: 0; } }
@keyframes buttonPunch {
  0% { transform: scale(1); }
  35% { transform: scale(.955); }
  70% { transform: scale(1.015); }
  100% { transform: scale(1); }
}
@keyframes barGrow { from { height: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .001ms !important; }
}

/* Boot screen */
.boot-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background: radial-gradient(circle at 50% 40%, #1A1A1A 0%, #070707 65%);
  color: rgba(255,255,255,.45);
  font-size: 11px;
  letter-spacing: .08em;
}
.boot-logo { width: 240px; opacity: .95; }
.boot-bar { width: 180px; height: 2px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; }
.boot-bar span { display: block; width: 45%; height: 100%; background: var(--orange); border-radius: 99px; animation: bootSlide 1.1s ease-in-out infinite; }
@keyframes bootSlide { 0% { transform: translateX(-110%); } 100% { transform: translateX(250%); } }
