/* Maria's Cleaning — visual (azul e branco). Para trocar as cores, altere as variáveis abaixo. */
:root {
  --blue: #1d5fd1;
  --blue-dark: #15469c;
  --blue-soft: #e8f0fd;
  --blue-line: #cddcf6;
  --ink: #16233a;
  --muted: #62708a;
  --bg: #f3f5f8;
  --white: #ffffff;
  --line: #e2e8f2;
  --green: #1c8a55; --green-soft: #e3f5ec;
  --amber: #b76e00; --amber-soft: #fff3dc;
  --red: #c8323a;   --red-soft: #fde8e9;
  --gray-soft: #eef1f5;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(22, 35, 58, .06), 0 4px 16px rgba(22, 35, 58, .05);
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.45; }
body.no-scroll { overflow: hidden; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.45rem; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 0 0 .75rem; }
h3 { font-size: 1rem; margin: 0; }
h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 1.25rem 0 .5rem; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .mt { margin-top: 1.25rem; }
.pre { white-space: pre-wrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.neg { color: var(--red); font-weight: 600; } .pos { color: var(--green); }

/* ---------- Topo e menus ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1rem; padding: .6rem 1rem;
  background: var(--blue); color: var(--white); box-shadow: 0 2px 10px rgba(21, 70, 156, .25); }
.brand { display: flex; align-items: center; gap: .5rem; color: var(--white); font-weight: 700; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.logo-img { width: 34px; height: 34px; border-radius: 9px; background: var(--white); padding: 3px; }
.topnav { display: none; gap: .25rem; flex: 1; overflow-x: auto; }
.topnav a { color: rgba(255, 255, 255, .85); padding: .45rem .75rem; border-radius: 8px; font-weight: 500; white-space: nowrap; }
.topnav a:hover { background: rgba(255, 255, 255, .12); text-decoration: none; }
.topnav a.active { background: var(--white); color: var(--blue); }
.top-right { margin-left: auto; }
.user-chip { color: var(--white); background: rgba(255, 255, 255, .15); padding: .35rem .8rem; border-radius: 99px; font-weight: 600; }
.user-chip:hover { text-decoration: none; background: rgba(255, 255, 255, .25); }
.bottomnav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: flex; background: var(--white);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: .45rem .1rem; color: var(--muted);
  font-size: .68rem; font-weight: 600; min-width: 0; text-align: center; }
.bottomnav a span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.bottomnav a:hover { text-decoration: none; }
.bottomnav .ic { font-size: 1.2rem; line-height: 1.2; }
.bottomnav a.active { color: var(--blue); }


.view { max-width: 1200px; margin: 0 auto; padding: 1rem 1rem 6rem; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.head-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.back { font-size: .85rem; display: inline-block; margin-bottom: .2rem; }
.toolbar { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar input[type=search] { flex: 1; min-width: 200px; }
.toolbar.period label { display: flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--muted); }

/* ---------- Cartões e grades ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.card.narrow { max-width: 480px; }
.grid-2 { display: grid; gap: 1rem; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-2 .full { grid-column: 1 / -1; } }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; margin-bottom: 1rem; }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .stats:not(.three) { grid-template-columns: repeat(6, 1fr); } }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem .9rem; display: flex; flex-direction: column; gap: .15rem; }
.stat-label { font-size: .75rem; color: var(--muted); font-weight: 500; }
.stat-value { font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat.alert { background: var(--red-soft); border-color: #f5c3c6; } .stat.alert .stat-value { color: var(--red); }
.stat.warn .stat-value { color: var(--amber); }
.empty { color: var(--muted); padding: 1.5rem; text-align: center; background: var(--white); border: 1px dashed var(--line); border-radius: var(--radius); }
.card .empty { border: 0; padding: .75rem; }

/* ---------- Botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; border: 1px solid transparent; border-radius: 10px;
  padding: .6rem 1rem; font: inherit; font-weight: 600; cursor: pointer; background: var(--gray-soft); color: var(--ink);
  transition: background .15s, transform .05s; min-height: 42px; text-decoration: none; }
.btn:hover { text-decoration: none; filter: brightness(.97); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--blue); color: var(--white); }
.btn.primary:hover { background: var(--blue-dark); }
.btn.success { background: var(--green); color: var(--white); }
.btn.danger { background: var(--red); color: var(--white); }
.btn.ghost { background: var(--white); border-color: var(--blue-line); color: var(--blue); }
.btn.danger.ghost { color: var(--red); border-color: #f1c1c4; background: var(--white); }
.btn.sm { padding: .35rem .7rem; min-height: 34px; font-size: .85rem; }
.btn.big { width: 100%; padding: .85rem 1rem; font-size: 1.02rem; min-height: 50px; }
.btn:disabled, .btn.loading, .file-btn.loading { opacity: .6; pointer-events: none; }
.btn.loading::after, .file-btn.loading::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { border: 0; background: transparent; cursor: pointer; font-size: 1.1rem; color: var(--muted); padding: .3rem .5rem; border-radius: 8px; }
.icon-btn:hover { background: var(--gray-soft); color: var(--ink); }
.icon-btn.sm { font-size: .9rem; padding: .15rem .45rem; }
.file-btn { cursor: pointer; }

/* ---------- Formulários ---------- */
input, select, textarea { font: inherit; color: var(--ink); background: var(--white); border: 1px solid #cfd8e6; border-radius: 9px;
  padding: .55rem .7rem; width: 100%; min-height: 42px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue-line); border-color: var(--blue); }
