/* ===========================================
   SUMMARY.CSS - ESTILOS PRINCIPAIS
   Grupo Cafeina - Gestão Interna
   
   Este arquivo usa as variáveis definidas em variables.css
   =========================================== */

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

@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--gc-color-surface, #ffffff);
  color: var(--gc-color-text, #111827);
  font-family: var(--gc-font-sans, "Poppins"), system-ui, sans-serif !important;
  line-height: var(--leading-normal, 1.6);
  font-variant-numeric: tabular-nums;
}

/* Controles nativos nem sempre herdam a família do documento da mesma forma
   entre navegadores. A tipografia textual é explícita; money/code mantêm a
   exceção monoespaçada declarada abaixo. */
button,
input,
optgroup,
select,
textarea {
  font-family: var(--gc-font-sans, "Poppins"), system-ui, sans-serif !important;
}

main {
  max-width: 920px;
  margin: 0 auto;
  padding: 16px 20px 32px;
}

/* Largura total para páginas com GC_FULL_WIDTH_LAYOUT */
body.gc-full-width main {
  max-width: none !important;
}

header.summary-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--gc-color-divider);
  margin-bottom: 18px;
}

header.summary-header h1 {
  margin: 0;
  font-size: 1.9rem;
  color: var(--gc-color-text);
}

header.summary-header p {
  margin: 4px 0 0;
  font-size: 0.95rem;
  color: var(--gc-color-text-secondary);
}

.print-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid #16486a;
  background: transparent;
  color: #16486a;
  border-radius: var(--radius-button, 3px);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.print-button:hover {
  background: #16486a;
  color: var(--gc-color-text-inverse);
  text-decoration: none;
}

section.panel {
  border: 1px solid var(--gc-color-border-subtle);
  border-radius: var(--radius-container, 3px);
  padding: 18px 20px;
  margin-bottom: 16px;
  background: var(--gc-color-surface);
}

section.panel h2 {
  margin-top: 0;
  font-size: 1.1rem;
  color: var(--gc-color-text);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.summary-card {
  border: 1px solid var(--gc-color-border-subtle);
  border-radius: var(--radius-button, 3px);
  padding: 14px 16px;
  background: var(--gc-color-surface-raised);
}

.summary-card h3 {
  margin: 0 0 6px;
  font-size: 0.85rem;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.summary-card strong {
  display: block;
  font-size: 1.6rem;
  color: var(--gc-color-text);
}

.summary-card span {
  font-size: 0.85rem;
  color: var(--gc-color-text-secondary);
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin-top: 12px;
}

thead th {
  text-align: left;
  padding: 10px;
  font-size: 0.85rem;
  color: var(--gc-color-text);
  border-bottom: 1px solid var(--gc-color-divider);
}

tbody td {
  padding: 10px;
  border-bottom: 1px solid var(--gc-color-border-subtle);
  font-size: 0.9rem;
  vertical-align: top;
  word-break: break-word;
}

tbody tr:last-child td {
  border-bottom: none;
}

.unit-card {
  border: 1px solid var(--gc-color-border-subtle);
  border-radius: var(--radius-button, 3px);
  padding: 16px;
  margin-bottom: 12px;
  background: var(--gc-color-surface-raised);
}

.unit-card h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: var(--gc-color-text);
}

.responsible-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.responsible-item {
  border: 1px solid var(--gc-color-border-subtle);
  border-radius: var(--radius-container, 3px);
  padding: 10px 12px;
  background: var(--gc-color-surface);
  font-size: 0.88rem;
}

.responsible-item strong {
  display: block;
  color: var(--gc-color-text);
  margin-bottom: 4px;
}

.responsible-item span {
  display: block;
  color: #4b5563;
  margin-bottom: 2px;
}

.note-list {
  margin: 0;
  padding-left: 18px;
  color: #374151;
  font-size: 0.9rem;
}

.note-list li {
  margin-bottom: 6px;
}

@media print {
  body {
    background: #fff;
    color: #111827;
  }

  .print-button {
    display: none;
  }

  main {
    padding: 0 12px 24px;
  }

  header.summary-header {
    padding: 12px 0;
    margin-bottom: 14px;
    border-bottom: 1px solid #d1d5db;
  }

  section.panel {
    border: 1px solid #d1d5db;
    page-break-inside: auto;
    break-inside: auto;
  }

  .unit-card,
  .responsible-item {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

@page {
  margin: 10mm;
}

.md\:w-40 {
  width: 20rem;
}

/* Classe para valores monetários - fonte monoespaçada e negrito */
.money-value {
  font-family: var(--gc-font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace) !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em !important;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* Valores operacionais em linhas e tabelas compartilham a mesma métrica.
   Cards de resumo e totais podem manter hierarquia tipográfica própria. */
.money-value.money-value--list {
  font-size: 14px !important;
  line-height: 20px !important;
}

/* Regra universal para tags semânticas. Cores, largura e espaçamento continuam
   definidos pelo contexto; a métrica textual é única para status e categorias. */
:where(
  .gc-status-tag,
  .status-tag,
  .status-badge,
  .gc-category-tag,
  .category-tag,
  .category-badge,
  .gc-division-tag,
  .division-tag,
  .division-badge
) {
  font-size: 10px !important;
  line-height: 14px !important;
}

/* Leitura do acelerador financeiro da página inicial. */
#profitGaugeCard .profit-gauge-visual {
  position: relative;
  display: flex;
  height: 140px;
  align-items: center;
  justify-content: center;
}

#profitGaugeCard .profit-gauge-readout {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  display: flex;
  transform: translateX(-50%);
  flex-direction: column;
  align-items: center;
  text-align: center;
}

#profitGaugeCard .profit-gauge-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 4px;
  padding: 3px 7px;
  border: 1px solid transparent;
  border-radius: var(--radius-button, 3px);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

#profitGaugeCard .profit-gauge-status--healthy {
  border-color: var(--gc-color-success-border);
  background: var(--gc-color-success-soft);
  color: var(--gc-color-success-text);
}

#profitGaugeCard .profit-gauge-status--alert {
  border-color: var(--gc-color-warning-border);
  background: var(--gc-color-warning-soft);
  color: var(--gc-color-warning-text);
}

#profitGaugeCard .profit-gauge-status--critical {
  border-color: var(--gc-color-danger-border);
  background: var(--gc-color-danger-soft);
  color: var(--gc-color-danger-text);
}

#profitGaugeCard #profitPercentageText {
  text-shadow: -2px -2px 0 var(--gc-color-surface),
    2px -2px 0 var(--gc-color-surface),
    -2px 2px 0 var(--gc-color-surface),
    2px 2px 0 var(--gc-color-surface),
    0 -2px 0 var(--gc-color-surface),
    0 2px 0 var(--gc-color-surface),
    -2px 0 0 var(--gc-color-surface),
    2px 0 0 var(--gc-color-surface);
}

.financial-regimes-strip {
  overflow: hidden;
}

.financial-regimes-strip__list {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  margin: 0;
  overflow-x: auto;
  color: var(--gc-color-text-muted);
  font-size: 12px;
  line-height: 20px;
  scrollbar-width: thin;
}

.financial-regimes-strip__item {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 10px 16px;
  white-space: nowrap;
}

