/* ==========================================================
   Sistecon Solutions - Design System SaaS (MVP V1.0)
   ========================================================== */
:root {
  --primary: #003087;
  --primary-600: #00277080;
  --primary-700: #002470;
  --primary-50: #eaf0fb;
  --primary-100: #d6e2f7;
  --accent: #ffbf00;
  --accent-600: #e6ac00;
  --success: #10b981;
  --success-50: #ecfdf5;
  --danger: #ef4444;
  --danger-50: #fef2f2;
  --warning: #f59e0b;
  --warning-50: #fffbeb;
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-2: #eef2f7;
  --nav-bg: #0a1530;
  --nav-bg-2: #0e1d42;
  --nav-ink: #b6c2dc;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .04);
  --shadow: 0 4px 16px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .05);
  --shadow-lg: 0 18px 48px rgba(15, 23, 42, .14), 0 4px 12px rgba(15, 23, 42, .06);
  --sidebar-w: 272px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55;
  color: var(--ink); background: var(--surface); -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.ico { flex: none; vertical-align: middle; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid rgba(0, 48, 135, .35); outline-offset: 2px; border-radius: 6px; }

/* ---------------- Shell ---------------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--nav-bg) 0%, var(--nav-bg-2) 100%); color: var(--nav-ink);
  padding: 22px 16px 16px; z-index: 40;
}
.brand { display: flex; align-items: center; padding: 4px 6px 22px; }
.brand-logo { background: #fff; border-radius: 12px; padding: 9px 14px; display: flex; align-items: center; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.brand-logo img { display: block; height: 30px; width: auto; max-width: 100%; }
.logo-fallback { font-size: 17px; letter-spacing: .01em; color: var(--primary); white-space: nowrap; }
.logo-fallback b { font-weight: 850; letter-spacing: .06em; }
.nav-label { font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #6f7fa3; padding: 14px 12px 8px; }
.nav { display: flex; flex-direction: column; gap: 3px; overflow-y: auto; }
.nav a, .nav button.nav-btn {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 11px; border: 0; width: 100%;
  background: transparent; color: var(--nav-ink); font: inherit; font-weight: 500; cursor: pointer; text-align: left; position: relative;
  transition: background .15s, color .15s;
}
.nav a:hover, .nav button.nav-btn:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.nav a.active { background: rgba(255,255,255,.1); color: #fff; }
.nav a.active::before { content: ""; position: absolute; left: -16px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }
.nav a.active .ico { color: var(--accent); }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.09); }
.logout-form { margin-top: 6px; }
.logout-btn { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 11px; border: 0; width: 100%; background: transparent; color: var(--nav-ink); font: inherit; font-weight: 500; cursor: pointer; transition: background .15s, color .15s; }
.logout-btn:hover { background: rgba(239, 68, 68, .16); color: #fecaca; }
.usercard { display: flex; align-items: center; gap: 11px; padding: 8px; border-radius: 12px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #ffd54d); color: #1a1a1a; font-weight: 700; font-size: 14px; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.usercard .nm { color: #fff; font-weight: 600; font-size: 14px; line-height: 1.2; }
.usercard .rl { font-size: 12px; color: #8b9bc0; }
.usercard > div { min-width: 0; }
.usercard .nm, .usercard .rl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { min-width: 0; background: var(--surface); display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 36px; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.topbar .left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.crumb { font-size: 13px; color: var(--muted); }
.menu-btn { display: none; border: 1px solid var(--line); background: #fff; border-radius: 10px; width: 40px; height: 40px; place-items: center; cursor: pointer; color: var(--ink); }
.clock {
  display: flex; align-items: center; gap: 12px; padding: 8px 16px 8px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: linear-gradient(180deg, #fff, var(--bg)); box-shadow: var(--shadow-sm);
}
.clock .ico { color: var(--primary); }
.clock .t { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 20px; letter-spacing: .02em; line-height: 1.1; color: var(--primary); }
.clock .d { font-size: 11.5px; color: var(--muted); line-height: 1.2; }
.content { padding: 34px 36px 56px; max-width: 1320px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.page-head h1 { font-size: 28px; font-weight: 750; color: var(--ink); }
.page-head p { color: var(--muted); margin-top: 4px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------------- Cards ---------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 24px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--line-2); }
.card-head h2, .card-head h3 { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.card-head h2 .ico, .card-head h3 .ico { color: var(--primary); }
.card-body { padding: 24px; }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
.mt { margin-top: 24px; }
.mt-sm { margin-top: 14px; }

/* KPI */
.kpi { padding: 22px; display: flex; align-items: center; gap: 16px; position: relative; overflow: hidden; }
.kpi .ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.kpi .lb { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi .vl { font-size: 34px; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; margin-top: 2px; }
.ic-blue { background: var(--primary-50); color: var(--primary); }
.ic-green { background: var(--success-50); color: #059669; }
.ic-amber { background: #fff6d6; color: #8a6100; }
.ic-red { background: var(--danger-50); color: #dc2626; }

/* Atalhos */
.shortcut {
  display: flex; flex-direction: column; gap: 14px; padding: 24px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface); box-shadow: var(--shadow-sm); color: var(--ink); text-align: left; font: inherit; cursor: pointer; width: 100%;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.shortcut:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--primary-100); text-decoration: none; }
.shortcut .ic { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; background: var(--primary); color: #fff; }
.shortcut:nth-child(2) .ic { background: var(--accent); color: #1f1f1f; }
.shortcut:nth-child(3) .ic { background: #0e1d42; }
.shortcut strong { font-size: 17px; font-weight: 700; }
.shortcut span.s { color: var(--muted); font-size: 13.5px; }
.shortcut .go { margin-top: auto; display: inline-flex; align-items: center; gap: 4px; color: var(--primary); font-weight: 600; font-size: 13px; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 10px 18px; border-radius: 11px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; transition: background .15s, box-shadow .15s, transform .05s, border-color .15s; white-space: nowrap;
  text-decoration: none; line-height: 1.2;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(0,48,135,.28); }
.btn-primary:hover { background: var(--primary-700); }
.btn-accent { background: var(--accent); color: #1c1c1c; box-shadow: 0 2px 8px rgba(255,191,0,.35); }
.btn-accent:hover { background: var(--accent-600); }
.btn-ghost { background: #fff; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg); border-color: #cbd5e1; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #0ea371; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-soft-danger { background: var(--danger-50); color: #b91c1c; }
.btn-soft-success { background: var(--success-50); color: #047857; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn-lg { padding: 14px 24px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .55; cursor: not-allowed; box-shadow: none; pointer-events: none; }
.soon { display: inline-flex; align-items: center; gap: 8px; }
.soon small { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--accent); color: #1c1c1c; padding: 2px 7px; border-radius: 99px; }

/* ---------------- Badges & tags ---------------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-green { background: var(--success-50); color: #047857; }
.b-red { background: var(--danger-50); color: #b91c1c; }
.b-amber { background: #fff6d6; color: #8a6100; }
.b-blue { background: var(--primary-50); color: var(--primary); }
.b-gray { background: #f1f5f9; color: #475569; }
.tag { display: inline-block; padding: 3px 9px; border-radius: 7px; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; margin-right: 5px; }
.tag-ct { background: #dbe7ff; color: #00307f; }
.tag-sg { background: #d1fae5; color: #047857; }
.tag-cs { background: #ede9fe; color: #6d28d9; }
.tag-irs { background: #ffedb3; color: #7a5600; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; padding: 14px 18px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; font-size: 13.5px; color: var(--ink-2); }
.legend .lg { display: inline-flex; align-items: center; gap: 8px; }
.legend .lg .tag { margin: 0; }

/* ---------------- Tabelas ---------------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 12px 16px; background: var(--bg); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 14px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: #f8fbff; }
.tbl tfoot td { background: var(--bg); font-weight: 700; border-top: 1px solid var(--line); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl a.name { font-weight: 650; color: var(--ink); }
.tbl a.name:hover { color: var(--primary); }
.cell-user { display: flex; align-items: center; gap: 12px; }
.cell-user .avatar { width: 34px; height: 34px; font-size: 12px; }
.pos { color: #047857; font-weight: 700; }
.occ { display: inline-block; padding: 3px 10px; border-radius: 7px; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; }
.occ-f { background: #dbe7ff; color: #00307f; }
.occ-x { background: var(--danger-50); color: #b91c1c; }

/* ---------------- Formulários ---------------- */
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label, .lbl { font-size: 13px; font-weight: 650; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.req { color: var(--danger); }
.input, select.input, textarea.input {
  width: 100%; padding: 11px 14px; border: 1px solid #cbd5e1; border-radius: 11px; background: #fff; font: inherit; color: var(--ink);
  transition: border-color .15s, box-shadow .15s; appearance: none; -webkit-appearance: none;
}
select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 38px; }
textarea.input { min-height: 110px; resize: vertical; }
.input { min-height: 46px; }
textarea.input { min-height: 110px; }
input[type=file].input { padding: 7px 10px; }
input[type=file].input::file-selector-button { margin-right: 12px; padding: 7px 14px; border: 0; border-radius: 8px; background: var(--primary-50); color: var(--primary); font: inherit; font-weight: 650; cursor: pointer; }
input[type=file].input::file-selector-button:hover { background: var(--primary-100); }
.tbl-dense th, .tbl-dense td { padding-left: 10px; padding-right: 10px; }
.tbl-dense th { white-space: normal; line-height: 1.25; }
.tbl-dense .cell-user strong { white-space: nowrap; }
.tbl-dense .cell-user .avatar { display: none; }
.input:hover { border-color: #94a3b8; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(0, 48, 135, .12); }
.input[readonly] { background: var(--bg); color: var(--ink-2); font-weight: 650; }
.input.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(239, 68, 68, .12); }
.err-msg { color: #b91c1c; font-size: 12px; font-weight: 600; }
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; } .c8 { grid-column: span 8; } .c12 { grid-column: span 12; }
.search { position: relative; }
.search .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search .input { padding-left: 44px; }
.search.lg .input { padding-top: 14px; padding-bottom: 14px; font-size: 15px; border-radius: 13px; box-shadow: var(--shadow-sm); }

/* Secções do formulário de cliente */
.fsec { padding: 26px; border-bottom: 1px solid var(--line-2); }
.fsec:last-child { border-bottom: 0; }
.fsec-h { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.fsec-h .n { width: 30px; height: 30px; border-radius: 9px; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }
.fsec-h h3 { font-size: 16px; font-weight: 700; }
.fsec-h p { font-size: 13px; color: var(--muted); }
.cond { margin-top: 18px; padding: 20px; border: 1px dashed #b8c6e3; background: #f7f9fe; border-radius: 13px; animation: slide .2s ease; }
.cond[hidden] { display: none; }
.cond-title { font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--primary); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
@keyframes slide { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.chk {
  display: flex; align-items: center; gap: 11px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s; font-weight: 600; font-size: 14px; user-select: none;
}
.chk:hover { border-color: #94a3b8; }
.chk input { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; border: 1.8px solid #94a3b8; border-radius: 6px; display: grid; place-items: center; flex: none; background: #fff; cursor: pointer; margin: 0; transition: all .12s; }
.chk input[type=radio] { border-radius: 50%; }
.chk input:checked { background: var(--primary); border-color: var(--primary); }
.chk input[type=checkbox]:checked::after { content: ""; width: 5px; height: 10px; border: solid #fff; border-width: 0 2.3px 2.3px 0; transform: rotate(45deg) translate(-1px, -1px); }
.chk input[type=radio]:checked::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.chk:has(input:checked) { border-color: var(--primary); background: var(--primary-50); box-shadow: 0 0 0 3px rgba(0, 48, 135, .08); }
.chk .code { margin-left: auto; font-size: 11px; font-weight: 800; color: var(--muted); letter-spacing: .05em; }
.form-foot { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 20px 26px; background: var(--bg); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); flex-wrap: wrap; }

/* ---------------- Tabs ---------------- */
.tabs { display: flex; gap: 4px; padding: 5px; background: #f1f5f9; border-radius: 13px; width: fit-content; max-width: 100%; overflow-x: auto; }
.tab { display: inline-flex; align-items: center; gap: 9px; padding: 9px 18px; border-radius: 10px; border: 0; background: transparent; font: inherit; font-weight: 650; font-size: 14px; color: var(--muted); cursor: pointer; white-space: nowrap; text-decoration: none; }
.tab:hover { color: var(--ink); text-decoration: none; }
.tab[aria-selected="true"], .tab.is-active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }
.tabpanel[hidden] { display: none; }
.tabpanel { margin-top: 22px; }

/* ---------------- Alertas / toasts ---------------- */
.flashes { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; font-size: 14px; border: 1px solid; animation: slide .25s ease; }
.alert .ico { margin-top: 1px; }
.alert-success { background: var(--success-50); border-color: #a7f3d0; color: #065f46; }
.alert-error { background: var(--danger-50); border-color: #fecaca; color: #991b1b; }
.alert-warning { background: var(--warning-50); border-color: #fde68a; color: #92400e; }
.alert-info { background: var(--primary-50); border-color: var(--primary-100); color: var(--primary-700); }
.alert .x { margin-left: auto; background: none; border: 0; cursor: pointer; color: inherit; opacity: .6; padding: 0; }
.alert .x:hover { opacity: 1; }

/* ---------------- Ponto ---------------- */
.ponto-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.pbtn {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 12px 18px; border-radius: 16px; border: 1.5px solid var(--line);
  background: #fff; font: inherit; cursor: pointer; transition: all .18s; position: relative; color: var(--ink);
}
.pbtn .pi { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); transition: all .18s; }
.pbtn strong { font-size: 14.5px; font-weight: 700; }
.pbtn small { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; min-height: 16px; }
.pbtn:hover:not(:disabled) { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow); }
.pbtn:hover:not(:disabled) .pi { background: var(--primary); color: #fff; }
.pbtn.next { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(0, 48, 135, .1); }
.pbtn.done { background: var(--success-50); border-color: #a7f3d0; }
.pbtn.done .pi { background: var(--success); color: #fff; }
.pbtn.done small { color: #047857; font-weight: 700; }
.pbtn:disabled:not(.done) { opacity: .5; cursor: not-allowed; }
.ponto-summary { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line-2); }
.ponto-summary .it { font-size: 12.5px; color: var(--muted); }
.ponto-summary .it b { display: block; font-size: 20px; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------------- To-do ---------------- */
.todo-add { display: flex; gap: 10px; }
.todo-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 340px; overflow-y: auto; }
.todo-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 11px; border: 1px solid var(--line-2); background: #fff; transition: background .15s; }
.todo-item:hover { background: var(--bg); }
.todo-item input { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; border: 2px solid #94a3b8; border-radius: 50%; cursor: pointer; flex: none; display: grid; place-items: center; margin: 0; transition: all .15s; }
.todo-item input:checked { background: var(--success); border-color: var(--success); }
.todo-item input:checked::after { content: ""; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.todo-item .tx { flex: 1; word-break: break-word; transition: color .2s; }
.todo-item.done .tx { text-decoration: line-through; color: var(--muted); }
.todo-item .rm { opacity: 0; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 6px; }
.todo-item:hover .rm, .todo-item .rm:focus-visible { opacity: 1; }
.todo-item .rm:hover { color: var(--danger); background: var(--danger-50); }
.todo-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 13px; color: var(--muted); }
.link-btn { background: none; border: 0; color: var(--primary); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
.link-btn:hover { text-decoration: underline; }
.empty { text-align: center; padding: 38px 20px; color: var(--muted); }
.empty .eic { width: 56px; height: 56px; border-radius: 16px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; margin: 0 auto 14px; }
.empty h3 { color: var(--ink); font-size: 16px; margin-bottom: 4px; }

/* ---------------- Modal (dialog) ---------------- */
dialog.modal { border: 0; padding: 0; border-radius: 18px; box-shadow: var(--shadow-lg); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto; color: var(--ink); }
dialog.modal::backdrop { background: rgba(10, 21, 48, .55); backdrop-filter: blur(3px); }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line-2); }
.modal-h h3 { font-size: 18px; font-weight: 750; display: flex; gap: 10px; align-items: center; }
.modal-h h3 .ico { color: var(--primary); }
.modal-b { padding: 24px; display: grid; gap: 18px; }
.modal-f { padding: 16px 24px; background: var(--bg); display: flex; justify-content: flex-end; gap: 10px; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: #f1f5f9; color: var(--ink); }

/* ---------------- Client 360 ---------------- */
.c360-head { display: flex; gap: 22px; align-items: center; padding: 26px; flex-wrap: wrap; }
.c360-av { width: 72px; height: 72px; border-radius: 20px; background: linear-gradient(135deg, var(--primary), #1d4fb8); color: #fff; display: grid; place-items: center; font-size: 26px; font-weight: 800; flex: none; box-shadow: 0 8px 20px rgba(0, 48, 135, .3); }
.c360-info { flex: 1; min-width: 220px; }
.c360-info h1 { font-size: 24px; font-weight: 800; }
.c360-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; color: var(--muted); font-size: 13.5px; }
.c360-meta span { display: inline-flex; align-items: center; gap: 7px; }
.c360-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.mini { padding: 12px 18px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; min-width: 140px; }
.mini .l { font-size: 11.5px; color: var(--muted); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.mini .v { font-size: 18px; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; }
.dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.dl .row { padding: 14px 24px; border-bottom: 1px solid var(--line-2); }
.dl .row:nth-last-child(-n+2) { border-bottom: 0; }
.dl dt { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.dl dd { margin: 3px 0 0; font-weight: 600; word-break: break-word; }
.doc-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.doc-row:last-child { border-bottom: 0; }
.doc-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); flex: none; }
.doc-row .tt { font-weight: 650; }
.doc-row .sub { font-size: 12.5px; color: var(--muted); }
.doc-row .grow { flex: 1; min-width: 0; }

/* ---------------- Auth ---------------- */
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(900px 500px at 15% -10%, rgba(0, 48, 135, .14), transparent 60%),
  radial-gradient(700px 480px at 100% 110%, rgba(255, 191, 0, .16), transparent 60%), var(--bg); }
.auth-card { width: min(440px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg); overflow: hidden; }
.auth-top { background: linear-gradient(135deg, var(--nav-bg), var(--primary)); padding: 30px 32px 26px; position: relative; }
.auth-top::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--accent); }
.auth-top .brand-logo { display: inline-flex; }
.auth-top h1 { color: #fff; font-size: 22px; margin-top: 20px; font-weight: 750; }
.auth-top p { color: #b9c7e6; font-size: 14px; margin-top: 4px; }
.auth-main { padding: 28px 32px 30px; display: grid; gap: 18px; }
.btn-google { background: #fff; color: #1f2937; border: 1px solid #cbd5e1; padding: 13px 18px; font-size: 15px; box-shadow: var(--shadow-sm); }
.btn-google:hover { background: var(--bg); border-color: #94a3b8; }
.auth-foot { font-size: 12.5px; color: var(--muted); text-align: center; line-height: 1.6; }
.sep { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.sep::before, .sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.res-ic { width: 68px; height: 68px; border-radius: 20px; display: grid; place-items: center; margin: 0 auto 6px; }

/* ---------------- Responsivo ---------------- */
@media (max-width: 1180px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .25s ease; box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(10, 21, 48, .5); z-index: 35; }
  .menu-btn { display: grid; }
  .topbar { padding: 12px 18px; }
  .content { padding: 24px 18px 48px; }
  .g3 { grid-template-columns: 1fr; }
  .ponto-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav a.active::before { left: -16px; }
}
@media (max-width: 640px) {
  .g2, .g4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .c3, .c4, .c5, .c6, .c8, .c12 { grid-column: auto; }
  .dl { grid-template-columns: 1fr; }
  .dl .row:nth-last-child(2) { border-bottom: 1px solid var(--line-2); }
  .clock .t { font-size: 17px; }
  .clock .d { display: none; }
  .page-head h1 { font-size: 23px; }
  .fsec { padding: 20px 16px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media print { .sidebar, .topbar, .no-print { display: none !important; } .app { display: block; } .content { padding: 0; } }

/* ======================================================================
   V2.0
   ====================================================================== */

/* ---- Topbar: sino + relógio ---- */
.top-right { display: flex; align-items: center; gap: 14px; }
.bell { position: relative; }
.bell-btn { position: relative; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--ink-2); transition: background .15s, border-color .15s; }
.bell-btn:hover, .bell-btn[aria-expanded="true"] { background: var(--primary-50); border-color: var(--primary-100); color: var(--primary); }
.bell-badge { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--bg); line-height: 1; font-variant-numeric: tabular-nums; }
.bell-badge[hidden] { display: none; }
.bell-pop { position: absolute; right: 0; top: calc(100% + 10px); width: min(380px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); z-index: 60; overflow: hidden; }
.bell-pop[hidden] { display: none; }
.bell-h { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.bell-empty { display: grid; justify-items: center; gap: 8px; padding: 32px 16px; color: var(--muted); font-size: 14px; }
.bell-item { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-bottom: 1px solid var(--line-2); color: var(--ink); text-decoration: none; }
.bell-item:last-child { border-bottom: 0; }
.bell-item:hover { background: var(--bg); }
.bell-item.unread { background: #f5f8ff; }
.bi-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; flex: none; }
.bi-tx { display: grid; gap: 2px; flex: 1; min-width: 0; }
.bi-t { font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.bi-d { font-size: 12px; color: var(--muted); }
.bi-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--danger); margin-top: 6px; flex: none; }
.link-btn.light { color: #fff; }

/* ---- Menu: pastilha vermelha ---- */
.nav a { position: relative; }
.nav-badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11.5px; font-weight: 800; display: inline-grid; place-items: center; }

/* ---- Telemóvel com bandeira ---- */
.phone { position: relative; display: flex; gap: 8px; align-items: stretch; }
.phone-btn { display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; font: inherit; font-weight: 650; color: var(--ink); min-height: 46px; white-space: nowrap; }
.phone-btn:hover { border-color: #cbd5e1; background: var(--bg); }
.phone-btn:focus-visible { outline: 3px solid var(--primary-100); border-color: var(--primary); }
.phone-btn .ico { color: var(--muted); }
.phone-num { flex: 1; min-width: 0; }
.flag { display: block; border-radius: 3px; flex: none; }
.phone-flag { display: inline-flex; }
.phone-list { position: absolute; left: 0; top: calc(100% + 6px); z-index: 40; width: min(320px, 100%); max-height: 280px; overflow: auto; margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); }
.phone-list[hidden] { display: none; }
.phone-list li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; cursor: pointer; font-size: 14px; }
.phone-list li:hover, .phone-list li:focus { background: var(--primary-50); outline: none; }
.phone-list li[aria-selected="true"] { background: var(--primary-50); font-weight: 700; }
.phone-list .nm { flex: 1; }
.phone-list .dl { color: var(--muted); font-variant-numeric: tabular-nums; }
.phone-inline { display: inline-flex; align-items: center; gap: 8px; }

/* ---- WhatsApp / ações em tabela ---- */
.wa { display: inline-flex; align-items: center; gap: 5px; color: #128c4a; font-weight: 650; font-size: 13px; text-decoration: none; }
.wa:hover { text-decoration: underline; }
.icon-act { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--muted); }
.icon-act:hover { background: var(--primary-50); color: var(--primary); }
.icon-act.wa { color: #128c4a; }
.icon-act.wa:hover { background: #e7f7ee; color: #0d6e3a; }
.tbl .right { text-align: right; }

/* ---- Importar CSV ---- */
.dropzone { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 28px 20px; border: 2px dashed #cbd5e1; border-radius: 16px; background: var(--bg); cursor: pointer; color: var(--ink-2); transition: border-color .15s, background .15s; position: relative; }
.dropzone:hover, .dropzone.drag { border-color: var(--primary); background: var(--primary-50); }
.dropzone.has-file { border-style: solid; border-color: var(--success); background: var(--success-50); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .ico { color: var(--primary); }

/* ---- Auditoria ---- */
.audit-v { max-width: 260px; word-break: break-word; font-size: 13px; }
.audit-v.old { color: #b91c1c; }
.audit-v.new { color: #047857; font-weight: 600; }

/* ---- Filtros segmentados ---- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 2px; }
.seg a { padding: 8px 14px; border-radius: 9px; font-size: 13.5px; font-weight: 650; color: var(--ink-2); text-decoration: none; }
.seg a:hover { background: var(--bg); }
.seg a.on { background: var(--primary); color: #fff; }
.row-link { cursor: pointer; }
.row-link:hover td { background: #f8fafc; }
.dot-new { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); margin-left: 8px; vertical-align: middle; }
.dept-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.input-sm { padding: 8px 10px; min-height: 38px; font-size: 13.5px; width: auto; }
.dl-1 { grid-template-columns: 1fr; }
.dl-1 .row:nth-last-child(-n+2) { border-bottom: 1px solid var(--line-2); }
.dl-1 .row:last-child { border-bottom: 0; }

/* ---- Timeline de tickets (chat) ---- */
.thread { display: grid; gap: 16px; margin-bottom: 22px; }
.th-row { display: flex; gap: 12px; align-items: flex-end; max-width: 88%; }
.th-row.mine { margin-left: auto; flex-direction: row-reverse; }
.th-av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 800; flex: none; color: #fff; }
.th-av.eq { background: linear-gradient(135deg, var(--primary), #1d4fb8); }
.th-av.cli { background: linear-gradient(135deg, #0f766e, #14b8a6); }
.th-bubble { background: var(--bg); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 12px 16px; min-width: 0; }
.th-row.mine .th-bubble { background: var(--primary-50); border-color: var(--primary-100); border-radius: 16px 16px 4px 16px; }
.th-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 12.5px; margin-bottom: 4px; }
.th-role { color: var(--muted); }
.th-time { color: var(--muted); margin-left: auto; font-variant-numeric: tabular-nums; }
.th-text { font-size: 14.5px; line-height: 1.6; word-break: break-word; }
.th-sys { text-align: center; }
.th-sys span { display: inline-flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); padding: 6px 14px; border-radius: 999px; }
.th-sys em { font-style: normal; opacity: .8; }
.reply-box { display: grid; gap: 10px; border-top: 1px solid var(--line-2); padding-top: 18px; }
.reply-box textarea { min-height: 110px; }

/* ---- Mural ---- */
.mural-item.pinned { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 191, 0, .15), var(--shadow-sm); }
.mural-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: 13px; color: var(--muted); }
.mural-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--primary-50); color: var(--primary); display: inline-grid; place-items: center; flex: none; }
.mural-t { font-size: 19px; margin: 12px 0 6px; }
.mural-b { color: var(--ink-2); line-height: 1.65; }
.mural-actions { display: flex; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.mural-mini { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; }
.mural-mini:hover { background: var(--bg); }
.mural-mini.pinned { border-color: var(--accent); background: #fffdf5; }
.mm-tx { display: grid; gap: 2px; flex: 1; min-width: 0; font-size: 14px; }
.mm-tx .muted { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Termos (ecrã completo) ---- */
.fs-body { margin: 0; min-height: 100vh; background: var(--bg); }
.terms-shell { min-height: 100vh; display: flex; flex-direction: column; }
.terms-top { display: flex; align-items: center; justify-content: space-between; padding: 16px clamp(16px, 4vw, 48px); background: linear-gradient(135deg, var(--nav-bg), var(--primary)); border-bottom: 4px solid var(--accent); }
.terms-main { width: min(860px, 100%); margin: 0 auto; padding: 32px 20px 48px; display: grid; gap: 20px; flex: 1; align-content: start; }
.terms-intro h1 { font-size: 26px; font-weight: 800; }
.terms-intro p { color: var(--muted); margin-top: 6px; }
.terms-doc { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px clamp(18px, 4vw, 36px); max-height: 52vh; overflow: auto; line-height: 1.7; color: var(--ink-2); box-shadow: var(--shadow-sm); }
.terms-doc h2 { font-size: 16px; color: var(--primary); margin: 22px 0 6px; }
.terms-doc h2:first-child { margin-top: 0; }
.terms-doc p { margin: 0 0 10px; font-size: 14.5px; }
.terms-accept { display: grid; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 24px; position: sticky; bottom: 16px; box-shadow: var(--shadow); }
.terms-chk { align-items: flex-start; }
.forgot { justify-self: end; font-size: 13px; margin-top: 6px; display: inline-block; }

@media (max-width: 640px) {
  .th-row { max-width: 100%; }
  .phone { flex-wrap: wrap; }
  .phone-btn { min-height: 44px; }
  .bell-pop { position: fixed; left: 16px; right: 16px; top: 68px; width: auto; }
  .terms-doc { max-height: 46vh; }
}
@media print { .bell, .top-right .bell { display: none !important; } }

/* ===================== V2.1 ===================== */
/* Frase do dia (substitui o texto fixo do cabeçalho) */
.quote{margin:0;display:flex;align-items:center;gap:10px;min-width:0;color:var(--muted,#64748b)}
.quote svg{flex:none;color:var(--accent,#ffbf00)}
.quote blockquote{margin:0;font-size:13.5px;font-style:italic;color:var(--ink,#0f172a);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:min(52vw,640px)}
.quote figcaption{font-size:12.5px;white-space:nowrap;flex:none}
@media (max-width:1100px){.quote figcaption{display:none}.quote blockquote{max-width:42vw}}
@media (max-width:640px){.quote{display:none}}

/* Atalhos */
.shortcut-group{margin-bottom:28px}
.sg-title{font-size:13px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted,#64748b);margin:0 0 12px;font-weight:700}
.sg-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:14px}
.sg-card{display:flex;align-items:center;gap:14px;padding:16px 18px;background:#fff;border:1px solid var(--line,#e2e8f0);border-radius:14px;text-decoration:none;color:inherit;transition:transform .15s,box-shadow .15s,border-color .15s}
a.sg-card:hover,a.sg-card:focus-visible{transform:translateY(-2px);box-shadow:0 10px 24px rgba(15,23,42,.08);border-color:var(--primary,#003087);outline:none}
.sg-ic{display:grid;place-items:center;width:48px;height:48px;border-radius:12px;background:rgba(0,48,135,.08);color:var(--primary,#003087);flex:none}
.sg-tx{display:grid;gap:2px;min-width:0;flex:1}
.sg-tx strong{color:var(--ink,#0f172a);font-size:15px}
.sg-tx small{color:var(--muted,#64748b);font-size:12.5px;line-height:1.35}
.sg-tx .soon{justify-self:start;margin-top:4px}
.sg-go{color:var(--muted,#94a3b8)}
.sg-card.is-soon{opacity:.62;cursor:not-allowed;background:#f8fafc}

/* Revelar valores sensíveis */
.reveal{display:inline-flex;align-items:center;gap:6px}
.reveal-btn{border:0;background:transparent;cursor:pointer;color:var(--muted,#64748b);padding:4px;border-radius:8px}
.reveal-btn:hover{background:#eef2f7;color:var(--primary,#003087)}

/* Checklist / progresso */
.progress{height:12px;background:#e8edf5;border-radius:999px;overflow:hidden}
.progress>span{display:block;height:100%;background:linear-gradient(90deg,var(--primary,#003087),#1d5bd8);border-radius:999px;transition:width .4s}
.check-list{list-style:none;margin:0 0 14px;padding:0;display:grid;gap:6px}
.check-list li{display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px solid var(--line-2,#eef2f7);border-radius:10px}
.check-list li.done{color:#64748b;background:#f8fafc}.check-list li.done .grow{text-decoration:line-through}
.check-list .chk{border:0;background:none;cursor:pointer;color:#94a3b8;padding:2px}
.check-list li.done .chk{color:var(--success,#10b981)}
.inline-add{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.inline-add .input{flex:1;min-width:200px}
.chip-check{display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border:1px solid var(--line,#e2e8f0);border-radius:10px;background:#fff;cursor:pointer;font-size:14px}
.chip-check.perm{display:flex;align-items:flex-start;padding:12px 14px}
.missing-list{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.missing-list li{display:flex;align-items:center;gap:8px;color:#92400e}
.pos{color:var(--success,#10b981)}

/* Dashboard do cliente com banner vertical à direita */
.dash-layout.has-aside{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:24px;align-items:start}
.dash-aside{position:sticky;top:90px;display:grid;gap:16px}
.promo-banner{display:block;border-radius:16px;overflow:hidden;border:1px solid var(--line,#e2e8f0);box-shadow:0 8px 22px rgba(15,23,42,.08)}
.promo-banner img{display:block;width:100%;height:auto}
@media (max-width:1100px){.dash-layout.has-aside{grid-template-columns:1fr}.dash-aside{position:static;grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}}

/* Anexos */
.th-file{display:inline-flex;align-items:center;gap:8px;margin-top:8px;padding:6px 10px;border:1px solid var(--line,#e2e8f0);border-radius:10px;background:#fff;font-size:13px;text-decoration:none;color:var(--primary,#003087);max-width:100%}
.th-file span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.th-file em{color:#94a3b8;font-style:normal;font-size:12px}
.th-bubble .th-file{display:flex;width:fit-content}
.attach label{display:flex;align-items:center;gap:6px}

/* Equipa premium */
.team-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(330px,1fr));gap:18px}
.team-card{background:#fff;border:1px solid var(--line,#e2e8f0);border-radius:18px;padding:20px;display:grid;gap:14px;box-shadow:0 1px 2px rgba(15,23,42,.04)}
.team-card.is-off{opacity:.65}
.team-card header{display:flex;align-items:center;gap:14px}
.team-card .tc-id{display:grid;min-width:0;flex:1}.team-card .tc-id span{font-size:12.5px;overflow:hidden;text-overflow:ellipsis}
.avatar-lg{width:52px;height:52px;font-size:18px}.avatar-lg img{width:100%;height:100%;border-radius:50%;object-fit:cover}
.tc-chips{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.chip{display:inline-flex;padding:4px 10px;border-radius:999px;background:rgba(0,48,135,.08);color:var(--primary,#003087);font-size:12.5px;font-weight:600}
.team-card footer{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;border-top:1px solid var(--line-2,#eef2f7);padding-top:12px}
.tc-actions{display:inline-flex;gap:8px}
.fs{border:1px solid var(--line,#e2e8f0);border-radius:12px;padding:12px 14px;margin:0}.fs legend{padding:0 6px;font-weight:600;font-size:13px}
.check-grid{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:6px}

/* Banners (admin) */
.banner-row{display:grid;grid-template-columns:110px 1fr;gap:14px;padding:14px;border:1px solid var(--line,#e2e8f0);border-radius:14px}
.banner-row img{width:110px;height:auto;border-radius:10px;border:1px solid var(--line,#e2e8f0)}
.banner-form{display:grid;gap:8px}.banner-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.banner-row>.banner-actions{grid-column:1/-1}
.alt-row{display:flex;justify-content:space-between;gap:14px;align-items:center;flex-wrap:wrap;padding:12px 14px;border:1px solid var(--line,#e2e8f0);border-radius:12px}
.check-list .grow{flex:1;min-width:0}

/* V2.1.1: checklist com envio por item + celebração */
@keyframes pgrow{from{width:0}}
.progress>span{animation:pgrow .9s ease-out}
.ck-items{margin-top:14px}
.ck-items .doc-row{padding:12px 0}
.celebrate{border:0;border-radius:18px;padding:34px 30px;max-width:420px;width:calc(100% - 32px);text-align:center;box-shadow:0 24px 70px rgba(15,23,42,.35)}
.celebrate::backdrop{background:rgba(15,23,42,.45)}
.celebrate .cel-ic{width:76px;height:76px;margin:0 auto 14px;border-radius:50%;background:#e3f6ea;color:#14803c;display:grid;place-items:center}
.celebrate h2{margin:0 0 8px;font-size:22px}
.celebrate p{margin:0 0 20px;color:var(--muted)}
@media (prefers-reduced-motion:reduce){.progress>span{animation:none}}
/* V2.1.1: com banner lateral os KPIs do dashboard do cliente ficam mais estreitos; evita cortar valores */
.dash-layout.has-aside .kpi .vl{font-size:22px !important;white-space:nowrap}

/* ---- V3.0-C: métricas e gamificação ---- */
.rk-row{display:flex;align-items:center;gap:10px;padding:8px 12px;border-radius:10px;background:#f8fafc;font-size:14px}
.rk-row.me{background:#e8f0ff;outline:1px solid #b9cdf7}
.rk-pos{width:34px;font-weight:700;color:var(--muted,#64748b)}
.rk-nm{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.live{display:inline-flex;align-items:center;gap:8px;font-size:13px}
.live-dot{width:10px;height:10px;border-radius:50%;background:#94a3b8;display:inline-block}
.live-dot.on{background:#10b981;box-shadow:0 0 0 0 rgba(16,185,129,.6);animation:livepulse 2s infinite}
.live-dot.off{background:#ef4444}
@keyframes livepulse{70%{box-shadow:0 0 0 8px rgba(16,185,129,0)}100%{box-shadow:0 0 0 0 rgba(16,185,129,0)}}
.bars{display:flex;align-items:flex-end;gap:6px;height:150px}
.bar-col{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;gap:3px;min-width:0}
.bar{width:100%;background:linear-gradient(180deg,#1d5bd8,#003087);border-radius:6px 6px 2px 2px;min-height:3px;transition:height .4s}
.bar-n{font-size:11px;font-weight:700;color:#334155}
.bar-d{font-size:10px;color:#64748b}
.feed{list-style:none;margin:0;padding:0;display:grid;gap:10px;font-size:14px}
.pulse{animation:kpulse .6s ease-out}
@keyframes kpulse{0%{color:#10b981;transform:scale(1.08)}100%{transform:none}}
@media (prefers-reduced-motion:reduce){.live-dot.on,.pulse,.bar{animation:none;transition:none}}
