/* Guedes GmbH — gestão de limpezas: estilos (mobile-first), cores da marca vermelho e branco */
:root {
  --bg: #f5f5f6;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --surface-3: #f0f0f2;
  --border: #e6e6e9;
  --border-strong: #d2d2d8;
  --text: #1a1a1f;
  --text-2: #44444e;
  --muted: #72727d;
  --brand: #c4161c;
  --brand-dark: #8a0d12;
  --primary: #c4161c;
  --primary-hover: #a31217;
  --primary-50: #fdeceb;
  --primary-100: #f8cfcc;
  --on-primary: #ffffff;
  --success: #15803d;
  --success-50: #e7f6ec;
  --warning: #b45309;
  --warning-50: #fdf2e1;
  --danger: #a8170f;
  --danger-50: #fbe9e7;
  --info: #1d4ed8;
  --info-50: #e8eefd;
  --pin: #8a5a00;
  --pin-50: #fff6d6;
  --pin-border: #f3d77a;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 31, 42, 0.06);
  --shadow: 0 1px 2px rgba(15, 31, 42, 0.06), 0 6px 16px rgba(15, 31, 42, 0.05);
  --shadow-lg: 0 16px 40px rgba(15, 31, 42, 0.22);
  --nav-h: 62px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121214;
    --surface: #1b1b1f;
    --surface-2: #212126;
    --surface-3: #29292f;
    --border: #303037;
    --border-strong: #42424a;
    --text: #ededf0;
    --text-2: #c3c3ca;
    --muted: #8f8f99;
    --primary: #ec3d33;
    --primary-hover: #ff574d;
    --primary-50: #3a1513;
    --primary-100: #56201c;
    --on-primary: #ffffff;
    --success: #4ade80;
    --success-50: #11301d;
    --warning: #fbbf24;
    --warning-50: #33260d;
    --danger: #ff7b70;
    --danger-50: #3d1715;
    --info: #93b4ff;
    --info-50: #172240;
    --pin: #fcd34d;
    --pin-50: #2e260b;
    --pin-border: #6b5410;
    --shadow-sm: none;
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.02);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.55);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Layout ---------- */
.app { min-height: 100vh; }
.sidebar { display: none; }
.main { min-width: 0; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 20px); }
.page { max-width: 1180px; margin: 0 auto; }
.page-head {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  min-height: 58px; padding: 8px 14px;
  padding-top: calc(8px + env(safe-area-inset-top, 0px));
  background: rgba(245, 245, 246, 0.92);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
@media (prefers-color-scheme: dark) { .page-head { background: rgba(18, 18, 20, 0.9); } }
.page-head .titles { flex: 1; min-width: 0; }
.page-head h1 { font-size: 19px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-head .sub { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-head .actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.page-body { padding: 14px; display: flex; flex-direction: column; gap: 14px; }

.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; background: var(--surface); border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -4px 16px rgba(15, 31, 42, 0.05);
}
.bottom-nav a, .bottom-nav button {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  height: var(--nav-h); color: var(--muted); font-size: 11px; font-weight: 650; position: relative;
  background: none; border: 0; cursor: pointer; padding: 0;
}
.bottom-nav .active { color: var(--primary); }
.bottom-nav .active::before {
  content: ''; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--primary);
}
.nav-badge {
  position: absolute; top: 7px; left: calc(50% + 6px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 750; line-height: 18px; text-align: center;
}

@media (min-width: 960px) {
  .app { display: grid; grid-template-columns: 252px minmax(0, 1fr); }
  .sidebar {
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
    background: var(--surface); border-right: 1px solid var(--border); padding: 18px 12px;
    border-top: 4px solid var(--brand);
  }
  .bottom-nav { display: none; }
  .main { padding-bottom: 40px; }
  .page-head { min-height: 72px; padding: 14px 28px; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom: 0; position: static; }
  .page-head h1 { font-size: 25px; }
  .page-head .sub { font-size: 14px; }
  .page-body { padding: 4px 28px 28px; gap: 18px; }
  .mobile-only { display: none !important; }
}
@media (max-width: 959px) { .desktop-only { display: none !important; } }

.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.brand-logo {
  --size: 40px; width: var(--size); height: var(--size); border-radius: calc(var(--size) * 0.24); display: grid; place-items: center; flex-shrink: 0;
  background: #fff; overflow: hidden; box-shadow: 0 0 0 1px var(--border), 0 4px 12px rgba(196, 22, 28, 0.22);
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.brand-name { font-weight: 800; font-size: 16px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.brand-sub { font-size: 12px; color: var(--muted); max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 10px;
  color: var(--text-2); font-weight: 600; font-size: 14.5px; position: relative;
}
.side-nav a:hover { background: var(--surface-3); }
.side-nav a.active { background: var(--primary-50); color: var(--primary); }
.side-nav .count { margin-left: auto; background: var(--danger); color: #fff; font-size: 11px; font-weight: 750; border-radius: 9px; padding: 1px 7px; }
.side-section { font-size: 11px; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 16px 11px 6px; }
.side-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 4px; border-top: 1px solid var(--border); }
.side-user .who { flex: 1; min-width: 0; }
.side-user .who b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user .who span { font-size: 12px; color: var(--muted); }

/* ---------- Cards e secções ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 14px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.card-head h3 { font-size: 15px; font-weight: 720; flex: 1; display: flex; align-items: center; gap: 8px; }
.card-body { padding: 14px; }
.section-title { display: flex; align-items: center; gap: 8px; margin: 4px 2px -4px; }
.section-title h2 { font-size: 16px; font-weight: 750; flex: 1; display: flex; align-items: center; gap: 8px; }
.section-title .link { font-size: 13.5px; font-weight: 650; }
.grid { display: grid; gap: 12px; }
.grid-2 { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.grid-2 > *, .stack > * { min-width: 0; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.grid-cards { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .grid-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .grid-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; gap: 8px; }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.bold { font-weight: 700; }
.nowrap { white-space: nowrap; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pre { white-space: pre-wrap; word-break: break-word; }
.center { text-align: center; }
.divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 42px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font-weight: 650; font-size: 14.5px; cursor: pointer;
  white-space: nowrap; transition: background 0.15s, border-color 0.15s, transform 0.05s; user-select: none;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(1.06); background: var(--success); }
.btn-warning { background: #d97706; border-color: #d97706; color: #fff; }
.btn-warning:hover { background: #c26a05; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.06); background: var(--danger); }
.btn-soft { background: var(--primary-50); border-color: transparent; color: var(--primary); }
.btn-soft:hover { background: var(--primary-100); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-danger-ghost { background: transparent; border-color: transparent; color: var(--danger); }
.btn-danger-ghost:hover { background: var(--danger-50); }
@media (prefers-color-scheme: dark) {
  .btn-success, .btn-danger { color: #0b0f12; }
}
.btn-sm { min-height: 34px; padding: 0 11px; font-size: 13.5px; border-radius: 9px; gap: 5px; }
.btn-lg { min-height: 54px; padding: 0 22px; font-size: 16.5px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-icon { width: 42px; padding: 0; }
.btn-icon.btn-sm { width: 34px; }
.btn .spin { width: 16px; height: 16px; border-width: 2px; }

/* ---------- Formulários ---------- */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label, .label { font-size: 13px; font-weight: 650; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 11px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-size: 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); }
.textarea { min-height: 90px; resize: vertical; line-height: 1.45; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 34px;
  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='%236a7b87' stroke-width='2.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 11px center;
}
.select-sm, .input-sm { min-height: 36px; padding: 6px 10px; font-size: 14px; border-radius: 9px; }
.select-sm { padding-right: 30px; background-position: right 8px center; }
input[type='time'].input, input[type='date'].input { min-width: 0; }
.form-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
.form-grid-2 { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.form-grid-3 { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 640px) { .form-grid.cols-2 { grid-template-columns: 1fr 1fr; } }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; font-size: 14.5px; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); flex-shrink: 0; }
.check-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; max-height: 300px; overflow-y: auto; }
.check-list .check { padding: 6px 12px; border-bottom: 1px solid var(--border); }
.check-list .check:last-child { border-bottom: 0; }
.input-icon { position: relative; }
.input-icon .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon .input { padding-left: 38px; }
.error-box { background: var(--danger-50); color: var(--danger); border-radius: 10px; padding: 10px 12px; font-size: 14px; font-weight: 550; }

.segmented { display: inline-flex; background: var(--surface-3); border-radius: 11px; padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; }
.segmented button {
  border: 0; background: transparent; padding: 7px 13px; border-radius: 8px; font-weight: 650; font-size: 13.5px;
  color: var(--text-2); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
}
.segmented button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.segmented .n { background: var(--surface-3); border-radius: 8px; padding: 0 6px; font-size: 11.5px; }
.segmented button.on .n { background: var(--primary-50); color: var(--primary); }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- Badges, chips, avatares ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 7px;
  font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--surface-3); color: var(--text-2);
}
.badge.green { background: var(--success-50); color: var(--success); }
.badge.orange { background: var(--warning-50); color: var(--warning); }
.badge.red { background: var(--danger-50); color: var(--danger); }
.badge.blue { background: var(--info-50); color: var(--info); }
.badge.teal { background: var(--primary-50); color: var(--primary); }
.badge.yellow { background: var(--pin-50); color: var(--pin); }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.live .dot { animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.25; } 100% { opacity: 1; } }
.team-tag { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.team-dot { width: 10px; height: 10px; border-radius: 4px; flex-shrink: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 12px; border-radius: 16px;
  border: 1px solid var(--border-strong); background: var(--surface); font-size: 13.5px; font-weight: 600; cursor: pointer; color: var(--text-2);
}
.chip:hover { background: var(--surface-3); }
.chip.on { background: var(--primary-50); border-color: var(--primary); color: var(--primary); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.avatar {
  --size: 32px; width: var(--size); height: var(--size); border-radius: 50%; flex-shrink: 0;
  display: inline-grid; place-items: center; color: #fff; font-weight: 750; font-size: calc(var(--size) * 0.38);
  letter-spacing: 0.01em; border: 2px solid var(--surface); user-select: none;
}
.avatar.photo { background: var(--surface-3) !important; overflow: hidden; }
.avatar.photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatars { display: inline-flex; align-items: center; }
.avatars .avatar { margin-left: -5px; }
.avatars .avatar:first-child { margin-left: 0; }
.avatars .more { background: var(--surface-3); color: var(--text-2); }
.person { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.person b { font-weight: 650; }

/* ---------- Listas ---------- */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--border); min-width: 0; }
.list-item:last-child { border-bottom: 0; }
.list-item.clickable { cursor: pointer; }
.list-item.clickable:hover { background: var(--surface-2); }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 650; }
.list-item .meta { color: var(--muted); font-size: 13px; }