.financial-regimes-strip__item + .financial-regimes-strip__item {
  border-left: 1px solid var(--gc-color-border);
}

.financial-regimes-strip__item dt,
.financial-regimes-strip__item dd {
  margin: 0;
}

.financial-regimes-strip__item dd {
  color: var(--gc-color-text-secondary);
}

.financial-regimes-strip__item--projection dt {
  color: var(--gc-color-text-secondary);
  font-weight: 600;
}

.financial-regimes-strip__projection-values,
.financial-regimes-strip__projection-metric {
  display: inline-flex;
  align-items: baseline;
}

.financial-regimes-strip__projection-values {
  gap: 0;
}

.financial-regimes-strip__projection-metric {
  gap: 6px;
}

.financial-regimes-strip__projection-metric + .financial-regimes-strip__projection-metric {
  position: relative;
  margin-left: 16px;
  padding-left: 17px;
}

.financial-regimes-strip__projection-metric + .financial-regimes-strip__projection-metric::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 1px;
  height: 14px;
  transform: translateY(-50%);
  background: var(--gc-color-border);
  content: "";
}

/* Classe para códigos/referências - fonte monoespaçada SEM negrito */
.code-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace !important;
  font-weight: 400 !important;
  letter-spacing: 0.01em !important;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.numeric-value,
[data-gc-numeric],
input[type="number"],
input[type="date"],
input[type="month"],
input[type="time"],
input[type="datetime-local"] {
  font-variant-numeric: tabular-nums;
}

/* ========================================
   INPUTS E TEXTAREA - PADRÃO OFFICEWORK
   ======================================== */

/* Inputs de texto */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="month"],
input[type="time"],
input[type="datetime-local"] {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-input, 3px);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: #334155;
  background: white;
  transition: all 0.15s;
  outline: none;
  height: 40px;
  box-sizing: border-box;
}

input[type="file"]:not(.hidden) {
  width: 100%;
  min-height: 40px;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-input, 3px);
  background: #fff;
  color: #64748b;
  font: 400 0.875rem/1.25rem Poppins, sans-serif;
}

input[type="file"]:not(.hidden)::file-selector-button {
  min-height: 38px;
  margin-right: 12px;
  padding: 0 12px;
  border: 0;
  border-radius: 3px 0 0 3px;
  background: #0ea5e9;
  color: #fff;
  font: 600 0.875rem/1 Poppins, sans-serif;
  cursor: pointer;
}

input[type="file"]:not(.hidden):hover::file-selector-button {
  background: #0284c7;
}

/* Textarea */
textarea,
textarea.w-full,
label textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-input, 3px);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: #334155;
  background: white;
  transition: all 0.15s;
  outline: none;
  box-sizing: border-box;
  resize: vertical;
  min-height: 80px;
}

/* Hover - inputs e textarea */
input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="number"]:hover,
input[type="tel"]:hover,
input[type="url"]:hover,
input[type="search"]:hover,
textarea:hover {
  border-color: #94a3b8;
}

/* Focus - inputs e textarea */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
textarea:focus {
  border-color: #64748b;
  border-width: 2px;
  outline: none;
  box-shadow: none;
}

/* Focus - botões do calendário (evitar borda cinza) */
.fc .fc-button:focus {
  outline: none !important;
  box-shadow: none !important;
  border-color: inherit !important;
}

/* Placeholder */
input::placeholder,
textarea::placeholder {
  color: #94a3b8;
}

/* ========================================
   SELECT CUSTOMIZADO - PADRÃO OFFICEWORK
   ======================================== */

/* Wrapper do select */
.custom-select-wrapper {
  position: relative;
  width: 100%;
}

/* Select com largura ajustada ao conteúdo */
.custom-select-wrapper.select-auto-width {
  width: fit-content;
  min-width: 200px;
}
.custom-select-wrapper.select-auto-width .custom-select-button {
  width: fit-content;
  gap: 0.5rem;
}
.custom-select-wrapper.select-auto-width .custom-select-button span {
  flex: none;
}

/* Esconder o select nativo */
.custom-select-wrapper select {
  display: none;
}

/* Botão do select customizado (button ou div) */
.custom-select-wrapper .custom-select-button {
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-input, 3px);
  font-size: 0.875rem;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  box-sizing: border-box;
}

.custom-select-wrapper .custom-select-button:hover {
  border-color: #94a3b8;
}

.custom-select-wrapper .custom-select-button span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 0.5rem;
  text-align: left;
}

.custom-select-wrapper .custom-select-button svg {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  color: #94a3b8;
}

/* Dropdown do select */
.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-input, 3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  display: none;
  max-height: 300px;
  overflow-y: auto;
  padding: 0.25rem;
}

.custom-select-wrapper.open .custom-select-dropdown {
  display: block;
}

/* Opções do dropdown */
.custom-select-option {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: #1e293b;
  cursor: pointer;
  border-radius: var(--radius-base, 3px);
  transition: background 0.1s;
}

.custom-select-option:hover {
  background: #0ea5e9;
  color: white;
}

.custom-select-option.selected {
  background: #f0f9ff;
  color: #0284c7;
  font-weight: 500;
}

.custom-select-option.selected:hover {
  background: #0ea5e9;
  color: white;
}

/* Input de busca dentro do dropdown */
.custom-select-search {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-input, 3px);
  margin-bottom: 0.25rem;
  outline: none;
  box-sizing: border-box;
}

.custom-select-search:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.1);
}

.custom-select-search::placeholder {
  color: #94a3b8;
}

/* Container de opções quando tem busca */
.custom-select-options-container {
  max-height: 180px;
  overflow-y: auto;
}

/* Mensagem de nenhum resultado */
.custom-select-no-results {
  padding: 0.75rem;
  text-align: center;
  color: #64748b;
  font-size: 0.875rem;
  font-style: italic;
}

/* ========================================
   STATUS COLORS - CUSTOM SELECT
   ======================================== */

/* Aplicar cor no botão do select baseado no status */
.custom-select-wrapper select.status-pending + .custom-select-button {
  background-color: #fffbeb;
  border-color: #f59e0b;
  color: #92400e;
}

.custom-select-wrapper select.status-partially-paid + .custom-select-button {
  background-color: #f0f9ff;
  border-color: #0284c7;
  color: #0369a1;
}

.custom-select-wrapper select.status-paid + .custom-select-button {
  background-color: #f0fdf4;
  border-color: #22c55e;
  color: #166534;
}

.custom-select-wrapper select.status-overdue + .custom-select-button {
  background-color: #fef2f2;
  border-color: #ef4444;
  color: #991b1b;
}

.custom-select-wrapper select.status-cancelled + .custom-select-button {
  background-color: #fef2f2;
  border-color: #ef4444;
  color: #991b1b;
}

/* Select disabled */
.custom-select-wrapper select:disabled + .custom-select-button {
  pointer-events: none;
  opacity: 0.8;
  background-color: #f1f5f9;
}

.custom-select-wrapper select:disabled + .custom-select-button + .custom-select-dropdown {
  display: none;
}

.custom-select-wrapper select:disabled + .custom-select-button svg {
  display: none;
}

.custom-select-wrapper select:disabled + .custom-select-button {
  padding-right: 0.75rem;
}

/* ========================================
   CUSTOM DATE PICKER STYLES
   ======================================== */
