/* ==========================================================================
   RTPD Gestao 360 - Design System
   Paleta derivada dos materiais oficiais: azul-marinho, ciano, branco e cinzas.
   ========================================================================== */

:root {
    /* Cores de marca */
    --navy-950: #011a33;
    --navy-900: #021f41;
    --navy-800: #063158;
    --navy-700: #0a4470;
    --cyan-600: #0099c7;
    --cyan-500: #00b2e7;
    --cyan-400: #22c6ef;
    --cyan-100: #ddf6fd;
    --cyan-50: #f1fbfe;
    --blue-600: #0b66d6;

    /* Neutros */
    --white: #ffffff;
    --surface: #f5f8fc;
    --surface-2: #edf3f9;
    --ink: #0b2239;
    --ink-2: #31465c;
    --muted: #5d7288;
    --line: #dbe5f0;
    --line-strong: #c3d4e4;

    /* Estados */
    --green: #12805c;
    --green-soft: #e7f7f0;
    --green-line: #b5e4d1;
    --orange: #a25708;
    --orange-soft: #fff4e5;
    --orange-line: #f0d4a8;
    --red: #b42318;
    --red-soft: #fdecea;
    --red-line: #f2c3be;

    /* Tipografia */
    --font-sans: "Segoe UI Variable", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;

    /* Espaçamento e forma */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 22px;
    --space-6: 30px;
    --space-7: 42px;
    --space-8: 58px;
    --space-9: 78px;

    --radius-xs: 7px;
    --radius-sm: 10px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-xl: 26px;

    --shadow-xs: 0 1px 2px rgba(11, 34, 57, 0.06);
    --shadow-sm: 0 6px 18px rgba(11, 34, 57, 0.07);
    --shadow-md: 0 18px 44px rgba(11, 34, 57, 0.11);

    --container: 1200px;
    --sidebar-width: 268px;
    --topbar-height: 70px;

    color-scheme: light;
}

