:root {
  color-scheme: light;
  --ink: #102a36;
  --ink-soft: #48616c;
  --brand: #123c4a;
  --brand-deep: #0b2d38;
  --accent: #20a487;
  --accent-soft: #dff5ee;
  --surface: #ffffff;
  --canvas: #f3f6f5;
  --line: #dbe4e3;
  --danger: #b43a45;
  --danger-soft: #fff0f1;
  --shadow: 0 24px 70px rgba(13, 48, 59, .13);
  --radius: 18px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--ink); background: var(--canvas); }
button, input, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--ink-soft); }
.eyebrow { margin: 0 0 12px; color: var(--accent); font-size: .74rem; font-weight: 800; letter-spacing: .16em; }

.auth-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 1.06fr) minmax(480px, .94fr); }
.auth-brand { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: clamp(54px, 8vw, 120px); color: #fff; background: var(--brand-deep); }
.auth-brand::before, .auth-brand::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.08); }
.auth-brand::before { width: 520px; height: 520px; right: -260px; top: -180px; box-shadow: 0 0 0 80px rgba(255,255,255,.018), 0 0 0 160px rgba(255,255,255,.014); }
.auth-brand::after { width: 260px; height: 260px; left: -120px; bottom: -100px; background: rgba(32,164,135,.08); }
.auth-brand > * { position: relative; z-index: 1; }
.auth-brand h1 { max-width: 740px; margin: 0; font-size: clamp(2.7rem, 5vw, 5.4rem); line-height: 1.02; letter-spacing: -.055em; }
.auth-brand .eyebrow { margin-top: 56px; }
.brand-copy { max-width: 610px; margin: 30px 0 0; color: #b9cbd0; font-size: 1.08rem; line-height: 1.72; }
.product-logo { display: inline-flex; align-items: center; gap: 10px; width: fit-content; padding: 9px 12px; border: 1px solid rgba(16,42,54,.1); border-radius: 11px; background: #fff; box-shadow: 0 5px 18px rgba(7,31,43,.08); }
.product-logo img { display: block; width: 132px; height: auto; }
.product-logo > span { padding-left: 10px; border-left: 1px solid #dce5e7; color: #102542; font-size: .72rem; font-weight: 850; letter-spacing: .075em; text-transform: uppercase; }
.product-logo.hero { padding: 12px 15px; border-radius: 14px; box-shadow: 0 12px 34px rgba(0,0,0,.16); }
.product-logo.hero img { width: 178px; }
.product-logo.hero > span { font-size: .82rem; }
.product-logo.compact { padding: 7px 9px; box-shadow: none; }
.product-logo.compact img { width: 112px; }
.product-logo.compact > span { padding-left: 8px; font-size: .62rem; }
.product-logo.sidebar-logo { padding: 7px 9px; border-color: rgba(255,255,255,.08); box-shadow: none; }
.product-logo.sidebar-logo img { width: 108px; }
.product-logo.sidebar-logo > span { padding-left: 8px; font-size: .6rem; }
.trust-row { display: flex; gap: 26px; margin-top: 54px; color: #9fb6bc; font-size: .85rem; }
.trust-row span { display: flex; align-items: center; gap: 9px; }
.trust-row i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(32,164,135,.12); }

.auth-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px; background: linear-gradient(145deg, #f8faf9 0%, #eef3f2 100%); }
.auth-card { width: min(100%, 480px); padding: 48px; border: 1px solid rgba(219,228,227,.9); border-radius: 24px; background: rgba(255,255,255,.94); box-shadow: var(--shadow); }
.auth-card h2 { margin: 0; font-size: 2rem; letter-spacing: -.035em; }
.auth-card > .muted { margin: 11px 0 32px; line-height: 1.55; }
.mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 36px; color: var(--brand); font-weight: 800; }
.form-stack { display: grid; gap: 20px; }
.field { display: grid; gap: 8px; color: #294550; font-size: .86rem; font-weight: 700; }
.field input, .field select { width: 100%; height: 50px; padding: 0 15px; border: 1px solid #ccd9d8; border-radius: 11px; outline: none; background: #fbfcfc; color: var(--ink); transition: border .2s, box-shadow .2s, background .2s; }
.field input::placeholder { color: #91a2a8; }
.field input:focus, .field select:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px rgba(32,164,135,.12); }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 78px; }
.text-button { padding: 0; border: 0; background: transparent; color: #147d6a; font-size: .82rem; font-weight: 750; }
.text-button:hover { color: var(--brand); text-decoration: underline; }
.password-toggle { position: absolute; right: 14px; top: 17px; }
.primary-button { min-height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 19px; border: 0; border-radius: 11px; background: var(--brand); color: #fff; font-weight: 780; box-shadow: 0 10px 24px rgba(18,60,74,.2); transition: transform .15s, background .15s; }
.primary-button:hover { background: #174e5e; transform: translateY(-1px); }
.primary-button:disabled { cursor: wait; opacity: .65; transform: none; }
.form-message { margin: -4px 0 0; padding: 11px 13px; border: 1px solid #f4c7cc; border-radius: 9px; background: var(--danger-soft); color: var(--danger); font-size: .84rem; line-height: 1.45; }
.security-note { margin: 26px 0 0; padding-top: 22px; border-top: 1px solid var(--line); color: #71868d; font-size: .77rem; line-height: 1.45; }
.security-note span { margin-right: 7px; color: var(--accent); }
.legal { max-width: 470px; margin: 22px 0 0; color: #839399; font-size: .72rem; line-height: 1.5; text-align: center; }

@media (max-width: 900px) {
  .auth-layout { display: block; }
  .auth-brand { display: none; }
  .auth-panel { min-height: 100vh; padding: 28px 20px; }
  .mobile-brand { display: flex; }
}

@media (max-width: 520px) {
  .auth-card { padding: 32px 24px; border-radius: 18px; }
  .auth-card h2 { font-size: 1.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Fluxos de primeiro acesso */
.auth-step-page { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: radial-gradient(circle at 15% 10%, #e0f2ec, transparent 32%), var(--canvas); }
.auth-step-card { width: min(100%, 520px); padding: 46px; border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: var(--shadow); }
.auth-step-card h2 { margin: 0; font-size: 2rem; letter-spacing: -.035em; }
.auth-step-card > .muted { margin: 10px 0 28px; line-height: 1.6; }
.mobile-brand.always { display: flex; margin-bottom: 34px; }
.password-hint { margin: -8px 0 0; color: #71868d; font-size: .77rem; line-height: 1.5; }
.mfa-intro { display: grid; grid-template-columns: 70px 1fr; gap: 22px; align-items: center; margin: 28px 0; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #f8faf9; }
.mfa-icon { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 18px; background: var(--brand); color: #fff; font-size: 1.55rem; font-weight: 850; box-shadow: 0 10px 25px rgba(18,60,74,.2); }
.mfa-intro ol { margin: 0; padding-left: 20px; color: var(--ink-soft); font-size: .87rem; line-height: 1.9; }
.qr-code-box { display: grid; justify-items: center; gap: 11px; margin: 25px 0 14px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: #fff; text-align: center; }
.qr-code-box > span { color: var(--ink); font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.qr-code-box img { width: min(232px, 100%); height: auto; aspect-ratio: 1; padding: 8px; border-radius: 10px; background: #fff; image-rendering: pixelated; }
.qr-code-box small { max-width: 330px; color: var(--ink-soft); font-size: .75rem; line-height: 1.45; }
.secret-box, .temporary-password { display: grid; gap: 10px; margin: 25px 0; padding: 20px; border: 1px dashed #9bb9b4; border-radius: 14px; background: #f4faf8; text-align: center; }
.secret-box.manual-secret { margin-top: 14px; }
.secret-box span, .temporary-password span { color: var(--ink-soft); font-size: .76rem; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.secret-box strong, .temporary-password code { overflow-wrap: anywhere; color: var(--brand); font-size: 1.08rem; letter-spacing: .12em; }
.compact-top { margin-top: 22px; }
.recovery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 24px 0 16px; }
.recovery-grid code { padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: #f7f9f9; color: var(--ink); text-align: center; font-size: .82rem; }
.warning-note { margin: 14px 0; padding: 11px 13px; border-radius: 9px; background: #fff8e6; color: #89620a; font-size: .8rem; line-height: 1.5; }
.top-gap { margin-top: 14px; }
.full { width: 100%; }
.secondary-button { min-height: 46px; padding: 0 17px; border: 1px solid #cbd9d7; border-radius: 10px; background: #fff; color: var(--brand); font-weight: 750; }
.secondary-button:hover { border-color: #91afa9; background: #f6faf9; }
.secondary-button.compact { min-height: 36px; padding: 0 12px; font-size: .78rem; }

/* Estrutura do portal */
.portal-shell { min-height: 100vh; background: #f3f6f5; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: 260px; display: flex; flex-direction: column; padding: 26px 18px 20px; background: var(--brand-deep); color: #fff; }
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 30px; font-size: 1.05rem; font-weight: 820; }
.sidebar-brand .icon-button { margin-left: auto; color: #fff; }
.nav-label { margin: 5px 12px 10px; color: #66858e; font-size: .64rem; font-weight: 800; letter-spacing: .16em; }
.sidebar nav { display: grid; gap: 6px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 13px; border: 0; border-radius: 10px; background: transparent; color: #a9bec4; font-size: .87rem; font-weight: 680; text-align: left; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: rgba(32,164,135,.16); color: #fff; box-shadow: inset 3px 0 var(--accent); }
.nav-icon { width: 22px; color: #75959d; font-size: 1.1rem; text-align: center; }
.nav-item.active .nav-icon { color: #4ed2b4; }
.sidebar-footer { margin-top: auto; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.08); }
.security-pill { display: flex; align-items: center; gap: 12px; padding: 11px; color: #c2d1d5; }
.security-pill > span { width: 9px; height: 9px; border-radius: 50%; background: #43c5a5; box-shadow: 0 0 0 5px rgba(67,197,165,.1); }
.security-pill div { display: grid; gap: 2px; }
.security-pill strong { font-size: .76rem; }
.security-pill small { color: #6f8d94; font-size: .66rem; }
.sidebar-backdrop { display: none; }
.portal-main { min-height: 100vh; margin-left: 260px; }
.topbar { height: 78px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(24px, 4vw, 54px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.88); backdrop-filter: blur(14px); }
.topbar > div:first-of-type { display: grid; gap: 2px; }
.topbar p { margin: 0; color: var(--ink-soft); font-size: .72rem; }
.topbar > div > strong { font-size: .82rem; }
.topbar-actions { position: relative; display: flex; align-items: center; gap: 14px; }
.notification-button, .icon-button { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: #668087; }
.notification-button { color: var(--accent); font-size: .7rem; }
.notification-button:hover, .icon-button:hover { background: #edf3f1; }
.topbar-divider { width: 1px; height: 30px; background: var(--line); }
.profile-button { display: flex; align-items: center; gap: 10px; padding: 4px; border: 0; background: transparent; color: var(--ink); text-align: left; }
.profile-button > span:nth-child(2) { display: grid; min-width: 145px; gap: 2px; }
.profile-button strong { font-size: .79rem; }
.profile-button small { color: #71868d; font-size: .67rem; }
.profile-button b { color: #81959a; font-size: .7rem; }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 11px; background: var(--accent-soft); color: #11735f; font-size: .73rem; font-weight: 850; }
.profile-menu { position: absolute; z-index: 30; top: 54px; right: 0; width: 230px; display: grid; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 16px 45px rgba(16,42,54,.16); }
.profile-menu strong { font-size: .82rem; }
.profile-menu small { color: var(--ink-soft); font-size: .72rem; overflow-wrap: anywhere; }
.profile-menu button { margin-top: 8px; padding: 10px; border: 0; border-radius: 8px; background: #f5f8f7; color: var(--danger); font-size: .78rem; font-weight: 750; text-align: left; }
.page-content { max-width: 1600px; margin: 0 auto; padding: 42px clamp(24px, 4vw, 54px) 64px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.page-heading h1 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.5rem); letter-spacing: -.045em; }
.page-heading > div > p:last-child { margin: 8px 0 0; color: var(--ink-soft); font-size: .91rem; }
.heading-actions { display: flex; align-items: end; gap: 10px; }
.identity-button { min-height: 42px; display: flex; align-items: center; gap: 11px; white-space: nowrap; }
.identity-button span:last-child { padding-left: 11px; border-left: 1px solid var(--line); color: var(--accent); font-size: .67rem; }
.primary-button.fit { width: auto; min-width: 148px; gap: 24px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; margin-bottom: 22px; }
.metric-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-card { min-height: 176px; display: flex; flex-direction: column; padding: 21px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 5px 22px rgba(18,60,74,.035); }
.metric-icon { width: 38px; height: 38px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 11px; font-size: .95rem; font-weight: 800; }
.metric-icon.teal { background: #dff5ee; color: #13816b; }
.metric-icon.blue { background: #e6f0f7; color: #326b8a; }
.metric-icon.amber { background: #fff2d7; color: #9a6912; }
.metric-label { color: var(--ink-soft); font-size: .76rem; font-weight: 680; }
.metric-card > strong, .capacity-card > div > strong { margin-top: 7px; font-size: 1.75rem; letter-spacing: -.04em; }
.metric-card small { margin-top: auto; color: #7b8d93; font-size: .72rem; }
.capacity-card { flex-direction: row; align-items: center; justify-content: space-between; gap: 15px; }
.capacity-card > div:first-child { height: 100%; display: flex; flex-direction: column; }
.donut { --value: 0; width: 82px; height: 82px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--value) * 1%), #e9efed 0); }
.donut::before { content: ""; width: 64px; height: 64px; grid-area: 1/1; border-radius: 50%; background: #fff; }
.donut span { z-index: 1; grid-area: 1/1; font-size: .75rem; font-weight: 850; }
.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.content-grid.wide-left { grid-template-columns: minmax(0, 1.75fr) minmax(280px, .75fr); }
.panel { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 5px 22px rgba(18,60,74,.035); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 21px 23px; border-bottom: 1px solid #e7eceb; }
.panel-heading h2 { margin: 0; font-size: 1rem; }
.panel-heading p { margin: 5px 0 0; color: var(--ink-soft); font-size: .73rem; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.search-field { width: min(360px, 100%); height: 42px; display: flex; align-items: center; gap: 9px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; background: #f8faf9; color: #83979c; }
.search-field input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: .82rem; }
.result-count { color: var(--ink-soft); font-size: .75rem; }

/* Tabelas e cartões */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th { padding: 12px 20px; background: #fafbfb; color: #71858b; font-size: .65rem; font-weight: 780; letter-spacing: .055em; text-align: left; text-transform: uppercase; }
td { padding: 15px 20px; border-top: 1px solid #edf1f0; color: #38525c; font-size: .77rem; }
tbody tr:hover { background: #fbfdfc; }
.entity-cell { display: flex; align-items: center; gap: 11px; }
.entity-cell > span:last-child { display: grid; gap: 3px; }
.entity-cell strong { color: var(--ink); font-size: .79rem; }
.entity-cell small { color: #7e9197; font-size: .68rem; }
.entity-logo { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; background: #e7f2ef; color: #227561; font-size: .67rem; font-weight: 850; }
.entity-logo.employee { background: #eaf0f6; color: #3c6983; }
.table-avatar { width: 34px; height: 34px; border-radius: 9px; }
.plan-tag { padding: 5px 8px; border-radius: 6px; background: #eef3f2; color: #49636b; font-size: .66rem; font-weight: 750; }
.usage-cell { display: flex; align-items: center; gap: 8px; }
.usage-cell > span { width: 72px; height: 5px; overflow: hidden; border-radius: 6px; background: #e8efed; }
.usage-cell i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.usage-cell small { color: #73888e; font-size: .65rem; }
.status { display: inline-block; padding: 5px 8px; border-radius: 999px; background: #eef2f1; color: #697c82; font-size: .64rem; font-style: normal; font-weight: 760; }
.status.active, .status.trial { background: #e0f5ee; color: #16725f; }
.status.trial { background: #edf0fb; color: #5865a6; }
.status.suspended, .status.cancelled { background: #fff0f1; color: #a33c47; }
.status.neutral { background: #eef2f1; color: #687c81; }
.row-action { width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--brand); }
.row-action:hover { border-color: var(--accent); background: #f0faf7; }
.security-state { padding-left: 14px; position: relative; font-size: .72rem; }
.security-state::before { content: ""; position: absolute; left: 0; top: 4px; width: 7px; height: 7px; border-radius: 50%; background: #d09a2b; }
.security-state.ok::before { background: var(--accent); }
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.plan-card { padding: 24px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 5px 22px rgba(18,60,74,.035); }
.plan-card.disabled { opacity: .68; }
.plan-top, .plan-footer { display: flex; align-items: center; justify-content: space-between; }
.plan-code { color: var(--accent); font-size: .68rem; font-weight: 850; letter-spacing: .11em; }
.plan-card h2 { margin: 24px 0 18px; font-size: 1.12rem; }
.plan-limit { display: flex; align-items: center; gap: 13px; padding-bottom: 24px; }
.plan-limit strong { font-size: 2.2rem; letter-spacing: -.05em; }
.plan-limit span { color: var(--ink-soft); font-size: .72rem; line-height: 1.4; }
.plan-footer { padding-top: 17px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: .72rem; }
.distribution-list { display: grid; gap: 19px; padding: 24px; }
.distribution-list > div { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.distribution-list span { display: flex; align-items: center; gap: 8px; color: #4f6870; font-size: .75rem; }
.distribution-list strong { font-size: .76rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.distribution-bar { grid-column: 1/-1; height: 5px; overflow: hidden; border-radius: 5px; background: #edf1f0; }
.distribution-bar i { display: block; height: 100%; border-radius: inherit; }
.tone-0 { background: #20a487; }.tone-1 { background: #4d83a0; }.tone-2 { background: #d29a32; }.tone-3 { background: #796fa6; }
.empty-state { min-height: 210px; display: grid; place-items: center; align-content: center; padding: 35px; text-align: center; }
.empty-state > span { color: var(--accent); font-size: 2rem; }
.empty-state h3 { margin: 10px 0 5px; font-size: .95rem; }
.empty-state p { max-width: 360px; margin: 0; color: var(--ink-soft); font-size: .75rem; line-height: 1.5; }
.tenant-switch { display: grid; gap: 5px; color: var(--ink-soft); font-size: .68rem; font-weight: 700; }
.tenant-switch select { min-width: 220px; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); }

/* Atividade e linha do tempo */
.timeline-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 14px; margin-bottom: 18px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 5px 22px rgba(18,60,74,.035); }
.timeline-toolbar label { min-width: 0; flex: 1 1 175px; display: grid; gap: 6px; color: var(--ink-soft); font-size: .68rem; font-weight: 700; }
.timeline-toolbar select { height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; outline: none; background: #fbfcfc; color: var(--ink); }
.timeline-toolbar select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(32,164,135,.1); }
.timeline-updated { display: grid; gap: 3px; margin-left: auto; text-align: right; }
.timeline-updated span { color: var(--ink-soft); font-size: .67rem; }
.timeline-updated strong { font-size: 1.15rem; }
.timeline-metrics .metric-card { min-height: 154px; }
.timeline-columns { grid-template-columns: minmax(0, 1.45fr) minmax(330px, .8fr); align-items: start; }
.browser-current-panel { margin-bottom: 20px; }
.browser-current-heading { gap: 18px; }
.browser-current-actions { display: flex; align-items: center; gap: 8px; }
.browser-current-actions > span { padding: 6px 9px; border-radius: 999px; background: #edf5f2; color: #3f665d; font-size: .65rem; font-weight: 760; }
.browser-current-list { max-height: 520px; overflow: auto; }
.browser-current-row { display: grid; grid-template-columns: 10px minmax(240px, 1fr) auto; align-items: center; gap: 14px; min-height: 92px; padding: 15px 21px; border-top: 1px solid #edf1f0; }
.browser-current-row:first-child { border-top: 0; }
.live-dot { width: 9px; height: 9px; display: inline-block; flex: 0 0 auto; border-radius: 50%; background: #90a09f; box-shadow: 0 0 0 4px #edf1f0; }
.live-dot.foreground { background: #20a487; box-shadow: 0 0 0 4px #dff4ed; }
.live-dot.selected { background: #4d83a0; box-shadow: 0 0 0 4px #e5eff5; }
.browser-current-site { min-width: 0; display: grid; gap: 5px; }
.browser-current-site > div { display: flex; align-items: center; gap: 7px; min-width: 0; }
.browser-current-site strong { overflow: hidden; color: var(--ink); font-size: .79rem; text-overflow: ellipsis; white-space: nowrap; }
.browser-current-site small, .browser-current-site em { color: var(--ink-soft); font-size: .65rem; font-style: normal; }
.browser-current-site em { color: #57737a; }
.live-status { padding: 3px 7px; border-radius: 999px; background: #eef2f1; color: #667a7f; font-size: .57rem; font-weight: 800; white-space: nowrap; }
.live-status.foreground { background: #dff4ed; color: #14725f; }
.live-status.selected { background: #e5eff5; color: #326b8a; }
.audible-chip { padding: 3px 6px; border-radius: 12px; background: #fff3dd; color: #8a6512; font-size: .56rem; font-style: normal; font-weight: 800; }
.browser-current-times { display: grid; grid-template-columns: repeat(3, minmax(88px, 1fr)); gap: 8px; }
.browser-current-times > span { display: grid; gap: 4px; padding: 9px 11px; border-radius: 9px; background: #f7f9f8; }
.browser-current-times small { color: var(--ink-soft); font-size: .58rem; }
.browser-current-times strong { font-size: .7rem; font-variant-numeric: tabular-nums; }
.browser-current-legend { display: flex; flex-wrap: wrap; gap: 18px; padding: 12px 21px; border-top: 1px solid var(--line); background: #fafbfb; color: var(--ink-soft); font-size: .62rem; }
.browser-current-legend span { display: flex; align-items: center; gap: 8px; }
.browser-current-legend .live-dot { width: 7px; height: 7px; box-shadow: none; }
.activity-list, .browser-activity-list { max-height: 650px; overflow: auto; }
.activity-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 13px; min-height: 72px; padding: 12px 20px; border-top: 1px solid #edf1f0; }
.activity-row.with-browser-context { align-items: start; padding-top: 15px; padding-bottom: 15px; }
.activity-row:first-child, .browser-row:first-child { border-top: 0; }
.activity-state { width: 9px; height: 9px; border-radius: 50%; background: #87979c; box-shadow: 0 0 0 4px #edf1f0; }
.activity-state.active { background: #20a487; box-shadow: 0 0 0 4px #e0f4ee; }
.activity-state.idle { background: #d29a32; box-shadow: 0 0 0 4px #fff3dd; }
.activity-state.locked, .activity-state.disconnected { background: #4d83a0; box-shadow: 0 0 0 4px #e6f0f6; }
.activity-main { min-width: 0; display: grid; gap: 5px; }
.activity-main > div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.activity-main strong { overflow: hidden; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.activity-main small, .activity-time small { color: var(--ink-soft); font-size: .66rem; }
.activity-main em { color: #536970; font-size: .62rem; font-style: normal; line-height: 1.35; }
.timeline-marker-row { grid-template-columns: 32px minmax(0, 1fr) auto; min-height: 78px; background: #fbfcfc; }
.timeline-marker-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; background: #edf2f1; color: #547078; font-size: .82rem; font-weight: 900; }
.timeline-marker-row .activity-main { gap: 3px; }
.event-chip { padding: 3px 7px; border-radius: 20px; background: #edf2f1; color: #5c7177; font-size: .56rem; font-weight: 800; }
.timeline-marker-row.boot { background: #f2faf7; }
.timeline-marker-row.boot .timeline-marker-icon, .timeline-marker-row.resume .timeline-marker-icon, .timeline-marker-row.session .timeline-marker-icon { background: #dff4ed; color: #14725f; }
.timeline-marker-row.power-off .timeline-marker-icon { background: #e9eff1; color: #3f5962; }
.timeline-marker-row.suspend .timeline-marker-icon, .timeline-marker-row.idle .timeline-marker-icon { background: #fff3dd; color: #8a6512; }
.timeline-marker-row.locked .timeline-marker-icon { background: #e6f0f6; color: #326b8a; }
.timeline-marker-row.critical { background: #fff7f5; }
.timeline-marker-row.critical .timeline-marker-icon { background: #ffe3dd; color: #a43d2d; }
.browser-count-chip { padding: 3px 7px; border-radius: 20px; background: #e7f2ef; color: #227561; font-size: .58rem; font-weight: 800; }
.activity-active-tab { display: flex; align-items: center; gap: 9px; margin-top: 5px; padding: 9px 11px; border: 1px solid #cfe6df; border-radius: 10px; background: #f2faf7; }
.activity-active-tab .browser-icon { width: 28px; height: 28px; flex: 0 0 auto; border-radius: 8px; }
.activity-active-tab > span:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.activity-active-tab b { overflow: hidden; color: #164f43; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.activity-active-tab small { color: #53746c; }
.activity-tab-tree { grid-column: 2 / -1; margin-top: -3px; border: 1px solid #dfe8e5; border-radius: 10px; background: #fafcfb; }
.activity-tab-tree summary { min-height: 38px; display: flex; align-items: center; gap: 8px; padding: 7px 11px; color: #405d65; cursor: pointer; list-style: none; font-size: .68rem; font-weight: 760; }
.activity-tab-tree summary::-webkit-details-marker { display: none; }
.activity-tab-tree summary > span { color: var(--accent); font-size: .9rem; }
.activity-tab-tree summary small { margin-left: auto; color: var(--accent); font-size: .6rem; }
.activity-tab-tree[open] summary { border-bottom: 1px solid #e4ebe9; }
.activity-tab-tree[open] summary small { font-size: 0; }
.activity-tab-tree[open] summary small::after { content: "Ocultar guias"; font-size: .6rem; }
.activity-tab-child { position: relative; display: grid; grid-template-columns: 13px 8px minmax(150px, 1fr) repeat(3, minmax(70px, auto)); align-items: center; gap: 9px; min-height: 49px; padding: 7px 12px 7px 9px; border-top: 1px solid #edf1f0; }
.activity-tab-child:first-child { border-top: 0; }
.activity-tab-child .tree-line { align-self: stretch; border-left: 1px solid #c9d8d4; border-bottom: 1px solid #c9d8d4; border-radius: 0 0 0 7px; }
.activity-tab-child .live-dot { width: 7px; height: 7px; box-shadow: none; }
.activity-tab-child > div { min-width: 0; display: grid; gap: 3px; }
.activity-tab-child > div strong { overflow: hidden; font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.activity-tab-child > div small { color: var(--ink-soft); font-size: .59rem; }
.activity-tab-child > span:nth-last-child(-n+3) { display: grid; gap: 2px; text-align: right; }
.activity-tab-child > span:nth-last-child(-n+3) small { color: var(--ink-soft); font-size: .55rem; }
.activity-tab-child > span:nth-last-child(-n+3) b { font-size: .63rem; font-variant-numeric: tabular-nums; }
.state-chip { padding: 3px 7px; border-radius: 20px; background: #eef2f2; color: #60737a; font-size: .58rem; font-weight: 800; }
.state-chip.active { background: #e0f4ee; color: #14725f; }
.state-chip.idle { background: #fff3dd; color: #8a6512; }
.state-chip.locked, .state-chip.disconnected { background: #e6f0f6; color: #326b8a; }
.activity-time { display: grid; gap: 4px; text-align: right; }
.activity-time strong { font-size: .68rem; font-variant-numeric: tabular-nums; }
.browser-row { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 11px; padding: 14px 18px; border-top: 1px solid #edf1f0; }
.browser-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #e5f4f0; color: #17806b; font-weight: 850; }
.browser-row > div { min-width: 0; display: grid; gap: 4px; }
.browser-row > div > div { display: flex; align-items: center; gap: 7px; min-width: 0; }
.browser-row strong { overflow: hidden; font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.browser-row span:not(.browser-icon), .browser-row small { color: var(--ink-soft); font-size: .64rem; }
.incognito-chip { padding: 3px 6px; border-radius: 12px; background: #efe7f7; color: #754697; font-size: .56rem; font-style: normal; font-weight: 800; }
.privacy-footnote { margin: 16px 3px 0; color: var(--ink-soft); font-size: .67rem; line-height: 1.55; }
.compact-empty { min-height: 260px; }
.spinner { width: 27px; height: 27px; border: 3px solid #dce8e5; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Modais */
.modal-open { overflow: hidden; }
.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: rgba(6,27,34,.56); backdrop-filter: blur(3px); }
.modal { width: min(100%, 570px); max-height: min(820px, calc(100vh - 48px)); overflow: auto; border-radius: 18px; background: #fff; box-shadow: 0 30px 90px rgba(0,0,0,.28); }
.modal-heading { position: sticky; top: 0; z-index: 1; display: flex; align-items: start; justify-content: space-between; padding: 23px 25px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
.modal-heading h2 { margin: 0; font-size: 1.2rem; }
.modal-heading p { margin: 5px 0 0; color: var(--ink-soft); font-size: .75rem; }
.modal-body { padding: 25px; }
.modal-form { display: grid; gap: 18px; }
.modal-form.two-cols { grid-template-columns: 1fr 1fr; }
.identity-map-pair { display: grid; grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr); align-items: end; gap: 8px; }
.identity-map-arrow { height: 50px; display: grid; place-items: center; color: var(--accent); font-size: 1.2rem; font-weight: 850; }
.mapping-note { display: grid; gap: 5px; padding: 14px 16px; border: 1px solid #cfe4de; border-radius: 11px; background: #f2faf7; }
.mapping-note strong { color: #176953; font-size: .76rem; }
.mapping-note span { color: var(--ink-soft); font-size: .7rem; line-height: 1.5; }
.span-2 { grid-column: 1/-1; }
.check-field { display: flex; align-items: center; gap: 10px; color: #405b64; font-size: .8rem; font-weight: 650; }
.check-field input { width: 17px; height: 17px; accent-color: var(--accent); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 6px; }
.detail-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.detail-metrics div { display: grid; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: #f8faf9; }
.detail-metrics span { color: var(--ink-soft); font-size: .7rem; }
.detail-metrics strong { font-size: 1.3rem; }
.modal-section-heading { display: flex; align-items: center; justify-content: space-between; margin: 25px 0 12px; }
.modal-section-heading h3 { margin: 0; font-size: .9rem; }
.modal-section-heading p { margin: 4px 0 0; color: var(--ink-soft); font-size: .7rem; }
.member-list { display: grid; border: 1px solid var(--line); border-radius: 11px; }
.member-list > div { display: flex; align-items: center; gap: 10px; padding: 12px; border-top: 1px solid var(--line); }
.member-list > div:first-child { border-top: 0; }
.member-list > div > span:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.member-list strong { font-size: .76rem; }
.member-list small { overflow: hidden; color: var(--ink-soft); font-size: .66rem; text-overflow: ellipsis; white-space: nowrap; }
.member-list i { margin-left: auto; }
.temporary-password code { padding: 10px; border-radius: 8px; background: #fff; user-select: all; }
#toast-root { position: fixed; z-index: 100; right: 24px; bottom: 24px; display: grid; gap: 8px; }
.toast { min-width: 260px; padding: 13px 16px; border: 1px solid #b7ddd3; border-radius: 10px; background: #effaf6; box-shadow: 0 14px 40px rgba(16,42,54,.16); color: #176953; font-size: .78rem; font-weight: 700; }
.toast.warning { border-color: #ead39e; background: #fff8e8; color: #8a6512; }
.loading-page { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 14px; background: var(--canvas); color: var(--ink-soft); font-size: .82rem; }
.loading-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--brand); color: #fff; font-weight: 850; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.94); opacity: .75; } }
.mobile-only { display: none; }

@media (max-width: 1200px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid.wide-left { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline-columns { grid-template-columns: 1fr; }
  .browser-current-row { grid-template-columns: 10px minmax(0, 1fr); }
  .browser-current-times { grid-column: 2; }
}

@media (max-width: 760px) {
  .mobile-only { display: grid; }
  .sidebar { transform: translateX(-100%); transition: transform .2s; }
  .menu-open .sidebar { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 15; background: rgba(6,27,34,.45); }
  .menu-open .sidebar-backdrop { display: block; }
  .portal-main { margin-left: 0; }
  .topbar { height: 68px; padding: 0 18px; }
  .topbar > div:first-of-type, .notification-button, .topbar-divider, .profile-button > span:nth-child(2), .profile-button b { display: none; }
  .profile-button { padding: 0; }
  .page-content { padding: 28px 18px 45px; }
  .page-heading { align-items: stretch; flex-direction: column; }
  .heading-actions { align-items: stretch; flex-direction: column; }
  .heading-actions .tenant-switch select { width: 100%; }
  .identity-button { justify-content: center; }
  .page-heading .primary-button.fit { width: 100%; }
  .metric-grid, .metric-grid.three, .plan-grid { grid-template-columns: 1fr; }
  .content-grid, .content-grid.wide-left { grid-template-columns: 1fr; }
  .metric-card { min-height: 155px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .timeline-toolbar { align-items: stretch; flex-direction: column; }
  .timeline-toolbar label { min-width: 0; }
  .timeline-updated { margin: 0; text-align: left; }
  .browser-current-heading { align-items: stretch; flex-direction: column; }
  .browser-current-actions { flex-wrap: wrap; }
  .browser-current-actions .secondary-button { flex: 1 1 100%; justify-content: center; }
  .browser-current-times { grid-template-columns: 1fr; }
  .activity-row { grid-template-columns: 10px minmax(0, 1fr); }
  .timeline-marker-row { grid-template-columns: 32px minmax(0, 1fr); }
  .activity-time { grid-column: 2; text-align: left; }
  .activity-tab-tree { grid-column: 2; }
  .activity-tab-child { grid-template-columns: 11px 7px minmax(0, 1fr); }
  .activity-tab-child > span:nth-last-child(-n+3) { grid-column: 3; display: flex; justify-content: space-between; text-align: left; }
  .search-field { width: 100%; }
  .result-count { display: none; }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal { max-height: 92vh; border-radius: 18px 18px 0 0; }
  .modal-form.two-cols { grid-template-columns: 1fr; }
  .identity-map-pair { grid-template-columns: 1fr; }
  .identity-map-arrow { height: 24px; transform: rotate(90deg); }
  .span-2 { grid-column: auto; }
  .recovery-grid { grid-template-columns: 1fr; }
  .auth-step-card { padding: 32px 24px; }
}