.custom-date-wrapper {
  position: relative;
  width: 100%;
  display: inline-block;
}

/* Esconder input nativo de forma robusta */
.custom-date-wrapper input[type="date"],
.custom-date-wrapper input.custom-date {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 1px !important;
  height: 1px !important;
  border: none !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  z-index: -1000 !important;
  visibility: hidden !important;
}

/* Fallback para webkit */
.custom-date-wrapper input[type="date"]::-webkit-calendar-picker-indicator {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Input de texto para digitação da data */
.custom-date-text-input {
  width: 100%;
  padding: 0.5rem 2.5rem 0.5rem 0.75rem;
  background-color: white;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-input, 3px);
  font-size: 0.875rem;
  color: #334155;
  font-weight: 500;
  height: 40px;
  box-sizing: border-box;
  transition: all 0.15s ease;
}

.custom-date-text-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.custom-date-text-input:hover {
  border-color: #94a3b8;
}

.custom-date-text-input:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Botão do calendário */
.custom-date-calendar-btn {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 2.5rem;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #94a3b8;
  transition: color 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 var(--radius-input, 3px) var(--radius-input, 3px) 0;
}

.custom-date-calendar-btn:hover {
  color: #0ea5e9;
  background: #f1f5f9;
}

.custom-date-calendar-btn .custom-date-icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* Manter estilos antigos para compatibilidade */
.custom-date-button {
  width: 100%;
  padding: 0.5rem 2.5rem 0.5rem 0.75rem;
  background-color: white;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-input, 3px);
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #334155;
  font-weight: 500;
  height: 40px;
  box-sizing: border-box;
}

.custom-date-button.empty {
  color: #64748b;
  font-weight: 400;
  justify-content: flex-start;
  padding: 0.5rem 2.5rem 0.5rem 0.75rem;
}

.custom-date-button.empty .custom-date-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
}

.custom-date-button:hover {
  border-color: #94a3b8;
}

.custom-date-button:focus,
.custom-date-wrapper.open .custom-date-button {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.custom-date-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  pointer-events: none;
  color: #94a3b8;
}

.custom-date-dropdown {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-container, 3px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  padding: 0.75rem;
  min-width: 280px;
}

@media (min-width: 768px) {
  .custom-date-wrapper:nth-child(even) .custom-date-dropdown {
    right: 0;
    left: auto;
  }
}

.custom-date-wrapper.calendar-right .custom-date-dropdown {
  left: auto;
  right: 0;
}

.custom-date-wrapper.open .custom-date-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.custom-date-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.custom-date-header button {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-base, 3px);
  transition: all 0.15s ease;
}

.custom-date-header button:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.custom-date-month-year {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
}

.custom-date-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.125rem;
  margin-bottom: 0.25rem;
}

.custom-date-weekday {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  padding: 0.25rem;
}

.custom-date-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.125rem;
}

.custom-date-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  border-radius: var(--radius-base, 3px);
  cursor: pointer;
  transition: all 0.15s ease;
  color: #1e293b;
  font-weight: 500;
  padding: 0.25rem;
}

.custom-date-day:hover {
  background: #f0f9ff;
  color: #0369a1;
}

.custom-date-day.other-month {
  color: #cbd5e1;
}

.custom-date-day.selected {
  background-color: #0284c7;
  color: white;
  font-weight: 600;
}

.custom-date-day.today {
  border: 1px solid #0ea5e9;
}

.custom-date-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #e2e8f0;
}

.custom-date-actions button {
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-base, 3px);
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
}

.custom-date-clear {
  background: none;
  color: #64748b;
}

.custom-date-clear:hover {
  background: #f1f5f9;
  color: #475569;
}

.custom-date-today {
  background: #0ea5e9;
  color: white;
}

.custom-date-today:hover {
  background: #0284c7;
}

/* ========================================
   STATUS COLOR CLASSES
   ======================================== */
.status-pending {
  background-color: #fffbeb !important;
  border-color: #f59e0b !important;
  color: #92400e !important;
}

.status-partially-paid {
  background-color: #f0f9ff !important;
  border-color: #0284c7 !important;
  color: #0369a1 !important;
}

.status-paid {
  background-color: #f0fdf4 !important;
  border-color: #22c55e !important;
  color: #166534 !important;
}

.status-overdue {
  background-color: #fef2f2 !important;
  border-color: #ef4444 !important;
  color: #991b1b !important;
}

.status-cancelled {
  background-color: #fef2f2 !important;
  border-color: #ef4444 !important;
  color: #991b1b !important;
}

/* Sobrescrever rounded-full do Tailwind - cantos menos arredondados */
.rounded-full {
  border-radius: var(--radius-base, 3px) !important;
}

/* ========================================
   CALENDÁRIO INTEGRADO - ESTILOS MINIMALISTAS
   ======================================== */

/* Container do calendário */
.calendar-container {
  font-family: var(--gc-font-sans, "Poppins"), system-ui, sans-serif !important;
}

/* Sobrescrever estilos padrão do FullCalendar para minimalismo */
.fc {
  font-size: 13px !important;
}

/* Cabeçalho do calendário */
.fc .fc-toolbar {
  margin-bottom: 1.5rem !important;
  gap: 0.75rem !important;
}

.fc .fc-toolbar-title {
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  color: #0f172a !important;
}

/* Botões minimalistas */
.fc .fc-button {
  background: white !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
  border-radius: 3px !important;
  padding: 0.375rem 0.75rem !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.15s !important;
}

.fc .fc-button:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: #1e293b !important;
}

.fc .fc-button:active,
.fc .fc-button-active {
  background: #f0f9ff !important;
  border: 1px solid #0ea5e9 !important;
  color: #0284c7 !important;
}

.fc .fc-button:disabled {
  opacity: 0.4 !important;
  cursor: not-allowed !important;
}

