/**
 * Conta La BMS - Folha de estilos
 * Paleta: #3a3a3a (escuro) / #474747 (medio) / #707070 (claro) + verde #16a34a
 */

:root {
  --cinza-escuro: #3a3a3a;
  --cinza-medio: #474747;
  --cinza-claro: #707070;
  --cinza-bg: #e8e8e8;
  --cinza-card: #f4f4f4;

  --cor-bg: var(--cinza-bg);
  --cor-card: #ffffff;
  --cor-borda: #d1d5db;
  --cor-borda-forte: #b3b3b3;

  --cor-texto: #1f1f1f;
  --cor-texto-secundario: var(--cinza-claro);
  --cor-texto-suave: #9b9b9b;

  --cor-sidebar: var(--cinza-escuro);
  --cor-sidebar-hover: var(--cinza-medio);
  --cor-sidebar-texto: #d1d5db;
  --cor-sidebar-titulo: #ffffff;
  --cor-sidebar-seccao: #9b9b9b;

  --cor-accent: #16a34a;
  --cor-accent-claro: #22c55e;
  --cor-accent-escuro: #15803d;
  --cor-accent-bg: #ecfdf3;
  --cor-accent-bg-medio: #d1fadf;

  --cor-sucesso: #16a34a;
  --cor-aviso: #d97706;
  --cor-erro: #dc2626;
  --cor-info: #2563eb;

  --sombra-sm: 0 1px 2px rgba(0,0,0,0.06);
  --sombra-md: 0 2px 6px rgba(0,0,0,0.08);
  --sombra-lg: 0 4px 12px rgba(0,0,0,0.10);

  --raio: 6px;
  --raio-sm: 4px;
}

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

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--cor-texto);
  background: var(--cor-bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 12px 0;
  font-weight: 600;
  color: var(--cor-texto);
  line-height: 1.3;
}
h1 { font-size: 1.75rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }

a { color: var(--cor-accent); text-decoration: none; }
a:hover { color: var(--cor-accent-escuro); text-decoration: underline; }

code {
  font-family: 'SF Mono', Monaco, Menlo, Consolas, 'Courier New', monospace;
  font-size: 0.88em;
  background: #ebebeb;
  padding: 2px 6px;
  border-radius: 3px;
  color: #2f2f2f;
}

/* ===== LAYOUT ===== */
.app-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "sidebar topbar"
    "sidebar main";
  min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.app-sidebar {
  grid-area: sidebar;
  background: var(--cor-sidebar);
  color: var(--cor-sidebar-texto);
  padding: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.app-sidebar .logo-area {
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--cinza-medio);
  display: flex;
  align-items: center;
  gap: 10px;
}
.app-sidebar .logo-area img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}
.app-sidebar .logo-area .logo-texto {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--cor-sidebar-titulo);
  letter-spacing: 1px;
  line-height: 1;
}
.app-sidebar .logo-area .logo-texto .sub {
  display: block;
  font-size: 0.7rem;
  color: var(--cor-sidebar-seccao);
  letter-spacing: 2px;
  font-weight: 400;
  margin-top: 4px;
  text-transform: uppercase;
}

.app-sidebar nav { padding: 8px 0; flex: 1; }
.app-sidebar nav .seccao-label {
  padding: 14px 20px 6px;
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cor-sidebar-seccao);
  font-weight: 600;
}
.app-sidebar nav a {
  display: block;
  padding: 10px 20px;
  color: var(--cor-sidebar-texto);
  text-decoration: none;
  font-size: 0.95rem;
  border-left: 3px solid transparent;
  transition: all 120ms;
}
.app-sidebar nav a:hover {
  background: var(--cor-sidebar-hover);
  color: white;
  text-decoration: none;
}
.app-sidebar nav a.ativo {
  background: var(--cor-sidebar-hover);
  color: white;
  border-left-color: var(--cor-accent);
  font-weight: 500;
}

