:root {
    --vai-bg: #030712;
    --vai-bg-soft: #071225;
    --vai-panel: rgba(8, 15, 30, .92);
    --vai-panel-strong: rgba(15, 23, 42, .96);
    --vai-border: rgba(148, 163, 184, .18);
    --vai-border-strong: rgba(125, 211, 252, .28);
    --vai-text: #f8fafc;
    --vai-muted: #94a3b8;
    --vai-primary: #7c3aed;
    --vai-blue: #2563eb;
    --vai-cyan: #38bdf8;
    --vai-green: #10b981;
    --vai-orange: #f59e0b;
    --vai-red: #fb7185;
}

.fi-body {
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, .28) 0, transparent 32rem),
        radial-gradient(circle at 72% 8%, rgba(124, 58, 237, .22) 0, transparent 28rem),
        linear-gradient(135deg, #030712 0%, #071225 42%, #020617 100%) !important;
    color: var(--vai-text) !important;
}

.fi-sidebar {
    background: linear-gradient(180deg, rgba(3, 7, 18, .98) 0%, rgba(8, 15, 30, .96) 100%) !important;
    border-right: 1px solid var(--vai-border) !important;
    box-shadow: 18px 0 80px rgba(0, 0, 0, .24);
}

.fi-sidebar-header { background: transparent !important; border-bottom: 1px solid var(--vai-border) !important; }
.fi-logo, .fi-sidebar-header span, .fi-sidebar-group-label, .fi-sidebar-item-label { color: #e5e7eb !important; }
.fi-sidebar-group-label { letter-spacing: .12em; text-transform: uppercase; font-size: .68rem !important; color: #7dd3fc !important; }
.fi-sidebar-item a { border-radius: .9rem !important; transition: all .18s ease; }
.fi-sidebar-item.fi-active a, .fi-sidebar-item a:hover { background: linear-gradient(90deg, rgba(124, 58, 237, .38), rgba(37, 99, 235, .16)) !important; color: white !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 12px 28px rgba(37, 99, 235, .16); }
.fi-topbar { background: rgba(3, 7, 18, .72) !important; border-bottom: 1px solid var(--vai-border) !important; backdrop-filter: blur(18px); }
.fi-main, .fi-page { background: transparent !important; }
.fi-header { display: none !important; }
.fi-wi-widget, .fi-section, .fi-ta-ctn, .fi-fo-field-wrp, .fi-modal-window { background: var(--vai-panel) !important; border-color: var(--vai-border) !important; color: var(--vai-text) !important; }
.fi-input, .fi-select-input, .fi-textarea { background: rgba(15, 23, 42, .78) !important; border-color: var(--vai-border) !important; color: var(--vai-text) !important; }
.fi-btn-color-primary { background: linear-gradient(135deg, #7c3aed, #2563eb) !important; box-shadow: 0 18px 42px rgba(37, 99, 235, .25) !important; }

/* Login oficial do ecossistema */
.fi-simple-layout {
    min-height: 100vh !important;
    background:
        radial-gradient(circle at 18% 20%, rgba(56, 189, 248, .22), transparent 25rem),
        radial-gradient(circle at 82% 78%, rgba(124, 58, 237, .25), transparent 28rem),
        linear-gradient(135deg, #020617 0%, #071225 46%, #020617 100%) !important;
    position: relative;
    overflow: hidden;
}

.fi-simple-layout:before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(148, 163, 184, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, .055) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(circle at center, black, transparent 76%);
    pointer-events: none;
}

.fi-simple-layout:after {
    content: "Centro Operacional Inteligente\A IA, SaaS, Factory, clientes e produtos conectados em uma única plataforma.\A\A TV Digital Enterprise · Guia Digital da Cidade · AssessorGov IA · SISMED";
    white-space: pre-line;
    position: fixed;
    left: clamp(2rem, 8vw, 8rem);
    top: 50%;
    transform: translateY(-50%);
    width: min(34rem, 42vw);
    color: #dbeafe;
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    line-height: 1.75;
    padding-top: 6.5rem;
    background:
        radial-gradient(circle at 2.2rem 2.2rem, rgba(56, 189, 248, .55), transparent 2.5rem),
        linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
    border: 1px solid rgba(125, 211, 252, .16);
    border-radius: 2rem;
    padding: 8rem 2rem 2rem;
    box-shadow: 0 30px 120px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255,255,255,.06);
}

.fi-simple-main {
    margin-left: auto !important;
    margin-right: clamp(2rem, 8vw, 8rem) !important;
    width: min(30rem, 92vw) !important;
    background: rgba(8, 15, 30, .90) !important;
    border: 1px solid rgba(125, 211, 252, .18) !important;
    box-shadow: 0 30px 120px rgba(0, 0, 0, .46), inset 0 1px 0 rgba(255, 255, 255, .06) !important;
    backdrop-filter: blur(20px);
    border-radius: 1.6rem !important;
}

.fi-simple-main:before {
    content: "VITRINE IA PRO";
    display: block;
    margin: .25rem auto 1rem;
    width: max-content;
    padding: .45rem .8rem;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, .28);
    color: #7dd3fc;
    font-size: .68rem;
    font-weight: 950;
    letter-spacing: .22em;
    background: rgba(14, 165, 233, .08);
}

.fi-simple-main h1,
.fi-simple-main .fi-logo,
.fi-simple-main .fi-simple-header-heading { color: #ffffff !important; font-weight: 950 !important; letter-spacing: -.03em; }
.fi-simple-main label, .fi-simple-main .fi-fo-field-wrp-label span { color: #cbd5e1 !important; }
.fi-simple-main input { color: #f8fafc !important; background: rgba(15, 23, 42, .80) !important; border-color: rgba(125, 211, 252, .24) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.04) !important; }
.fi-simple-main input:focus { border-color: #38bdf8 !important; box-shadow: 0 0 0 3px rgba(56, 189, 248, .18) !important; }
.fi-simple-main .fi-checkbox-input { background: rgba(15, 23, 42, .92) !important; border-color: rgba(125, 211, 252, .28) !important; }
.fi-simple-main .fi-btn { border-radius: .95rem !important; }
.fi-simple-main .fi-btn-color-primary { background: linear-gradient(135deg, #2563eb, #06b6d4, #7c3aed) !important; color: white !important; font-weight: 950 !important; }

.vai-enterprise-shell { margin: -1.5rem; min-height: calc(100vh - 2rem); padding: 2rem; color: var(--vai-text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.vai-grid-glow { position: relative; overflow: hidden; }
.vai-grid-glow:before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(148, 163, 184, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, .05) 1px, transparent 1px); background-size: 42px 42px; mask-image: radial-gradient(circle at top, black, transparent 72%); pointer-events: none; }
.vai-topbar { display: flex; justify-content: space-between; gap: 1.5rem; align-items: flex-start; margin-bottom: 1.5rem; position: relative; z-index: 1; }
.vai-eyebrow { color: #93c5fd; text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; font-weight: 900; }
.vai-topbar h1 { margin: .35rem 0 0; font-size: clamp(2rem, 4vw, 3.8rem); line-height: .98; font-weight: 950; color: white; letter-spacing: -.06em; }
.vai-topbar p { margin: .65rem 0 0; color: var(--vai-muted); font-size: .98rem; max-width: 760px; }
.vai-topbar-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .7rem; }
.vai-search, .vai-chip, .vai-button { border: 1px solid var(--vai-border); background: rgba(15, 23, 42, .75); color: #dbeafe; border-radius: .95rem; padding: .75rem 1rem; font-size: .82rem; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); }
.vai-search { min-width: 260px; color: #9ca3af; }
.vai-chip-success { color: #86efac; }
.vai-button { background: linear-gradient(135deg, #7c3aed, #2563eb); color: white; font-weight: 900; cursor: pointer; text-decoration: none; }
.vai-metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; position: relative; z-index: 1; }
.vai-metric-card, .vai-panel { background: linear-gradient(180deg, rgba(17, 28, 51, .94), rgba(8, 15, 30, .94)); border: 1px solid var(--vai-border); border-radius: 1.25rem; box-shadow: 0 18px 60px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .04); }
.vai-metric-card { padding: 1.25rem; min-height: 148px; position: relative; overflow: hidden; }
.vai-metric-card:after { content: ""; position: absolute; inset: auto -30px -45px auto; width: 130px; height: 130px; border-radius: 999px; filter: blur(12px); opacity: .35; background: var(--vai-blue); }
.vai-tone-purple:after { background: var(--vai-primary); } .vai-tone-green:after { background: var(--vai-green); } .vai-tone-orange:after { background: var(--vai-orange); } .vai-tone-red:after { background: var(--vai-red); }
.vai-metric-head { display: flex; justify-content: space-between; gap: 1rem; align-items: center; color: #cbd5e1; font-size: .9rem; }
.vai-metric-icon { width: 42px; height: 42px; border-radius: 1rem; display: grid; place-items: center; background: rgba(255, 255, 255, .08); font-size: 1.25rem; }
.vai-metric-card strong { display: block; margin-top: .6rem; font-size: 1.9rem; color: white; font-weight: 950; }
.vai-metric-card small { color: #86efac; font-size: .78rem; }
.vai-sparkline { height: 34px; margin-top: .75rem; display: flex; align-items: end; }
.vai-sparkline span { display: block; height: 2px; width: 100%; background: linear-gradient(90deg, #2563eb, #7c3aed, #22c55e); border-radius: 999px; transform: skewY(-8deg); box-shadow: 0 0 18px rgba(96, 165, 250, .5); }
.vai-main-grid { display: grid; grid-template-columns: 1.45fr 1fr .9fr; gap: 1rem; margin-bottom: 1rem; position: relative; z-index: 1; }
.vai-bottom-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; position: relative; z-index: 1; }
.vai-panel { padding: 1.25rem; }
.vai-panel-large { min-height: 430px; }
.vai-panel h2 { color: white; font-size: 1.05rem; font-weight: 950; margin: 0; }
.vai-panel p { color: var(--vai-muted); font-size: .82rem; margin: .25rem 0 0; }
.vai-panel-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; }
.vai-panel-head a { color: #93c5fd; font-size: .82rem; font-weight: 900; text-decoration: none; }
.vai-ecosystem { display: grid; grid-template-columns: 240px 1fr; gap: 1.5rem; align-items: center; }
.vai-donut { width: 210px; height: 210px; border-radius: 50%; background: conic-gradient(#2563eb 0 40%, #10b981 40% 64%, #f59e0b 64% 80%, #7c3aed 80% 92%, #fb7185 92% 100%); display: grid; place-items: center; box-shadow: 0 0 50px rgba(37, 99, 235, .25); }
.vai-donut > div { width: 120px; height: 120px; border-radius: 50%; background: #081123; display: grid; place-content: center; text-align: center; border: 1px solid var(--vai-border); }
.vai-donut strong { font-size: 2rem; color: white; } .vai-donut span { color: var(--vai-muted); font-size: .75rem; }
.vai-legend, .vai-activity-list, .vai-quick-list, .vai-ranking { display: grid; gap: .75rem; }
.vai-legend > div:not(.vai-progress), .vai-status-row { display: flex; justify-content: space-between; color: #cbd5e1; font-size: .85rem; }
.vai-progress { height: 8px; border-radius: 999px; background: rgba(148, 163, 184, .14); overflow: hidden; }
.vai-progress span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #2563eb, #7c3aed, #10b981); }
.vai-activity { display: grid; grid-template-columns: 42px 1fr auto; gap: .75rem; align-items: center; padding: .75rem; border-radius: .9rem; background: rgba(255, 255, 255, .04); border: 1px solid var(--vai-border); }
.vai-activity-icon { width: 42px; height: 42px; border-radius: .9rem; display: grid; place-items: center; background: rgba(124, 58, 237, .18); }
.vai-activity strong { display: block; color: white; font-size: .86rem; } .vai-activity span, .vai-activity small { color: var(--vai-muted); font-size: .76rem; }
.vai-quick-list a { display: flex; justify-content: space-between; text-decoration: none; color: #e5e7eb; padding: .86rem 1rem; border-radius: .9rem; background: rgba(255, 255, 255, .04); border: 1px solid var(--vai-border); font-weight: 800; }
.vai-quick-list a:hover { background: rgba(124, 58, 237, .16); }
.vai-rings { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; margin-top: 1rem; }
.vai-rings div { aspect-ratio: 1; border-radius: 50%; display: grid; place-content: center; text-align: center; background: radial-gradient(circle at center, #111c33 48%, transparent 50%), conic-gradient(#38bdf8 0 65%, rgba(148, 163, 184, .18) 65%); }
.vai-rings span { color: white; font-weight: 950; } .vai-rings small { color: var(--vai-muted); font-size: .7rem; }
.vai-status-row { display: grid; grid-template-columns: 110px 1fr; gap: .8rem; align-items: center; margin-top: .9rem; }
.vai-ranking div { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: .75rem; color: #cbd5e1; }
.vai-ranking span { color: #fbbf24; font-weight: 950; } .vai-ranking strong { color: #f8fafc; font-size: .86rem; } .vai-ranking small { color: var(--vai-muted); }

@media (max-width: 1100px) {
    .fi-simple-layout:after { display: none; }
    .fi-simple-main { margin: auto !important; }
}
@media (max-width: 1200px) {
    .vai-metrics-grid, .vai-main-grid, .vai-bottom-grid { grid-template-columns: 1fr 1fr; }
    .vai-panel-large { grid-column: 1 / -1; }
    .vai-topbar { display: block; }
    .vai-topbar-actions { justify-content: flex-start; margin-top: 1rem; }
    .vai-ecosystem { grid-template-columns: 1fr; }
    .vai-donut { margin: auto; }
}
@media (max-width: 760px) {
    .vai-enterprise-shell { margin: -1rem; padding: 1rem; }
    .vai-metrics-grid, .vai-main-grid, .vai-bottom-grid { grid-template-columns: 1fr; }
    .vai-search { min-width: 100%; }
    .vai-rings { grid-template-columns: repeat(2, 1fr); }
}