/* Dias da semana */
.fc .fc-col-header-cell {
  padding: 0.75rem 0 !important;
  font-weight: 600 !important;
  font-size: 11px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  color: #64748b !important;
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

/* Células dos dias */
.fc .fc-daygrid-day {
  cursor: pointer !important;
  transition: background 0.15s !important;
}

.fc .fc-daygrid-day:hover {
  background: #f8fafc !important;
}

.fc .fc-daygrid-day-number {
  padding: 0.5rem !important;
  font-weight: 500 !important;
  color: #1e293b !important;
}

/* Dia atual */
.fc .fc-day-today {
  background: #f0f9ff !important;
}

.fc .fc-day-today .fc-daygrid-day-number {
  color: #0369a1 !important;
  font-weight: 600 !important;
}

/* Bordas minimalistas */
.fc .fc-scrollgrid {
  border-color: #e2e8f0 !important;
}

.fc td,
.fc th {
  border-color: #e2e8f0 !important;
}

/* ========================================
   EVENTOS DO CALENDÁRIO - CORES POR TIPO
   ======================================== */

/* Base para todos os eventos */
.fc-event {
  border-top: none !important;
  border-right: none !important;
  border-bottom: none !important;
  border-left-width: 3px !important;
  border-left-style: solid !important;
  border-radius: var(--radius-tag, 3px) !important;
  padding: 2px 6px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.15s !important;
  margin-bottom: 2px !important;
}

.fc-event:hover {
  filter: brightness(0.97) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

/* Orçamentos - Cinza (início da negociação) */
.calendar-event-budget {
  background: #f1f5f9 !important;
  border-left-color: #94a3b8 !important;
  color: #475569 !important;
}

.calendar-event-budget .fc-event-title {
  color: #475569 !important;
}

.calendar-event-budget:hover {
  background: #e2e8f0 !important;
}

/* Faturas - Verde clarinho */
.calendar-event-invoice {
  background: #f0fdf4 !important;
  border-left-color: #86efac !important;
  color: #064e3b !important;
}

.calendar-event-invoice .fc-event-title {
  color: #064e3b !important;
}

.calendar-event-invoice:hover {
  background: #dcfce7 !important;
}

/* Despesas - Vermelho clarinho */
.calendar-event-expense {
  background: #fef2f2 !important;
  border-left-color: #fca5a5 !important;
  color: #7f1d1d !important;
}

.calendar-event-expense .fc-event-title {
  color: #7f1d1d !important;
}

.calendar-event-expense:hover {
  background: #fee2e2 !important;
}

/* Projetos - Roxo clarinho */
.calendar-event-project {
  background: #faf5ff !important;
  border-left-color: #c084fc !important;
  color: #581c87 !important;
}

.calendar-event-project .fc-event-title {
  color: #581c87 !important;
}

.calendar-event-project:hover {
  background: #f3e8ff !important;
}

/* Tarefas - Amarelo */
.calendar-event-task {
  background: #fefce8 !important;
  border-left-color: #facc15 !important;
  color: #713f12 !important;
}

.calendar-event-task .fc-event-title {
  color: #713f12 !important;
}

.calendar-event-task:hover {
  background: #fef9c3 !important;
}

/* Receitas - Azul forte */
.calendar-event-income {
  background: #e0f2fe !important;
  border-left-color: #0ea5e9 !important;
  color: #0369a1 !important;
}

.calendar-event-income .fc-event-title {
  color: #0369a1 !important;
}

.calendar-event-income:hover {
  background: #bae6fd !important;
}

/* Datas Especiais - Usa cores dinâmicas do PHP, mas garante barrinha lateral */
.calendar-event-special {
  border-left-width: 3px !important;
  border-left-style: solid !important;
}

.calendar-event-special .fc-event-title {
  color: #ffffff !important;
}

/* ========================================
   TAGS DE REFERÊNCIA DO CALENDÁRIO (Legenda)
   ======================================== */

/* Base para todas as tags de referência */
.calendar-legend-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px 4px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 500;
  border-left-width: 3px;
  border-left-style: solid;
}

/* Orçamentos - Cinza */
.calendar-legend-budget {
  background: #f1f5f9;
  border-left-color: #94a3b8;
  color: #475569;
}

/* Faturas - Verde */
.calendar-legend-invoice {
  background: #f0fdf4;
  border-left-color: #86efac;
  color: #064e3b;
}

/* Despesas - Vermelho */
.calendar-legend-expense {
  background: #fef2f2;
  border-left-color: #fca5a5;
  color: #7f1d1d;
}

/* Projetos - Roxo */
.calendar-legend-project {
  background: #faf5ff;
  border-left-color: #c084fc;
  color: #581c87;
}

/* Tarefas - Amarelo */
.calendar-legend-task {
  background: #fefce8;
  border-left-color: #facc15;
  color: #713f12;
}

/* Contratos - Bege */
.calendar-legend-contract {
  background: #f4f2e9;
  border-left-color: #d4b896;
  color: #6b5b3d;
}

/* Receitas - Azul */
.calendar-legend-income {
  background: #e0f2fe;
  border-left-color: #0ea5e9;
  color: #0369a1;
}

/* Aniversários - Rosa */
.calendar-legend-birthday {
  background: #ec4899;
  border-left-color: #db2777;
  color: #ffffff;
}

/* Feriados - Azul */
.calendar-legend-holiday {
  background: #0ea5e9;
  border-left-color: #0c4a6e;
  color: #ffffff;
}

/* ========================================
   VISUALIZAÇÃO DE LISTA
   ======================================== */

.fc .fc-list-event:hover td {
  background: #f8fafc !important;
}

/* Botão "+mais" do calendário - Destaque visual */
.fc .fc-daygrid-more-link {
  background: #111827 !important;
  color: #ffffff !important;
  padding: 2px 6px !important;
  border-radius: 3px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  display: inline-block !important;
  margin-top: 2px !important;
}

.fc .fc-daygrid-more-link:hover {
  background: #374151 !important;
  color: #ffffff !important;
}

/* ========================================
   FOOTER CUSTOMIZADO
   ======================================== */

/* Apenas o footer da página, não outros elementos */
body > footer,
footer.bg-sky-900 {
  background-color: #0c4a6e !important;
}

/* Todos os textos do footer da página brancos */
body > footer,
body > footer div,
body > footer span,
body > footer a {
  color: #ffffff !important;
}

/* Hover dos links - cinza claro */
body > footer a:hover {
  color: #d1d5db !important;
}

/* ========================================
   CHECKBOX CUSTOMIZADO - MINIMALISTA
   ======================================== */

/* Esconder checkbox nativo */
.custom-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

/* Container do checkbox */
.custom-checkbox {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
  position: relative;
  min-height: 20px;
  padding-top: 1px;
}

/* Box do checkbox */
.custom-checkbox .checkbox-box {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-base, 3px);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  flex-shrink: 0;
  box-sizing: border-box;
  position: relative;
  margin-top: 1px;
}

/* Hover */
.custom-checkbox:hover .checkbox-box {
  border-color: #cbd5e1;
}

/* Checked - apenas borda azul clara */
.custom-checkbox input[type="checkbox"]:checked ~ .checkbox-box {
  background: #f0f9ff;
  border-color: #7dd3fc;
}

/* Check icon - minimalista */
.custom-checkbox .checkbox-box::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 8px;
  border: solid #0284c7;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  top: 3px;
  left: 6px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease;
}

.custom-checkbox input[type="checkbox"]:checked ~ .checkbox-box::after {
  opacity: 1;
  visibility: visible;
}

/* Label text - minimalista */
.custom-checkbox .checkbox-label {
  font-size: 0.875rem;
  font-weight: 400;
  color: #64748b;
  transition: color 0.15s ease;
  line-height: 1.25rem;
  padding-top: 0px;
}

.custom-checkbox input[type="checkbox"]:checked ~ .checkbox-label {
  color: #475569;
}

/* Focus - discreto */
.custom-checkbox input[type="checkbox"]:focus-visible ~ .checkbox-box {
  outline: 2px solid #cbd5e1;
  outline-offset: 2px;
}

/* ========================================
   TOGGLE SWITCH - CHAVINHA ON/OFF
   ======================================== */

/* Trilha do toggle */
.toggle-switch {
  width: 40px;
  height: 24px;
  background: #cbd5e1;
  border-radius: 9999px !important;
  position: relative;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

/* Bolinha do toggle */
.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 9999px !important;
  transition: transform 0.2s ease;
}

/* Estado ativo */
.peer:checked ~ .toggle-switch {
  background: #0284c7;
}

.peer:checked ~ .toggle-switch::after {
  transform: translateX(16px);
  border-color: white;
}

