/* ==========================================================================
   T1 DIGITAL · GERADOR DE PLANEJAMENTO MENSAL
   Sistema de design baseado no Manual de Identidade Visual T1 v1.0
   ========================================================================== */

/* ---------- Tokens de design ---------- */
:root {
  --t1-primary: #003058;
  --t1-secondary: #02518C;
  --t1-deep: #001A33;
  --t1-deeper: #000D1F;
  --t1-cta: #E76353;
  --t1-cta-dark: #c44b3b;
  --t1-success: #22C55E;
  --t1-warning: #F59E0B;
  --t1-danger: #EF4444;

  --white: #FFFFFF;
  --white-85: rgba(255,255,255,0.85);
  --white-70: rgba(255,255,255,0.70);
  --white-55: rgba(255,255,255,0.55);
  --white-35: rgba(255,255,255,0.35);
  --white-12: rgba(255,255,255,0.12);
  --white-06: rgba(255,255,255,0.06);
  --white-04: rgba(255,255,255,0.04);

  --action-1: #1FA9CC;
  --action-2: #7B4ED1;
  --action-3: #2AAB7D;
  --action-4: #D43F8C;
  --action-5: #EBA62C;
  --action-6: #5A8BCF;

  --flow-1: #4A90E2;
  --flow-2: #3B82C4;
  --flow-3: #2F6BA0;
  --flow-4: #5AA3E6;
  --flow-5: #6FB2EA;

  --font: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-pill: 999px;

  --shadow-1: 0 4px 16px rgba(0,0,0,0.25);
  --shadow-2: 0 8px 32px rgba(0,0,0,0.35);
  --shadow-glow: 0 0 20px rgba(231, 99, 83, 0.25);

  --t-fast: 120ms ease;
  --t-base: 200ms ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  font-weight: 400;
  color: var(--white-85);
  background: var(--t1-deep);
  background-image:
    radial-gradient(ellipse 1200px 600px at 20% 0%, rgba(2,81,140,0.25) 0%, transparent 60%),
    radial-gradient(ellipse 1000px 500px at 80% 100%, rgba(0,48,88,0.3) 0%, transparent 60%),
    linear-gradient(180deg, var(--t1-deep) 0%, var(--t1-deeper) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 0;
}

h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -0.01em; color: var(--white); }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

.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;
}

.hidden { display: none !important; }

/* ---------- Header ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 13, 31, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--white-06);
}
.app-header__inner {
  max-width: 1680px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: var(--space-3); }
.brand__logo {
  width: 44px; height: 44px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--t1-cta) 0%, var(--t1-cta-dark) 100%);
  display: grid; place-items: center;
  font-weight: 900; font-size: 18px; color: white;
  letter-spacing: -0.03em;
  box-shadow: var(--shadow-glow);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-weight: 900; font-size: 15px; letter-spacing: 0.12em; color: var(--white); }
.brand__tagline { font-size: 12px; color: var(--white-55); font-weight: 500; }

.status-chip {
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--white-06);
  border: 1px solid var(--white-12);
  font-size: 12px;
  font-weight: 600;
  color: var(--white-70);
}
.status-chip--saved {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.3);
  color: var(--t1-success);
}

/* ---------- Layout ---------- */
.app-main {
  position: relative;
  z-index: 1;
  max-width: 1680px;
  margin: 0 auto;
  padding: var(--space-6);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--space-6);
  align-items: start;
}
.content-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  min-width: 0;
}

/* ---------- Panel ---------- */
.panel {
  background: var(--white-04);
  border: 1px solid var(--white-06);
  border-radius: var(--r-lg);
  padding: var(--space-5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-1);
}
.panel__title {
  font-size: 13px;
  font-weight: 800;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: var(--space-4);
}
.panel__sub {
  color: var(--white-55);
  font-size: 13px;
  margin-top: -8px;
  margin-bottom: var(--space-4);
}
.panel__header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  gap: var(--space-3);
}
.panel__header-row .panel__title { margin-bottom: 0; }
.panel__hint {
  font-size: 12px;
  color: var(--white-55);
  font-weight: 500;
}

.panel--calendar {
  position: relative;
  transition: box-shadow var(--t-base);
}
.panel--calendar.is-selecting {
  box-shadow: 0 0 0 2px var(--t1-cta), 0 0 40px rgba(231, 99, 83, 0.25);
}

