/* ============================================================
   Portal Iles — Identidade visual ILES (guia "iles-identidade-visual")
   Carregado por último: sobrepõe tipografia, forma e superfície.
   AS CORES NÃO MUDAM — todas continuam vindo das variáveis --app-* / --brand-*.
   Princípios do guia: Jost 200–400, rótulos em caixa alta com entreletras, traço único e fino,
   fundos lisos (sem gradiente/sombra), cantos retos, ouro só no raio.
   ============================================================ */

:root {
    --font-ui: 'Jost', 'Futura', 'Century Gothic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --il-ouro: var(--brand-gold-light);          /* ouro do raio sobre fundo escuro (cor atual do app) */
    --app-radius: 4px;
    --app-radius-sm: 3px;
    --app-shadow: none;
    --app-shadow-soft: none;
}

/* ── tipografia ── */
html { -webkit-text-size-adjust: 100%; }
body,
button, input, select, textarea, .ts-control {
    font-family: var(--font-ui);
}
body {
    font-weight: 400;
    font-synthesis: none;            /* sem negrito falso: pesos altos caem no 500 do Jost */
    background: var(--app-bg);       /* fundo liso (sem o degradê azulado do topo) */
}
* { font-synthesis: none; }

/* ── marca ── */
.il-marca { display: block; width: 100%; height: auto; overflow: visible; }
.il-letras { fill: none; stroke: currentColor; stroke-width: 8; }
.il-raio   { fill: none; stroke: var(--il-ouro); stroke-width: 8; stroke-linejoin: miter; }
.il-anel   { fill: none; stroke: var(--il-ouro); stroke-width: 2; }

/* ── barra superior ── */
.topbar-logo { height: 30px; width: auto; display: block; }
.topbar-left .il-marca.topbar-logo { width: 13px; height: 30px; margin-left: 4px; }
.topbar h1 {
    font-size: 12.5px; font-weight: 400; letter-spacing: .14em; text-transform: uppercase;
    max-width: calc(100vw - 210px);
}
.btn-logout, .btn-logout:link { font-weight: 400; letter-spacing: .12em; text-transform: uppercase; font-size: 11px; }

