/* DualImo — shared glass layout. Products differ by --accent (set from Definições → Agência). */
:root {
  --ink: #1f1b17;
  --ink-2: rgba(31, 27, 23, .62);
  --ink-3: rgba(31, 27, 23, .42);
  --accent: #c4622d;
  --accent-2: #d6916c;
  --accent-3: #934a22;
  --ok: #2f8f5b;
  --warn: #c98a12;
  --bad: #c8412f;
  --dark: #1f1b17;
  --x: clamp(16px, 6.5vw, 130px);
  --top: 84px;
  --bottom: 42px;
  --ease: cubic-bezier(.2, .75, .2, 1);
  /* product tint (set by applyTheme from the product colour) */
  --tint: #c4622d; --tint-op: .12; --body-bg: #a68d77;
  --glass-rgb: 236, 226, 215; --deep-rgb: 78, 58, 44; --night-rgb: 24, 20, 17;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: "Manrope", system-ui, sans-serif; color: var(--ink); background: var(--body-bg); overflow: hidden; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
button:disabled { cursor: not-allowed; opacity: .5; }
input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; }
a { color: inherit; }

/* ---------- Backdrop (drop a bg.jpg next to dashboard.html to use a real photo) ---------- */
.scene { position: fixed; inset: 0; overflow: hidden; background: linear-gradient(180deg, #cdb9a5 0%, #bba48e 55%, #a58b74 100%); }
.scene > * { position: absolute; }
.scene .shelf { top: 0; left: 21%; width: 58%; height: 13vh; background: repeating-linear-gradient(90deg, #4a3223 0 1.2%, #7b5539 1.2% 24%, #4a3223 24% 25.2%); box-shadow: 0 10px 30px rgba(40,25,15,.35); }
.scene .shelf::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 18%; background: #3c281c; }
.scene .wall-l { left: 0; top: 0; bottom: 0; width: 4.5vw; background: linear-gradient(90deg, #35302c, #4b4440); }
.scene .window { right: 0; top: 0; bottom: 0; width: 13vw; background: linear-gradient(90deg, #e9dccd, #faf4ec 40%, #fffaf3); }
.scene .window::before { content: ""; position: absolute; left: 30%; top: 0; bottom: 0; width: 6px; background: rgba(170,150,130,.35); }
.scene .floor { left: 0; right: 0; bottom: 0; height: 12vh; background: linear-gradient(180deg, #b49a80, #9d8268); }
.scene .rug { left: 30%; right: 18%; bottom: 0; height: 7vh; background: #d9cbbb; border-radius: 50% 50% 0 0 / 30% 30% 0 0; opacity: .7; }
.scene .console { left: 25%; width: 50%; bottom: 4vh; height: 7vh; background: linear-gradient(180deg, #7a5539, #5b3e2a); border-radius: 6px; }
.scene .sofa { left: -3vw; bottom: 4vh; width: 14vw; height: 20vh; background: #4a4541; border-radius: 30px; }
.scene .lamp { left: 2.5vw; top: 30vh; width: 2vw; height: 2vw; border-radius: 50%; background: #ffcf8a; box-shadow: 0 0 60px 30px rgba(255,190,110,.55); filter: blur(8px); opacity: .8; }
.scene .photo { inset: 0; background: url("bg.jpg") center / cover no-repeat; }
.scene .tint { inset: 0; background: var(--tint); mix-blend-mode: color; opacity: var(--tint-op); transition: background .6s; }
.scene .shade { inset: 0; background: #0e0b09; opacity: 0; transition: opacity .5s; }
.scene::after { content: ""; position: absolute; inset: 0; backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); background: radial-gradient(ellipse at 50% 40%, transparent 45%, rgba(40,25,15,.22)); }

/* ---------- Glass ---------- */
.glass-dark { background: rgba(var(--deep-rgb), .34); border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 16px 40px -18px rgba(30,18,10,.55); color: #fff; }
.sheet { position: fixed; z-index: 1; top: var(--top); bottom: var(--bottom); left: var(--x); right: var(--x);
  border-radius: 34px; background: rgba(var(--glass-rgb), .16); border: 1px solid rgba(255,255,255,.45);
  backdrop-filter: blur(38px) saturate(160%) brightness(1.04); -webkit-backdrop-filter: blur(38px) saturate(160%) brightness(1.04);
  box-shadow: 0 1px 0 rgba(255,255,255,.45) inset, 0 40px 80px -30px rgba(40,25,12,.5); overflow: hidden; }
.scroll { position: absolute; inset: 0; overflow-y: auto; padding: 40px 40px 120px 92px; scrollbar-width: thin; scrollbar-color: rgba(0,0,0,.18) transparent; }

/* ---------- Top bar ---------- */
.topbar { position: fixed; z-index: 4; top: 14px; left: var(--x); right: var(--x); height: 54px; border-radius: 999px;
  display: grid; grid-template-columns: 1fr minmax(0, 560px) 1fr; align-items: center; gap: 12px; padding: 0 8px; }
.who { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; min-width: 0; }
.me { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; padding: 2px 10px 2px 2px; border-radius: 999px; transition: background .2s; min-width: 0; }
.me:hover { background: rgba(255,255,255,.12); }
.me span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; background-size: cover; background-position: center;
  color: #fff; font-size: 13px; font-weight: 800; border: 2px solid rgba(255,255,255,.6); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: -.02em; padding-left: 12px; border-left: 1px solid rgba(255,255,255,.3); white-space: nowrap; }
.brand em { color: var(--accent-2); font-style: normal; }
.brand img { height: 24px; max-width: 80px; object-fit: contain; border-radius: 4px; }
.navbtn { display: none; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.15); color: #fff; font-size: 16px; flex: none; }
.ask { position: relative; display: flex; align-items: center; gap: 10px; height: 40px; }
.orb { width: 28px; height: 28px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 30%, #fff 0 10%, var(--accent-2) 35%, var(--accent) 65%, var(--accent-3) 90%);
  box-shadow: 0 0 16px var(--accent-2); animation: orb 3.2s ease-in-out infinite; }
@keyframes orb { 50% { box-shadow: 0 0 26px var(--accent-2); transform: scale(1.07); } }
.ask-field { position: relative; flex: 1; height: 100%; font-size: 13.5px; font-weight: 600; }
.ask-field input { position: absolute; inset: 0; width: 100%; border: 0; background: none; outline: none; color: #fff; }
.ghost { position: absolute; inset: 0; display: flex; align-items: center; white-space: nowrap; overflow: hidden; pointer-events: none; color: rgba(255,255,255,.45); }
.ghost b { color: #fff; font-weight: 600; }
.ghost i { display: inline-block; width: 1.5px; height: 15px; background: #fff; margin: 0 1px; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.ask.typing .ghost { display: none; }
.top-actions { position: relative; display: flex; justify-content: flex-end; gap: 8px; }
.modebtn { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.15); color: #fff; display: grid; place-items: center; font-size: 16px; transition: background .2s, transform .3s var(--ease); }
.modebtn:hover { background: rgba(255,255,255,.25); transform: rotate(20deg); }
.bell { width: 38px; height: 38px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; position: relative; transition: transform .25s var(--ease); }
.bell:hover { transform: rotate(-12deg) scale(1.06); }
.bell.unread::after { content: attr(data-n); position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--bad);
  color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; }

/* ---------- Rail ---------- */
.rail { position: fixed; z-index: 3; left: calc(var(--x) - 28px); top: calc(var(--top) + 64px);
  display: flex; flex-direction: column; gap: 10px; padding: 8px; border-radius: 999px; }
.rail .knob { position: absolute; left: 8px; top: 8px; width: 42px; height: 42px; border-radius: 50%; background: #fff;
  box-shadow: 0 6px 16px rgba(0,0,0,.18); transition: transform .45s var(--ease); }
.rail button { position: relative; z-index: 1; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: rgba(255,255,255,.85); transition: color .3s; }
.rail button.on { color: var(--ink); }
.rail button:not(.on):hover { color: #fff; background: rgba(255,255,255,.12); }
.rail button::after { content: attr(data-tip); position: absolute; left: 54px; top: 50%; transform: translate(-6px, -50%); opacity: 0; pointer-events: none;
  background: #fff; color: var(--ink); font-size: 11.5px; font-weight: 700; padding: 6px 10px; border-radius: 10px; white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0,0,0,.15); transition: opacity .2s, transform .25s var(--ease); }
.rail button:hover::after { opacity: 1; transform: translate(0, -50%); }

/* ---------- Dock: per-page toolbar ---------- */
.dock { position: fixed; z-index: 3; left: 50%; bottom: calc(var(--bottom) - 27px); transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; max-width: calc(100vw - 24px); }
.toolbar { display: flex; align-items: center; gap: 4px; padding: 5px; border-radius: 999px; overflow-x: auto; scrollbar-width: none; min-height: 52px; }
.toolbar::-webkit-scrollbar { display: none; }
.toolbar.swap > * { animation: tbIn .45s var(--ease) both; }
@keyframes tbIn { from { opacity: 0; filter: blur(8px); transform: translateY(6px); } }
.toolbar:empty { display: none; }
.tseg { display: flex; flex: none; background: rgba(255,255,255,.08); border-radius: 999px; padding: 3px; }
.tseg button, .tsel, .tbtn, .tchip { padding: 9px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: rgba(255,255,255,.85); white-space: nowrap; flex: none; transition: background .25s, color .25s, opacity .25s; }
.tseg button { padding: 8px 14px; }
.tseg button.on { background: #fff; color: var(--ink); box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.tsel:hover, .tbtn:hover, .tchip:hover, .tseg button:not(.on):hover { background: rgba(255,255,255,.14); color: #fff; }
.tsel b { font-weight: 800; color: #fff; }
.tbtn.primary { background: #fff; color: var(--ink); }
.tchip i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.tchip:not(.on) { opacity: .45; }
.tsep { width: 1px; height: 22px; background: rgba(255,255,255,.25); margin: 0 4px; flex: none; }
.plus { width: 46px; height: 46px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; flex: none;
  box-shadow: 0 10px 24px -8px rgba(0,0,0,.4); transition: transform .35s var(--ease); }
.plus:hover { transform: rotate(90deg) scale(1.05); }

/* ---------- Pages + reveal ---------- */
.page { display: none; }
.page.on { display: block; }
.page.out { animation: pageOut .28s ease forwards; }
@keyframes pageOut { to { opacity: 0; filter: blur(22px); transform: scale(.99); } }
.rv { opacity: 0; }
.rv.in { animation: reveal .75s var(--ease) both; animation-delay: calc(var(--i, 0) * 65ms); }
.rv.in.done, .page.static .rv { animation: none; opacity: 1; }
.page.static .in * { animation: none !important; }
@keyframes reveal { from { opacity: 0; filter: blur(18px); transform: translateY(14px) scale(.985); } to { opacity: 1; filter: blur(0); transform: none; } }

.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
h1 { font-size: 34px; font-weight: 700; letter-spacing: -.03em; }
.sub { color: var(--ink-2); font-size: 13.5px; margin-top: 6px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Cards ---------- */
.card { border-radius: 22px; padding: 18px; background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 1px 0 rgba(255,255,255,.55) inset, 0 14px 30px -20px rgba(60,35,15,.45);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s; }
.lift:hover { transform: translateY(-5px); box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 24px 40px -20px rgba(60,35,15,.55); background: rgba(255,255,255,.38); }
.group { border-radius: 24px; padding: 12px; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.4); }
.inner { border-radius: 16px; padding: 14px; background: rgba(255,255,255,.45); border: 1px solid rgba(255,255,255,.7); }
.card h3, .group h3 { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.card h2 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.big { font-size: 32px; font-weight: 800; letter-spacing: -.03em; margin: 8px 0 6px; font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row.start { justify-content: flex-start; gap: 8px; }
.muted { color: var(--ink-3); font-size: 12px; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.chip.ok { background: rgba(47,143,91,.15); color: var(--ok); }
.chip.warn { background: rgba(201,138,18,.17); color: #9a6a0c; }
.chip.bad { background: rgba(200,65,47,.14); color: var(--bad); }
.chip.neutral { background: rgba(255,255,255,.65); color: var(--ink-2); }
.chip.accent { background: var(--accent); color: #fff; }
.ico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.75); flex: none; }
.tile { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.75); flex: none; }
.empty { padding: 28px 12px; text-align: center; color: var(--ink-3); font-size: 13px; }
.clickable { cursor: pointer; }

.btn { border-radius: 999px; padding: 11px 16px; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s, background .2s; text-decoration: none; }
.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn.dark { background: var(--dark); color: #fff; box-shadow: 0 10px 20px -10px rgba(0,0,0,.6); }
.btn.light { background: #fff; color: var(--ink); }
.btn.soft { background: rgba(255,255,255,.6); }
.btn.accent { background: var(--accent); color: #fff; }
.btn.danger { background: rgba(200,65,47,.12); color: var(--bad); }
.btn.sm { padding: 8px 12px; font-size: 12px; }
.iconbtn { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.7); display: grid; place-items: center; font-size: 13px; flex: none; }
.iconbtn:hover { background: #fff; }

.av { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 10px; font-weight: 800; color: #fff; flex: none; background-size: cover; background-position: center; }
.av.lg { width: 56px; height: 56px; font-size: 18px; }
.av.xl { width: 72px; height: 72px; font-size: 22px; }

/* ---------- Overview ---------- */
.ov-top { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ov-bottom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px; margin-top: 16px; }
.stack { display: grid; gap: 16px; align-content: start; }
.two-btn { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 14px; }
.wallets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.wallet { background: rgba(255,255,255,.75); border-radius: 12px; padding: 10px; }
.wallet .k { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; }
.wallet .k i { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.wallet b { display: block; font-size: 14px; margin: 8px 0 2px; font-variant-numeric: tabular-nums; }
.wallet .muted { font-size: 10.5px; }
.wallet .link { font-size: 10.5px; font-weight: 700; margin-top: 6px; display: block; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; height: 100%; }
.stat { padding: 16px; background: rgba(255,255,255,.3); display: flex; flex-direction: column; justify-content: space-between; min-height: 150px; }
.stat .big { font-size: 30px; margin: 6px 0; }
.stat.accent { background: linear-gradient(150deg, var(--accent-2), var(--accent) 55%, var(--accent-3)); color: #fff; border-color: rgba(255,255,255,.35); }
.stat.accent h3, .stat.accent .muted { color: rgba(255,255,255,.82); }
.stat.accent .ico { background: rgba(255,255,255,.22); color: #fff; }
.stat.accent .chip { background: rgba(255,255,255,.22); color: #fff; }
.legend { display: flex; gap: 12px; font-size: 11px; font-weight: 600; color: var(--ink-2); flex-wrap: wrap; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.progress { height: 9px; border-radius: 999px; background: rgba(31,27,23,.08); overflow: hidden; margin: 14px 0 10px; }
.progress span { display: block; height: 100%; width: var(--w); border-radius: inherit; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.in .progress span { animation: fillw 1.1s var(--ease) both; animation-delay: calc(var(--i, 0) * 65ms + .3s); }
@keyframes fillw { from { width: 0; } }
.alert { display: flex; gap: 10px; align-items: center; background: rgba(255,255,255,.6); border-radius: 14px; padding: 10px 12px; font-size: 12px; color: var(--ink-2); margin-top: 8px; }
.alert b { display: block; font-size: 12.5px; color: var(--ink); }
.alert .sw { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.alert.clickable:hover { background: rgba(255,255,255,.85); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin-top: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th { text-align: left; font-weight: 600; color: var(--ink-3); padding: 11px 12px; font-size: 11.5px; background: rgba(255,255,255,.6); white-space: nowrap; }
th:first-child { border-radius: 12px 0 0 12px; } th:last-child { border-radius: 0 12px 12px 0; }
td { padding: 12px; border-bottom: 1px solid rgba(31,27,23,.06); white-space: nowrap; }
tbody tr { transition: background .2s; } tbody tr:hover { background: rgba(255,255,255,.35); }
.in tbody tr { animation: rowIn .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 65ms + .25s + var(--r, 0) * 45ms); }
@keyframes rowIn { from { opacity: 0; transform: translateY(8px); } }
.act { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.act i { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-style: normal; font-size: 11px; color: #fff; flex: none; }
.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.ok { color: var(--ok); } .status.warn { color: #a87110; } .status.bad { color: var(--bad); } .status.neutral { color: var(--ink-2); }
.tools { display: flex; align-items: center; gap: 14px; font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.search { display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,.5); padding: 6px 12px; border-radius: 999px; }
.search input { border: 0; background: none; outline: none; width: 160px; font-size: 12.5px; }
.minibar { width: 70px; height: 6px; border-radius: 999px; background: rgba(31,27,23,.08); overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 6px; }
.minibar span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }

/* ---------- SVG chart motion ---------- */
svg text { font-family: inherit; }
.grow { transform-box: fill-box; transform-origin: 50% 100%; }
.in .grow { animation: grow .9s var(--ease) both; animation-delay: calc(var(--i, 0) * 65ms + .25s + var(--d)); }
@keyframes grow { from { transform: scale(1, 0); } }
.in .draw { animation: draw 1.6s var(--ease) both; animation-delay: calc(var(--i, 0) * 65ms + .3s); }
@keyframes draw { from { stroke-dashoffset: 1; } }
.in .fade { animation: fadeIn 1s ease both; animation-delay: calc(var(--i, 0) * 65ms + .7s); }
@keyframes fadeIn { from { opacity: 0; } }
.dotpop { transform-box: fill-box; transform-origin: center; }
.in .dotpop { animation: pop .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 65ms + .4s + var(--d)); }
@keyframes pop { from { transform: scale(0); } }
.in .arc { animation: arc 1.3s var(--ease) both; animation-delay: calc(var(--i, 0) * 65ms + .3s); }
@keyframes arc { from { stroke-dashoffset: var(--c); } }
.in .seg { animation: seg 1.1s var(--ease) both; animation-delay: calc(var(--i, 0) * 65ms + .3s + var(--d)); }
@keyframes seg { from { stroke-dasharray: 0 400; } }

/* ---------- Compliance ---------- */
.cp-top { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; height: 100%; }
.split > div:first-child { display: flex; flex-direction: column; }
.split > div:first-child .progress { margin-top: auto; }
.procs { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 14px; margin-top: 16px; }
.proc .row { justify-content: center; flex-wrap: wrap; gap: 6px; }
.proc .two-btn .btn { min-width: 0; padding: 8px 6px; overflow: hidden; text-overflow: ellipsis; }
.proc { text-align: center; padding: 14px; }
.ring { width: 118px; height: 118px; margin: 6px auto 10px; position: relative; }
.ring svg { display: block; }
.ring b { position: absolute; inset: 0; display: grid; place-content: center; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.ring b small { display: block; font-size: 10px; font-weight: 600; color: var(--ink-3); letter-spacing: 0; }
.proc h4 { font-size: 13px; font-weight: 700; }
.proc p { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.proc .two-btn { margin: 12px 0 0; gap: 6px; }
.add { display: grid; place-content: center; justify-items: center; gap: 8px; border: 1.5px dashed rgba(31,27,23,.2); background: transparent; box-shadow: none; color: var(--ink-2); font-size: 12px; font-weight: 600; min-height: 240px; }
.add span { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.7); display: grid; place-items: center; font-size: 20px; }
.toggle-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; font-size: 11.5px; color: var(--ink-3); border-bottom: 1px solid rgba(31,27,23,.06); }
.toggle-row:last-child { border: 0; }
.toggle-row > div { flex: 1; min-width: 0; } .toggle-row b { display: block; font-size: 13px; color: var(--ink); }
.switch { width: 38px; height: 22px; border-radius: 999px; background: rgba(31,27,23,.15); position: relative; transition: background .3s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: transform .35s var(--ease); }
.switch.on { background: var(--accent); } .switch.on::after { transform: translateX(16px); }

/* ---------- Reports / KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.rp-mid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }

/* ---------- Deals ---------- */
.board { display: grid; grid-template-columns: repeat(var(--cols, 5), minmax(200px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.col { border-radius: 22px; padding: 12px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.38); min-height: 420px; transition: background .25s, box-shadow .25s; }
.col.over { background: rgba(255,255,255,.4); box-shadow: 0 0 0 2px var(--accent-2) inset; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 4px 4px 2px; font-size: 13px; font-weight: 700; }
.col-head i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.col-head .muted { margin-left: auto; font-weight: 600; }
.deal { background: rgba(255,255,255,.66); border: 1px solid rgba(255,255,255,.85); border-radius: 16px; padding: 12px; margin-top: 10px; cursor: grab; transition: transform .3s var(--ease), box-shadow .3s, opacity .2s; }
.deal:hover { transform: translateY(-3px); box-shadow: 0 14px 24px -14px rgba(60,35,15,.5); }
.deal.dragging { opacity: .35; }
.deal h4 { font-size: 13px; font-weight: 700; margin-top: 8px; }
.deal p { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.deal .row .muted { white-space: nowrap; }
.deal .price { font-size: 15px; font-weight: 800; margin: 10px 0 8px; letter-spacing: -.01em; }

/* ---------- Properties ---------- */
.props { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.prop { padding: 0; overflow: hidden; cursor: pointer; }
.ph { height: 158px; position: relative; display: grid; place-items: center; color: rgba(255,255,255,.85); background-size: cover; background-position: center; }
.ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.25)); }
.ph.photo svg { display: none; }
.ph .chip { position: absolute; top: 12px; left: 12px; z-index: 1; background: rgba(255,255,255,.92); }
.ph .ref { position: absolute; bottom: 10px; right: 12px; z-index: 1; font-size: 11px; font-weight: 700; color: #fff; }
.prop .body { padding: 14px 16px 16px; }
.prop .price { font-size: 19px; font-weight: 800; letter-spacing: -.02em; margin-top: 4px; }
.specs { display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); margin: 10px 0 12px; font-weight: 600; flex-wrap: wrap; }
.portals { display: flex; gap: 6px; flex-wrap: wrap; }
.thumb { width: 44px; height: 34px; border-radius: 8px; background-size: cover; background-position: center; flex: none; }

/* ---------- Agenda ---------- */
.cal-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.cal-scroll { overflow-x: auto; }
.cal { min-width: 660px; }
.cal.day1 { min-width: 0; }
.cal-head, .cal-body { display: grid; grid-template-columns: 46px repeat(var(--days, 7), minmax(0, 1fr)); }
.cal-head div { text-align: center; padding: 8px 0 12px; font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.cal-head b { display: block; font-size: 18px; color: var(--ink); margin-top: 2px; }
.cal-head .today b { width: 34px; height: 34px; line-height: 34px; margin: 2px auto 0; border-radius: 50%; background: var(--dark); color: #fff; font-size: 15px; }
.hours div { height: 52px; font-size: 10px; color: var(--ink-3); text-align: right; padding-right: 8px; transform: translateY(-6px); }
.day { position: relative; border-left: 1px solid rgba(31,27,23,.07); background: repeating-linear-gradient(180deg, transparent 0 51px, rgba(31,27,23,.07) 51px 52px); }
.day.today { background-color: rgba(255,255,255,.22); }
.slot { position: absolute; left: 0; right: 0; height: 52px; cursor: copy; transition: background .15s; }
.slot:hover { background: rgba(255,255,255,.3); }
.ev { position: absolute; z-index: 1; left: 4px; right: 4px; border-radius: 10px; padding: 6px 8px; font-size: 11px; line-height: 1.3; overflow: hidden; cursor: pointer;
  border-left: 3px solid currentColor; transition: transform .25s var(--ease), box-shadow .25s; }
.ev:hover { transform: scale(1.03); box-shadow: 0 10px 20px -10px rgba(0,0,0,.4); z-index: 2; }
.ev b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink); font-size: 11.5px; }
.ev span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.in .ev { animation: rowIn .5s var(--ease) both; animation-delay: calc(.35s + var(--r) * 40ms); }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.mhead { font-size: 11px; color: var(--ink-3); text-align: center; font-weight: 600; padding-bottom: 4px; }
.mcell { min-height: 96px; border-radius: 14px; background: rgba(255,255,255,.3); padding: 6px; cursor: copy; transition: background .2s; min-width: 0; }
.mcell:hover { background: rgba(255,255,255,.5); }
.mcell.out { opacity: .45; }
.dn { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 12px; font-weight: 700; }
.mcell.today .dn { background: var(--dark); color: #fff; }
.mev { display: block; font-size: 10.5px; padding: 2px 6px; border-radius: 6px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; cursor: pointer; color: var(--ink); }
.upcoming { display: grid; gap: 8px; margin-top: 12px; }
.up { display: flex; gap: 12px; align-items: center; background: rgba(255,255,255,.6); border-radius: 14px; padding: 10px 12px; font-size: 12px; color: var(--ink-2); cursor: pointer; transition: background .2s; }
.up:hover { background: rgba(255,255,255,.85); }
.up .when { text-align: center; min-width: 40px; font-size: 10.5px; font-weight: 700; color: var(--ink-3); }
.up .when b { display: block; font-size: 17px; color: var(--ink); }
.up b.t { display: block; color: var(--ink); font-size: 12.5px; }

/* ---------- Documents ---------- */
.doc-top { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; }
.drop { display: grid; place-content: center; justify-items: center; gap: 8px; text-align: center; min-height: 180px; border-radius: 18px;
  border: 1.5px dashed rgba(31,27,23,.25); background: rgba(255,255,255,.25); cursor: pointer; transition: background .25s, border-color .25s, transform .25s var(--ease); font-size: 12.5px; color: var(--ink-2); }
.drop:hover, .drop.over { background: rgba(255,255,255,.5); border-color: var(--accent); transform: scale(1.01); }
.drop .tile { width: 48px; height: 48px; border-radius: 14px; font-size: 20px; }
.drop b { color: var(--ink); font-size: 14px; }
.storage-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); padding: 7px 0; border-bottom: 1px solid rgba(31,27,23,.06); }
.storage-row:last-child { border: 0; }

/* ---------- Team ---------- */
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.member { text-align: center; padding: 22px 18px 18px; }
.member .av { margin: 0 auto 10px; }
.member h4 { font-size: 15px; font-weight: 700; }
.member > p { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.member.inactive { opacity: .55; }
.mstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 14px 0 6px; }
.mstats div { background: rgba(255,255,255,.6); border-radius: 12px; padding: 8px 4px; font-size: 10.5px; color: var(--ink-3); }
.mstats b { display: block; font-size: 14px; color: var(--ink); }
.member .two-btn { margin: 14px 0 0; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }

/* ---------- Add-ons ---------- */
.addon-top { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
.plan { background: linear-gradient(140deg, #2a231d, #46362a); color: #fff; border-color: rgba(255,255,255,.2); }
.plan h3, .plan .muted { color: rgba(255,255,255,.7); }
.plan .chip.neutral { background: rgba(255,255,255,.15); color: #fff; }
.plan .btn.light { color: var(--ink); }
.plan ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; margin-top: 14px; font-size: 12.5px; color: rgba(255,255,255,.85); }
.plan li::before { content: "✓ "; color: var(--accent-2); font-weight: 800; }
.total-line { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 7px 0; color: var(--ink-2); }
.total-line b { color: var(--ink); text-align: right; }
.total-line.sum { border-top: 1px solid rgba(31,27,23,.1); margin-top: 6px; padding-top: 12px; font-size: 15px; }
.addons { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 16px; }
.addon { display: flex; flex-direction: column; gap: 10px; position: relative; }
.addon .tile { width: 42px; height: 42px; border-radius: 13px; font-size: 18px; color: #fff; }
.addon h4 { font-size: 14.5px; font-weight: 700; }
.addon p { font-size: 12px; color: var(--ink-2); line-height: 1.45; flex: 1; }
.addon .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.addon .cost { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.addon .cost small { font-size: 11px; font-weight: 600; color: var(--ink-3); }
.addon .badge { position: absolute; top: 16px; right: 16px; }
.addon.active { box-shadow: 0 0 0 2px var(--accent) inset, 0 14px 30px -20px rgba(60,35,15,.45); background: rgba(255,255,255,.45); }

/* ---------- Settings ---------- */
.set { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; align-items: start; }
.set-nav button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 12px; font-size: 13px; font-weight: 600; color: var(--ink-2); transition: background .2s; }
.set-nav button:hover { background: rgba(255,255,255,.4); }
.set-nav button.on { background: #fff; color: var(--ink); }
.integ { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(31,27,23,.06); font-size: 12px; color: var(--ink-3); }
.integ:last-child { border: 0; }
.integ .tile { font-size: 12px; font-weight: 800; color: #fff; }
.integ > div { flex: 1; } .integ b { display: block; color: var(--ink); font-size: 13px; }
.erow { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(31,27,23,.06); font-size: 13px; }
.erow input[type="text"] { flex: 1; min-width: 0; }
.erow input[type="text"], .erow select { background: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.85); border-radius: 10px; padding: 8px 10px; font-size: 13px; outline: none; }
.erow input[type="color"] { width: 36px; height: 34px; border: 0; background: none; padding: 0; cursor: pointer; flex: none; }
.perm td, .perm th { text-align: center; }
.perm td:first-child, .perm th:first-child { text-align: left; }

/* ---------- Forms ---------- */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.form .full { grid-column: 1 / -1; }
.form label { font-size: 12px; font-weight: 600; color: var(--ink-2); display: grid; gap: 6px; align-content: start; }
.form input:not([type="checkbox"]):not([type="color"]), .form select, .form textarea {
  background: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.85); border-radius: 12px; padding: 11px 12px; font-size: 13px; outline: none; width: 100%; transition: border-color .2s, box-shadow .2s; }
.form textarea { resize: vertical; min-height: 70px; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 25%, transparent); }
.form input[type="color"] { width: 100%; height: 42px; border: 0; background: none; padding: 0; cursor: pointer; }
.fsec { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-top: 6px; }
.checks { border: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.checks legend { font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; width: 100%; }
.ck { display: flex !important; grid-template-columns: none; align-items: center; gap: 6px; background: rgba(255,255,255,.7); padding: 8px 12px; border-radius: 999px; font-size: 12.5px !important; color: var(--ink) !important; cursor: pointer; }
.swl { display: flex !important; align-items: center; gap: 10px; font-size: 13px !important; color: var(--ink) !important; cursor: pointer; position: relative; }
.swl input { position: absolute; opacity: 0; pointer-events: none; }
.switch-ui { width: 38px; height: 22px; border-radius: 999px; background: rgba(31,27,23,.15); position: relative; transition: background .3s; flex: none; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: transform .35s var(--ease); }
.swl input:checked + .switch-ui { background: var(--accent); }
.swl input:checked + .switch-ui::after { transform: translateX(16px); }
.swl input:focus-visible + .switch-ui { outline: 2px solid var(--accent-2); outline-offset: 2px; }

/* ---------- Drawer, modal, popovers ---------- */
.scrim { position: fixed; inset: 0; z-index: 6; background: rgba(30,20,10,.18); opacity: 0; pointer-events: none; transition: opacity .3s; }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; z-index: 7; top: 14px; bottom: 14px; right: 14px; width: min(440px, calc(100vw - 28px)); border-radius: 28px; overflow-y: auto;
  padding: 24px; background: rgba(245, 238, 230, .82); border: 1px solid rgba(255,255,255,.7);
  backdrop-filter: blur(30px) saturate(140%); -webkit-backdrop-filter: blur(30px) saturate(140%); box-shadow: 0 30px 60px -20px rgba(30,18,10,.5);
  transform: translateX(calc(100% + 30px)); transition: transform .5s var(--ease); }
.drawer.open { transform: none; }
.drawer .close { position: sticky; top: 0; float: right; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.9); font-size: 16px; z-index: 2; }
.drawer h2 { font-size: 22px; letter-spacing: -.02em; margin-top: 12px; }
.drawer section { margin-top: 18px; }
.drawer section > h3 { font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.drawer .ph { border-radius: 18px; overflow: hidden; margin-top: 30px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kv div { background: rgba(255,255,255,.65); border-radius: 12px; padding: 10px; font-size: 11px; color: var(--ink-3); min-width: 0; }
.kv b { display: block; font-size: 13px; color: var(--ink); margin-top: 2px; overflow-wrap: anywhere; }
.kyc-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 13px; border-bottom: 1px solid rgba(31,27,23,.06); }
.kseg { margin-left: auto; display: flex; gap: 4px; }
.kseg button { width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.75); font-size: 12px; font-weight: 800; color: var(--ink-3); transition: transform .2s var(--ease), background .2s; }
.kseg button:hover { transform: scale(1.1); }
.kseg button.on { color: #fff; }
.steps { display: flex; gap: 4px; }
.steps button { flex: 1; text-align: center; font-size: 10px; font-weight: 700; color: var(--ink-3); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steps button::before { content: ""; display: block; height: 6px; border-radius: 999px; background: rgba(31,27,23,.1); margin-bottom: 6px; transition: background .3s; }
.steps button.done::before { background: var(--accent); }
.steps button.cur { color: var(--ink); }
.steps button.cur::before { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.steps button:hover::before { background: var(--accent-2); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 22px; }
.actions.three { grid-template-columns: 1fr 1fr 1fr; }
.linkrow { display: flex; gap: 8px; flex-wrap: wrap; }
.note { white-space: pre-wrap; font-size: 13px; color: var(--ink-2); background: rgba(255,255,255,.55); border-radius: 12px; padding: 10px 12px; }

.modal { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(30,20,10,.25); opacity: 0; pointer-events: none; transition: opacity .25s; }
.modal.open { opacity: 1; pointer-events: auto; }
.modal-card { width: min(380px, calc(100vw - 32px)); padding: 22px; border-radius: 24px; background: rgba(250,245,240,.97); box-shadow: 0 30px 60px -20px rgba(30,18,10,.5); transform: scale(.95); transition: transform .3s var(--ease); }
.modal.open .modal-card { transform: none; }
.modal-card p { font-size: 14px; font-weight: 600; line-height: 1.5; }

.popover { position: absolute; z-index: 8; min-width: 230px; padding: 8px; border-radius: 20px; background: rgba(250,245,240,.95); color: var(--ink);
  border: 1px solid rgba(255,255,255,.8); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); box-shadow: 0 24px 50px -16px rgba(30,18,10,.5);
  opacity: 0; transform: translateY(8px) scale(.97); pointer-events: none; transition: opacity .25s, transform .3s var(--ease); max-height: 70vh; overflow-y: auto; }
.popover.open { opacity: 1; transform: none; pointer-events: auto; }
.popover.fixed { position: fixed; }
.popover .item, .popover .opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border-radius: 12px; font-size: 13px; font-weight: 600; text-align: left; transition: background .2s; color: var(--ink); }
.popover .item:hover, .popover .opt:hover { background: rgba(255,255,255,.95); }
.popover .opt.on::after { content: "✓"; margin-left: auto; color: var(--accent); font-weight: 800; }
.popover .tile { width: 30px; height: 30px; border-radius: 9px; font-size: 14px; }
.popover .grp { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); padding: 8px 10px 2px; }
.popover .item small { display: block; font-size: 11px; color: var(--ink-3); font-weight: 500; }
.menu { bottom: 58px; right: 0; transform-origin: bottom right; }
.notif { top: 48px; right: 0; width: 340px; transform-origin: top right; }
.notif .n { display: flex; gap: 10px; padding: 10px; border-radius: 12px; font-size: 12px; color: var(--ink-2); cursor: pointer; transition: background .2s; }
.notif .n:hover { background: #fff; }
.notif .n.read { opacity: .55; }
.notif .n b { display: block; color: var(--ink); font-size: 12.5px; }
.notif .n .sw { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex: none; }
.searchpop { top: 48px; left: 0; right: 0; min-width: 0; }

.toast { position: fixed; z-index: 30; top: 80px; left: 50%; transform: translate(-50%, -14px); opacity: 0; background: var(--dark); color: #fff; padding: 11px 16px;
  border-radius: 14px; font-size: 13px; font-weight: 600; transition: .35s var(--ease); pointer-events: none; max-width: calc(100vw - 32px); box-shadow: 0 16px 30px -12px rgba(0,0,0,.5); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Dark mode ---------- */
:root[data-theme="dark"] { --ink: #f2ece6; --ink-2: rgba(242,236,230,.68); --ink-3: rgba(242,236,230,.46); color-scheme: dark; }
[data-theme="dark"] .scene .shade { opacity: .64; }
[data-theme="dark"] .sheet { background: rgba(var(--night-rgb), .58); border-color: rgba(255,255,255,.12); box-shadow: 0 1px 0 rgba(255,255,255,.07) inset, 0 40px 80px -30px rgba(0,0,0,.75); }
[data-theme="dark"] .glass-dark { background: rgba(var(--night-rgb), .6); border-color: rgba(255,255,255,.12); }
[data-theme="dark"] .card { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 14px 30px -20px rgba(0,0,0,.7); }
[data-theme="dark"] .lift:hover { background: rgba(255,255,255,.1); box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 24px 40px -20px rgba(0,0,0,.8); }
[data-theme="dark"] .group, [data-theme="dark"] .col { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.08); }
[data-theme="dark"] .stat:not(.accent), [data-theme="dark"] .inner, [data-theme="dark"] .wallet, [data-theme="dark"] .alert, [data-theme="dark"] .mstats div,
[data-theme="dark"] .kv div, [data-theme="dark"] .note, [data-theme="dark"] .up, [data-theme="dark"] .deal, [data-theme="dark"] .mcell, [data-theme="dark"] .ck { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.1); }
[data-theme="dark"] .alert.clickable:hover, [data-theme="dark"] .up:hover, [data-theme="dark"] .mcell:hover, [data-theme="dark"] tbody tr:hover { background: rgba(255,255,255,.1); }
[data-theme="dark"] th, [data-theme="dark"] .search, [data-theme="dark"] .ico, [data-theme="dark"] .tile, [data-theme="dark"] .chip.neutral, [data-theme="dark"] .iconbtn,
[data-theme="dark"] .kseg button:not(.on), [data-theme="dark"] .btn.soft, [data-theme="dark"] .btn.light, [data-theme="dark"] .add span, [data-theme="dark"] .drawer .close { background: rgba(255,255,255,.1); color: var(--ink); }
[data-theme="dark"] .btn.dark { background: #f2ece6; color: #1f1b17; }
[data-theme="dark"] .stat.accent { background: linear-gradient(150deg, var(--accent-2), var(--accent) 55%, var(--accent-3)); border-color: rgba(255,255,255,.2); }
[data-theme="dark"] .plan { background: linear-gradient(140deg, #2a231d, #46362a); border-color: rgba(255,255,255,.12); }
[data-theme="dark"] td, [data-theme="dark"] .storage-row, [data-theme="dark"] .toggle-row, [data-theme="dark"] .erow, [data-theme="dark"] .kyc-row { border-color: rgba(255,255,255,.08); }
[data-theme="dark"] .progress, [data-theme="dark"] .minibar, [data-theme="dark"] .switch, [data-theme="dark"] .switch-ui { background-color: rgba(255,255,255,.14); }
[data-theme="dark"] .switch.on, [data-theme="dark"] .swl input:checked + .switch-ui { background: var(--accent); }
[data-theme="dark"] .drop { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.2); }
[data-theme="dark"] .add { border-color: rgba(255,255,255,.2); }
[data-theme="dark"] .set-nav button:hover { background: rgba(255,255,255,.07); }
[data-theme="dark"] .set-nav button.on { background: rgba(255,255,255,.14); color: var(--ink); }
[data-theme="dark"] .form input:not([type="checkbox"]):not([type="color"]), [data-theme="dark"] .form select, [data-theme="dark"] .form textarea,
[data-theme="dark"] .erow input[type="text"], [data-theme="dark"] .erow select, [data-theme="dark"] .toggle-row input { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color: var(--ink); }
[data-theme="dark"] .popover, [data-theme="dark"] .modal-card { background: rgba(34,29,25,.96); border-color: rgba(255,255,255,.1); color: var(--ink); }
[data-theme="dark"] .popover .item, [data-theme="dark"] .popover .opt { color: var(--ink); }
[data-theme="dark"] .popover .item:hover, [data-theme="dark"] .popover .opt:hover, [data-theme="dark"] .notif .n:hover { background: rgba(255,255,255,.08); }
[data-theme="dark"] .drawer { background: rgba(28,24,21,.9); border-color: rgba(255,255,255,.1); }
[data-theme="dark"] .toast { background: #f2ece6; color: #1f1b17; }
[data-theme="dark"] .rail button::after, [data-theme="dark"] .rail button.on, [data-theme="dark"] .tseg button.on, [data-theme="dark"] .tbtn.primary,
[data-theme="dark"] .plus, [data-theme="dark"] .bell { color: #1f1b17; }
[data-theme="dark"] .day { background: repeating-linear-gradient(180deg, transparent 0 51px, rgba(255,255,255,.07) 51px 52px); border-color: rgba(255,255,255,.07); }
[data-theme="dark"] .day.today { background-color: rgba(255,255,255,.05); }
[data-theme="dark"] .cal-head .today b, [data-theme="dark"] .mcell.today .dn { background: var(--accent); }
[data-theme="dark"] .chip.ok, [data-theme="dark"] .status.ok { color: #5ccb8b; }
[data-theme="dark"] .chip.warn, [data-theme="dark"] .status.warn { color: #e8b955; }
[data-theme="dark"] .chip.bad, [data-theme="dark"] .status.bad { color: #f07563; }
[data-theme="dark"] svg text { fill: rgba(242,236,230,.55); }
[data-theme="dark"] svg text[font-weight="800"] { fill: var(--ink); }
[data-theme="dark"] svg line { stroke: rgba(255,255,255,.08); }
[data-theme="dark"] svg rect[fill="#1f1b17"] { fill: #e9e1d9; }
[data-theme="dark"] svg path[stroke="#1f1b17"] { stroke: #e9e1d9; }
[data-theme="dark"] svg circle[stroke="rgba(255,255,255,.75)"], [data-theme="dark"] svg circle[stroke="rgba(255,255,255,.5)"] { stroke: rgba(255,255,255,.12); }
[data-theme="dark"] .legend i[style*="--dark"], [data-theme="dark"] .wallet .k i[style*="#1f1b17"] { background: #e9e1d9 !important; }

/* ---------- Responsive ---------- */
@media (max-height: 820px) {
  .rail { top: calc(var(--top) + 20px); gap: 4px; }
  .rail button, .rail .knob { width: 38px; height: 38px; }
}
@media (max-width: 1280px) {
  .ov-top { grid-template-columns: 1fr 1fr; }
  .ov-top > :last-child { grid-column: 1 / -1; }
  .ov-bottom, .cp-top, .rp-mid, .cal-wrap, .doc-top, .addon-top { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  :root { --x: 10px; --top: 118px; --bottom: 40px; }
  .topbar { height: auto; grid-template-columns: 1fr auto; border-radius: 24px; padding: 8px; row-gap: 6px; }
  .ask { grid-column: 1 / -1; grid-row: 2; padding: 0 4px; }
  .brand { display: none; }
  .navbtn { display: grid; place-items: center; }
  .rail { display: none; }
  .scroll { padding: 22px 16px 110px; }
  .ov-top, .stats, .set, .form, .split, .two-btn, .plan ul { grid-template-columns: 1fr; }
  .member .two-btn { grid-template-columns: 1fr 1fr 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpis .big { font-size: 22px; }
  .kpis .card { padding: 14px; }
  .board { grid-template-columns: repeat(var(--cols, 5), 80vw); }
  .wallets { gap: 6px; } .wallet { padding: 8px; } .wallet b { font-size: 13px; }
  .notif { width: min(340px, calc(100vw - 24px)); }
  h1 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
