
:root {
  --bg: #F5F5F5;
  --bg-grad: none;
  --surface-0: #FAFAFA;
  --surface-1: #FFFFFF;
  --surface-2: #F0F1F1;
  --surface-3: #EAEBEC;
  --border: #DCDEDF;
  --border-soft: rgba(12,33,39,0.07);
  --text-primary: #0C2127;
  --text-secondary: #4A5A60;
  --text-tertiary: #7C8A8F;
  --accent: #0F363F;
  --accent-2: #1D7192;
  --accent-ink: #FFFFFF;
  --mega: #0F363F;
  --omega: #1D7192;
  --success: #2F7D5B;
  --warning: #B98A2E;
  --danger: #B23B30;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(15,54,63,0.08);
  --shadow-md: 0 10px 30px rgba(15,54,63,0.10);
  --shadow-lg: 0 24px 64px rgba(15,54,63,0.16);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Jost', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: var(--accent-ink); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #C7CBCC; }

#root { padding: 0 28px 60px; max-width: 1440px; margin: 0 auto; }

/* ---------- top app bar ---------- */
.appbar { display: flex; align-items: center; gap: 12px; padding: 18px 0; margin-bottom: 22px; border-bottom: 1px solid var(--border-soft); }
.appbar-logo { height: 34px; width: auto; border-radius: 6px; flex-shrink: 0; }
.modal-card .appbar-logo { height: 44px; margin-bottom: 16px; }
.appbar-name { font-family: 'Jost', sans-serif; font-weight: 800; font-size: 14.5px; color: var(--text-primary); letter-spacing: -0.01em; }
.appbar-sub { font-family: 'Jost', sans-serif; font-size: 10.5px; color: var(--text-tertiary); letter-spacing: 0.08em; text-transform: uppercase; margin-top: 1px; }
.appbar-spacer { flex: 1; }
.appbar-pill { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-secondary); background: var(--surface-1); border: 1px solid var(--border); padding: 6px 12px; border-radius: 999px; }

/* ---------- header ---------- */
.header { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; }
.eyebrow { font-family: 'Jost', sans-serif; font-size: 11px; letter-spacing: 0.16em; color: var(--accent); margin-bottom: 8px; font-weight: 600; }
h1 { font-family: 'Jost', sans-serif; font-weight: 800; font-size: 32px; margin: 0; color: var(--text-primary); letter-spacing: -0.015em; }
.header-stats { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.header-stat-item { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-secondary); background: var(--surface-1); border: 1px solid var(--border); padding: 8px 13px; border-radius: 999px; font-weight: 500; }
.header-stat-item b { color: var(--text-primary); font-weight: 700; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; box-shadow: 0 0 8px currentColor; }

/* ---------- buttons ---------- */
button { font-family: inherit; cursor: pointer; transition: all .16s ease; border: none; }
button:active { transform: translateY(1px) scale(0.99); }
.btn-ghost {
  background: var(--surface-1); border: 1.5px solid var(--accent) !important; color: var(--accent);
  padding: 9px 18px; border-radius: 999px; font-size: 12.5px; font-weight: 600; letter-spacing: 0.03em;
}
.btn-ghost:hover { background: var(--surface-2); transform: translateY(-1px); }
.btn-primary {
  background: var(--accent); color: var(--accent-ink);
  padding: 9px 20px; border-radius: 999px; font-weight: 700; font-size: 12.5px; letter-spacing: 0.03em;
  box-shadow: 0 4px 14px rgba(15,54,63,0.18);
}
.btn-primary:hover { filter: brightness(1.15); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(15,54,63,0.24); }

