/* Central de Links · Trincheira — visual "liquid glass" na paleta da marca */

:root {
  color-scheme: light;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --bg: #E6E6E6;
  --ink: #080B17;
  --ink-2: #3A4252;
  --ink-3: #7A808C;
  --glass-a: rgba(255, 255, 255, .62);
  --glass-b: rgba(255, 255, 255, .34);
  --solid-a: rgba(250, 249, 247, .94);
  --solid-b: rgba(240, 239, 236, .86);
  --rim-1: rgba(255, 255, 255, .95);
  --rim-2: rgba(255, 255, 255, .18);
  --edge: rgba(255, 255, 255, .55);
  --hair: rgba(8, 11, 23, .1);
  --field: rgba(8, 11, 23, .055);
  --field-2: rgba(8, 11, 23, .1);
  --shadow: 0 1px 2px rgba(8, 11, 23, .05), 0 14px 34px -14px rgba(8, 11, 23, .25);
  --shadow-up: 0 2px 4px rgba(8, 11, 23, .06), 0 24px 48px -18px rgba(8, 11, 23, .35);
  --accent: #A7835B;
  --accent-2: #BC9A72;
  --accent-ink: #fff;
  --ok: #A7835B;
  --warn: #8A6A45;
  --warn-bg: rgba(167, 131, 91, .14);
  --bad: #C0473A;
  --blob1: #CFB399;
  --blob2: #C3C9D4;
  --blob3: #A7835B;
  --blob4: #D5D9E0;
  --blob-o: .6;
  --blob3-o: .28;
  --overlay: rgba(8, 11, 23, .22);
  --tile-a: #2A3448;
  --tile-b: #080B17;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #080B17;
    --ink: #E6E6E6;
    --ink-2: #B9BDC6;
    --ink-3: #7D8494;
    --glass-a: rgba(33, 42, 59, .58);
    --glass-b: rgba(1, 23, 34, .42);
    --solid-a: rgba(33, 42, 59, .94);
    --solid-b: rgba(18, 26, 40, .9);
    --rim-1: rgba(230, 230, 230, .2);
    --rim-2: rgba(230, 230, 230, .03);
    --edge: rgba(230, 230, 230, .08);
    --hair: rgba(230, 230, 230, .09);
    --field: rgba(230, 230, 230, .06);
    --field-2: rgba(230, 230, 230, .11);
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 18px 40px -16px rgba(0, 0, 0, .75);
    --shadow-up: 0 2px 4px rgba(0, 0, 0, .35), 0 28px 56px -18px rgba(0, 0, 0, .9);
    --accent: #CFB399;
    --accent-2: #E0C9AC;
    --accent-ink: #080B17;
    --ok: #CFB399;
    --warn: #D8B98F;
    --warn-bg: rgba(207, 179, 153, .13);
    --bad: #E0796B;
    --blob1: #212A3B;
    --blob2: #0B3242;
    --blob3: #A7835B;
    --blob4: #2C3A55;
    --blob-o: .55;
    --blob3-o: .18;
    --overlay: rgba(2, 4, 10, .55);
    --tile-a: #2A3448;
    --tile-b: #0E1424;
    --spec: rgba(230, 230, 230, .07);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #080B17;
  --ink: #E6E6E6;
  --ink-2: #B9BDC6;
  --ink-3: #7D8494;
  --glass-a: rgba(33, 42, 59, .58);
  --glass-b: rgba(1, 23, 34, .42);
  --solid-a: rgba(33, 42, 59, .94);
  --solid-b: rgba(18, 26, 40, .9);
  --rim-1: rgba(230, 230, 230, .2);
  --rim-2: rgba(230, 230, 230, .03);
  --edge: rgba(230, 230, 230, .08);
  --hair: rgba(230, 230, 230, .09);
  --field: rgba(230, 230, 230, .06);
  --field-2: rgba(230, 230, 230, .11);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 18px 40px -16px rgba(0, 0, 0, .75);
  --shadow-up: 0 2px 4px rgba(0, 0, 0, .35), 0 28px 56px -18px rgba(0, 0, 0, .9);
  --accent: #CFB399;
  --accent-2: #E0C9AC;
  --accent-ink: #080B17;
  --ok: #CFB399;
  --warn: #D8B98F;
  --warn-bg: rgba(207, 179, 153, .13);
  --bad: #E0796B;
  --blob1: #212A3B;
  --blob2: #0B3242;
  --blob3: #A7835B;
  --blob4: #2C3A55;
  --blob-o: .55;
  --blob3-o: .18;
  --overlay: rgba(2, 4, 10, .55);
  --tile-a: #2A3448;
  --tile-b: #0E1424;
  --spec: rgba(230, 230, 230, .07);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.pilha { display: grid; gap: 12px; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font: 400 15px/1.45 var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -.005em;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }

/* ---------- fundo ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--bg); }
.bg i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: var(--blob-o); will-change: transform; animation: flutua 32s ease-in-out infinite alternate; }
.bg .b1 { width: 56vmax; height: 56vmax; left: -14vmax; top: -20vmax; background: var(--blob1); }
.bg .b2 { width: 46vmax; height: 46vmax; right: -12vmax; top: -6vmax; background: var(--blob2); animation-duration: 38s; animation-delay: -6s; }
.bg .b3 { width: 40vmax; height: 40vmax; left: 18vmax; bottom: -22vmax; background: var(--blob3); opacity: var(--blob3-o); animation-duration: 44s; animation-delay: -12s; }
.bg .b4 { width: 34vmax; height: 34vmax; right: 4vmax; bottom: -10vmax; background: var(--blob4); animation-duration: 36s; animation-delay: -18s; }
@keyframes flutua {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(6vmax, 4vmax, 0) scale(1.08); }
  100% { transform: translate3d(-4vmax, 7vmax, 0) scale(.94); }
}
@media (prefers-reduced-motion: reduce) { .bg i { animation: none; } * { transition-duration: 0s !important; animation-duration: 0s !important; } }

/* ---------- vidro ---------- */
.glass, .solid {
  position: relative;
  isolation: isolate;
  border-radius: var(--r, 24px);
  -webkit-backdrop-filter: blur(30px) saturate(190%);
  backdrop-filter: blur(30px) saturate(190%);
  box-shadow: inset 0 1px 0 var(--edge), var(--shadow);
}
.glass { background: linear-gradient(155deg, var(--glass-a), var(--glass-b)); }
.solid { background: linear-gradient(170deg, var(--solid-a), var(--solid-b)); -webkit-backdrop-filter: blur(40px) saturate(200%); backdrop-filter: blur(40px) saturate(200%); }
/* aro de luz (borda espelhada) */
.glass::before, .solid::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(150deg, var(--rim-1), var(--rim-2) 38%, var(--rim-2) 62%, var(--rim-1));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
/* brilho especular */
.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(120% 70% at 8% 0%, var(--spec, rgba(255, 255, 255, .34)), transparent 46%);
  pointer-events: none;
  z-index: -1;
  opacity: .9;
}