/* ---------- Grids ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--space-3); }

/* ---------- Fields ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field--grow { flex: 1; min-width: 0; }
.field--inline { flex-direction: row; align-items: center; gap: var(--space-3); }

.field label {
  font-size: 11px;
  font-weight: 700;
  color: var(--white-70);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

input[type="text"],
input[type="date"],
input[type="month"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--white-06);
  border: 1px solid var(--white-12);
  border-radius: var(--r-sm);
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
  transition: border-color var(--t-fast), background var(--t-fast);
  font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--t1-cta);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 0 0 3px rgba(231, 99, 83, 0.15);
}
input::placeholder, textarea::placeholder { color: var(--white-35); }
input:disabled, select:disabled, textarea:disabled { opacity: 0.45; cursor: not-allowed; }

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator {
  filter: invert(0.8);
  cursor: pointer;
}

textarea { resize: vertical; min-height: 60px; }

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='white' d='M0 0l5 6 5-6z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.field-with-button { display: flex; gap: 6px; }
.field-with-button input { flex: 1; }
.field-with-button .btn-ghost { white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn-primary {
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--t1-cta) 0%, var(--t1-cta-dark) 100%);
  border: 0;
  border-radius: var(--r-sm);
  color: white;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.05em;
  transition: transform var(--t-fast), box-shadow var(--t-fast), opacity var(--t-fast);
  box-shadow: 0 2px 8px rgba(231, 99, 83, 0.35);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(231, 99, 83, 0.5); }
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-ghost {
  padding: 9px 16px;
  background: var(--white-06);
  border: 1px solid var(--white-12);
  border-radius: var(--r-sm);
  color: var(--white-85);
  font-weight: 600;
  font-size: 13px;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.btn-ghost:hover { background: var(--white-12); border-color: var(--white-35); }

.btn-big { padding: 14px 22px; font-size: 14px; }

.btn-remove {
  width: 32px; height: 32px;
  background: transparent;
  border: 1px solid var(--white-12);
  border-radius: var(--r-sm);
  color: var(--white-55);
  font-size: 14px;
  transition: all var(--t-fast);
}
.btn-remove:hover {
  color: var(--t1-danger);
  border-color: var(--t1-danger);
  background: rgba(239, 68, 68, 0.08);
}

.btn-suggest {
  font-size: 12px;
  padding: 9px 12px;
}

.btn-pick-dates {
  width: 34px; height: 34px;
  padding: 0;
  background: rgba(231, 99, 83, 0.1);
  border: 1px solid rgba(231, 99, 83, 0.35);
  border-radius: var(--r-sm);
  color: var(--t1-cta);
  font-size: 14px;
  cursor: pointer;
  transition: all var(--t-fast);
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
}
.btn-pick-dates:hover {
  background: rgba(231, 99, 83, 0.2);
  border-color: var(--t1-cta);
  transform: translateY(-1px);
}
.btn-pick-dates.is-active {
  background: var(--t1-cta);
  color: white;
  border-color: var(--t1-cta);
  animation: pickPulse 1.4s ease-in-out infinite;
}
@keyframes pickPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(231, 99, 83, 0.5); }
  50%      { box-shadow: 0 0 0 6px rgba(231, 99, 83, 0); }
}

/* ---------- Toggle rows ---------- */
.toggle-row {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  color: var(--white-85);
  font-weight: 500;
}
.toggle-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 36px;
  height: 20px;
  border-radius: var(--r-pill);
  background: var(--white-12);
  border: 1px solid var(--white-12);
  position: relative;
  transition: background var(--t-fast);
  cursor: pointer;
  flex-shrink: 0;
}
.toggle-row input[type="checkbox"]::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: white;
  transition: transform var(--t-fast);
}
.toggle-row input[type="checkbox"]:checked {
  background: var(--t1-cta);
  border-color: var(--t1-cta);
}
.toggle-row input[type="checkbox"]:checked::after { transform: translateX(16px); }

.toggle-row--compact input[type="checkbox"] { width: 32px; height: 18px; }
.toggle-row--compact input[type="checkbox"]::after { width: 12px; height: 12px; }
.toggle-row--compact input[type="checkbox"]:checked::after { transform: translateX(14px); }

/* ==========================================================================
   PAINEL FLUTUANTE DE SELEÇÃO DE DATAS
   ========================================================================== */
.selection-floater {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 320px;
  z-index: 20;
  background: linear-gradient(180deg, rgba(6, 35, 68, 0.98) 0%, rgba(0, 13, 31, 0.98) 100%);
  border: 1px solid rgba(231, 99, 83, 0.45);
  border-radius: var(--r-lg);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(231, 99, 83, 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: var(--space-4);
  animation: floaterIn 200ms ease-out;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
@keyframes floaterIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.selection-floater__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
}
.selection-floater__title-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: 1;
  min-width: 0;
}
.selection-floater__pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--t1-cta);
  box-shadow: 0 0 8px var(--t1-cta);
  animation: pulse 1.2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(1.3); }
}
.selection-floater__title-block {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}
.selection-floater__title-block strong {
  font-size: 12px;
  font-weight: 800;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.selection-floater__title-block span {
  font-size: 11px;
  color: var(--white-70);
  font-weight: 500;
}
.selection-floater__close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--white-06);
  border: 1px solid var(--white-12);
  color: var(--white-85);
  font-size: 13px;
  display: grid;
  place-items: center;
  transition: all var(--t-fast);
  flex-shrink: 0;
}
.selection-floater__close:hover {
  background: var(--t1-danger);
  border-color: var(--t1-danger);
  color: white;
}

