/* GPU app: sign-in (efferd auth-1 layout) + rentals dashboard. Dark, Geist, liquid-glass surfaces. */
:root {
  --bg: #050608; --fg: #fafafa; --muted: rgba(250, 250, 250, .58); --line: rgba(255, 255, 255, .1);
  --card: rgba(255, 255, 255, .04); --primary: #fafafa; --primary-fg: #0a0a0a; --ok: #5ee8a0; --warn: #ffb86b; --err: #ff7a7a;
  --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body { font: 400 15px/1.5 "Geist", ui-sans-serif, system-ui, sans-serif; letter-spacing: -.01em; -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.grain { position: fixed; inset: -50%; z-index: 50; pointer-events: none; opacity: .15;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1s steps(6) infinite; }
@keyframes grain { 0%{transform:translate(0,0)} 20%{transform:translate(-3%,2%)} 40%{transform:translate(2%,-3%)} 60%{transform:translate(-2%,-1%)} 80%{transform:translate(3%,3%)} 100%{transform:translate(0,0)} }
.particles { position: fixed; inset: 0; pointer-events: none; }
.halo { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(50% 40% at 50% 0%, rgba(70, 140, 255, .14), transparent 70%); }

/* Buttons, shadcn-like */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px;
  border: 1px solid transparent; font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, opacity .15s; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--primary); color: var(--primary-fg); }
.btn-primary:not(:disabled):hover { background: #e4e4e7; }
.btn-outline { background: rgba(255, 255, 255, .03); border-color: var(--line); }
.btn-outline:not(:disabled):hover { background: rgba(255, 255, 255, .08); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: rgba(255, 255, 255, .07); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn svg, .btn img { flex-shrink: 0; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 600; font-size: 17px; letter-spacing: .4px; }
.brand img { width: 22px; height: 22px; display: block; object-fit: contain; }

/* Sign-in (auth-1) */
.auth { position: relative; z-index: 1; min-height: 100vh; max-width: 64rem; margin: 0 auto; padding: 0 32px; display: flex; flex-direction: column; justify-content: center; }
.auth-home { position: absolute; top: 16px; left: 16px; }
.auth-box { width: 100%; max-width: 24rem; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.auth-box h1 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: .02em; line-height: 1.25; }
.auth-box .lead { margin: 4px 0 0; font-size: 16px; color: var(--muted); }
.auth-actions { display: flex; flex-direction: column; gap: 8px; }
.auth-note { margin: 24px 0 0; font-size: 13px; color: var(--muted); }
.auth-err { margin: 0; font-size: 13px; color: var(--err); min-height: 1em; }
.auth-err:empty { display: none; }

/* App shell */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 24px; border-bottom: 1px solid var(--line); background: rgba(5, 6, 8, .6);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%); }
.top-left { display: flex; align-items: center; gap: 20px; }
.top-left nav { display: flex; gap: 4px; }
.top-right { display: flex; align-items: center; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line);
  font: 500 13px "Geist Mono", ui-monospace, monospace; background: rgba(255, 255, 255, .03); }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.wrap { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 40px 24px 80px; }
.page-head h1 { margin: 0; font: 400 48px/1 "Instrument Serif", serif; letter-spacing: -.03em; }
.page-head h1 em { font-style: italic; }
.page-head p { margin: 10px 0 0; color: var(--muted); max-width: 620px; }
.notice { margin: 24px 0 0; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px;
  border: 1px solid rgba(255, 184, 107, .25); background: rgba(255, 184, 107, .06); font-size: 13px; color: rgba(255, 230, 200, .9); }
.notice svg { flex-shrink: 0; margin-top: 2px; }

