/*
 * VÉRTICE — Interface (padrão do ecossistema e-Laborando)
 * Primária #131629 · Destaque #FB5200 · Fundo #FFFFFF · Tipografia Sora (SIL Open Font License)
 */
@font-face { font-family: 'Sora'; font-weight: 300; font-display: swap; src: url('../fonts/sora-latin-300-normal.woff2') format('woff2'); }
@font-face { font-family: 'Sora'; font-weight: 400; font-display: swap; src: url('../fonts/sora-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Sora'; font-weight: 500; font-display: swap; src: url('../fonts/sora-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Sora'; font-weight: 600; font-display: swap; src: url('../fonts/sora-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Sora'; font-weight: 700; font-display: swap; src: url('../fonts/sora-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Sora'; font-weight: 800; font-display: swap; src: url('../fonts/sora-latin-800-normal.woff2') format('woff2'); }

:root {
  --navy: #131629;
  --navy-2: #1c2042;
  --navy-3: #2a2f5c;
  --orange: #fb5200;
  --orange-hover: #e04800;
  --orange-soft: #fff1e8;
  --orange-ring: rgba(251, 82, 0, .22);
  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --bg-softer: #fafbfd;
  --line: #e7e9f1;
  --line-2: #d6dae6;
  --text: #131629;
  --text-2: #3f4566;
  --muted: #6b7192;
  --success: #0e9f6e;
  --success-soft: #e7f7f0;
  --danger: #d92d20;
  --danger-soft: #fdeceb;
  --warn: #b45309;
  --warn-soft: #fff6e5;
  --info: #2563eb;
  --info-soft: #eaf1ff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(19, 22, 41, .06);
  --shadow: 0 1px 2px rgba(19, 22, 41, .05), 0 10px 30px rgba(19, 22, 41, .07);
  --shadow-lg: 0 24px 60px rgba(19, 22, 41, .18);
  --font: 'Sora', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --sidebar: 252px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 400 14px/1.6 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--orange); text-decoration: none; font-weight: 500; }
a:hover { color: var(--orange-hover); }
h1, h2, h3, h4, h5 { margin: 0 0 .4em; line-height: 1.2; color: var(--text); font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: 30px; font-weight: 700; letter-spacing: -.025em; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
h4 { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-top: 18px; }
p { margin: 0 0 .8em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
code, kbd, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
code { background: var(--bg-soft); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; color: var(--text-2); word-break: break-all; }
kbd { background: var(--bg); border: 1px solid var(--line-2); border-bottom-width: 2px; padding: 0 6px; border-radius: 6px; color: var(--text); font-weight: 600; }
pre.path { background: var(--bg-soft); border: 1px dashed var(--line-2); padding: 12px 14px; border-radius: var(--radius-sm); white-space: pre-wrap; word-break: break-all; color: var(--navy); }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: middle; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.small-pad { padding: 4px 20px 14px; margin: 0; }
.block { display: block; }
.grow { flex: 1; min-width: 0; }
.nowrap { white-space: nowrap; }
.break { word-break: break-all; }
.upper { text-transform: uppercase; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row { display: flex; align-items: center; }
.row.gap, .gap { gap: 10px; }
.wrap { flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-lg { display: flex; flex-direction: column; gap: 20px; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--orange-ring); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--orange); color: #fff; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .16em; color: var(--orange); margin-bottom: 6px; }
.eyebrow::before { content: ''; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }

/* ---------- botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent; font: 600 14px var(--font); letter-spacing: -.005em; cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .06s; color: var(--text); background: var(--bg-soft); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 6px 16px rgba(251, 82, 0, .25); }
.btn-primary:hover:not(:disabled) { background: var(--orange-hover); color: #fff; }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover:not(:disabled) { background: var(--navy-2); color: #fff; }
.btn-ghost { background: var(--bg); border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover:not(:disabled) { border-color: var(--navy); color: var(--navy); }
.btn-danger { background: var(--danger-soft); border-color: #f6c7c3; color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: #fbdcd9; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-lg { height: 50px; padding: 0 26px; font-size: 15px; }
.btn-block { width: 100%; }
.btn.pulse { animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(251, 82, 0, .45); } 70% { box-shadow: 0 0 0 10px rgba(251, 82, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(251, 82, 0, 0); } }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--text-2); cursor: pointer; transition: background .15s, color .15s, border-color .15s; flex: none; font: 600 18px var(--font); text-decoration: none; }
.icon-btn:hover { background: var(--bg-soft); color: var(--navy); }
.icon-btn:disabled { opacity: .4; cursor: not-allowed; }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 8px; font-size: 16px; }
.icon-btn.danger:hover { color: var(--danger); background: var(--danger-soft); }
.icon-btn.fav.on, .fav.on { color: #f5a400; }
.icon-btn.fav.on .ico { fill: #f5a400; }
.link-btn { background: none; border: 0; color: var(--orange); cursor: pointer; padding: 0; font: 600 13px var(--font); }
.link-btn:hover { text-decoration: underline; }
.danger-text { color: var(--danger) !important; }

/* ---------- formulários ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.form.compact { gap: 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-2 > .span-2, .span-2 { grid-column: 1 / -1; }
label { display: flex; flex-direction: column; gap: 7px; font-weight: 600; font-size: 13px; color: var(--text); }
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]), select, textarea {
  width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 10px 13px; font: 400 14px var(--font); transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: #9aa0b8; }
input:hover:not(:focus):not([type=checkbox]):not([type=radio]), select:hover:not(:focus), textarea:hover:not(:focus) { border-color: #b8bed0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px var(--orange-ring); }
input:disabled, select:disabled, textarea:disabled { background: var(--bg-soft); color: var(--muted); }
textarea { resize: vertical; min-height: 70px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 55%, calc(100% - 12px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px !important; }
input[type=file] { font: 13px var(--font); color: var(--muted); max-width: 100%; }
input[type=file]::file-selector-button { background: var(--bg); color: var(--text); border: 1px solid var(--line-2); border-radius: 9px; padding: 7px 12px; margin-right: 10px; cursor: pointer; font: 600 12px var(--font); }
input[type=color] { width: 44px; height: 38px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg); padding: 3px; cursor: pointer; }
input[type=checkbox], input[type=radio] { accent-color: var(--orange); width: 17px; height: 17px; margin: 0; flex: none; }
input[type=range] { accent-color: var(--orange); width: 100%; }
label.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 500; color: var(--text-2); cursor: pointer; }
.hint { font-size: 12px; color: var(--muted); margin: 0; font-weight: 400; line-height: 1.5; }
.color-field { display: flex; align-items: center; gap: 12px; font-weight: 400; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; }
.seg label { flex-direction: row; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 9px; cursor: pointer; font-weight: 600; color: var(--muted); transition: background .15s, color .15s; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--bg); color: var(--navy); box-shadow: var(--shadow-sm); }
.seg label:has(input:focus-visible) { outline: 3px solid var(--orange-ring); }
.seg-block { display: flex; }
.seg-block label { flex: 1; justify-content: center; }
.seg-sm label { padding: 5px 10px; font-size: 12px; }
.switch { flex-direction: row; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; }
.switch input { position: absolute; opacity: 0; }
.switch span { width: 38px; height: 22px; border-radius: 22px; background: var(--line-2); position: relative; transition: background .15s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .15s; }
.switch input:checked + span { background: var(--orange); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 3px solid var(--orange-ring); }
.chip-check { flex-direction: row; display: inline-flex; cursor: pointer; }
.chip-check input { position: absolute; opacity: 0; }
.chip-check span { padding: 5px 12px; border-radius: 20px; border: 1px solid var(--line-2); font-weight: 500; font-size: 12px; color: var(--text-2); background: var(--bg); transition: all .15s; }
.chip-check input:checked + span { background: var(--orange-soft); border-color: var(--orange); color: var(--orange-hover); }
.chip-check input:focus-visible + span { outline: 3px solid var(--orange-ring); }
.agent-checks { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; display: flex; flex-wrap: wrap; gap: 6px; max-height: 170px; overflow: auto; }
.agent-checks legend { font-weight: 600; font-size: 13px; padding: 0 6px; }
.copy-field { display: flex; gap: 8px; }
.copy-field input { font-family: ui-monospace, monospace !important; font-size: 12px !important; }
.toggles { display: flex; flex-direction: column; gap: 9px; }

/* ---------- alertas ---------- */
.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; border: 1px solid; font-weight: 500; }
.alert-success { background: var(--success-soft); border-color: #b8e6d3; color: #0a6f4d; }
.alert-error { background: var(--danger-soft); border-color: #f6c7c3; color: #a8221a; }
.alert-warning { background: var(--warn-soft); border-color: #f7d9a4; color: var(--warn); }
.alert-info { background: var(--info-soft); border-color: #c9d9fb; color: #1d4ed8; }
.callout { background: var(--bg-soft); border: 1px solid var(--line); border-left: 4px solid var(--orange); border-radius: 12px; padding: 14px 18px; margin-bottom: 18px; display: flex; flex-direction: column; gap: 8px; }
.callout.warn { border-left-color: #f5a400; background: var(--warn-soft); border-color: #f7e2b8; color: #7a4206; }
.callout p { margin: 0; }
.banner { display: flex; align-items: center; gap: 10px; padding: 10px 32px; background: var(--warn-soft); border-bottom: 1px solid #f7e2b8; color: var(--warn); font-weight: 500; }
.banner form { display: inline; }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 1000; max-width: min(420px, calc(100vw - 40px)); }
.toast { background: var(--navy); color: #fff; padding: 12px 16px 12px 14px; border-radius: 12px; box-shadow: var(--shadow-lg); animation: toastIn .2s ease-out; font-weight: 500; border-left: 4px solid var(--orange); }
.toast-error { border-left-color: #ff5a4e; }
.toast.out { opacity: 0; transform: translateY(6px); transition: all .3s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

/* ---------- marca ---------- */
.brand { display: flex; align-items: center; gap: 10px; color: var(--navy); text-decoration: none !important; font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.brand .logo { width: 32px; height: 32px; color: var(--orange); }
.brand-lg { font-size: 24px; }
.brand-lg .logo { width: 40px; height: 40px; }
.brand-sm .logo { width: 28px; height: 28px; }
.brand small { display: block; font-size: 10px; font-weight: 500; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; margin-top: -2px; }
.legal-note { color: var(--muted); font-size: 11px; text-align: center; margin: 18px 0 0; }

/* ---------- layouts simples (instalador, erros, termos) ---------- */
body.bare { min-height: 100vh; background: linear-gradient(180deg, var(--bg-soft), var(--bg) 320px); }
.bare-wrap { max-width: 880px; margin: 0 auto; padding: 40px 20px 64px; display: flex; flex-direction: column; gap: 24px; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: 20px; padding: 32px; box-shadow: var(--shadow); }
.install h2 { margin-top: 20px; }
.install-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0; counter-reset: s; flex-wrap: wrap; }
.steps li { counter-increment: s; padding: 6px 14px 6px 6px; border-radius: 30px; background: var(--bg-soft); color: var(--muted); font-weight: 600; font-size: 12px; border: 1px solid var(--line); display: flex; align-items: center; }
.steps li::before { content: counter(s, decimal-leading-zero); display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--bg); margin-right: 8px; font-size: 11px; border: 1px solid var(--line); }
.steps li.on { color: var(--navy); border-color: var(--orange); background: var(--orange-soft); }
.steps li.on::before { background: var(--orange); color: #fff; border-color: var(--orange); }
.steps li.done::before { content: '✓'; background: var(--success-soft); color: var(--success); border-color: #b8e6d3; }
.checklist { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 7px; }
.checklist li { display: flex; align-items: center; gap: 10px; }
.checklist li.ok .ico { color: var(--success); }
.checklist li.bad { color: var(--danger); }
.checklist li.warn .ico { color: #e08a00; }
.sub { padding: 16px; border: 1px dashed var(--line-2); border-radius: 12px; }
.next { padding-left: 20px; }
.next li { margin-bottom: 6px; }
.error-card { text-align: center; padding: 56px 28px; }
.error-code { font-size: 104px; font-weight: 800; color: var(--orange); line-height: 1; letter-spacing: -.05em; }
.error-card .row { justify-content: center; }
.prose h2 { margin-top: 24px; }
.prose ul { padding-left: 20px; }

/* ---------- autenticação ---------- */
body.auth { min-height: 100vh; background: var(--bg); }
.auth-grid { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }
.auth-side { background: var(--navy); color: #fff; padding: 52px; display: flex; flex-direction: column; gap: 24px; position: relative; overflow: hidden; }
.auth-side::after { content: ''; position: absolute; width: 520px; height: 520px; right: -180px; top: -160px; border-radius: 50%; background: radial-gradient(closest-side, rgba(251, 82, 0, .35), transparent); pointer-events: none; }
.auth-side .brand { color: #fff; }
.auth-side h2 { color: #fff; font-size: 44px; line-height: 1.08; font-weight: 800; max-width: 480px; margin-top: 48px; letter-spacing: -.035em; }
.auth-side h2 em { font-style: normal; color: var(--orange); }
.auth-points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; color: rgba(255, 255, 255, .78); font-size: 15px; }
.auth-points li { display: flex; gap: 12px; align-items: center; }
.auth-points .ico { color: var(--orange); }
.auth-art { color: var(--orange); width: 100%; max-width: 460px; margin-top: auto; opacity: .9; position: relative; z-index: 1; }
.auth-main { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 22px; }
.auth-card { width: 100%; max-width: 410px; }
.auth-card h1 { font-size: 32px; }
.auth-switch { text-align: center; margin-top: 20px; color: var(--muted); }
.invite-box { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }

/* ---------- layout do app ---------- */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: var(--navy); color: #fff; display: flex; flex-direction: column; padding: 22px 14px 16px; z-index: 50; transition: transform .2s; }
.sidebar .brand { padding: 2px 10px 22px; color: #fff; }
.sidebar .brand small { color: rgba(255, 255, 255, .45); }
.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; overflow: auto; }
.nav-label { font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .38); padding: 14px 12px 6px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; color: rgba(255, 255, 255, .72); font-weight: 500; text-decoration: none; transition: background .15s, color .15s; position: relative; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.active { background: rgba(255, 255, 255, .09); color: #fff; font-weight: 600; }
.nav a.active::before { content: ''; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--orange); }
.nav a.active .ico { color: var(--orange); }
.nav a.nav-cta { background: var(--orange); color: #fff; font-weight: 600; margin: 0 0 10px; box-shadow: 0 8px 18px rgba(251, 82, 0, .3); }
.nav a.nav-cta:hover { background: var(--orange-hover); }
.nav a.nav-cta .ico { color: #fff; }
.sidebar-foot { display: flex; align-items: center; gap: 6px; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 14px; }
.sidebar-foot .icon-btn { color: rgba(255, 255, 255, .7); }
.sidebar-foot .icon-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.user-chip { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: #fff; text-decoration: none !important; padding: 6px; border-radius: 11px; }
.user-chip:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.user-chip span { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.user-chip b, .user-chip small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip b { font-weight: 600; font-size: 13px; }
.user-chip small { color: rgba(255, 255, 255, .5); font-size: 11px; }
.main { margin-left: var(--sidebar); min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 14px 32px; background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.crumbs { flex: 1; }
.top-search { display: flex; align-items: center; gap: 8px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; width: min(380px, 42vw); transition: border-color .15s, box-shadow .15s; }
.top-search:focus-within { border-color: var(--orange); box-shadow: 0 0 0 4px var(--orange-ring); background: var(--bg); }
.top-search input { border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 9px 0 !important; }
.top-search .ico { color: var(--muted); }
.content { padding: 30px 32px 48px; flex: 1; width: 100%; max-width: 1480px; }
.app-foot { padding: 18px 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; display: flex; gap: 18px; flex-wrap: wrap; }
.app-foot span { flex: 1; }
.app-foot a { color: var(--text-2); }
.mobile-only { display: none; }
.sidebar-backdrop { display: none; }

/* ---------- componentes ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 { margin-bottom: 4px; }
.page-head p { margin: 0; max-width: 680px; }
.page-head .ico { color: var(--orange); }
/* Ícones dentro de botões herdam a cor do texto do botão (antes ficavam laranja sobre laranja no botão primário) */
.btn .ico, .page-head .btn .ico { color: currentColor; }
.btn-ghost .ico { color: var(--orange); }
.btn-ghost.danger-text .ico, .btn-danger .ico { color: currentColor; }
.page-head.compact { margin: 8px 0 18px; }
.page-head.compact h2 { font-size: 20px; margin-bottom: 2px; }
.panel { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.panel.narrow { max-width: 780px; padding: 24px; }
.panel.form, section.panel.grid-2 { padding: 22px; }
.panel .pad { padding: 18px 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 700; }
.panel-head h2 .ico { color: var(--orange); }
.panel-head a { font-size: 13px; }
.panel > .form, .panel > form.form { padding: 20px; }
.panel .avatar-edit { padding: 20px 20px 0; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 20px; align-items: start; }
.grid-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(290px, 1fr); gap: 20px; align-items: start; }
.grid-2-eq { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; position: relative; overflow: hidden; box-shadow: var(--shadow-sm); }
.stat::after { content: ''; position: absolute; right: 18px; top: 20px; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); opacity: .8; }
.stat span { font-size: 34px; font-weight: 800; line-height: 1.05; color: var(--navy); letter-spacing: -.03em; }
.stat small { color: var(--muted); margin-top: 4px; font-weight: 500; }
.empty { text-align: center; padding: 36px 24px; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text-2); }
.empty h3 { margin: 8px 0 0; font-size: 17px; }
.empty p { color: var(--muted); max-width: 440px; }
.empty.big { padding: 64px 24px; background: var(--bg-softer); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.empty.small { padding: 16px; }
.empty-ico { width: 52px; height: 52px; color: var(--orange); stroke-width: 1.5; padding: 12px; background: var(--orange-soft); border-radius: 16px; box-sizing: content-box; }
.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 13px 20px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row form { margin: 0; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; background: var(--bg-soft); color: var(--text-2); white-space: nowrap; border: 1px solid var(--line); }
.badge .ico { width: 12px; height: 12px; }
.badge-draft { background: var(--bg-soft); color: var(--text-2); }
.badge-review { background: var(--warn-soft); color: var(--warn); border-color: #f7e2b8; }
.badge-approved, .badge-ok { background: var(--success-soft); color: #0a7a55; border-color: #c4ebd9; }
.badge-archived { background: var(--danger-soft); color: var(--danger); border-color: #f6c7c3; }
.badge-owner, .badge-accent { background: var(--orange-soft); color: var(--orange-hover); border-color: #ffd5bd; }
.tag { color: var(--info); font-size: 12px; font-weight: 500; }
.tag-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--orange)); margin-right: 5px; vertical-align: 0; }
.map-chip { display: inline-grid; place-items: center; min-width: 44px; height: 36px; padding: 0 6px; border-radius: 10px; background: var(--navy); font-weight: 700; letter-spacing: .06em; color: #fff; font-size: 11px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; }
.avatar-fallback { display: inline-grid; place-items: center; background: color-mix(in srgb, var(--c, var(--navy)) 18%, #ffffff); color: var(--navy); font-weight: 700; font-size: 12px; border: 1px solid var(--line); }
.sidebar .avatar-fallback { background: var(--orange); color: #fff; border: 0; }
.avatar.lg { width: 54px; height: 54px; font-size: 16px; }
.avatar.xl { width: 88px; height: 88px; font-size: 26px; }
.avatar-edit { display: flex; align-items: center; gap: 18px; }
.team-logo { width: 40px; height: 40px; border-radius: 11px; object-fit: cover; flex: none; border: 1px solid var(--line); }
.team-logo-fallback { display: inline-grid; place-items: center; background: var(--c); color: #fff; border: 0; font-weight: 800; letter-spacing: .02em; font-size: 12px; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.team-logo.lg { width: 58px; height: 58px; font-size: 16px; border-radius: 15px; }
.team-logo.xl { width: 96px; height: 96px; font-size: 26px; border-radius: 22px; }
.strat-row { display: flex; align-items: center; gap: 14px; padding: 13px 20px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none !important; transition: background .12s; font-weight: 400; }
.strat-row:hover { background: var(--bg-softer); color: var(--text); }
.strat-row:last-child { border-bottom: 0; }
.strat-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.strat-main b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.strat-main small { color: var(--muted); }
.team-mini, .player-mini { display: flex; align-items: center; gap: 12px; padding: 11px 20px; color: var(--text); text-decoration: none !important; font-weight: 400; }
.team-mini:hover { background: var(--bg-softer); color: var(--text); }
.team-mini span, .player-mini span { display: flex; flex-direction: column; min-width: 0; }
.team-mini b, .player-mini b { font-weight: 600; }
.team-mini small, .player-mini small { color: var(--muted); }
.fav-line { display: flex; align-items: center; gap: 8px; padding: 10px 20px; color: var(--text); font-weight: 500; }
.fav-line .ico { color: #f5a400; width: 15px; height: 15px; }
.fav-line small { color: var(--muted); margin-left: auto; }
.danger-zone { border-color: #f6c7c3; }
.danger-zone .panel-head h2 .ico { color: var(--danger); }
.danger-zone > p { padding: 16px 20px 0; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 11px 15px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none; display: flex; align-items: center; gap: 6px; margin-bottom: -1px; transition: color .15s; }
.tabs a:hover { color: var(--navy); }
.tabs a.active { color: var(--navy); border-bottom-color: var(--orange); }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 600; background: var(--bg-softer); }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table.small td { font-size: 12px; padding: 8px 12px; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--bg-softer); }
.panel .table { display: block; overflow-x: auto; }
.info-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 20px; border-bottom: 1px solid var(--line); font-size: 13px; }
.info-row span { color: var(--muted); }
.info-row b { text-align: right; font-weight: 600; }
.pager { display: flex; gap: 6px; justify-content: center; padding: 20px 0; flex-wrap: wrap; }
.pager a { min-width: 36px; height: 36px; display: inline-grid; place-items: center; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); color: var(--text-2); text-decoration: none; }
.pager a:hover { border-color: var(--navy); color: var(--navy); }
.pager a.active { background: var(--navy); color: #fff; border-color: var(--navy); font-weight: 700; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding: 20px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.bar span { width: 100%; max-width: 26px; background: linear-gradient(180deg, var(--orange), #ff8a4c); border-radius: 5px 5px 0 0; }
.bar small { font-size: 10px; color: var(--muted); }

/* menus */
details.menu { position: relative; }
details.menu > summary { list-style: none; cursor: pointer; }
details.menu > summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 60; display: flex; flex-direction: column; }
.menu-pop.wide { min-width: 290px; gap: 8px; padding: 12px; }
.menu-pop > a, .menu-pop > button, .menu-pop > form > button:not(.btn) { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 9px; color: var(--text); background: none; border: 0; font: 500 13px var(--font); cursor: pointer; text-align: left; text-decoration: none; width: 100%; }
.menu-pop > a:hover, .menu-pop > button:hover, .menu-pop > form > button:not(.btn):hover { background: var(--bg-soft); color: var(--navy); }
.menu-pop .danger { color: var(--danger); }
.menu-pop .ico { width: 16px; height: 16px; color: var(--muted); }

/* diálogos */
.dialog { background: var(--bg); color: var(--text); border: 0; border-radius: 20px; padding: 24px; width: min(480px, calc(100vw - 24px)); box-shadow: var(--shadow-lg); }
.dialog.wide { width: min(760px, calc(100vw - 24px)); }
.dialog::backdrop { background: rgba(19, 22, 41, .55); backdrop-filter: blur(3px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dialog-head h3 { margin: 0; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.dialog-head h3 .ico { color: var(--orange); }
.dialog .list-row { padding: 11px 4px; }

/* times */
.team-header { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; padding: 22px; border-radius: 20px; background: var(--navy); color: #fff; flex-wrap: wrap; position: relative; overflow: hidden; }
.team-header::after { content: ''; position: absolute; inset: auto -80px -140px auto; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--team) 60%, transparent), transparent); pointer-events: none; }
.team-header .team-logo { border-color: rgba(255, 255, 255, .15); }
.team-title { flex: 1; min-width: 200px; position: relative; z-index: 1; }
.team-title h1 { margin: 0; color: #fff; font-size: 28px; }
.team-title p { margin: 2px 0 0; color: rgba(255, 255, 255, .7) !important; }
.team-title b { color: #fff; }
.team-tag { color: var(--orange); font-size: .62em; font-weight: 700; letter-spacing: .04em; vertical-align: middle; }
.team-header .btn { position: relative; z-index: 1; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.team-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; color: var(--text); text-decoration: none !important; display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden; transition: border-color .15s, transform .15s, box-shadow .15s; font-weight: 400; box-shadow: var(--shadow-sm); }
.team-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--team, var(--orange)); }
.team-card:hover { border-color: var(--line-2); transform: translateY(-3px); box-shadow: var(--shadow); color: var(--text); }
.team-card h3 { margin: 6px 0 0; font-size: 18px; }
.team-card h3 small { color: var(--muted); font-weight: 600; }
.team-card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.team-card-stats { display: flex; gap: 16px; color: var(--muted); font-size: 12px; margin-top: auto; flex-wrap: wrap; }
.team-card-stats .ico { width: 14px; height: 14px; color: var(--orange); }
.team-card-new { align-items: center; justify-content: center; border-style: dashed; color: var(--muted); min-height: 176px; background: var(--bg-softer); }
.team-card-new::before { display: none; }
.team-card-new .ico { width: 30px; height: 30px; color: var(--orange); }
.group-title { margin: 22px 0 12px; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--text-2); }
.group-title small { color: var(--muted); font-weight: 500; }
.group-title .ico { color: var(--orange); }
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.player-card { display: flex; gap: 14px; background: var(--bg); border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: var(--radius); padding: 16px; position: relative; box-shadow: var(--shadow-sm); }
.player-card.dragging { opacity: .5; }
.player-card .drag { cursor: grab; color: var(--muted); align-self: center; }
.player-info { flex: 1; min-width: 0; }
.player-info h4 { margin: 0; font-size: 16px; text-transform: none; letter-spacing: -.01em; color: var(--text); display: flex; gap: 8px; align-items: center; font-weight: 700; }
.player-info p { margin: 3px 0; font-size: 12px; }
.player-actions { display: flex; flex-direction: column; gap: 2px; }
.player-actions form { margin: 0; }
.inline-upload label { cursor: pointer; }
.notes { color: var(--text-2); background: var(--bg-soft); padding: 6px 9px; border-radius: 8px; display: flex; gap: 6px; }
.notes .ico { width: 14px; height: 14px; color: var(--muted); margin-top: 2px; }
.agents-line { display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); }
.agents-line b { color: var(--text); }
.role-pill { display: inline-block; padding: 1px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; background: var(--bg-soft); color: var(--text-2); margin-right: 4px; border: 1px solid transparent; }
.role-duelist { background: #fff0ea; color: #d14a14; }
.role-initiator { background: #e7f7f0; color: #0a7a55; }
.role-controller { background: #f0eeff; color: #5b47d6; }
.role-sentinel { background: #e8f5ff; color: #0b6fb0; }
.role-pill.ghost { background: transparent; border-color: var(--line-2); }
.roles-help { padding: 0 20px 18px; color: var(--text-2); }
.roles-help summary { cursor: pointer; color: var(--orange); font-weight: 600; }
.roles-help ul { padding-left: 18px; font-size: 13px; }
.comp-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-sm); }
.comp-card header { display: flex; align-items: center; gap: 10px; }
.comp-card header h3 { margin: 0; }
.comp-card header form { margin: 0; }
.comp-slots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.comp-slot { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; font-size: 11px; min-width: 0; }
.comp-slot b { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.comp-slot small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.agent-dot { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; font-weight: 800; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
.agent-dot img { width: 100%; height: 100%; object-fit: cover; }

/* biblioteca */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.filters select { width: auto !important; min-width: 150px; padding-top: 8px !important; padding-bottom: 8px !important; font-size: 13px !important; }
.search-field { flex-direction: row; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 0 12px; flex: 1 1 260px; }
.search-field:focus-within { border-color: var(--orange); box-shadow: 0 0 0 4px var(--orange-ring); }
.search-field input { border: 0 !important; box-shadow: none !important; background: transparent !important; padding: 9px 0 !important; }
.search-field .ico { color: var(--muted); }
.fav-filter .ico { width: 15px; height: 15px; color: #f5a400; }
.library.with-folders { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; align-items: start; }
.folders { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 84px; }
.folders h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); display: flex; gap: 6px; align-items: center; margin: 2px 6px 10px; }
.folders > a, .folder-row > a { display: flex; align-items: center; gap: 8px; padding: 8px 9px; border-radius: 9px; color: var(--text-2); text-decoration: none; flex: 1; min-width: 0; font-weight: 500; }
.folders > a:hover, .folder-row > a:hover { background: var(--bg-soft); color: var(--navy); }
.folders > a.active, .folder-row.active > a { background: var(--orange-soft); color: var(--orange-hover); }
.folder-row { display: flex; align-items: center; }
.folder-row small { margin-left: auto; color: var(--muted); }
.folders .ico { width: 15px; height: 15px; }
.new-folder { display: flex; gap: 4px; margin-top: 10px; }
.new-folder input { padding: 7px 9px !important; font-size: 13px !important; }
.results-count { margin: 0 0 12px; font-size: 12px; }
.strat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.strat-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); position: relative; transition: border-color .15s, transform .15s, box-shadow .15s; box-shadow: var(--shadow-sm); }
.strat-card:hover { border-color: var(--line-2); transform: translateY(-3px); box-shadow: var(--shadow); }
.strat-card-link { display: flex; flex-direction: column; gap: 6px; padding: 16px 16px 14px; color: var(--text); text-decoration: none !important; min-height: 100%; font-weight: 400; }
.strat-card-link:hover { color: var(--text); }
.strat-card-link h3 { margin: 4px 0 0; font-size: 16px; padding-right: 56px; }
.strat-card-link p { margin: 0; font-size: 13px; }
.strat-card-top { display: flex; align-items: center; gap: 8px; padding-right: 64px; }
.strat-card-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--text-2); margin-top: 8px; align-items: center; }
.strat-card-meta .ico { width: 13px; height: 13px; }
.strat-card-actions { position: absolute; top: 12px; right: 12px; display: flex; gap: 2px; }
.side { font-size: 12px; font-weight: 600; }
.side-attack { color: #d14a14; }
.side-defense { color: #0b6fb0; }
.agents-line.small { font-size: 12px; }

/* playbook */
.pb-map { margin-bottom: 24px; }
.pb-side { margin: 12px 0 8px; }
.pb-list { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }
.pb-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.pb-item:last-child { border-bottom: 0; }
.pb-item a { color: var(--text); text-decoration: none; display: flex; flex-direction: column; font-weight: 600; }
.pb-item a small { font-weight: 400; }
.pb-item .drag { cursor: grab; color: var(--muted); }
.pb-item.dragging { opacity: .5; }

/* criar estratégia */
.create-form { display: flex; flex-direction: column; gap: 20px; max-width: 1120px; }
.create-form .panel { padding: 22px; }
.step-title { display: flex; align-items: center; gap: 12px; font-size: 17px; margin-bottom: 16px; }
.step-title span { min-width: 32px; height: 32px; border-radius: 10px; display: inline-grid; place-items: center; background: var(--navy); color: #fff; font-size: 12px; font-weight: 700; padding: 0 6px; }
.map-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.map-option { position: relative; cursor: pointer; }
.map-option input { position: absolute; opacity: 0; }
.map-thumb { display: flex; flex-direction: column; justify-content: flex-end; height: 120px; border-radius: 14px; padding: 12px; background: var(--navy); background-size: 120%; background-position: center; border: 2px solid var(--line); position: relative; overflow: hidden; transition: border-color .15s, transform .15s; }
.map-thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(19, 22, 41, .92), rgba(19, 22, 41, .15) 70%); }
.map-thumb b, .map-thumb small { position: relative; z-index: 1; }
.map-thumb b { font-size: 16px; font-weight: 700; color: #fff; letter-spacing: -.01em; }
.map-thumb small { color: var(--orange); font-size: 11px; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.map-thumb small::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.map-option:hover .map-thumb { transform: translateY(-2px); }
.map-option input:checked + .map-thumb { border-color: var(--orange); box-shadow: 0 0 0 4px var(--orange-ring); }
.map-option input:focus-visible + .map-thumb { outline: 3px solid var(--orange-ring); }

/* admin */
.admin-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 16px; }
.admin-card { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.admin-card h3 { margin: 0; }
.map-prev { height: 140px; border-radius: 12px; background: var(--navy) center / contain no-repeat; border: 1px solid var(--line); display: grid; place-items: center; color: rgba(255, 255, 255, .6); font-size: 12px; }
.agent-ico { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; background: var(--navy); }
.agent-ico.fallback { display: grid; place-items: center; background: var(--c); color: #fff; font-weight: 800; }
.admin-card details { border-top: 1px solid var(--line); padding-top: 10px; }
.admin-card details summary { cursor: pointer; font-size: 13px; font-weight: 600; }
.admin-card .list-row { padding: 6px 0; }
.admin-card .row.wrap input[name="name"] { min-width: 120px; }
.admin-card .row.wrap select { width: auto; }
.ability-mini { width: 26px; height: 26px; border-radius: 7px; background: var(--navy); padding: 3px; flex: none; }
.sync-panel { padding: 20px; margin-bottom: 20px; background: linear-gradient(120deg, var(--bg), var(--orange-soft)); }
.sync-head { display: flex; gap: 20px; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; }
.sync-head > div:first-child { flex: 1 1 420px; }
.sync-head h2 { margin: 0 0 4px; }
.sync-head p { margin: 0; }
.sync-actions { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.sync-progress { height: 8px; background: var(--line); border-radius: 8px; margin-top: 16px; overflow: hidden; }
.sync-progress span { display: block; height: 100%; width: 3%; background: var(--orange); transition: width .3s; }
.sync-log { list-style: none; margin: 12px 0 0; padding: 10px 14px; max-height: 170px; overflow: auto; background: var(--navy); color: rgba(255, 255, 255, .8); border-radius: 12px; font: 12px/1.6 ui-monospace, monospace; }
.sync-log li.ok { color: #6ee7b7; }
.sync-log li.err { color: #fca5a5; }

/* ---------- estúdio de composições ---------- */
.studio { display: grid; grid-template-columns: 260px minmax(360px, 430px) minmax(0, 1fr); gap: 20px; align-items: start; }
.studio-side { position: sticky; top: 84px; max-height: calc(100vh - 110px); display: flex; flex-direction: column; }
.studio-side-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 20px 10px; border-bottom: 1px solid var(--line); }
.studio-side-head .eyebrow { margin: 0; }
.comp-list { overflow: auto; padding: 8px 10px 14px; display: flex; flex-direction: column; gap: 4px; }
.comp-map-title { display: flex; align-items: center; gap: 8px; margin: 12px 8px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.comp-map-title img { width: 20px; height: 20px; border-radius: 5px; background: var(--navy); }
.comp-item { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid transparent; background: none; cursor: pointer; font: inherit; color: var(--text); transition: background .15s, border-color .15s; }
.comp-item:hover { background: var(--bg-soft); }
.comp-item.active { background: var(--orange-soft); border-color: #ffd5bd; }
.comp-item-name { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.comp-item-name b { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comp-item-agents { display: flex; gap: 4px; }
.comp-item-agents img, .comp-item-agents i { width: 26px; height: 26px; border-radius: 8px; background: var(--navy); object-fit: cover; font-style: normal; font-size: 10px; font-weight: 700; color: #fff; display: grid; place-items: center; }
.comp-item-agents i { background: var(--c, var(--line-2)); }
.comp-item-agents i.empty { background: var(--bg-soft); color: var(--muted); border: 1px dashed var(--line-2); }
.studio-form .pad { padding: 20px; }
.form-section { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.form-section h2 { margin: 0; font-size: 16px; }
.step-n { font-size: 11px; font-weight: 800; color: var(--orange); letter-spacing: .08em; padding: 3px 7px; border-radius: 7px; background: var(--orange-soft); }
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.map-tile { display: flex; flex-direction: column; gap: 5px; padding: 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; font: inherit; transition: border-color .15s, box-shadow .15s; }
.map-tile:hover { border-color: var(--line-2); }
.map-tile.on { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-ring); }
.map-tile-img { aspect-ratio: 1; border-radius: 8px; background: var(--navy); display: grid; place-items: center; overflow: hidden; }
.map-tile-img img { width: 92%; height: 92%; object-fit: contain; }
.map-tile-name { font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 5px; color: var(--text); }
.rot-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); display: inline-block; }
.slots { display: flex; flex-direction: column; gap: 8px; }
.slot { display: grid; grid-template-columns: 26px minmax(0, 1.2fr) minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.slot-n { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--navy); color: #fff; font-size: 12px; font-weight: 700; }
.slot-agent { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg); cursor: pointer; text-align: left; font: inherit; min-width: 0; transition: border-color .15s; }
.slot-agent:hover { border-color: var(--navy); }
.slot-agent img, .slot-agent .agent-ini, .slot-agent .plus { width: 38px; height: 38px; border-radius: 10px; background: var(--navy); object-fit: cover; flex: none; }
.slot-agent .plus { display: grid; place-items: center; background: var(--orange-soft); color: var(--orange); font-size: 20px; font-weight: 700; }
.slot-agent.empty { border-style: dashed; }
.slot-agent-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.slot-agent-txt b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-agent-txt small { font-size: 11px; color: var(--muted); }
.agent-ini { display: grid; place-items: center; background: var(--c, var(--navy)); color: #fff; font-weight: 800; font-size: 12px; }
.format-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.format-tile { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; font: inherit; text-align: left; transition: border-color .15s, box-shadow .15s; }
.format-tile:hover { border-color: var(--line-2); }
.format-tile.on { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-ring); }
.format-tile b { display: block; font-size: 12px; font-weight: 600; }
.format-tile small { font-size: 11px; color: var(--muted); }
.format-shape { border-radius: 4px; background: var(--navy); border: 2px solid var(--orange); flex: none; }
.sticky-actions { position: sticky; bottom: 0; background: var(--bg); padding: 14px 0 2px; border-top: 1px solid var(--line); margin-top: 6px; }
.studio-preview { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 12px; }
.preview-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.preview-head .eyebrow { display: flex; margin: 0; }
.preview-head b { font-size: 13px; font-weight: 600; }
.preview-frame { width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: repeating-conic-gradient(#eef0f5 0 25%, #fff 0 50%) 50% / 20px 20px; border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; place-items: center; }
.preview-frame.tall { width: auto; height: min(70vh, 760px); margin: 0 auto; }
.preview-frame canvas { width: 100%; height: 100%; display: block; }
.export-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mini-field { flex-direction: row; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 600; }
.mini-field select, .mini-field input { width: auto !important; padding: 7px 30px 7px 10px !important; font-size: 13px !important; }
.agent-picker h5 { margin: 14px 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.picker-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.picker-agent { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; font: inherit; position: relative; transition: border-color .15s, transform .15s; }
.picker-agent:hover:not(:disabled) { border-color: var(--c); transform: translateY(-2px); }
.picker-agent img, .picker-agent .agent-ini { width: 54px; height: 54px; border-radius: 12px; background: var(--navy); object-fit: cover; }
.picker-agent small { font-size: 11px; font-weight: 600; }
.picker-agent em { position: absolute; top: 4px; right: 4px; font-style: normal; font-size: 9px; font-weight: 700; background: var(--orange); color: #fff; padding: 1px 5px; border-radius: 6px; }
.picker-agent.pref { border-color: #ffd5bd; background: var(--orange-soft); }
.picker-agent:disabled { opacity: .35; cursor: not-allowed; }

/* ---------- responsivo ---------- */
@media (max-width: 1380px) {
  .studio { grid-template-columns: 240px minmax(0, 1fr); }
  .studio-preview { grid-column: 1 / -1; position: static; }
  .preview-frame.tall { height: min(80vh, 900px); }
}
@media (max-width: 1100px) {
  .grid-main { grid-template-columns: 1fr; }
  .library.with-folders { grid-template-columns: 1fr; }
  .folders, .studio-side { position: static; max-height: none; }
  .grid-2-eq { grid-template-columns: 1fr; }
  .studio { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .auth-grid { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}
@media (max-width: 860px) {
  :root { --sidebar: 268px; }
  .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(19, 22, 41, .5); z-index: 40; }
  .main { margin-left: 0; }
  .mobile-only { display: inline-grid; }
  .topbar { padding: 10px 14px; }
  .content { padding: 20px 16px 32px; }
  .top-search { width: auto; flex: 1; }
  .crumbs { display: none; }
  .settings-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  h1 { font-size: 25px; }
  .roster { grid-template-columns: 1fr; }
  .comp-slots { grid-template-columns: repeat(3, 1fr); }
  .filters select { flex: 1 1 140px; }
  .format-grid { grid-template-columns: 1fr; }
  .slot { grid-template-columns: 26px 1fr auto; }
  .slot select { grid-column: 2 / 3; }
  .team-header { padding: 18px; }
}

/* 1.2 — Estúdio de Arte como ponto de entrada das composições */
.tabs a[data-studio-link] .ico { width: 15px; height: 15px; color: var(--orange); }
#st-team-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; font-size: 12px; text-decoration: none; }
#st-team-link .ico { width: 14px; height: 14px; }
.team-actions { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }
.team-header .btn-on-dark { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .22); color: #fff; }
.team-header .btn-on-dark:hover { background: rgba(255, 255, 255, .16); border-color: var(--orange); }
.team-header .btn-on-dark .ico { color: var(--orange); }

/* ===================== v1.0 — Estúdio de Arte: estrutura dos componentes (sem esconder conteúdo) */
.studio > * { min-width: 0; }
.studio-side-head { flex-wrap: wrap; gap: 8px 10px; padding: 6px 16px 12px; }
.studio-side-head .eyebrow { flex: 1 1 auto; min-width: 0; }
.studio-side-head .btn { flex: 1 1 100%; justify-content: center; white-space: nowrap; min-width: 0; }
.slot > * { min-width: 0; }
.slot select { width: 100%; min-width: 0; max-width: 100%; text-overflow: ellipsis; }
.slot-agent { width: 100%; }
.slot-agent-txt small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.color-field { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.export-row .btn { flex: 0 1 auto; min-width: 0; white-space: nowrap; }
@media (max-width: 520px) {
  .slot { grid-template-columns: 26px minmax(0, 1fr) auto; grid-template-areas: "n a c" "n p c"; row-gap: 6px; }
  .slot .slot-n { grid-area: n; } .slot .slot-agent { grid-area: a; } .slot select { grid-area: p; } .slot .icon-btn { grid-area: c; }
  .format-grid { grid-template-columns: 1fr; }
  .export-row .btn { flex: 1 1 100%; justify-content: center; }
}

/* ===================== v1.0 — aba Composições do time (biblioteca) */
.comps-head { align-items: flex-end; }
.comps-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
#lib-select.on { border-color: var(--orange); color: var(--orange); background: var(--orange-soft); }
.comps-selbar { position: sticky; top: 72px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; margin-bottom: 16px; border-radius: 14px; background: var(--navy); color: #fff; box-shadow: var(--shadow-lg); }
.comps-selbar .muted { color: rgba(255, 255, 255, .65) !important; }
.comps-selbar .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .25); background: transparent; }
.comps-map { margin-bottom: 26px; }
.comps-map-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.comps-map-head img { width: 34px; height: 34px; border-radius: 9px; background: var(--navy); object-fit: contain; padding: 3px; }
.comps-map-head h3 { margin: 0; font-size: 17px; }
.comps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.comp-card2 { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); overflow: hidden; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; min-width: 0; }
.comp-card2:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.comp-card2.selected { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-ring); }
.comp-thumb { display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; background: var(--navy); cursor: pointer; }
.comp-thumb canvas { width: 100%; height: 100%; display: block; }
.comp-check { position: absolute; top: 10px; left: 10px; display: none; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 10px; background: rgba(19, 22, 41, .82); color: #fff; cursor: pointer; }
.comps-lib.selecting .comp-check { display: flex; }
.comp-check input { width: 16px; height: 16px; accent-color: var(--orange); margin: 0; }
.comp-order { font-size: 12px; font-weight: 800; min-width: 10px; color: var(--orange); }
.comp-card-body { padding: 12px 14px 8px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.comp-card-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.comp-card-title b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.comp-card-agents { display: flex; gap: 5px; margin-top: 6px; flex-wrap: wrap; }
.comp-card-agents img, .comp-card-agents i { width: 28px; height: 28px; border-radius: 8px; background: var(--navy); object-fit: cover; font-style: normal; font-size: 10px; font-weight: 700; color: #fff; display: grid; place-items: center; }
.comp-card-agents i { background: var(--c, var(--line-2)); }
.comp-card-agents i.empty { background: var(--bg-soft); color: var(--muted); border: 1px dashed var(--line-2); }
.comp-card-actions { display: flex; gap: 4px; padding: 6px 10px 10px; justify-content: flex-end; border-top: 1px solid var(--line); margin-top: auto; }
.comps-dialog .form { gap: 14px; }
.dialog.xwide { width: min(1240px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: auto; }
.comps-preview { width: 100%; border-radius: 14px; overflow: hidden; background: repeating-conic-gradient(#eef0f5 0 25%, #fff 0 50%) 50% / 20px 20px; border: 1px solid var(--line); display: grid; place-items: center; }
.comps-preview canvas { width: 100%; height: auto; display: block; }
.comps-preview.tall { max-height: 66vh; }
.comps-preview.tall canvas { width: auto; max-width: 100%; max-height: 66vh; }
.multi-wrap { display: flex; flex-direction: column; gap: 14px; }
.multi-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: start; }
.multi-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.multi-side h4 { margin: 4px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.multi-order { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow: auto; }
.multi-order li { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); cursor: grab; min-width: 0; }
.multi-order li.drag { opacity: .5; }
.multi-order .n { width: 22px; height: 22px; border-radius: 7px; background: var(--navy); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; flex: none; }
.multi-order .grow { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.multi-order b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.multi-formats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.multi-formats .format-tile { padding: 8px 10px; }
.multi-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.multi-info { font-size: 13px; }
label.inline { flex-direction: row; align-items: center; gap: 8px; }
label.inline select { width: auto; }
@media (max-width: 900px) {
  .multi-grid { grid-template-columns: 1fr; }
  .comps-head { align-items: flex-start; }
  .comps-actions { justify-content: flex-start; }
}

/* ===================== v1.0 — Configurações: envio da foto de perfil */
.avatar-upload { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px; min-width: 0; }
.avatar-upload .avatar-preview { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; background: var(--bg-soft); border: 1px solid var(--line); flex: none; }
.avatar-upload .avatar-fields { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.avatar-upload form { position: relative; }
.avatar-upload .avatar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 520px) { .avatar-upload { grid-template-columns: 1fr; justify-items: start; } }

/* Painel de propriedades — valor das medidas táticas */
.prop-value { font-weight: 700; color: var(--orange); margin-left: 4px; }
.sr-file, input.sr-file { position: absolute; left: 0; top: 0; width: 1px !important; height: 1px !important; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sr-file:focus-visible + label { outline: 3px solid var(--orange-ring); outline-offset: 2px; }
.panel .avatar-upload { padding: 20px 20px 0; }
.avatar-upload label.btn { flex-direction: row; align-items: center; gap: 6px; margin: 0; }