.selection-floater__tabs {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.selection-floater__tab {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2);
  align-items: center;
  padding: 8px 10px;
  background: var(--white-04);
  border: 1px solid var(--white-06);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--t-fast);
  text-align: left;
  font-family: inherit;
}
.selection-floater__tab:hover {
  background: var(--white-06);
  border-color: var(--white-12);
}
.selection-floater__tab--active {
  background: rgba(231, 99, 83, 0.18);
  border-color: var(--t1-cta);
  box-shadow: 0 0 0 1px var(--t1-cta);
}
.selection-floater__tab-label {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}
.selection-floater__tab-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--white);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.selection-floater__tab-dates {
  font-size: 10px;
  color: var(--white-55);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.selection-floater__tab--has-dates .selection-floater__tab-dates {
  color: var(--t1-success);
  font-weight: 600;
}
.selection-floater__tab-status {
  font-size: 14px;
  line-height: 1;
}
.selection-floater__tab--has-dates .selection-floater__tab-status {
  color: var(--t1-success);
}
.selection-floater__tab:not(.selection-floater__tab--has-dates) .selection-floater__tab-status {
  color: var(--white-35);
}

.selection-floater__current {
  padding: 8px 10px;
  background: rgba(231, 99, 83, 0.12);
  border: 1px dashed rgba(231, 99, 83, 0.35);
  border-radius: var(--r-sm);
}
.selection-floater__current-label {
  font-size: 9px;
  font-weight: 800;
  color: var(--white-70);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.selection-floater__current-value {
  font-size: 12px;
  font-weight: 700;
  color: white;
  font-variant-numeric: tabular-nums;
}

.selection-floater__actions {
  display: flex;
  gap: 6px;
}
.selection-floater__actions .btn-ghost,
.selection-floater__actions .btn-primary {
  flex: 1;
  font-size: 11px;
  padding: 8px 10px;
  letter-spacing: 0.03em;
}

.selection-floater__footnote {
  font-size: 10px;
  color: var(--white-55);
  font-style: italic;
  line-height: 1.4;
  padding-top: var(--space-2);
  border-top: 1px solid var(--white-06);
}

/* ---------- Calendar ---------- */
.panel--calendar { padding-bottom: var(--space-4); }

.calendar-nav { display: flex; align-items: center; gap: var(--space-2); }
.cal-label {
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  min-width: 160px;
  text-align: center;
  color: var(--white);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 6px;
}
.calendar-weekdays > div {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--white-55);
  padding: 6px 0;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-cell {
  position: relative;
  min-height: 108px;
  background: var(--white-04);
  border: 1px solid var(--white-06);
  border-radius: var(--r-sm);
  padding: 6px 6px 4px 6px;
  display: flex;
  flex-direction: column;
  transition: background var(--t-fast), border-color var(--t-fast);
  overflow: hidden;
}
.cal-cell:hover { background: var(--white-06); border-color: var(--white-12); }
.cal-cell--out { opacity: 0.28; pointer-events: none; }
.cal-cell--today {
  border-color: var(--t1-cta);
  box-shadow: inset 0 0 0 1px var(--t1-cta);
}

.cal-cell__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--white-85);
  margin-bottom: 4px;
}
.cal-cell--today .cal-cell__head { color: var(--t1-cta); }

.cal-cell__holiday {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--t1-danger);
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}

.cal-cell__bars {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.cal-bar {
  height: 14px;
  border-radius: 3px;
  min-width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 6px;
  overflow: hidden;
}
.cal-bar__label {
  font-size: 9px;
  font-weight: 700;
  color: white;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  flex: 1;
  min-width: 0;
}
.cal-bar--live::after {
  content: '📡';
  position: absolute;
  top: -4px;
  right: 2px;
  font-size: 10px;
  line-height: 1;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.5));
}

.cal-cell__divider {
  height: 1px;
  background: var(--white-06);
  margin: 2px 0;
}

.cal-flow {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 4px 0 0;
  height: 12px;
  min-width: 0;
  position: relative;
}
.cal-flow::before {
  content: '';
  width: 2px;
  height: 10px;
  background: var(--flow-color, var(--flow-1));
  border-radius: 1px;
  flex-shrink: 0;
}
.cal-flow__label {
  font-size: 9px;
  font-weight: 600;
  color: var(--white-85);
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}
.cal-flow__more {
  font-size: 9px;
  font-weight: 700;
  color: var(--white-55);
  line-height: 1;
  padding: 0 2px;
}

