/* ============================================
   ARISEFLIX - Painel de Controle
   ============================================ */
:root {
    --bg: #0a0b0f;
    --surface: #101218;
    --card: #151821;
    --card-2: #1a1e29;
    --line: rgba(255,255,255,.07);
    --line-2: rgba(255,255,255,.13);
    --text: #eceef4;
    --muted: #8b91a3;
    --dim: #5d6373;
    --red: #e50914;
    --red-soft: rgba(229,9,20,.14);
    --green: #3ddc84;
    --green-soft: rgba(61,220,132,.13);
    --amber: #f5b74f;
    --amber-soft: rgba(245,183,79,.13);
    --blue: #5b9dff;
    --blue-soft: rgba(91,157,255,.13);
    --purple: #a78bfa;
    --purple-soft: rgba(167,139,250,.13);
    --gray-soft: rgba(139,145,163,.14);
    --radius: 14px;
    --side-w: 252px;
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --shadow: 0 20px 60px rgba(0,0,0,.55);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    font-size: 14px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
.muted { color: var(--muted); }
.brand-mark { font-family: 'Bebas Neue', Impact, sans-serif; color: var(--red); letter-spacing: 2.5px; font-size: 1.7rem; line-height: 1; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #262a36; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Botoes ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    border: 1px solid var(--line-2);
    background: var(--card-2);
    color: var(--text);
    padding: .58rem .95rem;
    border-radius: 10px;
    font-size: .86rem; font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, border-color .15s, transform .1s, opacity .15s;
}
.btn:hover { background: #222736; border-color: rgba(255,255,255,.22); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: #f6121d; border-color: #f6121d; }
.btn-success { background: var(--green-soft); border-color: rgba(61,220,132,.3); color: var(--green); }
.btn-success:hover { background: rgba(61,220,132,.22); border-color: rgba(61,220,132,.5); }
.btn-danger { background: var(--red-soft); border-color: rgba(229,9,20,.35); color: #ff6b74; }
.btn-danger:hover { background: rgba(229,9,20,.25); border-color: rgba(229,9,20,.6); }
.btn-ghost { background: transparent; }
.btn-sm { padding: .4rem .65rem; font-size: .8rem; border-radius: 8px; }
.btn-block { width: 100%; padding: .8rem 1rem; font-size: .95rem; }
.icon-btn {
    width: 36px; height: 36px; flex-shrink: 0;
    display: inline-grid; place-items: center;
    border: 1px solid var(--line); border-radius: 10px;
    background: transparent; color: var(--muted);
    cursor: pointer; font-size: 1rem;
    transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover { background: var(--card-2); color: var(--text); border-color: var(--line-2); }
.icon-btn.danger:hover { color: #ff6b74; border-color: rgba(229,9,20,.4); background: var(--red-soft); }
.icon-btn.ok:hover { color: var(--green); border-color: rgba(61,220,132,.4); background: var(--green-soft); }
.spin { display: inline-block; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; position: relative; overflow: hidden; }
.login-glow {
    position: absolute; inset: -30%;
    background:
        radial-gradient(40% 40% at 30% 30%, rgba(229,9,20,.20), transparent 70%),
        radial-gradient(35% 35% at 75% 70%, rgba(91,157,255,.10), transparent 70%);
    filter: blur(20px);
    pointer-events: none;
}
.login-card {
    position: relative;
    width: 100%; max-width: 400px;
    background: rgba(21,24,33,.9);
    border: 1px solid var(--line-2);
    border-radius: 20px;
    padding: 2.25rem 2rem 2rem;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}
.login-card h1 { font-size: 1.3rem; font-weight: 700; margin-top: 1.1rem; }
.login-card p { font-size: .88rem; margin: .3rem 0 1.5rem; }
.login-error { color: #ff7a82; font-size: .84rem; min-height: 1.3rem; margin-bottom: .5rem; }

/* ---------- Campos ---------- */
.fld { display: block; margin-bottom: .95rem; }
.fld > span { display: block; font-size: .78rem; font-weight: 600; color: var(--muted); margin-bottom: .38rem; letter-spacing: .01em; }
.fld small { display: block; color: var(--dim); font-size: .76rem; margin-top: .35rem; line-height: 1.4; }
.inp { position: relative; display: flex; align-items: center; }
.inp > i { position: absolute; left: .85rem; color: var(--dim); pointer-events: none; }
.inp > i + input { padding-left: 2.4rem; }
.inp .suffix { position: absolute; right: .5rem; }
input[type=text], input[type=password], input[type=number], input[type=email], input[type=search], input[type=datetime-local], select, textarea {
    width: 100%;
    background: #0e1016;
    border: 1px solid var(--line-2);
    border-radius: 10px;
    color: var(--text);
    font: 400 .9rem var(--font);
    padding: .68rem .85rem;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238b91a3' viewBox='0 0 16 16'%3E%3Cpath d='M1.6 4.6a.5.5 0 0 1 .8 0L8 10.3l5.6-5.7a.5.5 0 0 1 .8.7l-6 6a.5.5 0 0 1-.8 0l-6-6a.5.5 0 0 1 0-.7z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8rem center; padding-right: 2.2rem; }
input:focus, select:focus, textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(229,9,20,.16); }
input::placeholder, textarea::placeholder { color: var(--dim); }
input[readonly] { color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 1rem; }

/* Switch */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.switch:last-of-type { border-bottom: none; }
.switch b { font-weight: 600; font-size: .9rem; display: block; }
.switch small { color: var(--muted); font-size: .8rem; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 42px; height: 24px; border-radius: 99px; background: #2a2f3d; position: relative; flex-shrink: 0; transition: background .2s; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px rgba(61,220,132,.25); }

/* ---------- Layout ---------- */
.sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: var(--side-w);
    background: var(--surface);
    border-right: 1px solid var(--line);
    display: flex; flex-direction: column;
    z-index: 60;
    transition: transform .25s ease;
}
.side-brand { padding: 1.4rem 1.35rem 1.1rem; }
.side-brand small { display: block; color: var(--dim); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; margin-top: .35rem; }
.side-nav { flex: 1; overflow-y: auto; padding: .25rem .75rem 1rem; }
.side-label { font-size: .66rem; text-transform: uppercase; letter-spacing: .13em; color: var(--dim); font-weight: 700; padding: 1rem .65rem .4rem; }
.side-nav a, .side-foot a {
    display: flex; align-items: center; gap: .75rem;
    padding: .62rem .7rem;
    border-radius: 10px;
    color: var(--muted);
    font-size: .88rem; font-weight: 500;
    position: relative;
    transition: background .15s, color .15s;
}
.side-nav a i, .side-foot a i { font-size: 1.05rem; width: 20px; text-align: center; }
.side-nav a:hover, .side-foot a:hover { background: rgba(255,255,255,.045); color: var(--text); }
.side-nav a.active { background: var(--red-soft); color: #fff; font-weight: 600; }
.side-nav a.active i { color: #ff4d57; }
.side-nav a.active::before { content: ''; position: absolute; left: -.75rem; top: 22%; bottom: 22%; width: 3px; border-radius: 0 3px 3px 0; background: var(--red); }
.nav-badge { margin-left: auto; font-style: normal; font-size: .68rem; font-weight: 700; background: var(--amber); color: #1a1200; padding: .08rem .42rem; border-radius: 99px; }
.side-foot { padding: .75rem; border-top: 1px solid var(--line); }

.main { margin-left: var(--side-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
    position: sticky; top: 0; z-index: 40;
    display: flex; align-items: center; gap: 1rem;
    padding: 1rem 2rem;
    background: rgba(10,11,15,.82);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.top-title { flex: 1; min-width: 0; }
.top-title h1 { font-size: 1.3rem; font-weight: 700; letter-spacing: -.01em; }
.top-title p { color: var(--muted); font-size: .82rem; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; gap: .5rem; align-items: center; }
.admin-chip { display: flex; align-items: center; gap: .6rem; padding-left: 1rem; border-left: 1px solid var(--line); }
.avatar { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, #e50914, #7a0610); display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.who b { display: block; font-size: .84rem; font-weight: 600; line-height: 1.2; }
.who small { color: var(--muted); font-size: .72rem; text-transform: capitalize; }
.page { padding: 1.6rem 2rem 3rem; flex: 1; max-width: 1500px; width: 100%; }
.only-mobile { display: none; }
.scrim { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 55; }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.card-pad { padding: 1.25rem 1.35rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.35rem; border-bottom: 1px solid var(--line); }
.card-head h3 { font-size: .98rem; font-weight: 700; }
.card-head p { color: var(--muted); font-size: .8rem; margin-top: 2px; }
.section-gap { margin-top: 1.25rem; }
.cols { display: grid; gap: 1.25rem; }
.cols-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); gap: 1rem; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; position: relative; overflow: hidden; }
.kpi::after { content: ''; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: var(--tone, transparent); opacity: .5; filter: blur(26px); pointer-events: none; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-label { color: var(--muted); font-size: .8rem; font-weight: 500; }
.kpi-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 1rem; background: var(--tone); color: var(--ink); }
.kpi-val { font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; margin-top: .55rem; font-variant-numeric: tabular-nums; }
.kpi-sub { color: var(--muted); font-size: .78rem; margin-top: .15rem; }
.tone-red { --tone: var(--red-soft); --ink: #ff4d57; }
.tone-green { --tone: var(--green-soft); --ink: var(--green); }
.tone-amber { --tone: var(--amber-soft); --ink: var(--amber); }
.tone-blue { --tone: var(--blue-soft); --ink: var(--blue); }
.tone-purple { --tone: var(--purple-soft); --ink: var(--purple); }

/* Alerta */
.alert { display: flex; align-items: center; gap: .85rem; padding: .9rem 1.1rem; border-radius: 12px; font-size: .88rem; margin-bottom: 1.1rem; border: 1px solid; }
.alert i { font-size: 1.15rem; }
.alert .btn { margin-left: auto; }
.alert-warn { background: var(--amber-soft); border-color: rgba(245,183,79,.3); color: #ffd58a; }
.alert-bad { background: var(--red-soft); border-color: rgba(229,9,20,.35); color: #ff9aa0; }
.alert-ok { background: var(--green-soft); border-color: rgba(61,220,132,.3); color: #9ff0c4; }
.alert-info { background: var(--blue-soft); border-color: rgba(91,157,255,.3); color: #b6d2ff; }

/* Grafico de barras */
.chart { padding: 1.3rem 1.35rem 1rem; }
.chart-plot { position: relative; height: 210px; display: flex; align-items: flex-end; gap: 6px; padding-top: 8px; padding-left: 58px; }
.chart-grid { position: absolute; inset: 8px 0 0 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.chart-grid span { border-top: 1px dashed rgba(255,255,255,.06); height: 0; position: relative; }
.chart-grid span em { position: absolute; left: 0; top: -.5rem; font-style: normal; font-size: .66rem; color: var(--dim); background: var(--card); padding-right: .5rem; font-variant-numeric: tabular-nums; }
.bar-col { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; position: relative; z-index: 1; cursor: default; }
.bar { width: 100%; max-width: 34px; min-height: 3px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #ff3b47, #b3060f); transition: filter .15s, transform .15s; transform-origin: bottom; }
.bar.zero { background: rgba(255,255,255,.08); }
.bar-col:hover .bar { filter: brightness(1.25); }
.bar-tip {
    position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
    background: #262b3a; border: 1px solid var(--line-2); border-radius: 8px;
    padding: .4rem .6rem; font-size: .74rem; white-space: nowrap;
    opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 5;
    box-shadow: 0 8px 20px rgba(0,0,0,.4);
}
.bar-tip b { display: block; font-size: .82rem; }
.bar-col:hover .bar-tip { opacity: 1; }
.chart-x { display: flex; gap: 6px; margin-top: .5rem; padding-left: 58px; }
.chart-x span { flex: 1; text-align: center; font-size: .66rem; color: var(--dim); }
.chart-x span.today { color: var(--text); font-weight: 700; }

/* Lista compacta / progresso */
.list { padding: .35rem 0; }
.list-row { display: flex; align-items: center; gap: .85rem; padding: .7rem 1.35rem; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: none; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .t { font-weight: 600; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .s { color: var(--muted); font-size: .77rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .v { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.list-row.click { cursor: pointer; transition: background .12s; }
.list-row.click:hover { background: rgba(255,255,255,.03); }
.dot-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--tone); color: var(--ink); flex-shrink: 0; }
.progress { height: 6px; background: rgba(255,255,255,.07); border-radius: 99px; overflow: hidden; margin-top: .45rem; }
.progress i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #e50914, #ff5a64); }
.empty { text-align: center; color: var(--muted); padding: 2.75rem 1rem; font-size: .9rem; }
.empty i { display: block; font-size: 2rem; color: var(--dim); margin-bottom: .6rem; }

/* Mini stats */
.mini { display: grid; grid-template-columns: repeat(4, 1fr); }
.mini div { padding: 1.1rem 1.35rem; border-right: 1px solid var(--line); }
.mini div:last-child { border-right: none; }
.mini b { display: block; font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.mini span { color: var(--muted); font-size: .78rem; }

/* ---------- Barra de filtros ---------- */
.toolbar { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chip { border: 1px solid var(--line-2); background: transparent; color: var(--muted); padding: .42rem .8rem; border-radius: 99px; font-size: .8rem; font-weight: 600; cursor: pointer; transition: all .15s; }
.chip:hover { color: var(--text); border-color: rgba(255,255,255,.25); }
.chip.on { background: var(--text); color: #0a0b0f; border-color: var(--text); }
.chip em { font-style: normal; opacity: .7; margin-left: .3rem; }
.search { position: relative; margin-left: auto; width: 280px; max-width: 100%; }
.search i { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--dim); }
.search input { padding-left: 2.3rem; }

/* ---------- Tabelas ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); font-weight: 700; padding: .8rem 1rem; border-bottom: 1px solid var(--line); white-space: nowrap; background: rgba(255,255,255,.015); }
td { padding: .82rem 1rem; border-bottom: 1px solid var(--line); font-size: .86rem; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: rgba(255,255,255,.025); }
tbody tr.click { cursor: pointer; }
th:first-child, td:first-child { padding-left: 1.35rem; }
th:last-child, td:last-child { padding-right: 1.35rem; }
td .t { font-weight: 600; }
td .s { color: var(--muted); font-size: .77rem; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.actions { text-align: right; white-space: nowrap; }
td.actions .icon-btn { width: 32px; height: 32px; font-size: .9rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1.35rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.pager div { display: flex; gap: .4rem; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: .38rem; padding: .22rem .6rem; border-radius: 99px; font-size: .74rem; font-weight: 600; white-space: nowrap; background: var(--tone); color: var(--ink); }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.b-green { --tone: var(--green-soft); --ink: var(--green); }
.b-amber { --tone: var(--amber-soft); --ink: var(--amber); }
.b-red { --tone: var(--red-soft); --ink: #ff6b74; }
.b-blue { --tone: var(--blue-soft); --ink: var(--blue); }
.b-purple { --tone: var(--purple-soft); --ink: var(--purple); }
.b-gray { --tone: var(--gray-soft); --ink: var(--muted); }

/* ---------- Planos ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.1rem; }
.plan {
    background: var(--card); border: 1px solid var(--line); border-radius: 16px;
    padding: 1.35rem; position: relative; display: flex; flex-direction: column;
    transition: border-color .15s, transform .15s;
}
.plan:hover { border-color: var(--line-2); }
.plan.hl { border-color: rgba(229,9,20,.55); background: linear-gradient(180deg, rgba(229,9,20,.07), transparent 45%), var(--card); }
.plan.off { opacity: .55; }
.plan-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.plan-top h4 { font-size: 1.05rem; font-weight: 700; }
.plan-top p { color: var(--muted); font-size: .8rem; margin-top: 2px; }
.plan-price { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; margin-top: .9rem; font-variant-numeric: tabular-nums; }
.plan-price small { font-size: .8rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan-meta { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .65rem; }
.plan-feats { list-style: none; margin: 1rem 0; padding-top: 1rem; border-top: 1px solid var(--line); display: grid; gap: .45rem; flex: 1; }
.plan-feats li { display: flex; gap: .5rem; color: #c9cdd9; font-size: .84rem; }
.plan-feats li i { color: var(--green); }
.plan-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: 1rem; }
.plan-stats div { background: rgba(255,255,255,.035); border-radius: 10px; padding: .6rem .75rem; }
.plan-stats b { display: block; font-size: .98rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.plan-stats span { color: var(--muted); font-size: .72rem; }
.plan-actions { display: flex; gap: .5rem; }
.plan-actions .btn { flex: 1; }
.plan-new { border: 1.5px dashed var(--line-2); background: transparent; border-radius: 16px; min-height: 220px; display: grid; place-items: center; color: var(--muted); cursor: pointer; font-weight: 600; transition: all .15s; }
.plan-new:hover { border-color: var(--red); color: #fff; background: var(--red-soft); }
.plan-new i { display: block; font-size: 1.8rem; margin-bottom: .4rem; text-align: center; }

/* Preview do plano (no modal) */
.plan-editor { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.5rem; }
.preview-box { background: #0d0d10; border: 1px solid var(--line); border-radius: 14px; padding: 1.5rem 1.1rem 1.1rem; position: sticky; top: 0; align-self: start; }
.preview-box > small { display: block; text-align: center; color: var(--dim); font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 1.2rem; }
.pv { position: relative; background: linear-gradient(180deg, #1c1c1f, #151517); border: 1px solid rgba(255,255,255,.09); border-radius: 16px; padding: 1.6rem 1.2rem 1.2rem; }
.pv.hl { border: 2px solid #e50914; background: linear-gradient(180deg, #221316, #171214); }
.pv-badge { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: #e50914; color: #fff; font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .25rem .7rem; border-radius: 99px; white-space: nowrap; }
.pv:not(.hl) .pv-badge { background: #2b2b30; border: 1px solid rgba(255,255,255,.14); }
.pv-name { font-size: .9rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.pv-desc { color: #8c8c8c; font-size: .76rem; margin-top: .2rem; min-height: 1em; }
.pv-price { font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em; margin-top: .8rem; line-height: 1; }
.pv-price small { font-size: .9rem; color: #b3b3b3; font-weight: 600; }
.pv-period { color: #8c8c8c; font-size: .74rem; margin-top: .3rem; }
.pv-feats { list-style: none; margin: .9rem 0; padding-top: .9rem; border-top: 1px solid rgba(255,255,255,.08); display: grid; gap: .45rem; }
.pv-feats li { display: flex; gap: .45rem; font-size: .78rem; color: #d4d4d4; }
.pv-feats i { color: #46d369; }
.pv-cta { text-align: center; padding: .65rem; border-radius: 9px; border: 1px solid rgba(255,255,255,.25); font-weight: 700; font-size: .84rem; }
.pv.hl .pv-cta { background: #e50914; border-color: #e50914; }

/* ---------- Detalhe do pedido ---------- */
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.5rem; }
.kv div { padding: .6rem 0; border-bottom: 1px solid var(--line); min-width: 0; }
.kv div > span { display: block; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.kv b { display: block; font-weight: 600; font-size: .9rem; margin-top: 2px; word-break: break-word; }
.timeline { list-style: none; margin-top: .5rem; }
.timeline li { position: relative; padding: 0 0 1rem 1.5rem; }
.timeline li::before { content: ''; position: absolute; left: 4px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.timeline li::after { content: ''; position: absolute; left: 7.5px; top: 18px; bottom: 0; width: 1px; background: var(--line-2); }
.timeline li:last-child::after { display: none; }
.timeline li.ok::before { background: var(--green); }
.timeline li.bad::before { background: #ff6b74; }
.timeline li.warn::before { background: var(--amber); }
.timeline b { font-size: .84rem; font-weight: 600; }
.timeline p { color: var(--muted); font-size: .8rem; }
.timeline time { color: var(--dim); font-size: .72rem; }
.sub-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); font-weight: 700; margin: 1.4rem 0 .6rem; }

/* ---------- Config ---------- */
.form-card { max-width: 860px; }
.form-foot { display: flex; align-items: center; gap: .75rem; padding: 1rem 1.35rem; border-top: 1px solid var(--line); background: rgba(255,255,255,.015); border-radius: 0 0 var(--radius) var(--radius); }
.copy-row { display: flex; gap: .5rem; }
.copy-row input { flex: 1; }
.gw-status { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-top: 1rem; }
.gw-status div { background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: 12px; padding: .8rem .9rem; }
.gw-status span { display: block; color: var(--muted); font-size: .72rem; }
.gw-status b { display: block; font-size: 1.1rem; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.import-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; }
.import-btn { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; padding: 1rem; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card-2); color: var(--text); cursor: pointer; text-align: left; transition: all .15s; }
.import-btn:hover { border-color: rgba(255,255,255,.28); background: #222736; }
.import-btn.primary { background: var(--red); border-color: var(--red); }
.import-btn.primary:hover { background: #f6121d; }
.import-btn i { font-size: 1.3rem; }
.import-btn b { font-size: .9rem; }
.import-btn span { font-size: .75rem; opacity: .75; }
.import-btn:disabled { opacity: .5; cursor: wait; }
.import-btn[data-locked] { cursor: not-allowed; opacity: .38; }

/* ---------- Modal ---------- */
.modal-ov { position: fixed; inset: 0; z-index: 200; display: none; align-items: flex-start; justify-content: center; background: rgba(0,0,0,.7); backdrop-filter: blur(4px); padding: 5vh 16px; overflow-y: auto; }
.modal-ov.open { display: flex; }
.modal { width: 100%; max-width: 520px; background: var(--card); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: var(--shadow); animation: pop .18s ease; }
.modal.wide { max-width: 860px; }
.modal.mid { max-width: 660px; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.35rem; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 1.05rem; font-weight: 700; }
.modal-body { padding: 1.35rem; }
.modal-foot { display: flex; justify-content: flex-end; gap: .6rem; padding: 1rem 1.35rem; border-top: 1px solid var(--line); flex-wrap: wrap; }
.modal-foot:empty { display: none; }
.modal-foot .left { margin-right: auto; }
.confirm-text { color: #c9cdd9; font-size: .92rem; line-height: 1.55; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 400; display: grid; gap: .6rem; max-width: calc(100vw - 40px); }
.toast { display: flex; align-items: center; gap: .65rem; background: #232836; border: 1px solid var(--line-2); border-left: 3px solid var(--green); border-radius: 12px; padding: .8rem 1rem; font-size: .88rem; box-shadow: var(--shadow); animation: toastIn .2s ease; min-width: 240px; }
.toast.bad { border-left-color: #ff6b74; }
.toast.bad i { color: #ff6b74; }
.toast i { color: var(--green); font-size: 1.05rem; }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* Skeleton */
.sk { border-radius: 10px; background: linear-gradient(90deg, rgba(255,255,255,.04) 25%, rgba(255,255,255,.09) 50%, rgba(255,255,255,.04) 75%); background-size: 200% 100%; animation: sk 1.2s infinite linear; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) {
    .cols-2-1, .cols-2 { grid-template-columns: 1fr; }
    .plan-editor { grid-template-columns: 1fr; }
    .preview-box { position: static; }
}
@media (max-width: 860px) {
    .sidebar { transform: translateX(-100%); box-shadow: var(--shadow); }
    .app.menu-open .sidebar { transform: none; }
    .app.menu-open .scrim { display: block; }
    .main { margin-left: 0; }
    .only-mobile { display: inline-grid; }
    .topbar { padding: .8rem 1rem; }
    .top-title h1 { font-size: 1.1rem; }
    .who { display: none; }
    .admin-chip { padding-left: .6rem; }
    .page { padding: 1.1rem 1rem 2.5rem; }
    .mini { grid-template-columns: 1fr 1fr; }
    .mini div:nth-child(2) { border-right: none; }
    .mini div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
    .search { width: 100%; margin-left: 0; }
    .grid-2, .grid-3, .kv { grid-template-columns: 1fr; }
    .gw-status { grid-template-columns: 1fr; }
    .top-actions .btn span { display: none; }
    input[type=text], input[type=password], input[type=number], input[type=email], input[type=search], select, textarea { font-size: 16px; }
    .kpis { grid-template-columns: 1fr 1fr; gap: .7rem; }
    .kpi { padding: .9rem; }
    .kpi-val { font-size: 1.3rem; }
    .chart-x span:nth-child(even) { visibility: hidden; }
    .modal-ov { padding: 12px; }
    .table-wrap table { min-width: 680px; }
    td .t, td .s { white-space: nowrap; }
}