.app-sidebar .assinatura {
  padding: 14px 20px;
  border-top: 1px solid var(--cinza-medio);
  font-size: 0.75rem;
  color: var(--cor-sidebar-seccao);
}
.app-sidebar .assinatura a {
  color: var(--cor-accent-claro);
  font-weight: 500;
}
.app-sidebar .assinatura a:hover { color: #4ade80; text-decoration: none; }

/* ===== TOPBAR ===== */
.app-topbar {
  grid-area: topbar;
  background: var(--cor-card);
  border-bottom: 1px solid var(--cor-borda);
  padding: 14px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.app-topbar strong { color: var(--cor-texto); font-size: 1rem; font-weight: 600; }

.user-info {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.92rem;
}
.user-info a { color: var(--cor-texto); font-weight: 500; }
.user-info a:hover { color: var(--cor-accent); text-decoration: none; }
.user-info .perfil-badge {
  background: var(--cor-accent-bg);
  color: var(--cor-accent-escuro);
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}
.user-info .logout { color: var(--cor-texto-secundario); font-size: 0.88rem; }
.user-info .logout:hover { color: var(--cor-erro); text-decoration: none; }

/* ===== MAIN ===== */
.app-main {
  grid-area: main;
  padding: 22px 26px;
  overflow-x: auto;
}

/* ===== CARDS ===== */
.card {
  background: var(--cor-card);
  border: 1px solid var(--cor-borda);
  border-radius: var(--raio);
  padding: 22px;
  margin-bottom: 16px;
  box-shadow: var(--sombra-sm);
}
.card-titulo {
  margin-top: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--cor-borda);
  color: var(--cor-texto);
}

/* ===== BOTÕES ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border: 1px solid transparent;
  border-radius: var(--raio-sm);
  font-size: 0.95rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 120ms;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primario { background: var(--cor-accent); color: white; border-color: var(--cor-accent); }
.btn-primario:hover { background: var(--cor-accent-escuro); border-color: var(--cor-accent-escuro); color: white; }

.btn-secundario { background: var(--cor-card); color: var(--cor-texto); border-color: var(--cor-borda-forte); }
.btn-secundario:hover { background: #ededed; border-color: var(--cinza-claro); color: var(--cor-texto); }

.btn-perigo { background: var(--cor-erro); color: white; border-color: var(--cor-erro); }
.btn-perigo:hover { background: #b91c1c; color: white; }

/* ===== FORMULÁRIOS ===== */
.form-grupo { margin-bottom: 16px; }
.form-grupo label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--cor-texto);
}
.form-grupo input:not([type="checkbox"]):not([type="radio"]),
.form-grupo select, .form-grupo textarea,
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="date"], input[type="time"],
input[type="search"], input[type="url"], input[type="file"],
input[type="color"], select, textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--cor-borda-forte);
  border-radius: var(--raio-sm);
  background: var(--cor-card);
  color: var(--cor-texto);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 120ms, box-shadow 120ms;
}
/* Checkboxes/radios — manter tamanho nativo e bem alinhados, especialmente no Safari */
input[type="checkbox"], input[type="radio"] {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px;
  padding: 0 !important;
  margin: 0;
  vertical-align: middle;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--cor-accent);
}
/* Label que envolve um checkbox - garante alinhamento centrado em todos os browsers */
label.cb-inline {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px;
  cursor: pointer;
  font-weight: 400;
  margin: 0;
  white-space: nowrap;
  min-height: 24px;
}
label.cb-inline input[type="checkbox"] {
  margin: 0;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--cor-accent);
  box-shadow: 0 0 0 3px var(--cor-accent-bg-medio);
}
input:disabled, select:disabled, textarea:disabled {
  background: #ededed;
  color: var(--cor-texto-secundario);
  cursor: not-allowed;
}
textarea { resize: vertical; min-height: 70px; }