.cal-cell__tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--t1-deeper);
  border: 1px solid var(--white-12);
  padding: 8px 10px;
  border-radius: var(--r-sm);
  font-size: 11px;
  color: var(--white);
  white-space: normal;
  text-align: left;
  max-width: 240px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-fast);
  z-index: 10;
  box-shadow: var(--shadow-2);
}
.cal-cell:hover .cal-cell__tooltip { opacity: 1; }

/* ---------- MODO SELEÇÃO ---------- */
body.is-selecting .cal-cell {
  cursor: pointer;
}
body.is-selecting .cal-cell:not(.cal-cell--out):hover {
  background: rgba(231, 99, 83, 0.18);
  border-color: var(--t1-cta);
  transform: scale(1.02);
  z-index: 2;
}
body.is-selecting .cal-cell--out { cursor: not-allowed; }
body.is-selecting .cal-cell__tooltip { display: none; }

.cal-cell--sel-start {
  background: rgba(231, 99, 83, 0.35) !important;
  border-color: var(--t1-cta) !important;
  box-shadow: 0 0 0 2px var(--t1-cta) inset !important;
}
.cal-cell--sel-in-range {
  background: rgba(231, 99, 83, 0.18) !important;
  border-color: rgba(231, 99, 83, 0.5) !important;
}
.cal-cell--sel-end {
  background: rgba(231, 99, 83, 0.35) !important;
  border-color: var(--t1-cta) !important;
  box-shadow: 0 0 0 2px var(--t1-cta) inset !important;
}

/* Realce do range já salvo da fase atualmente em edição */
.cal-cell--current-range {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.35);
}

/* ---------- Calendar Legend ---------- */
.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--white-06);
}
.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--white-70);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--white-04);
  border: 1px solid var(--white-06);
}
.legend-chip__dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
.legend-chip--flow .legend-chip__dot {
  width: 2px;
  height: 10px;
  border-radius: 1px;
}

/* ---------- Actions List ---------- */
.actions-list { display: flex; flex-direction: column; gap: var(--space-3); }

.action-card {
  border: 1px solid var(--white-06);
  border-radius: var(--r-md);
  background: var(--white-04);
  overflow: hidden;
  transition: border-color var(--t-base);
}
.action-card--active { border-color: var(--white-12); }
.action-card--expanded .action-card__body { display: flex; }
.action-card--expanded .action-card__expand { transform: rotate(180deg); }
.action-card--invalid {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.2);
}
.action-card--selecting {
  border-color: var(--t1-cta) !important;
  box-shadow: 0 0 0 1px var(--t1-cta), 0 0 24px rgba(231,99,83,0.2);
}

.action-card__header {
  display: grid;
  grid-template-columns: 6px auto auto 1fr auto auto auto;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  user-select: none;
  transition: background var(--t-fast);
}
.action-card__header:hover { background: var(--white-04); }
.action-card__swatch {
  width: 6px;
  height: 32px;
  border-radius: 2px;
  background: var(--swatch-color, var(--white-12));
}
.action-card--active .action-card__swatch {
  box-shadow: 0 0 12px 0 var(--swatch-color, var(--white-12));
}
.action-card__summary { display: flex; flex-direction: column; min-width: 0; }
.action-card__index {
  font-size: 10px;
  font-weight: 800;
  color: var(--white-55);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.action-card__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.action-card:not(.action-card--active) .action-card__name {
  color: var(--white-35); font-style: italic;
}

.action-card__type-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--white-06);
  border: 1px solid var(--white-12);
  color: var(--white-70);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.action-card--active .action-card__type-badge {
  background: rgba(2, 81, 140, 0.3);
  border-color: rgba(2, 81, 140, 0.6);
  color: var(--white);
}

.action-card__budget-badge {
  font-size: 13px;
  font-weight: 800;
  color: var(--white);
  font-variant-numeric: tabular-nums;
  min-width: 100px;
  text-align: right;
}
.action-card:not(.action-card--active) .action-card__budget-badge { color: var(--white-35); }

.action-card__expand {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--white-06);
  border: 1px solid var(--white-12);
  color: var(--white);
  font-size: 12px;
  display: grid;
  place-items: center;
  transition: transform var(--t-base), background var(--t-fast);
}

.action-card__body {
  display: none;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5);
  border-top: 1px solid var(--white-06);
  background: rgba(0, 13, 31, 0.3);
}

