/* Página /segmentos. Tudo dentro de #tdfg: o site carrega o Bootstrap junto. */
@property --acc {
    syntax: "<color>";
    inherits: true;
    initial-value: #5b8dff;
}

#tdfg {
    --acc: #5b8dff;
    --bg: #070c18;
    --bg-2: #0d1526;
    --line: rgba(255, 255, 255, 0.09);
    --line-2: rgba(255, 255, 255, 0.16);
    --text: #eef3ff;
    --text-2: #a4b2cc;
    --text-3: #7385a6;
    --display: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
    --body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    font-family: var(--body);
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
    transition: --acc 0.5s ease;
}
body:has(#tdfg) { background: #070c18; }
#tdfg[data-family="servico"] { --acc: #2dd4bf; }
#tdfg[data-family="operacao"] { --acc: #fbbf24; }
#tdfg[data-family="recorrente"] { --acc: #b79cff; }

#tdfg *, #tdfg *::before, #tdfg *::after { box-sizing: border-box; }
#tdfg h1, #tdfg h2, #tdfg h6 { font-family: var(--display); color: inherit; margin: 0; letter-spacing: -0.025em; }
#tdfg p { margin: 0; }
#tdfg a { color: inherit; text-decoration: none; }
#tdfg [hidden] { display: none !important; }
#tdfg :focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; border-radius: 8px; }
#tdfg .g-shell { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
#tdfg .g-ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- botões ---------- */
#tdfg .g-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--display); font-weight: 700; font-size: 15px; color: #06101f;
    background: var(--acc); padding: 13px 24px; border-radius: 12px; border: 1px solid transparent;
    transition: transform 0.2s, box-shadow 0.2s, background 0.5s;
    box-shadow: 0 14px 34px -14px var(--acc);
}
#tdfg .g-btn:hover { transform: translateY(-2px); color: #06101f; }
#tdfg .g-btn-sm { padding: 9px 16px; font-size: 13.5px; border-radius: 10px; }
#tdfg .g-btn-lg { padding: 16px 30px; font-size: 16px; }
#tdfg .g-btn-ghost { background: none; color: var(--text); border-color: var(--line-2); box-shadow: none; }
#tdfg .g-btn-ghost:hover { color: #fff; border-color: var(--acc); }
#tdfg .g-link { color: var(--text-2); font-size: 14px; font-weight: 600; }
#tdfg .g-link:hover { color: #fff; }

/* ---------- topo ---------- */
#tdfg .g-top { position: sticky; top: 0; z-index: 40; background: rgba(7, 12, 24, 0.86); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
#tdfg .g-top-in { display: flex; align-items: center; gap: 22px; height: 66px; }
#tdfg .g-logo img { height: 28px; width: auto; display: block; }
#tdfg .g-top-act { margin-left: auto; display: flex; align-items: center; gap: 20px; }
#tdfg .g-switch {
    display: flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, 0.05); color: var(--text);
    border: 1px solid var(--line-2); border-radius: 10px; padding: 7px 12px; font-size: 13.5px; font-family: var(--body); cursor: pointer;
}
#tdfg .g-switch:hover { border-color: var(--acc); }
#tdfg .g-switch strong { font-weight: 600; }
#tdfg .g-menu { border-top: 1px solid var(--line); background: var(--bg-2); max-height: calc(100vh - 66px); overflow-y: auto; }
#tdfg .g-menu-in { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; padding-top: 24px; padding-bottom: 26px; }
#tdfg .g-menu h6 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); margin-bottom: 10px; }
#tdfg .g-menu a { display: block; padding: 5px 0; color: var(--text-2); font-size: 14.5px; }
#tdfg .g-menu a:hover { color: #fff; }