/* ---------- status banner ---------- */
.status-banner { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: var(--radius-sm); font-size: 12.5px; margin-bottom: 18px; border: 1px solid; font-weight: 500; animation: fadeIn .25s ease; }
.status-live { background: rgba(47,125,91,0.09); border-color: rgba(47,125,91,0.28); color: #1F5C41; }
.status-fallback { background: rgba(185,138,46,0.09); border-color: rgba(185,138,46,0.28); color: #8A6A1E; }
.status-loading { background: var(--surface-1); border-color: var(--border); color: var(--text-secondary); }

/* ---------- panels ---------- */
.panel {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 20px; margin-bottom: 22px; display: none; box-shadow: var(--shadow-sm);
}
.panel.open { display: block; animation: panelIn .18s ease; }
@keyframes panelIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.panel-header-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-title { font-weight: 700; font-size: 15px; color: var(--text-primary); margin-bottom: 4px; letter-spacing: -0.005em; }
.panel-subtitle { font-size: 12.5px; color: var(--text-secondary); max-width: 580px; line-height: 1.55; }
textarea {
  width: 100%; min-height: 120px; background: var(--surface-0); color: #0C2127; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 11px 12px; font-size: 12.5px; font-family: 'Jost', sans-serif; resize: vertical;
}
textarea:focus, select:focus, input:focus { outline: none; border-color: #1D7192 !important; box-shadow: 0 0 0 3px rgba(15,54,63,0.12); }
select, input[type=text] {
  background: var(--surface-1); border: 1px solid var(--border); color: var(--text-primary);
  border-radius: var(--radius-sm); padding: 9px 12px; font-size: 13px; transition: border-color .15s ease;
}
.import-actions { display: flex; align-items: center; gap: 14px; margin-top: 12px; flex-wrap: wrap; }
.import-msg { font-size: 12.5px; color: var(--text-secondary); }

/* ---------- KPI grid ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 22px; }
.kpi-card {
  background: var(--surface-1); border: 1px solid var(--border); border-top: 2px solid var(--border);
  border-radius: var(--radius-md); padding: 16px 18px; box-shadow: var(--shadow-sm); transition: all .18s ease;
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #C7CBCC; }
.kpi-card:nth-child(2) { border-top-color: var(--accent); }
.kpi-card:nth-child(4) { border-top-color: var(--danger); }
.kpi-card:nth-child(5) { border-top-color: var(--danger); }
.kpi-label { font-size: 11px; color: var(--text-tertiary); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.07em; font-weight: 600; }
.kpi-value { font-family: 'Jost', sans-serif; font-size: 23px; font-weight: 600; color: var(--text-primary); font-variant-numeric: tabular-nums; }

/* ---------- filter bar ---------- */
.filter-bar { display: flex; gap: 9px; margin-bottom: 18px; flex-wrap: wrap; align-items: flex-start; }
.filter-bar input[type=text] { flex: 1 1 220px; }
.msel { position: relative; }
.msel-btn { white-space: nowrap; }
.msel-panel {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 250px; max-height: 320px; overflow-y: auto;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 9px;
  z-index: 40; display: none; box-shadow: var(--shadow-lg);
}
.msel-panel.open { display: block; animation: panelIn .15s ease; }
.msel-actions { display: flex; justify-content: space-between; padding: 3px 7px 9px; border-bottom: 1px solid var(--border); margin-bottom: 7px; }
.msel-actions button { background: none; color: var(--accent); font-size: 11.5px; font-weight: 700; padding: 0; }
.msel-option { display: flex; align-items: center; gap: 9px; padding: 7px 7px; border-radius: var(--radius-sm); font-size: 13px; color: var(--text-primary); cursor: pointer; transition: background .12s ease; }
.msel-option:hover { background: var(--surface-3); }
.msel-option input { accent-color: var(--accent); cursor: pointer; }
input[type=date] { background: var(--surface-0); border: 1px solid var(--border); color: var(--text-primary); border-radius: var(--radius-sm); padding: 7px 9px; font-size: 12px; color-scheme: dark; }

/* ---------- tasks ---------- */
.task-board-row { display: flex; align-items: center; gap: 12px; padding: 11px 10px; border-bottom: 1px solid var(--border-soft); cursor: pointer; border-radius: var(--radius-sm); transition: background .12s ease; }
.task-board-row:hover { background: var(--surface-2); }
.task-card { background: var(--surface-0); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 13px; margin-bottom: 10px; }
.task-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.task-etapa { font-size: 11px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.task-titulo { font-size: 13.5px; color: var(--text-primary); font-weight: 600; margin-bottom: 5px; }
.task-meta { font-size: 11.5px; color: var(--text-secondary); margin-bottom: 3px; }
.task-obs { font-size: 12.5px; color: #0C2127; background: var(--surface-2); border-radius: var(--radius-sm); padding: 9px; margin: 7px 0; line-height: 1.45; border-left: 2px solid var(--accent); }
.task-actions { display: flex; gap: 8px; margin-top: 9px; }
.task-btn { background: var(--surface-2); border: 1px solid var(--border) !important; color: var(--text-primary); padding: 6px 11px; border-radius: var(--radius-sm); font-size: 11.5px; font-weight: 600; }
.task-btn:hover { background: var(--surface-3); }
.new-task-box { display: flex; flex-direction: column; gap: 9px; background: var(--surface-0); border: 1px dashed var(--border); border-radius: var(--radius-md); padding: 14px; margin-top: 8px; }
.new-task-box select, .new-task-box input, .new-task-box textarea { width: 100%; }

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); background: var(--surface-1); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: center; padding: 12px 14px; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-tertiary); border-bottom: 1px solid var(--border); cursor: pointer; white-space: nowrap;
  background: var(--surface-2); position: sticky; top: 0; font-weight: 700; user-select: none;
}
th:hover { color: var(--text-secondary); }
tr.row { border-bottom: 1px solid var(--border-soft); cursor: pointer; transition: background .1s ease; }
tr.row:hover { background: var(--surface-2); }
td { padding: 11px 14px; text-align: center; color: #0C2127; white-space: nowrap; }
td.rail { width: 4px; padding: 0; }
.obra-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; font-size: 13px; color: var(--text-primary); display: block; text-align: left; font-weight: 500; }
.tipo-tag { font-size: 10.5px; color: var(--text-tertiary); margin-top: 2px; text-align: left; }
.badge-empresa { font-size: 10.5px; font-weight: 700; border: 1px solid; border-radius: 999px; padding: 3px 9px; letter-spacing: 0.03em; }
.badge-tier { font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 4px 10px; letter-spacing: 0.02em; box-shadow: var(--shadow-sm); }
.stage-mini { display: flex; gap: 3px; justify-content: center; }
.stage-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.stage-pct { font-size: 10.5px; color: var(--text-tertiary); margin-top: 4px; font-weight: 600; }
.mono { font-family: 'Jost', sans-serif; font-size: 12.5px; font-variant-numeric: tabular-nums; }

/* ---------- editorial section header (inspired by omegalight.com.br) ---------- */
.section-header { margin: 6px 0 22px; }
.section-eyebrow { font-family: 'Jost', sans-serif; font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 6px; }
.section-headline { font-family: 'Jost', sans-serif; font-weight: 400; font-size: 26px; color: var(--text-primary); letter-spacing: -0.01em; }
.section-headline b { font-weight: 700; }

/* ---------- toolbar (search + result count + open filters) ---------- */
.toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar input[type=text] { flex: 1 1 240px; }
.result-count { font-size: 12.5px; color: var(--text-tertiary); white-space: nowrap; }
.result-count b { color: var(--text-primary); font-weight: 700; }

/* ---------- filters sidebar (inspired by omegalight.com.br product filters) ---------- */
.filters-overlay { position: fixed; inset: 0; background: rgba(12,33,39,0.35); display: none; z-index: 55; }
.filters-overlay.open { display: block; animation: fadeIn .15s ease; }
.filters-sidebar { position: fixed; top: 0; left: -400px; width: 380px; max-width: 88vw; height: 100%; background: var(--surface-1); border-right: 1px solid var(--border); box-shadow: var(--shadow-lg); z-index: 56; padding: 26px; overflow-y: auto; transition: left .22s ease; }
.filters-overlay.open .filters-sidebar { left: 0; }
.filters-sidebar-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.filters-sidebar-title { font-family: 'Jost', sans-serif; font-weight: 700; font-size: 20px; color: var(--text-primary); }
.filters-close-x { background: none; border: none; color: var(--text-secondary); font-size: 18px; padding: 4px; }
.filters-clear-link { display: inline-block; font-size: 12px; font-weight: 600; color: var(--accent); text-decoration: underline; cursor: pointer; margin-bottom: 22px; }
.filter-group { margin-bottom: 20px; }
.filter-group-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-tertiary); margin-bottom: 8px; }
.filter-group .msel { width: 100%; }
.filter-group .msel-btn { width: 100%; text-align: left; }
.filter-group .msel-panel { position: static; width: 100%; box-shadow: none; border: 1px solid var(--border); margin-top: 8px; display: none; }
.filter-group .msel-panel.open { display: block; }