.sub-block {
  border: 1px solid var(--white-06);
  border-radius: var(--r-sm);
  padding: var(--space-3) var(--space-4) var(--space-4) var(--space-4);
  margin: 0;
  background: var(--white-04);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.sub-block legend {
  font-size: 11px;
  font-weight: 700;
  color: var(--white-70);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0 8px;
  margin-left: -8px;
}
.sub-block__inner { display: flex; flex-direction: column; gap: var(--space-3); margin-top: var(--space-2); }
.sub-block__hint { font-size: 11px; color: var(--white-35); font-style: italic; }

.baits-list { display: flex; flex-direction: column; gap: var(--space-2); }
.bait-row {
  display: grid;
  grid-template-columns: 1fr 100px 100px 70px 40px;
  gap: var(--space-2);
  align-items: end;
  padding-bottom: var(--space-2);
  border-bottom: 1px dashed var(--white-06);
}
.bait-row:last-child { border-bottom: 0; }
.bait-row__discount {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 12px;
  gap: 4px;
}
.discount-label {
  font-size: 10px;
  color: var(--white-55);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.discount-value {
  font-size: 16px;
  font-weight: 800;
  color: var(--t1-success);
  font-variant-numeric: tabular-nums;
}
.discount-value.is-neutral { color: var(--white-35); }
.btn-add-bait { align-self: flex-start; margin-top: var(--space-2); }

.phase-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-2) 0;
  border-bottom: 1px dashed var(--white-06);
}
.phase-row:last-of-type { border-bottom: 0; }
.phase-row--main .phase-row__title { color: var(--white); font-weight: 700; }
.phase-row__title {
  font-size: 12px;
  font-weight: 600;
  color: var(--white-70);
}
.phase-row__title .required { color: var(--t1-cta); }
.phase-row__fields {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  flex-wrap: wrap;
}
.phase-row__fields select { width: 180px; }
.phase-dates {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 12px;
  color: var(--white-55);
  flex-wrap: wrap;
}
.phase-dates input { width: 150px; }
.phase-dates__sub { display: flex; align-items: center; gap: var(--space-2); }
.phase-dates__label {
  font-size: 11px;
  font-weight: 700;
  color: var(--white-70);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.phase-warning {
  padding: 8px 12px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--r-sm);
  color: var(--t1-warning);
  font-size: 12px;
  font-weight: 600;
}
.phase-info {
  padding: 8px 12px;
  background: rgba(2, 81, 140, 0.15);
  border: 1px solid rgba(2, 81, 140, 0.35);
  border-radius: var(--r-sm);
  color: var(--white-85);
  font-size: 12px;
}

.inline-warning {
  margin-top: var(--space-4);
  padding: 10px 14px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--r-sm);
  color: var(--t1-warning);
  font-size: 12px;
  font-weight: 600;
}

/* ==========================================================================
   FRACIONAMENTO DE VERBA POR FASE
   ========================================================================== */
.split-budget-inner {
  gap: var(--space-3) !important;
}
.split-budget-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.split-budget-row {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: var(--space-3);
  align-items: center;
  padding: 8px 12px;
  background: rgba(0, 13, 31, 0.35);
  border: 1px solid var(--white-06);
  border-radius: var(--r-sm);
}
.split-budget-row__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--white-85);
}
.split-budget-row__input {
  display: flex;
  align-items: center;
  gap: 6px;
}
.split-budget-row__input .currency {
  font-size: 11px;
  color: var(--white-55);
  font-weight: 700;
}
.split-budget-row__input input {
  flex: 1;
  padding: 8px 10px;
  font-size: 13px;
}
.split-budget-summary {
  padding: 10px 12px;
  background: rgba(2, 81, 140, 0.12);
  border: 1px solid rgba(2, 81, 140, 0.3);
  border-radius: var(--r-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.split-budget-summary__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--white-70);
}
.split-budget-summary__row strong {
  font-size: 13px;
  font-weight: 800;
  color: white;
  font-variant-numeric: tabular-nums;
}
.split-budget-summary__row--diff {
  padding-top: 6px;
  border-top: 1px solid var(--white-12);
}
.split-budget-summary__row--diff strong {
  color: var(--white);
}
.split-budget-summary__row--diff.is-ok strong { color: var(--t1-success); }
.split-budget-summary__row--diff.is-warn strong { color: var(--t1-warning); }

/* Flow list */
.flow-list { display: flex; flex-direction: column; gap: var(--space-2); }
.flow-item {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3);
  background: var(--white-04);
  border: 1px solid var(--white-06);
  border-radius: var(--r-sm);
  transition: border-color var(--t-fast);
}
.flow-item--active { border-color: var(--white-12); background: var(--white-06); }
.flow-item__name { font-size: 13px; font-weight: 700; color: var(--white); }
.flow-item__sub {
  font-size: 11px;
  color: var(--white-55);
  font-weight: 500;
  margin-left: var(--space-2);
}
.flow-item__dates {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--white-70);
}
.flow-item__dates input { width: 140px; padding: 7px 10px; font-size: 12px; }
.flow-item__full-month { font-size: 11px; padding: 6px 10px; white-space: nowrap; }
.flow-item__budget { display: flex; align-items: center; gap: 4px; }
.flow-item__budget input { width: 100px; padding: 7px 10px; font-size: 12px; }
.flow-item__budget .currency { font-size: 11px; color: var(--white-55); font-weight: 600; }