/* ---------- abertura ---------- */
#tdfg .g-hero { position: relative; padding: 76px 0 54px; isolation: isolate; }
#tdfg .g-aura {
    position: absolute; inset: 0; z-index: -1; overflow: hidden;
    background:
        radial-gradient(760px 400px at 14% 0%, color-mix(in srgb, var(--acc) 26%, transparent), transparent 70%),
        radial-gradient(620px 360px at 92% 16%, rgba(51, 102, 250, 0.2), transparent 70%);
}
#tdfg .g-aura::after {
    content: ""; position: absolute; inset: 0;
    background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 72px 72px; opacity: 0.32;
    mask-image: radial-gradient(ellipse 80% 90% at 30% 0%, #000, transparent 75%);
}
#tdfg .g-eyebrow { font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--acc); letter-spacing: 0.01em; margin-bottom: 14px; transition: color 0.5s; }
#tdfg h1 { font-size: clamp(36px, 5.9vw, 72px); line-height: 1.04; font-weight: 800; letter-spacing: -0.035em; max-width: 19ch; }
#tdfg .g-lead { margin-top: 20px; max-width: 62ch; color: var(--text-2); font-size: clamp(16px, 1.5vw, 19px); line-height: 1.6; }

#tdfg .g-picker { margin-top: 44px; }
#tdfg .g-fams { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
#tdfg .g-hero-act { display: flex; align-items: center; gap: 16px; margin-top: 30px; flex-wrap: wrap; }
#tdfg .g-hero-note { color: var(--text-3); font-size: 14px; font-weight: 600; }
#tdfg .g-fam {
    text-align: center; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line); color: var(--text-2);
    padding: 14px 16px; border-radius: 14px; cursor: pointer; font-family: var(--display); font-size: 16px; font-weight: 700;
    transition: border-color 0.2s, background 0.2s, transform 0.2s, color 0.2s;
}
#tdfg .g-fam:hover { border-color: var(--line-2); transform: translateY(-2px); color: #fff; }
#tdfg .g-fam.is-on { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 14%, transparent); color: #fff; }
#tdfg .g-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
#tdfg .g-chip {
    padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-2); font-size: 14px; font-weight: 500;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}
#tdfg .g-chip:hover { color: #fff; border-color: var(--acc); }
#tdfg .g-chip.is-on { background: var(--acc); border-color: var(--acc); color: #06101f; font-weight: 600; }

/* ---------- seções ---------- */
#tdfg section.g-stage, #tdfg section.g-journey, #tdfg section.g-mods-sec, #tdfg section.g-rel { padding: 72px 0; border-top: 1px solid var(--line); }
#tdfg .g-hero, #tdfg .g-stage { scroll-margin-top: 66px; }
#tdfg .g-h2 { font-size: clamp(26px, 3.2vw, 40px); line-height: 1.12; font-weight: 800; text-align: center; margin-bottom: 40px; }
#tdfg .g-h2 em { font-style: normal; color: var(--acc); transition: color 0.5s; }

/* ---------- dores e tela ---------- */
#tdfg .g-stage-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 44px; align-items: start; }
#tdfg .g-pains { display: flex; flex-direction: column; gap: 12px; }
#tdfg .g-pain {
    position: relative; overflow: hidden; display: flex; align-items: center; gap: 18px; width: 100%; text-align: left;
    padding: 18px 20px; border-radius: 18px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
    color: var(--text); cursor: pointer; font-family: var(--body); transition: border-color 0.25s, background 0.25s, transform 0.25s;
}
#tdfg .g-pain:hover { border-color: var(--line-2); }
#tdfg .g-pain.is-on { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 10%, transparent); transform: translateX(6px); }
#tdfg .g-pain-ico { flex: 0 0 auto; width: 58px; height: 58px; border-radius: 16px; background: #fff; display: flex; align-items: center; justify-content: center; }
#tdfg .g-pain-ico img { width: 40px; height: 40px; }
#tdfg .g-pain-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
#tdfg .g-pain-txt s { color: var(--text-3); font-size: 15px; text-decoration-color: color-mix(in srgb, #fb7185 75%, transparent); text-decoration-thickness: 2px; }
#tdfg .g-pain-txt b { font-family: var(--display); font-size: 21px; font-weight: 800; line-height: 1.2; color: var(--text-2); transition: color 0.25s; }
#tdfg .g-pain.is-on .g-pain-txt b { color: #fff; }
#tdfg:not(.g-ready) .g-pain { margin-bottom: 12px; }
#tdfg .g-pain-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--acc); transform: scaleX(0); transform-origin: left; visibility: hidden; }
#tdfg.g-running .g-pain.is-on .g-pain-bar { visibility: visible; animation: g-fill var(--rotate, 2700ms) linear forwards; }
@keyframes g-fill { to { transform: scaleX(1); } }

