/* Disco Shark client area. Shared by login.html and cabinet.html.
   Uses the brand tokens from site.css (abyss, deep, chrome, bite, Geist). */

body.app { min-height: 100svh; display: flex; flex-direction: column; }

/* ---------- app top bar (solid, not the marketing nav) ---------- */
.app-nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  height: 60px; padding-inline: max(var(--pad), calc(50vw - 1280px / 2 + var(--pad)));
  background: rgba(14, 19, 22, 0.82); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.app-nav .brand { font-size: 1.125rem; }
.app-nav__right { display: flex; align-items: center; gap: 10px; }
.app-nav__tag { font: 500 0.6875rem/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--steel); padding: 5px 9px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-hi); }
.app-link { display: inline-flex; align-items: center; white-space: nowrap; min-height: 40px; padding: 0 12px; color: var(--steel-hi); text-decoration: none; font-size: 0.9375rem; font-weight: 550; border-radius: 999px; transition: color 160ms ease, box-shadow 160ms ease; }
.app-nav__tag { white-space: nowrap; }
@media (max-width: 520px) { .app-nav__tag { display: none; } .app-nav { gap: 8px; } .app-nav__right { gap: 4px; } .app-link { padding: 0 10px; } .app-nav .brand { font-size: 1.0625rem; } }
.app-link:hover { color: var(--chrome); }
.app-link--edge { box-shadow: inset 0 0 0 1.5px var(--edge); }
.app-link--edge:hover { box-shadow: inset 0 0 0 1.5px var(--chrome); }

.app-main { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: clamp(24px, 4vw, 44px) var(--pad) clamp(48px, 7vw, 80px); }

/* ---------- login ---------- */
.login { min-height: calc(100svh - 60px); display: grid; place-items: center; padding: 40px var(--pad); position: relative; overflow: hidden; }
.login .glow { position: absolute; left: 50%; top: -20%; width: min(900px, 130vw); height: 80vh; transform: translateX(-50%); pointer-events: none; background: radial-gradient(58% 54% at 50% 0%, rgba(122, 152, 168, 0.12), rgba(14, 19, 22, 0) 72%); }
.loginbox { position: relative; width: 100%; max-width: 440px; background: var(--deep); border-radius: var(--r-surface); box-shadow: inset 0 0 0 1px var(--line); padding: clamp(26px, 4vw, 40px); display: grid; gap: 20px; }
.loginbox h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem); letter-spacing: -0.04em; line-height: 1; }
.loginbox .lede { margin: 0; }
.loginbox form { display: grid; gap: 16px; }
.loginbox .btn { width: 100%; }
.login__alt { display: grid; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.login__note { color: var(--steel); font-size: 0.8125rem; line-height: 1.5; }
.login__back { justify-self: start; }

/* ---------- cabinet shell ---------- */
.cab__head { display: grid; gap: 6px; margin-bottom: clamp(22px, 3vw, 32px); }
.cab__head .eyebrow { color: var(--steel); }
.cab__head h1 { font-size: clamp(2rem, 1.5rem + 2.2vw, 3rem); letter-spacing: -0.04em; line-height: 1; }
.cab { display: grid; gap: clamp(20px, 3vw, 36px); align-items: start; }
@media (min-width: 900px) { .cab { grid-template-columns: 244px 1fr; } }

/* sidebar (desktop) / tab strip (mobile) */
.cab__side { display: grid; gap: 16px; align-content: start; }
@media (min-width: 900px) { .cab__side { position: sticky; top: 76px; } }
.cab__client { display: grid; gap: 4px; padding: 16px; background: var(--deep); border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.cab__client b { font-weight: 700; letter-spacing: -0.02em; }
.cab__client span { color: var(--steel-hi); font-size: 0.8125rem; }
.cab__client .handle { font-family: var(--font-mono); font-size: 0.75rem; color: var(--steel); }
.cab__tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.cab__tabs::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .cab__tabs { flex-direction: column; gap: 2px; overflow: visible; } }
.tab {
  -webkit-appearance: none; appearance: none; border: 0; background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  min-height: 44px; padding: 0 14px; border-radius: 10px;
  color: var(--steel-hi); font: 600 0.9375rem/1 var(--font-display); letter-spacing: -0.01em;
  transition: color 160ms ease, background-color 160ms ease; -webkit-tap-highlight-color: transparent;
}
.tab .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.45; flex: none; }
.tab:hover { color: var(--chrome); }
.tab[aria-selected="true"] { color: var(--chrome); background: var(--deep); box-shadow: inset 0 0 0 1px var(--line); }
.tab[aria-selected="true"] .dot { opacity: 1; background: var(--bite); }
.tab .count { margin-left: auto; font: 500 0.75rem/1 var(--font-mono); color: var(--steel); padding-left: 10px; }
.cab__new { margin-top: 4px; }
.cab__new .btn { width: 100%; }
@media (max-width: 899px) { .cab__new { display: none; } }