.flow-item--locked { opacity: 0.5; }
.flow-item--locked .flow-item__dates input,
.flow-item--locked .flow-item__budget input,
.flow-item--locked .flow-item__full-month { pointer-events: none; opacity: 0.5; }

.google-ads-row { display: flex; align-items: center; gap: var(--space-5); flex-wrap: wrap; }

/* Holidays */
.holidays-add {
  display: flex;
  gap: var(--space-3);
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}
.holidays-add .field { flex: 0 0 180px; }
.holidays-add .field--grow { flex: 1; min-width: 200px; }
.holidays-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.holiday-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 8px 12px;
  background: var(--white-04);
  border: 1px solid var(--white-06);
  border-radius: var(--r-sm);
  font-size: 13px;
}
.holiday-item__date {
  font-weight: 700;
  color: var(--t1-danger);
  min-width: 80px;
  font-variant-numeric: tabular-nums;
}
.holiday-item__name { flex: 1; color: var(--white-85); }
.holiday-item__tag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--white-06);
  color: var(--white-55);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.panel--actions-footer {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
  padding: var(--space-5);
}

.app-footer {
  text-align: center;
  padding: var(--space-5) var(--space-4);
  color: var(--white-35);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

/* ==========================================================================
   BUDGET PANEL
   ========================================================================== */
.budget-panel { position: sticky; top: calc(70px + var(--space-6)); align-self: start; }
.budget-panel__sticky {
  background: var(--white-04);
  border: 1px solid var(--white-12);
  border-radius: var(--r-lg);
  padding: var(--space-5);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-2);
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}
.budget-panel__title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: var(--space-4);
}

.budget-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-2);
  align-items: center;
  padding: 8px 0;
  font-size: 13px;
}
.budget-row__dot { width: 10px; height: 10px; border-radius: 2px; }
.dot--actions { background: linear-gradient(135deg, var(--action-1), var(--action-4)); }
.dot--flow { background: linear-gradient(135deg, var(--t1-secondary), var(--t1-primary)); }
.dot--google { background: #F59E0B; }

.budget-row__label { color: var(--white-70); font-weight: 600; font-size: 12px; }
.budget-row__value {
  text-align: right;
  color: var(--white);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.budget-row__pct { font-size: 10px; font-weight: 600; color: var(--white-55); }

.budget-row--total {
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--white-12);
  margin-bottom: var(--space-3);
}
.budget-row--total .budget-row__label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; }
.budget-row--total .budget-row__value { font-size: 18px; color: var(--white); font-weight: 900; }

.budget-bar {
  display: flex;
  height: 8px;
  border-radius: var(--r-pill);
  overflow: hidden;
  background: var(--white-06);
  margin-bottom: var(--space-3);
}
.budget-bar__seg { transition: flex-basis 200ms ease; }
.budget-bar__seg--actions { background: linear-gradient(90deg, var(--action-1), var(--action-4)); }
.budget-bar__seg--flow { background: linear-gradient(90deg, var(--t1-secondary), var(--t1-primary)); }
.budget-bar__seg--google { background: var(--t1-warning); }

.budget-divider { border: 0; border-top: 1px solid var(--white-12); margin: var(--space-3) 0; }

.budget-row--balance { font-size: 13px; }
.budget-row--balance .budget-row__label { font-weight: 700; color: var(--white); }
.budget-row--balance .budget-row__value { font-size: 15px; font-weight: 900; }
.budget-row--balance.balance--exact .budget-row__value { color: var(--t1-success); }
.budget-row--balance.balance--off .budget-row__value { color: var(--t1-warning); }

.budget-breakdown {
  margin-top: 2px;
  margin-bottom: var(--space-2);
  padding: 6px 8px 6px 10px;
  background: rgba(0, 13, 31, 0.35);
  border-left: 2px solid var(--white-12);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: breakdownIn 180ms ease-out;
}
@keyframes breakdownIn {
  from { opacity: 0; transform: translateX(-4px); }
  to   { opacity: 1; transform: translateX(0); }
}
.budget-breakdown__empty {
  font-size: 10px;
  color: var(--white-35);
  font-style: italic;
  padding: 2px 0;
}
.budget-breakdown__row {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 6px;
  align-items: center;
  padding: 3px 0;
  font-size: 11px;
}
.budget-breakdown__dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.2);
}
.budget-breakdown__name {
  color: var(--white-85);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.budget-breakdown__value {
  color: var(--white);
  font-weight: 700;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.budget-breakdown__row--empty .budget-breakdown__name {
  color: var(--white-35);
  font-style: italic;
}
.budget-breakdown__row--empty .budget-breakdown__value {
  color: var(--white-35);
}

/* ==========================================================================
   IMPOSTO META ADS
   ========================================================================== */
.tax-section {
  margin-top: var(--space-4);
  padding: var(--space-4);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.08) 0%, rgba(245, 158, 11, 0.04) 100%);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--r-md);
}
.tax-section__header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.tax-section__icon {
  font-size: 14px;
  color: var(--t1-warning);
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  background: rgba(245, 158, 11, 0.15);
  border-radius: 50%;
  flex-shrink: 0;
}
.tax-section__title {
  font-size: 11px;
  font-weight: 800;
  color: var(--t1-warning);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.2;
}
.tax-section__sub {
  font-size: 10px;
  color: var(--white-55);
  font-weight: 500;
  margin-top: 2px;
}