/* ── hero do dashboard ── */
.db-hero-logo, .db-hero-brand .il-marca { width: auto; height: 46px; margin: 0 auto 2px; color: #fff; }
.db-hero-eyebrow { margin: 0 0 14px; padding-left: .36em; font-size: 9px; font-weight: 400; letter-spacing: .36em;
    text-transform: uppercase; color: rgba(255, 255, 255, .62); }
.db-hero-greet { font-size: .64rem; font-weight: 400; letter-spacing: .22em; text-transform: uppercase; opacity: .7; }
.db-hero-saldo { font-weight: 300; letter-spacing: -.01em; }

/* ── rótulos (eyebrow) ── */
.db-kpi-lbl, .db-hero-saldo-lbl, .fin-cat-label, .db-block-label {
    font-weight: 400; letter-spacing: .14em; text-transform: uppercase;
}
label { font-weight: 400; letter-spacing: .1em; }
.db-section-title { font-weight: 500; letter-spacing: .02em; }
.page-title { font-weight: 500; letter-spacing: .02em; }
.db-kpi-val { font-weight: 400; letter-spacing: 0; }
.db-row-title { font-weight: 500; }
.db-row-val { font-weight: 500; }
.db-row-badge { font-weight: 500; letter-spacing: .06em; }

/* ── superfícies: hairline, sem sombra/blur ── */
.floating-menu {
    background: var(--app-surface); border-radius: var(--app-radius);
    backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none;
}
.menu-item { border-radius: var(--app-radius-sm); }
.menu-item.active { background: transparent; box-shadow: inset 0 -2px 0 var(--brand-gold-dark); }
.menu-label { font-weight: 400; letter-spacing: .04em; }
.db-section, .db-kpi, .card { box-shadow: none; }

/* ── botões e campos ── */
button, .btn, .btn-full, .btn-small {
    font-weight: 500; letter-spacing: .1em; text-transform: uppercase; font-size: 12.5px;
    border-radius: 2px;
}
.btn-small { font-size: 11.5px; }
input, select, textarea, .ts-control { border-radius: 2px; font-size: 16px; } /* 16px: iOS não dá zoom ao focar */
input:focus, select:focus, textarea:focus, .ts-control.focus {
    border-color: var(--app-accent); box-shadow: none; outline: 1px solid var(--app-accent); outline-offset: 0;
}

/* ============================================================
   Login / Primeiro acesso
   Pensado pro iPhone: alinhado ao TOPO (não centralizado), altura estável (svh) e sem rolagem forçada,
   pra tela continuar bonita quando a folha do Face ID / "Preencher Senha" sobe.
   ============================================================ */
html.login-page {
    background: var(--brand-navy);
    overscroll-behavior: none;
}
body.login-page {
    background: var(--brand-navy);
    color: #fff;
    margin: 0;
    padding: 0 !important;
    min-height: 100vh;
    min-height: 100svh;                          /* svh não muda quando a folha/teclado aparece */
    overscroll-behavior: none;
}
.login-container {
    min-height: 100vh;
    min-height: 100svh;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
    padding: calc(env(safe-area-inset-top, 0px) + clamp(56px, 18vh, 160px)) 24px calc(env(safe-area-inset-bottom, 0px) + 32px);
}
.login-card {
    position: relative;
    width: 100%; max-width: 380px; padding: 28px 24px 26px;
    background: transparent; border: 1px solid rgba(234, 201, 147, .22); border-radius: 3px;
    box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; text-align: left;
}
.login-card h2 { margin: 0 0 4px; font-size: 20px; font-weight: 300; letter-spacing: .02em; color: #fff; }
.login-card p  { margin: 0 0 22px; font-size: 10px; font-weight: 400; letter-spacing: .28em; text-transform: uppercase; color: rgba(255, 255, 255, .5); }
body.login-page input {
    min-height: 50px; font-size: 16px; font-weight: 300; letter-spacing: .02em;
    color: #fff; background: transparent; border: 1px solid rgba(255, 255, 255, .22); border-radius: 2px;
}
body.login-page input:focus {
    border-color: var(--brand-gold); background: transparent; box-shadow: none; outline: none;
}
body.login-page input:-webkit-autofill,
body.login-page input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--brand-navy) inset;
    -webkit-text-fill-color: #fff; caret-color: #fff;
    transition: background-color 9999s ease-out;
}
body.login-page .btn-full,
body.login-page .btn-full:hover {
    background: var(--brand-gold) !important;    /* dourado chapado: sem degradê nem brilho */
    color: var(--brand-navy);
    border: 0; border-radius: 2px; box-shadow: none; filter: none;
    font-weight: 500; letter-spacing: .24em; text-transform: uppercase; font-size: 12px;
    min-height: 50px;
}
body.login-page .alert-card { border-radius: 2px !important; }

/* raio da marca no canto do quadro (traço fino: acima de 40 px o guia pede o peso do selo) */
.login-raio { position: absolute; top: 22px; right: 24px; width: 26px; height: 56px; }
.login-raio .il-raio { stroke-width: 5 !important; }

/* quadro de saudação do dashboard: mesmo azul escuro da barra superior (--brand-navy) */
.db-hero { background: var(--brand-navy); }

/* atalho da Identidade ILES no dashboard: fundo navy da marca com listras diagonais bem fracas */
.id-atalho {
    display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding: 16px 16px;
    text-decoration: none; color: #fff;
    background-color: var(--brand-navy);
    background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .035) 0, rgba(255, 255, 255, .035) 1px, transparent 1px, transparent 10px);
    border: 1px solid rgba(234, 201, 147, .22); border-radius: var(--app-radius);
}
.id-atalho:active { filter: brightness(1.15); }
.id-atalho-raio { flex: 0 0 auto; width: 18px; height: 38px; }
.id-atalho-txt { min-width: 0; flex: 1; }
.id-atalho-tit { font-size: 12.5px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; }
.id-atalho-sub { margin-top: 3px; font-size: 12px; font-weight: 300; letter-spacing: .02em; color: rgba(255, 255, 255, .62); }
.id-atalho-seta { flex: 0 0 auto; width: 18px; height: 18px; color: var(--brand-gold-light); }
