/* ═══ dormo app — Cylo-style shell in the dormo look ═══
   A floating glass sidebar and top bar over a pale sky; content in glass cards.
   Same tokens as the site: Host Grotesk, ink #0d2a17, green #2fbf4a. */

:root {
  --ink: #0d2a17;
  --ink-2: rgba(13, 42, 23, .74);
  --ink-3: rgba(13, 42, 23, .5);
  --ink-4: rgba(13, 42, 23, .3);
  --line: rgba(13, 42, 23, .08);
  --green: #2fbf4a;
  --green-d: #1f9a39;
  --up: #1c8f3c;
  --down: #c2412d;
  --glass: rgba(255, 255, 255, .72);
  --r: 20px;
  --sans: "Host Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; font-family: var(--sans); color: var(--ink); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased;
  background: linear-gradient(180deg, #dcecfb 0%, #eef6fd 30%, #f6fbf7 70%, #eefaf0 100%) fixed; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(50% 40% at 100% 0%, rgba(111, 227, 106, .22), transparent 70%), radial-gradient(40% 50% at 0% 100%, rgba(111, 227, 106, .22), transparent 70%), url(/assets/img/sky-hero.jpg) center top / cover no-repeat; opacity: .55; }
::selection { background: #c9f0d3; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -.03em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.glass { background: var(--glass); border: 1px solid rgba(255, 255, 255, .85); border-radius: var(--r);
  backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 24px 50px -36px rgba(20, 70, 40, .35); }

/* ═══ SHELL ═══ */
.shell { display: grid; grid-template-columns: 260px 1fr; gap: 20px; padding: 20px; min-height: 100vh; }
.side { position: sticky; top: 20px; height: calc(100vh - 40px); display: flex; flex-direction: column; padding: 22px 16px; border-radius: 24px;
  background: rgba(255, 255, 255, .62); border: 1px solid rgba(255, 255, 255, .85); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); }
.brand { display: inline-flex; align-items: flex-end; gap: 1px; font-weight: 600; font-size: 27px; line-height: 1; letter-spacing: -.045em; padding: 0 8px; }
.brand img { height: 26px; width: auto; margin-bottom: 1px; }
.side-cta { margin: 26px 0 22px; height: 50px; border-radius: 16px; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; gap: 9px; font-weight: 600; font-size: 16px; transition: background .2s; }
.side-cta:hover { background: var(--green-d); }
.side-cta svg { width: 18px; height: 18px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--ink-2); font-size: 15.5px; transition: background .2s, color .2s; }
.side-nav a svg { width: 19px; height: 19px; flex: none; }
.side-nav a:hover { background: rgba(255, 255, 255, .6); color: var(--ink); }
.side-nav a.on { background: #fff; color: var(--ink); font-weight: 500; box-shadow: 0 6px 18px -12px rgba(20, 70, 40, .4); }
.side-nav .sep { height: 1px; background: var(--line); margin: 12px 10px; }
.side-foot { margin-top: auto; padding: 0 10px; display: grid; gap: 4px; font-size: 12px; color: var(--ink-3); }
.side-foot a:hover { color: var(--ink); }

.main { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.topbar { display: flex; align-items: center; gap: 14px; }
.menu { display: none; width: 46px; height: 46px; border-radius: 14px; border: 0; background: rgba(255, 255, 255, .7); cursor: pointer; }
.menu svg { width: 20px; height: 20px; }
.status { display: flex; align-items: center; gap: 12px; padding: 10px 18px 10px 14px; border-radius: 18px; }
.status b { display: block; font-weight: 600; font-size: 14.5px; }
.status span:not(.dot) { display: block; font-size: 13px; color: var(--ink-3); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #c9cdc9; flex: none; }
.dot.live { background: var(--green); box-shadow: 0 0 0 4px rgba(47, 191, 74, .18); animation: pulse 2.4s infinite; }
.dot.warn { background: #e0a21f; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(47, 191, 74, 0); } }
.wallet { margin-left: auto; display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 16px; border-radius: 18px; }
.net { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--ink-2); }
.net i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }
.btn-g { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border: 0; border-radius: 14px; background: var(--green); color: #fff; font-weight: 600; font-size: 15px; cursor: pointer; transition: background .2s, transform .15s; white-space: nowrap; }
.btn-g:hover { background: var(--green-d); }
.btn-g:active { transform: scale(.98); }
.btn-g:disabled { opacity: .5; cursor: default; }
.btn-g svg { width: 18px; height: 18px; }
.btn-g.wide, .btn-l.wide { width: 100%; height: 50px; margin-top: 14px; }
.btn-l { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 500; }
.btn-l:hover { border-color: var(--ink-4); }
.btn-sm { height: 34px; padding: 0 14px; border-radius: 10px; font-size: 13.5px; }
.btn-red { background: #fff; color: var(--down); border: 1px solid rgba(194, 65, 45, .3); }
.btn-red:hover { background: #fff5f3; }
.banner { padding: 14px 18px; border-radius: 16px; background: rgba(255, 246, 214, .85); border: 1px solid rgba(224, 162, 31, .3); font-size: 14.5px; color: var(--ink-2); }
.banner b { color: var(--ink); }

/* ═══ VIEWS ═══ */
.view { display: flex; flex-direction: column; gap: 18px; animation: vin .5s var(--ease); }
.view[hidden], [hidden] { display: none !important; }
@keyframes vin { from { opacity: 0; transform: translateY(8px); } }
.vhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; padding: 6px 4px 0; }
.vhead h1 { font-size: 40px; }
.meta { color: var(--ink-2); font-size: 15px; max-width: 620px; }
.card { padding: 22px 24px; }
.ch { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.ch h3 { font-size: 19px; }
.tag { font-size: 12.5px; color: var(--ink-3); padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .7); border: 1px solid var(--line); white-space: nowrap; }
.fine { margin-top: 14px; font-size: 12.5px; line-height: 1.55; color: var(--ink-3); }
.lbl { display: block; font-size: 13px; color: var(--ink-3); }
.big { display: block; margin-top: 4px; font-size: 30px; font-weight: 500; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.big.g, .g { color: var(--green-d); }
.up { color: var(--up); } .down { color: var(--down); }
.bigrow { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.kv { display: grid; gap: 6px; }
.kv > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, .55); font-size: 14px; }
.kv > div span { color: var(--ink-2); }
.kv > div b { font-family: var(--mono); font-weight: 500; font-size: 13.5px; text-align: right; }
.kv.sm > div { padding: 8px 12px; }
.kv.three { grid-template-columns: repeat(3, 1fr); margin-top: 16px; }
.kv.three > div { flex-direction: column; gap: 2px; }
.kv.three > div b { text-align: left; font-size: 15px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.msg { min-height: 20px; margin-top: 10px; font-size: 13.5px; color: var(--ink-2); }
.msg.ok { color: var(--up); } .msg.err { color: var(--down); }
.msg a { text-decoration: underline; }

/* how a deposit works */
.howweek { display: grid; grid-template-columns: 230px 1fr; gap: 10px 26px; padding: 24px 26px; }
.hw-l h2 { font-size: 21px; margin-bottom: 14px; }
.hw-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; position: relative; }
.hw-steps::before { content: ""; position: absolute; left: 18px; right: 18px; top: 18px; height: 1px; background: var(--line); }
.hw-steps li { position: relative; }
.hw-steps .ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--green-d); }
.hw-steps b { display: block; margin-top: 10px; font-weight: 600; }
.hw-steps p { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }
.howweek .fine { grid-column: 1 / -1; margin-top: 4px; }

/* inputs */
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(13, 42, 23, .05); margin-bottom: 12px; }
.tabs button { height: 40px; border: 0; border-radius: 11px; background: none; cursor: pointer; font-weight: 500; color: var(--ink-2); }
.tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 4px 12px -8px rgba(20, 70, 40, .4); }
.side2 button.on.long { background: var(--green); color: #fff; }
.side2 button.on.short { background: var(--down); color: #fff; }
.amt { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 8px 0 16px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.amt:focus-within { border-color: var(--green); box-shadow: 0 0 0 4px rgba(47, 191, 74, .14); }
.amt input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font: inherit; font-family: var(--mono); font-size: 20px; color: var(--ink); }
.amt span { font-size: 14px; color: var(--ink-3); }
.amt button { height: 34px; padding: 0 12px; border-radius: 10px; border: 0; background: rgba(13, 42, 23, .06); cursor: pointer; font-size: 13px; font-weight: 600; }
.hint { margin: 8px 2px 12px; font-size: 13px; color: var(--ink-3); }
.lev { margin: 4px 0 14px; }
.lev-h { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-2); margin-bottom: 6px; }
.lev-h b { font-family: var(--mono); color: var(--ink); }
input[type=range] { width: 100%; accent-color: var(--green); }

/* trade */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .7); cursor: pointer; font-family: var(--mono); font-size: 13px; }
.chips button:hover, .chips button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.mgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mc { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 20px; transition: transform .35s var(--ease), box-shadow .35s; cursor: pointer; }
.mc:hover { transform: translateY(-3px); box-shadow: 0 30px 50px -34px rgba(20, 70, 40, .45); }
.logo { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 700; font-size: 15px; }
.mc .nm { font-weight: 600; font-size: 16px; }
.mc .sb { font-size: 13px; color: var(--ink-3); }
.mc .pr { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.mc .pr b { font-size: 28px; font-weight: 500; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.mc .pr small { display: block; font-size: 13px; }
.mc svg { width: 110px; height: 36px; }
.mhead { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 4px; }
.mhead h1 { font-size: 34px; }
.back { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: rgba(255, 255, 255, .7); }
.back svg { width: 18px; height: 18px; }
.mhead .logo { width: 52px; height: 52px; border-radius: 16px; font-size: 18px; }
.pill { margin-left: auto; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .7); border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.mlay { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; align-items: start; }
.pxrow { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.px { font-size: 38px; font-weight: 500; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.chg { font-family: var(--mono); font-size: 14px; }
.chart { width: 100%; height: 220px; display: block; }
.chart-ax { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); margin-top: 6px; }

/* portfolio */
.stats4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.st { padding: 18px 20px; }
.st b { display: block; margin-top: 6px; font-size: 26px; font-weight: 500; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.st small { display: block; margin-top: 6px; font-size: 12px; color: var(--ink-3); }
.meter { height: 6px; border-radius: 999px; background: rgba(13, 42, 23, .08); margin-top: 10px; overflow: hidden; position: relative; }
.meter::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--ink-4); }
.meter i { display: block; height: 100%; width: 0; background: var(--green); border-radius: inherit; transition: width .6s var(--ease); }
.meter i.warn { background: #e0a21f; } .meter i.bad { background: var(--down); }
.tbl { overflow-x: auto; }
.tbl table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.tbl th { text-align: left; font-weight: 400; font-size: 12.5px; color: var(--ink-3); padding: 8px 10px; }
.tbl td { padding: 13px 10px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.tbl .r { text-align: right; }
.tbl td.mono { font-size: 13px; }
.tbl .empty { text-align: center; color: var(--ink-3); padding: 30px; }
.tbl td b { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; }
.tbl .lg { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; }
.side-l { color: var(--up); font-weight: 500; } .side-s { color: var(--down); font-weight: 500; }
.repay-row { display: flex; gap: 10px; align-items: center; }
.repay-row .amt { flex: 1; }
.repay-row .btn-g { height: 56px; }

.afoot { margin-top: auto; display: flex; justify-content: space-between; gap: 20px; padding: 20px 6px 6px; font-size: 13px; color: var(--ink-3); }
.afoot nav { display: flex; gap: 18px; }
.afoot a:hover { color: var(--ink); }

/* wallet dialog */
.dlg { padding: 24px; width: min(380px, calc(100vw - 32px)); border: 0; }
.dlg::backdrop { background: rgba(13, 42, 23, .25); backdrop-filter: blur(4px); }
.dlg h3 { font-size: 20px; margin-bottom: 16px; }
#wlist { display: grid; gap: 8px; }
#wlist button { display: flex; align-items: center; gap: 12px; height: 54px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 500; font-size: 15px; }
#wlist button:hover { border-color: var(--green); }
#wlist img { width: 26px; height: 26px; border-radius: 7px; }

/* ═══ SMALL SCREENS ═══ */
@media (max-width: 1180px) {
  .mgrid { grid-template-columns: 1fr 1fr; }
  .mlay, .grid2 { grid-template-columns: 1fr; }
  .stats4 { grid-template-columns: 1fr 1fr; }
  .howweek { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; padding: 12px; gap: 12px; }
  .side { position: fixed; z-index: 60; left: 12px; top: 12px; bottom: 12px; height: auto; width: 270px; transform: translateX(-120%); transition: transform .4s var(--ease); box-shadow: 0 30px 60px -20px rgba(13, 42, 23, .35); }
  .side.open { transform: none; }
  .menu { display: grid; place-items: center; }
  .status { flex: 1; min-width: 0; padding: 8px 12px; }
  .status span:not(.dot) { display: none; }
  .net { display: none; }
  .wallet { padding: 4px; }
  .vhead h1 { font-size: 32px; }
  .mgrid, .stats4 { grid-template-columns: 1fr; }
  .hw-steps { grid-template-columns: 1fr 1fr; }
  .hw-steps::before { display: none; }
  .bigrow { grid-template-columns: 1fr 1fr; }
  .kv.three { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .pill { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .view { animation: none; } .dot.live { animation: none; } }
/* grid children may shrink below their content; wide tables scroll inside their card */
.grid2 > *, .mlay > *, .stats4 > *, .view > *, .card, .tbl { min-width: 0; }
.view { min-width: 0; }
.repay-row .amt { min-width: 0; }
@media (max-width: 860px) { .repay-row { flex-direction: column; align-items: stretch; } .repay-row .btn-g { height: 50px; } }
.brand { align-items: center; }
.brand img.bl { width: 34px; height: 34px; border-radius: 10px; margin: 0 8px 0 0; box-shadow: 0 2px 8px -3px rgba(20, 60, 120, .35); }

/* token logos: the image fills the rounded tile */
.logo, .tbl .lg, .mhead .logo { overflow: hidden; background: #fff; padding: 0; }
.logo img, .tbl .lg img { width: 100%; height: 100%; display: block; object-fit: cover; }
