/* keepthekidney · estilos da área de cliente e backoffice */
:root {
  --white: #FFFFFF; --soft: #F5F6FA; --blush: #FFF1F0;
  --navy: #11172B; --navy-2: #1E2540; --muted: #5A6075;
  --coral: #FD5A5E; --coral-dark: #E2464A; --coral-soft: #FFD9DA;
  --yellow: #F9A60C; --yellow-soft: #FFE7B8; --green: #1FA463; --green-soft: #D6F5E4; --blue-soft: #DCE3FF;
  --line: rgba(17, 23, 43, .12);
  --radius: 18px; --shadow: 5px 5px 0 var(--navy); --shadow-sm: 3px 3px 0 var(--navy);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--soft); color: var(--navy);
  font-family: "Lexend", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px; line-height: 1.55; font-weight: 300; -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
b, strong { font-weight: 600; }
[hidden] { display: none !important; }
.dot { color: var(--coral); }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* Top bar */
.topbar { background: var(--white); border-bottom: 2px solid var(--navy); position: sticky; top: 0; z-index: 10; }
.topbar-in { max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px); height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 36px; height: 36px; object-fit: contain; }
.wordmark { font-weight: 800; font-size: 20px; letter-spacing: -.035em; }
.brand .tag-area { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; background: var(--coral-soft); border: 2px solid var(--navy); padding: 3px 9px; border-radius: 99px; margin-left: 4px; }
.topbar .who { display: flex; align-items: center; gap: 12px; font-size: 14px; }

/* Layout */
.shell { max-width: 1200px; margin: 0 auto; padding: clamp(20px, 3vw, 36px) clamp(16px, 3vw, 32px) 64px; }
.app-grid { display: grid; grid-template-columns: 230px 1fr; gap: 28px; align-items: start; }
.side { position: sticky; top: 90px; display: grid; gap: 6px; }
.side button {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left;
  font: 500 15px/1 "Lexend", sans-serif; color: var(--navy); background: transparent; border: 2px solid transparent;
  padding: 12px 14px; border-radius: 12px; cursor: pointer;
}
.side button:hover { background: var(--white); border-color: var(--line); }
.side button.on { background: var(--white); border-color: var(--navy); box-shadow: var(--shadow-sm); }
.side .count { font-size: 12px; font-weight: 700; background: var(--coral); color: var(--navy); border-radius: 99px; padding: 3px 8px; }

