/* RoçaMap — estilos (sem framework) */

:root {
  --g50: #ecfdf5; --g100: #d1fae5; --g200: #a7f3d0; --g300: #6ee7b7; --g400: #34d399;
  --g500: #10b981; --g600: #059669; --g700: #047857; --g800: #065f46; --g900: #064e3b;
  --gray50: #f9fafb; --gray100: #f3f4f6; --gray200: #e5e7eb; --gray300: #d1d5db; --gray400: #9ca3af;
  --gray500: #6b7280; --gray600: #4b5563; --gray700: #374151; --gray800: #1f2937; --gray900: #111827;
  --red50: #fef2f2; --red100: #fee2e2; --red200: #fecaca; --red300: #fca5a5; --red500: #ef4444;
  --red600: #dc2626; --red700: #b91c1c;
  --amber50: #fffbeb; --amber100: #fef3c7; --amber200: #fde68a; --amber400: #fbbf24; --amber500: #f59e0b; --amber700: #b45309; --amber800: #92400e; --amber950: #451a03;
  --slate50: #f8fafc; --slate200: #e2e8f0; --slate300: #cbd5e1; --slate400: #94a3b8; --slate500: #64748b; --slate700: #334155; --slate900: #0f172a;
  --blue50: #eff6ff; --blue100: #dbeafe; --blue200: #bfdbfe; --blue400: #60a5fa; --blue500: #3b82f6; --blue700: #1d4ed8; --blue800: #1e40af; --blue900: #1e3a8a; --blue950: #172554;
  --purple50: #faf5ff; --purple200: #e9d5ff; --purple400: #c084fc; --purple500: #a855f7; --purple700: #7e22ce; --purple950: #3b0764;
  --yellow50: #fefce8; --yellow800: #854d0e;
  --radius: 0.5rem;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body { font-family: var(--font); color: var(--gray900); background: var(--gray100); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
button:disabled { cursor: not-allowed; }
input, select, textarea { font: inherit; color: inherit; }
img { display: block; }
h1, h2, h3, h4, p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- utilitários ---------- */
.ic { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
.ic-3 { width: .75rem; height: .75rem; } .ic-3-5 { width: .875rem; height: .875rem; }
.ic-4 { width: 1rem; height: 1rem; } .ic-5 { width: 1.25rem; height: 1.25rem; }
.ic-6 { width: 1.5rem; height: 1.5rem; } .ic-8 { width: 2rem; height: 2rem; }
.ic-12 { width: 3rem; height: 3rem; } .ic-16 { width: 4rem; height: 4rem; }
.mx-auto { margin-left: auto; margin-right: auto; display: block; }
.mb-2 { margin-bottom: .5rem; } .mb-4 { margin-bottom: 1rem; } .mb-8 { margin-bottom: 2rem; } .mt-3 { margin-top: .75rem; }
.row { display: flex; align-items: center; } .between { justify-content: space-between; }
.gap-2 { gap: .5rem; } .gap-4 { gap: 1rem; }
.stack-2 { display: flex; flex-direction: column; gap: .5rem; }
.flex-1 { flex: 1 1 0; min-width: 0; } .w-full { width: 100%; }
.muted { color: var(--gray500); } .small { font-size: .875rem; }
.text-green { color: var(--g600); }
.border-top { border-top: 1px solid var(--gray100); padding-top: 1rem; }
.shadow { box-shadow: 0 1px 2px rgba(0,0,0,.06); }

/* ---------- telas simples ---------- */
.view { min-height: 100vh; }
.screen-green { background: var(--g700); color: #fff; padding: 1.5rem; }
.center { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.card { background: #fff; border-radius: 1rem; box-shadow: 0 25px 50px -12px rgba(0,0,0,.25); color: var(--gray900); }
.login-card { width: 100%; max-width: 28rem; padding: 2rem; text-align: center; }
.login-title { font-size: 1.875rem; font-weight: 700; margin: 1rem 0 .5rem; }
.mb-6 { margin-bottom: 1.5rem; }
.auth-form { display: flex; flex-direction: column; gap: .875rem; text-align: left; }
.auth-field { display: flex; flex-direction: column; gap: .25rem; }
.auth-field > span { font-size: .875rem; font-weight: 500; color: var(--gray700); }
.auth-msg { font-size: .875rem; line-height: 1.4; padding: .625rem .75rem; border-radius: var(--radius); background: var(--red50); color: var(--red700); border: 1px solid var(--red200); }
.auth-msg.ok { background: var(--g50); color: var(--g800); border-color: var(--g200); }
.auth-links { display: flex; flex-direction: column; align-items: center; gap: .5rem; margin-top: 1rem; }
.link-btn { color: var(--g700); font-size: .875rem; font-weight: 500; text-decoration: underline; text-underline-offset: 2px; padding: .25rem; }
.link-btn:hover { color: var(--g800); }

.home-screen { background: var(--g50); display: flex; flex-direction: column; align-items: center; padding: 1.5rem; }
.home-card { width: 100%; max-width: 28rem; overflow: hidden; margin-top: 2.5rem; box-shadow: 0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.1); }
.home-hero { background: var(--g700); color: #fff; padding: 2rem; text-align: center; }
.home-title { font-size: 1.875rem; font-weight: 700; letter-spacing: -.025em; }
.home-sub { color: var(--g100); margin-top: .5rem; }
.home-user { margin-top: 1rem; font-size: .75rem; font-weight: 500; color: var(--g200); }
.home-actions { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.menu-btn { width: 100%; display: flex; align-items: center; gap: 1rem; padding: 1rem; border-radius: .75rem; font-weight: 500; text-align: left; transition: background-color .15s, border-color .15s; }
.menu-btn > span { display: flex; flex-direction: column; }
.menu-title { font-size: 1.125rem; }
.menu-desc { font-size: .875rem; font-weight: 400; }
.menu-primary { background: var(--g600); color: #fff; } .menu-primary:hover { background: var(--g700); }
.menu-primary .menu-desc { color: var(--g100); }
.menu-outline { background: #fff; border: 2px solid var(--gray200); color: var(--gray700); } .menu-outline:hover { border-color: var(--g500); }
.menu-outline .menu-desc { color: var(--gray500); }
.menu-danger { background: var(--red50); color: var(--red600); margin-top: 2rem; } .menu-danger:hover { background: var(--red100); }
.menu-danger .menu-desc { color: #f87171; }

/* ---------- páginas com barra ---------- */
.page { background: var(--gray50); display: flex; flex-direction: column; }
.topbar { background: var(--g700); color: #fff; padding: 1rem; display: flex; align-items: center; gap: 1rem; box-shadow: 0 4px 6px -1px rgba(0,0,0,.1); }
.topbar h1 { font-size: 1.25rem; font-weight: 700; flex: 1; }
.icon-btn { padding: .5rem; border-radius: 9999px; display: inline-flex; align-items: center; gap: .5rem; color: inherit; transition: background-color .15s; }
.icon-btn:hover { background: var(--g600); }
.icon-btn.with-label span { font-weight: 500; }
.page-body { padding: 1.5rem; flex: 1; max-width: 56rem; margin: 0 auto; width: 100%; }
.page-body.narrow { max-width: 48rem; }

.empty-card { background: #fff; border: 1px solid var(--gray200); border-radius: .75rem; box-shadow: 0 1px 2px rgba(0,0,0,.05); padding: 2rem; text-align: center; max-width: 28rem; margin: 2.5rem auto 0; }
.empty-card .ic-16 { color: var(--gray300); margin-bottom: 1rem; }
.empty-card h2 { font-size: 1.25rem; font-weight: 500; margin-bottom: .5rem; }

.reports-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 768px) { .reports-grid { grid-template-columns: 1fr 1fr; } }
.report-card { position: relative; background: #fff; border: 1px solid var(--gray200); border-radius: .75rem; padding: 1.25rem; display: flex; flex-direction: column; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.05); transition: border-color .15s; }
.report-card:hover { border-color: var(--g400); }
.report-card h3 { font-size: 1rem; font-weight: 700; }
.rc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; margin-bottom: .5rem; }
.rc-desc { font-size: .75rem; color: var(--gray500); margin-bottom: 1rem; flex: 1; }
.rc-desc .clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rc-foot { font-size: .75rem; background: var(--gray50); padding: .5rem; border-radius: .25rem; color: var(--gray600); font-weight: 500; display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.tag { font-size: 10px; font-weight: 900; text-transform: uppercase; padding: .125rem .5rem; border-radius: 9999px; white-space: nowrap; }
.tag-os { background: var(--blue100); color: var(--blue800); }
.tag-orc { background: var(--amber100); color: var(--amber800); }
.tag-rel { background: var(--g100); color: var(--g800); }
.area-pill { font-size: .75rem; font-weight: 700; color: var(--g700); background: var(--g50); padding: .25rem .5rem; border-radius: .25rem; white-space: nowrap; }
.del-btn { color: var(--red500); padding: .25rem; background: var(--red50); border-radius: .25rem; display: inline-flex; }
.del-btn:hover { color: var(--red700); }
.confirm-overlay { position: absolute; inset: 0; background: rgba(255,255,255,.96); z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1rem; text-align: center; border-radius: .75rem; border: 1px solid var(--red200); cursor: default; }
.confirm-overlay .row { width: 100%; }

.detail-card { background: #fff; border: 1px solid var(--gray200); border-radius: .75rem; box-shadow: 0 1px 2px rgba(0,0,0,.05); padding: 1.5rem; }
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--gray100); padding-bottom: 1rem; flex-wrap: wrap; }
.detail-head h2 { font-size: 1.5rem; font-weight: 700; }
.detail-meta { text-align: right; color: var(--gray500); font-size: .875rem; }
.detail-section { margin-bottom: 1.5rem; }
.detail-section h3 { font-weight: 600; color: var(--gray800); margin-bottom: .5rem; font-size: 1rem; }
.detail-text { color: var(--gray600); font-size: .875rem; white-space: pre-wrap; background: var(--gray50); padding: 1rem; border-radius: .5rem; }
.os-detail { background: var(--blue50); border: 1px solid var(--blue200); border-radius: .75rem; padding: 1rem; margin-bottom: 1.5rem; }
.os-detail h3 { font-size: .75rem; font-weight: 900; color: var(--blue900); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .5rem; display: flex; align-items: center; gap: .375rem; }
.os-detail-grid { display: grid; grid-template-columns: 1fr; gap: .75rem; font-size: .875rem; }
@media (min-width: 768px) { .os-detail-grid { grid-template-columns: 1fr 1fr; } }
.os-detail-grid > div { background: #fff; padding: .75rem; border-radius: .5rem; border: 1px solid var(--blue100); }
.os-detail-grid small { display: block; font-size: .75rem; color: var(--gray500); font-weight: 500; }
.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; background: var(--gray50); padding: 1rem; border-radius: .75rem; }
@media (min-width: 768px) { .photo-grid { grid-template-columns: repeat(3, 1fr); } }
.photo-grid img, .lot-photos img { width: 100%; height: 100%; object-fit: cover; }
.photo-grid > div { aspect-ratio: 1; border-radius: .5rem; overflow: hidden; border: 1px solid var(--gray200); background: #fff; }
.lot-card { border: 1px solid var(--gray200); border-radius: .5rem; padding: 1rem; }
.lot-card + .lot-card { margin-top: .75rem; }
.lot-card h4 { font-size: .875rem; font-weight: 500; }
.badges { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .75rem; }
.badge { padding: .25rem .5rem; border-radius: .375rem; display: inline-flex; align-items: center; gap: .25rem; }
.b-blue { background: var(--blue50); color: var(--blue700); }
.b-yellow { background: var(--yellow50); color: var(--yellow800); }
.b-purple { background: var(--purple50); color: var(--purple700); }
.lot-photos { margin-top: .75rem; display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
@media (min-width: 640px) { .lot-photos { grid-template-columns: repeat(3, 1fr); } }
.lot-photos > div { aspect-ratio: 1; border-radius: .375rem; overflow: hidden; border: 1px solid var(--gray100); }

/* selos de clima e dificuldade */
.wx { display: inline-flex; align-items: center; gap: .25rem; border: 1px solid; font-weight: 600; }
.wx-ensolarado { background: var(--amber50); border-color: var(--amber200); color: var(--amber700); }
.wx-ensolarado .ic { color: var(--amber500); }
.wx-nublado { background: var(--slate50); border-color: var(--slate200); color: var(--slate700); }
.wx-nublado .ic { color: var(--slate500); }
.wx-chovendo { background: var(--blue50); border-color: var(--blue200); color: var(--blue700); }
.wx-chovendo .ic { color: var(--blue500); }
.wx-tempestade { background: var(--purple50); border-color: var(--purple200); color: var(--purple700); }
.wx-tempestade .ic { color: var(--purple500); }
.factor-tag { background: var(--g50); color: var(--g800); border: 1px solid var(--g100); font-weight: 700; text-transform: uppercase; letter-spacing: .025em; font-size: 10px; }

/* ---------- editor ---------- */
body:has(#view-map:not([hidden])) { overflow: hidden; }
.editor { display: flex; flex-direction: column; height: 100vh; height: 100dvh; width: 100%; overflow: hidden; background: var(--gray100); }
@media (min-width: 768px) { .editor { flex-direction: row; } }
.sidebar { width: 100%; background: #fff; box-shadow: 0 25px 50px -12px rgba(0,0,0,.25); z-index: 20; display: flex; flex-direction: column; overflow-y: auto; padding-bottom: 6rem; height: 100%; }
@media (min-width: 768px) { .sidebar { width: 24rem; flex-shrink: 0; padding-bottom: 0; } }
.editor.drawing .sidebar { height: auto; }
@media (min-width: 768px) { .editor.drawing .sidebar { height: 100%; } }
.sidebar-head { padding: 1.5rem; background: var(--g700); color: #fff; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 30; box-shadow: 0 4px 6px -1px rgba(0,0,0,.1); }
.brand { display: flex; align-items: center; gap: .5rem; margin-bottom: .25rem; font-size: 1.5rem; font-weight: 700; letter-spacing: -.025em; }
.brand-sub { color: var(--g100); font-size: .875rem; }
.sidebar-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; gap: 1.5rem; }
.block { display: flex; flex-direction: column; gap: .75rem; }
.label-head { font-size: .875rem; font-weight: 600; color: var(--gray500); text-transform: uppercase; letter-spacing: .05em; }
h3.label-head { font-size: .75rem; font-weight: 700; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .5rem .75rem; border-radius: var(--radius); font-size: .875rem; font-weight: 500; transition: background-color .15s, border-color .15s, opacity .15s; }
.btn-lg { padding: .75rem 1rem; font-size: 1rem; }
.btn-primary { background: var(--g600); color: #fff; } .btn-primary:hover:not(:disabled) { background: var(--g700); }
.btn-primary:disabled { background: var(--g300); }
#btn-print:disabled { background: var(--gray300); }
.btn-soft { background: var(--gray100); color: var(--gray700); } .btn-soft:hover:not(:disabled) { background: var(--gray200); }
.btn-soft:disabled { opacity: .5; }
.btn-white { background: #fff; border: 1px solid var(--gray300); color: var(--gray700); padding: .625rem .75rem; margin-bottom: .5rem; } .btn-white:hover { background: var(--gray50); }
.btn-danger-soft { background: var(--red50); color: var(--red600); } .btn-danger-soft:hover { background: var(--red100); }
.btn-outline-green { background: #fff; border: 1px solid var(--g300); color: var(--g700); border-radius: .25rem; } .btn-outline-green:hover:not(:disabled) { background: var(--g100); }
.btn-outline-green:disabled { opacity: .5; }
.btn-hole { background: var(--red50); color: var(--red700); border: 1px solid var(--red200); border-radius: .25rem; } .btn-hole:hover { background: var(--red100); }
.btn-mobile-map { width: 100%; margin-bottom: .75rem; background: var(--g100); color: var(--g800); border: 1px solid var(--g300); padding: .75rem; font-weight: 700; }
.btn-mobile-map:hover { background: var(--g200); }
.chip-btn { display: inline-flex; align-items: center; gap: .25rem; padding: .25rem .5rem; border-radius: .25rem; font-size: .75rem; font-weight: 500; }
.chip-danger { color: var(--red600); background: var(--red50); } .chip-danger:hover { background: var(--red100); color: var(--red700); }
.btn-xs { flex: 1; padding: .375rem; border-radius: .25rem; font-size: .75rem; font-weight: 500; }
.btn-xs-outline { background: #fff; border: 1px solid var(--red300); color: var(--red600); }
.btn-xs-red { background: var(--red600); color: #fff; } .btn-xs-red:disabled { background: var(--red300); }
.btn-xs:disabled { opacity: .5; } .btn-xs-red:disabled { opacity: 1; }

.mobile-only { display: flex; }
.desktop-only { display: none; }
@media (min-width: 768px) { .mobile-only { display: none !important; } .desktop-only { display: block; } }

.input { width: 100%; padding: .5rem .75rem; border: 1px solid var(--gray300); border-radius: var(--radius); background: #fff; outline: none; font-size: 1rem; transition: box-shadow .15s, border-color .15s; }
.input:focus { border-color: var(--g500); box-shadow: 0 0 0 2px var(--g500); }
.input-green { border-color: var(--g300); border-radius: .25rem; font-size: .875rem; }
textarea.input { resize: none; }
.field { display: flex; flex-direction: column; gap: .25rem; }
.field-label { font-size: 10px; font-weight: 700; color: var(--g800); text-transform: uppercase; letter-spacing: .05em; }
.field-lg { display: flex; flex-direction: column; gap: .25rem; }
.field-lg > span { font-size: .875rem; font-weight: 500; color: var(--gray700); }
.field-sm { display: flex; flex-direction: column; gap: .25rem; }
.field-sm > span { font-size: .75rem; font-weight: 700; color: var(--gray700); display: flex; align-items: center; gap: .375rem; }
.with-icon { position: relative; display: block; }
.with-icon .ic { position: absolute; left: .5rem; top: 50%; transform: translateY(-50%); pointer-events: none; }
.with-icon .input { padding-left: 2rem; padding-right: .5rem; }
.logo-row { display: flex; align-items: center; gap: .75rem; }
.logo-slot { position: relative; width: 4rem; height: 4rem; border: 1px dashed var(--gray300); border-radius: .25rem; background: var(--gray50); display: flex; align-items: center; justify-content: center; color: var(--gray400); overflow: hidden; flex-shrink: 0; }
.logo-slot.has-img { border-style: solid; border-color: var(--gray200); }
.logo-slot img { max-width: 100%; max-height: 100%; object-fit: contain; }
.thumb-del { position: absolute; top: 0; right: 0; background: var(--red500); color: #fff; padding: .125rem; border-bottom-left-radius: .25rem; display: inline-flex; }
.thumb-del:hover { background: var(--red600); }

.draw-panel { background: var(--g50); padding: 1rem; border-radius: var(--radius); border: 1px solid var(--g200); margin-top: .5rem; }
.draw-title { color: var(--g800); font-size: .875rem; font-weight: 500; }
.hint { color: var(--g700); font-size: .75rem; margin-bottom: .5rem; }
.thumbs { display: grid; gap: .375rem; border: 1px solid var(--g200); padding: .5rem; border-radius: var(--radius); background: rgba(236,253,245,.5); }
.thumbs-5 { grid-template-columns: repeat(5, 1fr); }
.thumbs-4 { grid-template-columns: repeat(4, 1fr); gap: .5rem; border-color: var(--gray200); background: var(--gray50); }
.thumb { position: relative; aspect-ratio: 1; border: 2px solid var(--g100); border-radius: .25rem; background: #fff; overflow: hidden; }
.thumbs-4 .thumb { border: 1px solid var(--gray200); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.weather-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .375rem; }
.wx-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: .5rem .25rem; border-radius: var(--radius); border: 1px solid var(--g200); background: #fff; color: var(--g800); transition: all .2s; }
.wx-btn:hover { background: rgba(236,253,245,.5); }
.wx-btn span { font-size: 9px; line-height: 1; }
.wx-btn .ic { width: 1rem; height: 1rem; margin-bottom: .25rem; transition: transform .2s; }
.wx-btn.active { font-weight: 700; transform: scale(1.02); box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.wx-btn.active .ic { transform: scale(1.1); }
.wx-btn.active.ensolarado { background: var(--amber400); border-color: var(--amber500); color: var(--amber950); }
.wx-btn.active.nublado { background: var(--slate300); border-color: var(--slate400); color: var(--slate900); }
.wx-btn.active.chovendo { background: var(--blue400); border-color: var(--blue500); color: var(--blue950); }
.wx-btn.active.tempestade { background: var(--purple400); border-color: var(--purple500); color: var(--purple950); }
.factor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .375rem; }
.factor-btn { display: flex; align-items: center; gap: .5rem; padding: .375rem .625rem; border-radius: var(--radius); border: 1px solid var(--g200); background: #fff; color: var(--g900); text-align: left; font-weight: 600; transition: all .2s; min-width: 0; }
.factor-btn:hover { background: rgba(236,253,245,.5); }
.factor-btn span { font-size: 10.5px; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.factor-box { width: .875rem; height: .875rem; border-radius: .25rem; border: 1px solid var(--g300); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.factor-box .ic { width: .625rem; height: .625rem; stroke-width: 3; }
.factor-btn.active { background: var(--g600); border-color: var(--g700); color: #fff; font-weight: 700; }
.factor-btn.active .factor-box { background: #fff; border-color: #fff; color: var(--g600); }
.area-line { font-size: .875rem; font-weight: 500; color: var(--g700); padding: .25rem 0; margin-bottom: .5rem; }
.hole-panel { background: var(--red50); padding: .5rem; border-radius: .25rem; border: 1px solid var(--red200); margin-bottom: .5rem; }
.hole-title { color: var(--red700); font-size: .75rem; margin-bottom: .5rem; font-weight: 500; }

.saved-lots { display: flex; flex-direction: column; gap: .5rem; max-height: 10rem; overflow-y: auto; padding-right: .25rem; }
.lot-item { background: #fff; border: 1px solid var(--gray200); padding: .75rem; border-radius: var(--radius); display: flex; justify-content: space-between; align-items: center; box-shadow: 0 1px 2px rgba(0,0,0,.05); transition: border-color .15s; }
.lot-item:hover { border-color: var(--g300); }
.lot-item .info { flex: 1; min-width: 0; padding-right: .5rem; }
.lot-name { font-weight: 500; font-size: .875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lot-type { font-size: 10px; color: var(--g600); font-weight: 700; text-transform: uppercase; }
.lot-area { font-size: .75rem; color: var(--gray500); }
.mini-badges { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .375rem; }
.mini-badges .wx { padding: .125rem .5rem; border-radius: 9999px; font-size: 9px; gap: .375rem; }
.mini-badges .wx .ic { width: .75rem; height: .75rem; stroke-width: 2.5; }
.mini-badges .factor-tag { padding: .125rem .5rem; border-radius: .25rem; font-size: 9px; line-height: 1; }
.prev-tag { display: inline-flex; padding: .125rem .375rem; border-radius: .25rem; font-size: 9px; font-weight: 700; background: var(--red100); color: var(--red700); text-transform: uppercase; letter-spacing: .05em; flex-shrink: 0; }
.lot-actions { display: flex; gap: .25rem; }
.lot-actions button { padding: .375rem; border-radius: .25rem; display: inline-flex; }
.lot-actions .edit { color: var(--g600); } .lot-actions .edit:hover { background: var(--g50); }
.lot-actions .del { color: var(--red500); } .lot-actions .del:hover { background: var(--red50); }

.total-box { background: var(--gray50); padding: 1rem; border-radius: .75rem; border: 1px solid var(--gray200); margin-top: auto; }
.total-box .row { margin-bottom: .25rem; font-weight: 500; }
.total-value { font-size: 1.875rem; font-weight: 700; }
.total-unit { font-size: 1.125rem; color: var(--gray500); font-weight: 400; }

.seg { display: flex; background: var(--gray100); padding: .25rem; border-radius: var(--radius); gap: .25rem; }
.seg button { flex: 1; padding: .375rem .5rem; font-size: .75rem; font-weight: 700; border-radius: .375rem; color: var(--gray500); transition: all .15s; }
.seg button:hover { color: var(--gray700); }
.seg button.active { background: #fff; color: var(--g800); box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.os-box { background: rgba(236,253,245,.7); padding: .875rem; border-radius: .75rem; border: 1px solid var(--g200); display: flex; flex-direction: column; gap: .75rem; }
.os-head { display: flex; align-items: center; gap: .5rem; color: var(--g800); font-weight: 700; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.os-head .ic { color: var(--g600); }
.os-note { font-size: 11px; color: var(--g800); line-height: 1.375; }
.budget-box { border-top: 1px solid var(--gray100); padding-top: .5rem; display: flex; flex-direction: column; gap: .75rem; }
.budget-box .field-sm > span { color: var(--gray500); font-weight: 600; }
.radio { display: flex; align-items: center; gap: .5rem; font-size: .875rem; color: var(--gray700); cursor: pointer; }
.radio input { accent-color: var(--g600); width: 1rem; height: 1rem; margin: 0; }
.radio span { font-weight: 500; }
.forecast-box { border-top: 1px solid var(--gray100); padding-top: 1rem; }
.switch-row { position: relative; display: flex; align-items: center; gap: .5rem; cursor: pointer; font-size: .875rem; font-weight: 500; color: var(--gray700); }
.switch-row:hover { color: var(--g700); }
.switch { position: relative; width: 2.5rem; height: 1.25rem; background: var(--gray200); border-radius: 9999px; transition: background-color .15s; flex-shrink: 0; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 1rem; height: 1rem; background: #fff; border: 1px solid var(--gray300); border-radius: 9999px; transition: transform .15s; }
.switch-row input:checked + .switch { background: var(--g600); }
.switch-row input:checked + .switch::after { transform: translateX(1.25rem); border-color: #fff; }
.switch-row input:focus-visible + .switch { box-shadow: 0 0 0 4px var(--g300); }

/* ---------- pré-visualização (documento) ---------- */
.preview { flex: 1; position: relative; background: var(--gray200); overflow: auto; transition: all .3s; }
.editor.drawing .preview { height: 60vh; flex: none; }
@media (min-width: 768px) { .editor.drawing .preview { height: auto; flex: 1; } }
.preview-inner { padding: .5rem; display: flex; justify-content: center; min-height: 100%; align-items: flex-start; width: max-content; min-width: 100%; }
@media (min-width: 640px) { .preview-inner { padding: 1rem; } }
@media (min-width: 768px) { .preview-inner { padding: 2rem; } }

.report { background: #fff; width: 800px; min-width: 800px; max-width: 800px; min-height: 1131px; box-shadow: 0 25px 50px -12px rgba(0,0,0,.25); border: 1px solid var(--gray300); border-radius: .75rem; display: flex; flex-direction: column; flex-shrink: 0; margin: .5rem 0; }
.report-header { padding: 2rem; border-bottom: 4px solid var(--g700); background: #fff; border-radius: .75rem .75rem 0 0; }
.rh-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.rh-logo { width: 8rem; height: 4rem; display: flex; align-items: center; }
.rh-logo.left { justify-content: flex-start; } .rh-logo.right { justify-content: flex-end; }
.rh-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.rh-center { text-align: center; flex: 1; padding: 0 1rem; }
.rh-brand { display: flex; align-items: center; justify-content: center; gap: .5rem; color: var(--g800); margin-bottom: .25rem; }
.rh-brand h1 { font-size: 1.5rem; font-weight: 900; letter-spacing: -.05em; text-transform: uppercase; }
.rh-center h2 { font-size: 1.125rem; font-weight: 700; color: var(--gray700); }
.rh-date { display: flex; align-items: center; gap: .5rem; margin: 0 auto; width: max-content; background: var(--g50); padding: .25rem 1rem; border-radius: 9999px; border: 1px solid var(--g100); }
.rh-date-label { font-size: 9px; font-weight: 900; color: var(--g600); text-transform: uppercase; letter-spacing: .1em; }
#r-date { font-size: .875rem; font-weight: 700; color: var(--gray800); }
.report-body { padding: 2rem; flex: 1 0 auto; display: flex; flex-direction: column; background: #fff; gap: 2rem; border-radius: 0 0 .75rem .75rem; }
.r-group { display: contents; }
.report-section { background: #fff; width: 100%; }
.r-h3 { font-size: 10px; font-weight: 900; color: var(--g600); text-transform: uppercase; letter-spacing: .1em; margin-bottom: .75rem; display: flex; align-items: center; gap: .5rem; }
.r-h3.sep { border-top: 2px solid var(--gray100); padding-top: 2rem; margin-bottom: 1rem; }
.dot { width: .5rem; height: .5rem; background: var(--g600); border-radius: 9999px; }
.r-os { background: var(--g50); border: 2px solid var(--g600); padding: 1.25rem; border-radius: .75rem; }
.r-os-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.r-os-head .ic { color: var(--g700); }
.r-os-head h3 { font-size: .75rem; font-weight: 900; color: var(--g800); text-transform: uppercase; letter-spacing: .1em; }
.r-os-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.r-os-grid > div { background: #fff; padding: .875rem; border-radius: .5rem; border: 1px solid var(--g200); }
.r-os-grid small { font-size: 10px; font-weight: 900; color: var(--gray400); text-transform: uppercase; letter-spacing: .05em; display: flex; align-items: center; gap: .25rem; margin-bottom: .25rem; }
.r-os-grid small .ic { color: var(--g600); }
.r-os-grid p { font-size: 1rem; font-weight: 700; line-height: 1.25; }
.r-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.r-client { background: var(--gray50); padding: 1.5rem; border-radius: .75rem; border-left: 8px solid var(--g600); box-shadow: inset 0 2px 4px rgba(0,0,0,.05); }
.r-client h3, .r-area h3, .r-cost h3 { font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; margin-bottom: .5rem; }
.r-client h3 { color: var(--gray400); }
.r-client p { font-size: 1.25rem; font-weight: 900; line-height: 1.25; word-break: break-word; }
.r-stack { display: flex; flex-direction: column; gap: 1rem; }
.r-area { background: var(--g600); padding: 1.5rem; border-radius: .75rem; color: #fff; box-shadow: 0 10px 15px -3px rgba(0,0,0,.1); }
.r-area h3 { color: var(--g200); }
.r-area p, .r-cost p { font-size: 1.875rem; font-weight: 900; }
.r-area p span { font-size: 1.25rem; font-weight: 400; opacity: .8; }
.r-cost { background: #fff; border: 2px solid var(--g500); padding: 1.5rem; border-radius: .75rem; color: var(--g900); box-shadow: 0 10px 15px -3px rgba(0,0,0,.1); }
.r-cost h3 { color: var(--g600); }
.r-cost div { font-size: .875rem; margin-top: .25rem; color: var(--g700); font-weight: 500; }
.r-box { background: #fff; padding: 1.5rem; border-radius: .75rem; border: 2px solid var(--gray100); box-shadow: 0 1px 2px rgba(0,0,0,.05); min-height: 100px; }
.r-box p { color: var(--gray700); white-space: pre-wrap; word-break: break-word; font-size: 1rem; line-height: 1.625; }
.r-photos3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; background: var(--gray50); padding: 1rem; border-radius: 1rem; border: 2px solid var(--gray100); }
.r-photos2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.r-photo { position: relative; border: 2px solid #fff; border-radius: .5rem; overflow: hidden; box-shadow: 0 4px 6px -1px rgba(0,0,0,.1); background: #fff; height: 150px; }
.r-photos2 .r-photo { height: 220px; }
.r-photo img { width: 100%; height: 100%; object-fit: contain; }
.r-photo span { position: absolute; top: .5rem; left: .5rem; background: rgba(0,0,0,.6); color: #fff; font-size: 10px; font-weight: 700; padding: .125rem .5rem; border-radius: .25rem; }
.r-table-wrap { border: 2px solid var(--gray100); border-radius: .75rem; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.r-table { width: 100%; font-size: .875rem; text-align: left; border-collapse: collapse; }
.r-table thead { background: var(--g700); color: #fff; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.r-table th, .r-table td { padding: 1rem 1.5rem; }
.r-table tbody tr { color: var(--gray700); }
.r-table tbody tr + tr { border-top: 1px solid var(--gray100); }
.r-table .right { text-align: right; }
.r-table .nowrap { white-space: nowrap; font-weight: 500; }
.r-table .area { font-weight: 900; color: var(--g700); white-space: nowrap; }
.r-table .desc { word-break: break-word; max-width: 300px; }
.r-table .desc p { font-weight: 600; color: var(--gray900); }
.r-type { font-size: 10px; text-transform: uppercase; font-weight: 700; color: var(--g600); background: var(--g50); border: 1px solid var(--g100); padding: .125rem .375rem; border-radius: .25rem; }
.r-wx { display: inline-flex; align-items: center; gap: .25rem; padding: .125rem .375rem; border-radius: .25rem; background: var(--gray50); border: 1px solid var(--gray200); font-size: 9px; font-weight: 600; color: var(--gray700); }
.r-wx .ic { width: .875rem; height: .875rem; stroke-width: 2.5; }
.r-diff { display: inline-flex; padding: .125rem .375rem; border-radius: .25rem; background: var(--red50); color: var(--red700); border: 1px solid var(--red100); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; line-height: 1; }
.tags-row { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem; margin-top: .25rem; }
.r-lot { background: var(--gray50); padding: 1.5rem; border-radius: 1rem; border: 2px solid var(--gray100); box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.r-lot-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.r-lot-head h4 { font-size: 1.125rem; font-weight: 900; color: var(--g800); text-transform: uppercase; letter-spacing: -.025em; }
.r-lot-pill { background: var(--g100); color: var(--g700); padding: .25rem .75rem; border-radius: 9999px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.r-lot-badges { display: flex; flex-wrap: wrap; gap: .375rem; margin-bottom: 1rem; border-bottom: 1px solid var(--gray200); padding-bottom: .75rem; }
.r-lot-badges .wx { padding: .25rem .625rem; border-radius: 9999px; font-size: .75rem; font-weight: 900; gap: .375rem; }
.r-lot-badges .wx .ic { width: 1rem; height: 1rem; stroke-width: 3; }
.r-lot-badges .r-diff2 { display: inline-flex; padding: .25rem .625rem; border-radius: .25rem; background: var(--red100); color: #991b1b; border: 1px solid var(--red200); font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; }
.r-forecast { background: var(--g50); padding: 2rem; border-radius: 1rem; border: 2px solid var(--g100); box-shadow: inset 0 2px 4px rgba(0,0,0,.05); }
.r-forecast p { color: var(--g900); white-space: pre-wrap; word-break: break-word; font-size: 1.125rem; font-weight: 500; font-style: italic; line-height: 1.625; }
.report-footer { background: #fff; margin-top: auto; padding-top: 2.5rem; border-top: 4px solid var(--gray100); display: flex; justify-content: space-between; align-items: flex-end; }
.rf-left { font-size: 10px; font-weight: 700; color: var(--gray400); text-transform: uppercase; letter-spacing: .1em; }
.rf-left p + p { margin-top: .25rem; }
.rf-sigs { display: flex; gap: 1.5rem; }
.rf-sig { text-align: center; width: 12rem; }
.rf-sig.wide { width: 16rem; }
.rf-sig div { border-bottom: 2px solid var(--gray300); margin-bottom: .5rem; }
.rf-sig p { font-size: 9px; font-weight: 900; color: var(--gray500); text-transform: uppercase; letter-spacing: .1em; }
.rf-sig.wide p { font-size: 10px; }

/* mapa */
.map-shell { position: relative; height: 500px; width: 100%; border: 4px solid var(--gray100); border-radius: 1rem; overflow: hidden; box-shadow: inset 0 2px 4px rgba(0,0,0,.05); }
.map-wrap { position: relative; width: 100%; height: 100%; }
#map { width: 100%; height: 100%; z-index: 0; background: #ddd; }
.fit-btn { position: absolute; top: 1rem; right: 1rem; z-index: 400; background: #fff; color: var(--g800); padding: .5rem; border-radius: var(--radius); box-shadow: 0 2px 10px rgba(0,0,0,.1); border: 1px solid var(--gray200); display: flex; }
.fit-btn:hover { background: var(--g50); }
.fullmap-head, .fullmap-foot { display: none; }
.drawing-cursor .leaflet-container, .drawing-cursor .leaflet-container *, .drawing-cursor .leaflet-interactive, .drawing-cursor .leaflet-grab { cursor: crosshair !important; }

/* mapa em tela cheia (celular) */
.map-shell.fullscreen { position: fixed; inset: 0; z-index: 9999; background: #fff; display: flex; flex-direction: column; height: auto; border: 0; border-radius: 0; padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.map-shell.fullscreen .map-wrap { flex: 1; height: auto; }
.map-shell.fullscreen .fullmap-head { display: flex; justify-content: space-between; align-items: center; background: var(--g700); color: #fff; padding: 1rem; padding-top: max(2rem, env(safe-area-inset-top)); box-shadow: 0 4px 6px -1px rgba(0,0,0,.1); flex-shrink: 0; font-weight: 700; font-size: .875rem; }
.fullmap-head .ic { display: inline; vertical-align: -2px; margin-right: .25rem; }
#btn-fullmap-done { background: #fff; color: var(--g800); padding: .5rem 1rem; border-radius: var(--radius); font-weight: 700; font-size: .875rem; }
.map-shell.fullscreen .fullmap-foot { display: flex; flex-direction: column; gap: .75rem; background: #fff; padding: 1rem; padding-bottom: max(2rem, env(safe-area-inset-bottom)); border-top: 1px solid var(--gray200); box-shadow: 0 -15px 30px -5px rgba(0,0,0,.15); flex-shrink: 0; z-index: 10; }
.fm-area { display: flex; justify-content: space-between; align-items: center; color: var(--g800); background: var(--g50); padding: .5rem; border-radius: var(--radius); border: 1px solid var(--g100); font-weight: 700; }
.fm-area span { text-transform: uppercase; font-size: 10px; letter-spacing: .05em; }
.fm-area strong { font-size: 1.25rem; }
.fm-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: .5rem; padding: 1rem .5rem; border-radius: .75rem; font-weight: 700; font-size: .875rem; transition: transform .1s, background-color .15s; }
.fm-btn:active:not(:disabled) { transform: scale(.95); }
.fm-btn:disabled { opacity: .5; }
.fm-green { background: #fff; border: 2px solid var(--g400); color: var(--g700); }
.fm-red-soft { background: var(--red50); border: 2px solid var(--red200); color: var(--red700); }
.fm-red-outline { background: #fff; border: 2px solid var(--red300); color: var(--red600); padding: .75rem .5rem; }
.fm-red { background: var(--red600); color: #fff; padding: .75rem .5rem; }
.fm-red:disabled { background: var(--red300); opacity: 1; }

/* ---------- aviso ---------- */
.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); background: var(--gray900); color: #fff; padding: .75rem 1rem; border-radius: var(--radius); font-size: .875rem; z-index: 10000; box-shadow: 0 10px 15px -3px rgba(0,0,0,.2); max-width: calc(100% - 2rem); }
.mode-note { font-size: .75rem; color: var(--g700); background: var(--g50); border: 1px solid var(--g100); border-radius: var(--radius); padding: .5rem .75rem; text-align: center; }

/* ---------- selo beta e rodapé legal ---------- */
.beta { display: inline-block; vertical-align: middle; margin-left: .375rem; padding: .125rem .5rem; border-radius: 9999px; font-size: .625rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: var(--amber100); color: var(--amber800); border: 1px solid var(--amber200); line-height: 1.4; }
.beta-light { background: rgba(255,255,255,.18); color: #fff; border-color: rgba(255,255,255,.35); }
.brand .beta { margin-left: .25rem; }
.legal { text-align: center; font-size: .75rem; line-height: 1.6; color: var(--gray500); padding: 1.5rem 1rem; }
.legal p { margin: 0; }
.legal .legal-beta { color: var(--amber700); font-weight: 600; }
.legal-light { color: var(--g100); padding-bottom: 0; }
.legal-light .legal-beta { color: var(--amber200); }
.legal-sidebar { padding: .5rem 0 0; border-top: 1px solid var(--gray100); }
.home-screen .legal, .page .legal { margin-top: auto; }
