/* =========================================================
   pohit.net — estilos das páginas principais
   Carregado apenas quando $pagina_principal = true
   (index, servicos, sobre, contactos)
   ========================================================= */

.is-main {
    --bg: #f7f6f2;
    --surface: #ffffff;
    --ink: #121417;
    --ink-2: #3d434c;
    --muted: #6b717b;
    --line: #e2e0d8;
    --line-strong: #cfccc2;
    --accent: #1d46c4;
    --accent-ink: #15338f;
    --dark: #121417;
    --dark-2: #1c1f24;
    --dark-line: #2c3038;
    --dark-text: #a9aeb7;

    --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
    --radius: 6px;

    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.is-main a { color: inherit; }
.is-main ::selection { background: var(--accent); color: #fff; }

.wrap {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Tipografia ---------- */

.eyebrow {
    display: block;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 20px;
}

.h-display {
    font-size: clamp(2.3rem, 5.2vw, 4rem);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--ink);
    margin-bottom: 24px;
}

.h-section {
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 16px;
}

.lead {
    font-size: 1.15rem;
    line-height: 1.65;
    color: var(--ink-2);
    max-width: 56ch;
}

.muted { color: var(--muted); }

/* ---------- Botões ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 22px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.btn-solid { background: var(--ink); color: #fff !important; }
.btn-solid:hover { background: var(--accent); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); }

.btn-light { background: #fff; color: var(--ink) !important; }
.btn-light:hover { background: #e9e8e3; }

.btn .arrow { transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }

.link-arrow {
    color: var(--accent) !important;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}
.link-arrow:hover { border-bottom-color: currentColor; }

/* ---------- Secções ---------- */

.section { padding: 96px 0; border-top: 1px solid var(--line); }
.section:first-child { border-top: 0; }

.section-head {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 48px;
    margin-bottom: 56px;
}
.section-head .lead { margin-top: 4px; }

/* ---------- Hero (home) ---------- */

.is-main .hero { padding: 104px 0 96px; text-align: left; }
.is-main .hero h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); margin-bottom: 24px; }
.is-main .hero p { font-size: 1.15rem; color: var(--ink-2); }

.hero-grid {
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: 72px;
    align-items: end;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 36px; }

.hero-aside {
    border-top: 2px solid var(--ink);
    padding-top: 20px;
}

.facts { list-style: none; margin: 0; padding: 0; }
.facts li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
}
.facts li span:first-child { color: var(--muted); }
.facts li span:last-child { color: var(--ink); font-weight: 500; text-align: right; }

/* ---------- Cabeçalho de páginas internas ---------- */

.page-head { padding: 88px 0 64px; border-bottom: 1px solid var(--line); }
.page-head .lead { margin-top: 0; }
.page-head + .section { padding-top: 56px; }

/* ---------- Lista de serviços ---------- */

.svc-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }

.svc-row {
    display: grid;
    grid-template-columns: 72px 1fr 1.5fr;
    gap: 32px;
    padding: 32px 0;
    border-bottom: 1px solid var(--line);
    align-items: baseline;
}

.svc-num { font-family: var(--mono); font-size: 13px; color: var(--muted); }

.svc-title {
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.svc-desc { color: var(--ink-2); }

.svc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.svc-tags span {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--ink-2);
    border: 1px solid var(--line-strong);
    border-radius: 3px;
    padding: 3px 8px;
}

/* ---------- Processo / colunas ---------- */

.cols-4, .cols-3 { display: grid; gap: 32px; }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }

.col-item { border-top: 1px solid var(--ink); padding-top: 20px; }
.col-item .num { font-family: var(--mono); font-size: 13px; color: var(--accent); display: block; margin-bottom: 18px; }
.col-item h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; color: var(--ink); }
.col-item p { color: var(--ink-2); font-size: 15px; }

/* ---------- Duas colunas de texto ---------- */

.split { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; }
.prose p { color: var(--ink-2); font-size: 1.05rem; margin-bottom: 18px; max-width: 64ch; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); font-weight: 600; }

.statement {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}
.statement > div { background: var(--surface); padding: 40px; }
.statement h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 12px; }
.statement p { color: var(--ink-2); }

/* ---------- Diretório de contactos ---------- */

.dir { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.dir li {
    display: grid;
    grid-template-columns: 150px 1fr 200px;
    gap: 24px;
    padding: 24px 0;
    border-bottom: 1px solid var(--line);
    align-items: baseline;
}
.dir .dept { font-weight: 600; color: var(--ink); }
.dir .desc { color: var(--ink-2); font-size: 15px; }
.dir a {
    font-family: var(--mono);
    font-size: 14px;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
}
.dir a:hover { text-decoration: underline; text-underline-offset: 3px; }

.contact-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 64px; }

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 32px;
}
.panel + .panel { margin-top: 16px; }
.panel h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }
.panel p { color: var(--ink-2); font-size: 15px; margin-bottom: 20px; }

/* ---------- Faixa CTA ---------- */