/* ---------- drawer ---------- */
.overlay { position: fixed; inset: 0; background: rgba(12,33,39,0.45); backdrop-filter: blur(2px); display: none; justify-content: flex-end; z-index: 50; }
.overlay.open { display: flex; animation: fadeIn .15s ease; }
.drawer { width: 440px; max-width: 92vw; height: 100%; background: var(--surface-1); border-left: 1px solid var(--border); padding: 30px; overflow-y: auto; position: relative; box-shadow: var(--shadow-lg); }
.close-btn { position: absolute; top: 20px; right: 20px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 50%; width: 30px; height: 30px; color: var(--text-secondary); font-size: 14px; display: flex; align-items: center; justify-content: center; }
.close-btn:hover { color: var(--text-primary); background: var(--surface-3); }
.drawer-pedido { font-family: 'Jost', sans-serif; font-size: 13px; color: var(--text-secondary); }
.drawer-obra { font-family: 'Jost', sans-serif; font-weight: 800; font-size: 19px; color: var(--text-primary); margin: 5px 0 20px; line-height: 1.32; letter-spacing: -0.01em; }
.meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 12px; margin-bottom: 20px; background: var(--surface-0); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; }
.meta-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-tertiary); margin-bottom: 4px; font-weight: 600; }
.meta-value { font-size: 13.5px; color: var(--text-primary); font-weight: 500; }
.note-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 13px; margin-bottom: 20px; border-left: 2px solid var(--warning); }
.note-text { font-size: 13px; color: #0C2127; margin-top: 5px; line-height: 1.55; }
.timeline-title { font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px; }
.timeline-row { display: flex; align-items: center; gap: 11px; margin-bottom: 11px; }
.timeline-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; display: inline-block; box-shadow: 0 0 6px currentColor; }
.timeline-label { font-size: 13px; color: #0C2127; flex: 1; }
.timeline-date { font-size: 12px; color: var(--text-tertiary); font-family: 'Jost', sans-serif; }

.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: var(--accent-ink);
  padding: 11px 20px; border-radius: 999px; font-weight: 700; font-size: 13px;
  box-shadow: 0 12px 32px rgba(15,54,63,0.35); display: none; z-index: 60;
}
.toast.show { display: block; animation: fadeIn .2s ease; }