/* Reset ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--white);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; }
h1, h2, h3, h4 { line-height: 1.16; letter-spacing: -0.025em; font-weight: 700; }
h1 { font-size: clamp(1.85rem, 2.8vw, 2.6rem); }
h2 { font-size: 1.28rem; }
h3 { font-size: 1.02rem; }
a { color: var(--blue-600); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy-800); }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
code {
    padding: 1px 5px;
    border: 1px solid var(--cyan-100);
    border-radius: 5px;
    background: var(--cyan-50);
    font-family: var(--font-mono);
    font-size: 0.9em;
}
::selection { background: var(--cyan-100); color: var(--navy-900); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
    outline: 3px solid rgba(0, 178, 231, 0.55);
    outline-offset: 2px;
    border-radius: 4px;
}

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.skip-link {
    position: fixed;
    top: -90px;
    left: 16px;
    z-index: 200;
    padding: 12px 18px;
    border-radius: 0 0 9px 9px;
    background: var(--navy-900);
    color: var(--white);
    text-decoration: none;
}
.skip-link:focus { top: 0; color: var(--white); }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.inline { display: inline-flex; margin: 0; }
.narrow { max-width: 780px; }
.eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--cyan-600);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}
.eyebrow-light { color: #8fe3f8; }

/* Marca ------------------------------------------------------------------ */
.brand-lockup {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}
.brand-plate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 8px;
    border-radius: 9px;
    background: transparent;
}
.brand-lockup--dark .brand-plate {
    background: var(--white);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
.brand-lockup img {
    width: 204px;
    height: auto;
}
.brand-lockup--dark img { width: 190px; }

/* Botoes ----------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 0.89rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 17px; height: 17px; flex-shrink: 0; }
.btn-primary {
    background: #1351b4;
    color: var(--white);
    box-shadow: 0 6px 16px rgba(19, 81, 180, 0.22);
}
.btn-primary:hover { background: #0b3f8f; color: var(--white); box-shadow: 0 8px 20px rgba(19, 81, 180, 0.3); }
.btn-secondary {
    background: var(--white);
    color: var(--navy-900);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-xs);
}
.btn-secondary:hover { background: var(--surface); color: var(--navy-900); border-color: #a9c1d8; }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--cyan-50); color: var(--navy-900); }
.btn-outline-light { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, 0.4); }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.12); color: var(--white); }
.btn-danger-ghost { background: transparent; color: var(--red); border-color: var(--red-line); }
.btn-danger-ghost:hover { background: var(--red-soft); color: var(--red); }
.btn-sm { min-height: 35px; padding: 6px 11px; font-size: 0.81rem; }
.btn-lg { min-height: 50px; padding: 12px 22px; font-size: 0.98rem; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; padding: 0; }
.text-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 30px;
    color: var(--blue-600);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
}
.text-link:hover { text-decoration: underline; }
.text-link svg { width: 15px; height: 15px; }

/* Flash e notices -------------------------------------------------------- */
.flash-stack { width: min(var(--container), calc(100% - 40px)); margin: 18px auto 0; }
.flash {
    margin: 0 0 12px;
    padding: 11px 14px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 0.89rem;
}
.flash-success { background: var(--green-soft); border-color: var(--green-line); color: #075c41; }
.flash-error { background: var(--red-soft); border-color: var(--red-line); color: #8d1b12; }
.flash-info { background: var(--cyan-50); border-color: #bcebf7; color: #075a75; }
.flash-warning { background: var(--orange-soft); border-color: var(--orange-line); color: #6f4300; }
.notice {
    margin-bottom: 18px;
    padding: 13px 15px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}
.notice-warning { background: var(--orange-soft); border-color: var(--orange-line); color: #664000; }
.notice-info { background: var(--cyan-50); border-color: #bcebf7; color: #075a75; }
.notice strong { font-weight: 800; }

/* Layout publico --------------------------------------------------------- */
.public-body { background: var(--white); }
.public-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
}
.public-header-inner {
    width: min(var(--container), calc(100% - 40px));
    min-height: 82px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
}
.public-nav { display: flex; align-items: center; gap: 22px; }
.public-nav > a {
    color: var(--ink-2);
    font-size: 0.86rem;
    font-weight: 650;
    text-decoration: none;
}
.public-nav > a:hover { color: var(--navy-900); }
.public-nav-divider { width: 1px; height: 22px; background: var(--line); }
.public-nav-login { color: var(--navy-900) !important; }
.public-footer { background: var(--navy-950); color: #d7e6f2; padding: 46px 0 22px; }
.public-footer-inner {
    width: min(var(--container), calc(100% - 40px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 40px;
    align-items: flex-start;
}
.public-footer-brand { max-width: 440px; }
.public-footer-brand p { margin-top: 14px; font-size: 0.88rem; color: #b9d0e2; }
.public-footer-note { font-size: 0.78rem !important; color: #8fb0c9 !important; }
.public-footer-nav { display: flex; gap: 64px; }
.public-footer-nav > div { display: flex; flex-direction: column; gap: 8px; }
.public-footer-nav strong {
    margin-bottom: 3px;
    color: var(--white);
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.public-footer-nav a { color: #b9d0e2; font-size: 0.86rem; text-decoration: none; }
.public-footer-nav a:hover { color: var(--white); }
.public-footer-bottom {
    width: min(var(--container), calc(100% - 40px));
    margin: 34px auto 0;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.13);
    display: flex;
    justify-content: space-between;
    gap: 18px;
    color: #8fb0c9;
    font-size: 0.76rem;
}

/* Landing page ----------------------------------------------------------- */
.hero-marketing {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 8% 12%, rgba(0, 178, 231, 0.13), transparent 30%),
        radial-gradient(circle at 92% 0%, rgba(11, 102, 214, 0.1), transparent 34%),
        linear-gradient(180deg, #f4fbff 0%, #ffffff 88%);
}
.hero-marketing-inner {
    width: min(var(--container), calc(100% - 40px));
    margin: 0 auto;
    padding: 66px 0 76px;
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
    gap: 48px;
    align-items: center;
}
.hero-marketing h1 { max-width: 640px; font-size: clamp(2.1rem, 4.2vw, 3.45rem); letter-spacing: -0.04em; }
.hero-marketing .hero-subtitle { max-width: 620px; margin-top: 18px; color: var(--ink-2); font-size: 1.05rem; line-height: 1.65; }
.hero-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border: 1px solid #c9eaf4;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--navy-800);
    font-size: 0.76rem;
    font-weight: 700;
}
.hero-pill svg { width: 14px; height: 14px; color: var(--cyan-600); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 27px; }
.hero-note { max-width: 600px; margin-top: 18px; color: var(--muted); font-size: 0.8rem; }
.hero-visual { position: relative; }
.hero-frame {
    position: relative;
    border: 1px solid #cfe6f3;
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--shadow-md);
    padding: 9px;
}
.hero-frame img {
    width: 100%;
    aspect-ratio: 1.1;
    object-fit: cover;
    border-radius: 19px;
}
.illustration-badge {
    position: absolute;
    left: 22px;
    bottom: 22px;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 999px;
    background: rgba(1, 26, 51, 0.82);
    color: #dff6fd;
    font-size: 0.69rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    backdrop-filter: blur(6px);
}
.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}
.hero-metric {
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.85);
}
.hero-metric strong { display: block; color: var(--navy-900); font-size: 0.82rem; }
.hero-metric span { color: var(--muted); font-size: 0.71rem; }

.section { padding: 76px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-dark { background: var(--navy-950); color: var(--white); }
.container { width: min(var(--container), calc(100% - 40px)); margin: 0 auto; }
.section-inner { width: min(var(--container), calc(100% - 40px)); margin: 0 auto; }
.section-heading { max-width: 780px; }
.section-heading h2 { font-size: clamp(1.55rem, 2.6vw, 2.15rem); }
.section-heading p { margin-top: 12px; color: var(--ink-2); font-size: 1rem; }
.section-dark .section-heading p { color: #bdd3e4; }
.section-dark .eyebrow { color: #8fe3f8; }
.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 32px;
}
.feature-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 178px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-xs);
}
.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: var(--cyan-50);
    color: var(--cyan-600);
    border: 1px solid #cceff8;
}
.feature-icon svg { width: 21px; height: 21px; }
.feature-card h3 { font-size: 0.97rem; }
.feature-card p { color: var(--muted); font-size: 0.85rem; line-height: 1.5; }
.feature-card .status-pill { align-self: flex-start; margin-top: auto; }
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.status-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-available { background: var(--green-soft); border-color: var(--green-line); color: #086346; }
.status-partial { background: var(--orange-soft); border-color: var(--orange-line); color: #7a4700; }
.status-planned { background: var(--surface-2); border-color: var(--line); color: var(--muted); }

.segment-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 30px;
}
.segment-card {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
}
.segment-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.segment-icon { display: inline-flex; color: var(--navy-700); }
.segment-icon svg { width: 20px; height: 20px; }
.segment-card h3 { font-size: 0.9rem; }
.segment-card p { color: var(--muted); font-size: 0.78rem; line-height: 1.45; }

.demo-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 16px; margin-top: 30px; }
.demo-shot {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.demo-shot--wide { grid-row: span 2; }
.demo-shot-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}
.demo-shot-dot { width: 7px; height: 7px; border-radius: 50%; background: #c7d5e2; }
.demo-shot-bar span { margin-left: 5px; color: var(--muted); font-size: 0.68rem; font-weight: 700; }
.demo-shot img { width: 100%; display: block; }
.demo-shot figcaption { padding: 12px 14px; border-top: 1px solid var(--line); }
.demo-shot figcaption strong { display: block; font-size: 0.83rem; }
.demo-shot figcaption span { color: var(--muted); font-size: 0.73rem; }
.screenshot-note { margin-top: 14px; color: var(--muted); font-size: 0.78rem; }

.promo-banner {
    display: block;
    margin-top: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background: var(--navy-950);
}
.promo-banner img { width: 100%; display: block; }
.promo-banner:hover { box-shadow: var(--shadow-md); }

.cta-band {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
    padding: 36px;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 88% 12%, rgba(0, 178, 231, 0.32), transparent 32%),
        linear-gradient(140deg, var(--navy-950), var(--navy-800));
    color: var(--white);
}
.cta-band h2 { color: var(--white); font-size: clamp(1.4rem, 2.4vw, 1.95rem); }
.cta-band p { margin-top: 8px; color: #bdd3e4; font-size: 0.92rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; flex-shrink: 0; }
.section-footnote { margin-top: 22px; color: var(--muted); font-size: 0.78rem; }

/* Autenticacao ----------------------------------------------------------- */
.auth-body { background: var(--surface); }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 0.95fr) minmax(0, 1.05fr); }
.auth-panel {
    width: min(520px, calc(100% - 48px));
    margin: 0 auto;
    padding: 48px 0 40px;
    align-self: center;
}
.auth-heading { margin: 26px 0 20px; }
.auth-heading h1 { margin-bottom: 7px; }
.auth-heading p { font-size: 0.92rem; }
.auth-foot { margin-top: 22px; font-size: 0.8rem; }
.auth-aside {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 30px;
    padding: 64px 58px;
    color: var(--white);
    background:
        radial-gradient(circle at 85% 8%, rgba(0, 178, 231, 0.3), transparent 33%),
        radial-gradient(circle at 8% 90%, rgba(11, 102, 214, 0.22), transparent 38%),
        linear-gradient(155deg, var(--navy-950) 0%, var(--navy-800) 100%);
}
.auth-aside::after {
    content: "";
    position: absolute;
    right: -110px;
    bottom: -140px;
    width: 380px;
    height: 380px;
    border: 1px solid rgba(0, 178, 231, 0.25);
    border-radius: 50%;
}
.auth-aside-copy { position: relative; z-index: 1; max-width: 560px; }
.auth-aside h2 { font-size: clamp(1.55rem, 2.6vw, 2.25rem); color: var(--white); }
.auth-aside-copy > p { margin-top: 13px; color: #bdd3e4; font-size: 0.94rem; }
.auth-benefits { list-style: none; margin-top: 26px; display: flex; flex-direction: column; gap: 14px; }
.auth-benefits li { display: flex; align-items: flex-start; gap: 11px; color: #d7e6f2; font-size: 0.88rem; }
.auth-benefits svg { width: 19px; height: 19px; flex-shrink: 0; margin-top: 1px; color: #78ddf8; }
.auth-aside-panel {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 12px;
    max-width: 510px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.07);
}
.auth-aside-panel-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 10px;
    background: rgba(0, 178, 231, 0.18);
    color: #8fe3f8;
}
.auth-aside-panel-icon svg { width: 20px; height: 20px; }
.auth-aside-panel strong { font-size: 0.87rem; }
.auth-aside-panel p { margin-top: 3px; color: #bdd3e4; font-size: 0.8rem; }
.auth-aside-note { position: relative; z-index: 1; max-width: 510px; color: #8fb0c9; font-size: 0.75rem; }
.auth-links { margin-top: 18px; font-size: 0.88rem; }
.auth-links p + p { margin-top: 9px; }

/* Formularios ------------------------------------------------------------ */
.form { display: flex; flex-direction: column; gap: 15px; }
.form-compact { gap: 11px; }
.form-section-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 5px;
    padding-top: 15px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.form-section-title::before { content: ""; width: 18px; height: 2px; background: var(--cyan-500); }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field label { color: var(--ink-2); font-size: 0.84rem; font-weight: 700; }
.field input, .field select, .field textarea {
    width: 100%;
    min-height: 43px;
    padding: 9px 11px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--ink);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.field textarea { min-height: 92px; resize: vertical; line-height: 1.55; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #9fb8cf; }
.field input:focus, .field select:focus, .field textarea:focus {
    border-color: var(--cyan-500);
    box-shadow: 0 0 0 3px rgba(0, 178, 231, 0.14);
    outline: none;
}
.field input:disabled, .field textarea:disabled, .field select:disabled { background: var(--surface); color: var(--muted); }
.field-hint { color: var(--muted); font-size: 0.76rem; line-height: 1.4; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.field-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-wide { grid-column: span 1; }
.checkbox-field { padding-top: 3px; }
.checkbox-label { display: flex; align-items: flex-start; gap: 10px; font-size: 0.86rem; line-height: 1.45; }
.checkbox-label input { width: 18px; height: 18px; min-height: 0; margin-top: 2px; accent-color: var(--cyan-600); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 5px; }
.form-note { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--muted); font-size: 0.8rem; }

/* App shell -------------------------------------------------------------- */
.app-body { background: var(--surface); }
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    min-height: 100vh;
    position: sticky;
    top: 0;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 20px 16px 18px;
    background:
        radial-gradient(circle at 0% 0%, rgba(0, 178, 231, 0.16), transparent 30%),
        linear-gradient(180deg, var(--navy-950) 0%, #03264b 100%);
    color: #d7e6f2;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}
.sidebar-top { padding: 2px 4px 4px; }
.sidebar-org {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 13px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
}
.sidebar-org-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sidebar-label { color: #8fb0c9; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.sidebar-count { color: #8fe3f8; font-size: 0.66rem; font-weight: 700; }
.sidebar-org-name { margin-top: 3px; color: var(--white); font-size: 0.94rem; line-height: 1.25; overflow-wrap: anywhere; }
.sidebar-cnpj { color: #9db9ce; font-size: 0.74rem; }
.sidebar-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 7px;
    color: #8fe3f8;
    font-size: 0.76rem;
    font-weight: 650;
    text-decoration: none;
}
.sidebar-link svg { width: 14px; height: 14px; }
.sidebar-link:hover { color: var(--white); text-decoration: underline; }
.sidebar-nav { display: flex; flex-direction: column; gap: 3px; }
.sidebar-nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 44px;
    padding: 9px 12px;
    border-radius: 9px;
    color: #bfd3e4;
    font-size: 0.89rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}
.sidebar-nav-item:hover { background: rgba(255, 255, 255, 0.08); color: var(--white); }
.sidebar-nav-item.is-active {
    background: rgba(0, 178, 231, 0.16);
    color: var(--white);
    box-shadow: inset 3px 0 0 var(--cyan-500);
}
.nav-icon { width: 19px; height: 19px; flex-shrink: 0; }
.nav-icon svg { width: 19px; height: 19px; }
.sidebar-nav-item.is-active .nav-icon { color: #8fe3f8; }
.sidebar-footer { margin-top: auto; padding: 14px 4px 2px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.sidebar-status { display: flex; align-items: center; gap: 6px; color: #a9c4d8; font-size: 0.71rem; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan-400); box-shadow: 0 0 0 3px rgba(0, 178, 231, 0.14); }
.sidebar-version { margin-top: 4px; color: #6f92ad; font-size: 0.67rem; }

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    min-height: var(--topbar-height);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 28px;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
}
.topbar-title { display: flex; flex-direction: column; min-width: 0; }
.topbar-eyebrow { color: var(--muted); font-size: 0.68rem; font-weight: 750; letter-spacing: 0.07em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-title strong { font-size: 0.96rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.topbar-quick { min-height: 36px; }
.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-xs);
    background: var(--white);
    color: var(--navy-900);
}
.nav-toggle svg { width: 20px; height: 20px; }
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(150deg, var(--cyan-500), #0787b4);
    color: var(--navy-950);
    font-size: 0.73rem;
    font-weight: 800;
}
.avatar-sm { width: 30px; height: 30px; font-size: 0.66rem; background: var(--cyan-100); color: var(--navy-800); }

/* Menus do topo ---------------------------------------------------------- */
.org-menu, .user-menu { position: relative; }
.org-menu > summary, .user-menu > summary {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.org-menu > summary::-webkit-details-marker, .user-menu > summary::-webkit-details-marker { display: none; }
.org-menu > summary:hover, .user-menu > summary:hover { background: var(--surface); }
.org-menu[open] > summary, .user-menu[open] > summary { background: var(--surface); border-color: var(--line); }
.org-menu > summary > svg, .user-menu > summary > svg { width: 14px; height: 14px; color: var(--muted); }
.org-menu-logo { width: 30px; height: 30px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.org-menu-initials { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; background: var(--cyan-100); color: var(--navy-800); font-size: 0.68rem; font-weight: 800; }
.org-menu-text, .user-menu-text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.org-menu-text strong, .user-menu-text strong { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.8rem; }
.org-menu-text span, .user-menu-text span { color: var(--muted); font-size: 0.68rem; }
.org-menu-panel, .user-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 80;
    width: 310px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-md);
}
.org-menu-panel { width: 330px; }
.menu-label { margin: 2px 4px 8px; color: var(--muted); font-size: 0.67rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.org-menu-panel ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.org-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--ink);
    text-align: left;
}
button.org-option:hover { background: var(--surface); }
.org-option.is-active { background: var(--cyan-50); border-color: #c9edf7; }
.org-option-main { display: flex; flex-direction: column; min-width: 0; }
.org-option-main strong { font-size: 0.81rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-option-main span { color: var(--muted); font-size: 0.69rem; }
.org-option-check { color: var(--cyan-600); }
.org-option-check svg { width: 17px; height: 17px; }
.org-menu-manage { display: flex; margin-top: 8px; padding: 9px 6px 2px; border-top: 1px solid var(--line); font-size: 0.8rem; font-weight: 700; text-decoration: none; }
.user-menu-panel { width: 260px; display: flex; flex-direction: column; gap: 5px; }
.user-menu-info { display: flex; flex-direction: column; gap: 3px; padding: 4px 6px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.user-menu-info strong { font-size: 0.84rem; }
.user-menu-info span { color: var(--muted); font-size: 0.72rem; overflow-wrap: anywhere; }
.user-menu-info .badge { align-self: flex-start; margin-top: 4px; }
.user-menu-panel > a, .user-menu-logout {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 8px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--ink-2);
    font-size: 0.81rem;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
}
.user-menu-panel > a:hover, .user-menu-logout:hover { background: var(--surface); color: var(--navy-900); }
.user-menu-logout { width: 100%; color: var(--red); }
.user-menu-logout svg { width: 16px; height: 16px; }
.content { width: min(1240px, 100%); margin: 0 auto; padding: 28px 30px 58px; }

/* Cabecalhos e paineis --------------------------------------------------- */
.page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}
.page-heading h1 { margin-bottom: 5px; }
.page-heading p:not(.eyebrow) { max-width: 760px; font-size: 0.9rem; }
.page-heading-actions { display: flex; flex-wrap: wrap; gap: 8px; flex-shrink: 0; }
.panel {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-xs);
}
.panel + .panel { margin-top: 16px; }
.panel-compact { padding: 16px; }
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}
.panel-head h2, .panel-compact h2 { font-size: 0.98rem; }
.panel-head .text-link { flex-shrink: 0; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(270px, 0.8fr); gap: 16px; align-items: start; }
.detail-grid > div > span, .detail-grid > div > strong { display: block; }
.detail-grid > div > strong { margin-top: 2px; }
.detail-grid > div { min-width: 0; }
.detail-side { display: flex; flex-direction: column; gap: 16px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(290px, 0.85fr); gap: 16px; align-items: start; margin-bottom: 16px; }

/* Dashboard -------------------------------------------------------------- */
.dashboard-welcome {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}
.dashboard-welcome h1 { margin-bottom: 4px; }
.dashboard-date { color: var(--muted); font-size: 0.82rem; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 16px 17px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
}
.metric::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--cyan-500), var(--cyan-400));
    opacity: 0.8;
}
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.metric-label { color: var(--muted); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.metric-icon { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; background: var(--cyan-50); color: var(--cyan-600); }
.metric-icon svg { width: 17px; height: 17px; }
.metric-value { margin-top: 4px; color: var(--navy-900); font-size: 2rem; font-weight: 750; line-height: 1; }
.metric-detail { color: var(--muted); font-size: 0.74rem; }
.quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.quick-action {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--ink);
    font-size: 0.8rem;
    font-weight: 650;
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.quick-action:hover { border-color: #a9cde2; background: var(--cyan-50); color: var(--navy-900); }
.quick-action-icon { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex-shrink: 0; border-radius: 8px; background: var(--surface); color: var(--cyan-600); }
.quick-action-icon svg { width: 16px; height: 16px; }

/* Listas e badges -------------------------------------------------------- */
.record-list, .version-list, .audit-list, .company-list, .member-list, .task-list, .checklist-mini-list { list-style: none; }
.record-list li, .version-list li, .audit-list li {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}
.record-list li:last-child, .version-list li:last-child, .audit-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.record-main { display: flex; flex-direction: column; min-width: 0; color: var(--ink); text-decoration: none; }
.record-main:hover .record-title { color: var(--blue-600); }
.record-title { font-size: 0.88rem; font-weight: 650; overflow-wrap: anywhere; }
.record-meta { color: var(--muted); font-size: 0.75rem; }
.version-list li { flex-direction: column; align-items: flex-start; gap: 2px; }
.audit-list li { flex-direction: column; align-items: flex-start; gap: 2px; }
.audit-list strong { color: var(--ink-2); font-family: var(--font-mono); font-size: 0.8rem; }
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.badge-neutral { background: var(--surface); border-color: var(--line); color: var(--ink-2); }
.badge-draft, .badge-open { background: var(--orange-soft); border-color: var(--orange-line); color: #7a4700; }
.badge-review { background: var(--cyan-50); border-color: #bcebf7; color: #075a75; }
.badge-approved, .badge-completed, .badge-active { background: var(--green-soft); border-color: var(--green-line); color: #086346; }
.badge-archived { background: var(--surface-2); border-color: var(--line); color: #4f6478; }
.badge-demo { background: #f3e9ff; border-color: #dbc6f3; color: #5b2c91; }
.badge-module-planned { background: var(--surface-2); border-color: var(--line); color: #4f6478; }
.badge-module-preparing { background: var(--orange-soft); border-color: var(--orange-line); color: #7a4700; }
.badge-module-available { background: var(--green-soft); border-color: var(--green-line); color: #086346; }

/* Tabelas ---------------------------------------------------------------- */
.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 0.86rem; }
.table th, .table td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table th { color: var(--muted); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.table tbody tr { transition: background 0.12s ease; }
.table tbody tr:hover { background: #f8fbfe; }
.table tbody tr:last-child td { border-bottom: 0; }
.table-title { display: block; color: var(--ink); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.table-title:hover { color: var(--blue-600); }
.table-sub { display: block; color: var(--muted); font-size: 0.72rem; }
.table-actions { text-align: right; white-space: nowrap; }
.table-actions .text-link { margin-left: 10px; }
.table-actions .inline { margin-left: 10px; }
.progress-cell { min-width: 150px; }
.progress-cell progress { width: 100%; display: block; margin-bottom: 3px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; color: var(--muted); font-size: 0.8rem; }

/* Filtros ---------------------------------------------------------------- */
.filter-panel { padding: 16px 18px; }
.filter-form {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) minmax(140px, 0.7fr) minmax(150px, 0.8fr) auto;
    gap: 12px;
    align-items: end;
}
.filter-actions { display: flex; gap: 6px; }
.status-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 16px; }
.status-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--white);
    color: var(--ink-2);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
}
.status-tab:hover { border-color: #a9cde2; background: var(--cyan-50); color: var(--navy-900); }
.status-tab.is-active { border-color: var(--navy-900); background: var(--navy-900); color: var(--white); }
.status-tab-count { color: inherit; opacity: 0.7; font-size: 0.7rem; }
.inline-form { display: flex; gap: 24px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.inline-form-fields { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; flex: 1; }
.inline-form-fields .field { min-width: 180px; flex: 1; }
.add-item { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.add-item h3 { margin-bottom: 12px; }

/* Estados vazios --------------------------------------------------------- */
.empty {
    padding: 30px 18px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-sm);
    background: #fbfdff;
    text-align: center;
}
.empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 13px; background: var(--cyan-50); color: var(--cyan-600); }
.empty-icon svg { width: 24px; height: 24px; }
.empty h2, .empty h3 { margin-bottom: 6px; font-size: 1rem; }
.empty p { max-width: 520px; margin: 0 auto 14px; color: var(--muted); font-size: 0.87rem; }
.empty-inline { padding: 20px; text-align: left; }

/* Modulos ---------------------------------------------------------------- */
.module-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.module-chip { display: flex; flex-direction: column; gap: 7px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fbfdff; }
.module-chip strong { font-size: 0.82rem; line-height: 1.3; }
.module-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.module-card { display: block; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow-xs); color: inherit; text-decoration: none; }\n.module-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.module-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.module-card h2 { font-size: 0.95rem; }
.module-card p { color: var(--muted); font-size: 0.84rem; }
.module-card .record-meta { margin-top: 10px; }

/* Documentos ------------------------------------------------------------- */
.doc-preview {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--ink-2);
    font-size: 0.91rem;
    line-height: 1.72;
    overflow-wrap: anywhere;
}
.doc-preview br { line-height: 1.72; }
.detail-list { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 7px 12px; font-size: 0.83rem; }
.detail-list dt { color: var(--muted); font-weight: 700; }
.detail-list dd { color: var(--ink-2); overflow-wrap: anywhere; }
.document-meta-check { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.editor-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.65fr); gap: 16px; align-items: start; }
.editor-side { position: sticky; top: calc(var(--topbar-height) + 16px); display: flex; flex-direction: column; gap: 14px; }
.editor-side .panel { padding: 15px; }
.editor-tips { list-style: none; display: flex; flex-direction: column; gap: 8px; color: var(--muted); font-size: 0.78rem; }
.editor-tips li { padding-left: 16px; position: relative; }
.editor-tips li::before { content: ""; position: absolute; left: 0; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan-500); }
.version-chip { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 0.8rem; }
.version-chip:last-child { border-bottom: 0; }

/* Checklists ------------------------------------------------------------- */
.summary-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.summary-card { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); }
.summary-card span { color: var(--muted); font-size: 0.72rem; font-weight: 700; }
.summary-card strong { display: block; margin-top: 2px; color: var(--navy-900); font-size: 1.45rem; line-height: 1; }
.progress-panel { margin-bottom: 16px; }
.progress-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.progress-head strong { color: var(--ink-2); font-size: 0.82rem; }
progress {
    width: 100%;
    height: 10px;
    border: 0;
    border-radius: 999px;
    overflow: hidden;
    appearance: none;
    background: var(--surface-2);
}
progress::-webkit-progress-bar { background: var(--surface-2); border-radius: 999px; }
progress::-webkit-progress-value { background: linear-gradient(90deg, var(--cyan-600), var(--cyan-400)); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--cyan-500); border-radius: 999px; }
.progress-panel > p { margin-top: 10px; font-size: 0.86rem; }
.task-list { display: flex; flex-direction: column; }
.task-item { display: flex; align-items: flex-start; gap: 11px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.task-item:last-child { border-bottom: 0; }
.task-item.is-done .task-title { color: var(--muted); text-decoration: line-through; }
.task-toggle-form { margin: 0; padding-top: 1px; }
.task-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 29px;
    height: 29px;
    padding: 0;
    border: 1.5px solid var(--line-strong);
    border-radius: 8px;
    background: var(--white);
    color: var(--white);
}
.task-toggle:hover { border-color: var(--cyan-500); background: var(--cyan-50); }
.task-toggle.is-static { color: var(--white); }
.task-toggle-box { color: var(--white); font-size: 0.92rem; line-height: 1; }
.task-item.is-done .task-toggle { background: var(--cyan-500); border-color: var(--cyan-500); }
.task-item.is-done .task-toggle-box, .task-toggle.is-static .task-toggle-box { color: var(--navy-950); }
.task-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.task-title { font-size: 0.9rem; font-weight: 650; overflow-wrap: anywhere; }
.task-edit { margin-left: auto; }
.task-edit summary, .settings-details summary { color: var(--blue-600); font-size: 0.8rem; font-weight: 700; cursor: pointer; }
.task-edit form { min-width: 280px; margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fbfdff; }
.settings-details form { margin-top: 12px; }
.checklist-mini-list { display: flex; flex-direction: column; gap: 12px; }
.checklist-mini { display: flex; flex-direction: column; gap: 5px; }
.checklist-mini-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.checklist-mini-top a { color: var(--ink); font-size: 0.85rem; font-weight: 650; text-decoration: none; }
.checklist-mini-top a:hover { color: var(--blue-600); }
.checklist-mini-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.71rem; }

/* Empresas, membros, auditoria, configuracoes ----------------------------- */
.company-list { display: flex; flex-direction: column; gap: 9px; }
.company-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fbfdff; }
.company-item.is-active { border-color: #a9dcf0; background: var(--cyan-50); }
.company-main { display: flex; align-items: center; gap: 11px; min-width: 0; }
.company-avatar { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; background: var(--navy-900); color: var(--white); font-size: 0.7rem; font-weight: 800; }
.company-text { display: flex; flex-direction: column; min-width: 0; }
.company-text strong { font-size: 0.88rem; overflow-wrap: anywhere; }
.member-list { display: flex; flex-direction: column; gap: 10px; }
.member-list li { display: flex; align-items: center; gap: 9px; }
.member-main { display: flex; flex-direction: column; min-width: 0; }
.member-main strong { font-size: 0.84rem; }
.member-main .record-meta { overflow-wrap: anywhere; }
.logo-preview { display: flex; justify-content: center; padding: 14px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fbfdff; }
.logo-preview img { max-width: 120px; max-height: 120px; object-fit: contain; }
.settings-section-title { display: flex; align-items: center; gap: 9px; margin: 26px 0 12px; color: var(--ink); font-size: 1rem; }
.settings-section-title:first-child { margin-top: 0; }
.settings-section-title svg { width: 19px; height: 19px; color: var(--cyan-600); }

/* Impressao A4 ----------------------------------------------------------- */
.print-body { background: #e9eef5; }
.print-toolbar { width: min(210mm, calc(100% - 32px)); margin: 18px auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.print-toolbar-actions { display: flex; align-items: center; gap: 10px; }
.print-toolbar-note { color: var(--muted); font-size: 0.75rem; }
.print-sheet {
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto 40px;
    padding: 20mm 18mm 18mm;
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    color: #172b3f;
    font-size: 11.5pt;
    line-height: 1.58;
}
.print-warning {
    margin-bottom: 18px;
    padding: 8px 10px;
    border: 1px solid var(--orange-line);
    border-radius: 5px;
    background: var(--orange-soft);
    color: #6f4300;
    font-size: 8.5pt;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-align: center;
}
.print-header { display: flex; justify-content: space-between; gap: 24px; padding-bottom: 14px; border-bottom: 2px solid var(--navy-900); }
.print-brand { display: flex; gap: 12px; align-items: flex-start; }
.print-logo { width: 58px; height: 58px; object-fit: contain; }
.print-brand div { display: flex; flex-direction: column; color: var(--muted); font-size: 9.5pt; }
.print-brand strong { color: var(--ink); font-size: 11pt; }
.print-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; color: var(--muted); font-size: 9pt; text-align: right; }
.print-meta strong { color: var(--ink); font-size: 10.5pt; }
.print-doc-title { margin: 22px 0 4px; color: var(--ink); font-size: 17pt; line-height: 1.2; }
.print-doc-subtitle { margin-bottom: 18px; color: var(--muted); font-size: 9.5pt; }
.print-content { padding: 18px 0 24px; color: #243b53; font-size: 11pt; line-height: 1.65; overflow-wrap: anywhere; }
.print-content h1, .print-content h2, .print-content h3 { margin: 14px 0 6px; break-after: avoid; }
.print-content p, .print-content li { orphans: 3; widows: 3; }
.print-content table { width: 100%; border-collapse: collapse; break-inside: avoid; }
.print-content th, .print-content td { padding: 5px; border: 1px solid #b9c8d6; }
.print-footer { padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 8.5pt; }
.print-footer p + p { margin-top: 3px; }

/* Responsivo ------------------------------------------------------------- */
@media (max-width: 1180px) {
    .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .segment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .module-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero-marketing-inner { gap: 32px; }
}

@media (max-width: 1024px) {
    .content { padding: 24px 22px 48px; }
    .topbar { padding: 10px 22px; }
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-grid, .detail-grid, .settings-grid, .editor-grid { grid-template-columns: 1fr; }
    .editor-side { position: static; }
    .filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-actions { grid-column: span 2; }
    .demo-grid { grid-template-columns: 1fr; }
    .demo-shot--wide { grid-row: auto; }
    .auth-shell { grid-template-columns: minmax(360px, 1fr) minmax(0, 1fr); }
    .auth-aside { padding: 48px 38px; }
}

@media (max-width: 860px) {
    .app-shell { display: block; }
    .sidebar {
        position: static;
        width: 100%;
        min-height: 0;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    .has-js .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 90;
        width: min(300px, 88vw);
        overflow-y: auto;
        transform: translateX(-102%);
        transition: transform 0.2s ease;
    }
    .has-js.nav-open .sidebar { transform: none; }
    .has-js.nav-open { overflow: hidden; }
    .has-js.nav-open::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 85;
        background: rgba(1, 26, 51, 0.52);
    }
    .nav-toggle { display: inline-flex; }
    .sidebar-footer { margin-top: 14px; }
    .topbar { padding: 9px 16px; }
    .content { padding: 20px 16px 42px; }
    .page-heading { flex-direction: column; }
    .dashboard-welcome { flex-direction: column; align-items: flex-start; }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-aside { display: none; }
    .auth-panel { padding: 42px 0 34px; }
    .public-nav > a:not(.btn):not(.public-nav-login), .public-nav-divider { display: none; }
    .hero-marketing-inner { grid-template-columns: 1fr; gap: 28px; padding: 46px 0 54px; }
    .hero-visual { max-width: 720px; }
    .section { padding: 56px 0; }
    .cta-band { flex-direction: column; align-items: flex-start; padding: 26px; }
    .public-footer-inner { flex-direction: column; gap: 26px; }
    .public-footer-nav { gap: 42px; }
}

@media (max-width: 680px) {
    .public-header-inner { min-height: 72px; }
    .brand-lockup img { width: 176px; }
    .public-nav { gap: 9px; }
    .public-nav .btn { min-height: 37px; padding: 7px 11px; font-size: 0.79rem; }
    .hero-marketing h1 { font-size: 2rem; }
    .hero-marketing .hero-subtitle { font-size: 0.95rem; }
    .hero-actions .btn { flex: 1; min-width: 150px; }
    .hero-metrics { grid-template-columns: 1fr; }
    .feature-grid, .segment-grid, .module-grid, .module-strip { grid-template-columns: 1fr; }
    .metric-grid { grid-template-columns: 1fr; }
    .summary-strip { grid-template-columns: 1fr; }
    .filter-form { grid-template-columns: 1fr; }
    .filter-actions { grid-column: auto; }
    .field-row, .field-row.three { grid-template-columns: 1fr; }
    .public-footer-nav { flex-direction: column; gap: 20px; }
    .public-footer-bottom { flex-direction: column; gap: 5px; }
    .cta-band { padding: 22px; }
    .cta-actions { width: 100%; }
    .cta-actions .btn { flex: 1; }
    .quick-actions { grid-template-columns: 1fr; }
    .topbar-quick span { display: none; }
    .topbar-quick { width: 38px; padding: 0; }
    .org-menu-text, .user-menu-text { display: none; }
    .org-menu > summary, .user-menu > summary { padding: 4px 6px; }
    .org-menu-panel { width: min(330px, calc(100vw - 32px)); right: -74px; }
    .user-menu-panel { width: min(260px, calc(100vw - 32px)); }
    .print-toolbar { width: calc(100% - 24px); flex-wrap: wrap; }
    .print-toolbar-note { display: none; }
    .print-sheet { width: 100%; min-height: 0; padding: 24px 18px; border-radius: 0; border-left: 0; border-right: 0; }
    .print-header { flex-direction: column; gap: 12px; }
    .print-meta { align-items: flex-start; text-align: left; }
    .doc-preview { padding: 18px; }
    .task-item { flex-wrap: wrap; }
    .task-edit { margin-left: 40px; width: 100%; }
    .task-edit form { min-width: 0; width: 100%; }
    .company-item { flex-direction: column; align-items: flex-start; }
    .inline-form-fields { flex-direction: column; align-items: stretch; }
    .table { min-width: 0; }
    .table--cards thead { display: none; }
    .table--cards, .table--cards tbody, .table--cards tr, .table--cards td { display: block; width: 100%; }
    .table--cards tr { margin-bottom: 10px; padding: 12px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); }
    .table--cards td { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 5px 0; border: 0; text-align: right; }
    .table--cards td::before { content: attr(data-label); flex-shrink: 0; color: var(--muted); font-size: 0.69rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; text-align: left; padding-top: 2px; }
    .table--cards td:first-child { display: block; padding-bottom: 8px; text-align: left; }
    .table--cards td:first-child::before { display: none; }
    .table--cards .table-actions { justify-content: flex-end; flex-wrap: wrap; }
    .table--cards .progress-cell { display: block; text-align: left; }
    .table--cards .progress-cell::before { display: block; margin-bottom: 4px; }
    .table--cards .table-actions::before { content: attr(data-label); }
    .table--cards .table-title { text-align: left; }
    .table--cards .badge { margin-left: auto; }
}

.task-toggle-box svg { width: 15px; height: 15px; }
.panel-note { margin-top: 12px; }
.print-body .btn svg { width: 17px; height: 17px; }
.sidebar-version { display: flex; align-items: center; gap: 6px; }
.sidebar-version img { width: 18px; height: 18px; object-fit: contain; }
.cta-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 9px;
    border-radius: 16px;
    background: var(--white);
}
.cta-brand img { width: 76px; height: 76px; object-fit: contain; }

@media (max-width: 900px) {
    .print-sheet { width: calc(100% - 32px); min-height: 0; }
}

/* Motor de documentos */
.model-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.model-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-xs);
}
.model-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.model-card h2 { font-size: 1.02rem; }
.model-card > p { color: var(--muted); font-size: 0.86rem; }
.model-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 3px 0; }
.model-meta div { padding: 7px 9px; border-radius: 8px; background: var(--surface); }
.model-meta dt { color: var(--muted); font-size: 0.67rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.model-meta dd { color: var(--ink-2); font-size: 0.8rem; font-weight: 650; overflow-wrap: anywhere; }
.model-instructions { padding: 9px 11px; border: 1px dashed var(--line-strong); border-radius: 8px; color: var(--muted) !important; font-size: 0.78rem !important; }
.model-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: auto; padding-top: 8px; }
.model-actions form { margin: 0; }
.model-field-list { list-style: none; display: flex; flex-direction: column; }
.model-field-list li { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.model-field-list li:last-child { border-bottom: 0; }
.model-field-help, .model-field-options { color: var(--muted); font-size: 0.77rem; }
.model-field-options { font-style: italic; }

.questionnaire-form { max-width: 920px; }
[hidden], .is-conditional-hidden { display: none !important; }
.questionnaire-form > .field { padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.questionnaire-form > .field:last-of-type { border-bottom: 0; }
.pending-panel { margin-bottom: 16px; }
.pending-list { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 0.86rem; }
.pending-list li { margin: 3px 0; }
.field-group { margin: 0; padding: 0; border: 0; }
.field-group legend { margin-bottom: 5px; color: var(--ink-2); font-size: 0.84rem; font-weight: 700; }
.checkbox-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 12px; }
.readonly-value { padding: 10px 11px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink-2); font-size: 0.88rem; }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: var(--red); }
.field-error { color: var(--red); font-size: 0.78rem; font-weight: 650; }
.print-signatures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; margin-top: 38px; padding-top: 26px; }
.signature-line { display: flex; flex-direction: column; gap: 6px; text-align: center; }
.signature-line span { height: 1px; background: var(--ink); }
.signature-line strong { color: var(--muted); font-size: 8.5pt; font-weight: 600; }
.page-break { break-after: page; page-break-after: always; height: 0; }

@media (max-width: 1120px) {
    .model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
    .model-grid, .model-meta, .checkbox-options, .print-signatures { grid-template-columns: 1fr; }
    .model-actions { flex-direction: column; align-items: stretch; }
    .model-actions .btn, .model-actions form { width: 100%; }
    .model-actions form .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media print {
    html, body { background: #fff; }
    .print-toolbar, .skip-link { display: none !important; }
    .print-sheet {
        width: auto;
        min-height: 0;
        margin: 0;
        padding: 0;
        border: 0;
        box-shadow: none;
    }
    .print-warning { border: 1px solid #999; background: #fff; color: #222; }
    a { color: inherit; text-decoration: none; }
    @page { size: A4; margin: 16mm 15mm; }
}

.panel-note { margin-top: 12px; }


.form > .btn:not(.btn-block) { align-self: flex-start; }


/* ==========================================================================
   Fase 2 - construtor visual de modelos, fluxo e tabelas
   ========================================================================== */

.filter-bar {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    align-items: center;
}
.filter-bar input[type="search"] {
    flex: 1 1 240px;
    min-width: 200px;
}

.builder-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.builder-form fieldset:disabled { opacity: 0.7; }

.builder-panel { display: grid; gap: var(--space-3); }
.builder-list { display: grid; gap: var(--space-3); }

.builder-item {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fbfdff;
    padding: var(--space-3);
    display: grid;
    gap: var(--space-2);
}
.builder-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
}
.builder-item-title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}
.builder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: var(--space-2);
}
.builder-grid label,
.builder-item > label,
.builder-block label,
.builder-field label {
    display: grid;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-2);
}
.builder-check { display: flex !important; align-items: center; gap: var(--space-2); padding-top: 18px; }
.builder-conditional {
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-sm);
    padding: var(--space-2) var(--space-3);
    background: var(--surface);
}
.builder-conditional summary { cursor: pointer; font-size: 0.85rem; font-weight: 600; color: var(--ink-2); }
.builder-conditional[open] { display: grid; gap: var(--space-2); }
.builder-actions { flex-wrap: wrap; }
.builder-actions .muted { flex-basis: 100%; }

.workflow-steps { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.workflow-step {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    background: var(--surface);
}
.workflow-step.is-done { border-color: var(--green-line); background: var(--green-soft); color: #086346; }
.workflow-step.is-current { box-shadow: 0 0 0 3px rgba(0, 178, 231, 0.18); border-color: var(--cyan-500); }
.workflow-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: flex-end; }
.workflow-approve-form {
    display: grid;
    gap: 4px;
    padding: var(--space-3);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    min-width: 260px;
}
.workflow-approve-form label { font-size: 0.8rem; font-weight: 600; color: var(--ink-2); }

.admin-model-list { display: grid; gap: var(--space-2); }
.admin-model-row {
    display: flex;
    justify-content: space-between;
    gap: var(--space-3);
    align-items: center;
    padding: var(--space-3);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
}
.admin-model-main h3 { margin: 6px 0 4px; font-size: 1.02rem; }
.admin-model-actions { display: flex; gap: var(--space-1); flex-wrap: wrap; }

.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th, .data-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}
.data-table th {
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--surface);
}
.data-table input[type="text"] { min-width: 110px; }
.table-actions { white-space: nowrap; }
.table-editor { display: grid; gap: var(--space-2); }

.question-section {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 0;
    padding: var(--space-3) 0 0;
    display: grid;
    gap: var(--space-2);
}
.question-section:first-of-type { border-top: 0; padding-top: 0; }
.question-section > legend {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--ink);
    padding: 0;
    margin-bottom: var(--space-1);
}
.field-label { display: block; font-weight: 600; font-size: 0.9rem; color: var(--ink-2); margin-bottom: 4px; }

.doc-block-heading { margin: 18px 0 6px; font-size: 1.12rem; color: var(--ink); }
.doc-block-list { margin: 8px 0 12px; padding-left: 22px; }
.doc-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 0.94rem; }
.doc-table th, .doc-table td { border: 1px solid var(--line-strong); padding: 7px 9px; text-align: left; vertical-align: top; }
.doc-table th { background: var(--surface); }
.doc-table-empty { color: var(--muted); font-style: italic; }
.doc-currency { display: flex; justify-content: space-between; gap: var(--space-3); border-bottom: 1px dashed var(--line-strong); padding: 6px 0; margin: 8px 0; }
.doc-currency span { color: var(--ink-2); }
.doc-pending { color: var(--orange); font-weight: 600; }

.builder-test-grid { align-items: start; }
.builder-test-preview { max-height: 70vh; overflow: auto; }

@media (max-width: 860px) {
    .admin-model-row { flex-direction: column; align-items: stretch; }
    .admin-model-actions .btn { flex: 1; }
}
.print-doc-note { margin: 0 0 12px; padding: 8px 12px; border-left: 3px solid var(--cyan-500); background: var(--cyan-50); color: var(--ink-2); font-size: 0.9rem; }
.print-approval { margin: 14px 0; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font-size: 0.84rem; color: var(--ink-2); }
.print-approval p { margin: 3px 0; }
.table-editor { overflow-x: auto; }
@media (max-width: 680px) {
    .builder-test-grid { grid-template-columns: 1fr; }
    .builder-grid { grid-template-columns: 1fr; }
    .data-table input[type="text"] { min-width: 80px; }
}

/* ==========================================================================
   Prompt 07 - Identidade dos Documentos e previa A4
   ========================================================================== */
.profile-editor {
    display: grid;
    grid-template-columns: minmax(190px, 0.62fr) minmax(0, 1.55fr) minmax(300px, 0.95fr);
    gap: var(--space-3);
    align-items: start;
}
.profile-sidebar { position: sticky; top: 84px; display: grid; gap: var(--space-3); }
.profile-list { display: grid; gap: 6px; }
.profile-list-item {
    display: grid;
    gap: 2px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
    text-decoration: none;
}
.profile-list-item:hover { border-color: var(--cyan-500); }
.profile-list-item.is-active { border-color: var(--cyan-600); box-shadow: 0 0 0 3px rgba(0,178,231,.14); }
.profile-list-item strong { font-size: .9rem; }
.profile-list-item span { font-size: .74rem; color: var(--muted); }
.profile-list-item .badge { justify-self: start; }
.profile-presets { display: grid; gap: 5px; }
.profile-side-actions { display: grid; gap: 5px; }
.profile-logo-box { border-top: 1px solid var(--line); padding-top: var(--space-2); display: grid; gap: 6px; }
.profile-logo-preview { max-width: 120px; max-height: 70px; object-fit: contain; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xs); padding: 4px; }

