/* //////////////////////////////////////////////////////////////////////////
   STYLE_2.CSS — v2 (Sidebar + Header + Grid)
   - Sidebar à esquerda (menu escalável)
   - Header sticky no topo (botões globais)
   - Cards com cabeçalho azul único (mais claro e discreto)
   - Estados (verde/laranja/vermelho) bem vivos
   - Mais margem à direita no conteúdo (não encosta ao browser)
////////////////////////////////////////////////////////////////////////// */


/* //////////// INÍCIO: TOKENS //////////// */
:root{
  --bg: #09162b;

  --shadow: 0 18px 40px rgba(0,0,0,.45);


  --panel: rgba(255,255,255,.045);
  --panel2: rgba(255,255,255,.060);

  --stroke: rgba(255,255,255,.18);
  --stroke2: rgba(255,255,255,.28);

  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.64);

  /* Azul único (mais claro, menos “agressivo”) para headers dos cards */
  --cardHeadBlue: rgba(59, 121, 192, 0.28);
  --cardHeadBlueBorder: rgba(84, 159, 245, 0.42);

  /* Estados vivos */
  --ok: #17a112;
  --warn: #e0851d;
  --danger: #bb0e28;
  --info: #4090ec;

  --radius: 4px; /* cantos mais retos */
  --shadow: 0 10px 24px rgba(0,0,0,.35);

  --focus: 0 0 0 3px rgba(88,166,255,.22);

  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
/* //////////// FIM: TOKENS //////////// */


/* //////////// INÍCIO: BASE //////////// */
*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  color: var(--text);
  font-family: var(--font);
  background: var(--bg);
}
a{ color: inherit; text-decoration: none; }
button, input, select, textarea{ font: inherit; color: inherit; }
/* //////////// FIM: BASE //////////// */


/* //////////// INÍCIO: SKIP LINK //////////// */
.skip-link{
  position: absolute;
  left: 12px;
  top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.10);
  transform: translateY(-140%);
  transition: transform .18s ease;
  z-index: 9999;
}
.skip-link:focus{ transform: translateY(0); outline: none; box-shadow: var(--focus); }
/* //////////// FIM: SKIP LINK //////////// */


/* //////////// INÍCIO: SHELL LAYOUT //////////// */
.shell{
  min-height: 100vh;
  display: grid;
  grid-template-columns: 270px 1fr;
}
/* //////////// FIM: SHELL LAYOUT //////////// */


/* //////////// INÍCIO: SIDEBAR //////////// */
.sidebar{
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 14px;
  border-right: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
  backdrop-filter: blur(10px);
  overflow: auto;
}

.sb-brand{
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 10px 14px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius);
  background: rgba(0,0,0,.18);
}

.sb-mark{
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: var(--radius);
  border: 1px solid rgba(88,166,255,.45);
  background: rgba(88,166,255,.18);
  font-weight: 900;
}

.sb-meta{ min-width: 0; }
.sb-title{ font-weight: 850; letter-spacing: .2px; }
.sb-sub{
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sb-section{
  margin-top: 14px;
  padding: 8px 10px 6px;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.54);
}

.sb-item{
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 10px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  color: rgba(255,255,255,.80);
}
.sb-item:hover{
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.10);
}
.sb-item.active{
  background: rgba(88,166,255,.14);
  border-color: rgba(88,166,255,.26);
  color: rgba(255,255,255,.94);
}

.sb-dot{
  width: 8px; height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
}
.sb-item.active .sb-dot{
  background: var(--info);
  box-shadow: 0 0 0 3px rgba(88,166,255,.16);
}

.sb-footer{
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.10);
  display: grid;
  gap: 10px;
}
.sb-mini{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sb-foottext{ font-size: 12px; }
/* //////////// FIM: SIDEBAR //////////// */


/* //////////// INÍCIO: MAINWRAP //////////// */
.mainwrap{
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
}
/* //////////// FIM: MAINWRAP //////////// */


/* //////////// INÍCIO: TOPBAR //////////// */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 12px 16px;
  min-height: 60px;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.24);
  backdrop-filter: blur(10px);
}

.crumbs{
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: rgba(255,255,255,.74);
}
.crumb-sep{ opacity: .55; }
.strong{ font-weight: 850; color: rgba(255,255,255,.92); }

.ctxline{
  margin-top: 6px;
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 13px;
}

.top-right{
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
/* //////////// FIM: TOPBAR //////////// */


/* //////////// INÍCIO: KPI STRIP //////////// */
.kpis{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;

  /* mais margem à direita (não encosta ao browser) */
  padding: 12px 28px 12px 16px;

  border-bottom: 1px solid rgba(255,255,255,.10);
}

.kpi{
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: rgba(255,255,255,.03);
  padding: 10px 12px 12px;
  min-width: 0;
}
.kpi.kpi-highlight{
  outline: 1px solid color-mix(in srgb, var(--ok) 70%, #fff 0%);
  outline-offset: 0;
}
.row-best{
  background: rgba(54, 255, 120, 0.08);
  outline: 1px solid rgba(54, 255, 120, 0.55);
}
.kpi-label{
  font-size: 11px;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: rgba(255,255,255,.72);
}
.kpi-value{
  margin-top: 6px;
  font-size: 22px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.kpi-sub{
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
  padding-bottom: 6px;
}

@media (max-width: 1100px){
  .kpis{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px){
  .kpis{ grid-template-columns: 1fr; }
}
/* //////////// FIM: KPI STRIP //////////// */


/* //////////// INÍCIO: CONTENT WRAPPER //////////// */
.content{
  /* mais margem à direita (não encosta ao browser) */
  padding: 12px 28px 16px 16px;
}
/* //////////// FIM: CONTENT WRAPPER //////////// */


/* //////////// INÍCIO: GRID 12 COL //////////// */
/* //////////// INÍCIO: GRID 12 COLUNAS (garantir) //////////// */
.grid12{
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px; /* ou o teu gap padrão */
  align-items: stretch;
}
/* //////////// FIM: GRID 12 COLUNAS (garantir) //////////// */

/* //////////// INÍCIO: GRID SPANS (completo) //////////// */
.span-3{ grid-column: span 3; }
.span-4{ grid-column: span 4; }
.span-5{ grid-column: span 5; }
.span-6{ grid-column: span 6; }
.span-7{ grid-column: span 7; }
.span-8{ grid-column: span 8; }
.span-9{ grid-column: span 9; }
.span-12{ grid-column: span 12; }
/* //////////// FIM: GRID SPANS (completo) //////////// */

/* responsivo */
@media (max-width: 1200px){
  .span-3{ grid-column: span 6; }
  .span-4{ grid-column: span 6; }
}
@media (max-width: 720px){
  .span-3, .span-4, .span-6{ grid-column: span 12; }
}
/* //////////// FIM: GRID 12 COL //////////// */


/* //////////// INÍCIO: CARDS //////////// */
.card{
  border: 1px solid var(--stroke2);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Cabeçalho azul uniforme (mais claro, menos “agressivo”) */
.card-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  background: var(--cardHeadBlue);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.10);
  flex-wrap: wrap;
}

.card-title{
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .02em;
  min-width: 0;
  overflow-wrap: anywhere;
}

.head-actions{
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.card-body{
  padding: 12px;
  background: rgba(0,0,0,.12);
  flex: 1 1 auto;
}
/* //////////// FIM: CARDS //////////// */


/* //////////// INÍCIO: FORMS //////////// */
.form{ display: grid; gap: 10px; }
.form.two{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 720px){
  .form.two{ grid-template-columns: 1fr; }
}

.field label{
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,.80);
  margin-top: 8px;
  margin-bottom: 6px;
}

input, select, textarea{
  width: 100%;
  padding: 10px 10px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.22);
  outline: none;
}
input:focus, select:focus, textarea:focus{
  box-shadow: var(--focus);
  border-color: rgba(88,166,255,.45);
}

select{
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255,255,255,.70) 50%),
    linear-gradient(135deg, rgba(255,255,255,.70) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(1em + 2px),
    calc(100% - 13px) calc(1em + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  color-scheme: dark;
}

select option,
select optgroup{
  background-color: #0f1a2c;
  color: #d7e2f2;
}

.details{
  margin-top: 10px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius);
  background: rgba(255,255,255,.03);
  overflow: hidden;
}
.details summary{
  cursor: pointer;
  padding: 10px 10px;
  border-bottom: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.86);
}
.details-body{ padding: 10px; }
/* //////////// FIM: FORMS //////////// */


/* //////////// INÍCIO: INPUTS INLINE NA TABELA (inrow) //////////// */
.inrow{
  width: 100%;
  padding: 8px 8px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.18);
}
.table-modos .inrow{
  max-width: 100%;
}
/* //////////// FIM: INPUTS INLINE NA TABELA //////////// */