/* ---------- KPIs ---------- */
.kpis { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); display: block; color: inherit; }
a.kpi:hover { border-color: var(--border-strong); }
.kpi .k-label { font-size: 12.5px; color: var(--muted); font-weight: 650; display: flex; align-items: center; gap: 6px; }
.kpi .k-value { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin-top: 2px; line-height: 1.15; }
.kpi .k-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.kpi.alert .k-value { color: var(--warning); }
.kpi.danger .k-value { color: var(--danger); }
.kpi.good .k-value { color: var(--success); }
.progress { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; margin-top: 8px; }
.progress > span { display: block; height: 100%; background: var(--primary); border-radius: 3px; }

/* ---------- Tabs ---------- */
.tabs {
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border);
  margin: 0 -14px; padding: 0 14px; position: sticky; top: 58px; z-index: 20; background: var(--bg);
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 6px; padding: 11px 12px; border: 0; background: none; cursor: pointer;
  font-weight: 680; font-size: 14px; color: var(--muted); border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tab.on { color: var(--primary); border-bottom-color: var(--primary); }
.tab .n { background: var(--surface-3); color: var(--text-2); border-radius: 8px; padding: 0 6px; font-size: 11.5px; font-weight: 750; }
.tab.on .n { background: var(--primary-50); color: var(--primary); }
.tab .n.alert { background: var(--warning-50); color: var(--warning); }
@media (min-width: 960px) { .tabs { margin: 0; padding: 0; top: 0; } }