#tdfg .g-window { position: sticky; top: 90px; margin: 0; border-radius: 16px; border: 1px solid var(--line-2); background: #fff; overflow: hidden; box-shadow: 0 40px 80px -38px color-mix(in srgb, var(--acc) 60%, #000); transition: box-shadow 0.5s; }
#tdfg .g-window-bar { display: flex; align-items: center; gap: 6px; background: #eef1f6; padding: 11px 14px; border-bottom: 1px solid #dee3ec; }
#tdfg .g-window-bar i { width: 10px; height: 10px; border-radius: 50%; background: #cbd3e0; }
#tdfg .g-window-bar span { margin-left: 10px; font-size: 12px; color: #6d7a90; }
#tdfg .g-screen { min-height: 356px; padding: 22px; color: #1c2738; background: #fff; }

#tdfg .s-head { font-family: var(--display); font-weight: 700; font-size: 17px; margin-bottom: 16px; letter-spacing: -0.01em; }
#tdfg .s-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
#tdfg .s-col { background: #f2f4f8; border-radius: 10px; padding: 10px; min-height: 268px; }
#tdfg .s-col h6 { font-family: var(--body); font-size: 12.5px; font-weight: 600; color: #4c5a70; letter-spacing: 0; margin-bottom: 9px; display: flex; justify-content: space-between; }
#tdfg .s-col h6 i { font-style: normal; color: #8f9bae; }
#tdfg .s-card { background: #fff; border-radius: 8px; padding: 10px; margin-bottom: 8px; box-shadow: 0 1px 2px rgba(20, 30, 50, 0.1); }
#tdfg .s-card b, #tdfg .s-card span { display: block; overflow-wrap: anywhere; line-height: 1.3; }
#tdfg .s-card b { font-size: 13px; font-weight: 600; }
#tdfg .s-card span { font-size: 12px; color: #718098; margin-top: 2px; }
#tdfg .s-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13.5px; color: #1c2738; }
#tdfg .s-table th { text-align: left; font-size: 12px; font-weight: 600; color: #6c7a90; padding: 0 8px 9px 0; border-bottom: 1px solid #e3e7ee; }
#tdfg .s-table td { padding: 13px 8px 13px 0; border-bottom: 1px solid #eff1f5; overflow-wrap: anywhere; line-height: 1.3; }
#tdfg .s-tag { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 6px; padding: 3px 8px; }
#tdfg .s-ok { background: #dff7ea; color: #0f7a4a; }
#tdfg .s-warn { background: #fff2d1; color: #8f6200; }
#tdfg .s-bad { background: #ffe1e4; color: #b42336; }
#tdfg .s-chat { display: flex; flex-direction: column; gap: 9px; background: #eef0ea; border-radius: 10px; padding: 14px; min-height: 268px; }
#tdfg .s-msg { max-width: 82%; padding: 9px 12px; border-radius: 11px; font-size: 13.5px; line-height: 1.45; background: #fff; align-self: flex-start; box-shadow: 0 1px 1px rgba(20, 30, 50, 0.08); }
#tdfg .s-msg.s-out { background: #d7f5c5; align-self: flex-end; }
#tdfg .s-msg.s-sys { background: #e3e9f6; color: #3e4f6c; align-self: center; font-size: 12px; max-width: 100%; box-shadow: none; }
#tdfg .s-slot { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
#tdfg .s-slot time { width: 44px; flex: 0 0 auto; font-size: 13px; color: #6c7a90; }
#tdfg .s-slot span { flex: 1; padding: 13px 14px; border-radius: 9px; font-size: 13.5px; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#tdfg .s-slot .s-on { background: #e6edff; color: #2445a8; border-left: 3px solid #3366fa; }
#tdfg .s-slot .s-free { background: #fff; border: 1px dashed #c9d2e0; color: #7a879c; }
#tdfg .s-flow { list-style: none; padding: 0; margin: 0; }
#tdfg .s-flow li { position: relative; padding: 0 0 22px 34px; }
#tdfg .s-flow li::before { content: ""; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; background: #16a26a; }
#tdfg .s-flow li::after { content: ""; position: absolute; left: 9px; top: 21px; bottom: -1px; width: 2px; background: #cfe9dc; }
#tdfg .s-flow li:last-child::after { display: none; }
#tdfg .s-flow b { display: block; font-size: 14.5px; font-weight: 600; }
#tdfg .s-flow span { display: block; font-size: 13px; color: #718098; margin-top: 2px; }
#tdfg .s-result { background: #dff7ea; color: #0f7a4a; text-align: center; font-weight: 700; font-size: 14px; padding: 12px; border-radius: 10px; }
#tdfg .s-item { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid #eff1f5; font-size: 14px; }
#tdfg .s-item b { font-weight: 600; white-space: nowrap; }
#tdfg .s-sum { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 0; }
#tdfg .s-sum span { font-size: 14px; color: #6c7a90; }
#tdfg .s-sum strong { font-family: var(--display); font-size: 28px; font-weight: 800; }
#tdfg .s-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
#tdfg .s-kpi { background: #f2f4f8; border-radius: 10px; padding: 13px; }
#tdfg .s-kpi span { display: block; font-size: 12px; color: #6c7a90; }
#tdfg .s-kpi b { display: block; font-family: var(--display); font-size: 19px; font-weight: 800; margin-top: 3px; }
#tdfg .s-bars { display: flex; align-items: flex-end; gap: 10px; height: 148px; margin-top: 22px; }
#tdfg .s-bars i { flex: 1; height: var(--h); border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #5b8dff, #3366fa); }
#tdfg .s-cap { text-align: center; font-size: 12px; color: #7a879c; margin-top: 10px; }

