:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-2: #eef2f8;
    --text: #111827;
    --muted: #607086;
    --line: #d9e1ee;
    --primary: #1d4ed8;
    --primary-dark: #153ca9;
    --accent: #0f172a;
    --success: #0f8f5f;
    --danger: #c2410c;
    --shadow: 0 24px 60px rgba(15, 23, 42, .12);
    --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 6vw;
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; }
.brand-mark {
    display: grid; place-items: center;
    width: 36px; height: 36px;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    box-shadow: 0 10px 28px rgba(15,23,42,.22);
}
.desktop-nav { display: flex; gap: 24px; color: var(--muted); font-weight: 600; font-size: 14px; }
.header-actions { display: flex; gap: 10px; }
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 800;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 16px 32px rgba(29,78,216,.24); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: #fff; color: var(--accent); border-color: var(--line); }
.btn-ghost { color: var(--accent); background: transparent; }
.btn-lg { min-height: 52px; padding: 0 24px; }
.full { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

.hero-section { padding: 78px 6vw 54px; overflow: hidden; }
.hero-grid { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.08fr .92fr; gap: 54px; align-items: center; }
.eyebrow { display: inline-block; color: var(--primary); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 12px; }
h1, h2, h3, p { margin-top: 0; }
.hero-copy h1 { font-size: clamp(42px, 6vw, 74px); line-height: .95; letter-spacing: -.06em; margin-bottom: 22px; }
.hero-copy p { font-size: 19px; line-height: 1.65; color: var(--muted); max-width: 680px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.trust-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; color: var(--muted); font-size: 13px; font-weight: 800; }
.trust-row span { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; }
.hero-panel {
    background: radial-gradient(circle at 20% 0, #dbeafe, #fff 35%, #f8fafc 100%);
    border: 1px solid var(--line);
    border-radius: 30px;
    padding: 22px;
    box-shadow: var(--shadow);
}
.panel-top { display: flex; gap: 8px; margin-bottom: 18px; }
.panel-top span { width: 12px; height: 12px; border-radius: 50%; background: #cbd5e1; }
.mock-card { background: #0f172a; color: #fff; border-radius: 24px; padding: 24px; margin-bottom: 18px; }
.mock-card small, .mock-grid small { opacity: .68; display: block; margin-bottom: 8px; }
.mock-card strong { display: block; font-size: 28px; margin-bottom: 8px; }
.mock-card p { color: #cbd5e1; margin: 0; }
.mock-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.mock-grid div { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px; }

.section { padding: 74px 6vw; }
.section.muted { background: var(--surface-2); }
.section-heading { max-width: 780px; margin: 0 auto 34px; text-align: center; }
.section-heading h2 { font-size: clamp(28px, 4vw, 46px); line-height: 1.05; letter-spacing: -.04em; }
.section-heading p { color: var(--muted); font-size: 17px; line-height: 1.6; }
.cards, .steps, .pricing { max-width: 1120px; margin: 0 auto; }
.cards.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card, .step, .price-card, .panel-card, .metric-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 12px 32px rgba(15,23,42,.06);
}
.card p, .step p, .price-card li, .metric-card p, .panel-card p { color: var(--muted); line-height: 1.55; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--accent); color: #fff; font-weight: 900; margin-bottom: 18px; }
.pricing { display: grid; grid-template-columns: repeat(2, minmax(0, 380px)); gap: 18px; justify-content: center; }
.price-card.featured { border: 2px solid var(--primary); }
.badge { display: inline-block; background: #dbeafe; color: var(--primary); padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 900; }
.muted-badge { background: #e5e7eb; color: var(--muted); }
.price { font-size: 38px; font-weight: 900; margin: 10px 0 18px; }
.price span { font-size: 16px; color: var(--muted); }
ul { padding-left: 20px; }
.faq-list { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
details { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; }
summary { font-weight: 900; cursor: pointer; }
details p { color: var(--muted); line-height: 1.6; margin: 12px 0 0; }
.final-cta { margin: 72px 6vw; background: #0f172a; color: #fff; border-radius: 34px; padding: 56px 24px; text-align: center; }
.final-cta p { color: #cbd5e1; max-width: 660px; margin: 0 auto 26px; line-height: 1.6; }
.site-footer { padding: 36px 6vw; display: flex; justify-content: space-between; gap: 20px; color: var(--muted); }

.auth-body { min-height: 100vh; background: radial-gradient(circle at top left, #dbeafe, #f8fafc 42%, #eef2f8); }
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 28px; }
.auth-card { width: min(100%, 460px); background: rgba(255,255,255,.9); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 28px; padding: 30px; }
.auth-card.wide { width: min(100%, 620px); }
.auth-brand { margin-bottom: 24px; }
.auth-card h1 { font-size: 34px; letter-spacing: -.04em; margin-bottom: 8px; }
.auth-card p { color: var(--muted); line-height: 1.55; }
.form-stack { display: grid; gap: 16px; margin-top: 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
label { display: grid; gap: 8px; font-weight: 800; color: var(--accent); }
input { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; background: #fff; }
input:focus { outline: 3px solid rgba(29,78,216,.14); border-color: var(--primary); }
.auth-links { display: flex; justify-content: space-between; gap: 14px; margin-top: 20px; color: var(--primary); font-weight: 800; }
.auth-links.center { justify-content: center; }
.alert { border-radius: 14px; padding: 12px 14px; margin-top: 14px; font-size: 14px; line-height: 1.45; }
.alert.error { background: #fff7ed; color: var(--danger); border: 1px solid #fed7aa; }
.alert.success { background: #ecfdf5; color: var(--success); border: 1px solid #bbf7d0; }
.alert.info { background: #eff6ff; color: var(--primary); border: 1px solid #bfdbfe; word-break: break-word; }

.dashboard-body { background: #eef2f8; }
.app-layout { min-height: 100vh; display: grid; grid-template-columns: 280px 1fr; }
.sidebar { background: #0f172a; color: #fff; padding: 24px; display: flex; flex-direction: column; gap: 28px; }
.sidebar-brand .brand-mark { background: #fff; color: #0f172a; }
.sidebar-nav { display: grid; gap: 8px; }
.sidebar-nav a, .logout-link { padding: 13px 14px; border-radius: 14px; color: #cbd5e1; font-weight: 800; }
.sidebar-nav a.active { background: rgba(255,255,255,.12); color: #fff; }
.sidebar-nav a.disabled { opacity: .55; cursor: not-allowed; }
.sidebar-nav small { display: block; font-size: 11px; color: #94a3b8; margin-top: 2px; }
.logout-link { margin-top: auto; background: rgba(255,255,255,.08); }
.dashboard-main { padding: 34px; }
.dashboard-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.dashboard-header h1 { font-size: clamp(30px, 4vw, 48px); letter-spacing: -.05em; margin-bottom: 8px; }
.dashboard-header p { color: var(--muted); }
.dashboard-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.metric-card span { display: block; color: var(--muted); font-weight: 800; font-size: 13px; margin-bottom: 10px; }
.metric-card strong { display: block; font-size: 24px; letter-spacing: -.03em; margin-bottom: 8px; }
.metric-card.ai { background: #0f172a; color: #fff; }
.metric-card.ai p, .metric-card.ai span { color: #cbd5e1; }
.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-heading h2 { margin: 0; letter-spacing: -.03em; }
.pill { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 999px; background: #dbeafe; color: var(--primary); font-size: 12px; font-weight: 900; white-space: nowrap; }
.muted-pill { background: #e5e7eb; color: var(--muted); }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.check-list li { padding-left: 26px; position: relative; color: var(--muted); line-height: 1.45; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 900; }
.activity-list { display: grid; gap: 12px; }
.activity-item { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: #f8fafc; }
.activity-item p { margin: 5px 0; }
.activity-item small { color: var(--muted); }

@media (max-width: 980px) {
    .desktop-nav { display: none; }
    .hero-grid, .cards.three, .steps, .pricing, .content-grid { grid-template-columns: 1fr; }
    .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
    .app-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
}
@media (max-width: 640px) {
    .site-header { padding: 14px 18px; }
    .header-actions .btn-ghost { display: none; }
    .hero-section, .section { padding-left: 18px; padding-right: 18px; }
    .hero-actions { flex-direction: column; }
    .form-grid, .mock-grid, .dashboard-grid { grid-template-columns: 1fr; }
    .site-footer, .dashboard-header { flex-direction: column; align-items: flex-start; }
    .dashboard-main { padding: 20px; }
}


/* WorkOSBrasil Fase 2 — Clientes */
select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
    background: #fff;
    color: var(--text);
    font: inherit;
}
textarea { resize: vertical; min-height: 110px; }
select:focus, textarea:focus { outline: 3px solid rgba(29,78,216,.14); border-color: var(--primary); }
.narrow-main { max-width: 1040px; width: 100%; }
.compact-actions { flex-wrap: wrap; justify-content: flex-end; }
.single-row { grid-template-columns: 1fr; margin-top: 18px; }
.client-metrics { margin-top: 18px; }
.filter-bar { display: grid; grid-template-columns: 1fr 230px auto; gap: 14px; align-items: end; }
.filter-field { margin: 0; }
.filter-field.small { min-width: 200px; }
.filter-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.data-table th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.data-table td small { display: block; color: var(--muted); margin-top: 4px; }
.table-link { color: var(--primary); font-weight: 900; }
.table-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.table-actions form { margin: 0; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn-danger { background: #fff7ed; color: var(--danger); border-color: #fed7aa; }
.btn-danger:hover { background: #ffedd5; }
.status-badge { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 900; border: 1px solid transparent; white-space: nowrap; }
.status-ativo { background: #ecfdf5; color: #047857; border-color: #bbf7d0; }
.status-em_atendimento { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.status-inativo { background: #f3f4f6; color: #4b5563; border-color: #d1d5db; }
.status-prospecto { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.mobile-cards { display: none; gap: 12px; }
.client-card-mobile { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px; box-shadow: 0 10px 24px rgba(15,23,42,.06); }
.client-card-mobile h3 { margin-bottom: 8px; }
.client-card-mobile p { color: var(--muted); margin-bottom: 8px; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.detail-list { display: grid; grid-template-columns: 160px 1fr; gap: 12px 18px; margin: 0; }
.detail-list dt { color: var(--muted); font-weight: 900; }
.detail-list dd { margin: 0; line-height: 1.5; }
.ai-action-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.notes-list { display: grid; gap: 12px; margin-top: 18px; }
.compact-form { margin-bottom: 10px; }
.mini-table-wrap { overflow-x: auto; }
.compact-table th, .compact-table td { padding: 10px 8px; }

@media (max-width: 900px) {
    .filter-bar { grid-template-columns: 1fr; }
    .desktop-table { display: none; }
    .mobile-cards { display: grid; }
    .detail-list { grid-template-columns: 1fr; gap: 5px; }
    .detail-list dd { margin-bottom: 10px; }
    .ai-action-grid { grid-template-columns: 1fr; }
}


/* WorkOSBrasil Fase 3 — Obras e Serviços */
.dashboard-grid-six { grid-template-columns: repeat(6, 1fr); }
.filter-bar-wide { grid-template-columns: 1fr 220px 220px auto; }
.status-project-planejada { background: #f8fafc; color: #475569; border-color: #cbd5e1; }
.status-project-orcamento { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.status-project-aguardando_inicio { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.status-project-em_andamento { background: #ecfdf5; color: #047857; border-color: #bbf7d0; }
.status-project-pausada { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.status-project-aguardando_material { background: #fefce8; color: #a16207; border-color: #fde68a; }
.status-project-concluida { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.status-project-cancelada { background: #f3f4f6; color: #4b5563; border-color: #d1d5db; }
.progress-line { width: 100%; height: 10px; background: #e5e7eb; border-radius: 999px; overflow: hidden; }
.progress-line span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--success)); border-radius: 999px; }
.project-card-mobile .progress-line { margin-top: 10px; }
.soft-separator { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.alert-row { border-color: #fed7aa; background: #fff7ed; }
.timeline-list { display: grid; gap: 14px; position: relative; }
.timeline-item { position: relative; padding: 14px 14px 14px 44px; background: #f8fafc; border: 1px solid var(--line); border-radius: 16px; }
.timeline-item > span { position: absolute; left: 16px; top: 18px; width: 14px; height: 14px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 5px #dbeafe; }
.timeline-item strong { display: block; margin-bottom: 6px; }
.timeline-item strong small { color: var(--muted); font-weight: 800; margin-left: 8px; }
.timeline-item p { margin: 0 0 6px; }
.timeline-item small { color: var(--muted); }
.full-timeline { gap: 16px; }
button:disabled { opacity: .55; cursor: not-allowed; }

@media (max-width: 1200px) {
    .dashboard-grid-six { grid-template-columns: repeat(3, 1fr); }
    .filter-bar-wide { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
    .dashboard-grid-six, .filter-bar-wide { grid-template-columns: 1fr; }
}


/* WorkOSBrasil Fase 4 — Diário da Obra */
.filter-bar-diary { grid-template-columns: 1fr 170px 180px 180px 180px auto; }
.status-diary-normal { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.status-diary-atencao { background: #fefce8; color: #a16207; border-color: #fde68a; }
.status-diary-urgente { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.status-diary-concluido { background: #ecfdf5; color: #047857; border-color: #bbf7d0; }
.status-diary-pendente { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.diary-card-mobile { border-left: 5px solid var(--primary); }
.diary-timeline-item > span { background: var(--success); box-shadow: 0 0 0 5px #dcfce7; }
.diary-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 1180px) { .filter-bar-diary { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .filter-bar-diary, .diary-detail-grid { grid-template-columns: 1fr; } }


/* WorkOSBrasil Fase 5 — Upload Inteligente de Fotos e Vídeos */
.brand-logo { display: block; height: 42px; max-width: 260px; object-fit: contain; }
.sidebar-logo { height: 44px; max-width: 220px; filter: drop-shadow(0 10px 20px rgba(0,0,0,.18)); }
.sidebar .brand { justify-content: flex-start; }
.filter-bar-media { grid-template-columns: 1fr 170px 180px 180px auto; }
.media-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.compact-media-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.media-card { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 12px 30px rgba(15,23,42,.06); }
.media-card.compact { border-radius: 16px; }
.media-card img, .media-preview-large img, .media-preview-large video { display: block; width: 100%; height: auto; }
.media-card > a { display: block; aspect-ratio: 4 / 3; background: #0f172a; overflow: hidden; }
.media-card > a img { width: 100%; height: 100%; object-fit: cover; transition: transform .18s ease; }
.media-card > a:hover img { transform: scale(1.03); }
.media-card-body { padding: 14px; }
.media-card-body strong { display: block; margin-bottom: 6px; }
.media-card-body small { color: var(--muted); display: block; line-height: 1.45; }
.media-placeholder { width: 100%; height: 100%; min-height: 160px; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 34px; background: linear-gradient(135deg, #0f172a, #14b8a6); }
.media-preview-large { background: #0f172a; border-radius: 20px; overflow: hidden; min-height: 280px; display: grid; place-items: center; }
.media-preview-large video { max-height: 560px; background: #000; }
input[type="file"] { padding: 12px; min-height: 54px; }
@media (max-width: 1180px) { .filter-bar-media { grid-template-columns: 1fr 1fr; } .media-grid, .compact-media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .filter-bar-media { grid-template-columns: 1fr; } .media-grid, .compact-media-grid { grid-template-columns: 1fr; } .brand-logo { max-width: 210px; } }


/* WorkOSBrasil Fase 6 — Portal do Cliente */
.portal-body { background: #eef6fb; min-height: 100vh; }
.portal-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 6vw; background: rgba(255,255,255,.9); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); }
.portal-header nav { display: flex; align-items: center; gap: 12px; color: var(--muted); font-weight: 800; }
.portal-main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0 72px; }
.portal-hero { margin-bottom: 22px; }
.portal-hero h1, .portal-project-card h1 { font-size: clamp(34px, 5vw, 58px); letter-spacing: -.05em; margin-bottom: 10px; }
.portal-hero p { color: var(--muted); max-width: 760px; line-height: 1.6; }
.portal-project-card { display: grid; grid-template-columns: 1fr 180px; gap: 24px; align-items: center; background: radial-gradient(circle at top left, #dbeafe, #fff 42%, #f8fafc); border: 1px solid var(--line); border-radius: 30px; padding: 28px; box-shadow: var(--shadow); margin-bottom: 18px; }
.portal-project-card h2 { font-size: clamp(28px, 4vw, 46px); letter-spacing: -.04em; margin: 12px 0; }
.portal-project-card p { color: var(--muted); line-height: 1.6; }
.progress-ring { width: 160px; height: 160px; border-radius: 50%; display: grid; place-items: center; text-align: center; background: conic-gradient(var(--primary) 0 65%, #dbeafe 65% 100%); color: #0f172a; position: relative; }
.progress-ring::after { content: ""; position: absolute; inset: 16px; background: #fff; border-radius: 50%; }
.progress-ring strong, .progress-ring span { position: relative; z-index: 1; display: block; }
.progress-ring strong { font-size: 34px; letter-spacing: -.04em; }
.progress-ring span { color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.portal-metrics { margin: 18px 0; }
.portal-landing-section { background: linear-gradient(180deg, #fff, #eef6fb); }
.portal-mockup-grid { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: .95fr 1.05fr; gap: 22px; align-items: center; }
.cards-list { display: grid; gap: 14px; }
.portal-mockup { margin: 0; }
.portal-auth-body .auth-card { border-top: 5px solid #14b8a6; }
.media-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 12px; display: grid; gap: 10px; box-shadow: 0 10px 24px rgba(15,23,42,.06); }
.media-card strong { line-height: 1.25; }
.media-card small { color: var(--muted); }
.media-thumb { width: 100%; aspect-ratio: 4 / 3; background: #0f172a; border-radius: 14px; overflow: hidden; display: grid; place-items: center; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.filter-bar-media { display: grid; grid-template-columns: 1fr 190px 170px auto; gap: 14px; align-items: end; margin-bottom: 18px; }
.fullscreen-media .panel-card { max-width: 980px; margin: 0 auto; }
.full-media-image { display: block; width: 100%; max-height: 72vh; object-fit: contain; border-radius: 18px; background: #0f172a; margin-bottom: 16px; }
@media (max-width: 900px) {
    .portal-project-card, .portal-mockup-grid, .filter-bar-media { grid-template-columns: 1fr; }
    .progress-ring { width: 140px; height: 140px; }
    .portal-header { padding: 14px 18px; flex-direction: column; align-items: flex-start; }
}


/* WorkOSBrasil — Adendo Segurança, Proteção Visual e Anti-Cópia */
.commercial-protected { -webkit-user-select: none; user-select: none; }
.commercial-protected input, .commercial-protected textarea, .commercial-protected select, .commercial-protected button { -webkit-user-select: auto; user-select: auto; }
.workos-copy-notice { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(16px); background: #0f172a; color: #fff; border: 1px solid rgba(255,255,255,.14); padding: 12px 18px; border-radius: 999px; font-weight: 800; box-shadow: 0 18px 44px rgba(15,23,42,.26); opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; z-index: 9999; }
.workos-copy-notice.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.security-footer-note { margin-top: 8px; color: var(--muted); max-width: 720px; line-height: 1.5; }

/* Fase 8 — WorkOS AI Operacional */
.ai-result-card { border: 1px solid rgba(20, 184, 166, .25); }
.ai-output { white-space: pre-wrap; background: rgba(15, 23, 42, .04); border: 1px solid rgba(15, 23, 42, .08); border-radius: 16px; padding: 16px; font-family: inherit; line-height: 1.6; }
.numbered-list { padding-left: 22px; line-height: 1.8; color: var(--muted); }
.btn-danger { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.full { width: 100%; text-align: center; justify-content: center; }


/* Fase 9 — Orçamentos e Propostas */
.quote-items-box{border:1px solid rgba(15,23,42,.08);border-radius:18px;padding:18px;background:#fff}
.quote-item-row{display:grid;grid-template-columns:2fr .55fr .7fr .8fr 1.2fr;gap:10px;margin-bottom:10px}
.quote-item-row input{width:100%}
.status-quote-rascunho{background:#f1f5f9;color:#334155}.status-quote-em_elaboracao{background:#e0f2fe;color:#075985}.status-quote-enviado{background:#dbeafe;color:#1d4ed8}.status-quote-visualizado{background:#ede9fe;color:#6d28d9}.status-quote-em_negociacao{background:#fef3c7;color:#92400e}.status-quote-aprovado,.status-quote-convertido_obra{background:#dcfce7;color:#166534}.status-quote-rejeitado,.status-quote-expirado{background:#fee2e2;color:#991b1b}
.stacked-actions{display:grid;gap:10px}.inline-form{margin-top:10px}.ai-output{margin-top:14px;background:#0f172a;color:#e2e8f0;border-radius:16px;padding:16px;overflow:auto}.ai-output pre{white-space:pre-wrap;margin:0;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px}
.proposal-body{background:linear-gradient(135deg,#f8fafc,#e0f2fe);min-height:100vh}.proposal-page{max-width:1040px;margin:0 auto;padding:32px 18px}.proposal-header{display:flex;align-items:center;justify-content:space-between;gap:18px;background:white;border-radius:24px;padding:22px;box-shadow:0 20px 60px rgba(15,23,42,.08);margin-bottom:18px}.proposal-header img{height:42px}.proposal-header h1{margin:4px 0 0}.proposal-hero{display:grid;grid-template-columns:1.5fr .8fr;gap:18px;background:#0f172a;color:white;border-radius:28px;padding:28px;margin-bottom:18px}.proposal-hero p{color:#cbd5e1}.proposal-total{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.18);border-radius:24px;padding:24px;display:grid;place-content:center;text-align:center}.proposal-total strong{font-size:34px}.proposal-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:18px}.proposal-grid article,.proposal-items,.proposal-footer{background:white;border-radius:24px;padding:24px;box-shadow:0 16px 40px rgba(15,23,42,.06)}.proposal-footer{display:flex;justify-content:space-between;align-items:center}.proposal-mockup .mock-card{border-color:rgba(45,212,191,.35)}
@media(max-width:800px){.quote-item-row{grid-template-columns:1fr}.proposal-header,.proposal-hero,.proposal-grid,.proposal-footer{grid-template-columns:1fr;display:grid}.proposal-total strong{font-size:26px}}

/* WorkOSBrasil Fase 11 — Comunicação, Notificações e WhatsApp Estruturado */
.status-comm-draft { background:#f8fafc; color:#475569; border-color:#cbd5e1; }
.status-comm-queued, .status-comm-prepared { background:#eff6ff; color:#1d4ed8; border-color:#bfdbfe; }
.status-comm-sent { background:#ecfdf5; color:#047857; border-color:#bbf7d0; }
.status-comm-read, .status-comm-replied { background:#eef2ff; color:#4338ca; border-color:#c7d2fe; }
.status-comm-failed, .status-comm-cancelled { background:#fff7ed; color:#c2410c; border-color:#fed7aa; }
.message-preview { margin-top:18px; padding:18px; border:1px solid var(--line); border-radius:18px; background:#f8fafc; line-height:1.65; color:var(--text); }
.portal-header nav { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
