/* AJLT Networking - Sistema de Protocolos v2.0 */

:root {
  --brand-900: #0b1f33;
  --brand-800: #0f2a44;
  --brand-700: #16395c;
  --primary: #0e8a86;
  --primary-600: #0b7672;
  --primary-50: #e6f4f3;
  --accent: #f2a93b;

  --bg: #f3f6f9;
  --surface: #ffffff;
  --surface-2: #f7f9fb;
  --border: #e2e8ef;
  --text: #13253a;
  --text-2: #4b5d72;
  --muted: #6b7c90;

  --success: #15803d; --success-bg: #e8f6ee;
  --warning: #b45309; --warning-bg: #fdf3e3;
  --danger: #c0262d;  --danger-bg: #fdecec;
  --info: #1d5fa8;    --info-bg: #e9f1fb;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(16, 37, 58, .05), 0 6px 22px rgba(16, 37, 58, .06);
  --shadow-lg: 0 18px 50px rgba(11, 31, 51, .18);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Consolas, monospace;
  --sidebar-w: 264px;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0a1420;
  --surface: #101c2a;
  --surface-2: #142334;
  --border: #22344a;
  --text: #e6edf5;
  --text-2: #b4c2d2;
  --muted: #8899ad;
  --primary: #22b3ad;
  --primary-600: #1c9a95;
  --primary-50: #0f2e33;
  --success: #4ade80; --success-bg: #0f2a1c;
  --warning: #fbbf24; --warning-bg: #2d2210;
  --danger: #f87171;  --danger-bg: #2f1517;
  --info: #7cb4f5;    --info-bg: #11233a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.55 var(--font); color: var(--text); background: var(--bg); }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--primary-600); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; }
p { margin: 0 0 .9rem; }
code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); border: 1px solid var(--border); padding: .05rem .35rem; border-radius: 6px; }
.mono { font-family: var(--mono); letter-spacing: .02em; }
.upper { text-transform: uppercase; }
.muted { color: var(--muted); }
small { font-size: .84em; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 2px; }

.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.icon-xl { width: 46px; height: 46px; stroke-width: 1.6; }
html[data-theme="dark"] .only-light, html:not([data-theme="dark"]) .only-dark { display: none; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: .5rem 1rem; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- Botões e campos ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border: 1px solid transparent; border-radius: var(--radius-sm); padding: .62rem 1.1rem; font: 600 .95rem/1.2 var(--font); cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, transform .05s, box-shadow .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.08), 0 4px 14px color-mix(in srgb, var(--primary) 30%, transparent); }
.btn-primary:hover { background: var(--primary-600); color: #fff; }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-link { background: none; border: 0; color: var(--muted); padding: .4rem 0; cursor: pointer; font: inherit; }
.btn-link:hover { color: var(--primary); }
.btn-lg { padding: .8rem 1.3rem; font-size: 1rem; }
.btn-sm { padding: .4rem .75rem; font-size: .85rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.loading { opacity: .6; pointer-events: none; }

.form { display: grid; gap: 1rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.1rem; }
.span-2 { grid-column: 1 / -1; }
.field { display: grid; gap: .35rem; font-weight: 600; font-size: .9rem; color: var(--text-2); }
.field small { font-weight: 400; color: var(--muted); }
input, select, textarea { width: 100%; font: 400 .97rem/1.4 var(--font); color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .68rem .8rem; transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent); }
input[disabled] { background: var(--surface-2); color: var(--muted); }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); }
.check { display: flex; align-items: center; gap: .55rem; font-size: .93rem; color: var(--text); margin: .25rem 0; }
.input-icon { position: relative; display: block; }
.input-icon > .icon { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon > input { padding-left: 2.5rem; }
.reveal-btn { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); cursor: pointer; padding: .4rem; border-radius: 6px; }
.reveal-btn:hover { color: var(--primary); }
.form-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: flex-end; }
.box { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .9rem 1rem 1rem; margin: 0; }
.box legend { font-weight: 700; font-size: .88rem; padding: 0 .4rem; color: var(--text-2); }
.otp-input { font-size: 1.6rem; letter-spacing: .35em; text-align: center; font-weight: 700; padding: .7rem; }
.strength { height: 5px; border-radius: 99px; background: var(--border); overflow: hidden; margin-top: .2rem; }
.strength > i { display: block; height: 100%; width: 0; transition: width .25s, background .25s; }
.strength-label { font-weight: 500; font-size: .8rem; }