/* entrada em cascata: cada linha com o seu atraso */
#tdfg .g-enter { animation: g-rise 0.42s ease both; }
#tdfg .g-screen.g-enter { animation: none; }
#tdfg .g-screen.g-enter [style*="--d"] { animation: g-rise 0.42s ease both; animation-delay: calc(var(--d) * 70ms); }
#tdfg .g-screen.g-enter .s-bars i { transform-origin: bottom; animation: g-grow 0.55s ease both; animation-delay: calc(var(--d) * 60ms); }
@keyframes g-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes g-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* ---------- caminho ---------- */
#tdfg .g-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: relative; }
#tdfg .g-steps::before { content: ""; position: absolute; top: 19px; left: 10%; right: 10%; height: 2px; background: linear-gradient(90deg, var(--acc), color-mix(in srgb, var(--acc) 22%, transparent)); }
#tdfg .g-steps li { position: relative; padding-right: 18px; display: flex; flex-direction: column; align-items: center; text-align: center; }
#tdfg .g-steps.g-enter li { animation: g-rise 0.45s ease both; animation-delay: calc(var(--d) * 90ms); }
#tdfg .g-steps.g-enter { animation: none; }
#tdfg .g-step-n { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--bg); border: 2px solid var(--acc); font-family: var(--display); font-weight: 800; font-size: 15px; margin-bottom: 14px; position: relative; }
#tdfg .g-steps b { display: block; font-family: var(--display); font-size: 16.5px; font-weight: 700; }