.cta-band {
    background: var(--dark);
    color: #fff;
    border-radius: var(--radius);
    padding: 64px;
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 48px;
    align-items: end;
}
.cta-band .h-section { color: #fff; margin-bottom: 12px; }
.cta-band p { color: var(--dark-text); max-width: 52ch; }
.cta-band .actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }
.cta-band .btn-ghost { color: #fff; border-color: var(--dark-line); }
.cta-band .btn-ghost:hover { border-color: #fff; }

.section-cta { padding: 0 0 96px; }

/* ---------- Formulários ---------- */

.form { display: flex; flex-direction: column; gap: 18px; }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.field label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    margin-bottom: 6px;
}
.field small { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }

.is-main .field input,
.is-main .field select,
.is-main .field textarea {
    width: 100%;
    font-family: var(--font);
    font-size: 15px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin: 0;
    transition: border-color .15s ease;
}
.is-main .field textarea { resize: vertical; min-height: 140px; }
.is-main .field input:focus,
.is-main .field select:focus,
.is-main .field textarea:focus { outline: none; border-color: var(--ink); }
.is-main .field input[type=file] { padding: 10px; background: var(--bg); }

.form .btn { align-self: flex-start; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Avisos ---------- */

.notice {
    padding: 14px 18px;
    border: 1px solid var(--line-strong);
    border-left-width: 3px;
    border-radius: var(--radius);
    background: var(--surface);
    font-size: 15px;
    color: var(--ink-2);
    margin-bottom: 32px;
}
.notice.success { border-left-color: #1f7a4d; }
.notice.error { border-left-color: #b42318; }

/* ---------- Grelha de cartões simples ---------- */

.grid-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}
.grid-cards > * { background: var(--surface); padding: 28px; }
.grid-cards.cols-3g { grid-template-columns: repeat(3, 1fr); }
.grid-cards h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; }
.grid-cards p { color: var(--ink-2); font-size: 15px; }

/* Parceiros */
.partner { display: flex; flex-direction: column; gap: 18px; text-decoration: none; }
.partner-logo { height: 48px; display: flex; align-items: center; }
.partner-logo img {
    max-height: 40px;
    max-width: 130px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: .75;
    transition: filter .2s ease, opacity .2s ease;
}
.partner:hover .partner-logo img { filter: none; opacity: 1; }
.partner-fallback { font-weight: 600; font-size: 1.4rem; color: var(--muted); }
.partner-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.partner-meta strong { font-weight: 600; color: var(--ink); }
.partner-meta span { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* Vagas */
.job-meta { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 6px; }
.svc-row .btn { margin-top: 18px; }

/* ---------- Blog ---------- */

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }
.chips a {
    font-size: 14px;
    text-decoration: none;
    color: var(--ink-2);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    padding: 7px 14px;
}
.chips a:hover { border-color: var(--ink); color: var(--ink); }
.chips a.active { background: var(--ink); border-color: var(--ink); color: #fff; }

.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px 32px; }
.post { border-top: 1px solid var(--ink); padding-top: 18px; }
.post-img { aspect-ratio: 16 / 9; background: #ebe9e3; margin-bottom: 18px; overflow: hidden; }
.post-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-meta { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.post h2 { font-size: 1.15rem; font-weight: 600; line-height: 1.35; margin-bottom: 10px; }
.post h2 a { text-decoration: none; }
.post h2 a:hover { color: var(--accent); }
.post p { color: var(--ink-2); font-size: 15px; margin-bottom: 14px; }

.pager { display: flex; gap: 6px; margin-top: 56px; }
.pager a, .pager span {
    min-width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 14px;
}
.pager span { background: var(--ink); color: #fff; border-color: var(--ink); }

.inline-form { display: flex; gap: 10px; max-width: 460px; flex-wrap: wrap; }
.inline-form .field { flex: 1; min-width: 220px; }
.form-msg { min-height: 1.5em; margin-top: 12px; font-size: 14px; }
.form-msg.ok { color: #1f7a4d; }
.form-msg.err { color: #b42318; }

/* ---------- Páginas de estado (erros, newsletter) ---------- */

.status { padding: 120px 0 128px; }
.status .code {
    font-family: var(--mono);
    font-size: 14px;
    color: var(--muted);
    display: block;
    margin-bottom: 20px;
}
.status .lead { margin-bottom: 36px; }

/* ---------- Modal genérico (candidaturas) ---------- */

.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(18, 20, 23, .55);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.overlay.active { display: flex; }
.dialog {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 36px;
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    position: relative;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .18);
}
.dialog h2 { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 6px; }
.dialog > p { color: var(--ink-2); font-size: 15px; margin-bottom: 24px; }
.dialog-close {
    position: absolute; top: 16px; right: 18px;
    background: none; border: 0; cursor: pointer;
    font-size: 24px; line-height: 1; color: var(--muted);
}
.dialog-close:hover { color: var(--ink); }

/* =========================================================
   Área de cliente (auth/)
   ========================================================= */

.auth { padding: 88px 0 112px; }
.auth-card { max-width: 440px; margin: 0 auto; }
.auth-card .h-section { margin-bottom: 8px; }
.auth-card > .lead { font-size: 1rem; margin-bottom: 32px; }
.auth-card .form { gap: 16px; }
.auth-alt {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    font-size: 14px;
    color: var(--ink-2);
}
.auth-alt a { color: var(--accent); text-decoration: none; }
.auth-alt a:hover { text-decoration: underline; text-underline-offset: 3px; }
.auth-card .notice { margin-bottom: 24px; }
.auth-card .notice a { color: var(--accent); }

.phone-field { display: grid; grid-template-columns: 110px 1fr; gap: 8px; }

.pw-rules { list-style: none; margin: 0 0 4px; padding: 0; font-size: 13px; color: var(--muted); display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.pw-rules li::before { content: "○"; display: inline-block; width: 16px; }
.pw-rules li.valid { color: #1f7a4d; }
.pw-rules li.valid::before { content: "✓"; }
.pw-meter { height: 3px; background: var(--line); margin-top: 8px; }
.pw-meter span { display: block; height: 100%; width: 0; background: var(--ink); transition: width .2s ease; }
.pw-hint { font-size: 13px; margin-top: 6px; min-height: 1.4em; color: var(--muted); }
.pw-hint.ok { color: #1f7a4d; }
.pw-hint.err { color: #b42318; }
.btn[disabled] { opacity: .4; cursor: not-allowed; }
.btn-solid[disabled]:hover { background: var(--ink); }

.acct { padding: 56px 0 96px; }
.acct-back { display: inline-block; font-size: 14px; color: var(--muted) !important; text-decoration: none; margin-bottom: 16px; }
.acct-back:hover { color: var(--ink) !important; }
.acct-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding-bottom: 32px; border-bottom: 1px solid var(--line); margin-bottom: 40px; }
.acct-head .h-section { margin: 0; }
.acct-head p { color: var(--ink-2); margin-top: 6px; }

.tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}
.tile {
    background: var(--surface);
    padding: 28px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 150px;
    transition: background-color .15s ease;
}
.tile:hover { background: #fbfaf7; }
.tile h3 { font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.tile p { color: var(--ink-2); font-size: 14px; flex: 1; }
.tile .go { font-size: 14px; color: var(--accent); font-weight: 500; }
.tile.restricted .eyebrow { margin-bottom: 4px; }
.tile.quiet .go { color: var(--muted); }

.acct-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 40px; font-size: 14px; }
.acct-links span { color: var(--muted); }
.acct-links a { color: var(--ink-2); text-decoration: none; }
.acct-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.acct-narrow { max-width: 720px; }
.acct-section { padding: 32px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 200px 1fr; gap: 32px; }
.acct-section:last-of-type { border-bottom: 0; }
.acct-section > h2 { font-size: 15px; font-weight: 600; }
.acct-section > h2 small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; margin-top: 4px; }
.acct-section .facts { margin-top: -14px; }

@media (max-width: 960px) {
    .tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
    .auth { padding: 48px 0 72px; }
    .acct { padding: 32px 0 64px; }
    .acct-head { flex-direction: column; align-items: flex-start; }
    .tiles { grid-template-columns: 1fr; }
    .tile { min-height: 0; }
    .acct-section { grid-template-columns: 1fr; gap: 16px; }
    .pw-rules { grid-template-columns: 1fr; }
}

/* =========================================================
   Painel (área de cliente com barra lateral)
   ========================================================= */

.is-main { --accent-soft: #edf1fc; --shadow: 0 1px 2px rgba(18, 20, 23, .04), 0 4px 16px rgba(18, 20, 23, .05); }

.app {
    display: grid;
    grid-template-columns: 256px 1fr;
    min-height: calc(100vh - 69px);
    background: #f1f0eb;
}

.app-side {
    background: var(--surface);
    border-right: 1px solid var(--line);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 69px;
    height: calc(100vh - 69px);
    overflow-y: auto;
}

.app-user { display: flex; align-items: center; gap: 12px; padding: 8px 8px 20px; border-bottom: 1px solid var(--line); }
.app-user strong { display: block; font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.app-user span { display: block; font-size: 12px; color: var(--muted); }
.app-avatar {
    width: 40px; height: 40px; flex-shrink: 0;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 14px; letter-spacing: .02em;
}

.app-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.app-nav a, .app-logout {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius);
    color: var(--ink-2);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background-color .15s ease, color .15s ease;
}
.app-nav a .ico, .app-logout .ico { color: var(--muted); flex-shrink: 0; }
.app-nav a:hover, .app-logout:hover { background: #f4f3ef; color: var(--ink); }
.app-nav a.is-active { background: var(--accent-soft); color: var(--accent-ink); }
.app-nav a.is-active .ico { color: var(--accent); }
.app-badge {
    margin-left: auto;
    min-width: 20px; height: 20px; padding: 0 6px;
    border-radius: 10px;
    background: var(--accent); color: #fff;
    font-size: 11px; font-weight: 600; font-style: normal;
    display: inline-flex; align-items: center; justify-content: center;
}
.app-nav-label {
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
    padding: 18px 12px 6px;
}
.app-logout { border-top: 1px solid var(--line); border-radius: 0; padding-top: 16px; }

.app-main { padding: 40px 48px 72px; min-width: 0; }
.app-main .notice { margin-bottom: 24px; }

.app-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.app-top h1 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.app-top p { color: var(--ink-2); margin-top: 6px; }
.app-top .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.app-top .btn { padding: 11px 16px; font-size: 14px; }
.btn .ico { flex-shrink: 0; }
.btn-accent { background: var(--accent); color: #fff !important; }
.btn-accent:hover { background: var(--accent-ink); }
.app-top .btn-ghost { background: var(--surface); }

.app-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow);
}
.app-card-head {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
}
.app-card-head h2 { font-size: 15px; font-weight: 600; }
.app-card-head a { font-size: 13px; color: var(--accent); text-decoration: none; font-weight: 500; }
.app-card-head a:hover { text-decoration: underline; text-underline-offset: 3px; }
.app-card-body { padding: 22px; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.kpi { padding: 20px; display: flex; gap: 14px; align-items: flex-start; }
.kpi-ico {
    width: 40px; height: 40px; flex-shrink: 0;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex; align-items: center; justify-content: center;
}
.kpi-ico.ok { background: #e8f5ee; color: #1f7a4d; }
.kpi-ico.warn { background: #fdf3e4; color: #b54708; }
.kpi-ico.neutral { background: #f1f0eb; color: var(--ink-2); }
.kpi span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.kpi strong { display: block; font-size: 1.45rem; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); line-height: 1.2; }
.kpi small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

.app-cols { display: grid; grid-template-columns: 1.7fr 1fr; gap: 24px; align-items: start; }
.app-stack { display: flex; flex-direction: column; gap: 24px; }

.tlist { list-style: none; margin: 0; padding: 0; }
.tlist li { border-bottom: 1px solid var(--line); }
.tlist li:last-child { border-bottom: 0; }
.tlist a {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 16px;
    padding: 14px 22px;
    text-decoration: none;
    transition: background-color .15s ease;
}
.tlist a:hover { background: #fbfaf7; }
.tlist .t-subject { font-weight: 500; color: var(--ink); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tlist .t-meta { font-family: var(--mono); font-size: 12px; color: var(--muted); grid-column: 1; }
.tlist .pill { grid-row: 1 / span 2; grid-column: 2; align-self: center; }

.pill {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 500;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f1f0eb; color: var(--ink-2);
    white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.open { background: var(--accent-soft); color: var(--accent-ink); }
.pill.progress { background: #fdf3e4; color: #b54708; }
.pill.done { background: #e8f5ee; color: #1f7a4d; }

.empty { text-align: center; padding: 40px 24px; }
.empty .kpi-ico { margin: 0 auto 14px; }
.empty h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.empty p { color: var(--ink-2); font-size: 14px; margin-bottom: 18px; }
.empty .btn { padding: 10px 16px; font-size: 14px; }

.qlist { list-style: none; margin: 0; padding: 8px; }
.qlist a {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--ink);
    font-size: 14px; font-weight: 500;
}
.qlist a:hover { background: #f4f3ef; }
.qlist a .ico:first-child { color: var(--accent); }
.qlist a .go { margin-left: auto; color: var(--muted); }
.qlist small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }

.help-card { background: var(--dark); color: #fff; border-color: var(--dark); padding: 24px; }
.help-card h2 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.help-card p { color: var(--dark-text); font-size: 14px; margin-bottom: 18px; }
.help-card .row { display: flex; gap: 10px; flex-wrap: wrap; }
.help-card .btn { padding: 10px 14px; font-size: 14px; }
.help-card .btn-ghost { color: #fff; border-color: var(--dark-line); }
.help-card .btn-ghost:hover { border-color: #fff; }

.admin-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 24px; }
.admin-strip a { display: flex; gap: 14px; align-items: center; padding: 18px 20px; text-decoration: none; }
.admin-strip a:hover { border-color: var(--line-strong); }
.admin-strip h3 { font-size: 15px; font-weight: 600; color: var(--ink); }
.admin-strip p { font-size: 13px; color: var(--muted); }
.admin-strip .go { margin-left: auto; color: var(--muted); }

/* Formulários dentro do painel */
.app-form-card { max-width: 640px; }
.app-form-card .app-card-body .form { gap: 16px; }
.app-section + .app-section { margin-top: 24px; }
.app .facts li { padding: 12px 0; }
.app .facts li:last-child { border-bottom: 0; }

/* Admin dentro do painel */
.app .adm { padding: 0; }
.app .adm .wrap { padding: 0; max-width: none !important; }

/* ---------- Pedidos de suporte (tickets/) ---------- */

.pill.wait { background: #f3eefd; color: #6b3fc4; }

.prio { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.prio::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: #b9b6ac; }
.prio.p-crit { color: #b42318; font-weight: 600; }
.prio.p-crit::before { background: #d92d20; }
.prio.p-high::before { background: #e8711a; }
.prio.p-med::before { background: #e3b341; }
.prio.p-low::before { background: #7fb59a; }

.kpis.k3 { grid-template-columns: repeat(3, 1fr); }
.kpis.k5 { grid-template-columns: repeat(5, 1fr); }
.kpi-ico.bad { background: #fdecea; color: #b42318; }

.team-bar {
    display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center;
    padding: 14px 20px; margin-bottom: 24px;
    font-size: 14px; color: var(--ink-2);
}
.team-bar strong { color: var(--ink); font-weight: 600; }
.team-bar .lbl { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-right: 4px; }
.team-bar .crit strong { color: #b42318; }

.tk-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.tk-search { position: relative; flex: 1; min-width: 220px; }
.tk-search .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.tk-filters input, .tk-filters select {
    font-family: var(--font); font-size: 14px; color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    padding: 9px 12px;
    margin: 0;
}
.tk-search input { width: 100%; padding-left: 36px; }
.tk-filters input:focus, .tk-filters select:focus { outline: none; border-color: var(--ink); }
.tk-filters .btn { padding: 10px 14px; font-size: 14px; }
.tk-filters .clear { font-size: 13px; color: var(--muted); text-decoration: none; }
.tk-filters .clear:hover { color: var(--ink); }

.tk-tabs { display: flex; gap: 4px; padding: 10px 12px 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tk-tabs a {
    padding: 8px 12px 10px;
    font-size: 14px; font-weight: 500;
    color: var(--muted); text-decoration: none; white-space: nowrap;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tk-tabs a:hover { color: var(--ink); }
.tk-tabs a.on { color: var(--ink); border-bottom-color: var(--accent); }
.tk-tabs a span { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-left: 4px; }

.tk-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tk-table th {
    text-align: left; font-size: 12px; font-weight: 500; color: var(--muted);
    padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fbfaf7;
}
.tk-table th a { color: inherit; text-decoration: none; }
.tk-table th a:hover { color: var(--ink); }
.tk-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tk-table tbody tr { cursor: pointer; transition: background-color .12s ease; }
.tk-table tbody tr:hover { background: #fbfaf7; }
.tk-table tr:last-child td { border-bottom: 0; }
.tk-table .tk-main a { color: var(--ink); font-weight: 500; text-decoration: none; display: block; max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-table .tk-main a:hover { color: var(--accent); }
.tk-sub { display: flex; gap: 12px; align-items: center; margin-top: 3px; font-size: 12px; color: var(--muted); }
.tk-sub .num { font-family: var(--mono); }
.tk-sub span { display: inline-flex; align-items: center; gap: 4px; }
.tk-muted { color: var(--muted); font-size: 13px; white-space: nowrap; }
.tk-cat { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.tk-tech { font-size: 13px; white-space: nowrap; }
.tk-tech.none { color: var(--muted); }
.stars { display: inline-flex; gap: 1px; color: #e3a008; }
.stars .off { color: #dcd9cf; }

.tk-pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.tk-pager nav { display: flex; gap: 4px; }
.tk-pager a, .tk-pager span.pg {
    min-width: 34px; height: 34px; padding: 0 8px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    color: var(--ink-2); text-decoration: none; font-size: 13px;
}
.tk-pager a:hover { border-color: var(--ink); color: var(--ink); }
.tk-pager span.pg.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.tk-pager span.pg.off { opacity: .4; }

/* Novo pedido */
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.seg label {
    position: relative;
    display: flex; flex-direction: column; gap: 2px;
    padding: 12px 14px;
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    cursor: pointer; background: var(--surface);
    transition: border-color .15s ease, background-color .15s ease;
}
.seg label:hover { border-color: var(--ink-2); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg .prio { font-weight: 600; color: var(--ink); }
.seg small { font-size: 12px; color: var(--muted); line-height: 1.35; }
.seg label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.seg label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.drop {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 28px 20px;
    border: 1.5px dashed var(--line-strong); border-radius: 10px;
    background: #fbfaf7;
    text-align: center; cursor: pointer;
    color: var(--ink-2); font-size: 14px;
    transition: border-color .15s ease, background-color .15s ease;
}
.drop:hover, .drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.drop .ico { color: var(--accent); }
.drop small { color: var(--muted); font-size: 12px; }
.drop { position: relative; overflow: hidden; }
.is-main .drop input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.files { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.files li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 13px; background: var(--surface); }
.files li .ico { color: var(--muted); }
.files li span:last-child { margin-left: auto; color: var(--muted); font-family: var(--mono); font-size: 12px; }

.tips { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; font-size: 14px; color: var(--ink-2); }
.tips li { display: flex; gap: 10px; }
.tips li .ico { color: var(--accent); flex-shrink: 0; margin-top: 2px; }

/* Detalhe do pedido */
.tk-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 24px; }
.tk-head .num { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.tk-head h1 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; margin: 4px 0 10px; }
.tk-head .meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: 13px; color: var(--muted); }

.thread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.msg { display: grid; grid-template-columns: 36px 1fr; gap: 12px; }
.msg-av {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600; color: #fff; background: var(--ink-2);
}
.msg.staff .msg-av { background: var(--accent); }
.msg.internal .msg-av { background: #b54708; }
.msg-box { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); min-width: 0; }
.msg-meta { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px 0; font-size: 13px; }
.msg-meta strong { color: var(--ink); font-weight: 600; }
.msg-meta .role { font-size: 12px; color: var(--muted); margin-left: 6px; }
.msg-meta time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.msg-body { padding: 8px 16px 14px; color: var(--ink-2); font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.msg.first .msg-box { border-top: 3px solid var(--ink); }
.msg.staff .msg-box { border-left: 3px solid var(--accent); }
.msg.internal .msg-box { background: #fffaf0; border-color: #f3d3a8; border-left: 3px solid #d98a1c; }
.tag-internal { font-size: 11px; font-weight: 600; color: #b54708; background: #fdf3e4; padding: 2px 6px; border-radius: 3px; margin-left: 6px; }

.reply { margin-top: 20px; }
.reply textarea {
    width: 100%; min-height: 130px; resize: vertical;
    font-family: var(--font); font-size: 14px; color: var(--ink);
    border: 0; padding: 16px; background: transparent; margin: 0;
    border-radius: 10px 10px 0 0;
}
.reply textarea:focus { outline: none; }
.reply:focus-within { border-color: var(--ink-2); }
.reply-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); background: #fbfaf7; border-radius: 0 0 10px 10px; }
.reply-bar .grow { flex: 1; }
.reply-bar label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.reply-bar select { font-family: var(--font); font-size: 13px; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); margin: 0; }
.reply-bar .btn { padding: 10px 16px; font-size: 14px; }
.reply-bar label { position: relative; }
.reply-bar input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; margin: 0; }
.reply-files { font-size: 12px; color: var(--muted); padding: 0 16px 10px; }
.reply-tpl { padding: 12px 16px 0; }
.reply-tpl select { width: 100%; font-family: var(--font); font-size: 13px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink-2); margin: 0; }
.closed-note { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 18px; margin-top: 20px; color: var(--muted); font-size: 14px; border: 1px dashed var(--line-strong); border-radius: 10px; }

.side-dl { margin: 0; }
.side-dl div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.side-dl div:last-child { border-bottom: 0; }
.side-dl dt { color: var(--muted); }
.side-dl dd { margin: 0; color: var(--ink); font-weight: 500; text-align: right; }
.att { list-style: none; margin: 0; padding: 0; }
.att a { display: flex; align-items: center; gap: 10px; padding: 9px 0; font-size: 14px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); overflow: hidden; }
.att li:last-child a { border-bottom: 0; }
.att a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att a .ico { color: var(--muted); flex-shrink: 0; }
.att a:hover { color: var(--accent); }
.side-card select { width: 100%; font-family: var(--font); font-size: 14px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); margin: 0; }

.rate { text-align: center; padding: 28px 22px; }
.rate h2 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.rate p { color: var(--ink-2); font-size: 14px; margin-bottom: 16px; }
.rate-stars { display: inline-flex; gap: 4px; flex-direction: row-reverse; margin-bottom: 6px; }
.rate-stars input { position: absolute; opacity: 0; pointer-events: none; }
.rate-stars label { cursor: pointer; color: #dcd9cf; transition: color .1s ease; }
.rate-stars label:hover, .rate-stars label:hover ~ label,
.rate-stars input:checked ~ label { color: #e3a008; }
.rate-stars label svg { width: 32px; height: 32px; fill: currentColor; }
.rate textarea { width: 100%; min-height: 80px; margin: 12px 0; font-family: var(--font); font-size: 14px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); resize: vertical; }
.rate-done .stars svg { width: 22px; height: 22px; fill: currentColor; }
.rate-done blockquote { margin: 10px 0 0; color: var(--ink-2); font-style: italic; font-size: 14px; }

@media (max-width: 1440px) {
    .tk-hide-md { display: none; }
}
@media (max-width: 1100px) {
    .kpis.k5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
    .kpis.k3, .kpis.k5 { grid-template-columns: 1fr 1fr; }
    .seg { grid-template-columns: 1fr 1fr; }
    .tk-table thead { display: none; }
    .tk-table, .tk-table tbody, .tk-table tr, .tk-table td { display: block; }
    .tk-table tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
    .tk-table td { padding: 0; border: 0; }
    .tk-table td.tk-main { margin-bottom: 8px; }
    .tk-table td:not(.tk-main) { display: inline-block; margin-right: 12px; }
    .tk-table .tk-main a { max-width: 100%; }
    .tk-hide-sm { display: none !important; }
    .msg { grid-template-columns: 1fr; }
    .msg-av { display: none; }
}

/* ---------- Plataforma Legal (equipamentos) ---------- */

.pill.bad { background: #fdecea; color: #b42318; }

.subnav { display: flex; gap: 4px; margin: -8px 0 24px; border-bottom: 1px solid var(--line); }
.subnav a {
    padding: 8px 14px 10px; margin-bottom: -1px;
    font-size: 14px; font-weight: 500; text-decoration: none;
    color: var(--muted); border-bottom: 2px solid transparent;
}
.subnav a:hover { color: var(--ink); }
.subnav a.on { color: var(--ink); border-bottom-color: var(--accent); }

.eq-alert { display: flex; gap: 14px; align-items: center; padding: 16px 20px; margin-bottom: 24px; border-left: 3px solid #d98a1c; }
.eq-alert > div:nth-child(2) { flex: 1; min-width: 0; }
.eq-alert strong { display: block; font-size: 14px; font-weight: 600; }
.eq-alert span { display: block; font-size: 13px; color: var(--ink-2); }
.eq-alert .btn { padding: 9px 14px; font-size: 13px; background: var(--surface); flex-shrink: 0; }

.kpi-link { text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease; }
.kpi-link:hover { border-color: var(--line-strong); }
.kpi-link.is-on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset, var(--shadow); }

.eq-table tbody tr { cursor: default; }
.eq-id { font-family: var(--mono); font-size: 12px; color: var(--ink-2); line-height: 1.6; white-space: nowrap; }
.eq-id span { color: var(--muted); display: inline-block; min-width: 34px; }
.eq-actions { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.eq-actions form { margin: 0; display: inline; }
.btn-xs { padding: 6px 10px !important; font-size: 13px !important; background: var(--surface); }
.icon-btn {
    width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--surface); color: var(--ink-2);
    cursor: pointer; text-decoration: none; padding: 0;
    transition: border-color .15s ease, color .15s ease;
}
.icon-btn:hover { border-color: var(--ink); color: var(--ink); }
.icon-btn.danger:hover { border-color: #b42318; color: #b42318; }

.dialog.wide { max-width: 720px; }
.eq-phone { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px 16px; margin: 0; background: #fbfaf7; }
.eq-phone[hidden] { display: none; }
.eq-phone legend { font-size: 13px; font-weight: 600; padding: 0 6px; }

.hlist { list-style: none; margin: 0; padding: 0; }
.hlist > li { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.hlist > li:last-child { border-bottom: 0; }
.h-when time { display: block; font-family: var(--mono); font-size: 13px; color: var(--ink); }
.h-when span { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.h-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 14px; }
.h-equip { color: var(--ink); font-weight: 600; text-decoration: none; }
.h-equip:hover { color: var(--accent); }
.h-serial { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.h-diff { list-style: none; margin: 10px 0 0; padding: 10px 14px; background: #fbfaf7; border: 1px solid var(--line); border-radius: var(--radius); font-size: 13px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }
.h-diff span { display: inline-block; min-width: 110px; color: var(--muted); }
.h-diff b { color: var(--muted); font-weight: 400; margin: 0 4px; }
.h-note { margin: 8px 0 0; font-size: 14px; color: var(--ink-2); }
.h-by { margin-top: 6px; font-size: 12px; color: var(--muted); }

@media (max-width: 700px) {
    .eq-alert { flex-wrap: wrap; }
    .hlist > li { grid-template-columns: 1fr; gap: 6px; }
    .h-when time, .h-when span { display: inline; margin-right: 6px; }
    .dialog .form-2[style] { grid-template-columns: 1fr !important; }
    .eq-actions { justify-content: flex-start; margin-top: 8px; }
}

/* ---------- Login / registo em duas colunas ---------- */

.auth-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: calc(100vh - 69px);
}
.auth-aside {
    background: var(--dark);
    color: #fff;
    padding: 72px 64px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 48px;
}
.auth-aside .eyebrow { color: var(--dark-text); }
.auth-aside h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; max-width: 16ch; }
.auth-aside ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.auth-aside li { display: flex; gap: 14px; align-items: flex-start; }
.auth-aside li .kpi-ico { background: rgba(255, 255, 255, .08); color: #fff; width: 36px; height: 36px; border-radius: 8px; }
.auth-aside li strong { display: block; font-weight: 600; font-size: 15px; }
.auth-aside li span { display: block; color: var(--dark-text); font-size: 14px; }
.auth-aside .foot { font-size: 13px; color: var(--dark-text); }
.auth-aside .foot a { color: #fff; }

.auth-pane { display: flex; align-items: center; justify-content: center; padding: 64px 24px; }
.auth-pane .auth-card {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 40px;
}

@media (max-width: 1100px) {
    .kpis { grid-template-columns: repeat(2, 1fr); }
    .app-cols { grid-template-columns: 1fr; }
    .app-main { padding: 32px 28px 64px; }
    .auth-aside { padding: 56px 40px; }
}
@media (max-width: 860px) {
    .app { grid-template-columns: 1fr; }
    .app-side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 16px; gap: 12px; }
    .app-user { padding: 4px 4px 12px; }
    .app-nav { flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
    .app-nav a { flex-shrink: 0; white-space: nowrap; padding: 8px 12px; }
    .app-nav-label { display: none; }
    .app-logout { display: none; }
    .auth-split { grid-template-columns: 1fr; }
    .auth-aside { order: 2; padding: 40px 24px; }
    .auth-aside ul { display: none; }
}
@media (max-width: 560px) {
    .app-main { padding: 24px 16px 56px; }
    .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
    .kpi { padding: 14px; flex-direction: column; gap: 10px; }
    .kpi strong { font-size: 1.2rem; }
    .admin-strip { grid-template-columns: 1fr; }
    .auth-pane { padding: 32px 16px; }
    .auth-pane .auth-card { padding: 28px 20px; }
    .app-top .actions { width: 100%; }
    .app-top .actions .btn { flex: 1; justify-content: center; }
}

/* =========================================================
   Documentos legais (termos, privacidade, cookies)
   Mantém a marcação original e reaplica o estilo
   ========================================================= */

.is-main .fade-up { opacity: 1; transform: none; }

.terms-container, .privacy-container, .cookies-container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
}

.terms-header, .privacy-header, .cookies-header {
    padding: 88px 0 56px;
    border-bottom: 1px solid var(--line);
}

.terms-badge, .privacy-badge, .cookies-badge {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 20px;
}

.terms-title, .privacy-title, .cookies-title {
    font-size: clamp(2.3rem, 5.2vw, 4rem);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--ink);
    margin-bottom: 24px;
}

.terms-intro, .privacy-intro, .cookies-intro {
    font-size: 1.15rem;
    line-height: 1.65;
    color: var(--ink-2);
    max-width: 60ch;
}
.terms-intro strong, .cookies-intro strong { color: var(--ink); font-weight: 600; }

.trust-bar, .cookie-types-preview { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 28px; }
.trust-item, .cookie-type-tag {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--ink-2);
    border: 1px solid var(--line-strong);
    border-radius: 3px;
    padding: 3px 8px;
}

.shield-icon, .cookie-float { display: none; }

.terms-content, .privacy-content, .cookies-content { max-width: 860px; padding-top: 16px; }

.term-item, .privacy-item, .cookie-item {
    position: relative;
    padding: 32px 0 32px 88px;
    border-bottom: 1px solid var(--line);
}

.term-number, .privacy-number, .cookie-number {
    position: absolute;
    left: 0;
    top: 37px;
    font-family: var(--mono);
    font-size: 13px;
    color: var(--muted);
}

.term-title, .privacy-item-title, .cookie-title {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin-bottom: 10px;
}

.term-text, .privacy-text, .cookie-text, .highlight-text, .warning-text {
    color: var(--ink-2);
    line-height: 1.7;
    margin-bottom: 12px;
}
.term-text:last-child, .privacy-text:last-child, .cookie-text:last-child { margin-bottom: 0; }
.term-text strong, .privacy-text strong, .cookie-text strong, .cookie-list strong { color: var(--ink); font-weight: 600; }
.cookie-text a { color: var(--accent) !important; }

.term-list, .privacy-list, .cookie-list {
    color: var(--ink-2);
    line-height: 1.7;
    padding-left: 20px;
    margin: 8px 0 12px;
}
.term-list li, .privacy-list li, .cookie-list li { margin-bottom: 6px; }

.highlight-box, .warning-box {
    border-left: 2px solid var(--ink);
    background: var(--surface);
    padding: 16px 20px;
    margin: 16px 0 0;
}
.highlight-box p, .warning-box p { margin: 0; }

.contact-section { margin-top: 16px; }
.contact-title { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.contact-emails { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 12px; }
.email-tag, .email-btn {
    font-family: var(--mono);
    font-size: 14px;
    color: var(--accent);
    text-decoration: none;
}
.email-tag:hover, .email-btn:hover { text-decoration: underline; text-underline-offset: 3px; }

.cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    font-size: 14px;
}
.cookie-table th {
    text-align: left;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 10px 12px 10px 0;
    border-bottom: 1px solid var(--ink);
}
.cookie-table td {
    padding: 12px 12px 12px 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink-2);
    vertical-align: top;
}
.cookie-table td:first-child { font-family: var(--mono); color: var(--ink); }

.cookie-preferences {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-top: 16px;
}
.cookie-preference-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--line);
}
.cookie-preference-info h4 { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.cookie-preference-info p { font-size: 14px; color: var(--ink-2); }
.cookie-status { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }

.toggle-switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; inset: 0; cursor: pointer;
    background: var(--line-strong);
    border-radius: 22px;
    transition: background .15s ease;
}
.toggle-slider::before {
    content: "";
    position: absolute; left: 3px; top: 3px;
    width: 16px; height: 16px;
    background: #fff; border-radius: 50%;
    transition: transform .15s ease;
}
.toggle-switch input:checked + .toggle-slider { background: var(--ink); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }
.toggle-switch input:focus-visible + .toggle-slider { outline: 2px solid var(--accent); outline-offset: 2px; }

.preference-buttons { display: flex; flex-wrap: wrap; gap: 10px; padding: 20px 24px; }
.btn-preferences {
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--ink);
    cursor: pointer;
}
.btn-preferences:hover { border-color: var(--ink); }
.btn-preferences.btn-accept-all { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-preferences.btn-accept-all:hover { background: var(--accent); border-color: var(--accent); }

.success-message { display: none; padding: 0 24px 20px; font-size: 14px; color: #1f7a4d; }
.success-message.show { display: block; }

.terms-footer, .privacy-footer, .cookies-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 32px 0 96px;
}
.last-updated { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.back-to-top {
    font-family: var(--font);
    font-size: 14px;
    background: none;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    padding: 8px 14px;
    color: var(--ink);
    cursor: pointer;
}
.back-to-top:hover { border-color: var(--ink); }

/* =========================================================
   Navegação (sobrepõe assets/style.css)
   ========================================================= */

.is-main nav {
    background: rgba(247, 246, 242, .92);
    backdrop-filter: saturate(140%) blur(8px);
    border-bottom: 1px solid var(--line);
    padding: 0 24px;
}
.is-main .nav-container { max-width: 1112px; height: 68px; }
.is-main .nav-logo {
    color: var(--ink);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.02em;
}
.is-main .nav-links { gap: 32px; }
.is-main .nav-links a { color: var(--ink-2); font-size: 15px; font-weight: 400; }
.is-main .nav-links a:hover,
.is-main .nav-links a[aria-current="page"] { color: var(--ink); }
.is-main .nav-links a[aria-current="page"] { font-weight: 500; }

.is-main .nav-cta { gap: 10px; }
.is-main .nav-cta a#open-modal {
    background: var(--ink);
    border-radius: var(--radius);
    padding: 10px 16px;
    font-size: 14px;
}
.is-main .nav-cta a#open-modal:hover { background: var(--accent); }

.is-main .user-btn {
    width: 38px;
    height: 38px;
    background: transparent;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
}
.is-main .user-btn svg { color: var(--ink); width: 16px; height: 16px; }
.is-main .user-btn:hover { background: transparent; border-color: var(--ink); }

.is-main .hamburger { color: var(--ink); font-size: 24px; }

/* =========================================================
   Modal de orçamento
   ========================================================= */

.is-main #modal { background: rgba(18, 20, 23, .55); padding: 16px; }
.is-main .modal-content {
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .18);
}
.is-main .modal-content h2 {
    text-align: left;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}
.is-main .modal-content p { text-align: left; color: var(--ink-2); font-size: 15px; margin-bottom: 24px; }
.is-main .modal-content form { gap: 12px; }
.is-main .modal-content input,
.is-main .modal-content textarea,
.is-main .modal-content select[name="orcamento"] {
    font-family: var(--font);
    border-radius: var(--radius);
    border: 1px solid var(--line-strong);
    padding: 12px 14px;
}
.is-main .modal-content input:focus,
.is-main .modal-content textarea:focus,
.is-main .modal-content select[name="orcamento"]:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: none;
}
.is-main .modal-content button {
    background: var(--ink);
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 15px;
    font-weight: 500;
    padding: 14px;
}
.is-main .modal-content button:hover { background: var(--accent); }
.is-main .close-modal { top: 18px; right: 22px; color: var(--muted); font-size: 24px; line-height: 1; }

/* =========================================================
   Rodapé (sobrepõe estilos inline de includes/footer.php)
   ========================================================= */

.is-main .main-footer {
    background: var(--dark);
    border-top: 0;
    padding: 72px 0 0;
    font-family: var(--font);
}
.is-main .footer-container { max-width: 1160px; }
.is-main .footer-grid { gap: 32px; padding-bottom: 48px; border-bottom: 1px solid var(--dark-line); margin-bottom: 0; }

.is-main .footer-brand h3 {
    background: none;
    -webkit-text-fill-color: #fff;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
}
.is-main .footer-brand p { color: var(--dark-text); font-size: 14px; line-height: 1.7; }

.is-main .social-links a {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    background: transparent;
    border: 1px solid var(--dark-line);
    color: var(--dark-text);
}
.is-main .social-links a:hover {
    background: transparent;
    border-color: #fff;
    color: #fff;
    transform: none;
    box-shadow: none;
}

.is-main .footer-column h4 {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .08em;
    color: #fff;
    margin-bottom: 18px;
}
.is-main .footer-column li { margin-bottom: 10px; color: var(--dark-text); font-size: 14px; }
.is-main .footer-column a { color: var(--dark-text); font-size: 14px; }
.is-main .footer-column a::before { display: none; }
.is-main .footer-column a:hover { color: #fff; transform: none; }

.is-main .rgpd-bar {
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--dark-line);
    border-radius: 0;
    padding: 18px 0;
    margin-bottom: 0;
}
.is-main .rgpd-links { justify-content: flex-start; gap: 8px 28px; }
.is-main .rgpd-link { padding: 0; color: var(--dark-text); font-size: 13px; }
.is-main .rgpd-link:hover { background: transparent; color: #fff; }
.is-main .rgpd-link svg { display: none; }

.is-main .footer-bottom {
    border-top: 0;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    padding: 24px 0 32px;
}
.is-main .footer-legal { justify-content: flex-start; font-size: 13px; }
.is-main .footer-legal a,
.is-main .livro-reclamacoes,
.is-main .ral-link { color: var(--dark-text) !important; font-weight: 400; }
.is-main .footer-legal a:hover { color: #fff !important; }
.is-main .footer-legal .separator { color: var(--dark-line); }
.is-main .footer-copy { color: #7d838d; font-size: 13px; text-align: right; }
.is-main .footer-copy small { color: #7d838d; }

/* =========================================================
   Responsivo
   ========================================================= */

@media (max-width: 960px) {
    .hero-grid, .section-head, .split, .contact-grid, .cta-band { grid-template-columns: 1fr; gap: 32px; }
    .is-main .hero { padding: 72px 0 64px; }
    .hero-grid { gap: 48px; }
    .cols-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-cards { grid-template-columns: repeat(2, 1fr); }
    .grid-cards.cols-3g { grid-template-columns: repeat(2, 1fr); }
    .posts { grid-template-columns: repeat(2, 1fr); }
    .cta-band { padding: 48px 32px; }
    .cta-band .actions { justify-content: flex-start; }
    .section-head { margin-bottom: 40px; }
    .is-main .footer-bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
    .is-main .footer-copy { text-align: left; }
}

@media (max-width: 700px) {
    .section { padding: 64px 0; }
    .section-cta { padding-bottom: 64px; }
    .page-head { padding: 56px 0 40px; }
    .cols-3, .cols-4, .statement { grid-template-columns: 1fr; }
    .statement > div { padding: 28px 24px; }
    .svc-row { grid-template-columns: 1fr; gap: 8px; padding: 26px 0; }
    .dir li { grid-template-columns: 1fr; gap: 4px; padding: 20px 0; }
    .cta-band { padding: 40px 24px; }
    .form-2, .grid-cards, .grid-cards.cols-3g, .posts { grid-template-columns: 1fr; }
    .status { padding: 72px 0 80px; }
    .dialog { padding: 28px 22px; }

    .terms-container, .privacy-container, .cookies-container { padding: 0 16px; }
    .terms-header, .privacy-header, .cookies-header { padding: 56px 0 40px; }
    .term-item, .privacy-item, .cookie-item { padding: 28px 0; }
    .term-number, .privacy-number, .cookie-number { position: static; display: block; margin-bottom: 8px; }
    .cookie-table { display: block; overflow-x: auto; white-space: nowrap; }
    .cookie-preference-item { padding: 16px; }
    .preference-buttons { padding: 16px; }
    .terms-footer, .privacy-footer, .cookies-footer { padding-bottom: 64px; }

    .is-main nav { padding: 0 16px; }
    .is-main .nav-container { height: auto; min-height: 60px; padding: 12px 0; }
    .is-main .nav-links { gap: 4px; margin-top: 12px; text-align: left; }
    .is-main .nav-links a { padding: 10px 0; border-top: 1px solid var(--line); }
    .is-main .nav-cta { justify-content: flex-start; padding-bottom: 4px; }
    .is-main .nav-cta a#open-modal { flex: 1; width: auto; }
    .is-main .nav-cta a.user-btn { flex: 0 0 38px; width: 38px; }
    .is-main .modal-content { padding: 28px 22px; }
    .wrap { padding: 0 16px; }
}