/* ---------- Alertas e badges ---------- */
.alert { display: flex; gap: .65rem; align-items: flex-start; padding: .8rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; border: 1px solid transparent; font-size: .93rem; }
.alert > .icon { margin-top: 2px; }
.alert > span { flex: 1; }
.alert-success { background: var(--success-bg); color: var(--success); border-color: color-mix(in srgb, var(--success) 25%, transparent); }
.alert-error { background: var(--danger-bg); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.alert-warning { background: var(--warning-bg); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 25%, transparent); }
.alert-info { background: var(--info-bg); color: var(--info); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.alert-close { background: none; border: 0; color: inherit; cursor: pointer; opacity: .7; padding: 0; }
.alert-close:hover { opacity: 1; }
.badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 700; padding: .25rem .6rem; border-radius: 99px; }
.badge .icon { width: 14px; height: 14px; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin-right: .5rem; }
.dot-ok { background: var(--success); } .dot-fail { background: var(--danger); } .dot-warn { background: var(--warning); }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.35rem 1.4rem; box-shadow: var(--shadow); margin-bottom: 1.25rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.card-head h2 { display: flex; align-items: center; gap: .5rem; margin: 0; font-size: 1.05rem; }
.card-head h2 .icon { color: var(--primary); }
.narrow { max-width: 640px; }
.grid-2-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; align-items: start; }
.grid-2-cols > .card { margin-bottom: 0; }