/* ===== ALERTAS ===== */
.alerta {
  padding: 13px 18px;
  border-radius: var(--raio);
  margin-bottom: 16px;
  font-size: 0.95rem;
  border-left: 3px solid;
}
.alerta-sucesso { background: var(--cor-accent-bg); border-left-color: var(--cor-accent); color: var(--cor-accent-escuro); }
.alerta-aviso { background: #fffbeb; border-left-color: var(--cor-aviso); color: #92400e; }
.alerta-erro { background: #fef2f2; border-left-color: var(--cor-erro); color: #991b1b; }
.alerta-info { background: #eff6ff; border-left-color: var(--cor-info); color: #1e40af; }

/* ===== TABELAS ===== */
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
table th {
  background: #ededed;
  text-align: left;
  padding: 12px 14px;
  font-weight: 600;
  color: var(--cor-texto);
  border-bottom: 2px solid var(--cor-borda-forte);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--cor-borda);
  color: var(--cor-texto);
}
table tbody tr:hover { background: #f4f4f4; }
table tbody tr:last-child td { border-bottom: none; }

.placeholder {
  padding: 44px 24px;
  text-align: center;
  color: var(--cor-texto-secundario);
  background: #f4f4f4;
  border: 1px dashed var(--cor-borda-forte);
  border-radius: var(--raio);
}

/* ===== LOGIN PAGE ===== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--cinza-escuro) 0%, #2a2a2a 100%);
  padding: 20px;
}
.login-box {
  background: white;
  padding: 36px;
  border-radius: 8px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.login-box .logo {
  text-align: center;
  margin-bottom: 26px;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--cinza-escuro);
  letter-spacing: 1px;
}
.login-box .logo .sub {
  display: block;
  font-size: 0.75rem;
  color: var(--cor-texto-secundario);
  letter-spacing: 3px;
  font-weight: 500;
  margin-top: 5px;
}

/* ===== MODALS ===== */
.modal-bg {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(58, 58, 58, 0.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}
.modal-bg.aberto { display: flex; }
.modal-box {
  background: white;
  padding: 26px;
  border-radius: 8px;
  max-width: 540px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
}

/* ===== BADGES ===== */
.badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 12px;
  white-space: nowrap;
}
.badge-verde { background: var(--cor-accent-bg); color: var(--cor-accent-escuro); }
.badge-cinza { background: #ededed; color: var(--cor-texto-secundario); }
.badge-amarelo { background: #fef3c7; color: #92400e; }
.badge-azul { background: #dbeafe; color: #1e40af; }

/* ===== TABS ===== */
.tabs { display: flex; border-bottom: 1px solid var(--cor-borda); overflow-x: auto; }
.tab-btn, .tab-pill {
  padding: 11px 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--cor-texto-secundario);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 120ms;
  white-space: nowrap;
  font-family: inherit;
  text-decoration: none;
}
.tab-btn:hover, .tab-pill:hover { color: var(--cor-accent); text-decoration: none; }
.tab-btn.ativo, .tab-pill.ativo { color: var(--cor-accent); border-bottom-color: var(--cor-accent); font-weight: 600; }
.tab-panel { display: none; padding: 22px 0; }
.tab-panel.ativo { display: block; }

/* ===== BOTÕES PEQUENOS ===== */
.btn-acao, .btn-mini {
  padding: 5px 12px;
  font-size: 0.85rem;
  border: 1px solid var(--cor-borda-forte);
  background: white;
  color: var(--cor-texto);
  border-radius: var(--raio-sm);
  cursor: pointer;
  margin: 0 1px;
  font-family: inherit;
  transition: all 120ms;
}
.btn-mini:hover:not(:disabled), .btn-acao:hover { background: #ededed; }
.btn-mini:disabled { opacity: 0.3; cursor: not-allowed; }
.btn-acao { padding: 5px 12px; font-size: 0.85rem; border: none; color: white; margin-left: 4px; }
.btn-acao-arquivar { background: var(--cor-aviso); }
.btn-acao-reativar { background: var(--cor-accent); }
.btn-acao-apagar { background: var(--cor-erro); }
.btn-acao:hover { opacity: 0.88; }
.btn-mini.btn-danger { color: var(--cor-erro); border-color: #fca5a5; }
.btn-mini.btn-danger:hover { background: #fef2f2; }

/* Setas mover (cima/baixo no alinhamento) — maiores */
.btn-seta {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--cor-borda-forte);
  background: white;
  color: var(--cor-texto);
  border-radius: var(--raio-sm);
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 700;
  font-family: monospace;
  transition: all 120ms;
  padding: 0;
  margin: 0 2px;
}
.btn-seta:hover:not(:disabled) {
  background: var(--cor-accent-bg);
  border-color: var(--cor-accent);
  color: var(--cor-accent-escuro);
}
.btn-seta:disabled { opacity: 0.25; cursor: not-allowed; }

/* ===== GRELHA — controles topo ===== */
.grelha-controles {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: #ededed;
  border: 1px solid var(--cor-borda);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  flex-wrap: wrap;
}
.grelha-controles .zoom-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--cor-texto-secundario);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.zoom-btn-group {
  display: inline-flex;
  border: 1px solid var(--cor-borda-forte);
  border-radius: 4px;
  overflow: hidden;
  background: white;
}
.zoom-btn {
  padding: 6px 14px;
  background: white;
  border: none;
  border-right: 1px solid var(--cor-borda);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--cor-texto);
  font-family: inherit;
  transition: all 120ms;
}
.zoom-btn:last-child { border-right: none; }
.zoom-btn:hover { background: #ededed; }
.zoom-btn.ativo {
  background: var(--cor-accent);
  color: white;
  font-weight: 600;
}

/* ===== GRELHA TIPO EXCEL ===== */
.grelha-tabela {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
  table-layout: fixed;
}
.grelha-tabela th {
  background: var(--cinza-escuro);
  color: white;
  padding: 11px 6px;
  text-align: center;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 2;
  border: none;
  border-right: 1px solid var(--cinza-medio);
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.92rem;
}
.grelha-tabela th:last-child { border-right: none; }
.grelha-tabela th .dia-nome { font-weight: 700; font-size: 1rem; }
.grelha-tabela th .dia-data { font-size: 0.78rem; opacity: 0.75; margin-top: 3px; font-weight: 400; }

.hora-cell {
  background: #ededed;
  padding: 4px 8px;
  text-align: center;
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--cor-texto-secundario);
  border-right: 1px solid var(--cor-borda);
  border-bottom: 1px solid var(--cor-borda);
  position: sticky;
  left: 0;
  z-index: 1;
  white-space: nowrap;
  width: 70px;
  font-weight: 500;
}
.slot-cell {
  padding: 0;
  border-right: 1px solid var(--cor-borda);
  border-bottom: 1px dashed #e0e0e0;
  vertical-align: top;
  min-width: 170px;
  cursor: pointer;
  position: relative;
}
.slot-cell.hora-cheia { border-bottom: 1px solid var(--cor-borda); }
.slot-cell:hover { background: rgba(22, 163, 74, 0.04); }

/* Cards das emissões — fundo tingido com cor do programa a 30% */
.emissao-card {
  position: absolute;
  left: 2px;
  right: 2px;
  top: 2px;
  background: white;
  border: 1px solid var(--cor-borda);
  border-left: 4px solid var(--cinza-claro);
  border-radius: 4px;
  padding: 5px 8px;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: box-shadow 100ms, transform 100ms;
  z-index: 1;
  display: flex;
  flex-direction: column;
}
.emissao-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 5;
  transform: translateY(-1px);
}
.emissao-card.sortable-ghost { opacity: 0.4; }
.emissao-card.sortable-chosen { box-shadow: 0 8px 20px rgba(0,0,0,0.2); z-index: 100; }
.emissao-card.sortable-drag { cursor: grabbing; }

/* Sobreposição — listras */
.emissao-card.sobreposto {
  background: repeating-linear-gradient(
    45deg,
    #fef3c7,
    #fef3c7 6px,
    #fde68a 6px,
    #fde68a 12px
  ) !important;
  border-color: #d97706;
}
.emissao-card.sobreposto::after {
  content: "⚠ sobreposicao";
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #92400e;
  background: rgba(255,255,255,0.85);
  padding: 1px 6px;
  border-radius: 3px;
}

.emissao-hora-prog {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--cor-texto);
  font-weight: 600;
  flex-wrap: wrap;
}
.emissao-hora { font-family: monospace; color: var(--cor-texto-secundario); font-weight: 500; }
.emissao-prog-cod { font-weight: 700; color: var(--cor-texto); }
.emissao-temp-ep { font-family: monospace; font-size: 0.78rem; color: var(--cor-texto-secundario); }
.emissao-titulo {
  font-size: 0.85rem;
  color: var(--cor-texto);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.emissao-titulo-mini {
  font-size: 0.78rem;
  color: var(--cor-texto-secundario);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.emissao-dur {
  font-size: 0.78rem;
  color: var(--cor-texto-secundario);
  font-family: monospace;
  margin-top: auto;
  padding-top: 2px;
  font-weight: 500;
}

/* Badge tipo E/R/D/* — maior e mais destacado */
.emissao-tipo-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  min-width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  font-weight: 800;
  font-family: monospace;
  border-radius: 4px;
  color: white;
  padding: 0 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  z-index: 3;
  letter-spacing: 0;
}
.emissao-tipo-badge-estreia { background: var(--cor-accent); }
.emissao-tipo-badge-reposicao { background: var(--cinza-claro); }
.emissao-tipo-badge-direto { background: #dc2626; }
.emissao-tipo-badge-especial { background: #d97706; }

/* ===== TABELA ALINHAMENTO ===== */
.tabela-alinhamento {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.95rem;
}
.tabela-alinhamento th {
  background: var(--cinza-escuro);
  color: white;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 2;
}
.tabela-alinhamento td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--cor-borda);
  background: white;
  font-size: 0.95rem;
  vertical-align: middle;
}
.tabela-alinhamento tr { transition: filter 100ms; cursor: grab; }
.tabela-alinhamento tr:active { cursor: grabbing; }
.tabela-alinhamento tr:hover td { filter: brightness(0.96); }
.tabela-alinhamento .ordem { color: var(--cor-texto-suave); font-size: 0.9rem; text-align: right; font-family: monospace; font-weight: 600; }
.tabela-alinhamento .hora {
  font-family: monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--cor-texto);
}

/* Cores esbatidas por tipo (linha inteira) */
.tabela-alinhamento tr.linha-tipo-programa td { background: #ffffff; }
.tabela-alinhamento tr.linha-tipo-separador td { background: rgba(59,130,246,0.08); }
.tabela-alinhamento tr.linha-tipo-id_apresentador td { background: rgba(236,72,153,0.08); }
.tabela-alinhamento tr.linha-tipo-filler td { background: rgba(245,158,11,0.10); }
.tabela-alinhamento tr.linha-tipo-publicidade td { background: rgba(22,163,74,0.08); }
.tabela-alinhamento tr.linha-tipo-cartao_patrocinio td { background: rgba(168,85,247,0.08); }
.tabela-alinhamento tr.linha-tipo-promo td { background: rgba(239,68,68,0.08); }
.tabela-alinhamento tr.linha-tipo-vinheta td { background: rgba(99,102,241,0.08); }
.tabela-alinhamento tr.linha-tipo-outro td { background: rgba(107,114,128,0.06); }

/* Tempo de cada item — bem destacado, sem quebrar a linha */
.tabela-alinhamento .duracao-grande {
  font-family: monospace;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--cor-accent-escuro);
  text-align: center;
  white-space: nowrap;
}
.tabela-alinhamento td.duracao-grande {
  background: var(--cor-accent-bg) !important;
  letter-spacing: 0.5px;
}

/* Drag global */
.drag-handle {
  cursor: grab;
  color: var(--cor-texto-suave);
  font-size: 1.2rem;
  user-select: none;
  padding: 0 8px;
}
.drag-handle:active { cursor: grabbing; }
.tabela-alinhamento tr.sortable-ghost td { filter: brightness(0.85); opacity: 0.5; }
.tabela-alinhamento tr.sortable-chosen td { box-shadow: inset 0 0 0 2px var(--cor-accent); }
.tabela-alinhamento tr.sortable-drag { cursor: grabbing; }

.badge-tipo {
  font-size: 0.78rem;
  padding: 3px 8px;
  border-radius: 3px;
  font-weight: 700;
  font-family: monospace;
  white-space: nowrap;
  letter-spacing: 0.3px;
}
.tipo-programa { background: var(--cinza-escuro); color: white; }
.tipo-separador { background: #dbeafe; color: #1e40af; }
.tipo-id_apresentador { background: #fce7f3; color: #9f1239; }
.tipo-filler { background: #fef3c7; color: #92400e; }
.tipo-publicidade { background: var(--cor-accent-bg-medio); color: var(--cor-accent-escuro); }
.tipo-cartao_patrocinio { background: #f3e8ff; color: #6b21a8; }
.tipo-promo { background: #fee2e2; color: #991b1b; }
.tipo-vinheta { background: #e0e7ff; color: #3730a3; }
.tipo-outro { background: #ededed; color: #2f2f2f; }

/* ===== GRID HELPERS ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 18px; }
.full { grid-column: 1/-1; }

@media (max-width: 900px) {
  .app-layout { grid-template-columns: 1fr; grid-template-areas: "topbar" "main"; }
  .app-sidebar { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