/* //////////// INÍCIO: BUTTONS //////////// */
.btn{
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.05);
  cursor: pointer;
  font-weight: 850;
  font-size: 13px;
}
.btn:hover{ background: rgba(255,255,255,.07); }
.btn:focus{ outline: none; box-shadow: var(--focus); }

.btn.primary{
  border-color: rgba(88,166,255,.55);
  background: rgba(88,166,255,.24);
}
.btn.primary:hover{ background: rgba(88,166,255,.30); }

.btn.ghost{
  background: transparent;
}
.btn.ghost:hover{ background: rgba(255,255,255,.06); }
/* //////////// FIM: BUTTONS //////////// */


/* //////////// INÍCIO: TAGS (estados vivos) //////////// */
.tag{
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 0;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.18);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .02em;
}

.tag.ok{
  border-color: color-mix(in srgb, var(--ok) 65%, #fff 0%);
  background: color-mix(in srgb, var(--ok) 22%, #000 78%);
}
.tag.warn{
  border-color: color-mix(in srgb, var(--warn) 70%, #fff 0%);
  background: color-mix(in srgb, var(--warn) 22%, #000 78%);
}
.tag.danger{
  border-color: color-mix(in srgb, var(--danger) 70%, #fff 0%);
  background: color-mix(in srgb, var(--danger) 22%, #000 78%);
}
.tag.info{
  border-color: color-mix(in srgb, var(--info) 70%, #fff 0%);
  background: color-mix(in srgb, var(--info) 18%, #000 82%);
}
/* //////////// FIM: TAGS //////////// */


/* //////////// INÍCIO: NOTES //////////// */
.note{
  margin-top: 10px;
  padding: 10px 10px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.03);
  font-size: 13px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.note.ok{
  border-color: color-mix(in srgb, var(--ok) 60%, #fff 0%);
  background: color-mix(in srgb, var(--ok) 14%, #000 86%);
   margin-top: 10px;
}
.note.warn{
  border-color: color-mix(in srgb, var(--warn) 65%, #fff 0%);
  background: color-mix(in srgb, var(--warn) 14%, #000 86%);
   margin-top: 10px;
}
.note.info{
  border-color: color-mix(in srgb, var(--info) 60%, #fff 0%);
  background: color-mix(in srgb, var(--info) 12%, #000 88%);
   margin-top: 10px;
}
.note.bad{
  border-color: color-mix(in srgb, var(--danger) 70%, #fff 0%);
  background: color-mix(in srgb, var(--danger) 20%, #000 80%);
  margin-top: 10px;
}
.note .note-link{
  margin-left: 8px;
  font-weight: 900;
  text-decoration: underline;
}
/* //////////// FIM: NOTES //////////// */


/* //////////// INÍCIO: LIST //////////// */
.list{ margin-top: 10px; display: grid; gap: 8px; }
.list-row{
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 10px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.03);
  min-width: 0;
}
/* //////////// FIM: LIST //////////// */


/* //////////// INÍCIO: TABLES //////////// */
.table-wrap{
  overflow: auto;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.18);
}

.table{
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}
.table th, .table td{
  padding: 12px 12px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  text-align: left;
  font-size: 13px;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.table thead th{
  font-size: 11px;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: rgba(255,255,255,.74);
  background: rgba(255,255,255,.04);
}
.table tbody tr:hover{ background: rgba(255,255,255,.04); }

.table-compact{ min-width: 520px; }
.table-compact th, .table-compact td{ padding: 10px 12px; }
.table-wrap.no-scroll{ overflow: visible; }
.table.table-ibt{ min-width: 0; table-layout: fixed; }
.table.table-ibt th, .table.table-ibt td{ padding: 10px 10px; }
/* //////////// FIM: TABLES //////////// */


/* //////////// INÍCIO: FOOTER //////////// */
.footer{
  border-top: 1px solid rgba(255,255,255,.10);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  background: rgba(0,0,0,.18);
}
@media (max-width: 700px){
  .footer{ flex-direction: column; }
}
/* //////////// FIM: FOOTER //////////// */


/* //////////// INÍCIO: RESPONSIVO (sidebar) //////////// */
@media (max-width: 980px){
  .shell{ grid-template-columns: 1fr; }
  .sidebar{
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.12);
  }
  .content{ padding-right: 16px; }
  .kpis{ padding-right: 16px; }
}
/* //////////// FIM: RESPONSIVO (sidebar) //////////// */

/* //////////// AJUSTE: META-LINE (Corrida) //////////// */
.meta-line{
  margin-top: 16px;          /* antes: 10px */
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 12px;
  overflow-wrap: anywhere;
}
/* //////////// AJUSTE: FOOTNOTE (Plano) //////////// */
.footnote{
  margin-top: 16px;          /* antes: 12px */
  padding: 12px 12px;        /* antes: 10px 12px */
  line-height: 1.35;
  border: 1px dashed rgba(255,255,255,.20);
  border-radius: var(--radius);
  background: rgba(255,255,255,.03);
  color: rgba(255,255,255,.70);
  font-size: 12px;
}

/* //////////////////////////////////////////////////////////////////////////
   ADD-ON UI KIT — Colar NO FIM do style_2.css
////////////////////////////////////////////////////////////////////////// */

/* //////////// INÍCIO: UI KIT SECTIONS //////////// */
.uikit-section{ margin-bottom: 18px; }
.uikit-head{
  display: grid;
  gap: 6px;
  margin: 6px 0 10px;
}
.uikit-title{
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .02em;
}
.uikit-sub{ font-size: 12px; }
.uikit-stack{ display: grid; gap: 10px; }
.uikit-row{ display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.uikit-badges{ display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* //////////// FIM: UI KIT SECTIONS //////////// */


/* //////////// INÍCIO: BUTTON VARIANTS (OK/WARN/DANGER) //////////// */
.btn.ok{
  border-color: color-mix(in srgb, var(--ok) 65%, #fff 0%);
  background: color-mix(in srgb, var(--ok) 18%, #000 82%);
}
.btn.ok:hover{ background: color-mix(in srgb, var(--ok) 24%, #000 76%); }

.btn.warn{
  border-color: color-mix(in srgb, var(--warn) 70%, #fff 0%);
  background: color-mix(in srgb, var(--warn) 18%, #000 82%);
}
.btn.warn:hover{ background: color-mix(in srgb, var(--warn) 24%, #000 76%); }

.btn.danger{
  border-color: color-mix(in srgb, var(--danger) 70%, #fff 0%);
  background: color-mix(in srgb, var(--danger) 18%, #000 82%);
}
.btn.danger:hover{ background: color-mix(in srgb, var(--danger) 24%, #000 76%); }

.btn-row{ display: flex; gap: 10px; flex-wrap: wrap; }
/* //////////// FIM: BUTTON VARIANTS //////////// */


/* //////////// INÍCIO: CHECK + TOGGLE //////////// */
.check{
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 10px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius);
  background: rgba(255,255,255,.03);
}
.check input{ transform: translateY(1px); }

.toggle{
  display: inline-flex;
  gap: 10px;
  align-items: center;
}
.toggle input{ display: none; }
.toggle-ui{
  width: 44px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.18);
  position: relative;
  display: inline-block;
}
.toggle-ui::after{
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255,255,255,.70);
  position: absolute;
  top: 2px;
  left: 2px;
  transition: left .15s ease, background .15s ease;
}
.toggle input:checked + .toggle-ui{
  border-color: rgba(88,166,255,.45);
  background: rgba(88,166,255,.18);
}
.toggle input:checked + .toggle-ui::after{
  left: 22px;
  background: rgba(255,255,255,.86);
}
.toggle-label{ font-size: 12px; color: rgba(255,255,255,.70); }
/* //////////// FIM: CHECK + TOGGLE //////////// */


/* //////////// INÍCIO: DROPDOWN //////////// */
.dropdown{ position: relative; display: inline-block; }
.dropdown-menu{
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius);
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 35px rgba(0,0,0,.45);
  padding: 6px;
  display: none;
  z-index: 60;
}
.dropdown.open .dropdown-menu{ display: grid; gap: 6px; }

.dropdown-item{
  width: 100%;
  text-align: left;
  padding: 10px 10px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  cursor: pointer;
}
.dropdown-item:hover{ background: rgba(255,255,255,.06); }
.dropdown-item.danger{
  border-color: color-mix(in srgb, var(--danger) 50%, #fff 0%);
  background: color-mix(in srgb, var(--danger) 10%, #000 90%);
}
/* //////////// FIM: DROPDOWN //////////// */


/* //////////// INÍCIO: TABS INLINE //////////// */
.tabs-inline{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.tab-inline{
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.03);
  font-weight: 850;
  cursor: pointer;
}
.tab-inline:hover{ border-color: rgba(255,255,255,.22); }
.tab-inline.active{
  border-color: rgba(88,166,255,.45);
  background: rgba(88,166,255,.16);
}

.tab-panels{ margin-top: 6px; }
.tab-panel{ display: none; }
.tab-panel.active{ display: block; }
/* //////////// FIM: TABS INLINE //////////// */


/* //////////// INÍCIO: MODAL //////////// */
.modal{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 90;
}
.modal.open{ display: block; }

.modal-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.65);
}

.modal-dialog{
  position: relative;
  width: min(560px, calc(100vw - 28px));
  margin: 10vh auto 0;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius);
  background: rgba(10,15,22,.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 22px 50px rgba(0,0,0,.55);
  overflow: hidden;
}

.modal-head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  background: var(--cardHeadBlue);
}
.modal-title{
  margin: 0;
  font-size: 16px;
  font-weight: 900;
}
.icon-btn{
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.05);
  cursor: pointer;
}
.icon-btn:hover{ background: rgba(255,255,255,.08); }

.modal-body{ padding: 12px; background: rgba(0,0,0,.12); }
.modal-foot{
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
}
/* //////////// FIM: MODAL //////////// */


/* //////////// INÍCIO: TOASTS //////////// */
.toasts{
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 10px;
  z-index: 100;
}

.toast{
  width: min(360px, calc(100vw - 36px));
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 35px rgba(0,0,0,.45);
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.toast-title{
  font-size: 11px;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: rgba(255,255,255,.70);
  font-weight: 900;
}
.toast-msg{
  grid-column: 1 / -1;
  color: rgba(255,255,255,.86);
  font-size: 13px;
  line-height: 1.3;
}
.toast-x{
  grid-row: 1;
  grid-column: 2;
  width: 30px;
  height: 30px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.05);
  cursor: pointer;
}
.toast-x:hover{ background: rgba(255,255,255,.08); }

.toast.ok{ border-color: color-mix(in srgb, var(--ok) 50%, #fff 0%); }
.toast.warn{ border-color: color-mix(in srgb, var(--warn) 55%, #fff 0%); }
.toast.danger{ border-color: color-mix(in srgb, var(--danger) 55%, #fff 0%); }
.toast.info{ border-color: color-mix(in srgb, var(--info) 50%, #fff 0%); }

.toast.hide{ opacity: 0; transform: translateY(6px); transition: all .25s ease; }
/* //////////// FIM: TOASTS //////////// */

/* //////////////////////////////////////////////////////////////////////////
   ADD-ON LOGIN CENTER — Colar NO FIM do style_2.css
   - Não altera cores existentes (usa as variáveis já definidas)
////////////////////////////////////////////////////////////////////////// */

/* //////////// INÍCIO: AUTH PAGE LAYOUT //////////// */
.auth-body{
  /* fundo um pouco mais “bonito” sem mexer no root; só overlay */
  background:
    radial-gradient(1100px 520px at 30% 18%, rgba(88,166,255,.18), transparent 60%),
    radial-gradient(900px 480px at 70% 70%, rgba(88,166,255,.10), transparent 62%),
    var(--bg);
}

.auth-page{
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 18px;
}

.auth-container{
  width: min(520px, 100%);
}

/* //////////// FIM: AUTH PAGE LAYOUT //////////// */


/* //////////// INÍCIO: BRAND //////////// */
.auth-brand{
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.auth-logo{
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  border: 1px solid rgba(88,166,255,.45);
  background: rgba(88,166,255,.18);
  overflow: hidden;
}
.auth-logo img{
  width: 90%;
  height: 90%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.auth-app{
  font-weight: 950;
  letter-spacing: .02em;
  font-size: 18px;
}

.auth-tagline{
  margin-top: 2px;
  color: rgba(255,255,255,.70);
  font-size: 13px;
}
/* //////////// FIM: BRAND //////////// */


/* //////////// INÍCIO: PANELS (sem JS) //////////// */
.auth-panel{ display: none; }

/* default: login visível */
#login.auth-panel{ display: block; }

/* quando #recover é target: mostra recover e esconde login (login vem depois no HTML) */
#recover:target{ display: block; }
#recover:target ~ #login{ display: none; }
/* //////////// FIM: PANELS //////////// */


/* //////////// INÍCIO: AUTH CARD //////////// */
.auth-card{
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
}

.auth-head{
  /* mantém o teu padrão de card-head, mas sem “tags” */
  justify-content: flex-start;
}

.auth-title{
  font-size: 18px; /* mais “bonito” e claro para login */
}

.auth-body-inner{
  padding: 16px;
}

.auth-help{
  margin: 0 0 12px;
  line-height: 1.35;
}
/* //////////// FIM: AUTH CARD //////////// */


/* //////////// INÍCIO: ROW (checkbox + link) //////////// */
.auth-row{
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.auth-check{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,.78);
  font-size: 13px;
  line-height: 1.2;
}

/* checkbox alinhado */
.auth-check input{
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: rgba(88,166,255,.85);
}
/* //////////// FIM: ROW //////////// */


/* //////////// INÍCIO: LINKS E BOTÃO FULL-WIDTH //////////// */
.auth-link{
  color: rgba(255,255,255,.82);
  font-size: 13px;
  padding: 6px 8px;
  border-radius: var(--radius);
  border: 1px solid transparent;
}
.auth-link:hover{
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.10);
}

.auth-btn{
  width: 100%;
  margin-top: 12px;
  padding: 12px 14px;
  font-size: 14px;
}

.auth-links{
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.35;
}
/* //////////// FIM: LINKS E BOTÃO //////////// */


/* //////////// INÍCIO: FOOTER //////////// */
.auth-footer{
  margin-top: 14px;
  font-size: 12px;
  display: flex;
  justify-content: center;
}
/* //////////// FIM: FOOTER //////////// */

/* //////////// INÍCIO: FUNDO GLOBAL (radial overlay) //////////// */
body.sv2{
  background:
    radial-gradient(1100px 520px at 30% 18%, rgba(44, 108, 180, 0.18), transparent 30%),
    radial-gradient(900px 480px at 70% 70%, rgba(18, 58, 104, 0.1), transparent 30%),
    var(--bg);
}
/* //////////// FIM: FUNDO GLOBAL (radial overlay) //////////// */


/* //////////////////////////////////////////////////////////////////////////
   ADD-ON PILOTOS — Colar NO FIM do style_2.css
////////////////////////////////////////////////////////////////////////// */

/* //////////// INÍCIO: TOOLBAR //////////// */
.card-toolbar{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.toolbar-left{
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.toolbar-right{
  display: flex;
  align-items: center;
  gap: 10px;
}
/* //////////// FIM: TOOLBAR //////////// */

/* //////////// INÍCIO: TABLE CELLS //////////// */
.td-actions{
  text-align: right;
  white-space: nowrap;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.btn-sm{
  padding: 6px 10px;
  font-size: 12px;
}
#gc_start_time{
  padding: 4px 8px;
  line-height: 1.1;
  min-height: 0;
}
.card#gc-card-02 .btn.ghost.btn-sm#gc_start_time{
  padding: 7px 8px;
  line-height: 1.1;
  min-height: 0;
}
.td-strong{ font-weight: 850; }
.td-mono{ font-family: var(--mono); font-size: 12px; color: rgba(255,255,255,.78); }
/* //////////// FIM: TABLE CELLS //////////// */

/* //////////// INÍCIO: SR-ONLY //////////// */
.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;
}
/* //////////// FIM: SR-ONLY //////////// */

/* //////////// INÍCIO: MODAL/TOAST (se já tens do UI Kit, podes ignorar) //////////// */
.modal{ position: fixed; inset: 0; display: none; z-index: 90; }
.modal.open{ display: block; }
.modal-backdrop{ position: absolute; inset: 0; background: rgba(0,0,0,.65); }
.modal-dialog{
  position: relative;
  width: min(720px, calc(100vw - 28px));
  margin: 10vh auto 0;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius);
  background: rgba(10,15,22,.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 22px 50px rgba(0,0,0,.55);
  overflow: hidden;
}
.modal-head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  background: var(--cardHeadBlue);
}
.modal-title{ margin: 0; font-size: 16px; font-weight: 900; }
.icon-btn{
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.05);
  cursor: pointer;
}
.icon-btn:hover{ background: rgba(255,255,255,.08); }
.modal-body{ padding: 12px; background: rgba(0,0,0,.12); }
.modal-foot{
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
}

.toasts{
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 10px;
  z-index: 100;
}
.toast{
  width: min(360px, calc(100vw - 36px));
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 35px rgba(0,0,0,.45);
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.toast-title{
  font-size: 11px;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: rgba(255,255,255,.70);
  font-weight: 900;
}
.toast-msg{
  grid-column: 1 / -1;
  color: rgba(255,255,255,.86);
  font-size: 13px;
  line-height: 1.3;
}
.toast-x{
  grid-row: 1;
  grid-column: 2;
  width: 30px;
  height: 30px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.05);
  cursor: pointer;
}
.toast-x:hover{ background: rgba(255,255,255,.08); }
.toast.ok{ border-color: color-mix(in srgb, var(--ok) 50%, #fff 0%); }
.toast.warn{ border-color: color-mix(in srgb, var(--warn) 55%, #fff 0%); }
.toast.info{ border-color: color-mix(in srgb, var(--info) 50%, #fff 0%); }
.toast.danger{ border-color: color-mix(in srgb, var(--danger) 55%, #fff 0%); }
.toast.hide{ opacity: 0; transform: translateY(6px); transition: all .22s ease; }
/* //////////// FIM: MODAL/TOAST //////////// */

/* //////////////////////////////////////////////////////////////////////////
   ADD-ON CALENDÁRIO — Colar NO FIM do style_2.css
   - Não altera as cores base: usa variáveis existentes (--info/--ok/--warn/--danger)
////////////////////////////////////////////////////////////////////////// */

/* //////////// INÍCIO: ANO (topo) //////////// */
.cal-year{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 8px 10px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.18);
  font-weight: 950;
  letter-spacing: .04em;
}
/* //////////// FIM: ANO (topo) //////////// */


/* //////////// INÍCIO: LEGENDA //////////// */
.cal-legend{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 10px;
}
.cal-pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.14);
  font-size: 12px;
  font-weight: 850;
}
.cal-pill::before{
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.35);
}
.cal-pill.st-confirmada::before{ background: var(--ok); }
.cal-pill.st-planeada::before{ background: var(--info); }
.cal-pill.st-tentativa::before{ background: var(--warn); }
.cal-pill.st-hoje::before{ background: rgba(255,255,255,.85); }
/* //////////// FIM: LEGENDA //////////// */


/* //////////// INÍCIO: CARD MÊS //////////// */
.cal-month .card-body{
  padding: 12px;
}
.cal-month .card-title{
  font-size: 15px;
}
/* //////////// FIM: CARD MÊS //////////// */


/* //////////// INÍCIO: WEEKDAYS + GRID //////////// */
.cal-weekdays{
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}
.cal-wd{
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255,255,255,.66);
  text-align: center;
}

.cal-grid{
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
/* //////////// FIM: WEEKDAYS + GRID //////////// */


/* //////////// INÍCIO: DAY CELL //////////// */
.cal-day{
  position: relative;
  width: 100%;
  min-height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.14);
  cursor: pointer;
  padding: 0;
  display: grid;
  place-items: center;
  transition: transform .10s ease, border-color .10s ease, background .10s ease;
  min-width: 0;
}
.cal-day:hover{
  border-color: rgba(255,255,255,.28);
  transform: translateY(-1px);
}
.cal-day:focus{
  outline: none;
  box-shadow: var(--focus);
}
.cal-num{
  font-weight: 900;
  font-size: 12px;
  color: rgba(255,255,255,.88);
}

/* células vazias */
.cal-day.empty{
  border: 0;
  background: transparent;
  cursor: default;
}

/* hoje */
.cal-day.is-today{
  border-color: rgba(255,255,255,.44);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}

/* marcação corrida */
.cal-day.has-race{
  border-color: rgba(255,255,255,.30);
}
.cal-dot{
  position: absolute;
  left: 8px;
  bottom: 6px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
}

/* status -> tint */
.cal-day.st-confirmada{
  border-color: color-mix(in srgb, var(--ok) 55%, #fff 0%);
  background: color-mix(in srgb, var(--ok) 14%, rgba(0,0,0,.22) 86%);
}
.cal-day.st-confirmada .cal-dot{ background: var(--ok); }

.cal-day.st-planeada{
  border-color: color-mix(in srgb, var(--info) 55%, #fff 0%);
  background: color-mix(in srgb, var(--info) 12%, rgba(0,0,0,.22) 88%);
}
.cal-day.st-planeada .cal-dot{ background: var(--info); }

.cal-day.st-tentativa{
  border-color: color-mix(in srgb, var(--warn) 60%, #fff 0%);
  background: color-mix(in srgb, var(--warn) 12%, rgba(0,0,0,.22) 88%);
}
.cal-day.st-tentativa .cal-dot{ background: var(--warn); }
/* //////////// FIM: DAY CELL //////////// */


/* //////////// INÍCIO: MODAL largura (calendário) //////////// */
.cal-modal{
  width: min(820px, calc(100vw - 28px));
}
/* //////////// FIM: MODAL largura //////////// */


/* //////////// INÍCIO: NOTE ERROR //////////// */
.cal-error{
  border-color: color-mix(in srgb, var(--danger) 55%, #fff 0%);
  background: color-mix(in srgb, var(--danger) 10%, #000 90%);
}
/* //////////// FIM: NOTE ERROR //////////// */


/* //////////// INÍCIO: RESPONSIVO (meses) //////////// */
@media (max-width: 1200px){
  /* com o teu grid12, span-4 já passa a 2 colunas via regras existentes */
}
@media (max-width: 720px){
  .cal-weekdays, .cal-grid{ gap: 6px; }
  .cal-day{ min-height: 32px; border-radius: 10px; }
}
/* //////////// FIM: RESPONSIVO //////////// */


/* //////////// INÍCIO: MODAL/TOAST (se já tens do UI kit, podes ignorar esta secção) //////////// */
.modal{ position: fixed; inset: 0; display: none; z-index: 90; }
.modal.open{ display: block; }
.modal-backdrop{ position: absolute; inset: 0; background: rgba(0,0,0,.65); }
.modal-dialog{
  position: relative;
  margin: 9vh auto 0;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius);
  background: rgba(10,15,22,.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 22px 50px rgba(0,0,0,.55);
  overflow: hidden;
}
.modal-head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  background: var(--cardHeadBlue);
}
.modal-title{ margin: 0; font-size: 16px; font-weight: 900; }
.icon-btn{
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.05);
  cursor: pointer;
}
.icon-btn:hover{ background: rgba(255,255,255,.08); }
.modal-body{ padding: 12px; background: rgba(0,0,0,.12); }
.modal-foot{
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
}

.toasts{
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 10px;
  z-index: 100;
}
.toast{
  width: min(360px, calc(100vw - 36px));
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 35px rgba(0,0,0,.45);
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.toast-title{
  font-size: 11px;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: rgba(255,255,255,.70);
  font-weight: 900;
}
.toast-msg{
  grid-column: 1 / -1;
  color: rgba(255,255,255,.86);
  font-size: 13px;
  line-height: 1.3;
}
.toast-x{
  grid-row: 1;
  grid-column: 2;
  width: 30px;
  height: 30px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.05);
  cursor: pointer;
}
.toast-x:hover{ background: rgba(255,255,255,.08); }
.toast.ok{ border-color: color-mix(in srgb, var(--ok) 50%, #fff 0%); }
.toast.warn{ border-color: color-mix(in srgb, var(--warn) 55%, #fff 0%); }
.toast.info{ border-color: color-mix(in srgb, var(--info) 50%, #fff 0%); }
.toast.danger{ border-color: color-mix(in srgb, var(--danger) 55%, #fff 0%); }
.toast.hide{ opacity: 0; transform: translateY(6px); transition: all .22s ease; }
/* //////////// FIM: MODAL/TOAST //////////// */

/* //////////////////////////////////////////////////////////////////////////
   ADD-ON CRIAR CORRIDA — Colar NO FIM do style_2.css
   - Sem alterar cores base
////////////////////////////////////////////////////////////////////////// */

/* //////////// INÍCIO: TOOLBAR (criar_corrida) //////////// */
.rc-toolbar{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.rc-toolbar-left{
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.rc-toolbar-right{
  display: flex;
  align-items: center;
  gap: 10px;
}
.rc-field input, .rc-field select{
  min-width: 220px;
}
/* //////////// FIM: TOOLBAR (criar_corrida) //////////// */


/* //////////// INÍCIO: TABLE HELPERS //////////// */
.td-actions{
  text-align: right;
  white-space: nowrap;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}
.btn-sm{
  padding: 8px 10px;
  font-size: 12px;
}
.td-strong{ font-weight: 850; }
.td-mono{ font-family: var(--mono); font-size: 12px; color: rgba(255,255,255,.78); }
tr[data-id]{ cursor: default; }
tr[data-id]:hover td{ background: rgba(255,255,255,.02); }
/* //////////// FIM: TABLE HELPERS //////////// */


/* //////////// INÍCIO: FIELDSETS (modal secções) //////////// */
.rc-fieldset{
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  padding: 16px;
  margin: 0 0 16px 0;
  background: rgba(0,0,0,.10);
}
.rc-fieldset legend{
  padding: 0 8px;
  font-weight: 900;
  color: rgba(255,255,255,.82);
  letter-spacing: .02em;
}
/* espaçamento vertical ENTRE blocos dentro do fieldset (resolve “Pista” colado) */
.rc-modal .rc-fieldset > .form,
.rc-modal .rc-fieldset > .field,
.rc-modal .rc-fieldset > .rc-split{
  margin-top: 14px;
}

/* primeiro bloco após o legend: menos margem */
.rc-modal .rc-fieldset > legend + .form,
.rc-modal .rc-fieldset > legend + .field,
.rc-modal .rc-fieldset > legend + .rc-split{
  margin-top: 10px;
}


.rc-split{
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
.rc-inline .field{ margin: 0; }
/* //////////// FIM: FIELDSETS (modal secções) //////////// */


/* //////////// INÍCIO: GRID helper 3 cols (se o teu style_2 não tiver) //////////// */
.form.three{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
/* //////////// FIM: GRID helper 3 cols //////////// */


/* //////////// INÍCIO: MODAL sizing //////////// */
.rc-modal{
  width: min(920px, calc(100vw - 28px));
  max-height: calc(100vh - 12vh);
  display: flex;
  flex-direction: column;
}
.rc-modal .modal-head,
.rc-modal .modal-foot{
  flex: 0 0 auto;
}
.rc-modal .modal-body{
  flex: 1 1 auto;
  overflow: auto;              /* <-- scroll aqui */
}

/* //////////// FIM: MODAL sizing //////////// */


/* //////////// INÍCIO: SR-ONLY (se não existir já) //////////// */
.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;
}
/* //////////// FIM: SR-ONLY //////////// */
/* //////////// INÍCIO: CRIAR CORRIDA — ESPAÇAMENTO CAMPOS (MODAL) //////////// */
.rc-modal .field{
  margin-top: 12px;              /* cria espaço entre campos empilhados */
}

.rc-modal .form.two .field,
.rc-modal .form.three .field{
  margin-top: 8px;                 /* em grelhas, o gap já trata do espaçamento */
}

.rc-modal .field label{
  display: block;
  margin-bottom: 6px;            /* evita label colado ao input */
  line-height: 1.25;
}

.rc-modal .field input,
.rc-modal .field select,
.rc-modal .field textarea{
  padding: 10px 12px;            /* melhora leitura e “respiro” interno */
}
/* //////////// FIM: CRIAR CORRIDA — ESPAÇAMENTO CAMPOS (MODAL) //////////// */

/* //////////////////////////////////////////////////////////////////////////
   ADD-ON GESTÃO CORRIDA — Colar NO FIM do style_2.css
////////////////////////////////////////////////////////////////////////// */

/* //////////// INÍCIO: KPIs //////////// */
.gc-stat{ margin-bottom: 10px; }
.gc-label{ font-size: 12px; color: rgba(255,255,255,.68); margin-bottom: 4px; }
.gc-val{ font-size: 14px; font-weight: 900; color: rgba(255,255,255,.92); }
.gc-row2{ display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 10px; }
.gc-mini{ margin-top: 8px; font-size: 12px; }
/* //////////// FIM: KPIs //////////// */

/* //////////// INÍCIO: CHIPS //////////// */
.gc-chip{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.18);
  font-size: 12px;
  font-weight: 900;
}
.gc-chip::before{
  content:"";
  width: 10px; height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.45);
}
.gc-chip-green::before{ background: var(--ok); }
.gc-chip-blue::before{ background: var(--info); }
.gc-chip-amber::before{ background: var(--warn); }
.gc-chip-red::before{ background: var(--danger); }
/* //////////// FIM: CHIPS //////////// */

/* //////////// INÍCIO: PROGRESS //////////// */
.gc-progress{
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.18);
  overflow: hidden;
  margin: 10px 0 12px 0;
}
.gc-progress-bar{
  height: 100%;
  width: 0%;
  background: color-mix(in srgb, var(--info) 55%, rgba(255,255,255,.20) 45%);
}
/* //////////// FIM: PROGRESS //////////// */

/* //////////// INÍCIO: TIRES //////////// */
.gc-tire-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.gc-tire{
  border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radius);
  background: rgba(0,0,0,.14);
  padding: 10px;
}
.gc-tire-pos{
  font-weight: 950;
  letter-spacing: .06em;
  margin-bottom: 8px;
  color: rgba(255,255,255,.88);
}
.gc-tire-m{ display: grid; gap: 6px; }
.gc-tire-k{ display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.gc-tire-v{ font-weight: 900; color: rgba(255,255,255,.90); }
/* //////////// FIM: TIRES //////////// */

/* //////////// INÍCIO: ALERTAS //////////// */
.gc-alerts{ list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.gc-alert{
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(0,0,0,.14);
  font-size: 13px;
  line-height: 1.25;
}
.gc-ok{ border-color: color-mix(in srgb, var(--ok) 45%, #fff 0%); }
.gc-info{ border-color: color-mix(in srgb, var(--info) 45%, #fff 0%); }
.gc-warn{ border-color: color-mix(in srgb, var(--warn) 55%, #fff 0%); }
.gc-danger{ border-color: color-mix(in srgb, var(--danger) 55%, #fff 0%); }
/* //////////// FIM: ALERTAS //////////// */

/* //////////// INÍCIO: TABELA STINTS inputs //////////// */
.gc-select-driver,
.gc-select-tires,
.gc-inp-time,
.gc-inp-num,
.gc-inp-text{
  width: 100%;
  min-width: 0;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.12);
  color: rgba(255,255,255,.88);
  padding: 8px 10px;
  font-size: 13px;
}
.gc-inp-num{ max-width: 110px; }
.gc-inp-time{ max-width: 140px; }
.gc-inp-text{ min-width: 180px; }
/* //////////// FIM: TABELA STINTS inputs //////////// */

/* //////////// INÍCIO: MODAL sizing (ajuste stint) //////////// */
.gc-modal{
  width: min(720px, calc(100vw - 28px));
  max-height: calc(100vh - 12vh);
  display: flex;
  flex-direction: column;
}
.gc-modal .modal-head,
.gc-modal .modal-foot{ flex: 0 0 auto; }
.gc-modal .modal-body{ flex: 1 1 auto; overflow: auto; }
/* //////////// FIM: MODAL sizing (ajuste stint) //////////// */






/* //////////////////////////////////////////////////////////////////////////
   ADD-ON VISÃO GERAL — tabela alinhada + cards topo (sem mexer nas cores base)
////////////////////////////////////////////////////////////////////////// */

/* //////////// INÍCIO: Top cards helpers (vg-*) //////////// */
.vg-stat{ margin-bottom: 10px; }
.vg-label{ font-size: 12px; color: rgba(255,255,255,.68); margin-bottom: 4px; }
.vg-val{ font-size: 14px; font-weight: 900; color: rgba(255,255,255,.92); }
.vg-val-big{ font-size: 22px; font-weight: 900; letter-spacing: .02em; }
.vg-time{ font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.vg-row2{ display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 10px; }
.vg-mini{ margin-top: 8px; font-size: 12px; }
.vg-mini.vg-ir-mini{ font-size: 10px; margin-top: 4px; }

.vg-note{
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius);
  background: rgba(0,0,0,.14);
  color: rgba(255,255,255,.86);
}

.vg-chip{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.18);
  font-size: 12px;
  font-weight: 900;
}
.vg-chip::before{
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.45);
}

.vg-chip-green::before{ background: var(--ok); }
.vg-chip-blue::before{ background: var(--info); }
.vg-chip-amber::before{ background: var(--warn); }
.vg-chip-red::before{ background: var(--danger); }

.vg-progress{
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.18);
  overflow: hidden;
  margin: 10px 0 12px 0;
}
.vg-progress-bar{
  height: 100%;
  width: 0%;
  background: color-mix(in srgb, var(--info) 55%, rgba(255,255,255,.20) 45%);
}
/* //////////// FIM: Top cards helpers //////////// */


/* //////////// INÍCIO: Tabela alinhada (stable layout) //////////// */
.vg-table{
  table-layout: fixed;     /* chave para manter alinhamento ao adicionar colunas */
  width: 100%;
}
.vg-table th,
.vg-table td{
  vertical-align: middle;
  padding: 12px 10px;
}
.vg-ellipsis{
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.vg-teamname{ font-weight: 950; }
.vg-badges{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0;
}
.vg-driver-name{
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}

/* //////////// INÍCIO: iRacing badges (licença + iRating) //////////// */
.lic,
.ir{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  min-width: 44px;
  padding: 0 8px;
  border-radius: 4px;
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  user-select: none;
  white-space: nowrap;
}
.lic--sm, .ir--sm{
  height: 19px;
  min-width: 38px;
  padding: 0 6px;
  font-size: 11px;
  border-radius: 2px;
}
.ir--sm.ir--light{
  background: #d2d2d2;
  border-color: #bcbcbc;
  color: #1d1d1d;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.55),
    0 1px 2px rgba(0,0,0,.25);
}
.lic--md, .ir--md{
  height: 22px;
  min-width: 44px;
  padding: 0 8px;
  font-size: 13px;
}
.lic--lg, .ir--lg{
  height: 26px;
  min-width: 52px;
  padding: 0 10px;
  font-size: 15px;
}

.lic{
  position: relative;
  background: #f2f2f2;
  color: #111;
  border: 1px solid rgba(0,0,0,.45);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.25),
    0 1px 2px rgba(0,0,0,.35);
}
.lic::before{
  content:"";
  position:absolute;
  inset:1px;
  border-radius:3px;
  border:1px solid rgba(255,255,255,.12);
  pointer-events:none;
  opacity:.55;
}

.lic--rookie{ background:#f2f2f2; color:#111; }
.lic--d{ background:#ff8a00; color:#111; }
.lic--c{ background:#ffd200; color:#111; }
.lic--b{ background:#2fd24a; color:#111; }
.lic--a{ background:#1f76ff; color:#fff; text-shadow: 0 1px 0 rgba(0,0,0,.35); }
.lic--pro{ background:#111; color:#fff; border-color: rgba(255,255,255,.18); text-shadow: 0 1px 0 rgba(0,0,0,.35); }

.ir{
  min-width: 48px;
  padding: 0 10px;
  letter-spacing:.01em;
}
.ir--light{
  background: #efefef;
  border: 1px solid #cfcfcf;
  color: #222;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.70),
    0 1px 2px rgba(0,0,0,.35);
}
.ir--dark{
  background: rgba(70,70,70,.92);
  border: 1px solid rgba(255,255,255,.14);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.10),
    0 1px 2px rgba(0,0,0,.45);
}
/* //////////// FIM: iRacing badges //////////// */

.vg-table .tag{
  border-radius: 0 !important;
}

.vg-flag{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  margin-right: 6px;
  font-size: 16px;
  line-height: 1;
}

.vg-our td{
  background: rgba(46, 204, 113, .12); /* destaque verde para o nosso piloto */
}

/* Larguras por coluna (ajusta quando adicionares mais) */
.vg-col-pos{ width: 56px; }
.vg-col-car{ width: 86px; }
.vg-col-driver{ width: 260px; }
.vg-col-class{ width: 120px; }
.vg-col-last{ width: 120px; }
.vg-col-gap{ width: 140px; }
.vg-col-laps{ width: 90px; }
.vg-col-best{ width: 120px; }
.vg-col-stops{ width: 90px; }
.vg-col-state{ width: 110px; }
.vg-col-act{ width: 96px; }
/* //////////// FIM: Tabela alinhada //////////// */

.vg-near-table th,
.vg-near-table td{
  padding-top: 4px;
  padding-bottom: 4px;
  font-size: 12px;
  line-height: 1.2;
  padding-left: 6px;
  padding-right: 6px;
}
.vg-near-table{
  table-layout: fixed;
  width: 100%;
  min-width: 0;
}
.vg-near-table th{
  white-space: nowrap;
}
.vg-near-pos,
.vg-near-car,
.vg-near-driver,
.vg-near-gap{
  width: 25%;
}
.vg-near-gap{ text-align: right; }
.vg-near-table th:last-child,
.vg-near-table td:last-child{
  text-align: right;
}
.vg-near-wrap{
  max-height: none;
  overflow: visible;
}
.vg-near-table tr.near-pit td{
  color: rgba(210,220,235,.86);
}
.vg-near-table tr.near-same-lap td{
  color: rgba(255,255,255,.92);
}


/* //////////// INÍCIO: Modal detalhe equipa //////////// */
.vg-modal{
  width: min(860px, calc(100vw - 28px));
  max-height: calc(100vh - 12vh);
  display: flex;
  flex-direction: column;
}
.vg-modal .modal-head,
.vg-modal .modal-foot{ flex: 0 0 auto; }
.vg-modal .modal-body{ flex: 1 1 auto; overflow: auto; }

.vg-detail-grid{
  display: grid;
  gap: 12px;
}
.vg-kv{
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 8px 12px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius);
  background: rgba(0,0,0,.12);
}
.vg-k{ color: rgba(255,255,255,.65); font-size: 12px; }
.vg-v{ color: rgba(255,255,255,.92); font-weight: 850; }

.vg-drivers{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius);
  background: rgba(0,0,0,.12);
}
.vg-notes{
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius);
  background: rgba(0,0,0,.12);
  color: rgba(255,255,255,.85);
  line-height: 1.35;
}
/* //////////// FIM: Modal detalhe equipa //////////// */


/* //////////////////////////////////////////////////////////////////////////
   ADD-ON DASHBOARD + DISPONIBILIDADE
////////////////////////////////////////////////////////////////////////// */

/* //////////// INÍCIO: TABS (sv-tabs) — fix layout //////////// */
.sv-tabs{
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px 0;
  flex-wrap: wrap;
}
.sv-tabs-row{
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px 0;
  flex-wrap: wrap;
}
.sv-tabs-row .sv-tabs{
  flex: 1;
}
.sv-tabs-row .sv-tab-meta{
  margin-left: auto;
}
.sv-race-select{
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px 0;
}
.sv-race-select select{
  min-width: 280px;
}

.sv-tab{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.14);
  color: rgba(255,255,255,.88);
  font-weight: 900;
  text-decoration: none;
}

.sv-tab.is-active{
  border-color: rgba(255,255,255,.34);
  background: rgba(88,166,255,.16);
}

/* empurra a meta para a direita sem separar os tabs */
.sv-tab-meta{
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
/* //////////// FIM: TABS (sv-tabs) — fix layout //////////// */


/* //////////// INÍCIO: DASHBOARD HELPERS //////////// */
.sv-mini-list{ display: grid; gap: 10px; }
.sv-mini-item{ display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.sv-pill-row{ display: flex; flex-wrap: wrap; gap: 8px; }

.sv-kv{
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 12px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius);
  background: rgba(0,0,0,.12);
}
.sv-k{ color: rgba(255,255,255,.65); font-size: 12px; }
.sv-v{ color: rgba(255,255,255,.92); font-weight: 900; }

.sv-list{ display: grid; gap: 10px; }
.sv-list-row{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius);
  background: rgba(0,0,0,.12);
}
.sv-list-main{ font-weight: 900; color: rgba(255,255,255,.92); }
.sv-list-sub{ font-size: 12px; }
.sv-ellipsis{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Classificação: melhor volta absoluta da sessão */
.vg-best-session-lap{
  color: #48d38a;
  font-weight: 700;
}

.sv-table-fixed{ table-layout: fixed; width: 100%; }
/* //////////// FIM: DASHBOARD HELPERS //////////// */


/* //////////// INÍCIO: DISPONIBILIDADE (layout e alinhamento) //////////// */
:root{
  --avail-row-h: 34px;
  --avail-head-h: 40px;
}

.avail-two{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.avail-left-wrap, .avail-right-wrap{ min-width: 0; }

.avail-left tbody tr{ height: var(--avail-row-h); }
.avail-left td, .avail-left th{
  vertical-align: middle;
  padding: 8px 10px;
  font-size: 14px;
}
.avail-left .td-strong{ font-weight: 400; }
.avail-left .avail-time{ font-weight: 900; }

.avail-left .tag{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  line-height: 26px;
  padding: 0 12px;
}

.avail-left tbody tr,
.avail-r,
.avail-cell{
  height: var(--avail-row-h);
}

.avail-left tbody tr td{
  padding-top: 0;
  padding-bottom: 0;
}

.avail-left thead th,
.avail-h{
  height: var(--avail-head-h);
  line-height: var(--avail-head-h);
}
.avail-head th{
  padding-top: 0;
  padding-bottom: 0;
  font-size: 12px;
}

.avail-left .col-stint{ width: 10%; }
.avail-left .col-type{ width: 18%; }
.avail-left .col-start{ width: 14%; }
.avail-left .col-end{ width: 14%; }
.avail-left .col-driver{ width: 26%; }
.avail-left .col-avail{ width: 18%; }

/* Right matrix wrap */
.avail-matrix-wrap{
  overflow: auto;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius);
}

/* Legend */
.avail-legend{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.avail-badge{
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.14);
  font-weight: 900;
  font-size: 12px;
}
.avail-badge.open{ border-color: color-mix(in srgb, var(--ok) 45%, rgba(255,255,255,.16)); }
.avail-badge.blocked{ border-color: rgba(255,255,255,.16); opacity: .85; }
.avail-badge.assigned{ border-color: color-mix(in srgb, var(--info) 55%, rgba(255,255,255,.16)); }

/* Grid */
.avail-grid{
  display: grid;
  grid-template-columns: var(--avail-start-w, 95px) repeat(var(--avail-cols, 6), minmax(92px, 1fr));
  gap: 0;
  min-width: var(--avail-grid-min, 745px); /* garante espaço p/ colunas + header */
}

.avail-h{
  position: sticky;
  top: 0;
  z-index: 2;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 950;
  border-bottom: 1px solid rgba(255,255,255,.16);
  border-right: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.22);
  color: rgba(255,255,255,.90);
}

.avail-c-stint{
  position: sticky;
  left: 0;
  z-index: 3;
  border-right: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.26);
}

.avail-r{
  height: var(--avail-row-h);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255,255,255,.10);
  border-right: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.16);
}

/* Cells base */
.avail-cell{
  height: var(--avail-row-h);
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.10);
  border-right: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.14);
  color: rgba(255,255,255,.88);
  font-weight: 900;
  font-size: 12px;
  cursor: pointer;
}
.avail-cell:focus{ outline: 2px solid rgba(88,166,255,.55); outline-offset: -2px; }

/* Per-pilot tint (6 pilotos) usando as variáveis já existentes */
.avail-cell[data-p="0"], .avail-h[data-p="0"]{ --pc: var(--info); }
.avail-cell[data-p="1"], .avail-h[data-p="1"]{ --pc: var(--ok); }
.avail-cell[data-p="2"], .avail-h[data-p="2"]{ --pc: var(--warn); }
.avail-cell[data-p="3"], .avail-h[data-p="3"]{ --pc: var(--danger); }
.avail-cell[data-p="4"], .avail-h[data-p="4"]{ --pc: color-mix(in srgb, var(--info) 60%, var(--ok) 40%); }
.avail-cell[data-p="5"], .avail-h[data-p="5"]{ --pc: color-mix(in srgb, var(--warn) 60%, var(--danger) 40%); }

/* States */
.avail-cell.open{
  background: color-mix(in srgb, var(--pc) 18%, rgba(0,0,0,.82));
  border-right-color: color-mix(in srgb, var(--pc) 22%, rgba(255,255,255,.10));
}
.avail-cell.open:hover{
  background: color-mix(in srgb, var(--pc) 26%, rgba(0,0,0,.78));
}

.avail-cell.blocked{
  background: rgba(0,0,0,.22);
  color: rgba(255,255,255,.55);
  cursor: default;
}
.avail-cell.blocked.taken{
  background: rgba(0,0,0,.28);
  color: rgba(255,255,255,.50);
}

.avail-cell.assigned{
  background: color-mix(in srgb, var(--pc) 40%, rgba(0,0,0,.70));
  border-right-color: color-mix(in srgb, var(--pc) 55%, rgba(255,255,255,.10));
  color: rgba(255,255,255,.92);
}
/* //////////// FIM: DISPONIBILIDADE //////////// */

/* //////////////////////////////////////////////////////////////////////////
   PATCH (override) — Dashboard + Disponibilidade
   Colar no FIM do style_2.css
////////////////////////////////////////////////////////////////////////// */

/* GRID 12 (garantir colunas + espaçamento) */
.grid12{
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}
.content > section.grid12{
  margin-bottom: 14px;
}
.page-estrategia .content form > section.grid12{
  margin-bottom: 14px;
}
.page-estrategia input[type="number"]{
  -moz-appearance: textfield;
}
.page-estrategia input[type="number"]::-webkit-outer-spin-button,
.page-estrategia input[type="number"]::-webkit-inner-spin-button{
  -webkit-appearance: none;
  margin: 0;
}

/* Spans (garantir que existem) */
.span-3{ grid-column: span 3; }
.span-4{ grid-column: span 4; }
.span-5{ grid-column: span 5; }
.span-6{ grid-column: span 6; }
.span-7{ grid-column: span 7; }
.span-8{ grid-column: span 8; }
.span-9{ grid-column: span 9; }
.span-12{ grid-column: span 12; }

/* TABS (Disponibilidade) — tabs juntos, meta à direita */
.sv-tabs{
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px 0;
  flex-wrap: wrap;
}
.sv-tab-meta{
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* TABS (Dashboard) — componente próprio */
.dash-tabs{
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px 0;
  flex-wrap: wrap;
}
.dash-tab{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.10);
  color: rgba(255,255,255,.88);
  font-weight: 900;
  text-decoration: none;
}
.dash-tab.is-active{
  border-color: rgba(255,255,255,.30);
  background: rgba(88,166,255,.12);
}
.dash-tab-meta{
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Helpers usados no dashboard */
.sv-table-fixed{ table-layout: fixed; width: 100%; }
.sv-ellipsis{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* //////////// INÍCIO: TABLE ALIGN (global) //////////// */
.table th,
.table td{
  vertical-align: middle;
}
/* //////////// FIM: TABLE ALIGN (global) //////////// */
/* //////////// INÍCIO: MODAL (confirm) //////////// */
.modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}
.modal.is-open{ display: block; }

.modal-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
}

.modal-panel{
  position: relative;
  max-width: 520px;
  margin: 8vh auto;
  padding: 0 14px;
}

.modal-card{
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.32);
  box-shadow: 0 14px 40px rgba(0,0,0,.45);
  overflow: hidden;
}

.modal-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(88,166,255,.14);
  border-bottom: 1px solid rgba(255,255,255,.14);
}

.modal-title{
  font-weight: 950;
}

.modal-close{
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.18);
  color: rgba(255,255,255,.9);
  cursor: pointer;
}

.modal-body{
  padding: 14px;
  color: rgba(255,255,255,.9);
}

.modal-actions{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(255,255,255,.12);
}
/* //////////// FIM: MODAL (confirm) //////////// */

/* //////////// INÍCIO: TESTES (status + bar) //////////// */
.status-pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  font-weight: 950;
  font-size: 12px;
  letter-spacing: .3px;
}
.status-pill.ok{
  background: color-mix(in srgb, var(--ok) 18%, rgba(0,0,0,.78));
  border-color: color-mix(in srgb, var(--ok) 40%, rgba(255,255,255,.14));
}
.status-pill.danger{
  background: color-mix(in srgb, var(--danger) 18%, rgba(0,0,0,.78));
  border-color: color-mix(in srgb, var(--danger) 45%, rgba(255,255,255,.14));
}
.status-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(0,0,0,.35) inset;
}
.status-dot.ok{ background: var(--ok); }
.status-dot.danger{ background: var(--danger); }

.sv-bar{
  height: 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.18);
  overflow: hidden;
}
.sv-bar-fill{
  height: 100%;
  background: rgba(88,166,255,.55);
}
/* //////////// FIM: TESTES (status + bar) //////////// */
/* //////////// INÍCIO: MODAL — fundo opaco (override) //////////// */
.modal-card{
  background: #0b1422; /* opaco */
  border: 1px solid rgba(255,255,255,.16);
}

.modal-body{
  background: #0b1422; /* garante uniforme se houver overrides */
}

.modal-head{
  background: #153251; /* mantém o header com contraste, opaco */
}

.modal-actions{
  background: #0b1422; /* opaco */
}
/* //////////// FIM: MODAL — fundo opaco (override) //////////// */

/* //////////// INÍCIO: NOTE “colada ao fundo” do card //////////// */
.card-body{
  display: flex;
  flex-direction: column;
}

.note.note-bottom{
  margin-top: auto;
  padding-top: 8px;
}
.note.note-bottom.note-gap{
  margin-top: 12px;
}
.note-bottom-wrap{
  margin-top: auto;
}
/* //////////// FIM: NOTE “colada ao fundo” do card //////////// */

/* //////////// INÍCIO: EQUIPAS — seleção de pilotos //////////// */
.team-pilot-row{
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.team-pilot-select{
  max-width: 260px;
}

.team-pilot-remove{
  margin-left: auto;
}

.team-pilot-add{
  margin-top: 10px;
}
/* //////////// FIM: EQUIPAS — seleção de pilotos //////////// */

/* //////////// INÍCIO: ALERTAS — espaçamento //////////// */
.alerts-spaced{
  margin-bottom: 12px;
}
/* //////////// FIM: ALERTAS — espaçamento //////////// */

/* //////////// INÍCIO: Sessão — bandeira animada //////////// */
.race-flag{
  --w: 34px;
  --h: 22px;
  width: calc(var(--w) + 6px);
  height: var(--h);
  position: relative;
  display: inline-block;
}
.race-flag::before{
  content:"";
  position:absolute;
  left:0;
  top:-2px;
  width: 2px;
  height: calc(var(--h) + 6px);
  background: rgba(255,255,255,.35);
  border-radius: 2px;
}
.race-flag::after{
  content:"";
  position:absolute;
  left: 3px;
  top: 0;
  width: var(--w);
  height: var(--h);
  border-radius: 4px;
  transform-origin: left center;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.35));
  animation: flagWave 1.2s ease-in-out infinite;
}
.race-flag.is-off::after{
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  animation: none;
  opacity: .7;
}
.race-flag.is-green::after{
  background: linear-gradient(90deg, rgba(0,0,0,.25), rgba(0,0,0,0)), #16c55a;
}
.race-flag.is-white::after{
  background: linear-gradient(90deg, rgba(0,0,0,.18), rgba(0,0,0,0)), #f2f4f7;
  border: 1px solid rgba(0,0,0,.12);
}
.race-flag.is-yellow::after{
  background: linear-gradient(90deg, rgba(0,0,0,.22), rgba(0,0,0,0)), #ffd200;
  border: 1px solid rgba(0,0,0,.12);
}
.race-flag.is-checkered::after{
  background:
    linear-gradient(90deg, rgba(0,0,0,.22), rgba(0,0,0,0)),
    repeating-conic-gradient(#111 0 25%, #fff 0 50%);
  background-size: auto, 10px 10px;
  background-position: 0 0, 0 0;
  border: 1px solid rgba(255,255,255,.12);
}
@keyframes flagWave{
  0%   { transform: perspective(120px) rotateY(0deg) skewY(-2deg) translateY(0px); }
  50%  { transform: perspective(120px) rotateY(-18deg) skewY(2deg) translateY(1px); }
  100% { transform: perspective(120px) rotateY(0deg) skewY(-2deg) translateY(0px); }
}
/* //////////// FIM: Sessão — bandeira animada //////////// */

/* Inputs (Acelerador/Travão/Mudança) */
.vg-inputs-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 16px;
  align-items: end;
  min-height: 180px;
}
.vg-input-col {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 6px;
}
.vg-input-col-vert {
  justify-items: center;
  text-align: center;
}
.vg-input-gear {
  min-width: 90px;
}
.vg-input-speed {
  min-width: 110px;
}
.vg-input-wheel {
  min-width: 110px;
  justify-items: center;
}
.vg-wheel-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}
.vg-wheel-row .vg-label {
  text-align: center;
}
.vg-wheel-row .vg-gear {
  justify-self: center;
}
.vg-bar {
  height: 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  position: relative;
}
.vg-bar span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 8px;
  transition: width 120ms linear;
}
.vg-bar-vert {
  width: 12px;
  height: 150px;
  border-radius: 10px;
}
.vg-bar-vert span {
  width: 100%;
  height: 0%;
  transition: height 120ms linear;
  position: absolute;
  left: 0;
  bottom: 0;
}
.vg-bar-throttle span { background: #16c55a; }
.vg-bar-brake span { background: #ef4444; }
.vg-input-col .vg-val {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.vg-gear {
  justify-self: end;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 48px;
  text-align: center;
}
.vg-wheel {
  width: 64px;
  height: 64px;
  position: relative;
  transform: rotate(0deg);
  transition: transform 80ms linear;
}
.vg-wheel-ring {
  position: absolute;
  inset: 0;
  border: 4px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  background: rgba(0,0,0,0.12);
}
.vg-wheel-spoke {
  position: absolute;
  left: 50%;
  top: 50%;
  background: rgba(255,255,255,0.35);
  transform: translate(-50%, -50%);
}
.vg-wheel-spoke-h {
  width: 44px;
  height: 4px;
  border-radius: 4px;
}
.vg-wheel-spoke-v {
  width: 4px;
  height: 44px;
  border-radius: 4px;
}
.vg-wheel-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transform: translate(-50%, -50%);
}

/* ====== Estatísticas (novo) ====== */
.stats-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.stats-kpi {
  background: rgba(13, 22, 38, 0.65);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 12px;
}
.stats-kpi .kpi-value {
  font-size: 20px;
  font-weight: 600;
  margin-top: 4px;
}
.stats-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 16px;
}
.stats-tabs .tab {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(9, 16, 30, 0.65);
  color: #cdd7e6;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  cursor: default;
}
.stats-tabs .tab.active {
  background: rgba(26, 59, 110, 0.75);
  border-color: rgba(73, 144, 226, 0.45);
  color: #eaf2ff;
}
.stats-chart.card {
  margin-bottom: 16px;
}
.stats-chart .chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.stats-chart .chart-body {
  padding: 10px 14px 14px;
}
.stats-chart--compact {
  margin-bottom: 16px;
}
.stats-chart--compact .chart-body {
  padding: 6px 12px 12px;
}
.ir-chart--compact {
  width: 100%;
  height: auto;
  max-height: 220px;
}
.ir-chart .axis {
  stroke: rgba(255,255,255,0.18);
  stroke-width: 1;
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(9, 16, 30, 0.5);
  color: #cdd7e6;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  cursor: pointer;
  opacity: 0.5;
}
.legend-item.active {
  opacity: 1;
}
.legend-item .swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}
.ir-chart {
  width: 100%;
  height: auto;
}
.ir-chart .grid line {
  stroke: rgba(255,255,255,0.08);
  stroke-width: 1;
}
.ir-chart .axis line {
  stroke: rgba(255,255,255,0.18);
  stroke-width: 1;
}
.ir-chart .line {
  stroke-width: 2;
  fill: none;
}
.ir-chart .dot {
  fill: #48d1b3;
}
.ir-chart text {
  fill: rgba(244, 248, 255, 0.96);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  paint-order: stroke;
  stroke: rgba(6, 12, 24, 0.9);
  stroke-width: 2px;
  stroke-linejoin: round;
}
.ir-chart .xlab {
  font-size: 11px;
}
.ir-chart .ylab {
  font-size: 11px;
}

/* Telemetria - análise */
.telemetry-layout {
  display: grid;
  gap: 16px;
}
.telemetry-layout--garage {
  grid-template-columns: 240px minmax(280px, 0.9fr) minmax(520px, 1.4fr);
}
.telemetry-sidebar {
  display: grid;
  gap: 16px;
}
.telemetry-center,
.telemetry-right {
  display: grid;
  gap: 16px;
  align-content: start;
}
.telemetry-panel {
  padding: 12px 14px 14px;
}
.telemetry-panel-title {
  font-weight: 600;
  color: #e7f0ff;
  margin-bottom: 10px;
}
.telemetry-laps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.telemetry-lap {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(14, 24, 42, 0.6);
  border: 1px solid rgba(255,255,255,0.08);
}
.telemetry-lap.active {
  border-color: rgba(88, 199, 255, 0.35);
  background: rgba(20, 36, 64, 0.75);
}
.lap-color {
  width: 8px;
  height: 100%;
  border-radius: 6px;
}
.lap-info {
  display: grid;
  gap: 2px;
}
.lap-time {
  font-weight: 600;
  color: #eaf2ff;
}
.lap-meta {
  font-size: 11px;
  color: #9db2cd;
}
.lap-delta {
  font-size: 12px;
  color: #a7bddb;
}
.telemetry-gaps th,
.telemetry-gaps td {
  font-size: 12px;
  padding: 6px 8px;
}
.telemetry-gaps .gap-delta {
  color: #ff9aa0;
}
.telemetry-map {
  display: grid;
  align-content: start;
}
.telemetry-track {
  width: 100%;
  height: 320px;
}
.telemetry-track .track-line {
  fill: none;
  stroke: rgba(255, 110, 140, 0.75);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(255, 120, 160, 0.35));
}
.telemetry-track .track-marker {
  fill: #48d1b3;
  stroke: rgba(0,0,0,0.4);
  stroke-width: 2;
}
.telemetry-charts {
  display: grid;
  gap: 12px;
}
.telemetry-chart .ir-chart {
  width: 100%;
  height: auto;
  max-height: 190px;
}
.telemetry-chart--stack .ir-chart {
  max-height: 180px;
}
.telemetry-chart--wide .ir-chart {
  max-height: 210px;
}
.telemetry-chart {
  position: relative;
  min-width: 0;
  overflow: hidden;
}
.sv-chart-tooltip {
  position: absolute;
  right: auto;
  top: 10px;
  background: rgba(9, 16, 30, 0.88);
  border: 1px solid rgba(255,255,255,0.12);
  color: #dbe7f7;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 11px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  width: max-content;
  max-width: 220px;
  white-space: nowrap;
  z-index: 4;
}
.sv-tip-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}
.sv-tip-row:last-child {
  margin-bottom: 0;
}
.sv-tip-swatch {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
}
.ir-chart .crosshair {
  stroke: rgba(255,255,255,0.25);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}
.ir-chart .hover-dot {
  stroke: rgba(0,0,0,0.35);
  stroke-width: 1;
}