/* panels */
.panel { display: none; }
.panel.is-active { display: block; animation: panelIn 260ms var(--ease-out); }
@media (prefers-reduced-motion: reduce) { .panel.is-active { animation: none; } }
@keyframes panelIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.panel__h { font-size: 1.5rem; letter-spacing: -0.03em; margin: 0 0 4px; }
.panel__sub { color: var(--steel-hi); margin: 0 0 22px; max-width: 56ch; }
.panel + .panel { margin-top: 0; }

/* overview */
.hi { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; margin-bottom: 20px; }
.hi h2 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); letter-spacing: -0.04em; line-height: 1; }
.hi .plan { font: 500 0.75rem/1 var(--font-mono); color: var(--steel-hi); padding: 6px 10px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-hi); }
.callout { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; padding: 20px 22px; border-radius: var(--r-surface); background: linear-gradient(180deg, rgba(255, 74, 28, 0.10), rgba(255, 74, 28, 0.03)); box-shadow: inset 0 0 0 1px rgba(255, 74, 28, 0.30); margin-bottom: 24px; }
.callout__t { display: grid; gap: 3px; }
.callout__t b { font-weight: 700; letter-spacing: -0.02em; }
.callout__t span { color: var(--steel-hi); font-size: 0.9375rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 26px; }
@media (max-width: 560px) { .stats { grid-template-columns: 1fr; } }
.stat { padding: 18px; background: var(--deep); border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 4px; }
.stat b { font-weight: 800; font-size: clamp(2rem, 1.6rem + 1.4vw, 2.75rem); letter-spacing: -0.04em; line-height: 0.95; font-variant-numeric: tabular-nums; }
.stat span { color: var(--steel-hi); font-size: 0.875rem; }
.ov__cta { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center; }

/* video gallery */
.vids { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 18px; }
.vcard { background: var(--deep); border-radius: var(--r-surface); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); display: grid; }
.vcard__media { position: relative; aspect-ratio: 9 / 16; background: #000; }
.vcard__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vcard__body { padding: 16px; display: grid; gap: 12px; align-content: start; }
.vcard__title { display: grid; gap: 2px; }
.vcard__title b { font-weight: 700; font-size: 1.0625rem; letter-spacing: -0.02em; }
.vcard__title span { color: var(--steel-hi); font-size: 0.875rem; }
.vcard__facts { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--steel); font-family: var(--font-mono); font-size: 0.75rem; }
.vcard__row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 2px; }

/* orders in progress */
.orders { display: grid; gap: 16px; }
.order { background: var(--deep); border-radius: var(--r-surface); box-shadow: inset 0 0 0 1px var(--line); padding: clamp(18px, 2.6vw, 26px); display: grid; gap: 18px; }
.order__top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.order__top b { font-weight: 700; font-size: 1.1875rem; letter-spacing: -0.025em; }
.order__meta { color: var(--steel-hi); font-family: var(--font-mono); font-size: 0.8125rem; }
.steps { display: flex; margin: 4px 0; }
.step { flex: 1; text-align: center; position: relative; padding-top: 26px; min-width: 0; }
.step::before { content: ""; position: absolute; top: 6px; right: 50%; width: 100%; height: 2px; background: var(--line-hi); }
.step:first-child::before { display: none; }
.step__dot { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 14px; height: 14px; border-radius: 50%; background: var(--deeper); box-shadow: inset 0 0 0 2px var(--line-hi); z-index: 1; }
.step__l { font: 600 0.75rem/1.1 var(--font-display); color: var(--steel); letter-spacing: -0.01em; }
.step.is-done::before { background: var(--chrome); }
.step.is-done .step__dot { background: var(--chrome); box-shadow: none; }
.step.is-done .step__l { color: var(--steel-hi); }
.step.is-current::before { background: linear-gradient(90deg, var(--chrome), var(--bite)); }
.step.is-current .step__dot { background: var(--bite); box-shadow: 0 0 0 4px rgba(255, 74, 28, 0.18); }
.step.is-current .step__l { color: var(--chrome); }
.order__next { color: var(--steel-hi); font-size: 0.9375rem; line-height: 1.5; max-width: 60ch; }
.order__row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* briefs */
.briefs { display: grid; gap: 14px; }
.bcard { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; background: var(--deep); border-radius: var(--r-surface); box-shadow: inset 0 0 0 1px var(--line); padding: 18px 20px; }
.bcard__t { display: grid; gap: 3px; }
.bcard__t b { font-weight: 700; letter-spacing: -0.02em; }
.bcard__t span { color: var(--steel-hi); font-size: 0.875rem; font-family: var(--font-mono); }