h1 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; letter-spacing: -.04em; line-height: 1.1; }
h2 { font-size: 22px; font-weight: 700; letter-spacing: -.025em; }
h3 { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.stack { display: grid; gap: 18px; }

/* Cards */
.card { background: var(--white); border: 2px solid var(--navy); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(18px, 2.4vw, 26px); }
.card.flat { box-shadow: none; border-color: var(--line); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.stat { background: var(--white); border: 2px solid var(--navy); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.stat .k { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.stat .v { font-size: 32px; font-weight: 800; letter-spacing: -.04em; margin-top: 4px; line-height: 1.1; }
.stat .v small { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.stat.coral { background: var(--coral-soft); }
.stat.yellow { background: var(--yellow-soft); }
.stat.blue { background: var(--blue-soft); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; border: 2px solid var(--navy);
  font: 600 14px/1 "Lexend", system-ui, sans-serif; text-decoration: none; cursor: pointer; color: var(--navy);
  background: var(--white); box-shadow: var(--shadow-sm); transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--navy); }
.btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--navy); }
.btn.coral { background: var(--coral); }
.btn.navy { background: var(--navy); color: var(--white); }
.btn.ghost { box-shadow: none; border-color: var(--line); }
.btn.sm { padding: 8px 13px; font-size: 13px; box-shadow: 2px 2px 0 var(--navy); }
.btn.danger { background: var(--white); color: var(--coral-dark); border-color: var(--coral-dark); box-shadow: 2px 2px 0 var(--coral-dark); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.block { width: 100%; }
.btn.google { background: var(--white); width: 100%; padding: 13px; font-size: 15px; }
.btn.google svg { width: 20px; height: 20px; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--coral-dark); font-weight: 500; cursor: pointer; text-decoration: underline; }

/* Forms */
.form { display: grid; gap: 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; letter-spacing: .02em; }
input, select, textarea {
  width: 100%; font: 400 15px/1.4 "Lexend", system-ui, sans-serif; color: var(--navy);
  border: 2px solid var(--navy); border-radius: 12px; padding: 11px 13px; background: var(--white);
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; box-shadow: 0 0 0 4px var(--coral-soft); }
.hint { font-size: 13px; color: var(--muted); font-weight: 400; }
.field-err { font-size: 13px; font-weight: 500; color: var(--coral-dark); min-height: 0; }
.field-err:empty { display: none; }
input.bad { border-color: var(--coral-dark); background: #FFF6F6; }
.pw { position: relative; display: block; }
.pw input { padding-right: 48px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: transparent; cursor: pointer; font-size: 17px; border-radius: 8px; opacity: .55; }
.pw-eye:hover, .pw-eye.on { opacity: 1; background: var(--soft); }
.pw-meter { display: block; height: 6px; border-radius: 99px; background: var(--soft); border: 1px solid var(--line); overflow: hidden; }
.pw-meter i { display: block; height: 100%; width: 0; transition: width .25s, background .25s; }
.alert { border: 2px solid var(--navy); border-radius: 12px; padding: 12px 14px; font-size: 14px; font-weight: 400; }
.alert.err { background: var(--coral-soft); }
.alert.ok { background: var(--green-soft); }
.alert.info { background: var(--yellow-soft); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 2px; background: var(--line); }

/* Auth */
.auth-wrap { min-height: calc(100vh - 66px); display: grid; place-items: center; padding: 32px 16px; }
.auth { width: 100%; max-width: 440px; position: relative; }
.auth .mascot { width: 110px; position: absolute; top: -78px; right: -18px; transform: rotate(8deg); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--soft); border: 2px solid var(--navy); border-radius: 999px; padding: 4px; margin-bottom: 20px; }
.tabs button { font: 600 14px/1 "Lexend", sans-serif; border: 0; background: transparent; padding: 10px; border-radius: 999px; cursor: pointer; color: var(--navy); }
.tabs button.on { background: var(--coral); box-shadow: inset 0 0 0 2px var(--navy); }

/* Badges / progress */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; letter-spacing: .04em; padding: 4px 10px; border-radius: 99px; border: 2px solid var(--navy); background: var(--white); white-space: nowrap; }
.badge.s-proposta, .badge.r-aberto { background: var(--yellow-soft); }
.badge.s-design, .badge.s-desenvolvimento, .badge.r-em_curso { background: var(--blue-soft); }
.badge.s-revisao { background: var(--coral-soft); }
.badge.s-entregue, .badge.s-manutencao, .badge.r-resolvido { background: var(--green-soft); }
.badge.s-pausa { background: var(--soft); }
.badge.warn { background: var(--coral-soft); }
.progress { height: 14px; border: 2px solid var(--navy); border-radius: 99px; background: var(--soft); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--coral); border-right: 2px solid var(--navy); transition: width .6s; }