input[type=checkbox] { width: 20px; height: 20px; min-height: 0; accent-color: var(--blue); flex-shrink: 0; }
.form { display: grid; gap: .8rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { .form:not(.single) { grid-template-columns: 1fr 1fr; } .form .full { grid-column: 1 / -1; } }
.form input, .form select, .form textarea, label.block select { font-weight: 400; }
.form label, label.block { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; font-weight: 600; color: #34425c; }
.form h3 { margin-top: .5rem; padding-top: .75rem; border-top: 1px solid var(--line); color: var(--blue); }
.form h3:first-child { border: 0; padding-top: 0; margin-top: 0; }
.form .split { display: grid; grid-template-columns: 1fr 1.4fr; gap: .6rem; }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; margin: 0; }
legend { font-size: .85rem; font-weight: 600; color: #34425c; padding: 0 .3rem; }
.check-grid { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.check-inline { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: .45rem; font-weight: 500 !important; cursor: pointer; }
.form-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .75rem; flex-wrap: wrap; }
.form-actions.wrap { border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1.25rem; }
.form-error { color: var(--red); margin: 0; font-size: .9rem; }
.lang-select { width: auto; min-height: 36px; padding: .3rem .5rem; }
.sm-select { width: auto; min-height: 34px; padding: .25rem .4rem; font-size: .85rem; }
.pay-input { width: 100px; min-height: 34px; padding: .3rem .5rem; }

/* ---------- Tabelas ---------- */
.tbl-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.card .tbl-wrap { border: 0; }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600;
  padding: .6rem .75rem; border-bottom: 1px solid var(--line); background: #fafbfe; white-space: nowrap; }
.tbl td { padding: .6rem .75rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl th.num { text-align: right; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl.clickable tbody tr { cursor: pointer; }
.tbl.clickable tbody tr:hover { background: var(--blue-soft); }
.tbl tr.inactive td { opacity: .55; }
.scroll-y { max-height: 360px; overflow-y: auto; }
@media (max-width: 640px) { .hide-sm { display: none; } }
.dl { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: .4rem .75rem; margin: 0; font-size: .92rem; }
.dl dt { color: var(--muted); } .dl dd { margin: 0; } .dl ul { margin: 0; padding-left: 1.1rem; }
.dl.compact { font-size: .85rem; gap: .25rem .6rem; }

/* ---------- Status ---------- */
.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: .18rem .55rem; border-radius: 99px; white-space: nowrap;
  background: var(--gray-soft); color: var(--muted); }
.badge.scheduled { background: var(--blue-soft); color: var(--blue); }
.badge.in_progress { background: var(--amber-soft); color: var(--amber); }
.badge.done { background: var(--green-soft); color: var(--green); }
.badge.canceled { background: var(--gray-soft); color: var(--muted); }
.badge.late { background: var(--red-soft); color: var(--red); }
.badge.owner { background: var(--blue); color: var(--white); }
.badge.helper { background: var(--blue-soft); color: var(--blue); }
.pill { font-size: .7rem; background: var(--blue); color: var(--white); border-radius: 99px; padding: .1rem .5rem; vertical-align: middle; }

/* ---------- Listas de limpezas ---------- */
.job-list { list-style: none; margin: 0; padding: 0; }
.job-row { display: grid; grid-template-columns: 78px 1fr auto; gap: .75rem; align-items: center; padding: .7rem .5rem; border-bottom: 1px solid var(--line);
  cursor: pointer; border-radius: 8px; }
.job-row:hover { background: var(--blue-soft); }
.job-row:last-child { border-bottom: 0; }
.job-time { font-weight: 700; font-size: .85rem; color: var(--blue); font-variant-numeric: tabular-nums; }
.job-main { display: flex; flex-direction: column; min-width: 0; }
.team-line { display: flex; flex-wrap: wrap; gap: .25rem .75rem; margin-top: .15rem; }
.who { font-size: .82rem; font-weight: 600; }
.who small { font-weight: 400; color: var(--muted); }
.who.in { color: var(--amber); } .who.left { color: var(--green); } .who.wait { color: var(--muted); }

/* Agenda semanal */
.week-nav { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar .week-nav { margin-bottom: 0; }
.toolbar select { width: auto; max-width: 100%; }
.week-label { font-weight: 700; padding: 0 .4rem; }
.week-grid { display: grid; gap: .6rem; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .week-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
.day-col { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem; min-height: 80px; }
.day-col.is-today { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-line); }
.day-col-head { display: flex; align-items: center; gap: .4rem; padding: .15rem .25rem .5rem; font-size: .85rem; color: var(--muted); }
.day-col-head strong { color: var(--ink); }
.day-col-head .icon-btn { margin-left: auto; color: var(--blue); font-weight: 700; }
.day-empty { font-size: .8rem; color: #a6b0c2; padding: .25rem; }
.chip { border-left: 4px solid var(--blue); background: var(--blue-soft); border-radius: 8px; padding: .45rem .55rem; margin-bottom: .4rem; cursor: pointer; font-size: .82rem; }
.chip:hover { filter: brightness(.97); }
.chip.in_progress { border-color: var(--amber); background: var(--amber-soft); }
.chip.done { border-color: var(--green); background: var(--green-soft); }
.chip.canceled { border-color: #b8c0cc; background: var(--gray-soft); opacity: .7; text-decoration: line-through; }
.chip.late { border-color: var(--red); background: var(--red-soft); }
.chip-time { font-weight: 700; color: var(--blue-dark); }
.chip-client { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.chip-svc { color: var(--muted); font-size: .76rem; }
.chip-team { display: flex; gap: 3px; margin-top: .3rem; flex-wrap: wrap; }
.initial { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .65rem; font-weight: 700;
  background: var(--white); color: var(--muted); border: 1.5px solid #c6cfdd; }
.initial.in { border-color: var(--amber); color: var(--amber); }
.initial.left { background: var(--green); border-color: var(--green); color: var(--white); }

/* Minha semana */
.day-group { margin-bottom: 1.25rem; }
.day-title { font-size: .95rem; color: var(--muted); margin: 0 0 .5rem; }
.day-group.is-today .day-title { color: var(--blue); }
.job-card { padding: 0; margin-bottom: .6rem; overflow: hidden; }
.job-card summary { list-style: none; cursor: pointer; padding: .85rem 1rem; }
.job-card summary::-webkit-details-marker { display: none; }
.job-card[open] summary { border-bottom: 1px solid var(--line); background: #fafbfe; }
.job-sum { display: grid; grid-template-columns: 1fr auto; gap: .75rem; align-items: center; }
.job-body { padding: .9rem 1rem 1rem; }
.info-row { display: flex; gap: .6rem; padding: .35rem 0; font-size: .95rem; }
.info-row .label { width: 1.4rem; flex-shrink: 0; text-align: center; }
.info-row.highlight { background: var(--amber-soft); border-radius: 8px; padding: .5rem; margin: .3rem 0; }
.check-actions { display: flex; flex-direction: column; gap: .5rem; margin: .9rem 0; }
.stamp { font-weight: 600; font-size: .9rem; padding: .5rem .75rem; border-radius: 8px; }
.stamp.in { background: var(--amber-soft); color: var(--amber); }
.stamp.out { background: var(--green-soft); color: var(--green); }
.checklist { display: flex; flex-direction: column; gap: .2rem; margin: .5rem 0 1rem; border: 1px solid var(--line); border-radius: 10px; padding: .4rem; }
.check-item { display: flex; align-items: center; gap: .6rem; padding: .5rem; border-radius: 8px; cursor: pointer; font-size: .95rem; }
.check-item:hover { background: var(--bg); }
.check-item.done span { text-decoration: line-through; color: var(--muted); }
.checklist-view { list-style: none; padding: 0; margin: 0; columns: 2; font-size: .9rem; }
.checklist-view li.done { color: var(--green); }
.photos-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .5rem; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .5rem; margin-bottom: .6rem; }
.thumb { position: relative; display: flex; flex-direction: column; gap: 2px; font-size: .7rem; color: var(--muted); }
.thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--gray-soft); }
.thumb .del { position: absolute; top: 2px; right: 2px; background: rgba(255, 255, 255, .9); }

/* Detalhe */
.detail-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.detail-price { font-size: 1.2rem; font-weight: 700; display: flex; gap: .5rem; align-items: center; }

/* Equipe */
.people { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.person.inactive { opacity: .6; }
.person-head { display: flex; gap: .75rem; align-items: center; margin-bottom: .75rem; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; font-weight: 700; }
.person-actions { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .9rem; }
.access-box { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: .9rem; white-space: pre-wrap; font-family: inherit; }

/* Abas */
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; overflow-x: auto; }
.tab { border: 0; background: none; font: inherit; font-weight: 600; color: var(--muted); padding: .65rem .9rem; border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; }
.tab.active { color: var(--blue); border-color: var(--blue); }

/* Relatórios */
.bars { display: flex; flex-direction: column; gap: .45rem; }
.bar-row { display: grid; grid-template-columns: 96px 1fr 96px; gap: .5rem; align-items: center; font-size: .85rem; }
.bar { background: var(--gray-soft); border-radius: 6px; height: 14px; overflow: hidden; }
.bar div { background: var(--blue); height: 100%; border-radius: 6px; }

/* Mais (celular) */
.more-list { display: grid; gap: .6rem; }
.more-item { display: flex; align-items: center; gap: .75rem; font-weight: 600; color: var(--ink); }
.more-item .ic { width: 36px; height: 36px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); border-radius: 10px; }

/* ---------- Janela (modal) ---------- */
#modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 700px) { #modal { align-items: center; } }
.modal-backdrop { position: absolute; inset: 0; background: rgba(16, 28, 50, .45); }
.modal-card { position: relative; background: var(--white); width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; border-radius: 16px 16px 0 0;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .2); animation: up .18s ease-out; }
.modal-card.wide { max-width: 780px; }
@media (min-width: 700px) { .modal-card { border-radius: 16px; } }
@keyframes up { from { transform: translateY(20px); opacity: 0; } }
.modal-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: .9rem 1.1rem;
  background: var(--white); border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 1.05rem; }
.modal-body { padding: 1.1rem; padding-bottom: calc(1.1rem + env(safe-area-inset-bottom)); }
.confirm-msg { font-size: 1rem; margin: 0 0 .5rem; }

/* ---------- Avisos ---------- */
#toasts { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: 80px; display: flex; flex-direction: column; gap: .4rem; width: min(92vw, 420px); }
@media (min-width: 1000px) { #toasts { bottom: 24px; } }
.toast { background: var(--ink); color: var(--white); padding: .7rem 1rem; border-radius: 10px; box-shadow: var(--shadow); font-weight: 500; transition: opacity .4s, transform .4s; }
.toast.err { background: var(--red); } .toast.warn { background: var(--amber); }
.toast.hide { opacity: 0; transform: translateY(8px); }

/* ---------- Login ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 1rem;
  background: linear-gradient(160deg, var(--blue) 0%, var(--blue-dark) 55%, #0e2f6b 100%); }
.auth-card { width: 100%; max-width: 400px; padding: 1.75rem; border: 0; }
.auth-brand { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.25rem; }
.auth-brand .logo-img { width: 54px; height: 54px; border: 1px solid var(--blue-line); }
.auth-brand p { margin: .1rem 0 0; }
.auth-foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: 1.25rem; flex-wrap: wrap; }
.boot { min-height: 100vh; display: grid; place-items: center; color: var(--muted); }


/* =====================================================================
   LAYOUT COM MENU LATERAL (computador) — inspirado na referência
   ===================================================================== */
:root { --navy: #0b1730; --navy-2: #13213f; --sb-w: 264px; }
.layout { min-height: 100vh; }
.sidebar { display: none; }
.topbar { gap: .75rem; }
.topnav { display: none !important; }

@media (min-width: 1000px) {
  .layout { display: grid; grid-template-columns: var(--sb-w) 1fr; }
  .topbar { display: none; }
  .bottomnav { display: none; }
  .view { padding: 2rem 2.25rem 3rem; max-width: 1400px; }
  .sidebar { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
    background: var(--navy); color: #fff; padding: 1.75rem 1.1rem 1.1rem; }
  .sb-brand { display: flex; align-items: center; gap: .7rem; color: #fff; padding: 0 .4rem 1.75rem; }
  .sb-brand:hover { text-decoration: none; }
  .sb-brand .logo-img { width: 42px; height: 42px; border-radius: 11px; }
  .sb-brand strong { display: block; font-size: 1.12rem; letter-spacing: -.01em; }
  .sb-brand span { display: block; font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: #8e9bb5; margin-top: 1px; }
  .sb-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
  .sb-section { font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: #7482a0; padding: 1.25rem .75rem .5rem; }
  .sb-section:first-child { padding-top: .25rem; }
  .sb-nav a { display: flex; align-items: center; gap: .7rem; color: #dfe5f1; padding: .7rem .8rem; border-radius: 10px; font-weight: 500; font-size: .95rem; }
  .sb-nav a:hover { background: var(--navy-2); text-decoration: none; }
  .sb-nav a.active { background: #fff; color: var(--navy); font-weight: 600; }
  .sb-ic { width: 20px; text-align: center; opacity: .75; }
  .sb-nav a.active .sb-ic { color: var(--blue); opacity: 1; }
  .sb-label { flex: 1; }
  .nav-badge { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 99px; display: inline-grid; place-items: center;
    font-size: .72rem; font-weight: 700; background: #26355a; color: #fff; }
  .nav-badge.alert { background: var(--red); }
  .sb-nav a.active .nav-badge { background: var(--blue); }
  .sb-nav a.active .nav-badge.alert { background: var(--red); }
  .sb-foot { border-top: 1px solid #1f2d4d; padding-top: 1rem; margin-top: 1rem; display: flex; flex-direction: column; gap: .7rem; }
  .sb-user { display: flex; flex-direction: column; color: #fff; padding: 0 .4rem; }
  .sb-user:hover { text-decoration: none; }
  .sb-user strong { font-size: .95rem; }
  .sb-user span { font-size: .8rem; color: #8e9bb5; }
  .sb-user.active span { color: #fff; }
  .sb-logout { background: #fff; color: var(--navy); width: 100%; }
}

/* ---------- Cabeçalho da página inicial ---------- */
.page-head.hero h1 { font-size: 1.9rem; font-weight: 600; letter-spacing: -.02em; }
.page-head.hero p { margin: .3rem 0 0; }
@media (max-width: 600px) { .page-head.hero h1 { font-size: 1.45rem; } }

/* ---------- Indicadores (estilo referência) ---------- */
.kpis { display: grid; gap: .9rem; grid-template-columns: repeat(2, 1fr); margin-bottom: 1.1rem; }
@media (min-width: 1000px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .35rem; }
.kpi-label { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.kpi-value { font-size: 2.1rem; font-weight: 600; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-value.red { color: var(--red); } .kpi-value.amber { color: var(--amber); }
.kpi-note { font-size: .85rem; color: var(--muted); }
.kpi.dark { background: var(--navy); border-color: var(--navy); color: #fff; }
.kpi.dark .kpi-label, .kpi.dark .kpi-note { color: #b6c2da; }
.kpi.dark .kpi-value { color: #7fb0ff; }
@media (max-width: 600px) { .kpi { padding: .9rem 1rem; } .kpi-value { font-size: 1.6rem; } .kpi-note { font-size: .75rem; } }

/* ---------- Faixa de alerta ---------- */
.alert-bar { display: flex; gap: 1rem; justify-content: space-between; flex-wrap: wrap; align-items: center; background: #fdf1f1;
  border: 1px solid #f6d3d3; border-left: 4px solid var(--red); border-radius: 12px; padding: .9rem 1.2rem; margin-bottom: 1.1rem;
  font-size: .92rem; cursor: pointer; }
.alert-bar span { color: #4b5568; }

/* ---------- Calendário da semana ---------- */
.card { border-radius: 14px; }
.cal-card { padding: 1.25rem 1.25rem 1rem; }
.cal-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.cal-card-head h2 { margin: 0; font-size: 1.1rem; }
.cal-card-head p { margin: .2rem 0 0; }
.cal-card-head .week-nav { margin: 0; }
.cal-card-head select { width: auto; }
.link-btn { background: none; border: 0; color: var(--blue); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; padding: .2rem 0; text-align: left; align-self: flex-start; }
.link-btn:hover { text-decoration: underline; }

.cal { display: none; }
.cal-mobile { display: grid; }
@media (min-width: 1000px) {
  .cal { display: block; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
  .cal-mobile { display: none; }
}
.cal-row { display: grid; grid-template-columns: 64px repeat(7, minmax(0, 1fr)); }
.cal-head { background: #fafbfd; border-bottom: 1px solid var(--line); }
.cal-dh { padding: .6rem .5rem; text-align: center; border-left: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cal-dh span { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.cal-dh b { font-size: 1.15rem; font-weight: 600; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; }
.cal-dh.is-today b { background: var(--blue); color: #fff; }
.cal-dh.is-today span { color: var(--blue); font-weight: 600; }
.cal-gutter { font-size: .7rem; color: var(--muted); display: flex; align-items: center; justify-content: center; text-align: center; }
.cal-allday { border-bottom: 1px solid var(--line); background: #fcfcfe; }
.cal-ad { border-left: 1px solid var(--line); padding: 4px; display: flex; flex-direction: column; gap: 3px; min-height: 34px; }
.ev-pill { font-size: .75rem; font-weight: 600; padding: .25rem .45rem; border-radius: 6px; background: var(--blue-soft); color: var(--blue-dark); cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-scroll { max-height: 640px; overflow-y: auto; }
.cal-gutter.hours { display: block; }
.hour-label { font-size: .7rem; color: var(--muted); text-align: right; padding: 0 .5rem; transform: translateY(-.55em); }
.hour-label:first-child { transform: none; padding-top: 2px; }
.cal-col { position: relative; border-left: 1px solid var(--line); cursor: copy;
  background-image: repeating-linear-gradient(to bottom, var(--line) 0, var(--line) 1px, transparent 1px, transparent var(--hour-h)); }
.cal-col.is-today { background-color: #f7faff; }
.cal-col:hover { background-color: #fbfcff; }
.ev { position: absolute; border-radius: 8px; padding: .3rem .45rem; overflow: hidden; cursor: pointer; font-size: .75rem;
  background: var(--blue-soft); border-left: 3px solid var(--blue); box-shadow: 0 1px 2px rgba(0, 0, 0, .06); transition: transform .1s, box-shadow .1s; }
.ev:hover { box-shadow: 0 4px 12px rgba(22, 35, 58, .15); z-index: 3; }
.ev-time { font-weight: 600; color: var(--blue-dark); font-size: .7rem; }
.ev-client { font-weight: 600; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ev-svc { color: var(--muted); font-size: .7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-team { display: flex; gap: 2px; margin-top: 3px; flex-wrap: wrap; }
.ev-team .initial { width: 20px; height: 20px; font-size: .58rem; }
.ev.in_progress, .ev-pill.in_progress { background: var(--amber-soft); border-color: var(--amber); }
.ev.done, .ev-pill.done { background: var(--green-soft); border-color: var(--green); }
.ev.done .ev-time { color: var(--green); }
.ev.late, .ev-pill.late { background: var(--red-soft); border-color: var(--red); }
.ev.late .ev-time { color: var(--red); }
.ev.canceled, .ev-pill.canceled { background: var(--gray-soft); border-color: #b8c0cc; opacity: .6; text-decoration: line-through; }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--red); z-index: 2; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }

/* Tabelas no estilo da referência */
.tbl th { letter-spacing: .12em; font-size: .66rem; }
.nav-badge[hidden] { display: none !important; }
@media (min-width: 1000px) { .cal-scroll { max-height: min(720px, 70vh); } }

/* Ajuste rápido de horário no detalhe da limpeza */
.quick-time { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; background: var(--blue-soft); border: 1px solid var(--blue-line);
  border-radius: 10px; padding: .55rem .7rem; margin: .25rem 0 .75rem; }
.quick-time.unset { background: var(--amber-soft); border-color: #f1d49a; }
.quick-time input { width: 130px; min-height: 36px; padding: .3rem .5rem; }
.qt-label { font-weight: 600; font-size: .9rem; margin-right: .25rem; }
.alert-bar.info { background: var(--amber-soft); border-color: #f1d49a; border-left-color: var(--amber); }
.cal-allday .cal-gutter { font-weight: 600; color: var(--amber); }
.ev-pill.scheduled { background: var(--amber-soft); color: #7a4a00; border-left: 3px solid var(--amber); }