/* ---------- ícones ---------- */
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i.fill { fill: currentColor; }
.i.sm { width: 15px; height: 15px; }
.i.lg { width: 22px; height: 22px; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 15px; border: 0; border-radius: 999px;
  font-weight: 560; font-size: 14px; letter-spacing: -.01em; white-space: nowrap;
  color: var(--ink); background: var(--field); cursor: pointer; text-decoration: none;
  transition: transform .16s cubic-bezier(.3, .7, .4, 1.4), background .2s, box-shadow .2s, opacity .2s;
}
.btn:hover { background: var(--field-2); }
.btn:active { transform: scale(.96); }
.btn:focus-visible, .ibtn:focus-visible, .chip:focus-visible, .seg button:focus-visible, .side-item:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.btn.primary { color: #080B17; font-weight: 620; background: linear-gradient(180deg, #DCC4A6, #CFB399 45%, #B8956B); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 8px 20px -10px rgba(167, 131, 91, .9); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.btn.danger.armado { color: #fff; background: var(--bad); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--field); }
.btn.lg { height: 46px; font-size: 15.5px; padding: 0 22px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }

.ibtn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none;
  border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); cursor: pointer;
  transition: background .2s, color .2s, transform .16s;
}
.ibtn:hover { background: var(--field); color: var(--ink); }
.ibtn:active { transform: scale(.92); }
.ibtn.on { color: var(--accent); }
.ibtn.sm { width: 28px; height: 28px; }
.ibtn.glassy { background: var(--field); }

