/* ProgOb — visual GNOME 2 clássico (tema Clearlooks): painel de menus em cima,
   páginas dentro de "janelas" com barra de título azul, painel inferior e
   ícones coloridos na paleta Tango. */
:root {
  --fonte: "Ubuntu", "DejaVu Sans", "Bitstream Vera Sans", Verdana, Geneva, Tahoma, sans-serif;  /* Ubuntu local (static/vendor/ubuntu); as demais só de reserva */

  /* área de trabalho */
  --desktop: radial-gradient(ellipse at 70% 35%, #4a79bb 0%, #2d5a93 40%, #163f6e 75%, #0b2240 100%);

  /* GTK / Clearlooks */
  --gtk-bg: #edeceb;            /* fundo das janelas */
  --surface: #ffffff;           /* campos, listas, cartões */
  --surface-2: #f5f4f2;         /* linhas alternadas */
  --ink: #1a1a1a;
  --ink-strong: #000000;
  --ink-2: #3c3c3c;
  --muted: #6a6865;
  --borda: #a8a49e;             /* contorno de widgets */
  --borda-clara: #c9c5bf;
  --grid: #e3e1dd;
  --axis: #b8b4ae;
  --link: #204a87;

  --sel-1: #86abd9;             /* seleção (azul Clearlooks) */
  --sel-2: #4e7fc2;
  --sel-borda: #3c6aa9;
  --sel-ink: #ffffff;

  --botao-1: #fdfdfc;
  --botao-2: #e2dfda;
  --painel-1: #f7f6f4;
  --painel-2: #d8d5cf;

  --titulo-1: #7ea4d6;          /* barra de título da janela ativa */
  --titulo-2: #4a79bb;
  --titulo-borda: #2d5a93;

  --tip-bg: #ffffbf;
  --tip-ink: #000000;
  --tip-borda: #000000;

  --good: #4e9a06;
  --good-ink: #3b7a05;
  --critical: #cc0000;

  /* séries dos gráficos: azul e laranja Tango + verde-água (validadas p/ daltonismo) */
  --s1: #3465a4; --s2: #e8690b; --s3: #1baf7a;
}
:root[data-theme="dark"] {
  --desktop: radial-gradient(ellipse at 70% 35%, #1f3f6e 0%, #102a4d 55%, #06142a 100%);
  --gtk-bg: #3c3b37; --surface: #2e2d2a; --surface-2: #35342f;
  --ink: #eeeeec; --ink-strong: #ffffff; --ink-2: #d3d7cf; --muted: #a9a79f;
  --borda: #1f1e1c; --borda-clara: #55534c; --grid: #4a4943; --axis: #5f5d56; --link: #9ec2ef;
  --botao-1: #5a5852; --botao-2: #45443f;
  --painel-1: #4a4944; --painel-2: #34332f;
  --good-ink: #8ae234; --critical: #ef2929;
  --s1: #729fcf; --s2: #f57900; --s3: #199e70;
}

/* ---------- base ---------- */
:root, [data-bs-theme] {
  --bs-font-sans-serif: var(--fonte);
  --bs-body-font-size: .8125rem;
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--gtk-bg);
  --bs-link-color: var(--link);
  --bs-link-color-rgb: 32, 74, 135;
  --bs-link-hover-color: var(--sel-2);
  --bs-border-radius: 3px;
  --bs-border-radius-sm: 2px;
  --bs-border-radius-lg: 4px;
  --bs-primary: #4e7fc2;
  --bs-primary-rgb: 78, 127, 194;
}
html { height: 100%; }
body.desktop {
  font-family: var(--fonte); font-size: .8125rem; color: var(--ink);
  background: var(--desktop) fixed; min-height: 100vh;
  display: flex; flex-direction: column;
}
h1, h2, h3, h4, h5, .h4, .h5 { font-family: var(--fonte); color: var(--ink-strong); font-weight: 700; }
.h5, h5 { font-size: 1rem; }
a { color: var(--link); }
.text-muted, .form-text { color: var(--muted) !important; }
.tnum { font-variant-numeric: tabular-nums; }

/* ícones coloridos (Tango) com leve sombra, como os do GNOME 2 */
.ic { filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .28)); }
.ic-azul { color: #3465a4; } .ic-laranja { color: #f57900; } .ic-verde { color: #4e9a06; }
.ic-vermelho { color: #cc0000; } .ic-roxo { color: #75507b; } .ic-marrom { color: #8f5902; }
.ic-cinza { color: #555753; } .ic-amarelo { color: #c4a000; }
[data-theme="dark"] .ic-azul { color: #729fcf; } [data-theme="dark"] .ic-cinza { color: #babdb6; }
[data-theme="dark"] .ic-roxo { color: #ad7fa8; } [data-theme="dark"] .ic-marrom { color: #e9b96e; }

/* ---------- painéis (topo e base) ---------- */
.painel {
  display: flex; align-items: center; gap: 2px; padding: 0 6px; min-height: 36px;
  background: linear-gradient(180deg, var(--painel-1), var(--painel-2));
  color: var(--ink); font-size: .95rem; position: relative; z-index: 1030; flex-shrink: 0;
}
.painel-topo { border-bottom: 1px solid #7a766f; box-shadow: 0 2px 4px rgba(0,0,0,.35); position: sticky; top: 0; flex-wrap: wrap; }
.painel-base { border-top: 1px solid #8e8a84; margin-top: auto; }
.painel-menus { display: flex; align-items: center; flex-wrap: wrap; flex: 1 1 auto; }
.painel-menus #menus { align-items: center; }
.painel-botao {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; font-weight: 700;
  background: transparent; border: 1px solid transparent; border-radius: 2px;
  color: var(--ink); text-decoration: none; font: inherit; white-space: nowrap;
}
.painel-botao .ic { font-size: 1.15rem; }
.painel-botao:hover { border-color: var(--borda-clara); background: rgba(255,255,255,.45); color: var(--ink-strong); }
.painel-botao.show, .painel-botao[aria-expanded="true"] {
  background: linear-gradient(180deg, var(--sel-1), var(--sel-2)); border-color: var(--sel-borda); color: var(--sel-ink);
}
.painel-botao.show .ic, .painel-botao[aria-expanded="true"] .ic { color: #fff; }
.painel-marca { display: inline-flex; align-items: center; padding: 0 10px 0 4px; margin-right: 4px; border-right: 1px solid var(--borda-clara); }
.painel-marca img { height: 24px; width: auto; filter: drop-shadow(0 1px 0 rgba(255,255,255,.6)); }
.painel-direita { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.painel-item { padding: 0 10px; white-space: nowrap; color: var(--ink); }
.painel-base { min-height: 32px; font-size: .875rem; }
.painel-base .painel-botao { font-weight: 400; height: 26px; }
.painel-relogio { font-variant-numeric: tabular-nums; border-left: 1px solid var(--borda-clara); }
.painel-janela {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 12px; min-width: 200px; max-width: 380px;
  border: 1px solid var(--borda); border-radius: 2px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  background: linear-gradient(180deg, #d2cec8, #e9e7e3); box-shadow: inset 0 1px 2px rgba(0,0,0,.25);
}
[data-theme="dark"] .painel-janela { background: linear-gradient(180deg, #2a2926, #3a3935); }
@media (max-width: 991.98px) {
  /* celular/tablet: "Menu" expande/contrai uma gaveta logo abaixo do painel */
  .painel-topo { flex-wrap: nowrap; }
  .painel-menus #menus.show, .painel-menus #menus.collapsing {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 100%; left: 0; right: 0; padding: 4px;
    background: linear-gradient(180deg, var(--painel-1), var(--painel-2));
    border-bottom: 1px solid #8e8a84; box-shadow: 0 3px 6px rgba(0,0,0,.35);
  }
  .painel-menus #menus .painel-botao { width: 100%; height: 38px; }
  .painel-menus #menus .dropdown-menu { position: static !important; transform: none !important; width: 100%; box-shadow: none; }
}

/* ---------- menus suspensos ---------- */
.menu-gnome, .dropdown-menu {
  --bs-dropdown-font-size: .9rem;
  --bs-dropdown-bg: var(--surface-2);
  --bs-dropdown-color: var(--ink);
  --bs-dropdown-border-color: #8e8a84;
  --bs-dropdown-border-radius: 0;
  --bs-dropdown-padding-y: 2px;
  --bs-dropdown-item-padding-y: 6px;
  --bs-dropdown-item-padding-x: 12px;
  --bs-dropdown-link-color: var(--ink);
  --bs-dropdown-link-hover-color: var(--sel-ink);
  --bs-dropdown-link-hover-bg: var(--sel-2);
  --bs-dropdown-link-active-color: var(--ink);
  --bs-dropdown-link-active-bg: transparent;
  --bs-dropdown-divider-bg: var(--borda-clara);
  --bs-dropdown-divider-margin-y: 3px;
  box-shadow: 2px 3px 6px rgba(0, 0, 0, .35); margin-top: 1px !important; min-width: 240px;
}
.dropdown-item { display: flex; align-items: center; gap: 10px; }
.dropdown-item .ic { font-size: 1.25rem; width: 22px; text-align: center; }
.dropdown-item:hover, .dropdown-item:focus {
  background: linear-gradient(180deg, var(--sel-1), var(--sel-2)); color: var(--sel-ink);
  outline: 1px solid var(--sel-borda); outline-offset: -1px;
}
.dropdown-item:hover .ic, .dropdown-item:focus .ic { color: #fff; }
.dropdown-item.active { font-weight: 700; }
.dropdown-item-text { color: var(--ink); line-height: 1.5; }

/* ---------- janela da página ---------- */
.area-trabalho { flex: 1; padding: 22px 26px 18px; display: flex; min-width: 0; }
.janela {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
  background: var(--gtk-bg); border: 1px solid var(--titulo-borda); border-radius: 5px 5px 2px 2px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .55);
}
.janela-titulo {
  display: flex; align-items: center; gap: 8px; height: 26px; padding: 0 4px 0 6px;
  background: linear-gradient(180deg, var(--titulo-1), var(--titulo-2));
  border-bottom: 1px solid var(--titulo-borda); border-radius: 4px 4px 0 0;
  color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .45); user-select: none;
}
.janela-titulo h1 { font-size: .8125rem; font-weight: 700; color: #fff; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.janela-app { opacity: .85; white-space: nowrap; }
.janela-icone { width: 16px; height: 16px; flex-shrink: 0; filter: drop-shadow(0 1px 0 rgba(255,255,255,.5)); }
.janela.fechando { transform: scale(.96); opacity: 0; transition: transform .18s ease-in, opacity .18s ease-in; }
.janela-botoes { margin-left: auto; display: flex; gap: 2px; }
.janela-botoes > * {
  width: 20px; height: 18px; display: grid; place-items: center; padding: 0; font-size: .7rem;
  border: 1px solid rgba(20, 50, 90, .7); border-radius: 3px; color: #fff; text-decoration: none;
  background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,.05));
}
.janela-botoes > *:hover { background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.2)); color: #fff; }
.janela-corpo { padding: 14px; flex: 1; min-width: 0; }
.janela-max .area-trabalho { padding: 0; }
.janela-max .janela { border-radius: 0; box-shadow: none; }
.janela-max .janela-titulo { border-radius: 0; }
@media (max-width: 767.98px) {
  .area-trabalho { padding: 0; }
  .janela { border-radius: 0; box-shadow: none; border-left: 0; border-right: 0; }
  .janela-titulo { border-radius: 0; }
  .janela-corpo { padding: 10px; }
}

/* ---------- botões (Clearlooks) ---------- */
.btn {
  --bs-btn-font-size: .8125rem; --bs-btn-padding-y: 4px; --bs-btn-padding-x: 12px; --bs-btn-border-radius: 3px;
  --bs-btn-color: var(--ink); --bs-btn-border-color: var(--borda);
  --bs-btn-hover-color: var(--ink-strong); --bs-btn-hover-border-color: #8e8a84;
  --bs-btn-active-color: var(--ink-strong); --bs-btn-active-border-color: #7a766f;
  background: linear-gradient(180deg, var(--botao-1), var(--botao-2));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 1px 0 rgba(0,0,0,.06);
  font-weight: 400;
}
.btn:hover { background: linear-gradient(180deg, #ffffff, #ebe9e5); }
[data-theme="dark"] .btn:hover { background: linear-gradient(180deg, #67655e, #504e49); }
.btn:active, .btn.active { background: linear-gradient(180deg, #cfcbc5, #e2dfda); box-shadow: inset 0 1px 3px rgba(0,0,0,.3); }
.btn-sm { --bs-btn-padding-y: 2px; --bs-btn-padding-x: 7px; }
.btn-primary {
  --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-active-color: #fff; --bs-btn-disabled-color: #fff;
  --bs-btn-border-color: var(--sel-borda); --bs-btn-hover-border-color: #2f5a94; --bs-btn-active-border-color: #2f5a94;
  --bs-btn-disabled-border-color: var(--sel-borda);
  background: linear-gradient(180deg, #8db2e0, #4e7fc2); text-shadow: 0 1px 0 rgba(0,0,0,.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4);
}
.btn-primary:hover { background: linear-gradient(180deg, #9cbde6, #5b8bcb); }
.btn-primary:active { background: linear-gradient(180deg, #3f6fae, #6690cc); }
.btn-danger { --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-border-color: #8f0000; background: linear-gradient(180deg, #ef5555, #cc0000); text-shadow: 0 1px 0 rgba(0,0,0,.3); }
.btn-danger:hover { background: linear-gradient(180deg, #f26a6a, #d91414); }
/* Botões de ação: em repouso são claros com ícone colorido; no hover enchem com a
   própria cor e o ícone fica branco — nunca branco sobre fundo claro. */
.btn-outline-primary { --bs-btn-color: var(--link); --bs-btn-active-color: #fff; }
.btn-outline-danger { --bs-btn-color: var(--critical); --bs-btn-active-color: #fff; }
.btn-outline-secondary { --bs-btn-color: var(--ink); --bs-btn-hover-color: var(--ink-strong); --bs-btn-active-color: var(--ink-strong); }
.btn.btn-outline-primary:hover, .btn.btn-outline-primary:focus-visible {
  background: linear-gradient(180deg, #3465a4, #204a87); border-color: #162f55; color: #fff;
  box-shadow: 0 0 0 2px rgba(32, 74, 135, .35);
}
.btn.btn-outline-danger:hover, .btn.btn-outline-danger:focus-visible {
  background: linear-gradient(180deg, #ef5555, #cc0000); border-color: #8f0000; color: #fff;
  box-shadow: 0 0 0 2px rgba(204, 0, 0, .3);
}
.btn.btn-outline-primary:active { background: linear-gradient(180deg, #3f6fae, #6690cc); color: #fff; }
.btn.btn-outline-danger:active { background: linear-gradient(180deg, #a40000, #d91414); color: #fff; }
/* botões neutros: borda azul e fundo azul-claro no hover */
.btn:not(.btn-primary):not(.btn-danger):not(.btn-outline-primary):not(.btn-outline-danger):not(.btn-close):hover {
  border-color: var(--sel-borda); background: linear-gradient(180deg, #f4f8fd, #d8e5f5); color: var(--ink-strong);
  box-shadow: 0 0 0 2px rgba(78, 127, 194, .25);
}
[data-theme="dark"] .btn:not(.btn-primary):not(.btn-danger):not(.btn-outline-primary):not(.btn-outline-danger):not(.btn-close):hover {
  background: linear-gradient(180deg, #5d6f86, #44546a);
}
.table-hover tbody tr:hover .btn { box-shadow: 0 0 0 1px rgba(255,255,255,.6); }
/* dentro da linha selecionada (azul), o botão em hover ganha anel branco e sombra para se destacar */
.table-hover tbody tr:hover .btn:hover { box-shadow: 0 0 0 2px #fff, 0 2px 5px rgba(0, 0, 0, .45); transform: translateY(-1px); }
.btn-close { box-shadow: none; }

/* ---------- campos ---------- */
.form-control, .form-select {
  font-size: .8125rem; padding: 3px 7px; min-height: 26px;
  background-color: var(--surface); color: var(--ink);
  border: 1px solid var(--borda); border-radius: 2px; box-shadow: inset 0 1px 2px rgba(0,0,0,.12);
}
.form-select { padding-right: 26px; background-position: right 6px center; }
.form-control:focus, .form-select:focus { border-color: var(--sel-borda); box-shadow: 0 0 0 2px rgba(78, 127, 194, .35), inset 0 1px 2px rgba(0,0,0,.12); }
.input-group-text { background: linear-gradient(180deg, var(--botao-1), var(--botao-2)); border-color: var(--borda); color: var(--ink-2); font-size: .8125rem; padding: 3px 8px; border-radius: 2px; }
.form-check-input { border-color: var(--borda); }
.form-check-input:checked { background-color: var(--sel-2); border-color: var(--sel-borda); }
.form-label { font-weight: 700; font-size: .8125rem; color: var(--ink-strong); margin-bottom: 3px; }
.errorlist { list-style: none; padding: 0; margin: 3px 0 0; color: var(--critical); font-size: .78rem; }

/* ---------- quadros (cartões) ---------- */
.card {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--borda); border-radius: 3px; box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.card-header {
  background: linear-gradient(180deg, var(--botao-1), var(--botao-2)); border-bottom: 1px solid var(--borda-clara);
  padding: 6px 10px; border-radius: 2px 2px 0 0 !important;
}
.card-title { font-size: .8125rem; font-weight: 700; margin: 0; color: var(--ink-strong); }
.card-sub { font-size: .75rem; color: var(--muted); }
.card-body { padding: 10px 12px; }
.alert { border-radius: 3px; font-size: .8125rem; padding: 8px 12px; border-width: 1px; }
.alert-dismissible .btn-close { padding: 10px; }
.badge-soft { background: var(--gtk-bg); color: var(--ink-2); border: 1px solid var(--borda-clara); font-weight: 400; border-radius: 2px; }

/* ---------- listas (GtkTreeView) ---------- */
.table { --bs-table-bg: transparent; --bs-table-color: var(--ink); color: var(--ink); margin: 0; font-size: .8125rem; }
.table > :not(caption) > * > * { border-bottom-color: var(--grid); padding: 4px 8px; }
.table thead th {
  background: linear-gradient(180deg, var(--botao-1), var(--botao-2)); border-right: 1px solid var(--borda-clara);
  border-bottom: 1px solid var(--borda) !important; color: var(--ink-strong); font-weight: 400; white-space: nowrap;
  text-transform: none; letter-spacing: 0; font-size: .8125rem;
}
.table thead th a { color: inherit; text-decoration: none; }
.table thead th a:hover { text-decoration: underline; }
.table tbody td { white-space: nowrap; }  /* uma linha por item, como nas listas do GTK */
.table tbody tr:nth-child(even) > * { background: var(--surface-2); }
.table-hover tbody tr:hover > * { background: linear-gradient(180deg, var(--sel-1), var(--sel-2)); color: var(--sel-ink); }
.table-hover tbody tr:hover a:not(.btn), .table-hover tbody tr:hover .text-muted, .table-hover tbody tr:hover .delta-ok, .table-hover tbody tr:hover .delta-bad { color: #fff !important; }
.table-hover tbody tr:hover .badge-soft { background: rgba(255,255,255,.2); color: #fff; border-color: rgba(255,255,255,.5); }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.card > .table-responsive:last-child .table tbody tr:last-child > * { border-bottom: 0; }

.page-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.page-actions form { flex: 1 1 260px; max-width: 420px; }
.pagination { --bs-pagination-font-size: .8125rem; --bs-pagination-padding-y: 2px; --bs-pagination-padding-x: 8px; --bs-pagination-color: var(--ink); --bs-pagination-bg: var(--surface); --bs-pagination-border-color: var(--borda); --bs-pagination-active-bg: var(--sel-2); --bs-pagination-active-border-color: var(--sel-borda); }

/* ---------- KPIs ---------- */
.kpi { padding: 10px 12px; height: 100%; }
.kpi-label { font-size: .8125rem; color: var(--ink-2); display: flex; align-items: center; gap: 6px; font-weight: 700; }
.kpi-label i { font-size: 1.05rem; }
.kpi-value { font-size: clamp(1.3rem, .95rem + 1vw, 1.7rem); font-weight: 700; line-height: 1.2; margin: 4px 0 2px; color: var(--ink-strong); overflow-wrap: normal; word-break: keep-all; }
.kpi-sub { font-size: .76rem; color: var(--muted); }
/* medidor = GtkProgressBar do Clearlooks */
.meter { height: 12px; background: linear-gradient(180deg, #d6d3cd, #efedea); border: 1px solid var(--borda); border-radius: 2px; overflow: hidden; margin-top: 8px; box-shadow: inset 0 1px 2px rgba(0,0,0,.15); }
[data-theme="dark"] .meter { background: linear-gradient(180deg, #262522, #34332f); }
.meter > span {
  display: block; height: 100%; border-right: 1px solid var(--sel-borda);
  background: repeating-linear-gradient(-45deg, rgba(255,255,255,.18) 0 6px, transparent 6px 12px), linear-gradient(180deg, #92b6e3, #4e7fc2);
}
.meter.over > span { background: repeating-linear-gradient(-45deg, rgba(255,255,255,.18) 0 6px, transparent 6px 12px), linear-gradient(180deg, #8ae234, #4e9a06); border-right-color: #3b7a05; }
.meter.alerta > span { background: repeating-linear-gradient(-45deg, rgba(255,255,255,.18) 0 6px, transparent 6px 12px), linear-gradient(180deg, #ef5555, #cc0000); border-right-color: #8f0000; }
.perfil-row .meter { height: 10px; margin: 0; }
.delta-ok { color: var(--good-ink); }
.delta-bad { color: var(--critical); }

.chart-box { position: relative; height: 290px; }
@media (max-width: 575.98px) { .chart-box { height: 250px; } }
.legend { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: .76rem; color: var(--ink-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border: 1px solid rgba(0,0,0,.35); margin-right: 4px; vertical-align: -1px; }
.perfil-row { display: grid; grid-template-columns: minmax(90px, 1fr) 2fr auto; gap: 8px; align-items: center; font-size: .78rem; margin-bottom: 5px; }
.filtros { display: flex; flex-wrap: wrap; gap: 6px; align-items: end; }
.filtros .form-select, .filtros .form-control { min-width: 150px; }
.filtros .form-label { font-weight: 400; }
@media (max-width: 575.98px) { .filtros > * { flex: 1 1 100%; } }

/* ---------- programação: lista de equipes com caixas de seleção ---------- */
.lista-equipes { max-height: 300px; overflow-y: auto; background: var(--surface); border: 1px solid var(--borda); box-shadow: inset 0 1px 2px rgba(0,0,0,.1); }
/* cor da linha pelo Tipo CCM: Linha Morta azul, Linha Viva vermelho leve, demais verde */
.tipo-lm { --tipo-fundo: #e3edf9; --tipo-forte: #c3d8f2; --tipo-borda: #3465a4; }
.tipo-lv { --tipo-fundo: #fbe7e7; --tipo-forte: #f5c9c9; --tipo-borda: #cc0000; }
.tipo-outro { --tipo-fundo: #e6f3dc; --tipo-forte: #cbe7b5; --tipo-borda: #4e9a06; }
[data-theme="dark"] .tipo-lm { --tipo-fundo: rgba(52,101,164,.18); --tipo-forte: rgba(52,101,164,.40); --tipo-borda: #729fcf; }
[data-theme="dark"] .tipo-lv { --tipo-fundo: rgba(204,0,0,.16); --tipo-forte: rgba(204,0,0,.36); --tipo-borda: #ef2929; }
[data-theme="dark"] .tipo-outro { --tipo-fundo: rgba(78,154,6,.16); --tipo-forte: rgba(78,154,6,.36); --tipo-borda: #8ae234; }
.equipe-opcao {
  display: grid; grid-template-columns: 1fr auto auto auto; gap: 8px; align-items: center;
  padding: 5px 8px; font-size: .8125rem; margin: 0;
  background: var(--tipo-fundo); border-left: 5px solid var(--tipo-borda); border-bottom: 1px solid rgba(0,0,0,.08);
}
.equipe-opcao:hover { filter: brightness(.97); }
.equipe-opcao.marcada { background: var(--tipo-forte); }
.equipe-opcao[hidden] { display: none; }
.equipe-opcao .form-check-input { margin: 0; }
.equipe-marca { display: grid; grid-template-columns: auto 96px 1fr; gap: 8px; align-items: center; cursor: pointer; margin: 0; }
.equipe-resp { display: inline-flex; align-items: center; gap: 4px; font-size: .76rem; cursor: pointer; margin: 0; white-space: nowrap; }
.equipe-resp:has(input:disabled) { opacity: .35; cursor: default; }
.selo-resp { display: none; font-size: .72rem; font-weight: 700; color: #7a4d00; background: #fce94f; border: 1px solid #c4a000; padding: 0 5px; border-radius: 2px; white-space: nowrap; }
/* responsável: grifada em negrito */
.equipe-opcao.responsavel { box-shadow: inset 0 0 0 2px var(--tipo-borda); }
.equipe-opcao.responsavel .equipe-codigo, .equipe-opcao.responsavel .equipe-info, .equipe-opcao.responsavel .equipe-encarregado { font-weight: 700; color: var(--ink-strong); }
.equipe-opcao.responsavel .selo-resp { display: inline-block; }
.equipe-encarregado { color: var(--muted); }
.legenda-tipos { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.legenda-tipos i { display: inline-block; width: 12px; height: 12px; margin-right: 4px; vertical-align: -2px; background: var(--tipo-forte); border-left: 4px solid var(--tipo-borda); }
.equipe-codigo { font-weight: 700; font-variant-numeric: tabular-nums; }
.equipe-info { line-height: 1.3; }
.comentario { border-left: 3px solid #f57900; background: var(--surface-2); padding: 6px 10px; margin-bottom: 8px; font-size: .8125rem; }
.comentario-cab { font-size: .76rem; margin-bottom: 2px; }

/* ---------- dicas (tooltips amarelas) ---------- */
.tooltip { --bs-tooltip-bg: var(--tip-bg); --bs-tooltip-color: var(--tip-ink); --bs-tooltip-opacity: 1; --bs-tooltip-font-size: .76rem; --bs-tooltip-border-radius: 0; --bs-tooltip-padding-x: 5px; --bs-tooltip-padding-y: 2px; --bs-tooltip-arrow-height: 0; --bs-tooltip-arrow-width: 0; font-family: var(--fonte); }
.tooltip-inner { border: 1px solid var(--tip-borda); box-shadow: 1px 1px 3px rgba(0,0,0,.3); text-align: left; }

/* ---------- área de upload ---------- */
.dropzone { border: 2px dashed var(--axis); border-radius: 3px; padding: 26px 12px; text-align: center; background: var(--surface-2); cursor: pointer; }
.dropzone:hover, .dropzone.drag { border-color: var(--sel-2); background: rgba(78, 127, 194, .08); }

/* ---------- diálogos (modais como janelas GNOME) ---------- */
.modal-content { border-radius: 5px 5px 2px 2px; border: 1px solid var(--titulo-borda); background: var(--gtk-bg); color: var(--ink); box-shadow: 0 6px 24px rgba(0,0,0,.6); overflow: hidden; }
.modal-content > .janela-titulo { border-radius: 0; }
#rapido-corpo .col-md-6 { width: 100%; }  /* janela de cadastro rápido: um campo por linha */
.progresso-dialogo .modal-body { padding: 16px 18px 14px; }
.progresso-icone { font-size: 2.4rem; line-height: 1; margin-bottom: 6px; color: #4e9a06; filter: drop-shadow(0 1px 1px rgba(0,0,0,.3)); }
.progresso-icone.ok { color: #4e9a06; }
.progresso-icone.erro { color: #cc0000; }
.progresso-barra { height: 20px; background: linear-gradient(180deg, #d6d3cd, #efedea); border: 1px solid var(--borda); border-radius: 2px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.2); }
[data-theme="dark"] .progresso-barra { background: linear-gradient(180deg, #262522, #34332f); }
.progresso-barra > div {
  height: 100%; width: 0; border-right: 1px solid var(--sel-borda); transition: width .25s ease;
  background: repeating-linear-gradient(-45deg, rgba(255,255,255,.2) 0 8px, transparent 8px 16px), linear-gradient(180deg, #92b6e3, #4e7fc2);
  background-size: 22px 22px, 100% 100%; animation: listras 0.8s linear infinite;
}
@keyframes listras { from { background-position: 0 0, 0 0; } to { background-position: 22px 0, 0 0; } }
.progresso-barra.indeterminada > div { width: 30%; animation: vai-e-vem 1.3s ease-in-out infinite alternate; }
@keyframes vai-e-vem { from { margin-left: 0; } to { margin-left: 70%; } }
.progresso-pct { font-size: 1.1rem; font-weight: 700; color: var(--ink-strong); font-variant-numeric: tabular-nums; }
.etapas { list-style: none; padding: 8px 10px; margin: 12px 0 0; font-size: .8125rem; background: var(--surface); border: 1px solid var(--borda); box-shadow: inset 0 1px 2px rgba(0,0,0,.1); }
.etapas li { display: flex; align-items: center; gap: 8px; padding: 2px 0; color: var(--muted); }
.etapas li i { width: 1.1rem; text-align: center; }
.etapas li.feita { color: var(--ink); }
.etapas li.feita i { color: #4e9a06; }
.etapas li.atual { color: var(--ink-strong); font-weight: 700; }
.etapas li.atual i { color: #3465a4; }
@media (prefers-reduced-motion: reduce) { .progresso-barra > div, .progresso-barra.indeterminada > div { animation: none; transition: none; } }

/* ---------- área de trabalho vazia (janela fechada) ---------- */
.desktop-vazio { flex: 1; position: relative; display: grid; place-items: center; min-height: 60vh; }
.desktop-logo { width: min(620px, 82vw); height: auto; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .55)); user-select: none; }
.desktop-dica { color: #fff; text-align: center; margin-top: 14px; text-shadow: 0 1px 2px rgba(0,0,0,.8); font-size: .9rem; }
.atalhos { position: absolute; top: 4px; left: 0; display: flex; flex-direction: column; gap: 14px; }
.atalho {
  display: flex; flex-direction: column; align-items: center; gap: 4px; width: 96px; padding: 6px 4px;
  color: #fff; text-decoration: none; text-align: center; font-size: .8125rem; border: 1px dotted transparent; border-radius: 2px;
  text-shadow: 0 1px 2px rgba(0,0,0,.9);
}
.atalho i { font-size: 2.4rem; line-height: 1; filter: drop-shadow(0 2px 2px rgba(0,0,0,.5)); }
.atalho { user-select: none; cursor: default; }
.atalho:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.atalho:focus { outline: none; }
.atalho:focus-visible { border-color: rgba(255,255,255,.8); }
.atalho.selecionado { color: #fff; background: rgba(78, 127, 194, .6); border-color: rgba(255,255,255,.8); }
@media (max-width: 767.98px) {
  .desktop-vazio { padding: 16px; }
  .atalhos { position: static; flex-direction: row; flex-wrap: wrap; justify-content: center; margin-bottom: 16px; }
  .desktop-vazio { display: flex; flex-direction: column; justify-content: center; }
}

/* ---------- login (tela de entrada estilo GDM) ---------- */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--desktop); }
.login-janela { width: 100%; max-width: 420px; }
.login-janela .janela-corpo { padding: 18px 20px; }
.login-logo { display: block; width: 100%; max-width: 320px; height: auto; margin: 0 auto 14px; }

/* ---------- "Aguarde...": arco elétrico girando no centro da tela ----------
   Só transform e opacity são animados (feitos pela placa de vídeo); o brilho
   (drop-shadow) é desenhado uma vez, porque o conteúdo de cada raio não muda. */
.aguarde {
  position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center;
  background: rgba(10, 12, 20, .45); cursor: progress;
  animation: aguarde-entra .12s ease-out;
}
.aguarde[hidden] { display: none; }
.aguarde-anel {
  position: relative; width: 150px; height: 150px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 45%, #1b2f4d 0%, #0b1424 62%, #050a12 100%);
  box-shadow: 0 0 0 1px rgba(120, 190, 255, .25), 0 0 34px rgba(80, 170, 255, .45), 0 8px 26px rgba(0, 0, 0, .6);
}
.aguarde-trilho, .aguarde-raio { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.aguarde-trilho circle { fill: none; stroke: rgba(114, 159, 207, .18); stroke-width: 3; }
.aguarde-raio {
  will-change: transform, opacity;
  filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 5px #6cc4ff) drop-shadow(0 0 10px #2a8cff);
  animation: aguarde-gira 1.05s linear infinite, aguarde-faisca .54s steps(1, end) infinite;
}
.aguarde-raio path { fill: none; stroke: #e8f6ff; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
/* três formatos de raio alternando (cada um visível 1/3 do tempo) = efeito de estalo */
.aguarde-raio-2 { animation-delay: -.35s, -.18s; }
.aguarde-raio-3 { animation-delay: -.7s, -.36s; }
.aguarde-anel span {
  position: relative; font-weight: 700; font-size: .85rem; color: #eaf6ff; letter-spacing: .02em;
  text-shadow: 0 0 6px rgba(108, 196, 255, .9), 0 0 14px rgba(108, 196, 255, .5);
}
@keyframes aguarde-gira { to { transform: rotate(360deg); } }
@keyframes aguarde-faisca { 0% { opacity: 1; } 33.3% { opacity: 0; } 100% { opacity: 0; } }
@keyframes aguarde-entra { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .aguarde-raio { animation: aguarde-gira 3s linear infinite; }
  .aguarde-raio-2, .aguarde-raio-3 { display: none; }
}

/* ---------- dica do número da nota ---------- */
.dica-nota { --bs-tooltip-max-width: 340px; }
.dica-nota .tooltip-inner { font-size: .8rem; line-height: 1.45; padding: 6px 9px; }
.dica-nota .dica-titulo { font-weight: 700; border-bottom: 1px solid #c4a000; margin-bottom: 3px; padding-bottom: 2px; }
.dica-nota .dica-equipes { list-style: none; margin: 1px 0 2px; padding-left: 8px; }
.dica-nota .dica-equipes li i { display: inline-block; width: 9px; height: 9px; margin-right: 5px; vertical-align: 0; background: var(--tipo-forte); border-left: 3px solid var(--tipo-borda); }
.dica-nota .dica-equipes li span { color: #555; }
.dica-nota .dica-equipes li.resp { font-weight: 700; }

/* ---------- botão "Limpar filtros" ---------- */
.btn-limpar { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; }
.btn.btn-limpar:not(.disabled) {
  color: #a40000; border-color: #cc0000;
  background: linear-gradient(180deg, #fff4ec, #fcd9c4);
}
.btn.btn-limpar:not(.disabled) .bi-funnel-fill { color: #f57900; }
.btn-limpar-x { color: #cc0000; font-size: .7rem; margin-left: -9px; margin-top: 9px; filter: drop-shadow(0 0 1px #fff); }
.btn-limpar-qtd { background: #cc0000; color: #fff; border-radius: 9px; padding: 0 6px; font-size: .72rem; line-height: 1.35; }
.btn.btn-limpar:not(.disabled):hover { background: linear-gradient(180deg, #ef5555, #cc0000); color: #fff; border-color: #8f0000; }
.btn.btn-limpar:not(.disabled):hover i { color: #fff; }
.btn.btn-limpar:not(.disabled):hover .btn-limpar-qtd { background: #fff; color: #cc0000; }
.btn-limpar.disabled { font-weight: 400; opacity: .6; }

/* ---------- Programar: calendário ---------- */
.prog-execucao { --prog-cor: #3465a4; --prog-fundo: #dde8f6; }
.prog-preparacao { --prog-cor: #ce5c00; --prog-fundo: #fde6d2; }
.prog-mista { --prog-cor: #75507b; --prog-fundo: #ece0ef; }
[data-theme="dark"] .prog-execucao { --prog-cor: #729fcf; --prog-fundo: rgba(52,101,164,.3); }
[data-theme="dark"] .prog-preparacao { --prog-cor: #fcaf3e; --prog-fundo: rgba(245,121,0,.25); }
[data-theme="dark"] .prog-mista { --prog-cor: #ad7fa8; --prog-fundo: rgba(117,80,123,.35); }
.badge.prog-tipo { background: var(--prog-fundo); color: var(--prog-cor); border: 1px solid var(--prog-cor); font-weight: 700; border-radius: 2px; }

.tela-programar .janela-corpo { padding: 8px 10px; display: flex; flex-direction: column; }
.agenda-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.agenda-barra .btn-group .btn { border-radius: 0; }
.agenda-barra .btn-group .btn:first-child { border-radius: 3px 0 0 3px; }
.agenda-barra .btn-group .btn:last-child { border-radius: 0 3px 3px 0; }
.agenda-barra .btn.active { background: linear-gradient(180deg, var(--sel-1), var(--sel-2)); color: #fff; border-color: var(--sel-borda); }
.agenda-titulo { font-size: 1.05rem; margin: 0 6px; min-width: 190px; }
.agenda-legenda { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .78rem; align-items: center; }
.agenda-legenda i { display: inline-block; width: 12px; height: 12px; margin-right: 4px; vertical-align: -2px; background: var(--prog-fundo); border-left: 4px solid var(--prog-cor); }

.agenda {
  display: flex; flex-direction: column; flex: 1; min-height: 440px; height: calc(100vh - 200px);
  border: 1px solid var(--borda); background: var(--surface); overflow: auto;
}
.agenda-cab, .agenda-semana { display: grid; grid-template-columns: repeat(7, minmax(110px, 1fr)); min-width: 780px; }
.agenda-cab > div {
  text-align: center; font-weight: 700; padding: 4px; border-right: 1px solid var(--borda-clara);
  background: linear-gradient(180deg, var(--botao-1), var(--botao-2)); border-bottom: 1px solid var(--borda);
}
.agenda-semana { flex: 1; min-height: 96px; }
.agenda-dia {
  border-right: 1px solid var(--grid); border-bottom: 1px solid var(--grid); padding: 3px 4px;
  display: flex; flex-direction: column; min-width: 0; min-height: 0; cursor: pointer; position: relative;
}
.agenda-dia:hover { background: rgba(78, 127, 194, .07); }
.agenda-dia:focus-visible, .agenda-dia.escolhido { outline: 2px solid var(--sel-2); outline-offset: -2px; background: rgba(78, 127, 194, .1); }
.agenda-dia.fds { background: var(--surface-2); }
.agenda-dia.fora { opacity: .5; }
.agenda-num { font-weight: 700; font-size: .8rem; color: var(--ink-2); margin-bottom: 2px; }
.agenda-num small { font-weight: 400; color: var(--muted); }
.agenda-dia.hoje .agenda-num { color: #fff; }
.agenda-dia.hoje .agenda-num::before { content: ""; }
.agenda-dia.hoje .agenda-num { display: inline-block; align-self: flex-start; background: #3465a4; border-radius: 10px; padding: 0 7px; }
.agenda-eventos { overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 2px; min-height: 0; }
.agenda-ev {
  display: grid; grid-template-columns: auto auto 1fr auto; gap: 4px; align-items: center; width: 100%;
  font-size: .72rem; line-height: 1.25; text-align: left; padding: 1px 4px; border: 0; border-left: 3px solid var(--prog-cor);
  background: var(--prog-fundo); color: var(--ink); border-radius: 2px; cursor: pointer; white-space: nowrap; overflow: hidden;
}
.agenda-ev:hover { filter: brightness(.95); box-shadow: 0 0 0 1px var(--prog-cor); }
.agenda-ev .ev-hora { color: var(--prog-cor); font-weight: 700; font-variant-numeric: tabular-nums; }
.agenda-ev .ev-nota { font-weight: 700; }
.agenda-ev .ev-local { overflow: hidden; text-overflow: ellipsis; }
.agenda-ev .ev-eq { color: var(--muted); }
.agenda-ev .ev-eq i { margin-right: 1px; }
/* visões mais longas: dias menores, eventos mais compactos */
.agenda-visao-mes .agenda-semana, .agenda-visao-3 .agenda-semana { min-height: 84px; }
.agenda-visao-mes .agenda-ev .ev-local, .agenda-visao-3 .agenda-ev .ev-local { display: none; }

/* ---------- Programar: painel lateral ---------- */
.painel-programar { --bs-offcanvas-width: min(600px, 100vw); background: var(--gtk-bg); color: var(--ink); border-left: 1px solid var(--titulo-borda); }
.painel-programar .janela-titulo { border-radius: 0; height: 28px; }
.painel-programar .offcanvas-body { padding: 10px 12px; }
.painel-secao { font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-2); border-bottom: 1px solid var(--borda-clara); margin: 4px 0 6px; padding-bottom: 2px; }
.prog-item {
  display: flex; flex-direction: column; width: 100%; text-align: left; font-size: .8rem; margin-bottom: 4px;
  padding: 4px 8px; background: var(--prog-fundo); border: 1px solid transparent; border-left: 4px solid var(--prog-cor); border-radius: 2px; color: var(--ink);
}
.prog-item:hover { border-color: var(--prog-cor); }
.prog-item-hora { font-weight: 700; color: var(--prog-cor); }
.prog-item-equipes { color: var(--ink-2); }
.lista-notas { max-height: calc(100vh - 330px); min-height: 180px; overflow-y: auto; background: var(--surface); border: 1px solid var(--borda); }
.nota-opcao {
  display: grid; grid-template-columns: 104px 1fr auto auto; gap: 8px; align-items: center; width: 100%;
  text-align: left; font-size: .8rem; padding: 5px 8px; border: 0; border-bottom: 1px solid var(--grid); background: transparent; color: var(--ink);
}
.nota-opcao:nth-child(even) { background: var(--surface-2); }
.nota-opcao:hover { background: linear-gradient(180deg, var(--sel-1), var(--sel-2)); color: #fff; }
.nota-opcao:hover .text-muted { color: #eef !important; }
.nota-opcao[hidden] { display: none; }
.nota-num { font-weight: 700; font-variant-numeric: tabular-nums; }
.nota-us { font-variant-numeric: tabular-nums; white-space: nowrap; }
.prog-obra { background: var(--surface); border: 1px solid var(--borda); border-left: 4px solid #f57900; padding: 6px 10px; margin-bottom: 8px; }
.prog-obra-titulo { font-weight: 700; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.lista-equipes-painel { max-height: 330px; }
.lista-equipes-painel .equipe-marca { grid-template-columns: auto 84px 1fr; }
.equipe-opcao .papel { width: auto; min-height: 22px; padding: 0 22px 0 5px; font-size: .75rem; }
.equipe-opcao .papel:disabled { opacity: .35; }
/* equipe marcada em preparação: listras laranja sobre a cor do tipo */
.equipe-opcao.preparando { background-image: repeating-linear-gradient(-45deg, rgba(245, 121, 0, .16) 0 6px, transparent 6px 12px); }
.equipe-opcao.preparando .papel { border-color: #ce5c00; color: #ce5c00; font-weight: 700; }
@media (min-width: 1100px) {
  .painel-aberto .tela-programar .janela, .painel-aberto.tela-programar .janela { margin-right: min(600px, 45vw); transition: margin-right .15s ease; }
  .painel-aberto .painel-programar { --bs-offcanvas-width: min(600px, 45vw); }
}
.painel-programar { box-shadow: -4px 0 14px rgba(0, 0, 0, .35); }

/* ---------- Programar: dia dividido em Manhã e Tarde ---------- */
.agenda-dia { cursor: default; }
.agenda-turno {
  flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; cursor: pointer;
  padding: 1px 2px 2px; border-radius: 2px;
}
.agenda-turno + .agenda-turno { border-top: 1px dashed var(--borda-clara); margin-top: 2px; padding-top: 2px; }
.turno-manha { background: rgba(252, 233, 79, .07); }
.turno-tarde { background: rgba(52, 101, 164, .04); }
.turno-rotulo { font-size: .66rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); line-height: 1.3; user-select: none; }
.turno-manha .turno-rotulo i { color: #c4a000; }
.turno-tarde .turno-rotulo i { color: #ce5c00; }
.agenda-turno:hover { background: rgba(78, 127, 194, .1); }
.agenda-turno.escolhido { outline: 2px solid var(--sel-2); outline-offset: -1px; background: rgba(78, 127, 194, .14); }
.agenda-dia.escolhido { outline-width: 1px; }
.agenda-visao-mes .turno-rotulo, .agenda-visao-3 .turno-rotulo { font-size: .6rem; }

/* ---------- Programar: cartão compacto (visões de 1 e 2 semanas); o completo aparece na dica ---------- */
.agenda-card {
  display: block; width: 100%; text-align: left; cursor: pointer;
  font-size: .63rem; line-height: 1.3; color: var(--ink); padding: 2px 4px 3px; margin-bottom: 3px; min-width: 0; overflow: hidden;
  background: var(--prog-fundo); border: 1px solid transparent; border-left: 4px solid var(--prog-cor); border-radius: 2px;
}
.agenda-card:hover, .agenda-card:focus-visible { border-color: var(--prog-cor); box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
.agenda-card .card-topo { display: flex; flex-wrap: wrap; align-items: center; column-gap: 4px; white-space: nowrap; }
.agenda-card .ev-hora { font-weight: 700; color: var(--prog-cor); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.agenda-card .card-nota { font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.agenda-card .badge { margin-left: auto; font-size: .55rem; padding: 0 3px; flex-shrink: 0; }
.agenda-card .card-linha { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.agenda-card .card-linha i, .agenda-card .card-equipes i { color: var(--prog-cor); margin-right: 3px; font-size: .64rem; }
.agenda-card .sep { margin: 0 3px; color: var(--muted); }
.agenda-card .card-equipes { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin-top: 1px; max-height: 2.9em; overflow: hidden; }
.chip-eq { font-size: .58rem; padding: 0 3px; border: 1px solid var(--borda-clara); background: var(--surface); border-radius: 2px; line-height: 1.35; white-space: nowrap; }
.chip-eq.resp { font-weight: 700; border-color: var(--prog-cor); }
.chip-eq.prep { border-color: #ce5c00; color: #ce5c00; }
.chip-eq.mais { background: transparent; border-style: dashed; color: var(--muted); }
.dica-nota .dica-sub { padding-left: 8px; }

/* equipe já programada noutra obra no horário do card */
.equipe-opcao.ocupada { background-image: repeating-linear-gradient(45deg, rgba(204, 0, 0, .10) 0 5px, transparent 5px 10px); }
.equipe-ocupada { color: var(--critical); font-weight: 700; font-size: .7rem; }

/* ---------- janela de mensagem centralizada ---------- */
.dialogo .modal-dialog { max-width: 460px; }
.dialogo-corpo { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px 12px; }
.dialogo-icone { font-size: 2.2rem; line-height: 1; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.dialogo[data-tipo="sucesso"] .dialogo-icone { color: #4e9a06; }
.dialogo[data-tipo="info"] .dialogo-icone, .dialogo[data-tipo="pergunta"] .dialogo-icone { color: #3465a4; }
.dialogo[data-tipo="aviso"] .dialogo-icone { color: #f57900; }
.dialogo[data-tipo="erro"] .dialogo-icone { color: #cc0000; }
.dialogo-texto { font-size: .85rem; padding-top: 4px; overflow-wrap: anywhere; }
.dialogo-texto li + li { margin-top: 4px; }

/* formulários de cadastro/edição sempre centralizados na janela */
.form-centro { max-width: 860px; margin: 24px auto; }
.form-centro-estreito { max-width: 560px; }
@media (max-width: 767.98px) { .form-centro { margin: 0 auto; } }

.caixa-preparacao {
  display: flex; gap: 8px; align-items: flex-start; font-size: .8rem; cursor: pointer; margin: 0;
  padding: 6px 8px; border: 1px dashed #ce5c00; background: rgba(245, 121, 0, .07); border-radius: 2px;
}
.caixa-preparacao .form-check-input { margin-top: 2px; flex-shrink: 0; }
.caixa-preparacao:has(input:checked) { border-style: solid; background: rgba(245, 121, 0, .16); }

/* programação com a mesma equipe em outro lugar no mesmo horário */
.agenda-card.em-choque, .agenda-ev.em-choque { box-shadow: 0 0 0 2px var(--critical); }
.card-choque { color: var(--critical); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- programação cancelada ---------- */
.prog-cancelada { --prog-cor: #888a85; --prog-fundo: #eeeeec; }
[data-theme="dark"] .prog-cancelada { --prog-cor: #babdb6; --prog-fundo: rgba(136, 138, 133, .25); }
.agenda-card.prog-cancelada, .agenda-ev.prog-cancelada { opacity: .75; }
.agenda-card.prog-cancelada .card-nota, .agenda-card.prog-cancelada .ev-hora, .agenda-ev.prog-cancelada .ev-nota { text-decoration: line-through; }
.card-cancelada { color: var(--ink-2); font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dica-nota .dica-cancelada { font-weight: 700; color: #a40000; }
.card-wrap { position: relative; }
.card-wrap .agenda-card { padding-right: 20px; }
.card-cancelar {
  position: absolute; top: 1px; right: 1px; width: 17px; height: 17px; display: grid; place-items: center;
  padding: 0; border: 1px solid transparent; border-radius: 2px; background: transparent; color: var(--muted); font-size: .68rem; z-index: 1;
}
.card-cancelar:hover, .card-cancelar:focus-visible { background: #cc0000; border-color: #8f0000; color: #fff; }

/* tela de entrada: painéis GDM + versão e desenvolvedor abaixo do botão Entrar */
.login-tela { min-height: 100vh; display: flex; flex-direction: column; }
.login-tela .login-page { flex: 1 1 auto; min-height: 0; }
.login-painel { position: static; }
.login-painel .painel-marca { border-right: 0; }
.login-painel-base { margin-top: 0; }
.login-rodape {
  margin: 16px -20px -18px; padding: 12px 20px 14px; text-align: center; font-size: .74rem; color: var(--muted); line-height: 1.55;
  border-top: 1px solid var(--borda-clara); background: linear-gradient(180deg, rgba(0,0,0,.03), rgba(0,0,0,.07));
}
.login-versao {
  display: inline-flex; align-items: center; gap: 5px; padding: 1px 10px; margin-bottom: 8px; border-radius: 10px;
  background: linear-gradient(180deg, var(--sel-1), var(--sel-2)); color: #fff; border: 1px solid var(--sel-borda);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35); font-size: .72rem;
}
.login-autor { display: flex; flex-direction: column; align-items: center; }
.login-autor-rotulo { text-transform: uppercase; letter-spacing: .08em; font-size: .64rem; }
.login-autor-nome { color: var(--ink); font-weight: 700; font-size: .8rem; }
.login-autor-nome i { color: #3465a4; }
.login-autor-email { color: #3465a4; text-decoration: none; }
.login-autor-email:hover { text-decoration: underline; }
[data-theme="dark"] .login-autor-nome i, [data-theme="dark"] .login-autor-email { color: #729fcf; }

/* ---------- obra fora da planilha (cadastro manual) ---------- */
.badge-manual { background: #fcaf3e; color: #3b2400; border: 1px solid #ce5c00; font-weight: 700; }
.obra-manual .obra-bloco { border: 1px solid var(--borda-clara); border-radius: 2px; padding: 6px 12px 12px; margin-bottom: 12px; background: var(--surface); }
.obra-manual .obra-bloco legend { float: none; width: auto; font-size: .8rem; font-weight: 700; padding: 0 6px; margin: 0; color: var(--ink-2); }
.obra-manual .obra-bloco legend i { color: #3465a4; }
.obra-equip { display: flex; flex-direction: column; gap: 6px; }
.obra-equip-linha { display: grid; grid-template-columns: 22px 1fr 1fr auto; gap: 6px; align-items: center; }
.obra-equip-limpar { padding: 2px 6px; }
.obra-equip-n { font-weight: 700; color: var(--muted); text-align: center; }
.errorlist { color: var(--critical); }
.btn-obra-manual { font-size: .75rem; text-transform: none; letter-spacing: normal; font-weight: 700; padding: 1px 8px; }

/* ---------- transferência de notas entre EAs ---------- */
.painel-sino { position: relative; padding: 0 10px; font-weight: 400; }
.painel-sino .bi { font-size: 1.1rem; color: var(--muted); }
.painel-sino.com-aviso .bi { color: #c4a000; animation: sino 1.2s ease-in-out 2; transform-origin: 50% 0; }
@keyframes sino { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(14deg); } 75% { transform: rotate(-14deg); } }
@media (prefers-reduced-motion: reduce) { .painel-sino.com-aviso .bi { animation: none; } }
.sino-qtd {
  position: absolute; top: 1px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: #cc0000; color: #fff; font-size: .62rem; font-weight: 700; line-height: 16px; text-align: center;
}
.transf-item { border: 1px solid var(--borda-clara); border-left: 4px solid var(--transf-cor, #3465a4); border-radius: 2px; padding: 10px 12px; background: var(--surface); }
.transf-item + .transf-item { margin-top: 8px; }
.transf-pendente { --transf-cor: #f57900; }
.transf-aceita { --transf-cor: #4e9a06; }
.transf-recusada { --transf-cor: #cc0000; }
.transf-cancelada { --transf-cor: #888a85; opacity: .8; }
.transf-rota { font-weight: 700; }
.transf-rota .bi { color: var(--muted); margin: 0 4px; }
.transf-msg { margin: 6px 0 0; padding: 6px 10px; background: rgba(52, 101, 164, .07); border-left: 3px solid #3465a4; font-style: italic; }
.transf-resp { margin: 6px 0 0; padding: 6px 10px; background: rgba(0, 0, 0, .04); border-left: 3px solid var(--transf-cor); }
.status-pendente { background: #fcaf3e; color: #3b2400; }
.status-aceita { background: #4e9a06; color: #fff; }
.status-recusada { background: #cc0000; color: #fff; }
.status-cancelada { background: #888a85; color: #fff; }
.aviso-transferencia { border-left: 4px solid #f57900; }
/* celular: o relógio do painel mostra só a hora (data inteira não cabe ao lado do Menu e do sino) */
@media (max-width: 575.98px) {
  #relogio { font-size: 0; padding: 0 6px; }
  #relogio::after { content: attr(data-hora); font-size: .85rem; }
  .painel-sino { padding: 0 6px; }
}

/* ---------- card da programação: blocos na ordem da planilha ---------- */
.prog-bloco { border: 1px solid var(--borda-clara); border-radius: 2px; padding: 6px 8px 8px; margin-bottom: 8px; background: var(--surface); }
.prog-passo {
  display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; margin-right: 4px;
  background: #3465a4; color: #fff; font-size: .68rem; font-weight: 700;
}
.selo-apoio { display: none; font-size: .72rem; font-weight: 700; color: #204a87; background: #dbe6f4; border: 1px solid #729fcf; padding: 0 5px; border-radius: 2px; white-space: nowrap; }
.equipe-opcao.apoio .selo-apoio { display: inline-block; }
.notas-escolhidas { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; min-height: 4px; }
.nota-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 4px 1px 8px; border: 1px solid var(--borda); border-radius: 12px;
  background: var(--surface); font-size: .78rem;
}
.nota-chip small { color: var(--muted); }
.nota-chip.principal { border-color: #c4a000; background: #fffbd6; }
.nota-chip.principal::before { content: "★"; color: #c4a000; }
.nota-chip-x { border: 0; background: transparent; color: var(--muted); font-size: 1rem; line-height: 1; padding: 0 3px; }
.nota-chip-x:hover { color: #cc0000; }
[data-theme="dark"] .nota-chip.principal { background: rgba(252, 233, 79, .15); }

/* ---------- Programar: grade por equipe (formato da planilha de programação) ---------- */
.grade-wrap {
  height: calc(100vh - 200px); min-height: 440px; overflow: auto; border: 1px solid var(--borda); background: var(--surface);
  --g-eq: 132px; --g-turno: 26px; --g-dados: 80px; --g-linha: 1.3em;
}
.grade { border-collapse: separate; border-spacing: 0; font-size: .68rem; min-width: 100%; }
.grade th, .grade td { border-right: 1px solid var(--borda-clara); border-bottom: 1px solid var(--borda-clara); padding: 2px 4px; vertical-align: top; }
.grade thead th {
  position: sticky; top: 0; z-index: 3; background: linear-gradient(180deg, var(--painel-1), var(--painel-2));
  text-align: center; font-weight: 700; vertical-align: middle; border-bottom: 1px solid var(--borda);
}
.grade .g-dia { min-width: 190px; }
.grade .g-dia.hoje { background: linear-gradient(180deg, var(--sel-1), var(--sel-2)); color: var(--sel-ink); }
.g-data, .g-semana { display: block; line-height: 1.25; }
.g-semana { font-weight: 400; }
/* colunas fixas à esquerda: Equipe, Turno e Dados */
.grade .g-eq, .grade .g-turno, .grade .g-dados, .grade .g-sit-rot { position: sticky; z-index: 2; background: var(--surface-2, #efebe7); }
.grade .g-eq { left: 0; width: var(--g-eq); min-width: var(--g-eq); max-width: var(--g-eq); }
.grade .g-turno { left: var(--g-eq); width: var(--g-turno); min-width: var(--g-turno); text-align: center; vertical-align: middle; font-weight: 700; }
.grade .g-dados { left: calc(var(--g-eq) + var(--g-turno)); width: var(--g-dados); min-width: var(--g-dados); text-align: right; color: var(--muted); border-right: 2px solid var(--borda); }
.grade .g-sit-rot { left: var(--g-eq); text-align: right; font-weight: 700; border-right: 2px solid var(--borda); }
.grade thead .g-eq, .grade thead .g-turno, .grade thead .g-dados { z-index: 4; }
.grade tbody .g-eq { vertical-align: middle; text-align: center; border-bottom: 2px solid var(--borda); }
.g-eq-cod { display: block; font-size: .9rem; font-weight: 700; color: var(--ink-strong); }
.g-eq-enc { display: block; font-weight: 700; }
.g-eq-tipo { display: block; color: var(--muted); }
.g-dados span, .g-prog span { display: block; line-height: var(--g-linha); height: var(--g-linha); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* célula do dia */
.g-cel { cursor: pointer; min-width: 190px; max-width: 240px; background: var(--surface); }
.g-cel.fds { background: rgba(0, 0, 0, .025); }
.g-cel.hoje { background: rgba(78, 127, 194, .06); }
.g-cel:hover { background: rgba(78, 127, 194, .12); }
.g-cel.escolhida { outline: 2px solid var(--sel-2); outline-offset: -2px; }
.g-prog, .g-apoio {
  display: block; width: 100%; text-align: center; font: inherit; color: var(--ink); cursor: pointer; border-radius: 2px;
  background: var(--prog-fundo); border: 1px solid transparent; border-left: 4px solid var(--prog-cor); padding: 0 3px;
}
.g-prog + .g-prog, .g-prog + .g-apoio, .g-apoio + .g-prog, .g-apoio + .g-apoio { margin-top: 3px; }
.g-prog:hover, .g-apoio:hover { border-color: var(--prog-cor); box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
.g-prog .g-hora { font-weight: 700; color: var(--prog-cor); }
.g-prog .g-nota, .g-prog .g-status { font-weight: 700; }
.g-apoio { font-weight: 700; padding: 6px 4px; white-space: normal; border-left-style: dashed; }
.g-prog.em-choque { box-shadow: 0 0 0 2px var(--critical); }
/* folga / indisponível */
.g-cel.g-folga { background: repeating-linear-gradient(45deg, rgba(204, 0, 0, .14) 0 6px, rgba(204, 0, 0, .06) 6px 12px); }
.g-folga-txt { text-align: center; font-weight: 700; color: #a40000; letter-spacing: .06em; padding: 8px 0; }
[data-theme="dark"] .g-folga-txt { color: #ef2929; }
/* linha Situação e separação entre equipes */
.g-linha-sit td { background: var(--surface-2, #efebe7); font-weight: 700; text-align: center; border-bottom: 2px solid var(--borda); }
.g-linha.g-tarde td { border-bottom-style: dashed; }
.celula-cab { padding: 4px 0 8px; margin-bottom: 8px; border-bottom: 1px solid var(--borda-clara); }
.celula-folga summary { cursor: pointer; font-weight: 700; font-size: .85rem; }

/* ---------- cadastro de usuário: quadro de equipes do programador ---------- */
.quadro-equipes { border: 1px solid var(--borda-clara); border-radius: 2px; padding: 8px 12px 12px; background: var(--surface); }
.quadro-equipes legend { float: none; width: auto; font-size: .9rem; font-weight: 700; padding: 0 6px; margin: 0; }
.quadro-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; max-height: 420px; overflow: auto; }
.quadro-item {
  display: flex; gap: 6px; align-items: flex-start; padding: 5px 8px; border: 1px solid var(--borda-clara); border-radius: 2px;
  cursor: pointer; font-size: .78rem; background: var(--surface); margin: 0;
}
.quadro-item[hidden] { display: none; }
.quadro-item:hover { border-color: #3465a4; }
.quadro-item.marcada { background: #dde8f6; border-color: #3465a4; }
[data-theme="dark"] .quadro-item.marcada { background: rgba(52, 101, 164, .3); }
.quadro-item .form-check-input { margin-top: 2px; flex-shrink: 0; }
.quadro-cod { font-weight: 700; white-space: nowrap; min-width: 64px; }
.quadro-info small { color: var(--muted); }
.quadro-item.tem-dono { cursor: not-allowed; opacity: .65; background: repeating-linear-gradient(45deg, rgba(0, 0, 0, .03) 0 6px, transparent 6px 12px); }
.quadro-dono { color: #a40000 !important; font-weight: 700; }

/* equipe emprestada para outra EA */
.g-cel.g-emprestada { background: repeating-linear-gradient(45deg, rgba(52, 101, 164, .14) 0 6px, rgba(52, 101, 164, .05) 6px 12px); }
.g-cel.g-emprestada .g-folga-txt { color: #204a87; }
.g-cel.g-fora { background: repeating-linear-gradient(45deg, rgba(0, 0, 0, .05) 0 6px, transparent 6px 12px); cursor: not-allowed; }
.g-fora-txt { text-align: center; color: var(--muted); padding: 8px 0; }
[data-theme="dark"] .g-cel.g-emprestada .g-folga-txt { color: #729fcf; }

/* ---------- previsão do tempo: solta sobre a área de trabalho (sem janela nem cartões) ---------- */
.clima-solto {
  position: absolute; top: 6px; right: 18px; width: 390px; max-height: calc(100% - 12px); display: flex; flex-direction: column;
  color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .85); z-index: 2;
}
.clima-titulo { font-size: .95rem; font-weight: 700; margin: 0 0 4px; color: #fff; }
.clima-titulo .bi { color: #fce94f; }
.clima-abas { display: flex; gap: 14px; margin-bottom: 4px; }
.clima-aba { background: none; border: 0; padding: 0 0 2px; color: rgba(255, 255, 255, .7); font: inherit; font-size: .85rem; text-shadow: inherit; border-bottom: 2px solid transparent; }
.clima-aba:hover { color: #fff; }
.clima-aba.ativa { color: #fff; font-weight: 700; border-bottom-color: #fce94f; }
.clima-corpo { overflow: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .4) transparent; }
.clima-dias { list-style: none; margin: 0; padding: 0; }
.clima-dia { padding: 5px 0 6px 10px; border-left: 4px solid #8ae234; border-bottom: 1px solid rgba(255, 255, 255, .18); font-size: .8rem; }
.clima-dia.nivel-atencao { border-left-color: #fcaf3e; }
.clima-dia.nivel-critico { border-left-color: #fce94f; }
.clima-dia.hoje .clima-data b { color: #fce94f; }
.clima-linha { display: flex; align-items: center; gap: 7px; }
.clima-data { min-width: 64px; text-transform: capitalize; }
.clima-icone { font-size: 1.45rem; color: #fff; }
.nivel-critico .clima-icone { color: #fce94f; }
.clima-desc { flex: 1; }
.clima-temp b { font-size: 1.05rem; }
.clima-temp small { color: rgba(255, 255, 255, .75); font-weight: 700; }
.clima-medidas { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; margin-top: 1px; color: rgba(255, 255, 255, .9); font-size: .76rem; }
.clima-medidas > span { white-space: nowrap; }
.clima-turnos { display: flex; gap: 5px; margin-top: 3px; flex-wrap: wrap; }
.clima-turno { border: 1px solid rgba(255, 255, 255, .45); border-radius: 10px; padding: 0 7px; background: rgba(0, 0, 0, .22); white-space: nowrap; font-size: .72rem; }
.clima-turno.nivel-atencao { border-color: #fcaf3e; color: #ffe0b3; }
.clima-turno.nivel-critico { border-color: #fce94f; color: #fce94f; font-weight: 700; }
.clima-alerta-ic { margin-left: 2px; }
.clima-alertas { list-style: none; margin: 3px 0 0; padding: 0; font-weight: 700; font-size: .75rem; }
.clima-alertas .nivel-critico { color: #fce94f; }
.clima-alertas .nivel-atencao { color: #ffd9a3; }
.clima-fonte { font-size: .68rem; color: rgba(255, 255, 255, .75); padding-top: 4px; }
.clima-fonte a { color: #fff; }
.clima-erro { padding: 12px 0; color: rgba(255, 255, 255, .85); }
.clima-solto .spinner-border { color: #fff; }
@media (max-width: 1199.98px) { .clima-solto { position: static; width: 100%; max-width: 520px; margin: 0 auto 16px; max-height: none; } }
/* cabeçalho do dia na grade */
.g-clima { display: block; font-weight: 400; font-size: .64rem; margin-top: 1px; }
.g-clima .bi { font-size: .8rem; }
.g-clima-t { display: inline-block; margin-left: 3px; padding: 0 3px; border-radius: 6px; background: #eef5e8; color: #2e5b04; font-weight: 700; }
.g-clima-t.nivel-atencao { background: #fdefd8; color: #8a4500; }
.g-clima-t.nivel-critico { background: #cc0000; color: #fff; }
.g-dia.hoje .g-clima-t { box-shadow: 0 0 0 1px rgba(255, 255, 255, .6); }
/* com o painel do tempo à direita, o logo centraliza no espaço que sobra */
@media (min-width: 1200px) { .desktop-vazio:has(.clima-solto) { padding-right: 420px; padding-left: 110px; } }
/* selo de risco do dia (sobre o fundo vermelho: amarelo sólido = alto risco) */
.clima-risco { margin-left: auto; padding: 0 7px; border-radius: 3px; font-size: .68rem; font-weight: 800; letter-spacing: .04em; white-space: nowrap; text-shadow: none; }
.risco-alto { background: #fce94f; color: #7a0000; box-shadow: 0 0 0 1px #7a0000, 0 1px 4px rgba(0, 0, 0, .5); animation: risco-pisca 1.6s ease-in-out 3; }
.risco-moderado { background: rgba(0, 0, 0, .3); color: #fcaf3e; border: 1px solid #fcaf3e; }
@keyframes risco-pisca { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .risco-alto { animation: none; } }
.clima-dia.nivel-critico { border-left-width: 6px; background: linear-gradient(90deg, rgba(0, 0, 0, .28), rgba(0, 0, 0, .08)); }
.clima-dia.nivel-critico .clima-data b, .clima-dia.nivel-critico .clima-desc { color: #fce94f; font-weight: 700; }
/* grade do Programar: dia de alto risco no cabeçalho */
.g-clima.nivel-critico::after { content: "ALTO RISCO"; display: block; margin: 1px auto 0; width: max-content; padding: 0 5px; border-radius: 3px; background: #cc0000; color: #fff; font-weight: 800; font-size: .6rem; letter-spacing: .04em; }
.g-risco { color: #cc0000; }

/* tela de entrada: campos arredondados com ícone da função na frente */
.login-campo { border-radius: 10px; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .08); }
.login-campo > .input-group-text, .login-campo > .form-control, .login-campo > .btn { border-color: #b5b0a8; }
.login-campo > :first-child { border-radius: 10px 0 0 10px !important; }
.login-campo > :last-child { border-radius: 0 10px 10px 0 !important; }
.login-campo > .input-group-text { background: #f3f1ee; color: #3465a4; min-width: 40px; justify-content: center; font-size: 1rem; }
.login-campo > .form-control { border-left: 0; }
.login-campo > .form-control::placeholder { color: #a8a39c; }
.login-campo > .btn { background: #fff; border-left: 0; color: #555753; }
.login-campo:focus-within { box-shadow: 0 0 0 3px rgba(52, 101, 164, .25); }
.login-campo:focus-within > .input-group-text, .login-campo:focus-within > .form-control, .login-campo:focus-within > .btn { border-color: #3465a4; }
.login-campo:focus-within > .input-group-text { color: #204a87; background: #e3ecf7; }
.login-campo > .form-control:focus { box-shadow: none; }
[data-theme="dark"] .login-campo > .input-group-text { background: #3a3935; color: #729fcf; }
[data-theme="dark"] .login-campo > .btn { background: var(--surface); }

/* tabela com barra de título (dashboard) */
.tabela-titulada { border: 1px solid var(--borda); border-radius: 2px; overflow: hidden; }
.tabela-titulo {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 5px 10px; font-weight: 700; font-size: .85rem;
  color: #fff; background: linear-gradient(180deg, #5b86c5, #3465a4); text-shadow: 0 1px 1px rgba(0, 0, 0, .35);
}
.tabela-legenda { margin-left: auto; display: flex; gap: 10px; font-weight: 700; font-size: .75rem; text-shadow: none; }
.tabela-legenda span { background: #fff; border-radius: 10px; padding: 0 8px; }

/* "Marcar folga / indisponível / outra EA": botão [+]/[−] como numa árvore, em vez da setinha */
.celula-folga > summary {
  list-style: none; display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid #c4a000;
  border-radius: 3px; background: linear-gradient(180deg, #fffbe0, #fcefb4); user-select: none;
}
.celula-folga > summary::-webkit-details-marker { display: none; }
/* o + / − é desenhado com duas barras no centro exato da caixa (não depende da fonte) */
.celula-folga > summary::before {
  --cor: #204a87; --fundo: #fff;
  content: ""; width: 22px; height: 22px; flex-shrink: 0; box-sizing: border-box;
  border: 2px solid #204a87; border-radius: 3px; box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
  background:
    linear-gradient(var(--cor), var(--cor)) center / 10px 2px no-repeat,
    linear-gradient(var(--cor), var(--cor)) center / 2px 10px no-repeat,
    var(--fundo);
}
.celula-folga[open] > summary::before {
  --cor: #fff; --fundo: #204a87;
  background: linear-gradient(var(--cor), var(--cor)) center / 10px 2px no-repeat, var(--fundo);
}
.celula-folga > summary:hover { background: linear-gradient(180deg, #fff6c2, #fce94f); }
.celula-folga > summary:hover::before { --fundo: #dbe6f4; }
.celula-folga[open] > summary:hover::before { --fundo: #3465a4; }
.celula-folga > summary:focus-visible { outline: 2px solid #3465a4; outline-offset: 2px; }
.celula-folga[open] > summary { border-radius: 3px 3px 0 0; }
.celula-folga[open] > form { border: 1px solid #c4a000; border-top: 0; border-radius: 0 0 3px 3px; padding: 8px 10px 10px; margin: 0 !important; background: var(--surface); }
[data-theme="dark"] .celula-folga > summary { background: rgba(252, 233, 79, .12); }
/* Turno (MANHÃ/TARDE) na vertical, lido de baixo para cima: coluna estreita */
.grade tbody .g-turno { padding: 2px 0; letter-spacing: .12em; font-size: .66rem; }
.grade tbody .g-turno span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; display: inline-block; }
.grade thead .g-turno { padding: 2px 0; font-size: .62rem; }
.grade thead .g-turno span { writing-mode: vertical-rl; transform: rotate(180deg); display: inline-block; }

/* ---------- Cadastros do CCM: quatro quadros numa página ---------- */
.ccm-quadros { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 12px; }
@media (max-width: 575.98px) { .ccm-quadros { grid-template-columns: 1fr; } }
.ccm-quadro { margin: 0; display: flex; flex-direction: column; }
.ccm-quadro .card-title { font-size: .9rem; }
.ccm-lista { max-height: 340px; overflow: auto; }
.ccm-lista thead th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); }


/* item de menu com subtítulo (ex.: Cadastros do CCM / Situações, Bases, Tipos e Subtipos) */
.menu-gnome .item-duplo { align-items: center; }
.menu-gnome .item-duplo > span { display: flex; flex-direction: column; line-height: 1.2; }
.menu-gnome .item-duplo small { font-size: .72rem; color: var(--muted); font-weight: 400; }
.menu-gnome .item-duplo:hover small, .menu-gnome .item-duplo:focus small, .menu-gnome .item-duplo.active small { color: rgba(255, 255, 255, .85); }

/* ================= Dashboard executivo: cada quadro responde uma pergunta ================= */
:root { --x-bom: #4e9a06; --x-bom-claro: #b9dd96; --x-ruim: #cc0000; --x-ruim-claro: #f2b8b5; --x-atencao: #ce5c00; --x-trilho: #eceae6; }
[data-theme="dark"] { --x-bom: #8ae234; --x-bom-claro: #3f6b1d; --x-ruim: #ef2929; --x-ruim-claro: #6b2626; --x-atencao: #fcaf3e; --x-trilho: #3a3935; }

/* ---- KPIs ---- */
.xk { padding: 12px 14px 14px; height: 100%; border-top: 4px solid var(--xk-cor, #3465a4); }
.xk-bom { --xk-cor: var(--x-bom); } .xk-ruim { --xk-cor: var(--x-ruim); } .xk-atencao { --xk-cor: var(--x-atencao); } .xk-neutro { --xk-cor: #3465a4; }
.xk-cab { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ink-2); font-size: .82rem; }
.xk-cab > .bi { color: var(--xk-cor); font-size: 1.1rem; }
.xk-chip { margin-left: auto; font-size: .68rem; font-weight: 700; padding: 1px 8px; border-radius: 10px; color: #fff; background: var(--xk-cor); white-space: nowrap; text-decoration: none; }
.xk-chip-alerta { background: var(--x-ruim); color: #fff !important; }
.xk-valor { font-size: clamp(1.7rem, 1.2rem + 1.2vw, 2.3rem); font-weight: 700; line-height: 1.1; margin: 8px 0 2px; color: var(--ink-strong); letter-spacing: -.01em; }
.xk-valor small { font-size: .55em; color: var(--muted); font-weight: 700; }
.xk-sub { font-size: .8rem; color: var(--muted); }
.xk-sub b { color: var(--ink); }
.xk-medidor { position: relative; display: flex; height: 10px; margin-top: 10px; border-radius: 5px; background: var(--x-trilho); overflow: visible; }
.xk-medidor > span { display: block; height: 100%; width: 0; background: var(--xk-cor); border-radius: 5px; transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.xk-medidor > .xk-excesso { background: repeating-linear-gradient(-45deg, var(--x-ruim) 0 5px, #a40000 5px 10px); border-radius: 0 5px 5px 0; }
.xk-teto > span:first-child { background: var(--x-bom); }
.xk-ruim .xk-teto > span:first-child { border-radius: 5px 0 0 5px; background: var(--x-ruim-claro); }
.xk-meta { position: absolute; right: -1px; top: -4px; bottom: -4px; width: 3px; border-radius: 2px; background: var(--ink); opacity: .55; }
.xb-animar .xk-medidor > span { width: var(--w); }

/* ---- quadro com manchete ---- */
.xq { overflow: hidden; }
.xq-cab { padding: 12px 14px 8px; border-bottom: 1px solid var(--borda-clara); background: linear-gradient(180deg, var(--surface), var(--surface-2)); }
.xq-pergunta { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.xq-manchete { font-size: 1.12rem; font-weight: 700; margin: 3px 0 1px; color: var(--ink-strong); line-height: 1.25; }
.xq-manchete.xq-bom { color: var(--x-bom); } .xq-manchete.xq-ruim { color: var(--x-ruim); } .xq-manchete.xq-atencao { color: var(--x-atencao); }
.xq-detalhe { font-size: .8rem; color: var(--ink-2); }
.xq-legenda { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: .74rem; color: var(--ink-2); }
.xq-legenda i { display: inline-block; vertical-align: -1px; margin-right: 5px; }
.lg-ok { width: 14px; height: 10px; border-radius: 3px; background: var(--x-bom); }
.lg-acima { width: 14px; height: 10px; border-radius: 3px; background: repeating-linear-gradient(-45deg, var(--x-ruim) 0 3px, #a40000 3px 6px); }
.lg-meta { width: 3px; height: 14px; border-radius: 2px; background: var(--ink); }
.lg-proj { width: 14px; height: 3px; border-radius: 2px; background: var(--s2); vertical-align: 2px !important; }
.xq-corpo { padding: 10px 14px 12px; }
.xq-dica { font-size: .72rem; color: var(--muted); margin-top: 6px; }
.xq-tabela { margin-top: 10px; }
.xq-tabela summary { cursor: pointer; font-size: .78rem; font-weight: 700; color: var(--link); }
.xq-tabela[open] summary { margin-bottom: 6px; }

/* ---- barras horizontais HTML ---- */
.xb-lista { list-style: none; margin: 0; padding: 0; }
.xb-linha {
  display: grid; grid-template-columns: minmax(96px, 34%) 1fr auto 44px; gap: 8px; align-items: center;
  padding: 3px 6px; border-radius: 4px; color: var(--ink); text-decoration: none; font-size: .8rem;
}
a.xb-linha:hover { background: rgba(52, 101, 164, .09); color: var(--ink-strong); }
a.xb-linha:hover .xb-barra { filter: brightness(1.12); }
.xb-rotulo { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.xb-trilho { height: 14px; background: var(--x-trilho); border-radius: 7px; overflow: hidden; }
.xb-barra { display: block; height: 100%; width: 0; border-radius: 7px; background: linear-gradient(90deg, #729fcf, #3465a4); transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.xb-lider .xb-barra { background: linear-gradient(90deg, #5b86c5, #204a87); }
.xb-lider .xb-rotulo { font-weight: 700; }
.xb-animar .xb-barra { width: var(--w); }
.xb-valor { font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 86px; text-align: right; }
.xb-fatia { display: inline-block; min-width: 34px; margin-left: 4px; padding: 0 5px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--borda-clara); font-size: .7rem; text-align: center; color: var(--ink-2); }
.xb-lider .xb-fatia { background: #204a87; border-color: #204a87; color: #fff; }
.xb-qtd { font-size: .72rem; color: var(--muted); white-space: nowrap; text-align: right; }
.xb-mais { font-size: .72rem; color: var(--muted); padding: 2px 6px; }
.xp-titulo { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 10px 0 2px; }
.xp-titulo:first-child { margin-top: 0; }
.xq .xp-titulo + .xb-lista .xb-linha { grid-template-columns: minmax(80px, 30%) 1fr auto 40px; }

/* ---- CHI: discutido contra a meta (bullet chart) ---- */
.xc-lista { list-style: none; margin: 0; padding: 0; }
.xc-item { display: grid; grid-template-columns: minmax(110px, 22%) 1fr auto 86px; gap: 10px; align-items: center; padding: 5px 4px; border-bottom: 1px dashed var(--borda-clara); font-size: .82rem; }
.xc-item:last-child { border-bottom: 0; }
.xc-rotulo { text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.xc-trilho { position: relative; display: flex; height: 20px; background: var(--x-trilho); border-radius: 4px; }
.xc-barra, .xc-excesso { display: block; height: 100%; width: 0; transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.xc-barra { background: var(--x-bom); border-radius: 4px; }
.xc-acima .xc-barra { background: var(--x-ruim-claro); border-radius: 4px 0 0 4px; }
.xc-excesso { background: repeating-linear-gradient(-45deg, var(--x-ruim) 0 5px, #a40000 5px 10px); border-radius: 0 4px 4px 0; }
.xc-sem .xc-barra { background: #b8b4ae; }
.xb-animar .xc-barra, .xb-animar .xc-excesso { width: var(--w); }
.xc-meta { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1px; border-radius: 2px; background: var(--ink); box-shadow: 0 0 0 1px var(--surface); }
.xc-proj { position: absolute; left: 0; bottom: -6px; height: 3px; width: 0; border-radius: 2px; background: var(--s2); transition: width 1s .2s cubic-bezier(.2, .8, .2, 1); }
.xb-animar .xc-proj { width: var(--w); }
.xc-valor { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.xc-meta-txt { color: var(--muted); font-size: .76rem; }
.xc-selo { display: inline-block; min-width: 76px; text-align: center; padding: 1px 8px; border-radius: 10px; font-size: .74rem; font-weight: 700; background: var(--surface-2); color: var(--muted); border: 1px solid var(--borda-clara); }
.xc-selo-bom { background: #e4f3d6; color: #2e5b04; border-color: #8ae234; }
.xc-selo-ruim { background: var(--x-ruim); color: #fff; border-color: #8f0000; }
[data-theme="dark"] .xc-selo-bom { background: rgba(78, 154, 6, .25); color: #b5ec7c; }
@media (max-width: 575.98px) {
  .xc-item { grid-template-columns: 1fr auto; }
  .xc-rotulo { text-align: left; grid-column: 1 / -1; }
  .xc-trilho { grid-column: 1 / -1; }
  .xb-linha { grid-template-columns: 1fr auto; }
  .xb-rotulo { text-align: left; }
  .xb-trilho { grid-column: 1 / -1; order: 3; }
  .xb-qtd { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .xb-barra, .xc-barra, .xc-excesso, .xc-proj, .xk-medidor > span { transition: none; }
}

/* traco da meta = limite verde (com contorno para aparecer sobre barra verde ou vermelha) */
:root { --x-meta: #2e7d05; }
[data-theme="dark"] { --x-meta: #8ae234; }
.xc-meta { width: 4px; margin-left: -2px; background: var(--x-meta); box-shadow: 0 0 0 1.5px #fff, 0 1px 3px rgba(0, 0, 0, .35); }
.lg-meta { width: 4px; background: var(--x-meta); }
.xk-meta { background: var(--x-meta); opacity: 1; box-shadow: 0 0 0 1.5px #fff; }

.xq-alerta { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 3px 10px; border-radius: 12px; background: var(--x-ruim); color: #fff !important; font-size: .78rem; font-weight: 700; text-decoration: none; }
.xq-alerta:hover { background: #a40000; }
.lg-cor { width: 12px; height: 10px; border-radius: 3px; }

/* US/CAPEX acima da meta: verde ate o traco da meta, excedente em azul depois dele */
.xk-medidor > .xk-sobra { background: linear-gradient(90deg, #729fcf, #3465a4); border-radius: 0 5px 5px 0; }
.xk-bom .xk-medidor > span:first-child:not(:only-of-type) { border-radius: 5px 0 0 5px; }
.xk-medidor > .xk-meta { right: auto; margin-left: -2px; }
.xk-sobra-txt { color: #3465a4; font-weight: 700; }
[data-theme="dark"] .xk-sobra-txt { color: #729fcf; }

/* faixa de 4px nas cores do logo (azul -> laranja) no topo do painel: separa o navegador do sistema */
.painel-topo {
  padding-top: 4px;
  background:
    linear-gradient(90deg, #163f8c 0%, #2f6fd6 38%, #5b9bf0 52%, #f7a21b 70%, #f57900 85%, #e2470b 100%) top / 100% 4px no-repeat,
    linear-gradient(180deg, var(--painel-1), var(--painel-2));
}

/* ajuste da faixa: 1px escuro em cima (corta o navegador) + 5px so com os tons fortes do logo */
.painel-topo {
  padding-top: 6px;
  background:
    linear-gradient(#0d1f3c, #0d1f3c) top / 100% 1px no-repeat,
    linear-gradient(90deg, #163f8c 0%, #1f5fbf 40%, #e8690b 62%, #f57900 80%, #c2410a 100%) 0 1px / 100% 5px no-repeat,
    linear-gradient(180deg, var(--painel-1), var(--painel-2));
}

/* ================= área de trabalho: resumo do dia (centro) ================= */
.resumo { display: flex; flex-direction: column; align-items: center; gap: 14px; width: min(760px, 100%); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .7); }
.resumo-logo { width: min(400px, 70vw); }
.resumo-ola { font-size: 1.15rem; text-align: center; }
.resumo-ola span { color: rgba(255, 255, 255, .8); font-size: .95rem; }
.resumo-risco {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; border-radius: 8px; text-decoration: none; text-shadow: none;
  background: #fce94f; color: #5c0000; border: 2px solid #7a0000; box-shadow: 0 4px 14px rgba(0, 0, 0, .45);
}
.resumo-risco:hover { background: #fff3a0; color: #5c0000; }
.resumo-risco > .bi:first-child { font-size: 1.6rem; color: #cc0000; }
.resumo-risco small { color: #7a2a00; }
.resumo-risco > .bi:last-child { margin-left: auto; font-size: 1.2rem; }
.resumo-cartoes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; }
.resumo-cartao {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; column-gap: 10px; align-items: center;
  padding: 12px 14px; border-radius: 10px; text-decoration: none; color: #fff;
  background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25); transition: transform .15s ease, background .15s ease;
}
.resumo-cartao:hover { color: #fff; background: rgba(0, 0, 0, .42); transform: translateY(-2px); border-color: rgba(255, 255, 255, .5); }
.resumo-cartao > .bi { grid-row: 1 / 3; font-size: 1.6rem; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .92); text-shadow: none; }
.rc-azul > .bi { color: #3465a4; } .rc-laranja > .bi { color: #f57900; } .rc-roxo > .bi { color: #75507b; }
.rc-vermelho > .bi { color: #cc0000; } .rc-cinza > .bi { color: #888a85; }
.rc-valor { font-size: 1.9rem; font-weight: 700; line-height: 1; }
.rc-rotulo { font-size: .8rem; line-height: 1.2; }
.rc-sub { grid-column: 1 / -1; margin-top: 6px; font-size: .72rem; color: rgba(255, 255, 255, .78); }
.rc-cinza { opacity: .78; }
@media (max-width: 1500px) { .resumo-cartoes { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575.98px) { .resumo-cartoes { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .resumo-cartao { transition: none; } }

/* ================= previsão compacta: 2 linhas por dia, alertas no passar do mouse ================= */
.clima-dia { padding: 5px 0 5px 10px; }
.clima-linha { gap: 6px; }
.clima-linha .clima-risco { margin-left: 0; font-size: .62rem; padding: 0 5px; }
.clima-linha .clima-temp { margin-left: auto; white-space: nowrap; }
.clima-linha2 { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 8px; margin-top: 2px; font-size: .74rem; }
.clima-med { color: rgba(255, 255, 255, .9); white-space: nowrap; }
.clima-linha2 .clima-turno { font-size: .7rem; padding: 0 6px; }
.clima-linha2 .clima-med + .clima-turno { margin-left: auto; }

/* ---------- escolha do fundo da área de trabalho ---------- */
.fundo-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.fundo-op { display: flex; flex-direction: column; gap: 5px; cursor: pointer; margin: 0; position: relative; }
.fundo-op input { position: absolute; opacity: 0; pointer-events: none; }
.fundo-amostra {
  display: grid; place-items: center; height: 90px; border-radius: 8px; border: 3px solid transparent;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .25); color: #fff; transition: transform .12s ease;
}
.fundo-amostra-txt { font-weight: 700; font-size: 1.1rem; text-shadow: 0 1px 3px rgba(0, 0, 0, .9); }
.fundo-amostra-txt .bi { color: #fce94f; }
.fundo-amostra-img { background: var(--surface-2); color: var(--muted); border-style: dashed; border-color: var(--borda); }
.fundo-op:hover .fundo-amostra { transform: translateY(-2px); }
.fundo-op input:checked + .fundo-amostra { border-color: #3465a4; border-style: solid; box-shadow: 0 0 0 3px rgba(52, 101, 164, .35), 0 2px 6px rgba(0, 0, 0, .25); }
.fundo-op input:focus-visible + .fundo-amostra { outline: 2px solid #3465a4; outline-offset: 2px; }
.fundo-op input:disabled + .fundo-amostra { opacity: .6; cursor: default; }
.fundo-nome { font-size: .8rem; text-align: center; font-weight: 700; }
.fundo-op input:checked ~ .fundo-nome { color: #204a87; }
.fundo-op input:checked ~ .fundo-nome::before { content: "\2713\00a0"; }

/* legibilidade sobre qualquer fundo: sombra mais forte nos textos soltos da área de trabalho */
.fundo-com-veu .atalho, .fundo-com-veu .resumo, .fundo-com-veu .clima-solto { text-shadow: 0 1px 3px rgba(0, 0, 0, .95), 0 0 8px rgba(0, 0, 0, .5); }
.fundo-com-veu .resumo-cartao { background: rgba(0, 0, 0, .40); }

/* ================= pacotes de ícones (atalhos da área de trabalho, menus e painel) ================= */
.aparencia-sub { font-size: .95rem; font-weight: 700; margin-bottom: 8px; }
.pack-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.pack-op { display: flex; flex-direction: column; gap: 4px; cursor: pointer; margin: 0; position: relative; }
.pack-op input { position: absolute; opacity: 0; pointer-events: none; }
.pack-amostra {
  display: flex; justify-content: center; gap: 6px; padding: 12px 6px; border-radius: 8px; border: 3px solid transparent;
  background: var(--desktop); box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}
.pack-amostra .atalho { width: auto; padding: 0; gap: 0; }
.pack-amostra .atalho i { font-size: 1.5rem; }
.pack-op input:checked + .pack-amostra { border-color: #3465a4; box-shadow: 0 0 0 3px rgba(52, 101, 164, .35); }
.pack-op input:focus-visible + .pack-amostra { outline: 2px solid #3465a4; outline-offset: 2px; }
.pack-op input:checked ~ .fundo-nome { color: #204a87; }
.pack-op input:checked ~ .fundo-nome::before { content: "\2713\00a0"; }
.pack-desc { font-size: .72rem; color: var(--muted); text-align: center; }

/* cores de cada ícone, reaproveitadas pelos pacotes com "ladrilho" */
.icones-moderno, .icones-redondo, .icones-neon { --t-azul: #3465a4; --t-laranja: #f57900; --t-verde: #4e9a06; --t-vermelho: #cc0000; --t-roxo: #75507b; --t-marrom: #8f5902; --t-cinza: #555753; --t-amarelo: #c4a000; }
.icones-moderno .ic-azul, .icones-redondo .ic-azul { --t: var(--t-azul); }
.icones-moderno .ic-laranja, .icones-redondo .ic-laranja { --t: var(--t-laranja); }
.icones-moderno .ic-verde, .icones-redondo .ic-verde { --t: var(--t-verde); }
.icones-moderno .ic-vermelho, .icones-redondo .ic-vermelho { --t: var(--t-vermelho); }
.icones-moderno .ic-roxo, .icones-redondo .ic-roxo { --t: var(--t-roxo); }
.icones-moderno .ic-marrom, .icones-redondo .ic-marrom { --t: var(--t-marrom); }
.icones-moderno .ic-cinza, .icones-redondo .ic-cinza { --t: var(--t-cinza); }
.icones-moderno .ic-amarelo, .icones-redondo .ic-amarelo { --t: var(--t-amarelo); }

/* --- Moderno: branco em quadrado arredondado colorido --- */
.icones-moderno .atalhos .atalho i, .pack-amostra.icones-moderno .atalho i {
  display: grid; place-items: center; width: 56px; height: 56px; font-size: 1.7rem; border-radius: 14px; color: #fff !important;
  background: linear-gradient(160deg, color-mix(in srgb, var(--t, #3465a4) 70%, #fff), var(--t, #3465a4));
  box-shadow: 0 3px 8px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .35); filter: none;
}
.pack-amostra.icones-moderno .atalho i { width: 34px; height: 34px; font-size: 1.05rem; border-radius: 9px; }
.icones-moderno .dropdown-item .ic, .icones-moderno .painel-botao .ic {
  display: inline-grid; place-items: center; width: 24px; height: 24px; font-size: .85rem; border-radius: 6px; color: #fff !important;
  background: var(--t, #3465a4); filter: none;
}

/* --- Redondo: branco em círculo colorido com brilho --- */
.icones-redondo .atalhos .atalho i, .pack-amostra.icones-redondo .atalho i {
  display: grid; place-items: center; width: 56px; height: 56px; font-size: 1.6rem; border-radius: 50%; color: #fff !important;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--t, #3465a4) 55%, #fff) 0%, var(--t, #3465a4) 60%, color-mix(in srgb, var(--t, #3465a4) 70%, #000) 100%);
  box-shadow: 0 3px 8px rgba(0, 0, 0, .45), inset 0 -2px 4px rgba(0, 0, 0, .25); filter: none;
}
.pack-amostra.icones-redondo .atalho i { width: 34px; height: 34px; font-size: 1rem; }
.icones-redondo .dropdown-item .ic, .icones-redondo .painel-botao .ic {
  display: inline-grid; place-items: center; width: 24px; height: 24px; font-size: .8rem; border-radius: 50%; color: #fff !important;
  background: var(--t, #3465a4); filter: none;
}

/* --- Contorno: traço fino, uma cor só --- */
.icones-contorno .atalhos .atalho i, .pack-amostra.icones-contorno .atalho i { color: #fff !important; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .6)); }
.icones-contorno .dropdown-item .ic, .icones-contorno .painel-botao .ic { color: var(--ink-2) !important; filter: none; }
.icones-contorno .dropdown-item:hover .ic, .icones-contorno .dropdown-item:focus .ic { color: #fff !important; }

/* --- Neon: colorido com brilho luminoso --- */
.icones-neon .atalhos .atalho i.ic-azul, .pack-amostra.icones-neon .atalho i.ic-azul, .icones-neon .dropdown-item .ic-azul { color: #7fb8ff !important; --n: #3d8bff; }
.icones-neon .atalhos .atalho i.ic-laranja, .pack-amostra.icones-neon .atalho i.ic-laranja, .icones-neon .dropdown-item .ic-laranja { color: #ffb45e !important; --n: #ff8a00; }
.icones-neon .atalhos .atalho i.ic-verde, .pack-amostra.icones-neon .atalho i.ic-verde, .icones-neon .dropdown-item .ic-verde { color: #9cff6b !important; --n: #52e000; }
.icones-neon .atalhos .atalho i.ic-vermelho, .pack-amostra.icones-neon .atalho i.ic-vermelho, .icones-neon .dropdown-item .ic-vermelho { color: #ff8080 !important; --n: #ff2a2a; }
.icones-neon .atalhos .atalho i.ic-amarelo, .pack-amostra.icones-neon .atalho i.ic-amarelo, .icones-neon .dropdown-item .ic-amarelo { color: #fff38a !important; --n: #ffe100; }
.icones-neon .atalhos .atalho i, .pack-amostra.icones-neon .atalho i { filter: drop-shadow(0 0 4px var(--n, #7fb8ff)) drop-shadow(0 0 10px var(--n, #7fb8ff)); }
.icones-neon .atalhos .atalho { text-shadow: 0 0 6px rgba(0, 0, 0, .9), 0 0 10px rgba(127, 184, 255, .35); }
.icones-neon .dropdown-item .ic { filter: drop-shadow(0 0 3px var(--n, #7fb8ff)); }
@media (prefers-reduced-motion: reduce) { .icones-neon .atalhos .atalho i, .pack-amostra.icones-neon .atalho i { filter: drop-shadow(0 0 3px var(--n, #7fb8ff)); } }

/* --- Neon nos menus e no painel: "tubo" escuro com o traço luminoso (legível no menu claro) --- */
.icones-neon .ic-azul { --nc: #7fb8ff; --n: #3d8bff; }
.icones-neon .ic-laranja { --nc: #ffb45e; --n: #ff8a00; }
.icones-neon .ic-verde { --nc: #9cff6b; --n: #52e000; }
.icones-neon .ic-vermelho { --nc: #ff8080; --n: #ff2a2a; }
.icones-neon .ic-amarelo { --nc: #fff38a; --n: #ffe100; }
.icones-neon .ic-roxo { --nc: #e3a6ff; --n: #b44dff; }
.icones-neon .ic-marrom { --nc: #ffc98a; --n: #e07b00; }
.icones-neon .ic-cinza { --nc: #e4e8ee; --n: #aab4c3; }
.icones-neon .atalhos .atalho i.ic-roxo, .icones-neon .atalhos .atalho i.ic-marrom, .icones-neon .atalhos .atalho i.ic-cinza { color: var(--nc) !important; }
.icones-neon .dropdown-item .ic, .icones-neon .painel-botao .ic {
  display: inline-grid; place-items: center; width: 24px; height: 24px; font-size: .85rem; border-radius: 6px;
  background: #0d1321; color: var(--nc, #7fb8ff) !important; filter: none;
  text-shadow: 0 0 3px var(--n, #3d8bff), 0 0 7px var(--n, #3d8bff);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--n, #3d8bff) 60%, transparent), 0 0 6px color-mix(in srgb, var(--n, #3d8bff) 40%, transparent);
}

/* ================= avatar do usuário (foto ou iniciais) ================= */
.avatar {
  --av: #555753; display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; overflow: hidden;
  background: var(--av); color: #fff; font-weight: 700; font-size: .78rem; line-height: 1; letter-spacing: .02em; text-shadow: none;
  vertical-align: middle; user-select: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 1px 3px rgba(0, 0, 0, .3);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-xs { width: 22px; height: 22px; font-size: .58rem; box-shadow: 0 0 0 1px rgba(0, 0, 0, .18); }
.avatar-sm { width: 30px; height: 30px; font-size: .7rem; }
.avatar-md { width: 40px; height: 40px; font-size: .95rem; }
.avatar-xl { width: 96px; height: 96px; font-size: 2rem; box-shadow: 0 0 0 3px #fff, 0 2px 10px rgba(0, 0, 0, .3); }
.avatar-xl .bi { font-size: 2.6rem; }
.nome-avatar { display: inline-flex; align-items: center; gap: 10px; }
.painel-usuario { align-items: center; gap: 6px; }
.menu-usuario { display: flex; align-items: center; gap: 10px; }
.resumo-ola { display: flex; align-items: center; justify-content: center; gap: 12px; }
.resumo-ola > .avatar { color: #fff; font-size: .95rem; box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 2px 8px rgba(0, 0, 0, .45); }
.avatar-editor { display: flex; align-items: center; gap: 20px; padding: 14px 16px; margin-bottom: 8px; border: 1px dashed rgba(0, 0, 0, .2); border-radius: 10px; }
.avatar-editor-campos { flex: 1; min-width: 0; }
@media (max-width: 575.98px) { .avatar-editor { flex-direction: column; text-align: center; } }

.avatar-ativo { align-self: flex-start; flex: none; padding: 8px 12px; border-radius: 8px; background: rgba(0, 0, 0, .04); border: 1px solid rgba(0, 0, 0, .08); }
@media (max-width: 575.98px) { .avatar-ativo { align-self: center; } }

/* avatar clicável: abre o cadastro do próprio usuário */
a.painel-usuario { text-decoration: none; border-radius: 6px; }
a.painel-usuario:hover { color: var(--ink); background: rgba(0, 0, 0, .07); }
.avatar-link { display: inline-flex; border-radius: 50%; text-decoration: none; }
.avatar-link .avatar, a.painel-usuario .avatar { transition: transform .15s ease, box-shadow .15s ease; }
.avatar-link:hover .avatar, a.painel-usuario:hover .avatar { transform: scale(1.08); box-shadow: 0 0 0 2px #fff, 0 0 0 4px #3465a4, 0 2px 8px rgba(0, 0, 0, .4); }
.avatar-link:focus-visible, a.painel-usuario:focus-visible { outline: 2px solid #3465a4; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .avatar-link .avatar, a.painel-usuario .avatar { transition: none; } }
.resumo-ola .avatar { color: #fff; font-size: .95rem; box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 2px 8px rgba(0, 0, 0, .45); }

/* ================= área de trabalho: equipes por base ================= */
.resumo-bases {
  display: flex; align-items: stretch; gap: 14px; width: 100%; padding: 12px 14px; border-radius: 10px; color: #fff;
  background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .22); box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
.rb-cab { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto auto; column-gap: 10px; align-content: center; flex: none; padding-right: 14px; border-right: 1px solid rgba(255, 255, 255, .2); }
.rb-cab > .bi { grid-row: 1 / 3; font-size: 1.5rem; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #4e9a06; text-shadow: none; }
.rb-cab .rc-rotulo { align-self: center; }
.rb-lista { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; flex: 1; min-width: 0; }
.rb-base {
  display: grid; grid-template-columns: 1fr auto; align-content: center; gap: 2px 8px; padding: 8px 10px; border-radius: 8px;
  color: #fff; text-decoration: none; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12);
  transition: background .15s ease, transform .15s ease;
}
.rb-base:hover { color: #fff; background: rgba(255, 255, 255, .16); transform: translateY(-2px); border-color: rgba(255, 255, 255, .45); }
.rb-sigla { font-weight: 700; font-size: .95rem; letter-spacing: .03em; }
.rb-nome { grid-column: 1; font-size: .72rem; color: rgba(255, 255, 255, .78); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-n { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 1.6rem; font-weight: 700; line-height: 1; }
.rb-barra { grid-column: 1 / -1; height: 5px; margin-top: 4px; border-radius: 3px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.rb-barra > span { display: block; height: 100%; border-radius: 3px; background: #8ae234; }
.rb-reserva { grid-column: 1 / -1; font-size: .68rem; color: rgba(255, 255, 255, .7); }
@media (max-width: 767.98px) { .resumo-bases { flex-direction: column; } .rb-cab { border-right: 0; padding-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .2); padding-bottom: 10px; } }
@media (prefers-reduced-motion: reduce) { .rb-base { transition: none; } }

/* "Ver em tabela": sinal + / − em vez da seta do navegador */
.xq-tabela > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.xq-tabela > summary::-webkit-details-marker { display: none; }
.xq-tabela > summary::before {
  content: "+"; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 3px;
  border: 1.5px solid currentColor; font-size: .85rem; font-weight: 700; line-height: 1;
}
.xq-tabela[open] > summary::before { content: "\2212"; }
.xq-tabela > summary .bi { margin-right: 0 !important; }
/* sinal desenhado (não depende da fonte): duas barras cruzadas, exatamente no centro */
.xq-tabela > summary::before {
  content: ""; box-sizing: border-box; width: 16px; height: 16px; font-size: 0;
  background:
    linear-gradient(currentColor, currentColor) center / 8px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 8px no-repeat;
}
.xq-tabela[open] > summary::before { content: ""; background: linear-gradient(currentColor, currentColor) center / 8px 2px no-repeat; }
.xq-tabela > summary::before { width: 18px; height: 18px; border-width: 2px; }   /* miolo 14px: barras 8×2 caem em pixel inteiro */

/* ================= janela "Sobre o ProgOB" ================= */
.sobre .modal-body { padding: 18px 22px; }
.sobre-marca { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.sobre-marca img { width: min(300px, 80%); height: auto; }
.sobre-versao { font-size: .78rem; font-weight: 700; color: #204a87; background: #dbe6f4; border-radius: 999px; padding: 2px 10px; }
.sobre-desc { margin: 12px 0; font-size: .85rem; text-align: center; color: var(--muted); }
.sobre-autor { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px; margin-bottom: 12px; border-radius: 8px; background: rgba(52, 101, 164, .07); border: 1px solid rgba(52, 101, 164, .18); }
.sobre-autor b { font-size: 1rem; }
.sobre-autor a { font-size: .82rem; text-decoration: none; }
.sobre-rotulo { font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sobre-tec { display: flex; flex-direction: column; gap: 8px; }
.sobre-grupo { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.sobre-grupo .sobre-rotulo { flex-basis: 100%; }
.sobre-chip { font-size: .75rem; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .05); border: 1px solid rgba(0, 0, 0, .12); white-space: nowrap; }
.sobre-rodape { justify-content: space-between; font-size: .75rem; color: var(--muted); }
[data-theme="dark"] .sobre-versao { background: rgba(114, 159, 207, .2); color: #9fc3ec; }
[data-theme="dark"] .sobre-chip { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .15); }

/* Sobre: duas colunas (marca | técnica) para caber sem rolagem */
.sobre-dialogo { max-width: min(1080px, calc(100vw - 32px)); }
.sobre-corpo { display: grid; grid-template-columns: 330px 1fr; gap: 22px; padding: 16px 22px; }
.sobre-esq { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-right: 22px; border-right: 1px solid rgba(0, 0, 0, .1); }
.sobre-logo { width: 100%; height: auto; }
.sobre-esq .sobre-desc { margin: 4px 0; font-size: .8rem; line-height: 1.45; text-align: center; }
.sobre-esq .sobre-autor { width: 100%; margin: auto 0 0; }
.sobre-tec { gap: 10px; }
.sobre-chip { font-size: .72rem; padding: 1px 8px; }
.sobre-algoritmos .sobre-chip { background: rgba(52, 101, 164, .08); border-color: rgba(52, 101, 164, .3); }
.sobre-rodape { padding: 8px 22px; }
@media (max-width: 991.98px) {
  .sobre-corpo { grid-template-columns: 1fr; }
  .sobre-esq { padding-right: 0; border-right: 0; border-bottom: 1px solid rgba(0, 0, 0, .1); padding-bottom: 12px; }
  .sobre-logo { width: min(300px, 80%); }
}
[data-theme="dark"] .sobre-esq { border-color: rgba(255, 255, 255, .12); }
[data-theme="dark"] .sobre-algoritmos .sobre-chip { background: rgba(114, 159, 207, .12); border-color: rgba(114, 159, 207, .35); }

/* ================= Painel de Acompanhamento de Obras ================= */
.po-filtros > div { min-width: 130px; }
.po-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 8px; }
.po-status { display: flex; flex-wrap: wrap; gap: 6px; }
.po-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .8rem;
  text-decoration: none; color: var(--ink); background: var(--surface, #fff); border: 1px solid rgba(0, 0, 0, .15);
}
.po-chip b { font-variant-numeric: tabular-nums; }
.po-chip:hover { border-color: #3465a4; color: var(--ink); }
.po-chip.ativo { background: #204a87; border-color: #204a87; color: #fff; }
.po-chip.ativo i { color: #fff !important; }
.po-totais { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-left: auto; }
.st-verde i, .po-st.st-verde { color: #3a7a05; } .st-azul i, .po-st.st-azul { color: #204a87; }
.st-vermelho i, .po-st.st-vermelho { color: #a40000; } .st-laranja i, .po-st.st-laranja { color: #b35600; }
.st-cinza i, .po-st.st-cinza { color: #6b6d68; }
.po-st { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: .78rem; }
.po-card { overflow: hidden; }
.po-rolagem { max-height: calc(100vh - 330px); overflow: auto; }
.po-tabela { margin: 0; font-size: .8rem; }
.po-tabela thead th { position: sticky; top: 0; z-index: 2; background: var(--th-bg, #e9e7e3); white-space: nowrap; font-size: .75rem; }
.po-tabela td { vertical-align: top; }
.po-sub { font-size: .68rem; color: var(--muted); }
.po-equip { min-width: 150px; font-size: .74rem; line-height: 1.3; }
.po-end { min-width: 160px; max-width: 240px; }
.po-fiscal { max-width: 160px; }
.po-vencida { color: #a40000; font-weight: 700; }
.po-col-inc { min-width: 260px; width: 22%; }
.po-inc { resize: vertical; min-height: 31px; font-size: .78rem; line-height: 1.35; }
.po-inc-info { min-height: 1em; font-size: .66rem; color: var(--muted); margin-top: 1px; }
.po-inc-info.salvando { color: #204a87; } .po-inc-info.ok { color: #3a7a05; } .po-inc-info.erro { color: #a40000; font-weight: 700; }
.po-inc-ler { font-size: .78rem; white-space: normal; }
[data-theme="dark"] .po-tabela thead th { background: #2e3436; }
[data-theme="dark"] .po-chip { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .18); }
.po-rolagem { max-height: calc(100vh - 352px); }
.po-equip { min-width: 150px; max-width: 210px; }

/* painel de obras: textos longos quebram linha (a lista geral é uma linha por item) e a tabela cabe na largura */
.po-tabela tbody td { white-space: normal; }
.po-tabela td.po-fiscal, .po-tabela td.po-end { overflow-wrap: anywhere; }
.po-tabela td.num, .po-tabela .text-nowrap { white-space: nowrap; }
.po-equip { min-width: 140px; max-width: 190px; }
.po-end { min-width: 120px; max-width: 200px; }
.po-fiscal { min-width: 110px; max-width: 150px; }
.po-col-inc { min-width: 220px; width: 20%; }
.po-equip mark { padding: 0 2px; background: #fce94f; border-radius: 2px; }
/* Sobre: coluna técnica em texto corrido (sem etiquetas) */
.sobre-tec { display: flex; flex-direction: column; gap: 9px; font-size: .78rem; line-height: 1.4; }
.sobre-tec section { margin: 0; }
.sobre-tec h3.sobre-rotulo { margin: 0 0 2px; font-size: .68rem; color: #204a87; }
.sobre-tec p { margin: 0; color: var(--ink); }
.sobre-lista { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 22px; }
.sobre-lista li { position: relative; padding-left: 11px; break-inside: avoid; margin-bottom: 1px; }
.sobre-lista li::before { content: ""; position: absolute; left: 0; top: .55em; width: 4px; height: 4px; border-radius: 50%; background: #3465a4; }
[data-theme="dark"] .sobre-tec h3.sobre-rotulo { color: #9fc3ec; }
@media (max-width: 991.98px) { .sobre-lista { columns: 1; } }
/* login: versão em texto simples (a pílula azul parecia um botão) */
.login-versao {
  padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
  color: var(--muted); font-size: .72rem; cursor: default;
}
.login-versao b { color: var(--ink); }
/* Sobre: aproveita a largura (escala 125% = ~1536×690 px úteis) para não precisar de rolagem */
.sobre-dialogo { max-width: min(1440px, calc(100vw - 24px)); margin-top: .5rem; margin-bottom: .5rem; min-height: calc(100% - 1rem); }
.sobre .modal-header { padding: 8px 18px; }
.sobre-corpo { grid-template-columns: 250px 1fr; gap: 18px; padding: 12px 18px; }
.sobre-esq { gap: 6px; padding-right: 18px; }
.sobre-esq .sobre-desc { font-size: .74rem; line-height: 1.35; }
.sobre-esq .sobre-autor { padding: 8px; }
.sobre-tec { gap: 6px; font-size: .74rem; line-height: 1.32; }
.sobre-lista { column-gap: 18px; }
.sobre-rodape { padding: 6px 18px; }
@media (min-width: 1400px) { .sobre-lista { columns: 3; } }

/* editor de avatar mais baixo (cadastro de usuário e Aparência) */
.avatar-editor { padding: 8px 14px; gap: 16px; }
.avatar-editor .avatar-xl { width: 76px; height: 76px; font-size: 1.6rem; }
.avatar-editor .form-text { margin-top: 2px; }
.form-centro { margin: 12px auto; }

/* atalhos: quando não cabem numa coluna (tela baixa), continuam na próxima */
.atalhos { bottom: 4px; flex-wrap: wrap; align-content: flex-start; column-gap: 6px; }
/* menu do clique direito (mesmo visual dos menus do painel) */
.menu-contexto { position: fixed; z-index: 2000; min-width: 250px; margin: 0; }
.menu-contexto .dropdown-item[disabled] { opacity: .6; }

/* agenda: ir para uma data qualquer */
.agenda-ir { display: inline-flex; align-items: center; gap: 5px; margin: 0; }
.agenda-ir .bi { color: #3465a4; }
.agenda-ir input[type=date] { width: 140px; }

/* ================= agenda: sábados, domingos e feriados coloridos (Configurações → Calendário) ================= */
.agenda-dia.dia-cor, .grade .g-dia.dia-cor:not(.hoje), .grade .g-cel.dia-cor:not(.g-folga) { background-color: var(--dia-cor); }
.grade .g-cel.dia-cor.hoje:not(.g-folga) { background-image: linear-gradient(rgba(78, 127, 194, .08), rgba(78, 127, 194, .08)); }
.agenda-feriado, .g-feriado { display: block; font-size: .64rem; font-weight: 700; color: #a40000; line-height: 1.15;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-feriado { display: inline-block; max-width: calc(100% - 26px); margin-left: 6px; vertical-align: middle; }
.g-dia.hoje .g-feriado { color: #fff; }
[data-theme="dark"] .agenda-dia.dia-cor, [data-theme="dark"] .grade .g-dia.dia-cor:not(.hoje),
[data-theme="dark"] .grade .g-cel.dia-cor:not(.g-folga) { background-color: color-mix(in srgb, var(--dia-cor) 16%, transparent); }
[data-theme="dark"] .agenda-feriado, [data-theme="dark"] .g-feriado { color: #ff9a9a; }
/* Configurações → Calendário */
.cal-config { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.cal-linha { display: grid; grid-template-columns: 130px 1fr auto; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed rgba(0, 0, 0, .12); }
.cal-cores { display: flex; flex-wrap: wrap; gap: 6px; }
.cal-cor { position: relative; margin: 0; cursor: pointer; }
.cal-cor input { position: absolute; opacity: 0; pointer-events: none; }
.cal-cor span:first-of-type { display: block; width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .25); }
.cal-cor input:checked + span { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #3465a4; }
.cal-cor input:focus-visible + span { outline: 2px solid #3465a4; outline-offset: 3px; }
.cal-previa { font-size: .72rem; padding: 3px 10px; border-radius: 4px; border: 1px solid rgba(0, 0, 0, .15); color: #2e3436; }
@media (max-width: 1199.98px) { .cal-config { grid-template-columns: 1fr; } }

/* feriado municipal (só uma base): bandeira vazada, cor mais discreta */
.g-feriado-local, .agenda-feriado-local { color: #8f5902; font-weight: 600; }
[data-theme="dark"] .g-feriado-local, [data-theme="dark"] .agenda-feriado-local { color: #fcaf3e; }
.cal-config .ccm-lista { max-height: calc(100vh - 300px); overflow: auto; }

/* ================= Computadores conectados (administrador) ================= */
.cx-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.cx-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; font-size: .82rem; border: 1px solid rgba(0, 0, 0, .15); background: var(--surface, #fff); }
.cx-online .bi, .cx-online .cx-st { color: #3a7a05; }
.cx-ausente .bi, .cx-ausente .cx-st { color: #b35600; }
.cx-desconectado .bi, .cx-desconectado .cx-st { color: #6b6d68; }
.cx-st { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: .78rem; }
tr.cx-desconectado td { opacity: .7; }
.cx-rolagem { max-height: calc(100vh - 250px); overflow: auto; }
.cx-tabela thead th { position: sticky; top: 0; z-index: 1; background: var(--th-bg, #e9e7e3); }
.cx-pagina { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
@media (prefers-reduced-motion: no-preference) { tr.cx-online .cx-st .bi { animation: cx-pulso 2s ease-in-out infinite; } }
@keyframes cx-pulso { 50% { opacity: .35; } }
[data-theme="dark"] .cx-tabela thead th { background: #2e3436; }

/* ================= logout por inatividade: aviso e retomada ================= */
.inativo-aviso { position: fixed; inset: 0; z-index: 4000; display: grid; place-items: center; background: rgba(0, 0, 0, .45); }
.inativo-caixa { display: flex; align-items: center; gap: 14px; max-width: 460px; margin: 16px; padding: 18px 20px; border-radius: 12px;
  background: var(--surface, #fff); color: var(--ink); box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.inativo-caixa > .bi { font-size: 1.9rem; color: #b35600; flex: none; }
.inativo-caixa b { font-size: 1rem; }
.inativo-caixa p { margin: 2px 0 0; font-size: .85rem; color: var(--muted); }
.inativo-caixa [data-seg] { font-weight: 700; color: #a40000; }
.inativo-caixa button { flex: none; align-self: stretch; }
.inativo-retomou { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 4000; max-width: 90vw;
  padding: 9px 16px; border-radius: 999px; font-size: .85rem; color: #fff; background: #204a87; box-shadow: 0 6px 20px rgba(0, 0, 0, .4);
  transition: opacity .5s ease, transform .5s ease; }
.inativo-retomou.some { opacity: 0; transform: translateX(-50%) translateY(10px); }
@media (max-width: 575.98px) { .inativo-caixa { flex-direction: column; text-align: center; } }
/* arrastar para rolar a grade (Excel-like): cursor "mãozinha" enquanto arrasta */
.grade-wrap.arrastando, .grade-wrap.arrastando * { cursor: grabbing !important; user-select: none; }

/* grade: sem barras de rolagem (rola arrastando, como no Excel) */
.grade-wrap { scrollbar-width: none; -ms-overflow-style: none; overscroll-behavior-x: contain; }
.grade-wrap::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* grade: botão "+" para programar outro serviço na mesma célula (equipe/turno/dia).
   Aparece só ao passar o mouse na célula, com um leve "pop". */
.g-cel { position: relative; }
.g-mais {
  position: absolute; top: 3px; right: 3px; z-index: 2; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  background: #4e9a06; color: #fff; font-size: .9rem; line-height: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .3);
  opacity: 0; transform: scale(.6); pointer-events: none;
  transition: opacity .12s ease, transform .12s ease;
}
.g-cel:hover .g-mais, .g-cel:focus-within .g-mais { opacity: 1; transform: scale(1); pointer-events: auto; }
.g-mais:hover { background: #3a7a05; transform: scale(1.15); }
.g-mais:focus-visible { outline: 2px solid #204a87; outline-offset: 2px; opacity: 1; transform: scale(1); pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .g-mais { transition: none; } }