/* Focus */
.peer:focus ~ .toggle-switch {
  outline: none;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

.gc-toggle-target {
  min-height: 44px;
}

/* ========================================
   CUSTOM RADIO BUTTONS - MINIMALISTA
   ======================================== */

/* Esconder radio nativo */
.custom-radio input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

/* Container do radio */
.custom-radio {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
  position: relative;
  min-height: 20px;
  padding-top: 1px;
}

/* Circle do radio */
.custom-radio .radio-circle {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  border: 1.5px solid #e2e8f0;
  border-radius: 50%;
  background: white;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
  position: relative;
  margin-top: 1px;
}

input[type="checkbox"]:not(.sr-only),
input[type="radio"]:not(.sr-only) {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
}

/* Hover */
.custom-radio:hover .radio-circle {
  border-color: #cbd5e1;
}

/* Checked - borda azul clara */
.custom-radio input[type="radio"]:checked ~ .radio-circle {
  background: #f0f9ff;
  border-color: #7dd3fc;
}

/* Inner dot - minimalista */
.custom-radio .radio-circle::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0ea5e9;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease;
}

.custom-radio input[type="radio"]:checked ~ .radio-circle::after {
  opacity: 1;
  visibility: visible;
}

/* Label text - minimalista */
.custom-radio .radio-label {
  font-size: 0.875rem;
  font-weight: 400;
  color: #64748b;
  transition: color 0.15s ease;
  line-height: 1.25rem;
  padding-top: 0px;
}

.custom-radio input[type="radio"]:checked ~ .radio-label {
  color: #475569;
}

/* Focus - discreto */
.custom-radio input[type="radio"]:focus-visible ~ .radio-circle {
  outline: 2px solid #cbd5e1;
  outline-offset: 2px;
}

/* ========================================
   BOTÕES DO CALENDÁRIO - ESPAÇAMENTO
   ======================================== */

/* Espaçamento entre botões de visualização (Mês, Semana, Lista) */
.fc .fc-button-group {
  gap: 6px !important;
}

.fc .fc-button-group .fc-button {
  margin: 0 !important;
}

/* Espaçamento entre grupos de botões (prev/next, today, views) */
.fc .fc-toolbar-chunk {
  display: flex !important;
  gap: 8px !important;
}

/* Borda inferior do calendário - fina */
.fc .fc-daygrid-body,
.fc .fc-scrollgrid,
.fc table {
  border-bottom: 0.5px solid #e2e8f0 !important;
}

.fc .fc-view-harness {
  border-bottom: 0.5px solid #e2e8f0 !important;
}

.fc .fc-list-day-cushion {
  background: #f8fafc !important;
  font-weight: 600 !important;
  color: #1e293b !important;
}

.fc .fc-list-event-title {
  font-weight: 500 !important;
}

/* Badge de tipo na visualização de lista */
.event-type-badge {
  display: inline-block;
  padding: 2px 8px;
  margin-right: 8px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-base, 3px);
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

/* ========================================
   TOOLTIPS E BADGES DOS EVENTOS
   ======================================== */

/* Tooltip flutuante */
.calendar-tooltip {
  position: absolute;
  z-index: 10000 !important;
  background: #1e293b !important;
  color: white !important;
  padding: 0.75rem 1rem !important;
  border-radius: var(--radius-tooltip, 3px) !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3) !important;
  pointer-events: none !important;
  max-width: 280px !important;
}

.calendar-tooltip strong {
  display: block !important;
  margin-bottom: 0.5rem !important;
  font-size: 13px !important;
  color: #f1f5f9 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  padding-bottom: 0.5rem !important;
}

/* Badge de valor no evento */
.event-amount-badge {
  display: inline-block !important;
  margin-left: 6px !important;
  padding: 1px 6px !important;
  background: rgba(0, 0, 0, 0.1) !important;
  border-radius: var(--radius-tag, 3px) !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  opacity: 0.8 !important;
}

/* ========================================
   INPUT TIME CUSTOMIZADO - ESTILO SELECT
   ======================================== */

/* Time Picker Wrapper - igual ao Select */
.custom-time-wrapper {
  position: relative;
  width: 100%;
}

/* Esconder o input nativo */
.custom-time-wrapper input[type="time"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Botão do time picker customizado - igual ao select */
.custom-time-button {
  width: 100%;
  padding: 0.5rem 2.5rem 0.5rem 0.75rem;
  background-color: white;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-container, 3px);
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.custom-time-button:hover {
  border-color: #cbd5e1;
}

.custom-time-button:focus,
.custom-time-wrapper.open .custom-time-button {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Ícone de relógio */
.custom-time-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem;
  height: 1.25rem;
  pointer-events: none;
  color: #64748b;
}

/* Dropdown do time picker - igual ao select */
.custom-time-dropdown {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-container, 3px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  padding: 0.75rem;
}

.custom-time-wrapper.open .custom-time-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Grid de horas e minutos */
.custom-time-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.custom-time-column {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.custom-time-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
  text-align: center;
}

.custom-time-scroll {
  max-height: 12rem;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-input, 3px);
  background: #f8fafc;
}

/* Opções de hora/minuto - igual ao select */
.custom-time-option {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: #1f2937;
  transition: all 0.15s ease;
  text-align: center;
  font-weight: 500;
}

.custom-time-option:hover {
  background-color: #f0f9ff;
  color: #0369a1;
}

.custom-time-option.selected {
  background-color: #0284c7;
  color: white;
  font-weight: 600;
}

.custom-time-option.selected:hover {
  background-color: #0369a1;
}

/* Scrollbar customizada - igual ao select */
.custom-time-scroll::-webkit-scrollbar {
  width: 6px;
}

.custom-time-scroll::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: var(--radius-input, 3px);
}

.custom-time-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: var(--radius-input, 3px);
}

.custom-time-scroll::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Scrollbar customizada - abas de campos dinâmicos */
.dynopt-tabs-scroll::-webkit-scrollbar {
  height: 4px;
}

.dynopt-tabs-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.dynopt-tabs-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.dynopt-tabs-scroll::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ========================================
   INPUT DATE CUSTOMIZADO - MINIMALISTA
   ======================================== */

/* Base: Remover aparência nativa e adicionar ícone de calendário */
input.custom-date,
input[type="date"].custom-date {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 18px 18px !important;
  padding-right: 40px !important;
  font-weight: 500 !important;
  color: #1e293b !important;
}

/* Placeholder quando vazio */
input.custom-date:invalid,
input[type="date"].custom-date:invalid {
  color: #94a3b8 !important;
}

/* Hover */
input.custom-date:hover,
input[type="date"].custom-date:hover {
  border-color: #cbd5e1 !important;
}

/* Focus */
input.custom-date:focus,
input[type="date"].custom-date:focus {
  outline: none !important;
  border-color: #0ea5e9 !important;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1) !important;
}