@media (max-width: 860px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .filter-bar { flex-wrap: wrap !important; }
}

/* ---------- nav tabs ---------- */
.tabs { display: flex; gap: 6px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.tab-btn { background: none; border: none; color: var(--text-secondary); padding: 10px 16px; font-size: 13.5px; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all .15s ease; }
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- user chip / identity ---------- */
.user-chip { display: flex; align-items: center; gap: 9px; background: var(--surface-1); border: 1px solid var(--border); padding: 5px 6px 5px 14px; border-radius: 999px; }
.user-chip-name { font-size: 12.5px; color: var(--text-primary); font-weight: 600; }
.user-chip-role { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 3px 8px; border-radius: 999px; }
.user-chip-role.gestor { background: rgba(15,54,63,0.15); color: var(--accent-2); }
.user-chip-role.equipe { background: rgba(76,130,199,0.15); color: #0F363F; }
.user-chip-switch { background: var(--surface-2); border: 1px solid var(--border) !important; color: var(--text-secondary); padding: 5px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; }

.modal-overlay { position: fixed; inset: 0; background: rgba(12,33,39,0.55); backdrop-filter: blur(3px); display: none; align-items: center; justify-content: center; z-index: 100; }
.modal-overlay.open { display: flex; animation: fadeIn .15s ease; }
.modal-card { width: 380px; max-width: 90vw; background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-lg); }
.modal-title { font-family: 'Jost', sans-serif; font-weight: 800; font-size: 19px; color: var(--text-primary); margin-bottom: 6px; }
.modal-subtitle { font-size: 12.5px; color: var(--text-secondary); margin-bottom: 18px; line-height: 1.5; }
.modal-card label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-tertiary); font-weight: 600; margin-bottom: 6px; margin-top: 14px; }
.modal-card input[type=text], .modal-card select { width: 100%; }
.role-picker { display: flex; gap: 8px; margin-top: 6px; }
.role-option { flex: 1; text-align: center; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 12.5px; font-weight: 600; color: var(--text-secondary); cursor: pointer; transition: all .15s ease; }
.role-option.selected { border-color: var(--accent); background: rgba(15,54,63,0.1); color: var(--accent-2); }
.modal-card .btn-primary { width: 100%; margin-top: 20px; padding: 11px; font-size: 13.5px; }