/* Steps do projeto */
.steps { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.steps span { font-size: 12px; font-weight: 500; padding: 5px 10px; border-radius: 99px; border: 2px dashed var(--line); color: var(--muted); }
.steps span.done { border-style: solid; border-color: var(--navy); color: var(--navy); background: var(--green-soft); }
.steps span.now { border-style: solid; border-color: var(--navy); color: var(--navy); background: var(--coral); font-weight: 700; }

.badge.q-enviado { background: var(--yellow-soft); }
.badge.q-aceite { background: var(--green-soft); }
.badge.q-recusado { background: var(--soft); }
.badge.q-alteracoes { background: var(--blue-soft); }

/* Orçamentos */
.quote-total { margin-top: 14px; border: 2px dashed var(--line); border-radius: 14px; padding: 12px 16px; display: grid; gap: 6px; max-width: 420px; }
.quote-total > div { display: flex; justify-content: space-between; gap: 16px; font-variant-numeric: tabular-nums; }
.quote-total .tot { font-size: 20px; font-weight: 800; letter-spacing: -.02em; border-top: 2px solid var(--line); padding-top: 6px; }
.quote-total .tot small { font-size: 12px; font-weight: 500; }
.quote-total .adj { font-size: 14px; background: var(--yellow-soft); border-radius: 8px; padding: 6px 10px; margin: 2px -6px 0; }
.quote-total .adj span:last-child { font-weight: 700; }

/* Pagamentos */
.pay-card { border-color: var(--navy); background: linear-gradient(180deg, var(--white), var(--white)); }
.pay-amt { text-align: right; font-size: 30px; font-weight: 800; letter-spacing: -.04em; line-height: 1.1; }
.pay-amt small { display: block; font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.pay-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pay-methods { font-size: 13px; color: var(--muted); }
.badge.p-pago { background: var(--green-soft); }
.badge.p-pendente { background: var(--yellow-soft); }

/* Descontos */
.disc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.disc { display: flex; gap: 16px; align-items: center; background: var(--white); border: 2px dashed var(--navy); border-radius: var(--radius); padding: 18px; position: relative; }
.disc .v { flex: none; min-width: 84px; height: 84px; padding: 0 10px; border-radius: 50%; background: var(--yellow); border: 2px solid var(--navy); display: grid; place-items: center; font-weight: 800; font-size: 18px; letter-spacing: -.03em; transform: rotate(-8deg); box-shadow: var(--shadow-sm); }

/* Avaliações */
.review-box { margin-top: 20px; padding-top: 18px; border-top: 2px dashed var(--line); }
.stars { display: inline-flex; flex-direction: row-reverse; gap: 4px; justify-self: start; width: max-content; }
.stars label { cursor: pointer; display: block; }
.stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars span { font-size: 32px; line-height: 1; color: var(--line); -webkit-text-stroke: 1.5px var(--navy); transition: transform .12s, color .12s; display: block; }
.stars label:hover span, .stars label:hover ~ label span, .stars input:checked ~ span { color: var(--yellow); }
.stars label:has(input:checked) ~ label span { color: var(--yellow); }
.stars input:focus-visible + span { outline: 2px solid var(--coral); border-radius: 4px; }
.stars label:hover span { transform: scale(1.15); }
.stars-static { color: var(--yellow); -webkit-text-stroke: 1px var(--navy); letter-spacing: 2px; }

/* Timeline */
.timeline { list-style: none; display: grid; gap: 0; margin-top: 8px; }
.timeline li { position: relative; padding: 0 0 16px 26px; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: -4px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--coral); border: 2px solid var(--navy); }
.timeline .when { font-size: 12px; color: var(--muted); }

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

.empty { text-align: center; padding: 28px 16px; color: var(--muted); }
.empty img { width: 90px; margin: 0 auto 10px; opacity: .9; }
.req { border: 2px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 8px; }
.req .reply { background: var(--soft); border-left: 4px solid var(--coral); border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--navy); color: var(--white); padding: 12px 20px; border-radius: 99px; font-size: 14px; font-weight: 500; z-index: 50; box-shadow: 4px 4px 0 var(--coral); }
dialog { border: 2px solid var(--navy); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; width: min(560px, calc(100vw - 32px)); margin: auto; color: var(--navy); }
dialog::backdrop { background: rgba(17, 23, 43, .45); }

@media (max-width: 860px) {
  .app-grid { grid-template-columns: 1fr; }
  .side { position: static; grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; padding-bottom: 6px; }
  .row2, .row3 { grid-template-columns: 1fr; }
  .topbar .who .email { display: none; }
  .auth .mascot { width: 84px; top: -60px; right: -6px; }
}

/* Seletor de idioma */
.lang-switch { font: 700 13px/1 "Lexend", sans-serif; letter-spacing: .08em; text-decoration: none; color: var(--navy); border: 2px solid var(--navy); border-radius: 999px; padding: 8px 10px; background: var(--white); transition: background .15s; }
.lang-switch:hover { background: var(--coral-soft); }