.card { border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.stat { padding: 18px 20px; }
.stat span { font-size: 13px; color: var(--muted); }
.stat b { display: block; margin-top: 6px; font-size: 30px; font-weight: 500; letter-spacing: -.04em; }
.stat b small { font-size: 13px; color: var(--muted); font-weight: 400; letter-spacing: 0; margin-left: 4px; }

.grid { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.panel { padding: 20px; }
.panel h2 { margin: 0 0 16px; font-size: 16px; font-weight: 600; letter-spacing: -.02em; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; color: var(--muted); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.input, select.input, textarea.input { width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, .35);
  color: var(--fg); font: inherit; font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s; }
textarea.input { height: 72px; padding: 10px 12px; resize: vertical; }
.input:focus { border-color: rgba(255, 255, 255, .35); box-shadow: 0 0 0 3px rgba(255, 255, 255, .06); }
select.input { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-opacity='.6' stroke-width='2' stroke-linecap='round'><path d='m6 9 6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
select.input option, select.input optgroup { background: #111; color: #fff; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, .35); width: 100%; }
.seg button { flex: 1; height: 32px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 500; }
.seg button.on { background: rgba(255, 255, 255, .12); color: var(--fg); }
.est { display: flex; justify-content: space-between; align-items: baseline; margin: 4px 0 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.est span { color: var(--muted); font-size: 13px; }
.est b { font-size: 22px; font-weight: 500; letter-spacing: -.03em; }
.form-msg { margin: 10px 0 0; font-size: 13px; color: var(--muted); min-height: 1em; }
.form-msg.err { color: var(--err); }

.tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, .3); }
.tabs button { height: 28px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 500; cursor: pointer; }
.tabs button.on { background: rgba(255, 255, 255, .12); color: var(--fg); }
.list { display: flex; flex-direction: column; gap: 10px; }
.rent { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 16px; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0, 0, 0, .25); }
.rent-name { font-weight: 600; font-size: 15px; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rent-meta { margin-top: 3px; font-size: 13px; color: var(--muted); }
.rent-note { margin-top: 6px; font-size: 13px; color: rgba(255, 255, 255, .75); }
.rent-cost { text-align: right; }
.rent-cost b { display: block; font-size: 18px; font-weight: 500; letter-spacing: -.03em; }
.rent-cost span { font-size: 12px; color: var(--muted); }
.rent-actions { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 500; border: 1px solid var(--line); color: var(--muted); }
.badge.res { color: var(--warn); border-color: rgba(255, 184, 107, .3); }
.badge.res::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.kind { text-transform: uppercase; letter-spacing: .06em; font-size: 10px; }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); font-size: 14px; border: 1px dashed var(--line); border-radius: 14px; }
.empty a { color: var(--fg); }
.skeleton { height: 92px; border-radius: 14px; background: linear-gradient(90deg, rgba(255,255,255,.03), rgba(255,255,255,.07), rgba(255,255,255,.03)); background-size: 200% 100%; animation: sk 1.2s linear infinite; }
@keyframes sk { to { background-position: -200% 0; } }

@media (max-width: 900px) { .grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .top { padding: 12px 16px; } .top-left nav { display: none; }
  .wrap { padding: 28px 16px 64px; }
  .page-head h1 { font-size: 38px; }
  .stats { grid-template-columns: 1fr 1fr; } .stats .stat:last-child { grid-column: 1 / -1; }
  .auth { padding: 0 16px; }
  .pill { display: none; }
}
@media (prefers-reduced-motion: reduce) { .grain, .skeleton, .spin { animation: none; } }

/* Motion: one easing, staggered entrances, sliding segment indicators, FLIP list */
:root { --ease: cubic-bezier(.22, 1, .36, 1); }
.btn { transition: background .15s, border-color .15s, opacity .15s, transform .45s var(--ease), box-shadow .45s var(--ease); }
.btn:not(:disabled):active { transform: scale(.97); transition-duration: .12s; }
.btn-primary:not(:disabled):hover { box-shadow: 0 8px 30px rgba(255, 255, 255, .12); }
.rise { animation: rise .9s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms + 80ms); }
@keyframes rise { from { opacity: 0; translate: 0 18px; filter: blur(8px); } to { opacity: 1; translate: 0 0; filter: none; } }
.top { animation: drop .8s var(--ease) both; }
@keyframes drop { from { opacity: 0; translate: 0 -100%; } to { opacity: 1; translate: 0 0; } }
.particles { animation: fade 1.6s ease both; }
@keyframes fade { from { opacity: 0; } }
.pill i { animation: live 2.4s ease-in-out infinite; }
@keyframes live { 50% { opacity: .45; box-shadow: 0 0 2px var(--ok); } }
.seg, .tabs { position: relative; }
.seg button, .tabs button { position: relative; z-index: 1; transition: color .2s; }
.seg button.on, .tabs button.on { background: transparent; }
.seg-ind { position: absolute; top: 3px; left: 0; height: calc(100% - 6px); border-radius: 7px; background: rgba(255, 255, 255, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); transition: translate .45s var(--ease), width .45s var(--ease); pointer-events: none; }
.seg-ind.no-anim { transition: none; }
.rent { transition: border-color .2s, background .2s; }
.rent:hover { border-color: rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .025); }
.rent.bump .rent-cost b { animation: bump .7s var(--ease); }
@keyframes bump { 30% { color: var(--ok); transform: translateY(-2px); } }
.rent-cost b { display: block; }
.form-msg:not(:empty) { animation: fade .4s ease both; }
.auth-err:not(:empty) { animation: nudge .45s var(--ease); }
@keyframes nudge { 20% { translate: -6px 0; } 40% { translate: 5px 0; } 60% { translate: -3px 0; } 80% { translate: 2px 0; } }
.empty { animation: fade .5s ease both; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .grain { animation: none !important; }
}

/* On-chain escrow */
.chain { margin-top: 16px; }
.chain h2 { flex-wrap: wrap; }
.chain-bal { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.prog { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; margin-top: 10px; }
.prog i { display: block; height: 100%; background: var(--ok); border-radius: 99px; transition: width 1s var(--ease); }
.badge.live { color: var(--ok); border-color: rgba(94, 232, 160, .3); }
.badge.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: live 1.4s ease-in-out infinite; }
.badge.bad { color: var(--err); border-color: rgba(255, 122, 122, .35); }
.rent a.tx { font-size: 12px; color: var(--muted); }

/* provider + arbiter desks */
.pform { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; align-items: end; margin: 6px 0 14px; }
.pform .field { margin: 0; }
.sub { font-size: 14px; font-weight: 600; margin: 18px 0 8px; color: var(--muted); }
.hint { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.ain { width: 92px; height: 32px; }
.access { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.access code { font-size: 12px; user-select: all; }
.grid:has(#res-panel[hidden]) { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