/* ---------- indicadores view ---------- */
.chart-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 18px; }
.chart-card { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px; height: 300px; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); }
.chart-card canvas { flex: 1; max-height: 240px; }
.chart-card.is-loading canvas { visibility: hidden; }
.chart-card.is-loading { position: relative; }
.chart-card.is-loading::after {
  content: ''; position: absolute; inset: 44px 18px 18px 18px; border-radius: var(--radius-sm);
  background: linear-gradient(100deg, var(--surface-2) 30%, var(--surface-3) 50%, var(--surface-2) 70%);
  background-size: 200% 100%; animation: shimmer 1.3s ease-in-out infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.empty-state { text-align: center; padding: 48px 0; color: var(--text-tertiary); }
.empty-state a { color: var(--accent); cursor: pointer; font-weight: 600; text-decoration: underline; }
@media (max-width: 860px) { .chart-grid { grid-template-columns: 1fr !important; } }

/* ---------- print / PDF export ---------- */
@media print {
  body { background: #fff !important; }
  .appbar, .tabs, .header-stats, .filter-bar, .status-banner, .panel, .toast,
  .overlay, .modal-overlay, .kpi-card:hover, th { box-shadow: none !important; }
  .appbar, .tabs, .status-banner, .panel, .toast, .overlay, .modal-overlay { display: none !important; }
  #root { padding: 0; max-width: 100%; }
  .header { border: none; margin-bottom: 10px; }
  h1, .eyebrow, .kpi-label, .obra-text, td, th { color: #000 !important; }
  .kpi-card, .table-wrap { background: #fff !important; border: 1px solid #999 !important; box-shadow: none !important; }
  th { background: #eee !important; }
  tr.row:hover { background: none !important; }
  .badge-empresa, .badge-tier { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- auth (login / registro) ---------- */
.auth-error { color: var(--danger); font-size: 12.5px; min-height: 16px; margin-top: 10px; font-weight: 500; }
.auth-switch { margin-top: 16px; font-size: 12.5px; color: var(--text-secondary); text-align: center; }
.auth-switch a { color: var(--accent); font-weight: 600; text-decoration: underline; cursor: pointer; }
#identity-overlay input[type=text], #identity-overlay input[type=password] { width: 100%; }

/* ---------- trilho WK clicável ---------- */
.wk-clickable { transition: background .12s ease; }
.wk-clickable:hover { background: var(--surface-2); }
#wkstage-modal .modal-card select { width: 100%; }

/* ---------- checkboxes / regras de e-mail ---------- */
.ck { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--text-secondary); cursor:pointer; }
.ck input { accent-color: var(--accent); width:16px; height:16px; cursor:pointer; }
.email-rule { background:var(--surface-0); border:1px solid var(--border); border-radius:var(--radius-md); padding:13px; margin-bottom:10px; }
.email-rule .er-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px; }
.email-rule textarea { min-height:70px; }

/* ---------- botão de ocorrência (destaque) ---------- */
.occ-toggle {
  background: rgba(29,113,146,0.10) !important;
  border: 1.5px solid var(--accent-2) !important;
  color: var(--accent-2) !important;
  font-weight: 700;
}
.occ-toggle:hover { background: rgba(29,113,146,0.18) !important; }

/* ---------- responsivo / mobile ---------- */
@media (max-width: 720px) {
  #root { padding: 0 12px 48px; }
  .appbar { flex-wrap: wrap; gap: 8px; padding: 12px 0; }
  .appbar-sub { display: none; }
  .appbar-spacer { flex: 1 1 100%; order: 5; height: 0; }
  .user-chip { flex-wrap: wrap; }
  h1 { font-size: 24px; }
  .header { gap: 12px; }
  .header-stats { width: 100%; }
  .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
  .tab-btn { padding: 10px 12px; font-size: 13px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
  .kpi-value { font-size: 19px; }
  .toolbar { gap: 8px; }
  .toolbar input[type=text] { flex: 1 1 100%; }
  .result-count { order: 3; }
  .section-headline { font-size: 21px; }
  /* tabela: rola horizontal (já tem overflow), fontes menores */
  table { font-size: 12px; }
  th, td { padding: 9px 8px; }
  .obra-text { max-width: 190px; }
  /* drawer e modais ocupam a tela */
  .drawer { width: 100%; max-width: 100%; padding: 20px 16px; }
  .modal-card { width: 94vw; padding: 20px 16px; }
  #ged-card, #wkstage-card { width: 94vw !important; }
  .filters-sidebar { width: 92vw; }
}
@media (max-width: 420px) {
  .kpi-grid { grid-template-columns: 1fr 1fr !important; }
  h1 { font-size: 21px; }
  .btn-ghost, .btn-primary { padding: 8px 12px; font-size: 12px; }
}

/* ---------- tela de login: fundo sólido + campos arredondados ---------- */
#identity-overlay { background: #0F363F; backdrop-filter: none; }
#identity-overlay input[type=text],
#identity-overlay input[type=password] {
  border-radius: 999px;
  padding: 11px 18px;
}
#identity-overlay .btn-primary { border-radius: 999px; }