/* ---------- Cartões de serviço ---------- */
.job-card { display: flex; gap: 12px; padding: 12px; align-items: stretch; cursor: pointer; position: relative; overflow: hidden; color: inherit; }
.job-card:hover { border-color: var(--border-strong); }
.job-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--team, var(--border-strong)); }
.job-thumb { width: 74px; height: 74px; border-radius: 11px; object-fit: cover; flex-shrink: 0; background: var(--surface-3); }
.thumb-ph { display: grid; place-items: center; color: var(--muted); background: linear-gradient(135deg, var(--primary-50), var(--surface-3)); }
.job-card .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.job-card .title { font-weight: 720; font-size: 15.5px; }
.job-card .meta { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--muted); font-size: 13px; align-items: center; }
.job-card .meta span { display: inline-flex; align-items: center; gap: 4px; }
.job-card .foot { display: flex; align-items: center; gap: 8px; margin-top: 2px; flex-wrap: wrap; }
.job-card.cancelled { opacity: 0.6; }
.job-card.cancelled .title { text-decoration: line-through; }
.job-actions { display: flex; flex-direction: column; justify-content: center; gap: 6px; }

/* ---------- Hero (serviço / alojamento) ---------- */
.hero { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-3); min-height: 190px; display: flex; align-items: flex-end; }
.hero img.cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.55) 40%, rgba(0, 0, 0, 0.85) 100%); }
@media (max-width: 959px) { .hero { min-height: 230px; } .hero .hchip { font-size: 12px; padding: 3px 8px; } .hero h2 { font-size: 21px; } }
.hero .content { position: relative; padding: 16px; color: #fff; width: 100%; }
.hero h2 { font-size: 23px; font-weight: 800; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35); }
.hero .addr { opacity: 0.92; font-size: 14px; margin-top: 3px; display: flex; align-items: center; gap: 5px; }
.hero .chips-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hero .hchip { background: rgba(255, 255, 255, 0.2); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: #fff; border-radius: 8px; padding: 3px 9px; font-size: 12.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.hero.no-photo { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); }
.hero .photo-btn { position: absolute; top: 12px; right: 12px; z-index: 2; }
@media (min-width: 960px) { .hero { min-height: 250px; } .hero h2 { font-size: 28px; } }

/* ---------- Tempo (entrada / saída) ---------- */
.timebox { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.timeslot { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; background: var(--surface-2); }
.timeslot .t-label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; display: flex; align-items: center; gap: 5px; }
.timeslot .t-value { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.timeslot .t-value.empty, .timeslot .t-value.t-empty { color: var(--border-strong); }
.timeslot .t-by { font-size: 12px; color: var(--muted); }
.duration-banner { margin-top: 10px; border-radius: 12px; padding: 12px 14px; background: var(--success-50); color: var(--success); display: flex; align-items: center; gap: 10px; font-weight: 700; }
.duration-banner .big { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.duration-banner.live { background: var(--info-50); color: var(--info); }
.duration-banner.ok { background: var(--success-50); color: var(--success); }
.duration-banner.bad { background: var(--danger-50); color: var(--danger); }

/* ---------- Relógio de ponto ---------- */
.clock-card { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.clock-top { display: flex; align-items: center; gap: 12px; }
.clock-state { flex: 1; min-width: 0; }
.clock-state .state-label { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.clock-state .state-time { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; margin-top: 2px; }
.clock-state .state-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.clock-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex-shrink: 0; }
.clock-icon.off { background: var(--surface-3); color: var(--muted); }
.clock-icon.working { background: var(--success-50); color: var(--success); }
.clock-icon.break { background: var(--warning-50); color: var(--warning); }
.clock-icon.done { background: var(--info-50); color: var(--info); }
.clock-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.clock-actions .full { grid-column: 1 / -1; }
.clock-stats { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.clock-stats b { font-variant-numeric: tabular-nums; }
.break-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.status-pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-pill.working { background: var(--success-50); color: var(--success); }
.status-pill.working .dot { animation: pulse 1.6s infinite; }
.status-pill.break { background: var(--warning-50); color: var(--warning); }
.status-pill.done { background: var(--info-50); color: var(--info); }
.status-pill.off { background: var(--surface-3); color: var(--muted); }

/* ---------- Timeline / registos ---------- */
.timeline { display: flex; flex-direction: column; gap: 0; padding-left: 4px; }
.tl-item { display: flex; gap: 12px; position: relative; padding-bottom: 14px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ''; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--border); }
.tl-item:last-child::before { display: none; }
.tl-icon { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex-shrink: 0; position: relative; }
.tl-icon.green { background: var(--success-50); color: var(--success); }
.tl-icon.blue { background: var(--info-50); color: var(--info); }
.tl-icon.orange { background: var(--warning-50); color: var(--warning); }
.tl-icon.teal { background: var(--primary-50); color: var(--primary); }
.tl-body { padding-top: 3px; min-width: 0; }
.tl-body .when { font-size: 12px; color: var(--muted); }

/* ---------- Notas ---------- */
.note { border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; background: var(--surface); display: flex; gap: 11px; border-left: 4px solid var(--author, var(--border-strong)); }
.note .n-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.note .n-author { font-weight: 750; color: var(--author-text, var(--text)); }
.note .n-when { font-size: 12px; color: var(--muted); }
.note .n-text { margin-top: 4px; white-space: pre-wrap; word-break: break-word; }
.note .grow { flex: 1; min-width: 0; }
.note.pinned { background: var(--pin-50); border-color: var(--pin-border); border-left-color: #e0a100; }
.note-actions { display: flex; gap: 2px; margin-left: auto; }

/* ---------- Material em falta ---------- */
.miss-item { display: flex; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--border); align-items: flex-start; }
.miss-item:last-child { border-bottom: 0; }
.miss-item .grow { flex: 1; min-width: 0; }
.miss-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: var(--warning-50); color: var(--warning); }
.miss-item.urgent .miss-icon { background: var(--danger-50); color: var(--danger); }
.miss-item.done { background: var(--success-50); }
.miss-item.done .miss-icon { background: var(--success); color: #fff; }
.miss-item.done .m-title { text-decoration: line-through; text-decoration-color: rgba(21, 128, 61, 0.5); }
.m-title { font-weight: 700; font-size: 15px; }
.m-qty { font-weight: 650; color: var(--text-2); }
.m-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.m-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.prop-group-head { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0; }
.prop-group-head img, .prop-group-head .thumb-ph { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }

/* ---------- Fotografias ---------- */
.photo-grid { display: grid; gap: 6px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 620px) { .photo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .photo-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.photo-tile { position: relative; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: var(--surface-3); cursor: zoom-in; border: 0; padding: 0; }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; }
.photo-tile .cover-flag { position: absolute; top: 6px; left: 6px; background: rgba(0, 0, 0, 0.6); color: #ffd84d; border-radius: 7px; padding: 2px 6px; font-size: 11px; font-weight: 750; display: flex; align-items: center; gap: 3px; }
.photo-tile .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 5px; font-size: 11px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, 0.65)); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-group + .room-group { margin-top: 14px; }
.room-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-weight: 750; font-size: 14px; }
.room-head .n { color: var(--muted); font-weight: 600; font-size: 13px; }
.add-tile { aspect-ratio: 1 / 1; border-radius: 10px; border: 2px dashed var(--border-strong); background: var(--surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 700; cursor: pointer; }
.add-tile:hover { border-color: var(--primary); color: var(--primary); }

.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(5, 8, 10, 0.94); display: flex; flex-direction: column; color: #fff; }
.lb-top { display: flex; align-items: center; gap: 8px; padding: 10px 12px; padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
.lb-top .grow { flex: 1; min-width: 0; }
.lb-top .btn { background: rgba(255, 255, 255, 0.12); border-color: transparent; color: #fff; }
.lb-top .btn:hover { background: rgba(255, 255, 255, 0.2); }
.lb-stage { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; touch-action: pan-y; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.14); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lb-nav.prev { left: 10px; }
.lb-nav.next { right: 10px; }
.lb-info { padding: 12px 16px; padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); font-size: 14px; }
.lb-info .room { font-weight: 750; font-size: 16px; }
.lb-info .meta { opacity: 0.7; font-size: 12.5px; margin-top: 2px; }

.upload-preview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.upload-preview .up { position: relative; aspect-ratio: 1 / 1; border-radius: 9px; overflow: hidden; background: var(--surface-3); }
.upload-preview .up img { width: 100%; height: 100%; object-fit: cover; }
.upload-preview .up .state { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0.45); color: #fff; font-weight: 750; font-size: 12px; }
.upload-preview .up .rm { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, 0.6); color: #fff; display: grid; place-items: center; cursor: pointer; }

/* ---------- Alojamentos ---------- */
.prop-card { overflow: hidden; cursor: pointer; display: flex; flex-direction: column; color: inherit; }
.prop-card:hover { border-color: var(--border-strong); }
.prop-cover { position: relative; aspect-ratio: 16 / 10; background: var(--surface-3); }
.prop-cover img { width: 100%; height: 100%; object-fit: cover; }
.prop-cover .thumb-ph { width: 100%; height: 100%; }
.prop-cover .badges { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.prop-cover .badge { box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); }
.prop-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 5px; }
.prop-body .name { font-weight: 750; font-size: 16px; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 13px; }
.facts span { display: inline-flex; align-items: center; gap: 4px; }
.info-list { display: flex; flex-direction: column; }
.info-row { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.info-row:last-child { border-bottom: 0; }
.info-row .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-3); color: var(--text-2); display: grid; place-items: center; flex-shrink: 0; }
.info-row .k { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.info-row .v { font-weight: 600; white-space: pre-wrap; word-break: break-word; }
.callout { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--info-50); color: var(--info); font-size: 14px; align-items: flex-start; }
.callout.warn { background: var(--warning-50); color: var(--warning); }
.callout.danger { background: var(--danger-50); color: var(--danger); }
.callout.ok { background: var(--success-50); color: var(--success); }
.callout .grow { flex: 1; min-width: 0; }
.callout b { font-weight: 750; }
.callout .btn { flex-shrink: 0; }

/* ---------- Calendário ---------- */
.cal-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-title { font-size: 17px; font-weight: 750; flex: 1; min-width: 140px; }
.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--border); gap: 1px; }
.cal-dow { background: var(--surface-2); padding: 7px 4px; font-size: 11.5px; font-weight: 750; color: var(--muted); text-align: center; text-transform: uppercase; }
.cal-cell { background: var(--surface); min-height: 64px; padding: 5px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; min-width: 0; border: 0; text-align: left; }
.cal-cell:hover { background: var(--surface-2); }
.cal-cell.other { background: var(--surface-2); }
.cal-cell.other .dnum { color: var(--border-strong); }
.cal-cell .dnum { font-size: 13px; font-weight: 700; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; }
.cal-cell.today .dnum { background: var(--primary); color: var(--on-primary); }
.cal-chip { font-size: 11.5px; font-weight: 650; padding: 2px 5px; border-radius: 5px; background: var(--surface-3); border-left: 3px solid var(--team, var(--border-strong)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.cal-chip.done { opacity: 0.55; }
.cal-chip.cancelled { opacity: 0.45; text-decoration: line-through; }
.cal-chip.unassigned { background: var(--warning-50); }
.cal-more { font-size: 11px; font-weight: 700; color: var(--muted); padding-left: 3px; }
.cal-dots { display: flex; flex-wrap: wrap; gap: 3px; padding: 0 2px; }
.cal-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--team, var(--border-strong)); display: block; }
.cal-count { font-size: 10.5px; color: var(--muted); font-weight: 700; padding-left: 2px; }
@media (max-width: 719px) { .cal-chip, .cal-more { display: none; } }
@media (min-width: 720px) { .cal-dots, .cal-count { display: none; } .cal-cell { min-height: 108px; } }
.cal-week { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .cal-week { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; } }
.cal-day-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cal-day-head { display: flex; align-items: baseline; gap: 6px; padding: 4px 2px; cursor: pointer; }
.cal-day-head b { font-size: 14px; }
.cal-day-head.today b { color: var(--primary); }
.mini-job { padding: 8px 10px 8px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--team, var(--border-strong)); cursor: pointer; font-size: 13px; color: inherit; display: block; }
.mini-job:hover { border-color: var(--border-strong); }
.mini-job .t { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-job .m { color: var(--muted); font-size: 12px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mini-job.done { opacity: 0.65; }
.plan-group { display: flex; flex-direction: column; gap: 8px; }
.plan-group-head { display: flex; align-items: center; gap: 8px; padding: 2px; }
.plan-group-head h3 { font-size: 15px; font-weight: 750; }
.plan-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; border-top: 1px dashed var(--border); background: var(--surface-2); }

/* ---------- Modal / folha ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(8, 15, 20, 0.5); display: flex; align-items: flex-end; justify-content: center; animation: fade 0.15s ease-out; }
.modal {
  background: var(--surface); width: 100%; max-height: 92vh; border-radius: 20px 20px 0 0; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); animation: up 0.2s ease-out; padding-bottom: env(safe-area-inset-bottom, 0px);
}
.modal-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; }
.modal-head h3 { flex: 1; font-size: 17px; font-weight: 760; }
.modal-body { padding: 4px 16px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; -webkit-overflow-scrolling: touch; }
.modal-foot { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); justify-content: flex-end; }
.modal-foot .btn { flex: 1; }
.modal-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--border-strong); margin: 8px auto 0; }
@media (min-width: 720px) {
  .modal-backdrop { align-items: center; padding: 24px; }
  .modal { max-width: 560px; border-radius: 18px; max-height: 88vh; animation: pop 0.16s ease-out; }
  .modal.wide { max-width: 760px; }
  .modal-grip { display: none; }
  .modal-foot .btn { flex: 0 0 auto; }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes up { from { transform: translateY(40px); opacity: 0.4; } to { transform: none; opacity: 1; } }
@keyframes pop { from { transform: scale(0.97); opacity: 0; } to { transform: none; opacity: 1; } }

.sheet-menu { display: flex; flex-direction: column; }
.sheet-menu a, .sheet-menu button { display: flex; align-items: center; gap: 12px; padding: 13px 6px; border: 0; background: none; border-bottom: 1px solid var(--border); color: var(--text); font-weight: 620; font-size: 15.5px; text-align: left; cursor: pointer; width: 100%; }
.sheet-menu a:last-child, .sheet-menu button:last-child { border-bottom: 0; }
.sheet-menu .ic { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-3); display: grid; place-items: center; color: var(--text-2); }
.sheet-menu .count { margin-left: auto; background: var(--danger); color: #fff; font-size: 11px; font-weight: 750; border-radius: 9px; padding: 1px 7px; }

/* ---------- Toast ---------- */
.toast-host { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 12px); z-index: 120; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
@media (min-width: 960px) { .toast-host { bottom: 24px; } }
.toast { pointer-events: auto; background: #10222c; color: #fff; padding: 11px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 9px; max-width: 520px; animation: up 0.2s ease-out; }
.toast.error { background: #b42121; }
.toast.success { background: #146c35; }

/* ---------- Estados vazios / carregamento ---------- */
.empty { text-align: center; padding: 30px 18px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty .e-icon { width: 56px; height: 56px; border-radius: 18px; background: var(--surface-3); display: grid; place-items: center; color: var(--muted); margin-bottom: 4px; }
.empty h4 { color: var(--text); font-size: 16px; font-weight: 720; }
.empty p { font-size: 14px; max-width: 360px; }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--border-strong); border-top-color: var(--primary); animation: spin 0.7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.loader { display: grid; place-items: center; padding: 60px 0; }
.skeleton { background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius); }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.offline-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 130; background: #b45309; color: #fff; text-align: center; font-size: 13px; font-weight: 700; padding: 5px; padding-top: calc(5px + env(safe-area-inset-top, 0px)); }

/* ---------- Login ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(165deg, var(--brand) 0%, var(--brand-dark) 34%, var(--bg) 34.1%); }
.auth-card { width: 100%; max-width: 410px; padding: 26px 22px; display: flex; flex-direction: column; gap: 14px; }
.auth-card .brand { padding: 0 0 6px; justify-content: center; flex-direction: column; text-align: center; gap: 12px; }
.auth-card .brand-logo { box-shadow: 0 0 0 1px var(--border), 0 6px 18px rgba(196, 22, 28, 0.25); }
.auth-card .brand-img { max-width: 240px; max-height: 96px; object-fit: contain; }
.auth-card h1 { font-size: 22px; font-weight: 800; }

/* ---------- Report ---------- */
.rating { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.rating button { border: 1px solid var(--border-strong); background: var(--surface); border-radius: 12px; padding: 8px 2px 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 650; color: var(--muted); }
.rating button .emo { font-size: 26px; line-height: 1.1; filter: grayscale(0.7); opacity: 0.75; }
.rating button.on { border-color: var(--primary); background: var(--primary-50); color: var(--primary); }
.rating button.on .emo { filter: none; opacity: 1; }
.report-card .r-head { display: flex; align-items: center; gap: 10px; }
.report-card .r-section { margin-top: 10px; }
.report-card .r-label { font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 2px; }
.report-card .r-issue { background: var(--danger-50); border-radius: 10px; padding: 8px 10px; color: var(--text); }
.daysum { display: flex; flex-wrap: wrap; gap: 8px; }
.daysum .ds { flex: 1; min-width: 92px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 9px 11px; }
.daysum .ds .v { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.daysum .ds .l { font-size: 12px; color: var(--muted); font-weight: 650; }

/* ---------- Tabelas ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 750; padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--surface-2); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.bar-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.bar-row .lbl { width: 110px; flex-shrink: 0; font-weight: 650; font-size: 13.5px; }
.bar-row .bar { flex: 1; height: 10px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.bar-row .bar span { display: block; height: 100%; border-radius: 5px; }
.bar-row .val { width: 150px; text-align: right; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; flex-shrink: 0; }

.shift-day { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.shift-day:last-child { border-bottom: 0; }
.shift-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; margin-top: 6px; }
.shift-line .seg { display: inline-flex; align-items: center; gap: 5px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 3px 8px; font-variant-numeric: tabular-nums; font-weight: 600; }
.shift-line .seg.brk { background: var(--warning-50); border-color: transparent; color: var(--warning); }
.edited-mark { font-size: 11.5px; color: var(--muted); font-style: italic; }

@media print {
  .sidebar, .bottom-nav, .page-head .actions, .tabs, .no-print, .toast-host { display: none !important; }
  body { background: #fff; }
  .main { padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
}

/* Cartão de serviço dentro de outro cartão (planeamento) */
.card > .job-card { border: 0; box-shadow: none; border-radius: 0; }
.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 720px) { .summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.summary-grid .s-item { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.summary-grid .s-label { font-size: 11.5px; font-weight: 750; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.summary-grid .s-value { font-size: 17px; font-weight: 780; margin-top: 2px; font-variant-numeric: tabular-nums; }
.summary-grid .s-item.hl { background: var(--primary-50); border-color: transparent; }
.summary-grid .s-item.hl .s-value { color: var(--primary); font-size: 22px; }
.thumb-strip { display: flex; gap: 6px; overflow-x: auto; }
.thumb-strip img { width: 64px; height: 64px; border-radius: 9px; object-fit: cover; flex-shrink: 0; }

/* Texto traduzido */
.tx { display: inline; }
.tx-text { white-space: pre-wrap; word-break: break-word; }
.tx-loading { opacity: 0.6; }
.tx-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.tx-from { display: inline-flex; align-items: center; gap: 4px; font-style: italic; }
.tx-btn { border: 0; background: none; padding: 0; color: var(--primary); font-weight: 650; font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.tx-err { color: var(--danger); }
.tx-pick { position: relative; display: inline-flex; align-items: center; gap: 3px; color: var(--primary); font-weight: 650; cursor: pointer; padding: 2px 4px; border-radius: 6px; }
.tx-pick:hover { background: var(--primary-50, rgba(196, 22, 28, 0.08)); }
.tx-pick.icon-only { color: var(--muted); }
.tx-pick select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.tx-pick:focus-within { outline: 2px solid var(--primary); outline-offset: 1px; }
.tx-mark { color: var(--primary); opacity: 0.75; }
.lang-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.lang-pick button { border: 1px solid var(--border-strong); background: var(--surface); border-radius: 12px; padding: 10px; display: flex; align-items: center; gap: 8px; font-weight: 650; cursor: pointer; color: var(--text); }
.lang-pick button.on { border-color: var(--primary); background: var(--primary-50); color: var(--primary); }
.lang-pick .flag { font-size: 20px; }
.roster-view { background: var(--surface-2); border-radius: 12px; overflow: hidden; cursor: zoom-in; border: 1px solid var(--border); }
.roster-view img { width: 100%; height: auto; display: block; }
.zoom-viewer { position: fixed; inset: 0; z-index: 100; background: #0b0f12; display: flex; flex-direction: column; }
.zoom-viewer .zv-top { display: flex; align-items: center; gap: 8px; padding: 10px 12px; padding-top: calc(10px + env(safe-area-inset-top, 0px)); color: #fff; }
.zoom-viewer .zv-top .btn { background: rgba(255, 255, 255, 0.12); border-color: transparent; color: #fff; }
.zoom-viewer .zv-stage { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; display: flex; align-items: flex-start; justify-content: center; touch-action: pan-x pan-y pinch-zoom; }
.zoom-viewer .zv-stage img { max-width: 100%; height: auto; margin: auto; }
.zoom-viewer .zv-stage.zoomed img { max-width: none; width: 220%; }
.roster-pdf { width: 100%; height: 70vh; border: 0; border-radius: 12px; background: #fff; }
.clock-actions .btn, .break-choices .btn { white-space: normal; text-align: center; line-height: 1.2; padding-left: 10px; padding-right: 10px; }

/* ---------- Limpezas: Começo / Pausa / Término ---------- */
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); animation: pulse 1.6s infinite; display: inline-block; }
.day-switch { display: flex; align-items: center; gap: 8px; padding: 6px; }
.day-switch .grow { flex: 1; min-width: 0; }
.clean-row { display: flex; gap: 12px; padding: 10px 12px 10px 14px; align-items: center; color: inherit; position: relative; overflow: hidden; }
.clean-row::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--team, var(--border-strong)); }
.clean-row:hover { border-color: var(--border-strong); }
.clean-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.clean-row .title { font-weight: 720; font-size: 15.5px; }
.clean-row .meta { display: flex; flex-wrap: wrap; gap: 3px 10px; color: var(--muted); font-size: 12.5px; }
.clean-row .meta span { display: inline-flex; align-items: center; gap: 4px; }
.clean-row .foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.clean-row.st-running, .clean-row.st-paused { border-color: var(--primary-100); box-shadow: 0 0 0 2px var(--primary-50), var(--shadow); }
.clean-table tr.clickable { cursor: pointer; }
.clean-table tr.clickable:hover td { background: var(--surface-2); }
.house-head { display: flex; gap: 12px; padding: 12px; align-items: center; }
.house-head .grow { flex: 1; min-width: 0; }
.house-head .title { font-weight: 750; font-size: 16px; }
.house-head .meta { color: var(--muted); font-size: 13px; }
.cleaning .clean-state { display: flex; align-items: center; gap: 14px; }
.cleaning .clean-state .grow { flex: 1; min-width: 0; }
.cleaning .state-label { font-size: 13px; font-weight: 750; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-2); }
.cleaning .state-time { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; margin-top: 2px; }
.cleaning .state-time.t-empty { color: var(--border-strong); }
.cleaning .state-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.cleaning.large .state-time { font-size: 44px; }
.cleaning.st-paused .state-time { color: var(--warning); }
.cleaning.st-running .state-time { color: var(--primary); }
.cleaning.st-done .state-time { color: var(--success); }
.timebox.three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.timebox.three .timeslot { padding: 9px 10px; }
.timebox.three .t-value { font-size: 22px; white-space: nowrap; }
.timeslot.hl-pause { border-color: var(--warning); background: var(--warning-50); }
.clean-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.clean-actions .btn { white-space: normal; line-height: 1.15; }
.pause-list { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 9px 12px; }
.pause-list > div { display: flex; align-items: center; gap: 7px; font-variant-numeric: tabular-nums; }
.pause-list .now { color: var(--warning); font-weight: 700; }
.presence { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--border); padding-top: 14px; }
.presence-head { display: flex; align-items: center; gap: 8px; }
.presence-head h4 { flex: 1; font-size: 15px; font-weight: 750; display: flex; align-items: center; gap: 7px; }
.people-count { background: var(--primary); color: var(--on-primary); border-radius: 12px; padding: 2px 10px; font-weight: 800; font-size: 13px; white-space: nowrap; }
.people-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.person-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 4px 10px 4px 5px; border-radius: 22px;
  border: 1.5px solid var(--border-strong); background: var(--surface); cursor: pointer; font-weight: 650; font-size: 14px; color: var(--text-2); max-width: 100%;
}
.person-chip .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-chip .tick { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); flex-shrink: 0; }
.person-chip.on { border-color: var(--primary); background: var(--primary-50); color: var(--text); }
.person-chip.on .tick { background: var(--primary); color: var(--on-primary); }
.person-chip:disabled { cursor: default; }
.person-chip.add { border-style: dashed; color: var(--muted); }
.person-chip .ph { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); }
.total-line { display: flex; align-items: center; gap: 8px; font-weight: 750; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.pick-row { width: 100%; border: 0; border-bottom: 1px solid var(--border); background: none; text-align: left; font: inherit; color: inherit; }
.pick-row:disabled { opacity: 0.6; }
.house-pick { max-height: 52vh; overflow-y: auto; border: 1px solid var(--border); border-radius: 12px; }
.quick-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 720px) { .quick-links { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.quick-links a { display: flex; align-items: center; gap: 9px; padding: 12px 14px; color: var(--text); font-weight: 680; }
.quick-links a .icon { color: var(--primary); }
.quick-links a .badge { margin-left: auto; }
.clean-page { max-width: 760px; margin: 0 auto; width: 100%; }
.label + .stack, .label + .row-wrap { margin-top: -4px; }

/* ---------- Fotografia de perfil ---------- */
.avatar-edit { display: flex; align-items: center; gap: 14px; }
.avatar-edit .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.logo-preview { width: 120px; height: 120px; border-radius: 18px; border: 1px solid var(--border); background: #fff; display: grid; place-items: center; overflow: hidden; flex-shrink: 0; }
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.crop-box { position: relative; width: min(280px, 100%); aspect-ratio: 1; margin: 0 auto; border-radius: 50%; overflow: hidden; background: var(--surface-3); touch-action: none; cursor: grab; }
.crop-box img { position: absolute; left: 50%; top: 50%; max-width: none; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.crop-zoom { width: 100%; accent-color: var(--primary); }

/* ---------- Report do dia e Ponto ---------- */
.total-box { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.total-box .lbl { font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.total-box .val { grid-row: span 2; font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); }
.total-box .sub { font-size: 12.5px; color: var(--muted); }
.total-box.ok { background: var(--success-50); border-color: transparent; }
.total-box.ok .val, .total-box.ok .lbl { color: var(--success); }
.total-box.bad { background: var(--danger-50); border-color: transparent; }
.total-box.bad .sub { color: var(--danger); font-weight: 650; }
.check-rows { display: flex; flex-direction: column; gap: 6px; }
.check-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 1.5px solid var(--border); border-radius: 12px; cursor: pointer; min-width: 0; }
.check-row input { width: 20px; height: 20px; accent-color: var(--primary); flex-shrink: 0; }
.check-row .grow { flex: 1; min-width: 0; }
.check-row .title { font-weight: 680; }
.check-row .meta { font-size: 12.5px; color: var(--muted); }
.check-row.on { border-color: var(--primary); background: var(--primary-50); }
.person-chip.locked { opacity: 0.6; border-style: dashed; }
.person-chip.locked small { display: block; font-size: 10.5px; font-weight: 600; color: var(--muted); }
.person-chip .nm small { line-height: 1.1; }
.rep-times { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.rep-times span { display: flex; flex-direction: column; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 6px 9px; }
.rep-times small { font-size: 10.5px; font-weight: 750; text-transform: uppercase; color: var(--muted); letter-spacing: 0.03em; }
.rep-times b { font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 420px) { .rep-times { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rep-times .tot { background: var(--success-50); border-color: transparent; }
.rep-times .tot b { color: var(--success); }
.hchip-sm { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-3); border-radius: 8px; padding: 3px 8px; font-size: 12.5px; font-weight: 650; color: var(--text-2); }
.list-item.sel { background: var(--primary-50); }
.period-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.period-bar .day-switch { flex: 1; min-width: 260px; }
.kpi.hl .k-value { color: var(--primary); }
.mini-bar { height: 5px; border-radius: 3px; background: var(--surface-3); margin-top: 5px; overflow: hidden; max-width: 260px; }
.mini-bar span { display: block; height: 100%; background: var(--primary); border-radius: 3px; }
.day-badge { width: 44px; height: 44px; border-radius: 11px; background: var(--surface-3); display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; line-height: 1.05; }
.day-badge b { font-size: 17px; }
.day-badge span { font-size: 11px; color: var(--muted); font-weight: 700; }
.ponto-row .row { min-width: 0; }

/* Gráfico de barras */
.bchart { width: 100%; }
.bc-plot { position: relative; margin-left: 30px; border-bottom: 1px solid var(--border-strong); }
.bc-tick { position: absolute; left: 0; right: 0; border-top: 1px solid var(--border); }
.bc-tick span { position: absolute; left: -30px; top: -8px; width: 26px; text-align: right; font-size: 10.5px; color: var(--muted); }
.bc-ref { position: absolute; left: 0; right: 0; border-top: 1.5px dashed var(--muted); z-index: 1; pointer-events: none; }
.bc-ref span { position: absolute; right: 0; top: -17px; font-size: 10.5px; font-weight: 700; color: var(--muted); background: var(--surface); padding: 0 3px; }
.bc-bars { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 2px; }
.bc-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; background: none; border: 0; padding: 0; min-width: 0; position: relative; color: inherit; }
.bc-col.link { cursor: pointer; }
.bc-col.link:hover .bc-bar { filter: brightness(1.12); }
.bc-bar { width: 70%; max-width: 46px; background: var(--primary); border-radius: 4px 4px 0 0; min-height: 0; }
.bc-bar.muted { background: var(--border-strong); }
.bc-val { font-size: 10.5px; font-weight: 750; color: var(--text-2); margin-bottom: 2px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bc-labels { display: flex; gap: 2px; margin-left: 30px; margin-top: 4px; }
.bc-labels span { flex: 1; min-width: 0; text-align: center; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; }
@media (max-width: 480px) { .bc-val { font-size: 9px; } }

.input-time { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pause-pick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pause-pick > .input { width: 90px; flex-shrink: 0; }
.pause-pick .chips { flex: 1; min-width: 200px; }

/* ---------- Ecrã de entrada: fotografia da empresa ---------- */
.auth-photo { margin: -26px -22px 0; height: 190px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; background: var(--surface-3); }
.auth-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.auth-photo + .brand { margin-top: -50px; position: relative; }
.auth-photo + .brand .brand-logo { box-shadow: 0 0 0 4px #fff, 0 6px 18px rgba(196, 22, 28, 0.3); }
@media (min-width: 720px) { .auth-photo { height: 220px; } }
/* No computador: a fotografia ocupa o fundo todo (em vez da faixa vermelha e da parte branca) e o cartão fica à direita,
   para se ver a carrinha. Como é uma imagem de fundo dentro do @media, o telemóvel não a descarrega. */
@media (min-width: 900px) {
  .auth-wrap {
    place-items: center end;
    padding: 40px clamp(40px, 7vw, 120px);
    background: linear-gradient(90deg, rgba(12, 22, 8, 0) 45%, rgba(12, 22, 8, 0.5) 100%), url('/img/capa-computador.jpg') 30% 58% / cover no-repeat, #2f3d24;
  }
  .auth-card { box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(255, 255, 255, 0.08); }
  .auth-card .auth-photo { display: none; }
  .auth-photo + .brand { margin-top: 0; }
  .auth-photo + .brand .brand-logo { box-shadow: 0 0 0 1px var(--border), 0 6px 18px rgba(196, 22, 28, 0.25); }
}
/* Ecrãs de computador mais estreitos: cartão um pouco mais estreito e mais encostado, para não tapar o logotipo da carrinha. */
@media (min-width: 900px) and (max-width: 1199px) {
  .auth-wrap { padding-right: 28px; }
  .auth-card { max-width: 380px; }
}

/* ---------- Horas da limpeza (grupos) ---------- */
.entry-list { display: flex; flex-direction: column; gap: 8px; }
.entry-row { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); min-width: 0; }
.entry-row.clickable { cursor: pointer; }
.entry-row.clickable:hover { border-color: var(--border-strong); }
.entry-row .grow { flex: 1; min-width: 0; }
.entry-row .title { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.entry-row .meta { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.entry-row .meta b { color: var(--text); }
.bill-box { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--success-50); }
.bill-box .lbl { font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: 0.04em; color: var(--success); }
.bill-box .sub { font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.bill-box .val { font-size: 24px; font-weight: 800; color: var(--success); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bill-box.small .val { font-size: 19px; }
.bill-box.big { background: var(--primary-50); }
.bill-box.big .lbl, .bill-box.big .val { color: var(--primary); }
.bill-box .grow { flex: 1; min-width: 0; }
.ok-text { color: var(--success); }
.right-stat { display: flex; flex-direction: column; align-items: flex-end; font-size: 13px; white-space: nowrap; }
.right-stat span { color: var(--muted); font-size: 12.5px; }
.date-range { display: flex; gap: 10px; padding: 8px 10px; flex: 1; min-width: 260px; }
.date-range .field { flex: 1; }
.bill-job .card-head h3 { font-size: 14.5px; }

/* ---------- Reposição ---------- */
.supply-pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.supply-pics .sp { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface-3); }
.supply-pics .sp img { width: 100%; height: 100%; object-fit: cover; }
.supply-pics .sp.add { border: 2px dashed var(--border-strong); background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); font-weight: 650; font-size: 12px; cursor: pointer; }
.supply-pics .sp.add:hover { border-color: var(--primary); color: var(--primary); }
.supply-pics .rm { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, 0.6); color: #fff; display: grid; place-items: center; cursor: pointer; }
.supply-card { display: flex; flex-direction: column; gap: 10px; }
.supply-card.done { opacity: 0.85; }
.supply-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; padding: 0 14px; }
.supply-grid button { border: 0; padding: 0; border-radius: 10px; overflow: hidden; aspect-ratio: 1; cursor: zoom-in; background: var(--surface-3); }
.supply-grid img { width: 100%; height: 100%; object-fit: cover; }
.supply-note { display: flex; gap: 8px; padding: 10px 12px; margin: 0 14px; border-radius: 10px; background: var(--warning-50); color: var(--text); font-weight: 600; }
.supply-note .icon { color: var(--warning); flex-shrink: 0; margin-top: 2px; }
.supply-card > .row-wrap:last-child, .supply-card > .tiny:last-child { margin-bottom: 2px; }

/* ---------- Responsáveis (reposição) ---------- */
.resp-people { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 3px; }
.resp-person { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14.5px; }

/* ---------- Gravação automática ---------- */
.save-status { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--muted); min-height: 22px; }
.save-status.ok { color: var(--success); }
.save-status.bad { color: var(--danger); flex-wrap: wrap; }
.save-status .spin { border-width: 2px; }
.modal-foot .save-status { margin-right: auto; }
.back-site { display: inline-flex; align-items: center; gap: 6px; justify-content: center; color: var(--muted); text-decoration: none; }
