* { box-sizing: border-box; }

:root {
    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface-soft: #f8f9fc;
    --text: #17202a;
    --muted: #667085;
    --line: #e6e8ee;
    --primary: #155eef;
    --primary-dark: #0d47c7;
    --primary-soft: #edf4ff;
    --success: #157347;
    --danger: #a40000;
    --shadow: 0 12px 34px rgba(16, 24, 40, .07);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
}

body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top right, #eef4ff 0, transparent 32%), var(--bg); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: min(1120px, calc(100% - 36px)); margin: 0 auto; }
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 850; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--primary); color: #fff; font-size: .72rem; font-weight: 900; }
.nav-links { display: flex; align-items: center; gap: 18px; }
.nav-link { color: #475467; font-weight: 650; font-size: .94rem; }
.nav-link:hover { color: var(--text); text-decoration: none; }
.admin-link { color: var(--danger); }
.main-content { min-height: calc(100vh - 150px); }
.hero { padding: 92px 0 82px; max-width: 850px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, .6fr); gap: 40px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 6px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: .76rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.hero h1 { margin: 0 0 18px; font-size: clamp(2.35rem, 5vw, 4.55rem); line-height: 1.01; letter-spacing: -.055em; max-width: 800px; }
.hero p { max-width: 690px; color: var(--muted); font-size: 1.1rem; line-height: 1.75; }
.hero-panel { padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.8); box-shadow: var(--shadow); }
.hero-panel .mini-title { font-weight: 800; margin-bottom: 16px; }
.mini-item { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); color: #475467; font-size: .93rem; }
.mini-icon { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 900; flex: 0 0 auto; }
.actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; background: var(--primary); color: #fff; padding: 12px 18px; font: inherit; font-weight: 750; cursor: pointer; box-shadow: 0 5px 14px rgba(21,94,239,.16); }
.button:hover { text-decoration: none; background: var(--primary-dark); }
.button.secondary { background: #edf0f5; color: var(--text); box-shadow: none; }
.button.secondary:hover { background: #e2e6ed; }
.button.button-small { padding: 9px 14px; font-size: .9rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 28px; box-shadow: var(--shadow); }
.narrow { width: min(540px, 100%); margin: 58px auto; }
form { display: grid; gap: 10px; }
label { margin-top: 8px; font-weight: 700; color: #344054; }
input, textarea, select { width: 100%; padding: 12px 13px; border: 1px solid #cfd4dc; border-radius: 10px; background: #fff; font: inherit; color: var(--text); }
textarea { min-height: 150px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 3px solid rgba(21,94,239,.14); border-color: var(--primary); }
.check-row { display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; font-weight: 500; line-height: 1.5; }
.check-row input { width: auto; margin-top: 4px; }
.alert { border-radius: 10px; padding: 13px 15px; margin: 16px 0; border: 1px solid transparent; }
.alert.error { background: #fff1f1; color: var(--danger); border-color: #ffd5d5; }
.alert.success { background: #ecfdf3; color: var(--success); border-color: #b7ebcd; }
.form-footer { margin-bottom: 0; text-align: center; color: var(--muted); }
.page-head { padding: 48px 0 26px; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.page-head h1 { margin: 0 0 8px; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.035em; }
.page-head p { margin: 0; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.card h2 { margin: 0 0 10px; letter-spacing: -.02em; }
.card p { line-height: 1.65; }
.meta { color: var(--muted); font-size: .9rem; }
.status { display: inline-flex; padding: 5px 9px; border-radius: 999px; background: #fff7e6; color: #9a6700; font-size: .76rem; font-weight: 800; }
.checklist { padding-left: 20px; line-height: 2; color: #475467; }
.empty-state { text-align: center; padding: 44px 24px; background: var(--surface-soft); border: 1px dashed #cfd4dc; border-radius: 16px; }
.inline-form { display: inline; }
.link-button { border: 0; background: none; padding: 0; color: #475467; font: inherit; font-weight: 650; cursor: pointer; }
.link-button:hover { color: var(--text); }
.site-footer { margin-top: 80px; padding: 28px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; }
.footer-inner div { display: flex; gap: 12px; flex-wrap: wrap; }
.feature-list { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; padding-bottom: 70px; }
.feature { padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.65); }
.feature-icon { font-size: 1.35rem; margin-bottom: 12px; }
.feature h3 { margin: 0 0 8px; }
.feature p { margin: 0; color: var(--muted); line-height: 1.6; }
.actions-card { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.small { font-size: .86rem; }
.muted { color: var(--muted); }

@media (max-width: 800px) {
    .hero-grid, .grid.three, .feature-list { grid-template-columns: 1fr; }
    .hero { padding: 64px 0 58px; }
    .page-head { align-items: flex-start; flex-direction: column; }
    .nav { min-height: auto; padding: 14px 0; align-items: flex-start; }
    .nav-links { flex-wrap: wrap; justify-content: flex-end; gap: 10px 14px; }
}
@media (max-width: 560px) {
    .container { width: min(100% - 24px, 1120px); }
    .hero h1 { font-size: 2.45rem; }
    .footer-inner { flex-direction: column; }
}

.eyebrow{display:inline-block;font-size:.78rem;text-transform:uppercase;letter-spacing:.08em;font-weight:800;color:#155eef;margin-bottom:8px}.hero{padding:42px;margin-bottom:28px}.hero h1{font-size:clamp(2rem,4vw,3.2rem);line-height:1.05;max-width:760px;margin:0 0 14px}.section-head,.page-head{display:flex;justify-content:space-between;align-items:end;gap:20px;margin:26px 0 18px}.badge{display:inline-block;border-radius:999px;padding:5px 10px;background:#eef4ff;color:#155eef;font-size:.78rem;font-weight:700}.empty-state{text-align:center;padding:48px 24px}.admin-card{border-color:#d9b6b6}

.reader-shell { margin: 28px 0 60px; }
.reader-toolbar { display:flex; justify-content:space-between; align-items:flex-end; gap:20px; margin-bottom:18px; flex-wrap:wrap; }
.reader-toolbar h1 { margin:6px 0 0; }
.reader-actions { display:flex; gap:10px; flex-wrap:wrap; }
.reader-status { background:#fff; border:1px solid #e5e7eb; border-radius:12px; padding:12px 15px; color:#667085; margin-bottom:14px; }
.reader-page-wrap { display:flex; justify-content:center; align-items:flex-start; background:#e5e7eb; border:1px solid #d0d5dd; border-radius:14px; padding:18px; overflow:auto; }
.reader-canvas-stage { position:relative; display:inline-block; width:min(850px,100%); max-width:100%; background:#fff; box-shadow:0 2px 10px rgba(16,24,40,.12); user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; overflow:hidden; }
.reader-page { display:block; width:100%; height:auto; background:#fff; user-select:none; -webkit-user-select:none; pointer-events:none; }
.reader-watermark { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; transform:rotate(-28deg); font-size:18px; font-weight:700; letter-spacing:.04em; color:rgba(30,64,175,.14); text-align:center; pointer-events:none; user-select:none; -webkit-user-select:none; white-space:nowrap; }
@media print { .reader-shell { display:none !important; } body::after { content:"Este manuscrito é protegido e não está disponível para impressão."; display:block; margin:25vh auto; max-width:70%; text-align:center; font:700 18px/1.5 sans-serif; } }
.reader-agreement { margin-top:55px; }
@media (max-width:700px){ .reader-toolbar { align-items:flex-start; } .reader-actions { width:100%; } .reader-actions .button { flex:1; text-align:center; } .reader-page-wrap { padding:8px; } }