/* Esconder COMPLETAMENTE o indicador de calendário nativo do Chrome/Safari */
input.custom-date::-webkit-calendar-picker-indicator,
input[type="date"].custom-date::-webkit-calendar-picker-indicator {
  background: transparent !important;
  opacity: 0 !important;
  position: absolute !important;
  width: 100% !important;
  height: 100% !important;
  top: 0 !important;
  left: 0 !important;
  cursor: pointer !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Firefox - esconder botão clear */
input.custom-date::-webkit-clear-button,
input[type="date"].custom-date::-webkit-clear-button {
  display: none !important;
}

/* Chrome - esconder botão inner spin */
input.custom-date::-webkit-inner-spin-button,
input[type="date"].custom-date::-webkit-inner-spin-button {
  display: none !important;
}

/* ========================================
   INPUT MONTH CUSTOMIZADO
   ======================================== */

/* Base: Garantir que não fique com aparência de disabled */
input.custom-month,
input[type="month"].custom-month {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-color: #ffffff !important;
  cursor: pointer !important;
}

/* Placeholder quando vazio */
input.custom-month:invalid,
input[type="month"].custom-month:invalid {
  color: #94a3b8 !important;
}

/* Hover */
input.custom-month:hover,
input[type="month"].custom-month:hover {
  border-color: #cbd5e1 !important;
}

/* Focus */
input.custom-month:focus,
input[type="month"].custom-month:focus {
  outline: none !important;
  border-color: #0ea5e9 !important;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1) !important;
}

/* Esconder indicador nativo mas manter clicável */
input.custom-month::-webkit-calendar-picker-indicator,
input[type="month"].custom-month::-webkit-calendar-picker-indicator {
  background: transparent !important;
  opacity: 0 !important;
  position: absolute !important;
  width: 100% !important;
  height: 100% !important;
  top: 0 !important;
  left: 0 !important;
  cursor: pointer !important;
}

/* Wrapper do month picker customizado */
.custom-month-wrapper {
  position: relative !important;
}

.custom-month-wrapper input[readonly] {
  background-color: #ffffff !important;
  cursor: pointer !important;
  color: #1e293b !important;
}

.custom-month-wrapper input[readonly]:hover {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
}

/* ========================================
   TOAST NOTIFICATIONS (MODAIS)
   ======================================== */

/* Container de toasts (canto superior direito) */
#toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

/* Toast individual */
.toast {
  min-width: 320px;
  max-width: 500px;
  background: white;
  border-radius: var(--radius-container, 3px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  pointer-events: auto;
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 4px solid;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.hide {
  transform: translateX(120%);
  opacity: 0;
}

/* Ícone do toast */
.toast-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* Conteúdo do toast */
.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
  line-height: 1.25;
}

.toast-message {
  font-size: 0.875rem;
  margin: 0;
  line-height: 1.4;
  word-wrap: break-word;
}

/* Botão fechar */
.toast-close {
  width: 1.5rem;
  height: 1.5rem;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-base, 3px);
  transition: background-color 0.15s;
  flex-shrink: 0;
}

.toast-close:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.toast-close svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Tipos de toast - SUCCESS */
.toast.success {
  border-left-color: #10b981;
}

.toast.success .toast-icon {
  background-color: #d1fae5;
  color: #065f46;
}

.toast.success .toast-title {
  color: #065f46;
}

.toast.success .toast-message {
  color: #047857;
}

/* Tipos de toast - ERROR */
.toast.error {
  border-left-color: #ef4444;
}

.toast.error .toast-icon {
  background-color: #fee2e2;
  color: #991b1b;
}

.toast.error .toast-title {
  color: #991b1b;
}

.toast.error .toast-message {
  color: #dc2626;
}

/* Tipos de toast - WARNING */
.toast.warning {
  border-left-color: #f59e0b;
}

.toast.warning .toast-icon {
  background-color: #fef3c7;
  color: #92400e;
}

.toast.warning .toast-title {
  color: #92400e;
}

.toast.warning .toast-message {
  color: #d97706;
}

/* Tipos de toast - INFO */
.toast.info {
  border-left-color: #3b82f6;
}

.toast.info .toast-icon {
  background-color: #dbeafe;
  color: #1e40af;
}

.toast.info .toast-title {
  color: #1e40af;
}

.toast.info .toast-message {
  color: #2563eb;
}

/* Barra de progresso */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background-color: currentColor;
  opacity: 0.3;
  border-radius: 0 0 0 0.75rem;
  transition: width linear;
}

/* Responsivo */
@media (max-width: 640px) {
  #toast-container {
    top: 1rem;
    right: 1rem;
    left: 1rem;
  }

  .toast {
    min-width: auto;
    max-width: none;
  }
}

/* ========================================
   MODAL DE CONFIRMAÇÃO CUSTOMIZADO
   ======================================== */

/* Overlay do modal */
.confirm-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.2s ease;
  padding: 1rem;
}

.confirm-modal-overlay.show {
  opacity: 1;
}