.tax-section__rate-row {
  display: grid;
  grid-template-columns: 1fr 90px;
  gap: var(--space-2);
  align-items: center;
  margin-bottom: var(--space-3);
}
.tax-section__rate-row label {
  font-size: 11px;
  font-weight: 700;
  color: var(--white-70);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tax-section__rate-row input {
  padding: 8px 10px;
  font-size: 13px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.tax-section__breakdown {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: rgba(0, 13, 31, 0.4);
  border-radius: var(--r-sm);
}
.tax-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}
.tax-row__label {
  color: var(--white-70);
  font-weight: 600;
}
.tax-row__value {
  color: var(--white);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.tax-row--tax .tax-row__label,
.tax-row--tax .tax-row__value {
  color: var(--t1-warning);
}
.tax-row--net {
  padding-top: 6px;
  margin-top: 4px;
  border-top: 1px solid var(--white-12);
  font-size: 12px;
}
.tax-row--net .tax-row__label {
  color: var(--white);
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tax-row--net .tax-row__value {
  color: var(--t1-success);
  font-weight: 900;
  font-size: 13px;
}

.tax-section__hint {
  margin-top: var(--space-3);
  font-size: 10px;
  color: var(--white-55);
  font-style: italic;
  line-height: 1.5;
}

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; }
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 13, 31, 0.75);
  backdrop-filter: blur(4px);
  cursor: pointer;
}
.modal__content {
  position: relative;
  background: linear-gradient(180deg, #062344 0%, #001A33 100%);
  border: 1px solid var(--white-12);
  border-radius: var(--r-lg);
  padding: var(--space-5);
  width: min(580px, 90vw);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
}
.modal__content--small { width: min(420px, 90vw); }

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}
.modal__header h2 {
  font-size: 14px;
  font-weight: 800;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.modal__close {
  background: transparent;
  border: 0;
  color: var(--white-55);
  font-size: 16px;
  width: 28px; height: 28px;
  border-radius: 50%;
  transition: background var(--t-fast), color var(--t-fast);
}
.modal__close:hover { background: var(--white-06); color: var(--white); }

.modal__search {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.modal__search input { flex: 1; }
.modal__search-count { font-size: 11px; color: var(--white-55); font-weight: 600; white-space: nowrap; }

.modal__list {
  list-style: none;
  margin: 0; padding: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-height: 0;
}
.suggestion-item {
  padding: 10px 12px;
  background: var(--white-04);
  border: 1px solid var(--white-06);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--t-fast);
}
.suggestion-item:hover { background: var(--white-06); border-color: var(--t1-cta); }
.suggestion-item__name { font-weight: 700; font-size: 13px; color: var(--white); margin-bottom: 3px; }
.suggestion-item__narrative {
  font-size: 11px;
  color: var(--white-55);
  font-style: italic;
  line-height: 1.4;
}
.suggestion-item__narrative.is-empty::before {
  content: '—';
  font-style: normal;
  color: var(--white-35);
}

.modal__body { color: var(--white-85); font-size: 14px; margin: var(--space-3) 0 var(--space-4) 0; }
.modal__footer { display: flex; gap: var(--space-2); justify-content: flex-end; }

/* ==========================================================================
   RESPONSIVIDADE
   ========================================================================== */
@media (max-width: 1280px) {
  .app-main { grid-template-columns: 1fr; }
  .budget-panel { position: sticky; top: 70px; z-index: 20; }
  .budget-panel__sticky { padding: var(--space-4); max-height: none; }

  /* Painel flutuante vira modal no topo em telas menores */
  .selection-floater {
    position: fixed;
    top: 80px;
    right: var(--space-4);
    left: var(--space-4);
    width: auto;
    max-width: 420px;
    margin-left: auto;
  }
}

@media (max-width: 900px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .action-card__header {
    grid-template-columns: 6px auto 1fr auto;
    gap: var(--space-2);
  }
  .action-card__type-badge, .action-card__budget-badge { display: none; }
  .bait-row { grid-template-columns: 1fr 1fr; gap: var(--space-2); }
  .bait-row__discount, .btn-remove { grid-column: span 1; }
  .flow-item { grid-template-columns: auto 1fr; }
  .flow-item__dates, .flow-item__full-month, .flow-item__budget { grid-column: 1 / -1; }
  .phase-row { grid-template-columns: 1fr; }
  .split-budget-row { grid-template-columns: 1fr; gap: 6px; }
  .selection-floater {
    left: var(--space-3);
    right: var(--space-3);
    max-width: none;
  }
}

/* ==========================================================================
   MODO EXPORT PDF
   ========================================================================== */
body.exporting-pdf::before { display: none; }

.pdf-report {
  background: #001A33;
  color: #fff;
  padding: 40px;
  font-family: var(--font);
  width: 794px;
  min-height: 1123px;
}
.pdf-report__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--t1-cta);
  padding-bottom: 20px;
  margin-bottom: 28px;
}
.pdf-report__brand { display: flex; align-items: center; gap: 14px; }
.pdf-report__logo {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, #E76353, #c44b3b);
  border-radius: 10px;
  display: grid; place-items: center;
  color: white;
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.03em;
}
.pdf-report__title-block { line-height: 1.15; }
.pdf-report__kicker {
  font-size: 11px; font-weight: 900; letter-spacing: 0.2em;
  color: var(--t1-cta);
  text-transform: uppercase;
}
.pdf-report__main-title {
  font-size: 22px; font-weight: 900;
  color: white;
  margin: 3px 0 0 0;
}
.pdf-report__meta {
  text-align: right;
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.06em;
  line-height: 1.6;
}
.pdf-report__meta strong { color: white; font-weight: 700; }