.profile-preview-panel { position: sticky; top: 84px; min-width: 0; }
.profile-preview {
    max-height: calc(100vh - 190px);
    overflow: auto;
    background: #dfe8f0;
    border-radius: var(--radius-sm);
    padding: 14px;
    border: 1px solid var(--line);
}
.profile-preview .doc-sheet { zoom: .78; }
.profile-preview-note { margin-top: 8px; }
.profile-properties { min-width: 0; display: grid; gap: var(--space-3); }
.profile-properties-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.profile-properties-head h2 { margin: 2px 0 0; font-size: 1.15rem; }
.profile-section {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: var(--space-2) var(--space-3);
    background: #fbfdff;
    display: grid;
    gap: var(--space-2);
}
.profile-section > summary { cursor: pointer; font-weight: 700; color: var(--ink); font-size: .92rem; }
.profile-section[open] > summary { border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.profile-toggle-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 10px; }
.profile-toggle-grid .checkbox-label { font-size: .8rem; }
.profile-save-bar {
    position: sticky;
    bottom: 0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 0;
    background: linear-gradient(180deg, rgba(255,255,255,0), #fff 30%);
}
.profile-form .checkbox-label { font-weight: 500; }
.profile-custom-field { gap: 4px; }
.print-sheet--document { background: transparent; border: 0; box-shadow: none; padding: 0; width: fit-content; max-width: 100%; margin: 0 auto; }
.preview-document-meta { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 10px; }
@media (max-width: 1180px) {
    .profile-editor { grid-template-columns: 1fr; }
    .profile-sidebar, .profile-preview-panel { position: static; }
    .profile-preview { max-height: none; }
    .profile-preview .doc-sheet { zoom: 1; }
}
@media (max-width: 680px) {
    .profile-toggle-grid { grid-template-columns: 1fr; }
    .profile-preview { padding: 6px; }
}
@media print {
    .preview-document-meta { display: none !important; }
}
.doc-header[hidden], .doc-footer[hidden] { display: none !important; }

/* Central de emissao e historico */
.emission-grid { display: grid; grid-template-columns: minmax(300px, .78fr) minmax(0, 1.5fr); gap: var(--space-3); align-items: start; }
.emission-controls { position: sticky; top: 84px; }
.emission-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.small-notice { font-size: .84rem; padding: 8px 10px; }
.emission-preview-panel { min-width: 0; }
.emission-preview { background: #dfe8f0; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; overflow: auto; max-height: calc(100vh - 190px); }
.emission-preview .doc-sheet { zoom: .72; }
.asset-thumb { width: 54px; height: 54px; object-fit: contain; border: 1px solid var(--line); border-radius: var(--radius-xs); background: #fff; }
@media (max-width: 1180px) {
    .emission-grid { grid-template-columns: 1fr; }
    .emission-controls { position: static; }
    .emission-preview { max-height: none; }
    .emission-preview .doc-sheet { zoom: 1; }
}
.preview-zoom { display: flex; gap: 2px; align-items: center; }

/* Prompt 08 - rotinas e execucao mobile */
.routine-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.routine-kpi { border: 1px solid var(--line); background: #fff; border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 2px; border-left: 4px solid var(--cyan-500); }
.routine-kpi.is-warning { border-left-color: var(--orange); background: #fffaf3; }
.routine-kpi span { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.routine-kpi strong { font-size: 1.55rem; line-height: 1.1; color: var(--ink); }
.routine-kpi small { font-size: .72rem; color: var(--muted); }
.routine-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 14px; align-items: start; }
.routine-list { display: grid; gap: 6px; }
.routine-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; text-decoration: none; color: var(--ink); }
.routine-row:hover { border-color: var(--cyan-500); }
.routine-row-main { display: grid; gap: 2px; }
.routine-row-main span { font-size: .78rem; color: var(--muted); }
.routine-shortcuts { display: grid; gap: 6px; }
.routine-shortcuts .btn { justify-content: flex-start; }
.execution-form { max-width: 980px; }
.execution-field { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.execution-field:last-child { border-bottom: 0; }
.execution-field input[type="text"], .execution-field input[type="number"], .execution-field input[type="date"], .execution-field input[type="time"], .execution-field select, .execution-field textarea { font-size: 1rem; min-height: 44px; }
.execution-justification { display: grid; gap: 4px; margin-top: 6px; font-size: .84rem; font-weight: 600; color: var(--ink-2); }
.execution-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px; }
.execution-progress { margin: 0 0 14px; display: grid; gap: 5px; }
progress.execution-progress-bar { width: 100%; height: 10px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 999px; overflow: hidden; background: var(--surface-2); }
progress.execution-progress-bar::-webkit-progress-bar { background: var(--surface-2); border-radius: 999px; }
progress.execution-progress-bar::-webkit-progress-value { background: linear-gradient(90deg, var(--cyan-600), var(--green)); border-radius: 999px; }
progress.execution-progress-bar::-moz-progress-bar { background: linear-gradient(90deg, var(--cyan-600), var(--green)); border-radius: 999px; }
.execution-progress-meta { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: .78rem; color: var(--muted); }
.result-section { margin-bottom: 12px; }
.result-section h3 { font-size: 1rem; margin: 10px 0 4px; }
.builder-row-actions { display: flex; gap: 2px; flex-wrap: wrap; }
@media (max-width: 900px) {
    .routine-grid { grid-template-columns: 1fr; }
    .execution-actions { position: sticky; bottom: 0; background: linear-gradient(180deg, rgba(255,255,255,0), #fff 35%); padding: 12px 0; z-index: 2; }
    .execution-actions .btn { flex: 1 1 45%; }
}
@media (max-width: 680px) {
    .routine-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .routine-kpi strong { font-size: 1.3rem; }
    .execution-heading .page-heading-actions { width: 100%; }
    .execution-form .question-section { padding-top: 14px; }
}

/* Prompt 10 - formularios de capacitacao */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 18px; }
.form-grid > label { display: flex; flex-direction: column; gap: 6px; min-width: 0; color: var(--ink-2); font-size: 0.84rem; font-weight: 700; }
.form-grid > label input, .form-grid > label select, .form-grid > label textarea { width: 100%; }
@media (max-width: 800px) { .form-grid { grid-template-columns: 1fr; } }

.form:not(.filter-bar) > label { display: flex; flex-direction: column; gap: 6px; min-width: 0; color: var(--ink-2); font-size: 0.84rem; font-weight: 700; }
.form:not(.filter-bar) > label input, .form:not(.filter-bar) > label select, .form:not(.filter-bar) > label textarea { width: 100%; }
.verification-url { word-break: break-all; font-size: 0.8rem; }
.qr-box { margin: 10px 0; }
.qr-box svg { width: 170px; height: 170px; max-width: 100%; }

.doc-warning { border: 1px solid #c98a00; background: #fff8e6; padding: 8px; margin-bottom: 12px; }
.doc-sheet-preview { background: #fff; padding: 28px; border: 1px solid #d9e2ec; }

/* Acabamento Prompt 23: navegacao publica, loja e planos ---------------- */
.public-mobile-menu { display: none; position: relative; }
.public-mobile-menu summary {
    list-style: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--navy-900);
    cursor: pointer;
}
.public-mobile-menu summary::-webkit-details-marker { display: none; }
.public-mobile-menu summary svg { width: 20px; height: 20px; }
.public-mobile-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    z-index: 60;
    width: min(280px, calc(100vw - 32px));
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-md);
}
.public-mobile-panel a {
    display: block;
    padding: 11px 12px;
    border-radius: var(--radius-xs);
    color: var(--ink-2);
    font-weight: 650;
    text-decoration: none;
}
.public-mobile-panel a:hover { background: var(--surface); color: var(--navy-900); }
.public-mobile-panel .btn { margin-top: 6px; text-align: center; white-space: normal; }
.store-hero {
    padding: 54px 0 42px;
    background: linear-gradient(135deg, var(--cyan-50) 0%, var(--white) 62%, #eef8fc 100%);
    border-bottom: 1px solid var(--line);
}
.store-hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 38px; align-items: center; }
.store-hero h1 { max-width: 780px; margin: 8px 0 14px; }
.store-hero .lead { max-width: 720px; color: var(--ink-2); font-size: 1.02rem; line-height: 1.65; }
.store-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.store-hero-media { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--white); box-shadow: var(--shadow-md); }
.store-hero-media img { width: 100%; display: block; }
.store-hero-media figcaption { padding: 11px 14px; color: var(--muted); font-size: .78rem; border-top: 1px solid var(--line); }
.store-section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.store-section-head h2 { font-size: clamp(1.35rem, 2.4vw, 1.8rem); }
.store-note { padding: 12px 15px; border: 1px solid var(--cyan-100); border-radius: var(--radius-sm); background: var(--cyan-50); color: var(--ink-2); font-size: .84rem; margin-top: 16px; }
.store-plan-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.store-plan-card { display: flex; flex-direction: column; min-height: 100%; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow-xs); }
.store-plan-card h3 { margin: 8px 0 6px; }
.store-plan-card .plan-price { margin: 10px 0 2px; color: var(--navy-900); font-size: 1.35rem; font-weight: 800; }
.store-plan-card .plan-price small { color: var(--muted); font-size: .72rem; font-weight: 500; }
.store-plan-card .plan-desc { color: var(--muted); font-size: .84rem; min-height: 58px; }
.store-plan-card .plan-cycle { margin-top: auto; padding-top: 14px; color: var(--muted); font-size: .78rem; }
.store-plan-card .btn { margin-top: 12px; justify-content: center; }
.store-benefit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.store-benefit { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.store-benefit strong { display: block; margin-bottom: 6px; }
.store-benefit p { color: var(--muted); font-size: .84rem; line-height: 1.55; }
.store-faq details { padding: 12px 0; border-bottom: 1px solid var(--line); }
.store-faq summary { cursor: pointer; color: var(--ink); font-weight: 700; }
.store-faq details p { margin-top: 8px; color: var(--muted); font-size: .9rem; }
.store-page-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
@media (max-width: 1180px) {
    .store-plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
    .public-nav { display: none; }
    .public-mobile-menu { display: block; }
    .store-hero { padding: 34px 0 30px; }
    .store-hero-grid { grid-template-columns: 1fr; gap: 24px; }
    .store-hero-media { order: -1; }
    .store-benefit-grid { grid-template-columns: 1fr; }
    .store-section-head { align-items: flex-start; flex-direction: column; gap: 8px; }
}
@media (max-width: 560px) {
    .store-plan-grid { grid-template-columns: 1fr; }
}.ga4-consent {
    position: fixed;
    z-index: 80;
    right: 18px;
    bottom: 18px;
    width: min(420px, calc(100vw - 36px));
    padding: 16px;
    border: 1px solid #b8d7e7;
    border-radius: 12px;
    background: #ffffff;
    color: #142231;
    box-shadow: 0 12px 34px rgba(2, 31, 65, .18);
    font-size: .86rem;
    line-height: 1.5;
}
.ga4-consent p { margin: 0 0 12px; }
.ga4-consent-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 520px) { .ga4-consent { right: 12px; bottom: 12px; width: calc(100vw - 24px); } }
.store-plan-card--featured { border: 2px solid var(--cyan-500); box-shadow: 0 12px 30px rgba(11, 111, 158, .12); }
.store-plan-card--featured .badge { background: var(--cyan-50); color: var(--cyan-700); }
.store-plan-card .plan-price small { margin-left: 4px; white-space: nowrap; }
.store-plan-card .plan-cycle { overflow-wrap: anywhere; }
.checkout-plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.checkout-plan-option { position: relative; display: block; cursor: pointer; }
.checkout-plan-option input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; pointer-events: none; }
.checkout-plan-body { display: flex; flex-direction: column; gap: 5px; min-height: 100%; padding: 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--white); transition: border-color .15s, box-shadow .15s, background .15s; }
.checkout-plan-option input:focus-visible + .checkout-plan-body { outline: 3px solid var(--cyan-400); outline-offset: 2px; }
.checkout-plan-option input:checked + .checkout-plan-body { border: 2px solid var(--cyan-500); background: var(--cyan-50); box-shadow: 0 8px 22px rgba(0, 178, 231, .12); }
.checkout-plan-body > strong { color: var(--navy-900); font-size: 1rem; }
.checkout-plan-price { color: var(--navy-900); font-size: 1.25rem; font-weight: 800; }
.checkout-plan-price small { color: var(--muted); font-size: .75rem; font-weight: 500; }
.checkout-plan-saving { color: var(--green); font-size: .76rem; font-weight: 700; }
.checkout-plan-option.is-static { cursor: default; }
@media (max-width: 620px) { .checkout-plan-grid { grid-template-columns: 1fr; } }