/* Modal */
.confirm-modal {
  background: white;
  border-radius: var(--radius-modal, 3px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  max-width: 480px;
  width: 100%;
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.confirm-modal-overlay.show .confirm-modal {
  transform: scale(1);
}

/* Header do modal */
.confirm-modal-header {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.confirm-modal-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e293b;
}

.confirm-modal-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.confirm-modal-icon.warning {
  background-color: #f1f5f9;
  color: #475569;
}

.confirm-modal-icon.danger {
  background-color: #f1f5f9;
  color: #475569;
}

.confirm-modal-icon.info {
  background-color: #f1f5f9;
  color: #475569;
}

.confirm-modal-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* Body do modal */
.confirm-modal-body {
  padding: 1.5rem;
}

.confirm-modal-message {
  color: #475569;
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0;
}

/* Footer do modal */
.confirm-modal-footer {
  padding: 1rem 1.5rem 1.5rem;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.confirm-modal-button {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-container, 3px);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 100px;
}

.confirm-modal-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.confirm-modal-button-cancel {
  background: white;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

.confirm-modal-button-cancel:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.confirm-modal-button-confirm {
  background-color: #0284c7;
  color: white;
  box-shadow: 0 2px 4px rgba(14, 165, 233, 0.2);
}

.confirm-modal-button-confirm:hover {
  background-color: #0369a1;
  box-shadow: 0 4px 6px rgba(14, 165, 233, 0.3);
}

.confirm-modal-button-confirm.danger {
  background-color: #ef4444;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.confirm-modal-button-confirm.danger:hover {
  background-color: #dc2626;
  box-shadow: 0 4px 6px rgba(239, 68, 68, 0.3);
}

/* ========================================
   RESPONSIVIDADE
   ======================================== */

@media (max-width: 768px) {
  .fc .fc-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .fc .fc-toolbar-chunk {
    margin: 0.25rem 0 !important;
  }

  .fc .fc-button {
    font-size: 11px !important;
    padding: 0.375rem 0.625rem !important;
  }

  .fc-event {
    font-size: 11px !important;
  }

  .calendar-tooltip {
    max-width: 220px !important;
    font-size: 11px !important;
  }

  .event-amount-badge {
    display: none !important; /* Ocultar badge em telas pequenas */
  }
}

/* ========================================
   BARRA DE PROGRESSO DINÂMICA
   ======================================== */

.progress-bar-dynamic {
  transition: background-color 0.3s ease;
  height: 100%;
  border-radius: inherit;
}

/* ========================================
   SELECT NATIVO - ESTILO PADRÃO
   ======================================== */

select {
  width: 100%;
  height: 40px;
  padding: 0.5rem 2.5rem 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-family: var(--gc-font-sans, "Poppins"), system-ui, sans-serif;
  color: #1e293b;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-input, 3px);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

select:hover {
  border-color: #94a3b8;
}

select:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* ========================================
   CAMPOS BLOQUEADOS (DISABLED/READONLY)
   ======================================== */

input:disabled,
input[readonly],
select:disabled,
textarea:disabled,
textarea[readonly] {
  background-color: #f1f5f9 !important;
  cursor: not-allowed !important;
  color: #64748b !important;
}

/* Custom select disabled */
.custom-select:disabled {
  background-color: #f1f5f9 !important;
  cursor: not-allowed !important;
  opacity: 1 !important;
}

/* ========================================
   EDITOR DE TEMPLATE DE CONTRATO
   contract-template-editor.php
   ======================================== */

/* Container Principal */
.template-editor-container {
    display: flex;
    gap: 1rem;
    height: calc(100vh - 200px);
    min-height: 400px;
}

/* Sidebar Esquerda: Campos + Variáveis */
.template-sidebar-left {
    width: 350px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow: hidden;
}

.template-sidebar-section {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
}

.template-sidebar-right .template-sidebar-section {
    overflow: visible;
}

.template-sidebar-section.variables-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.sidebar-section-header {
    padding: 0.5rem 0.75rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.sidebar-section-content {
    padding: 0.75rem;
}

.variables-section .sidebar-section-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: visible;
    padding: 0;
}

.variables-section {
    overflow: visible;
}

.variable-group {
    overflow: visible;
}

/* Sidebar Direita: Referência Markdown */
.template-sidebar-right {
    width: 180px;
    flex-shrink: 0;
    overflow-y: auto;
    position: relative;
    z-index: 20;
    height: 100%;
}

.template-sidebar-right .template-sidebar-section {
    height: auto;
    max-height: none;
}

.template-sidebar-right .sidebar-section-content {
    padding-bottom: 0.75rem;
    max-height: none;
}

.markdown-reference {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.7rem;
}

.markdown-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.5rem;
    background: #f1f5f9;
    border-radius: 3px;
}

.markdown-item code {
    font-family: 'Fira Code', 'Consolas', monospace;
    color: #0369a1;
    font-size: 0.65rem;
}

.markdown-item span {
    color: #64748b;
    font-size: 0.65rem;
}

/* Campos de Formulário na Sidebar */
.sidebar-form-fields {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem;
}

.sidebar-form-field label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-bottom: 0.25rem;
}

.sidebar-form-field input,
.sidebar-form-field select {
    width: 100%;
    padding: 0.5rem 0.625rem;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    font-size: 0.8rem;
}

.sidebar-form-field .field-active-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-form-field .field-active-row input[type="checkbox"] {
    flex-shrink: 0;
}

.sidebar-form-field .field-active-row label {
    text-transform: none;
    font-size: 0.8rem;
    color: #334155;
    margin-bottom: 0;
    cursor: pointer;
    white-space: nowrap;
}

/* Tabs de Informação (Categoria/Nome) */
.info-tabs {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
}

.info-tab {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
    background: #f8fafc;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.info-tab:hover {
    color: #334155;
    background: #f1f5f9;
}

.info-tab.active {
    color: #0ea5e9;
    background: white;
    border-bottom-color: #0ea5e9;
}

.info-panel {
    display: none;
    padding: 0.75rem;
}

.info-panel.active {
    display: block;
}

/* Tabs de Variáveis */
.variable-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.375rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.variable-tab {
    padding: 0.25rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 500;
    color: #64748b;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.variable-tab:hover {
    background: #f1f5f9;
    color: #334155;
}

.variable-tab.active {
    background: #0ea5e9;
    border-color: #0ea5e9;
    color: white;
}

.variable-tab svg {
    width: 12px;
    height: 12px;
}

/* Grupos de Variáveis */
.variable-group {
    display: none;
    padding: 0.75rem;
}

.variable-group.active {
    display: block;
}

.variable-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    margin: 0.125rem;
    font-size: 0.65rem;
    font-family: 'Fira Code', 'Consolas', monospace;
    background: linear-gradient(to bottom, #f0f9ff, #e0f2fe);
    border: 1px solid #7dd3fc;
    border-radius: 3px;
    color: #0369a1;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.variable-tag:hover {
    background: linear-gradient(to bottom, #e0f2fe, #bae6fd);
    border-color: #38bdf8;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(14, 165, 233, 0.2);
}

.variable-tag:active {
    transform: translateY(0);
}

/* Editor Principal */
.template-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.template-content-wrapper {
    flex: 1;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.template-content-header {
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    font-size: 0.875rem;
    color: #334155;
}

/* Editor ContentEditable */
.template-content-editor {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.7;
    color: #334155;
    white-space: pre-wrap;
    word-wrap: break-word;
    outline: none;
}

.template-content-editor:focus {
    background: #fafbfc;
}

/* Botões de Markdown */
.markdown-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.175rem 0.375rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s;
    width: 100%;
    text-align: left;
    position: relative;
    z-index: 21;
}

.markdown-btn code {
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.625rem;
    padding: 0.1rem 0.2rem;
    border-radius: 2px;
}

.markdown-btn span {
    font-size: 0.7rem;
}

/* Botões Markdown - Linha inteira (Azul) */
.markdown-btn.md-line {
    background: #f0f9ff;
    border-color: #7dd3fc;
}

.markdown-btn.md-line:hover {
    background: #e0f2fe;
    border-color: #0ea5e9;
}

.markdown-btn.md-line code {
    color: #0369a1;
    background: #e0f2fe;
}

.markdown-btn.md-line span {
    color: #0369a1;
}

/* Botões Markdown - Palavra/trecho (Roxo) */
.markdown-btn.md-inline {
    background: #faf5ff;
    border-color: #d8b4fe;
}

.markdown-btn.md-inline:hover {
    background: #f3e8ff;
    border-color: #a855f7;
}

.markdown-btn.md-inline code {
    color: #7c3aed;
    background: #f3e8ff;
}

.markdown-btn.md-inline span {
    color: #7c3aed;
}

/* Botões Markdown - Bloco especial (Verde) */
.markdown-btn.md-block {
    background: #f0fdf4;
    border-color: #86efac;
}

.markdown-btn.md-block:hover {
    background: #dcfce7;
    border-color: #22c55e;
}

.markdown-btn.md-block code {
    color: #166534;
    background: #dcfce7;
}

.markdown-btn.md-block span {
    color: #166534;
}

/* Tags de Variáveis dentro do Editor */
.template-content-editor .var-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 1px 0.375rem;
    margin: 2px 6px;
    font-size: 0.8rem;
    background: linear-gradient(to bottom, #fef3c7, #fde68a);
    border: 1px solid #f59e0b;
    border-radius: 3px;
    color: #92400e;
    font-family: 'Fira Code', 'Consolas', monospace;
    cursor: default;
    user-select: none;
    position: relative;
}

/* Área clicável invisível antes da variável para posicionar cursor */
.template-content-editor .var-tag::before {
    content: '';
    position: absolute;
    left: -8px;
    top: -2px;
    bottom: -2px;
    width: 8px;
    cursor: text;
}

/* Área clicável invisível depois da variável para posicionar cursor */
.template-content-editor .var-tag::after {
    content: '';
    position: absolute;
    right: -8px;
    top: -2px;
    bottom: -2px;
    width: 8px;
    cursor: text;
}

.template-content-editor .var-tag .var-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    margin-left: 0.25rem;
    font-size: 0.7rem;
    font-weight: bold;
    color: #b45309;
    background: rgba(180, 83, 9, 0.1);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.15s;
}

.template-content-editor .var-tag .var-remove:hover {
    background: #dc2626;
    color: white;
}

.template-content-editor .var-tag .var-select {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    font-size: 0.6rem;
    font-weight: bold;
    color: #0369a1;
    background: rgba(14, 165, 233, 0.15);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.15s;
}

.template-content-editor .var-tag .var-select:hover {
    background: #0ea5e9;
    color: white;
}

/* Marca-texto para Tags HTML (Verde) */
.template-content-editor .html-tag {
    background: #dcfce7;
    padding: 1px 2px;
    border-radius: 2px;
}

/* Marca-texto para Markdown Inline (Roxo) */
.template-content-editor .md-inline-tag {
    background: #f3e8ff;
    padding: 1px 2px;
    border-radius: 2px;
}

/* Marca-texto para Markdown Line (Azul) */
.template-content-editor .md-line-tag {
    background: #e0f2fe;
    padding: 1px 2px;
    border-radius: 2px;
}

/* Tooltip flutuante para botões das tags de variável */
.var-tooltip-floating {
    position: fixed;
    z-index: 99999;
    pointer-events: none;
    transform: translate(-50%, -100%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s, visibility 0.15s;
}

.var-tooltip-floating.visible {
    opacity: 1;
    visibility: visible;
}

.var-tooltip-inner {
    padding: 0.375rem 0.625rem;
    background: #1e293b;
    color: white;
    font-size: 0.7rem;
    font-weight: 500;
    border-radius: 4px;
    white-space: nowrap;
}

.var-tooltip-inner::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1e293b;
}

/* Textarea oculto para submissão do formulário */
#templateContent {
    display: none;
}

/* Campos de formulário ocultos */
.template-form-fields-hidden {
    display: none;
}

/* Toast de notificação */
.toast-inserted {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(1rem);
    pointer-events: none;
    padding: 0.75rem 1.25rem;
    background: #065f46;
    color: white;
    border-radius: 3px;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s;
}

.toast-inserted.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ========================================
   GRID DE 24 COLUNAS CUSTOMIZADO
   ======================================== */

/* Container grid com 24 colunas */
:where(.grid-cols-24) {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
}

/*
 * Fallbacks de baixa especificidade. O Tailwind continua responsável pelos
 * modificadores responsivos (por exemplo, md:col-span-3). Sem :where(), esta
 * folha é carregada depois do Tailwind e a classe base vence o breakpoint.
 */
:where(.col-span-1) { grid-column: span 1 / span 1; }
:where(.col-span-2) { grid-column: span 2 / span 2; }
:where(.col-span-3) { grid-column: span 3 / span 3; }
:where(.col-span-4) { grid-column: span 4 / span 4; }
:where(.col-span-5) { grid-column: span 5 / span 5; }
:where(.col-span-6) { grid-column: span 6 / span 6; }
:where(.col-span-7) { grid-column: span 7 / span 7; }
:where(.col-span-8) { grid-column: span 8 / span 8; }
:where(.col-span-9) { grid-column: span 9 / span 9; }
:where(.col-span-10) { grid-column: span 10 / span 10; }
:where(.col-span-11) { grid-column: span 11 / span 11; }
:where(.col-span-12) { grid-column: span 12 / span 12; }
:where(.col-span-13) { grid-column: span 13 / span 13; }
:where(.col-span-14) { grid-column: span 14 / span 14; }
:where(.col-span-15) { grid-column: span 15 / span 15; }
:where(.col-span-16) { grid-column: span 16 / span 16; }
:where(.col-span-17) { grid-column: span 17 / span 17; }
:where(.col-span-18) { grid-column: span 18 / span 18; }
:where(.col-span-19) { grid-column: span 19 / span 19; }
:where(.col-span-20) { grid-column: span 20 / span 20; }
:where(.col-span-21) { grid-column: span 21 / span 21; }
:where(.col-span-22) { grid-column: span 22 / span 22; }
:where(.col-span-23) { grid-column: span 23 / span 23; }
:where(.col-span-24) { grid-column: span 24 / span 24; }

/* Responsivo: em mobile, todos ocupam a linha inteira */
@media (max-width: 767px) {
  .grid-cols-24 > [class*="col-span-"] {
    grid-column: span 24 / span 24;
  }
}

/* ========================================
   MOBILE OPTIMIZATION — OfficeWork CRM
   Breakpoint: 767px (md do Tailwind)
   ======================================== */

/* --- Hamburger Button --- */
.mobile-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  transition: background 0.15s;
}
.mobile-hamburger:hover {
  background: #f1f5f9;
}
.mobile-hamburger svg {
  width: 22px;
  height: 22px;
  color: #334155;
}

