@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Space+Mono:wght@400;700&display=swap');

/* ————————————————————————————————
   INTIMA ADV — identidade integrada ao aplicativo
   Verde-petróleo × branco quente × dourado
———————————————————————————— */
:root {
  --paper: #faf9f6;
  --paper-2: #f0f2ef;
  --white: #ffffff;
  --ink: #083c3a;
  --ink-2: #173f3d;
  --ink-3: #687774;
  --accent: #f3a21f;
  --accent-dark: #d78609;
  --accent-soft: rgba(243, 162, 31, .12);
  --line: rgba(8, 60, 58, .18);
  --line-soft: rgba(8, 60, 58, .11);
  --radius: 14px;
  --sans: "Inter", system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;
  --hard: 0 18px 44px rgba(5, 42, 40, .13);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body { margin: 0; min-height: 100vh; color: var(--ink); font-family: var(--sans); background: var(--paper); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
::selection { color: var(--paper); background: var(--accent); }

/* ——— Marca ——— */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; text-transform: uppercase; }
.brand-logo { width: 43px; height: 43px; object-fit: contain; filter: drop-shadow(0 5px 8px rgba(4, 40, 38, .18)); }
.brand-copy { display: grid; line-height: 1; font-size: 15px; }
.brand-copy > span { white-space: nowrap; }
.brand-copy em { color: var(--accent); font-style: normal; }
.brand-copy small { margin-top: 5px; color: var(--ink-3); font-family: var(--sans); font-size: 8px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 16px; color: var(--accent); font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 26px; height: 2px; background: currentColor; }
.display { margin: 0; font-weight: 700; letter-spacing: -.035em; line-height: 1.02; }
.muted { color: var(--ink-3); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ——— Botões ——— */
.button { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 22px; border: 1px solid transparent; border-radius: 12px; color: #fff; background: var(--ink); box-shadow: 0 10px 24px rgba(8, 60, 58, .16); cursor: pointer; font-size: 12px; font-weight: 700; letter-spacing: .04em; transition: transform .18s, box-shadow .18s, background .18s, color .18s; }
.button:hover { transform: translateY(-2px); box-shadow: 0 16px 30px rgba(8, 60, 58, .22); }
.button:active { transform: translateY(0); box-shadow: 0 5px 12px rgba(8, 60, 58, .15); }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.button.copper { color: #152d2b; background: var(--accent); border-color: transparent; box-shadow: 0 10px 24px rgba(243, 162, 31, .25); }
.button.copper:hover { background: #ffb130; box-shadow: 0 16px 30px rgba(243, 162, 31, .3); }
.button.outline { color: var(--ink); background: var(--white); border-color: var(--line); box-shadow: none; }
.button.outline:hover { color: #fff; background: var(--ink); box-shadow: 0 10px 24px rgba(8, 60, 58, .15); }
.button.ghost { color: var(--ink-3); background: transparent; border-color: transparent; box-shadow: none; }
.button.ghost:hover { color: var(--ink); background: transparent; border-color: var(--ink); box-shadow: none; transform: none; }
.button.small { min-height: 38px; padding: 0 14px; font-size: 10px; }
.button.wide { width: 100%; }

/* ——— Campos ——— */
.field { display: grid; gap: 7px; }
.field label { color: var(--ink-2); font-size: 11px; font-weight: 600; }
.input, .select { width: 100%; height: 50px; padding: 0 14px; border: 1px solid var(--line); outline: 0; color: var(--ink); background: var(--white); border-radius: 12px; transition: box-shadow .18s, border-color .18s, background .18s; }
.input:hover, .select:hover { background: #fff; }
.input:focus, .select:focus { border-color: var(--ink); background: #fff; box-shadow: 0 0 0 4px rgba(8, 60, 58, .1); }
.input::placeholder { color: #98a39f; font-size: 12px; }
.form-grid { display: grid; gap: 16px; }
.split-fields { display: grid; grid-template-columns: 1fr 110px; gap: 12px; }

/* ————————————————————————————
   LOGIN — editorial dividido
———————————————————————————— */
.login-page { display: flex; flex-direction: column; min-height: 100vh; background: var(--paper); }
.login-topline { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px clamp(20px, 4vw, 44px); border-bottom: 1px solid var(--line); background: rgba(250, 249, 246, .94); }
.topline-meta { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--ink-3); font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }
.topline-meta .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: blink 1.6s steps(2) infinite; }
@keyframes blink { 50% { opacity: .15; } }

.login-body { flex: 1; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(430px, 520px); }

.login-hero { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; overflow: hidden; padding: clamp(30px, 5vw, 64px) clamp(24px, 4.5vw, 58px); color: #fff; background: radial-gradient(circle at 78% 18%, rgba(42, 128, 122, .38), transparent 32%), linear-gradient(145deg, #061f1e 0%, #083c3a 62%, #0b4d4a 100%); }
.login-hero::after { content: ""; position: absolute; right: -110px; bottom: -130px; width: 420px; height: 420px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; box-shadow: 0 0 0 70px rgba(255,255,255,.025), 0 0 0 140px rgba(255,255,255,.018); }
.login-hero > * { position: relative; z-index: 1; }
.hero-index { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.56); font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; }
.hero-index span:nth-child(2) { color: var(--accent); }
.hero-title { margin: 0; font-size: clamp(50px, 6.2vw, 96px); font-weight: 700; line-height: .94; letter-spacing: -.045em; }
.hero-title em { font-style: normal; color: var(--accent); }
.hero-text { max-width: 500px; margin: 26px 0 0; color: rgba(255,255,255,.7); font-size: 15px; line-height: 1.7; }
.hero-facts { display: grid; gap: 0; margin: 40px 0 0; padding: 0; list-style: none; border-top: 1px solid rgba(255,255,255,.18); }
.hero-facts li { display: flex; align-items: center; gap: 16px; padding: 13px 2px; border-bottom: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.72); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.hero-facts li span { color: var(--accent); font-weight: 700; }
.hero-foot { display: flex; gap: 26px; color: rgba(255,255,255,.55); font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }
.hero-foot span { display: inline-flex; align-items: center; gap: 8px; }
.hero-foot span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.login-panel { display: flex; flex-direction: column; padding: clamp(28px, 4vw, 54px) clamp(24px, 3.5vw, 48px); color: var(--ink); background: var(--paper); }
.login-card { width: min(430px, 100%); margin: auto; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 38px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper-2); }
.auth-tabs button { height: 42px; border: 0; border-radius: 10px; color: var(--ink-3); background: transparent; cursor: pointer; font-size: 11px; font-weight: 600; transition: .18s; }
.auth-tabs button + button { border-left: 0; }
.auth-tabs button.active { color: #fff; background: var(--ink); box-shadow: 0 6px 16px rgba(8,60,58,.18); }
.panel-title { margin: 0; color: var(--ink); font-size: clamp(32px, 3vw, 44px); font-weight: 700; letter-spacing: -.035em; line-height: 1.05; }
.panel-sub { margin: 14px 0 30px; color: var(--ink-3); font-size: 13px; line-height: 1.65; }
.login-panel .field label { color: var(--ink-2); }
.login-panel .input { color: var(--ink); background: var(--white); border-color: var(--line); }
.login-panel .input:hover { background: #fff; }
.login-panel .input:focus { border-color: var(--ink); background: #fff; box-shadow: 0 0 0 4px rgba(8,60,58,.1); }
.login-panel .input::placeholder { color: #98a39f; }
.form-meta { display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.form-meta label { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 10px; }
.form-meta input[type="checkbox"] { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); }
.form-meta a { color: var(--ink); font-size: 10px; font-weight: 700; }
.form-meta a:hover { text-decoration: underline; }
.login-panel .button.copper { box-shadow: 0 10px 24px rgba(243,162,31,.24); }
.login-panel .button.copper:hover { box-shadow: 0 16px 30px rgba(243,162,31,.3); }
.login-panel .button.ghost { color: var(--ink-3); }
.login-panel .button.ghost:hover { color: var(--ink); border-color: var(--line); }
.demo-access { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.demo-access button { min-height: 46px; border: 1.5px dashed rgba(241, 239, 230, .3); border-radius: var(--radius); color: rgba(241, 239, 230, .6); background: transparent; cursor: pointer; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; transition: .15s; }
.demo-access button:hover { color: var(--paper); border-color: var(--accent); background: var(--accent-soft); }
.demo-note { margin: 16px 0 0; color: var(--ink-3); font-family: var(--mono); font-size: 9px; letter-spacing: .04em; text-align: center; }
.login-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line-soft); color: var(--ink-3); font-family: var(--mono); font-size: 9px; letter-spacing: .06em; }

/* ————————————————————————————
   SHELL DO APLICATIVO
———————————————————————————— */
.app-page { background: var(--paper); }
.sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; display: flex; flex-direction: column; width: 246px; padding: 24px 18px 20px; color: #fff; background: linear-gradient(180deg, #062a28 0%, #083c3a 65%, #0b4d4a 100%); box-shadow: 8px 0 30px rgba(5,42,40,.08); }
.sidebar .brand-copy small { color: rgba(255,255,255,.5); }
.sidebar-context { margin-top: 54px; padding-top: 17px; border-top: 1px solid rgba(255,255,255,.18); }
.sidebar-kicker { color: var(--accent); font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.sidebar-context h2 { margin: 14px 0 13px; font-size: 27px; font-weight: 700; letter-spacing: -.035em; line-height: .96; }
.sidebar-context p { margin: 0; color: rgba(255,255,255,.62); font-size: 11px; line-height: 1.65; }
.sidebar-facts { display: grid; gap: 0; margin: 24px 0 0; border-top: 1px solid rgba(255,255,255,.15); }
.sidebar-facts div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.sidebar-facts dt, .sidebar-facts dd { margin: 0; font-family: var(--mono); font-size: 8.5px; letter-spacing: .1em; text-transform: uppercase; }
.sidebar-facts dt { color: rgba(255,255,255,.48); }
.sidebar-facts dd { color: #fff; font-weight: 700; }
.sidebar-bottom { margin-top: auto; }
.plan-mini { margin-bottom: 14px; padding: 15px; border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius); background: rgba(255,255,255,.08); box-shadow: none; }
.plan-mini small { color: rgba(255,255,255,.5); font-family: var(--mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; }
.plan-mini strong { display: block; margin: 7px 0 5px; font-size: 20px; font-weight: 900; letter-spacing: -.01em; text-transform: uppercase; }
.plan-mini strong::after { content: ""; display: block; width: 34px; height: 3px; margin-top: 8px; background: var(--accent); }
.user-mini { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; padding-top: 15px; border-top: 1px solid rgba(255,255,255,.18); }
.user-mini > span:nth-child(2) { min-width: 0; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.22); border-radius: 11px; color: var(--ink); background: var(--accent); font-family: var(--mono); font-size: 11px; font-weight: 700; }
.user-mini strong, .user-mini small { overflow: hidden; display: block; text-overflow: ellipsis; white-space: nowrap; }
.user-mini strong { font-size: 12px; font-weight: 800; }
.user-mini small { margin-top: 3px; color: rgba(255,255,255,.48); font-family: var(--mono); font-size: 9px; }
.signout { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid rgba(255,255,255,.25); border-radius: 10px; color: #fff; background: transparent; cursor: pointer; font-size: 14px; transition: .18s; }
.signout:hover { color: var(--ink); background: var(--accent); border-color: var(--accent); }

.app-main { min-height: 100vh; margin-left: 246px; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; height: 66px; padding: 0 clamp(20px, 3.5vw, 52px); border-bottom: 1px solid var(--line); background: rgba(250,249,246,.92); backdrop-filter: blur(14px); }
.topbar-leading { display: flex; align-items: center; gap: 12px; }
.mobile-brand { display: none; }
.breadcrumb { margin: 0; color: var(--ink-3); font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.breadcrumb span { color: var(--accent); }
.breadcrumb strong { color: var(--ink); font-weight: 700; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.environment { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: var(--white); font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.environment::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #2a9b72; animation: blink 1.6s steps(2) infinite; }
.content { width: min(1460px, 100%); margin: auto; padding: clamp(26px, 4vw, 56px) clamp(20px, 3.5vw, 52px) 70px; }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 36px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.page-heading h1 { font-size: clamp(36px, 4.4vw, 62px); }
.page-heading h1 span { color: var(--accent); }
.page-heading p { max-width: 560px; margin: 14px 0 0; color: var(--ink-3); font-size: 14px; line-height: 1.6; }
.heading-stat { min-width: 168px; padding: 16px 18px; border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); background: var(--ink); color: #fff; box-shadow: 0 14px 30px rgba(8,60,58,.18); }
.heading-stat small { color: rgba(241, 239, 230, .5); font-family: var(--mono); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; }
.heading-stat strong { display: block; margin-top: 8px; font-family: var(--mono); font-size: 30px; font-weight: 700; }

/* Métricas — faixa indexada */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 26px; }
.metric { position: relative; overflow: hidden; min-height: 150px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 8px 24px rgba(8,60,58,.05); transition: transform .18s, box-shadow .18s; }
.metric:hover { transform: translateY(-3px); box-shadow: var(--hard); }
.metric::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--ink); }
.metric:nth-child(2)::before { background: var(--accent); }
.metric::after { content: attr(data-index); position: absolute; right: 10px; bottom: -14px; color: transparent; -webkit-text-stroke: 1.5px rgba(23, 22, 15, .12); font-family: var(--mono); font-size: 74px; font-weight: 700; }
.metric small { color: var(--ink-3); font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.metric strong { display: block; margin-top: 22px; font-size: 40px; font-weight: 900; letter-spacing: -.03em; }
.metric span { display: block; margin-top: 6px; color: var(--accent-dark); font-family: var(--mono); font-size: 10px; }

/* Grade do dashboard */
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr); gap: 20px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 10px 30px rgba(8,60,58,.06); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 19px 22px 15px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.panel-head p { margin: 4px 0 0; color: var(--ink-3); font-family: var(--mono); font-size: 10px; }
.panel-body { padding: 22px; }

/* Espaços de OAB */
.oab-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.oab-slot { position: relative; min-width: 0; min-height: 212px; padding: 18px; border-radius: var(--radius); text-align: left; font-family: inherit; }
.oab-slot.empty { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; border: 1px dashed rgba(8,60,58,.28); color: var(--ink-3); background: #fbfcfa; cursor: pointer; transition: .18s; }
.oab-slot.empty:hover { color: var(--ink); border-color: var(--ink); border-style: solid; background: rgba(8,60,58,.04); transform: translateY(-3px); box-shadow: 0 14px 26px rgba(8,60,58,.1); }
.plus-mark { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 16px; border: 1.5px solid currentColor; border-radius: 50%; font-size: 22px; font-weight: 400; }
.oab-slot.empty strong { color: var(--ink); font-size: 13px; font-weight: 800; text-transform: uppercase; }
.oab-slot.empty small { margin-top: 4px; font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.slot-index { position: absolute; top: 15px; right: 15px; color: rgba(23, 22, 15, .35); font-family: var(--mono); font-size: 12px; font-weight: 700; }
.oab-slot.filled { color: #fff; background: linear-gradient(145deg, #083c3a, #062a28); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 16px 34px rgba(8,60,58,.2); }
.slot-top { display: flex; justify-content: space-between; align-items: center; }
.filled .slot-index { position: static; color: rgba(241, 239, 230, .45); }
.mini-status { padding: 4px 8px; border: 1px solid var(--accent); color: var(--accent); font-family: var(--mono); font-size: 8.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.oab-number { margin: 36px 0 0; font-size: clamp(30px, 2.8vw, 40px); font-weight: 900; line-height: 1; letter-spacing: -.02em; }
.oab-number span { color: var(--accent); font-size: .55em; }
.oab-nickname { margin: 8px 0 0; color: rgba(241, 239, 230, .5); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.slot-footer { position: absolute; right: 18px; bottom: 15px; left: 18px; display: flex; align-items: center; justify-content: space-between; color: rgba(241, 239, 230, .45); font-family: var(--mono); font-size: 8.5px; letter-spacing: .06em; text-transform: uppercase; }
.icon-button { display: grid; place-items: center; width: 30px; height: 30px; border: 1.5px solid rgba(241, 239, 230, .4); border-radius: var(--radius); color: var(--paper); background: transparent; cursor: pointer; transition: .15s; }
.icon-button:hover { border-color: var(--accent); color: var(--accent); }

/* Cartão do conector — bloco negro com sombra vermelha */
.connector-card { position: relative; overflow: hidden; min-height: 100%; color: #fff; background: linear-gradient(150deg, #083c3a 0%, #062a28 100%); border: 1px solid rgba(8,60,58,.22); box-shadow: 0 20px 42px rgba(8,60,58,.18); }
.connector-card::after { content: "C"; position: absolute; right: -22px; bottom: -96px; color: transparent; -webkit-text-stroke: 2px rgba(241, 239, 230, .1); font-family: var(--mono); font-size: 260px; font-weight: 700; }
.connector-card .panel-head { border-color: rgba(241, 239, 230, .2); }
.connector-card .panel-head p { color: rgba(241, 239, 230, .5); }
.connector-state { position: relative; z-index: 1; padding: 22px; }
.connector-seal { display: grid; place-items: center; width: 64px; height: 64px; border: 1px solid rgba(255,255,255,.18); border-radius: 16px; background: rgba(255,255,255,.08); box-shadow: 0 12px 28px rgba(0,0,0,.16); }
.connector-seal img { width: 56px; height: 56px; object-fit: contain; }
.connector-state h3 { margin: 26px 0 8px; font-size: 25px; font-weight: 700; letter-spacing: -.025em; line-height: 1.1; }
.connector-state > p { margin: 0; color: rgba(241, 239, 230, .6); font-size: 12px; line-height: 1.65; }
.url-box { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; margin: 22px 0 12px; padding: 10px 10px 10px 14px; border: 1px solid rgba(255,255,255,.2); border-radius: 12px; background: rgba(255,255,255,.05); }
.url-box code { overflow: hidden; color: rgba(241, 239, 230, .75); font-family: var(--mono); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.url-box .button { min-height: 36px; color: var(--ink); background: var(--paper); border-color: var(--paper); box-shadow: none; font-size: 9px; }
.url-box .button:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); box-shadow: none; }
.url-box .button.copied { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.connector-help { position: relative; z-index: 1; display: inline-block; margin-top: 12px; color: var(--paper); font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; border-bottom: 1.5px solid var(--accent); }

/* Atividade */
.activity-list { display: grid; }
.activity { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 13px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.activity:last-child { border: 0; }
.activity-icon { display: grid; place-items: center; width: 38px; height: 38px; border: 1.5px solid var(--ink); border-radius: var(--radius); color: var(--ink); background: var(--paper); font-family: var(--mono); font-weight: 700; }
.activity strong, .activity small { display: block; }
.activity strong { font-size: 12px; font-weight: 800; }
.activity small { margin-top: 4px; color: var(--ink-3); font-family: var(--mono); font-size: 9.5px; }
.activity time { color: var(--accent-dark); font-family: var(--mono); font-size: 9px; font-weight: 700; }

/* ————————————————————————————
   ADMIN
———————————————————————————— */
.admin-hero { position: relative; overflow: hidden; margin-bottom: 24px; padding: 34px; border: 1px solid rgba(8,60,58,.18); border-radius: 18px; color: #fff; background: radial-gradient(circle at 82% 10%, rgba(42,128,122,.35), transparent 34%), linear-gradient(145deg, #062a28, #083c3a); box-shadow: 0 22px 44px rgba(8,60,58,.18); }
.admin-hero::after { content: "GESTÃO"; position: absolute; right: -14px; bottom: -34px; color: transparent; -webkit-text-stroke: 2px rgba(241, 239, 230, .09); font-size: 108px; font-weight: 900; letter-spacing: -.04em; text-transform: uppercase; }
.admin-hero > * { position: relative; z-index: 1; }
.admin-hero h1 { max-width: 720px; font-size: clamp(36px, 4.4vw, 60px); }
.admin-hero h1 em { font-style: normal; color: var(--accent); }
.admin-hero p { max-width: 560px; margin: 14px 0 0; color: rgba(241, 239, 230, .6); font-size: 14px; line-height: 1.65; }
.admin-hero .eyebrow { color: var(--accent); }
.admin-metrics { display: grid; grid-template-columns: repeat(3, 1fr); width: min(580px, 100%); margin-top: 34px; border-top: 1.5px solid rgba(241, 239, 230, .25); }
.admin-metrics div { padding: 16px 18px 0 0; }
.admin-metrics strong { display: block; font-family: var(--mono); font-size: 28px; font-weight: 700; }
.admin-metrics span { color: rgba(241, 239, 230, .45); font-family: var(--mono); font-size: 8.5px; letter-spacing: .14em; text-transform: uppercase; }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.search-box { position: relative; flex: 1; max-width: 400px; }
.search-box::before { content: "⌕"; position: absolute; top: 50%; left: 14px; color: var(--ink-3); transform: translateY(-54%); font-size: 19px; }
.search-box input { padding-left: 40px; font-family: var(--mono); font-size: 12px; }
.table-filters { display: flex; gap: 9px; }
.table-head, .client-row { display: grid; grid-template-columns: minmax(230px, 1.6fr) .65fr .8fr .45fr .45fr .75fr 28px; align-items: center; gap: 14px; }
.table-head { padding: 12px 20px; color: var(--ink-3); border-bottom: 1px solid var(--line); background: var(--paper-2); font-family: var(--mono); font-size: 8.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.client-row { width: 100%; min-height: 68px; padding: 10px 20px; border: 0; border-bottom: 1px solid var(--line-soft); color: var(--ink-2); background: transparent; cursor: pointer; text-align: left; font-size: 11px; font-family: inherit; transition: background .12s; }
.client-row:hover { background: var(--accent-soft); }
.client-person { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 11px; min-width: 0; }
.client-person strong, .client-person small { overflow: hidden; display: block; text-overflow: ellipsis; white-space: nowrap; }
.client-person strong { font-size: 12px; font-weight: 800; }
.client-person small { margin-top: 3px; color: var(--ink-3); font-family: var(--mono); font-size: 9px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1.5px solid currentColor; border-radius: var(--radius); font-style: normal; font-family: var(--mono); font-size: 8.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.status-pill::before { content: ""; width: 6px; height: 6px; background: currentColor; }
.status-pill.active { color: #177a4c; background: rgba(23, 122, 76, .08); }
.status-pill.trial { color: #8a6410; background: rgba(138, 100, 16, .08); }
.status-pill.past_due { color: #b04a12; background: rgba(176, 74, 18, .08); }
.status-pill.suspended { color: var(--accent-dark); background: var(--accent-soft); }
.row-arrow { color: var(--ink-3); font-family: var(--mono); font-size: 15px; }
.client-row:hover .row-arrow { color: var(--accent); }
.empty-result { padding: 60px; color: var(--ink-3); font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-align: center; text-transform: uppercase; }

/* ————————————————————————————
   DIÁLOGOS
———————————————————————————— */
dialog { width: min(520px, calc(100% - 28px)); padding: 0; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: var(--white); box-shadow: 0 28px 70px rgba(3,31,30,.24); }
dialog::backdrop { background: rgba(23, 22, 15, .6); backdrop-filter: blur(3px); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 24px 26px 16px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 6px 0 0; font-size: 26px; font-weight: 900; letter-spacing: -.01em; text-transform: uppercase; }
.dialog-kicker { color: var(--accent); font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.dialog-close { width: 38px; height: 38px; border: 1.5px solid var(--ink); border-radius: var(--radius); color: var(--ink); background: transparent; cursor: pointer; font-size: 16px; transition: .15s; }
.dialog-close:hover { color: var(--paper); background: var(--accent); border-color: var(--accent); }
.dialog-body { padding: 24px 26px 26px; }
.lock-note { display: flex; gap: 11px; margin: 18px 0; padding: 13px; border: 1.5px solid var(--ink); border-left: 6px solid var(--accent); border-radius: var(--radius); color: var(--ink-2); background: var(--paper); font-family: var(--mono); font-size: 10px; line-height: 1.55; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.drawer { width: min(480px, 100%); height: 100vh; max-height: none; margin: 0 0 0 auto; border-width: 0 0 0 1.5px; border-radius: 0; box-shadow: -12px 0 0 rgba(232, 64, 42, .35); }
.drawer .dialog-body { display: grid; gap: 13px; }
.detail-card { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.detail-card small { color: var(--ink-3); font-family: var(--mono); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; }
.detail-card strong { display: block; margin-top: 7px; font-size: 19px; font-weight: 900; text-transform: uppercase; }

/* ————————————————————————————
   OAUTH — documento oficial
———————————————————————————— */
.oauth-page { position: relative; display: grid; place-items: center; padding: 30px; color: #fff; background: radial-gradient(circle at 20% 20%, rgba(42,128,122,.34), transparent 30%), #062a28; }
.oauth-page::before { content: ""; position: fixed; inset: 0; background-image: linear-gradient(rgba(241,239,230,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(241,239,230,.04) 1px, transparent 1px); background-size: 52px 52px; }
.oauth-page::after { content: "AUTORIZAÇÃO"; position: fixed; top: 50%; left: 50%; color: transparent; -webkit-text-stroke: 2px rgba(241, 239, 230, .06); font-size: clamp(80px, 14vw, 220px); font-weight: 900; letter-spacing: -.02em; text-transform: uppercase; transform: translate(-50%, -50%) rotate(-6deg); pointer-events: none; }
.oauth-card { position: relative; z-index: 1; width: min(600px, 100%); border: 1px solid rgba(255,255,255,.18); border-radius: 20px; color: var(--ink); background: var(--paper); box-shadow: 0 28px 70px rgba(0,0,0,.28); }
.oauth-top { padding: 34px 38px 26px; border-bottom: 1.5px solid var(--ink); }
.oauth-brands { display: flex; align-items: center; justify-content: center; gap: 18px; }
.oauth-logo { display: grid; place-items: center; width: 64px; height: 64px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); font-family: var(--mono); font-size: 20px; font-weight: 700; box-shadow: 0 10px 22px rgba(8,60,58,.1); }
.oauth-logo img { width: 58px; height: 58px; object-fit: contain; }
.oauth-logo:last-child { color: #fff; background: var(--ink); box-shadow: 0 10px 22px rgba(8,60,58,.18); }
.oauth-link { width: 44px; height: 1.5px; background: var(--ink); }
.oauth-top h1 { margin: 26px 0 8px; font-size: 32px; font-weight: 900; letter-spacing: -.02em; text-align: center; text-transform: uppercase; }
.oauth-top p { margin: 0; color: var(--ink-3); font-family: var(--mono); font-size: 11px; text-align: center; }
.oauth-body { padding: 28px 38px 34px; }
.permission-list { display: grid; gap: 11px; margin: 18px 0 24px; }
.permission { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; padding: 12px 14px; border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--white); }
.permission-icon { display: grid; place-items: center; width: 38px; height: 38px; border: 1.5px solid var(--ink); border-radius: var(--radius); color: var(--paper); background: var(--ink); font-family: var(--mono); font-weight: 700; }
.permission strong, .permission small { display: block; }
.permission strong { font-size: 12px; font-weight: 800; text-transform: uppercase; }
.permission small { margin-top: 3px; color: var(--ink-3); font-family: var(--mono); font-size: 9.5px; line-height: 1.5; }
.oauth-account { padding: 12px 14px; border: 1.5px dashed var(--ink); border-radius: var(--radius); color: var(--ink-2); background: var(--paper-2); font-family: var(--mono); font-size: 10.5px; }
.oauth-actions { display: grid; grid-template-columns: 1fr 1.5fr; gap: 10px; margin-top: 20px; }
.oauth-footnote { margin: 18px 0 0; color: var(--ink-3); font-family: var(--mono); font-size: 9px; line-height: 1.6; text-align: center; text-transform: uppercase; }

/* ——— Toasts ——— */
.toast-host { position: fixed; z-index: 100; right: 24px; bottom: 24px; display: grid; gap: 10px; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 290px; padding: 14px 16px; border: 1.5px solid var(--ink); border-radius: var(--radius); color: var(--paper); background: var(--ink); box-shadow: 5px 5px 0 var(--accent); opacity: 0; transform: translateY(12px); transition: .2s; font-family: var(--mono); font-size: 10.5px; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast-dot { width: 9px; height: 9px; background: var(--accent); }
.toast.error { box-shadow: 5px 5px 0 #6e1308; }

/* ——— Entrada ——— */
.js-ready .reveal { animation: reveal .55s both cubic-bezier(.2, .72, .25, 1); }
.js-ready .reveal:nth-child(2) { animation-delay: .06s; }
.js-ready .reveal:nth-child(3) { animation-delay: .12s; }
@keyframes reveal { from { opacity: 0; transform: translateY(16px); } }

/* ————————————————————————————
   RESPONSIVO
———————————————————————————— */
@media (max-width: 1080px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .connector-card { min-height: 400px; }
  .table-head, .client-row { grid-template-columns: minmax(220px, 1.5fr) .7fr .8fr .45fr .45fr 28px; }
  .table-head > :nth-child(6), .client-row > :nth-child(6) { display: none; }
}

@media (max-width: 820px) {
  .login-body { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-panel { min-height: 100%; }
  .sidebar { display: none; }
  .app-main { margin-left: 0; }
  .mobile-brand { display: inline-flex; }
  .mobile-brand .brand-logo { width: 36px; height: 36px; }
  .mobile-brand .brand-copy { font-size: 12px; }
  .mobile-brand .brand-copy small { margin-top: 4px; font-size: 7px; }
  .topbar-leading .breadcrumb { display: none; }
  .oab-grid { grid-template-columns: 1fr; }
  .oab-slot { min-height: 190px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .heading-stat { display: none; }
  .table-wrap { overflow-x: auto; }
  .table-head, .client-row { min-width: 800px; }
}

@media (max-width: 560px) {
  .login-topline { padding: 14px 18px; }
  .topline-meta { display: none; }
  .login-panel { padding: 40px 22px; }
  .panel-title { font-size: 30px; }
  .login-footer { flex-direction: column; gap: 8px; }
  .content { padding: 24px 16px 54px; }
  .topbar { height: 64px; padding: 0 16px; }
  .environment { display: none; }
  .page-heading h1 { font-size: 34px; }
  .metrics { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric { min-height: 128px; padding: 16px; }
  .metric strong { font-size: 30px; }
  .panel-head, .panel-body { padding-right: 16px; padding-left: 16px; }
  .admin-hero { padding: 24px 20px; }
  .admin-metrics { grid-template-columns: 1fr 1fr; }
  .admin-metrics div:last-child { display: none; }
  .table-toolbar { align-items: stretch; flex-direction: column; }
  .search-box { max-width: none; }
  .oauth-page { padding: 16px; }
  .oauth-top, .oauth-body { padding-right: 22px; padding-left: 22px; }
  .oauth-actions { grid-template-columns: 1fr; }
  .oauth-actions .ghost { order: 2; }
  .toast-host { right: 12px; bottom: 12px; left: 12px; }
  .toast { min-width: 0; }
}