/* ---------- módulos ---------- */
#tdfg .g-mod-list { list-style: none; margin: 0 auto; padding: 0; max-width: 860px; display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 14px; }
#tdfg .g-mod-list li { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
#tdfg .g-mod-list img { width: 72px; height: 72px; padding: 10px; border-radius: 20px; background: #fff; box-shadow: 0 16px 30px -16px color-mix(in srgb, var(--acc) 80%, #000); }
#tdfg .g-mod-list span { font-family: var(--display); font-size: 15px; font-weight: 700; color: var(--text-2); }

/* ---------- parecidos ---------- */
#tdfg .g-rel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
#tdfg .g-rel-card { display: flex; flex-direction: column; gap: 16px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px; padding: 22px; transition: border-color 0.2s, transform 0.2s; }
#tdfg .g-rel-card:hover { border-color: var(--acc); transform: translateY(-3px); }
#tdfg .g-rel-card b { font-family: var(--display); font-size: 18px; font-weight: 700; }
#tdfg .g-rel-icons { display: flex; }
#tdfg .g-rel-icons img { width: 46px; height: 46px; padding: 6px; border-radius: 14px; background: #fff; margin-left: -10px; box-shadow: 0 0 0 3px var(--bg-2); }
#tdfg .g-rel-icons img:first-child { margin-left: 0; }

/* ---------- fechamento ---------- */
#tdfg .g-end { padding: 84px 0; text-align: center; background: radial-gradient(640px 280px at 50% 100%, color-mix(in srgb, var(--acc) 22%, transparent), transparent 75%); border-top: 1px solid var(--line); }
#tdfg .g-end h2 { font-size: clamp(34px, 4.6vw, 56px); font-weight: 800; }
#tdfg .g-end p { color: var(--text-2); font-size: 18px; margin-top: 12px; }
#tdfg .g-end-act { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
#tdfg .g-foot { border-top: 1px solid var(--line); padding: 26px 0; color: var(--text-3); font-size: 13.5px; }
#tdfg .g-foot-in { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
#tdfg .g-foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
#tdfg .g-foot a:hover { color: #fff; }
#tdfg .g-dock { display: none; }

@media (max-width: 960px) {
    #tdfg .g-stage-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
    #tdfg .g-window { position: static; order: -1; }
    #tdfg .g-screen { min-height: 318px; }
    #tdfg .g-fams { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #tdfg .g-menu-in { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #tdfg .g-link { display: none; }
    #tdfg .g-steps { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    #tdfg .g-steps::before { top: 10px; bottom: 30px; left: 19px; right: auto; width: 2px; height: auto; }
    #tdfg .g-steps li { flex-direction: row; align-items: center; gap: 14px; text-align: left; padding: 0; }
    #tdfg .g-step-n { margin: 0; flex: 0 0 auto; }
    #tdfg .g-rel-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
    #tdfg .g-shell { padding: 0 16px; }
    #tdfg .g-top-act .g-btn { display: none; }
    #tdfg .g-hero { padding: 44px 0 36px; }
    #tdfg .g-picker { margin-top: 30px; }
    #tdfg .g-fam { padding: 13px; }
    #tdfg section.g-stage, #tdfg section.g-journey, #tdfg section.g-mods-sec, #tdfg section.g-rel { padding: 50px 0; }
    #tdfg .g-pain-txt b { font-size: 18px; }
    #tdfg .g-pain { padding: 14px; gap: 14px; }
    #tdfg .g-pain-ico { width: 48px; height: 48px; }
    #tdfg .g-pain-ico img { width: 34px; height: 34px; }
    #tdfg .g-mod-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    #tdfg .g-screen { padding: 14px; }
    #tdfg .s-board { gap: 6px; }
    #tdfg .s-col { padding: 7px; }
    #tdfg .g-dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: rgba(7, 12, 24, 0.96); border-top: 1px solid var(--line-2); padding: 11px 16px; font-size: 14px; font-weight: 600; }
    #tdfg .g-foot { padding-bottom: 86px; }
}
@media (prefers-reduced-motion: reduce) {
    #tdfg *, #tdfg *::before, #tdfg *::after { animation: none !important; transition: none !important; }
}