.checklist { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .55rem; }
.checklist li { display: flex; gap: .75rem; align-items: flex-start; padding: .6rem .75rem; border-radius: var(--radius-sm); background: var(--surface-2); }
.checklist li small { display: block; color: var(--muted); }
.check-dot { flex: none; width: 20px; height: 20px; border-radius: 50%; margin-top: 2px; display: grid; place-items: center; }
.checklist .ok .check-dot { background: var(--success); }
.checklist .ok .check-dot::after { content: ""; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.checklist .warn .check-dot { background: var(--warning); }
.checklist .fail .check-dot { background: var(--danger); }
.checklist .warn .check-dot::after, .checklist .fail .check-dot::after { content: "!"; color: #fff; font-weight: 800; font-size: .75rem; }

/* ---------- Layout do app ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: linear-gradient(180deg, var(--brand-800), var(--brand-900)); color: #d7e3ef; display: flex; flex-direction: column; padding: 1.3rem 1rem; z-index: 40; transition: transform .25s ease; }
.brand { display: flex; align-items: center; gap: .75rem; padding: .2rem .5rem 1.4rem; }
.brand strong { display: block; color: #fff; font-size: 1rem; line-height: 1.2; }
.brand span { display: block; font-size: .78rem; color: #9fb4c9; }
.nav { display: grid; gap: .2rem; overflow-y: auto; }
.nav a, .nav .disabled { display: flex; align-items: center; gap: .75rem; padding: .65rem .8rem; border-radius: 10px; color: #c9d7e5; text-decoration: none; font-weight: 500; font-size: .94rem; }
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a.active { background: rgba(34, 179, 173, .18); color: #fff; box-shadow: inset 3px 0 0 #22b3ad; }
.nav a.active .icon { color: #5fd6d0; }
.nav .disabled { opacity: .45; cursor: not-allowed; }
.nav .disabled em { margin-left: auto; white-space: nowrap; font-style: normal; font-size: .68rem; border: 1px solid rgba(255,255,255,.25); border-radius: 99px; padding: 0 .45rem; }
.nav-section { margin: 1.1rem .8rem .35rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: #7f98b1; font-weight: 700; }
.sidebar-foot { margin-top: auto; padding: .8rem .8rem 0; font-size: .75rem; color: #7f98b1; }
.sidebar-backdrop { display: none; }

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 1rem; padding: .9rem 2rem; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.topbar-title { flex: 1; min-width: 0; }
.topbar-title small { display: block; color: var(--primary); font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; }
.topbar-title h1 { font-size: 1.35rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: .4rem; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; }
.icon-btn:hover:not([disabled]) { color: var(--primary); border-color: var(--primary); }
.icon-btn[disabled] { opacity: .5; cursor: not-allowed; }
.menu-btn { display: none; }

.user-menu { position: relative; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: .6rem; cursor: pointer; padding: .25rem .5rem .25rem .25rem; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.user-menu summary::-webkit-details-marker { display: none; }
.user-meta { display: grid; line-height: 1.15; }
.user-meta strong { font-size: .9rem; }
.user-meta small { color: var(--muted); font-size: .75rem; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--primary), #1d5fa8); color: #fff; font-weight: 800; font-size: .8rem; letter-spacing: .02em; }
.avatar-lg { width: 64px; height: 64px; border-radius: 18px; font-size: 1.3rem; }
.menu-pop { position: absolute; right: 0; top: calc(100% + .5rem); min-width: 240px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: .4rem; z-index: 50; }
.menu-head { padding: .6rem .7rem .7rem; border-bottom: 1px solid var(--border); margin-bottom: .3rem; }
.menu-head strong, .menu-head small { display: block; }
.menu-head small { color: var(--muted); }
.menu-pop a, .menu-pop button { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .55rem .7rem; border-radius: 8px; color: var(--text); text-decoration: none; background: none; border: 0; font: inherit; font-size: .92rem; cursor: pointer; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--surface-2); color: var(--primary); }

.content { flex: 1; padding: 1.75rem 2rem 2rem; max-width: 1280px; width: 100%; }
.content:focus { outline: none; }
.footer { padding: 1rem 2rem 1.5rem; color: var(--muted); font-size: .8rem; }

/* ---------- Painel ---------- */
.hero-card { display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; background: radial-gradient(120% 140% at 100% 0%, #15507a 0%, var(--brand-800) 45%, var(--brand-900) 100%); color: #e4eef8; border-radius: var(--radius); padding: 1.7rem 1.8rem; margin-bottom: 1.25rem; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.hero-card::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(34,179,173,.35), transparent 65%); }
.hero-card h2 { color: #fff; font-size: 1.45rem; }
.hero-card p { color: #b8cbe0; margin: 0; max-width: 560px; }
.eyebrow { color: #7fdcd6 !important; font-weight: 700; font-size: .85rem; margin-bottom: .3rem !important; }
.hero-card-protocol { position: relative; z-index: 1; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.15); border-radius: 12px; padding: .9rem 1.1rem; display: grid; gap: .2rem; min-width: 280px; }
.hero-card-protocol small { color: #9fb4c9; text-transform: uppercase; letter-spacing: .12em; font-size: .68rem; font-weight: 700; }
.hero-card-protocol strong { color: #fff; font-size: 1.12rem; }
.hero-card-protocol span { color: #9fb4c9; font-size: .78rem; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat { display: flex; gap: .9rem; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.05rem 1.1rem; box-shadow: var(--shadow); }
.stat small { display: block; color: var(--muted); font-size: .82rem; }
.stat strong { font-size: 1.6rem; line-height: 1.1; }
.stat-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--primary-50); color: var(--primary); }
.stat-icon .icon { width: 22px; height: 22px; }

.roadmap { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; counter-reset: r; }
.roadmap li { display: flex; gap: .75rem; align-items: center; color: var(--text-2); font-size: .92rem; }
.roadmap li span { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--border); font-weight: 700; font-size: .8rem; color: var(--muted); }
.roadmap li.done { color: var(--text); font-weight: 600; }
.roadmap li.done span { background: var(--success); border-color: var(--success); color: #fff; }

/* ---------- Perfil ---------- */
.profile-head { display: flex; align-items: center; gap: 1.1rem; }
.profile-head h2 { margin: 0; font-size: 1.25rem; }
.profile-head p { margin: 0; }
.profile-badges { margin-left: auto; }
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--border); margin-bottom: 1.25rem; overflow-x: auto; }
.tabs a { padding: .7rem 1rem; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--primary); border-bottom-color: var(--primary); }
.setup-steps { padding-left: 1.2rem; margin: 0 0 1rem; display: grid; gap: .35rem; color: var(--text-2); }
.qr-wrap { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; padding: 1rem; background: var(--surface-2); border-radius: var(--radius-sm); margin-bottom: 1rem; }
.qr { background: #fff; padding: 10px; border-radius: 10px; line-height: 0; border: 1px solid var(--border); }
.qr img, .qr svg { display: block; width: 184px; height: 184px; }
.secret { font-size: 1.05rem; font-weight: 700; word-break: break-all; margin: .2rem 0 .5rem; }
.inline-form { grid-template-columns: 1fr auto; align-items: end; }
.recovery { border: 1px dashed var(--warning); background: var(--warning-bg); border-radius: var(--radius-sm); padding: 1rem; margin-bottom: 1rem; }
.codes { columns: 2; padding-left: 1.4rem; margin: .4rem 0 .8rem; font-size: 1.02rem; font-weight: 700; }
.sub-action { border-top: 1px solid var(--border); padding-top: .8rem; margin-top: .8rem; }
.sub-action summary { cursor: pointer; font-weight: 600; color: var(--text-2); }
.sub-action form { margin-top: .9rem; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: .65rem .75rem; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.table td { padding: .7rem .75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.truncate { max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 2rem !important; }
.empty-state { text-align: center; padding: 4rem 1rem; display: grid; justify-items: center; gap: .4rem; }
.empty-state .icon { color: var(--primary); margin-bottom: .5rem; }

/* ---------- Login ---------- */
.auth { background: var(--bg); }
.auth-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.auth-hero { position: relative; overflow: hidden; background: radial-gradient(90% 80% at 15% 10%, #1a5f86 0%, transparent 60%), radial-gradient(70% 70% at 100% 100%, rgba(34,179,173,.4) 0%, transparent 60%), linear-gradient(160deg, var(--brand-800), var(--brand-900)); color: #dce8f4; display: flex; align-items: center; padding: 3rem; }
.auth-hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px); background-size: 38px 38px; mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); }
.hero-inner { position: relative; max-width: 520px; margin: 0 auto; }
.hero-brand { display: flex; align-items: center; gap: .9rem; margin-bottom: 2.6rem; }
.hero-brand strong { display: block; color: #fff; font-size: 1.15rem; }
.hero-brand span { color: #9fb4c9; font-size: .85rem; }
.auth-hero h2 { font-size: 2.25rem; color: #fff; line-height: 1.15; letter-spacing: -.02em; margin-bottom: 1rem; }
.auth-hero p { color: #b6c9dc; font-size: 1.05rem; max-width: 440px; }
.hero-points { list-style: none; padding: 0; margin: 1.8rem 0 2.2rem; display: grid; gap: .7rem; }
.hero-points li { display: flex; gap: .7rem; align-items: center; color: #d2e0ee; }
.hero-points .icon { color: #5fd6d0; }
.hero-protocol { display: inline-block; padding: .7rem 1rem; border-radius: 10px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); color: #fff; font-weight: 700; font-size: 1.05rem; }
.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2.5rem 1.5rem 1.5rem; }
.auth-box { width: 100%; max-width: 400px; }
.auth-logo { display: block; max-width: 280px; max-height: 112px; margin: 0 auto 1.8rem; object-fit: contain; }
.auth-title { font-size: 1.65rem; margin-bottom: .3rem; }
.auth-box .form { margin-top: 1.5rem; }
.auth-help { display: flex; align-items: center; gap: .45rem; justify-content: center; margin-top: 1.4rem; font-size: .88rem; }
.auth-foot { margin-top: auto; padding-top: 2rem; font-size: .8rem; }
.auth-icon { width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); margin-bottom: 1.2rem; }
.hint { margin-top: 1.2rem; font-size: .9rem; color: var(--text-2); }
.hint summary { cursor: pointer; font-weight: 600; color: var(--primary); }
.hint p { margin-top: .5rem; }

/* ---------- Instalador ---------- */
.installer { background: radial-gradient(80% 60% at 50% 0%, color-mix(in srgb, var(--primary) 14%, var(--bg)), var(--bg)); min-height: 100vh; }
.installer-wrap { max-width: 760px; margin: 0 auto; padding: 2.5rem 1.2rem; }
.installer-brand { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.8rem; }
.installer-brand strong { display: block; font-size: 1.15rem; }
.installer-brand span { color: var(--muted); font-size: .85rem; }
.stepper { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; grid-template-columns: repeat(6, 1fr); gap: .4rem; }
.stepper li { display: grid; justify-items: center; gap: .3rem; text-align: center; position: relative; }
.stepper li span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--border); background: var(--surface); font-weight: 700; font-size: .85rem; color: var(--muted); position: relative; z-index: 1; }
.stepper li:not(:last-child)::after { content: ""; position: absolute; top: 16px; left: calc(50% + 18px); right: calc(-50% + 18px); height: 2px; background: var(--border); }
.stepper li em { font-style: normal; font-size: .75rem; color: var(--muted); font-weight: 600; }
.stepper .done span { background: var(--primary); border-color: var(--primary); color: #fff; }
.stepper .done:not(:last-child)::after { background: var(--primary); }
.stepper .current span { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); }
.stepper .current em { color: var(--text); }
.installer-card { padding: 1.8rem; }
.installer-card h2 { font-size: 1.35rem; }
.steps-help { padding-left: 1.3rem; display: grid; gap: .3rem; color: var(--text-2); margin-bottom: 1.2rem; }
.preview { margin: .9rem 0 0; padding: .8rem 1rem; background: var(--surface-2); border-radius: var(--radius-sm); }
.preview strong { font-size: 1.15rem; color: var(--primary); }
.back-form { margin-top: .6rem; }
.installer-foot { text-align: center; font-size: .8rem; margin-top: 1.5rem; }
.done-icon { color: var(--success); margin-bottom: .6rem; }

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2-cols { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  body.sidebar-open .sidebar { transform: none; }
  body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(5, 15, 25, .5); z-index: 35; }
  .main { margin-left: 0; }
  .menu-btn { display: grid; }
  .topbar { padding: .75rem 1rem; }
  .content { padding: 1.25rem 1rem 1.5rem; }
  .user-meta { display: none; }
  .hero-card { flex-direction: column; align-items: stretch; }
  .hero-card-protocol { min-width: 0; }
  .auth-grid { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
}
@media (max-width: 620px) {
  .grid-2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: .7rem; }
  .stat { padding: .85rem; }
  .stat-icon { display: none; }
  .topbar-title h1 { font-size: 1.12rem; }
  .profile-head { flex-wrap: wrap; }
  .profile-badges { margin-left: 0; }
  .stepper em { display: none; }
  .codes { columns: 1; }
  .inline-form { grid-template-columns: 1fr; }
  .installer-card { padding: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print { .sidebar, .topbar, .footer { display: none; } .main { margin: 0; } }