/* Jornada orientada */
.sidebar-group-label { display: block; padding: 14px 12px 5px; color: #8fb0c9; font-size: 0.63rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.journey-panel { margin: 0 0 24px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(135deg, var(--white), var(--cyan-50)); box-shadow: 0 1px 2px rgba(2, 31, 65, .04); }
.journey-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 20px; }
.journey-head h2 { margin: 2px 0 6px; color: var(--navy-900); font-size: 1.35rem; }
.journey-head p { margin: 0; max-width: 720px; }
.journey-progress { min-width: 150px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); text-align: right; }
.journey-progress strong { display: block; color: var(--navy-900); font-size: 1.35rem; line-height: 1.1; }
.journey-progress span { display: block; color: var(--muted); font-size: 0.7rem; margin: 2px 0 8px; }
.journey-progress progress { width: 100%; height: 7px; accent-color: var(--cyan-600); }
.journey-group + .journey-group { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.journey-group-title { margin: 0 0 10px; color: var(--navy-800); font-size: 0.78rem; letter-spacing: .05em; text-transform: uppercase; }
.journey-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.journey-step { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.journey-step--current { border-color: var(--cyan-500); box-shadow: inset 3px 0 0 var(--cyan-500); }
.journey-step--completed { border-color: var(--green-line); background: #fbfefc; }
.journey-step-marker { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); color: var(--navy-700); font-size: 0.75rem; font-weight: 800; }
.journey-step--completed .journey-step-marker { background: var(--green-soft); color: var(--green); }
.journey-step--current .journey-step-marker { background: var(--cyan-100); color: var(--cyan-700, #075a75); }
.journey-step-body { min-width: 0; }
.journey-step-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.journey-step-title h4 { margin: 1px 0 5px; color: var(--navy-900); font-size: 0.92rem; }
.journey-step p { margin: 0 0 6px; color: var(--ink-2); font-size: 0.8rem; line-height: 1.45; }
.journey-how { color: var(--muted) !important; }
.journey-step .btn { margin-top: 4px; }
.journey-next { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 16px; padding: 14px 16px; border: 1px solid var(--cyan-100); border-radius: 12px; background: var(--white); }
.journey-next-label { flex: 0 0 100%; color: var(--cyan-600); font-size: 0.66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.journey-next strong { color: var(--navy-900); }
.journey-next .btn { margin-left: auto; }
.journey-next--done { border-color: var(--green-line); background: var(--green-soft); }
.journey-note { margin: 12px 0 0; color: var(--muted); font-size: 0.72rem; }
@media (max-width: 900px) { .journey-steps { grid-template-columns: 1fr; } .journey-head { flex-direction: column; } .journey-progress { width: 100%; text-align: left; } .journey-next .btn { margin-left: 0; } }

.store-plan-grid--standard{align-items:stretch}.plan-badges{display:flex;flex-wrap:wrap;gap:6px;min-height:24px;margin-bottom:8px}.badge-current{background:#e8f0fb;color:#1351b4}.badge-best{background:#e7f7f0;color:#12805c}.store-plan-card--current{border-color:#9bb7df;box-shadow:0 12px 30px rgba(19,81,180,.12)}.plan-price-block{margin-top:12px}.plan-price-label{display:block;color:var(--muted);font-size:.68rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em}.store-plan-card .plan-price{margin:2px 0 3px;font-size:1.55rem}.plan-annual{margin:0;color:var(--muted);font-size:.76rem;line-height:1.5;min-height:2.9em}.plan-actions{display:flex;flex-direction:column;gap:8px;margin-top:auto;padding-top:14px}.plan-actions .btn{margin-top:0;width:100%;justify-content:center}@media(max-width:1120px){.store-plan-grid--standard{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:720px){.store-plan-grid--standard{grid-template-columns:1fr}.plan-annual{min-height:0}}