@font-face { font-family: 'Montserrat'; font-weight: 400; font-display: swap; src: url('fonts/montserrat-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 500; font-display: swap; src: url('fonts/montserrat-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 600; font-display: swap; src: url('fonts/montserrat-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 700; font-display: swap; src: url('fonts/montserrat-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 800; font-display: swap; src: url('fonts/montserrat-latin-800-normal.woff2') format('woff2'); }

:root {
  /* Identidade Pró Gesso */
  --navy: #0b2e6e; --blue: #003b8f; --blue-2: #1f55b5; --orange: #f39200; --orange-2: #ffab2e;
  --bg: #f2f4f8; --card: #fff; --ink: #14213d; --mut: #66708a; --line: #e2e6ef;
  --ok: #16a34a; --ok-bg: #e7f7ed; --no: #dc2626; --no-bg: #fdecec; --pend: #b45309; --pend-bg: #fff4e0;
  --r: 14px; --shadow: 0 2px 6px rgba(11,46,110,.06), 0 8px 24px rgba(11,46,110,.06);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 15px/1.5 'Montserrat', 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--ink); }
h1, h2, h3 { font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 20px; margin: 0 0 6px; }
h3 { font-size: 15px; margin: 18px 0 8px; }
.muted { color: var(--mut); }
.small { font-size: 12px; }
input, select, textarea { font: inherit; color: inherit; width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue-2); box-shadow: 0 0 0 4px rgba(31,85,181,.12); }
textarea { resize: vertical; }
label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 14px; color: var(--navy); }
label > input, label > select, label > textarea { margin-top: 6px; font-weight: 500; color: var(--ink); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; color: var(--navy); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .08s, filter .15s, background .15s; }
.btn:hover:not(:disabled) { filter: brightness(1.05); border-color: var(--blue-2); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.success { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { background: #fff; border-color: var(--no); color: var(--no); }
.btn.danger:hover:not(:disabled) { background: var(--no); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--mut); }
.btn.big { padding: 13px 26px; font-size: 16px; }
.btn.block { width: 100%; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: #eef2f9; color: var(--navy); font-size: 22px; line-height: 1; cursor: pointer; display: grid; place-items: center; flex: none; }
.icon-btn:hover:not(:disabled) { background: #dde6f5; }
.icon-btn:disabled { opacity: .35; cursor: default; }

/* ---------- login ---------- */
.login-body { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, var(--navy), var(--blue-2)); overflow: hidden; position: relative; }
.login-shape { position: absolute; background: var(--orange); transform: skewX(-28deg); }
.login-shape.s1 { width: 320px; height: 220px; right: -60px; bottom: -40px; }
.login-shape.s2 { width: 180px; height: 120px; left: -40px; top: -30px; opacity: .9; }
.login-card { position: relative; width: min(400px, 92vw); background: #fff; border-radius: 20px; padding: 34px 30px; box-shadow: 0 30px 60px rgba(0,0,0,.25); }
.login-logo { height: 40px; display: block; margin-bottom: 18px; }
.login-card h1 { font-size: 22px; margin: 0 0 4px; color: var(--navy); }
.login-card .muted { margin: 0 0 20px; }
.error { color: var(--no); background: var(--no-bg); padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: 14px; }

/* ---------- topo ---------- */
.hero { position: relative; background: linear-gradient(120deg, var(--navy) 0%, var(--blue) 55%, var(--blue-2) 100%); color: #fff; overflow: hidden; }
.hero-in { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; padding: 18px 24px 26px; }
.hero-shape { position: absolute; right: -80px; top: 0; bottom: 0; width: 360px; background: var(--orange); transform: skewX(-28deg); opacity: .95; }
.hero-shape::before { content: ''; position: absolute; left: -70px; top: 0; bottom: 0; width: 26px; background: var(--orange); }
.hero-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.logo { height: 34px; }
.hero h1 { font-size: 28px; margin: 0 0 6px; max-width: 760px; }
.hero-sub { margin: 0 0 18px; max-width: 760px; opacity: .92; }
.ok-t { color: #86efac; } .no-t { color: #fecaca; }
.progress-card { max-width: 760px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 14px; padding: 12px 16px; backdrop-filter: blur(4px); }
.progress-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; font-size: 14px; }
.progress-head b { font-size: 20px; }
.muted-w { opacity: .85; font-size: 13px; }
.bar { display: flex; height: 12px; border-radius: 99px; background: rgba(255,255,255,.22); overflow: hidden; }
.seg { height: 100%; transition: width .4s; }
.seg.ok { background: #4ade80; } .seg.no { background: #f87171; }
.menu { position: relative; }
.menu-btn { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 99px; padding: 8px 16px; font: inherit; font-weight: 700; cursor: pointer; }
.menu-btn:hover { background: rgba(255,255,255,.22); }
.menu-pop { position: absolute; right: 0; top: 46px; z-index: 30; background: #fff; border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.18); padding: 6px; min-width: 210px; }
.menu-pop button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: 8px; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }
.menu-pop button:hover { background: #f1f4fa; }

/* ---------- filtros ---------- */
.filters { position: sticky; top: 0; z-index: 20; background: rgba(242,244,248,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.filters > * { max-width: 1280px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.chips { display: flex; gap: 10px; padding-top: 14px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); background: #fff; border-radius: 99px; padding: 9px 16px; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; }
.chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--mut); }
.chip b { background: #eef2f9; border-radius: 99px; padding: 1px 9px; font-size: 13px; }
.chip.st-pendente i { background: var(--orange); } .chip.st-aprovado i { background: var(--ok); } .chip.st-reprovado i { background: var(--no); } .chip.st-todos i { background: var(--blue); }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip.on b { background: rgba(255,255,255,.2); }
.search-row { display: grid; grid-template-columns: 1fr 280px; gap: 10px; padding-top: 12px; padding-bottom: 14px; }

/* ---------- galeria ---------- */
.wrap { max-width: 1280px; margin: 0 auto; padding: 16px 24px 60px; }
.list-info { margin: 0 0 12px; color: var(--mut); font-weight: 600; font-size: 14px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.card { position: relative; display: flex; flex-direction: column; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; border: 2px solid transparent; transition: transform .15s, box-shadow .15s, border-color .15s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 6px 14px rgba(11,46,110,.08), 0 18px 40px rgba(11,46,110,.1); }
.card.st-aprovado { border-color: #bbf0cd; } .card.st-reprovado { border-color: #f9c9c9; }
.card .img { position: relative; aspect-ratio: 4 / 3; background: #fff; display: grid; place-items: center; cursor: pointer; border-bottom: 1px solid var(--line); }
.card .img img { max-width: 92%; max-height: 92%; object-fit: contain; }
.card .noimg { display: grid; place-items: center; gap: 4px; color: var(--mut); font-weight: 700; font-size: 13px; text-align: center; }
.card .noimg span { font-size: 34px; }
.card .count { position: absolute; right: 10px; bottom: 10px; background: rgba(11,46,110,.8); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.pendente { background: var(--pend-bg); color: var(--pend); }
.badge.aprovado { background: var(--ok-bg); color: var(--ok); }
.badge.reprovado { background: var(--no-bg); color: var(--no); }
.card .badge { position: absolute; left: 10px; top: 10px; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.card .body { padding: 12px 14px 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; cursor: pointer; }
.card .code { font-size: 11px; font-weight: 700; color: var(--mut); text-transform: uppercase; letter-spacing: .04em; }
.card .title { font-weight: 800; font-size: 14px; line-height: 1.3; color: var(--navy); }
.card .desc { font-size: 12.5px; color: var(--mut); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .desc.none { font-style: italic; opacity: .7; }
.card .why { font-size: 12px; color: var(--no); background: var(--no-bg); border-radius: 8px; padding: 6px 8px; margin-top: 4px; }
.card .actions { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; padding: 10px 12px 12px; }
.card .actions .btn { padding: 8px 10px; font-size: 13px; }
.card .actions .edit { width: 38px; padding: 8px 0; }
.card.leaving { opacity: 0; transform: scale(.96); transition: opacity .25s, transform .25s; }

.empty { text-align: center; padding: 60px 20px; }
.empty-ico { font-size: 48px; }

/* ---------- produto (diálogo) ---------- */
dialog { border: 0; padding: 0; border-radius: 20px; box-shadow: 0 30px 80px rgba(0,0,0,.3); color: var(--ink); }
dialog::backdrop { background: rgba(11,30,70,.55); backdrop-filter: blur(2px); }
.product-dlg { width: min(1180px, 96vw); max-height: 94vh; display: flex; flex-direction: column; }
.product-dlg:not([open]) { display: none; }
.pd-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.pd-title { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; }
.pd-title .muted { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn.close { margin-left: 6px; }
.pd-body { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 22px; padding: 18px 20px; overflow-y: auto; }
.viewer { aspect-ratio: 4 / 3; background: #fff; border: 1px solid var(--line); border-radius: 14px; display: grid; place-items: center; overflow: hidden; }
.viewer img { max-width: 96%; max-height: 96%; object-fit: contain; cursor: zoom-in; }
.viewer .noimg { text-align: center; color: var(--mut); font-weight: 700; }
.viewer .noimg span { display: block; font-size: 46px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.thumb { position: relative; width: 84px; height: 84px; border: 2px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; cursor: pointer; }
.thumb.on { border-color: var(--blue-2); box-shadow: 0 0 0 3px rgba(31,85,181,.15); }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb .first { position: absolute; left: 4px; top: 4px; font-size: 9px; font-weight: 800; background: var(--orange); color: #fff; padding: 1px 5px; border-radius: 4px; }
.img-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.img-tools .btn { padding: 7px 12px; font-size: 13px; }
.dropzone { display: flex; align-items: center; gap: 14px; border: 2px dashed #b9c6e0; border-radius: 14px; padding: 14px 16px; cursor: pointer; color: var(--navy); background: #f7f9fd; margin: 0; font-weight: 500; }
.dropzone:hover, .dropzone.over { border-color: var(--orange); background: #fff8ec; }
.dz-ico { width: 42px; height: 42px; border-radius: 50%; background: var(--orange); color: #fff; display: grid; place-items: center; font-size: 26px; font-weight: 700; flex: none; }
.dropzone small { color: var(--mut); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr .7fr; gap: 12px; }
.money { position: relative; display: block; margin-top: 6px; }
.money i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-style: normal; font-weight: 700; color: var(--mut); }
.money input { padding-left: 40px; font-weight: 700; color: var(--navy); }
.card .price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.card .price b { font-size: 17px; color: var(--blue); font-weight: 800; }
.card .price span { font-size: 12px; color: var(--mut); font-weight: 600; }
.card .price-term { font-size: 12px; color: var(--mut); font-weight: 600; margin-top: -4px; }
.card .price.none { font-size: 12px; color: var(--no); font-weight: 700; }
.reject-note { background: var(--no-bg); color: #991b1b; padding: 10px 14px; border-radius: 12px; margin-bottom: 14px; font-weight: 600; font-size: 14px; }
.save-bar { position: sticky; bottom: 0; display: flex; align-items: center; gap: 10px; background: #fff8ec; border: 1.5px solid var(--orange-2); padding: 10px 12px; border-radius: 12px; margin-bottom: 12px; }
.save-bar span { flex: 1; font-weight: 700; color: #92400e; font-size: 14px; }
.tabs { display: flex; gap: 6px; border-bottom: 1.5px solid var(--line); margin: 6px 0 12px; }
.tab { border: 0; background: none; font: inherit; font-weight: 700; color: var(--mut); padding: 9px 12px; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1.5px; }
.tab.on { color: var(--blue); border-bottom-color: var(--orange); }
.tab b { background: var(--orange); color: #fff; border-radius: 99px; padding: 0 7px; font-size: 11px; }
.tab b:empty { display: none; }
.comment-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 10px; }
.feed { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; }
.feed li { padding: 10px 0; border-bottom: 1px solid #eef1f6; font-size: 13.5px; }
.feed .when { font-size: 11.5px; color: var(--mut); margin-top: 2px; }
.feed .kind { font-size: 10px; font-weight: 800; text-transform: uppercase; padding: 2px 7px; border-radius: 5px; margin-right: 6px; }
.kind.reprovacao { background: var(--no-bg); color: var(--no); } .kind.aprovacao { background: var(--ok-bg); color: var(--ok); }
.kind.observacao { background: #e6edfb; color: var(--blue); } .kind.sistema { background: #f1f3f7; color: var(--mut); }
.feed .val { background: #f4f6fa; border-radius: 5px; padding: 2px 6px; display: inline-block; max-width: 100%; overflow-wrap: anywhere; }
.feed .old { text-decoration: line-through; color: var(--mut); }
.feed a { color: var(--blue); cursor: pointer; font-weight: 700; }
.pd-foot { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); background: #fafbfd; border-radius: 0 0 20px 20px; }
.pd-foot .small { margin-right: auto; }

.small-dlg { width: min(540px, 94vw); padding: 24px; }
.wide-dlg { width: min(940px, 96vw); padding: 24px; }
.dlg-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.reasons { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 14px; }
.reasons button { border: 1.5px solid var(--line); background: #fff; border-radius: 99px; padding: 7px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink); }
.reasons button:hover, .reasons button.on { border-color: var(--no); color: var(--no); background: var(--no-bg); }
.utable { width: 100%; border-collapse: collapse; }
.utable th, .utable td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.utable td:last-child { text-align: right; white-space: nowrap; }
.row4 { display: grid; grid-template-columns: 1fr 1.3fr 1fr .9fr auto; gap: 8px; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 12px 20px; border-radius: 12px; z-index: 100; font-weight: 600; box-shadow: 0 12px 30px rgba(0,0,0,.25); display: flex; gap: 14px; align-items: center; }
.toast.err { background: var(--no); }
.toast button { background: none; border: 0; color: var(--orange-2); font: inherit; font-weight: 800; cursor: pointer; padding: 0; }
.lightbox { position: fixed; inset: 0; background: rgba(5,15,40,.9); display: grid; place-items: center; z-index: 200; cursor: zoom-out; }
.lightbox img { max-width: 94vw; max-height: 92vh; background: #fff; border-radius: 8px; }

@media (max-width: 900px) {
  .pd-body { grid-template-columns: 1fr; }
  .hero-shape { width: 160px; right: -90px; }
  .hero h1 { font-size: 22px; }
  .search-row { grid-template-columns: 1fr; }
  .row4, .row3 { grid-template-columns: 1fr; }
  .pd-foot { flex-wrap: wrap; }
  .pd-foot .btn.big { flex: 1; }
}