/* ---------- campos ---------- */
.field { display: grid; gap: 6px; }
.field > span, .lbl { font-size: 12.5px; font-weight: 600; color: var(--ink-3); letter-spacing: .01em; }
.input, .textarea, .select {
  width: 100%; height: 44px; padding: 0 14px; border-radius: 13px;
  border: 1px solid transparent; background: var(--field); outline: none;
  transition: box-shadow .2s, background .2s, border-color .2s;
  font-size: 15px;
}
.textarea { height: auto; min-height: 72px; padding: 11px 14px; resize: vertical; line-height: 1.45; }
.select { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; }
.input:focus, .textarea:focus, .select:focus { background-color: var(--solid-a); border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 46px; }
.input-wrap .ibtn { position: absolute; right: 5px; top: 5px; }

/* ---------- telas de entrada ---------- */
.gate { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.gate-card { --r: 30px; width: min(400px, 100%); padding: 36px 30px 28px; text-align: center; animation: surge .6s cubic-bezier(.2, .8, .2, 1) both; }
.gate-card.largo { width: min(480px, 100%); text-align: left; }
.gate-card h1 { margin: 18px 0 4px; font-size: 27px; font-weight: 700; letter-spacing: -.025em; }
.gate-card .sub { margin: 0 0 26px; color: var(--ink-3); font-size: 15px; }
.gate-card form { display: grid; gap: 12px; text-align: left; }
.gate-card .rodape { margin-top: 18px; font-size: 13px; color: var(--ink-3); text-align: center; }
.gate-card .rodape button { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 0; font-size: 13px; }
.gate-card ol { margin: 0 0 18px; padding-left: 20px; color: var(--ink-2); font-size: 14px; display: grid; gap: 4px; }
.erro-msg { min-height: 20px; color: var(--bad); font-size: 13.5px; text-align: center; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
@keyframes surge { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

.mark {
  width: 64px; height: 64px; margin: 0 auto; border-radius: 18px; display: grid; place-items: center; color: #CFB399;
  background: linear-gradient(150deg, #2A3448, #080B17 70%);
  box-shadow: inset 0 1px 0 rgba(207, 179, 153, .35), inset 0 0 0 1px rgba(207, 179, 153, .18), 0 14px 30px -12px rgba(8, 11, 23, .8);
}
.mark .i { width: 32px; height: 32px; stroke-width: 2.2; }
.mark.sm { width: 34px; height: 34px; border-radius: 10px; margin: 0; box-shadow: inset 0 1px 0 rgba(207, 179, 153, .35), inset 0 0 0 1px rgba(207, 179, 153, .18), 0 6px 14px -6px rgba(8, 11, 23, .8); }
.mark.sm .i { width: 19px; height: 19px; }
.gate-card.largo .mark { margin: 0; }

/* ---------- barra superior ---------- */
.top {
  --r: 22px;
  position: sticky; top: 12px; z-index: 30;
  max-width: 1360px; margin: 12px auto 0; height: 62px; padding: 0 10px 0 14px;
  display: flex; align-items: center; gap: 14px;
}
.wrap-top { padding: 0 16px; position: sticky; top: 0; z-index: 30; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; text-decoration: none; }
.brand b { display: block; font-size: 15.5px; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; }
.brand small { display: block; font-size: 12px; color: var(--ink-3); line-height: 1.15; }
.search {
  flex: 1; max-width: 520px; margin: 0 auto; position: relative; display: flex; align-items: center;
}
.search .i { position: absolute; left: 13px; color: var(--ink-3); pointer-events: none; }
.search input { width: 100%; height: 40px; padding: 0 64px 0 40px; border-radius: 999px; border: 1px solid transparent; background: var(--field); outline: none; font-size: 15px; transition: background .2s, box-shadow .2s; }
.search input:focus { background: var(--solid-a); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.search kbd { position: absolute; right: 12px; font: 500 11.5px var(--font); color: var(--ink-3); border: 1px solid var(--hair); border-radius: 7px; padding: 2px 6px; background: var(--solid-b); }
.top-act { display: flex; align-items: center; gap: 4px; }
.sync { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); padding: 0 8px; white-space: nowrap; }
.sync i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }
.sync.salvando i { background: var(--accent); animation: pulsa 1s infinite; }
.sync.erro { color: var(--bad); cursor: pointer; }
.sync.erro i { background: var(--bad); }
@keyframes pulsa { 50% { opacity: .3; } }

/* ---------- layout ---------- */
.layout { max-width: 1360px; margin: 22px auto 0; padding: 0 16px 96px; display: grid; grid-template-columns: 252px minmax(0, 1fr); gap: 22px; align-items: start; }
.side { --r: 22px; position: sticky; top: 96px; padding: 10px; max-height: calc(100vh - 112px); overflow: auto; scrollbar-width: none; }
.side::-webkit-scrollbar { display: none; }
.side h4 { margin: 6px 10px 6px; font-size: 12px; font-weight: 600; color: var(--ink-3); letter-spacing: .02em; display: flex; justify-content: space-between; align-items: center; }
.side-item {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 13px;
  background: transparent; cursor: pointer; text-align: left; font-size: 14.5px; font-weight: 500; color: var(--ink);
  transition: background .2s;
}
.side-item:hover { background: var(--field); }
.side-item.on { background: var(--solid-a); box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 4px 12px -6px rgba(0, 0, 0, .18), inset 0 1px 0 var(--edge); }
.side-item .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-item .ct { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.side-sep { height: 1px; background: var(--hair); margin: 8px 10px; }
.side .novo-cli { margin-top: 4px; color: var(--accent); }
.side .novo-cli .av { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1.5px currentColor; }

.av {
  width: 28px; height: 28px; flex: none; border-radius: 9px; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 700; color: #080B17; letter-spacing: 0;
  background: linear-gradient(150deg, color-mix(in srgb, var(--c, #CFB399) 82%, #fff), var(--c, #CFB399) 60%, color-mix(in srgb, var(--c, #CFB399) 85%, #000));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
}
.av.all { --c: #212A3B; color: #CFB399; }
.av.lg { width: 46px; height: 46px; border-radius: 14px; font-size: 16px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 10px 22px -14px rgba(0, 0, 0, .6); }

/* filtros por tipo */
.filters { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.seg { --r: 999px; display: inline-flex; gap: 2px; padding: 4px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.seg::-webkit-scrollbar { display: none; }
.seg button {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 13px; border: 0; border-radius: 999px;
  background: transparent; cursor: pointer; font-size: 13.5px; font-weight: 550; color: var(--ink-2); white-space: nowrap;
  transition: background .25s, color .2s, box-shadow .25s;
}
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--solid-a); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 4px 12px -6px rgba(0, 0, 0, .25), inset 0 1px 0 var(--edge); }
.seg button .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.seg button .n { font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.filters .spacer { flex: 1; }

/* ---------- seções por cliente ---------- */
.cli { margin-bottom: 34px; scroll-margin-top: 96px; animation: surge .5s cubic-bezier(.2, .8, .2, 1) both; }
.cli-h { display: flex; align-items: center; gap: 13px; margin: 0 4px 14px; }
.cli-h h2 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -.025em; line-height: 1.15; }
.cli-h p { margin: 1px 0 0; font-size: 13.5px; color: var(--ink-3); }
.cli-h .tx { flex: 1; min-width: 0; }
.cli-h .acts { display: flex; gap: 4px; opacity: .85; }
.sec-titulo { display: flex; align-items: center; gap: 8px; margin: 0 4px 14px; font-size: 17px; font-weight: 650; letter-spacing: -.02em; }
.sec-titulo .i { color: var(--accent); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 14px; align-items: start; }

.card {
  --r: 22px; padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 12px; min-width: 0;
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s;
}
.card:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 var(--edge), var(--shadow-up); }
.card.arq { opacity: .6; }
.card.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 100% { box-shadow: inset 0 1px 0 var(--edge), var(--shadow); } 20%, 60% { box-shadow: inset 0 1px 0 var(--edge), 0 0 0 3px color-mix(in srgb, var(--accent) 55%, transparent), var(--shadow-up); } }
.card-top { display: flex; align-items: flex-start; gap: 12px; }
.card-top .tx { flex: 1; min-width: 0; }
.card h3 { margin: 1px 0 1px; font-size: 16px; font-weight: 650; letter-spacing: -.018em; line-height: 1.25; }
.card .dom { display: block; font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.card .dom:hover { color: var(--accent); }
.card .dom.vazio { font-style: italic; }
.card .acts { display: flex; margin: -4px -6px 0 0; }
.card p.desc { margin: 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.card .nota { margin: 0; font-size: 12.5px; color: var(--warn); display: flex; gap: 6px; align-items: flex-start; }
.card-foot { display: flex; gap: 8px; align-items: center; margin-top: auto; }
.card-foot .btn { height: 34px; font-size: 13.5px; }
.card-foot .btn.primary { flex: 1; }
.card-foot .btn.sec { flex: 1; }

.ticon {
  width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; color: var(--c);
  background: linear-gradient(150deg, var(--tile-a), var(--tile-b) 75%);
  box-shadow: inset 0 1px 0 rgba(230, 230, 230, .14), inset 0 0 0 1px rgba(207, 179, 153, .12), 0 8px 18px -10px rgba(0, 0, 0, .6);
}
.ticon .i { width: 21px; height: 21px; stroke-width: 2; }
.ticon.sm { width: 28px; height: 28px; border-radius: 9px; }
.ticon.sm .i { width: 15px; height: 15px; }

.tag { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: .005em; white-space: nowrap; }
.tag.pend { color: var(--warn); background: var(--warn-bg); }
.tag.arq { color: var(--ink-3); background: var(--field); }
.tag.tipo { color: var(--ink-2); background: var(--field); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }

/* credenciais */
.cred { border-radius: 15px; background: var(--field); padding: 4px 4px 4px 12px; display: grid; }
.cred-row { display: flex; align-items: center; gap: 8px; min-height: 34px; }
.cred-row + .cred-row { border-top: 1px solid var(--hair); }
.cred-row .k { width: 58px; flex: none; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.cred-row code { flex: 1; min-width: 0; font: 500 13.5px var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cred-row code.mask { letter-spacing: .12em; }
.cred-row code.vazio { font-family: var(--font); color: var(--ink-3); font-style: italic; font-weight: 400; }
.cred-obs { font-size: 12.5px; color: var(--ink-3); padding: 6px 4px 6px 0; border-top: 1px solid var(--hair); }
.cred-add { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 12px; border: 1px dashed var(--field-2); border-radius: 14px; background: transparent; color: var(--ink-3); font-size: 13px; cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
.cred-add:hover { color: var(--accent); border-color: currentColor; background: color-mix(in srgb, var(--accent) 6%, transparent); }

/* vínculos */
.vincs { display: flex; flex-wrap: wrap; gap: 6px; }
.vinc {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 26px; padding: 0 10px 0 8px;
  border: 0; border-radius: 999px; background: var(--field); cursor: pointer; font-size: 12.5px; font-weight: 500; color: var(--ink-2);
  transition: background .2s, color .2s;
}
.vinc:hover { background: var(--field-2); color: var(--ink); }
.vinc .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; }
.vinc span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vinc .i { width: 13px; height: 13px; color: var(--ink-3); }

/* minis: repositórios e ferramentas */
.minis-t { margin: 18px 4px 10px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); letter-spacing: .01em; }
.minis { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 10px; }
.mini { --r: 16px; display: flex; align-items: center; gap: 10px; padding: 9px 6px 9px 10px; min-width: 0; transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
.mini:hover { transform: translateY(-1px); }
.mini a.tx { flex: 1; min-width: 0; text-decoration: none; }
.mini b { display: block; font-size: 14px; font-weight: 600; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini small { display: block; font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini .acts { display: flex; }
@media (hover: hover) {
  .mini .acts { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); padding: 2px; border-radius: 999px; background: var(--solid-a); box-shadow: 0 4px 14px -6px rgba(0, 0, 0, .3); opacity: 0; transition: opacity .2s; }
  .mini:hover .acts, .mini:focus-within .acts { opacity: 1; }
}
.mini.flash { animation: flash 1.6s ease; }

.add-tile {
  display: grid; place-items: center; gap: 6px; min-height: 120px; padding: 16px; border-radius: 22px;
  border: 1.5px dashed var(--field-2); background: transparent; color: var(--ink-3); cursor: pointer; font-size: 14px; font-weight: 550;
  transition: color .2s, border-color .2s, background .2s;
}
.add-tile:hover { color: var(--accent); border-color: currentColor; background: color-mix(in srgb, var(--accent) 5%, transparent); }

.vazio-geral { --r: 26px; padding: 48px 24px; text-align: center; color: var(--ink-2); }
.vazio-geral h3 { margin: 12px 0 6px; font-size: 19px; letter-spacing: -.02em; color: var(--ink); }
.vazio-geral p { margin: 0 0 18px; }

/* ---------- modal ---------- */
.overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: var(--overlay); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s; }
.overlay.in { opacity: 1; }
.overlay.saindo { pointer-events: none; }
.modal { --r: 28px; width: min(620px, 100%); max-height: min(88vh, 900px); display: flex; flex-direction: column; transform: translateY(14px) scale(.98); transition: transform .35s cubic-bezier(.2, .9, .25, 1.1); box-shadow: inset 0 1px 0 var(--edge), 0 40px 90px -20px rgba(0, 0, 0, .45); }
.overlay.in .modal { transform: none; }
.modal.estreito { width: min(460px, 100%); }
.modal > form { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.m-b { min-height: 0; }
.m-h { display: flex; align-items: center; gap: 12px; padding: 20px 20px 10px 24px; }
.m-h h3 { flex: 1; margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.025em; }
.m-b { padding: 8px 24px 18px; overflow: auto; display: grid; gap: 16px; overscroll-behavior: contain; }
.m-f { display: flex; align-items: center; gap: 8px; padding: 14px 20px 18px 24px; border-top: 1px solid var(--hair); }
.m-f .spacer { flex: 1; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip > span {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px 0 9px; border-radius: 999px; cursor: pointer;
  background: var(--field); font-size: 13.5px; font-weight: 550; color: var(--ink-2); transition: background .2s, color .2s, box-shadow .2s;
}
.chip > span .ticon.sm { width: 22px; height: 22px; border-radius: 7px; }
.chip > span .ticon.sm .i { width: 13px; height: 13px; }
.chip input:checked + span { background: var(--solid-a); color: var(--ink); box-shadow: 0 0 0 2px var(--c, var(--accent)), 0 4px 12px -6px rgba(0, 0, 0, .25); }
.chip input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.chip.plain > span { padding: 0 14px; }
.cores { display: flex; gap: 10px; flex-wrap: wrap; }
.cor { position: relative; }
.cor input { position: absolute; opacity: 0; }
.cor span { display: block; width: 32px; height: 32px; border-radius: 10px; background: var(--c); cursor: pointer; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); transition: transform .2s, box-shadow .2s; }
.cor input:checked + span { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--c); transform: scale(1.05); }
.bloco { border-radius: 18px; background: var(--field); padding: 14px; display: grid; gap: 12px; }
.bloco .bloco-h { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }
.bloco .bloco-h .i { color: var(--ink-3); }
.bloco .input, .bloco .textarea, .bloco .select { background: var(--solid-b); }
.bloco .input:focus, .bloco .textarea:focus { background: var(--solid-a); }
.toggle { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; user-select: none; }
.toggle input { appearance: none; -webkit-appearance: none; width: 42px; height: 26px; border-radius: 999px; background: var(--field-2); position: relative; cursor: pointer; transition: background .25s; flex: none; margin: 0; }
.toggle input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); transition: transform .3s cubic-bezier(.3, .7, .4, 1.3); }
.toggle input:checked { background: var(--ok); }
.toggle input:checked::after { transform: translateX(16px); }
.vlist { max-height: 250px; overflow: auto; display: grid; gap: 2px; margin: 0 -6px; padding: 0 6px; }
.vlist .grp { font-size: 11.5px; font-weight: 600; color: var(--ink-3); padding: 8px 4px 2px; letter-spacing: .02em; }
.vopt { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 11px; cursor: pointer; font-size: 14px; }
.vopt:hover { background: var(--solid-b); }
.vopt input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; flex: none; }
.vopt .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vopt small { color: var(--ink-3); font-size: 12px; }
.hint { font-size: 12.5px; color: var(--ink-3); margin: 0; }
.cfg-linha { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cfg-linha .tx { flex: 1; min-width: 180px; }
.cfg-linha b { display: block; font-size: 14.5px; font-weight: 600; }
.cfg-linha small { display: block; font-size: 12.5px; color: var(--ink-3); word-break: break-all; }

/* menu */
.menu { --r: 18px; position: fixed; z-index: 70; min-width: 230px; padding: 6px; display: grid; gap: 1px; animation: menu .2s cubic-bezier(.2, .9, .25, 1.1) both; transform-origin: top right; }
@keyframes menu { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
.menu button { display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 12px; border: 0; border-radius: 11px; background: transparent; cursor: pointer; font-size: 14.5px; text-align: left; color: var(--ink); }
.menu button:hover { background: var(--field); }
.menu button .i { color: var(--ink-2); }
.menu hr { border: 0; height: 1px; background: var(--hair); margin: 4px 8px; }
.menu .who { padding: 8px 12px 6px; font-size: 12.5px; color: var(--ink-3); }

/* toasts */
#toasts { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; justify-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { --r: 999px; display: flex; align-items: center; gap: 9px; padding: 11px 18px 11px 14px; font-size: 14px; font-weight: 550; pointer-events: auto; animation: toast .45s cubic-bezier(.2, .9, .25, 1.2) both; }
.toast.sai { animation: toastSai .3s ease forwards; }
.toast .i { color: var(--ok); }
.toast.warn .i { color: var(--warn); }
.toast.erro .i { color: var(--bad); }
.toast.erro, .toast.warn { --r: 18px; }
@keyframes toast { from { opacity: 0; transform: translateY(16px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes toastSai { to { opacity: 0; transform: translateY(10px) scale(.96); } }

/* carregando */
.load { display: grid; place-items: center; min-height: 100vh; }
.spin { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--field-2); border-top-color: var(--accent); animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

/* ---------- responsivo ---------- */
@media (max-width: 980px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 14px; }
  .side { position: static; max-height: none; display: flex; gap: 4px; padding: 6px; overflow-x: auto; --r: 18px; }
  .side h4, .side-sep { display: none; }
  .side-item { width: auto; flex: none; padding: 6px 12px 6px 6px; border-radius: 12px; }
  .side-item .ct { display: none; }
  .side-item .nm { overflow: visible; }
}
@media (max-width: 720px) {
  .wrap-top { padding: 0 10px; }
  .top { height: auto; flex-wrap: wrap; padding: 10px 8px 10px 12px; gap: 10px; top: 8px; margin-top: 8px; }
  .brand { flex: 1; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .search kbd { display: none; }
  .search input { padding-right: 16px; }
  .sync span { display: none; }
  .btn.novo span { display: none; }
  .btn.novo { width: 36px; padding: 0; }
  .layout { padding: 0 10px 90px; }
  .filters { margin-bottom: 14px; }
  .cli-h h2 { font-size: 19px; }
  .overlay { padding: 0; place-items: end stretch; }
  .modal { --r: 26px; width: 100%; max-height: 92vh; max-height: 92dvh; border-bottom-left-radius: 0; border-bottom-right-radius: 0; transform: translateY(40px); }
  .m-h { padding: 18px 16px 8px 20px; }
  .m-b { padding: 6px 20px 16px; }
  .m-f { padding: 12px 16px calc(14px + env(safe-area-inset-bottom)) 20px; }
  .row2 { grid-template-columns: 1fr; }
  .gate-card { padding: 30px 22px 24px; }
}