.pdf-report h2 {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--t1-cta);
  margin: 28px 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.pdf-report h3 {
  font-size: 16px;
  font-weight: 800;
  color: white;
  margin: 0 0 8px 0;
}
.pdf-report p, .pdf-report li {
  font-size: 12px;
  line-height: 1.55;
  color: rgba(255,255,255,0.82);
}
.pdf-report__summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin: 14px 0 20px 0;
}
.pdf-report__summary-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 14px;
}
.pdf-report__summary-card strong {
  display: block;
  font-size: 10px;
  font-weight: 800;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.pdf-report__summary-card span {
  font-size: 18px;
  font-weight: 900;
  color: white;
  font-variant-numeric: tabular-nums;
}
.pdf-report__summary-card small {
  display: block;
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  margin-top: 2px;
}

.pdf-tax-box {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 10px;
  padding: 14px;
  margin: 14px 0 20px 0;
}
.pdf-tax-box__title {
  font-size: 11px;
  font-weight: 900;
  color: #F59E0B;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.pdf-tax-box__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 12px;
  color: rgba(255,255,255,0.82);
}
.pdf-tax-box__row--net {
  padding-top: 8px;
  margin-top: 4px;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-weight: 800;
  color: white;
  font-size: 13px;
}
.pdf-tax-box__row--net span:last-child { color: #22C55E; }

.pdf-action {
  page-break-inside: avoid;
  break-inside: avoid;
  margin-bottom: 24px;
  padding: 16px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  border-left: 4px solid var(--action-color, var(--t1-cta));
}
.pdf-action__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.pdf-action__badges {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.pdf-action__badge {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.pdf-action__badge--type { background: rgba(2,81,140,0.4); color: white; }
.pdf-action__badge--budget { background: rgba(231,99,83,0.25); color: #ffb3a5; }
.pdf-action dl {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 6px 14px;
  margin: 8px 0 0 0;
}
.pdf-action dt {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.55);
  padding-top: 2px;
}
.pdf-action dd { margin: 0; font-size: 12px; color: rgba(255,255,255,0.88); }
.pdf-action dd ul { margin: 0; padding: 0; list-style: none; }
.pdf-action dd ul li { padding: 1px 0; font-size: 12px; }

.pdf-flow-row {
  display: grid;
  grid-template-columns: 40px 1fr 160px 100px;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  align-items: center;
  font-size: 12px;
}
.pdf-flow-row:last-child { border-bottom: 0; }
.pdf-flow-row__num { font-weight: 900; color: var(--t1-cta); font-size: 14px; }
.pdf-flow-row__name { font-weight: 700; color: white; }
.pdf-flow-row__period { color: rgba(255,255,255,0.7); font-size: 11px; }
.pdf-flow-row__budget { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

.pdf-holiday-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
  padding: 6px 0;
  font-size: 12px;
}
.pdf-holiday-row__date {
  font-weight: 800;
  color: #EF4444;
  font-variant-numeric: tabular-nums;
}

.pdf-notes-box {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 14px;
  font-size: 12px;
  line-height: 1.55;
  color: rgba(255,255,255,0.88);
  white-space: pre-wrap;
}

.pdf-report__footer {
  margin-top: 32px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.12);
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
}