/* invoices */
.inv { display: grid; gap: 10px; }
.inv__row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 16px; background: var(--deep); border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); padding: 16px 18px; }
.inv__t { display: grid; gap: 4px; min-width: 0; }
.inv__t b { font-weight: 650; letter-spacing: -0.01em; }
.inv__t .m { color: var(--steel); font-family: var(--font-mono); font-size: 0.75rem; display: flex; flex-wrap: wrap; gap: 3px 12px; }
.inv__right { display: grid; justify-items: end; gap: 6px; }
.inv__amt { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.inv__amt small { font-size: 0.75rem; font-weight: 500; font-family: var(--font-mono); color: var(--steel); margin-left: 4px; }
.pay { margin-top: 2px; }
.wallet { grid-column: 1 / -1; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--steel-hi); font-size: 0.8125rem; }
.wallet code { font-family: var(--font-mono); color: var(--chrome); background: var(--abyss); padding: 3px 8px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line-hi); }

/* status tags */
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font: 500 0.75rem/1 var(--font-mono); letter-spacing: 0.02em; white-space: nowrap; }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.tag.paid { color: #7FE0A8; box-shadow: inset 0 0 0 1px rgba(127, 224, 168, 0.32); }
.tag.awaiting, .tag.wait { color: var(--bite); box-shadow: inset 0 0 0 1px rgba(255, 74, 28, 0.38); }
.tag.free { color: var(--steel-hi); box-shadow: inset 0 0 0 1px var(--line-hi); }

/* account */
.acc { display: grid; gap: 14px; max-width: 560px; }
.acc__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; background: var(--deep); border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); padding: 16px 18px; }
.acc__row .k { color: var(--steel-hi); font-size: 0.9375rem; }
.acc__row .v { font-weight: 600; letter-spacing: -0.01em; display: inline-flex; align-items: center; gap: 10px; }
.switch { -webkit-appearance: none; appearance: none; width: 48px; height: 28px; border-radius: 999px; background: var(--deeper); box-shadow: inset 0 0 0 1.5px var(--edge); position: relative; cursor: pointer; transition: background-color 200ms ease, box-shadow 200ms ease; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--chrome); transition: transform 220ms var(--ease-out); }
.switch:checked { background: var(--bite); box-shadow: none; }
.switch:checked::after { transform: translateX(20px); background: var(--abyss); }
.acc__danger { margin-top: 10px; color: var(--steel); font-size: 0.875rem; }
.acc__danger a { color: var(--steel-hi); }

.cab__empty { color: var(--steel-hi); background: var(--deep); border-radius: var(--r-surface); box-shadow: inset 0 0 0 1px var(--line); padding: 28px; }

/* cabinet video: custom play button (no default controls spinner until played) */
.vcard__media .vplay { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 56px; height: 56px; border: 0; border-radius: 50%; background: rgba(14, 19, 22, 0.72) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z' fill='%23E8ECEE'/%3E%3C/svg%3E") center / 22px no-repeat; box-shadow: inset 0 0 0 1.5px var(--edge); cursor: pointer; transition: transform 160ms var(--ease-out); -webkit-tap-highlight-color: transparent; }
.vcard__media .vplay:hover { transform: translate(-50%, -50%) scale(1.06); }
.vcard__media video::-webkit-media-controls { display: none; }