/* --- Mobile Menu Overlay --- */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.mobile-menu-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* --- Mobile Menu Panel --- */
.mobile-menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  max-width: 85vw;
  z-index: 9999;
  background: var(--gc-color-surface);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
  display: none;
  pointer-events: none;
}
.mobile-menu-panel.open {
  transform: translateX(0);
  pointer-events: auto;
}
.mobile-menu-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gc-color-border);
}
.mobile-menu-panel-header span {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gc-color-surface-inverse);
}
.mobile-menu-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  color: var(--gc-color-text-muted);
  transition: background 0.15s;
}
.mobile-menu-close:hover {
  background: var(--gc-color-surface-muted);
  color: var(--gc-color-surface-inverse);
}
.mobile-menu-close svg {
  width: 20px;
  height: 20px;
}

/* --- Mobile Menu Nav Links --- */
.mobile-menu-nav {
  padding: 12px 0;
}
.mobile-menu-nav a,
.mobile-menu-nav .mobile-menu-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
  text-decoration: none;
  transition: background 0.1s, color 0.1s;
}
.mobile-menu-nav a svg {
  flex-shrink: 0;
  color: #94a3b8;
}
.mobile-menu-nav a.active svg {
  color: #0369a1;
}
.mobile-menu-nav a:hover {
  background: #f0f9ff;
  color: #0369a1;
}
.mobile-menu-nav a.active {
  background: #f0f9ff;
  color: #0369a1;
  font-weight: 600;
  border-left: 3px solid #0ea5e9;
}
.mobile-menu-section-title {
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  color: #94a3b8 !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-top: 16px !important;
  pointer-events: none;
}
.mobile-menu-nav .mobile-menu-sub a {
  padding-left: 36px;
  font-size: 0.8125rem;
}
.mobile-menu-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 8px 20px;
}

/* --- Mobile Table (card-layout) --- */
.mobile-table {
  width: 100%;
}

/* --- Footer mobile toggle --- */
.footer-mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px 0;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s;
}
.footer-mobile-toggle:hover {
  color: #e2e8f0;
}
.footer-mobile-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}
.footer-mobile-toggle.open svg {
  transform: rotate(180deg);
}
.footer-links-mobile {
  display: none;
}

/* Mobile styles moved to mobile.css */


/* Keyboard focus in enhanced selects remains visible when the popup is portalled. */
.custom-select-option:focus-visible { outline: 2px solid #0284c7; outline-offset: -2px; background: #f0f9ff; }
