/* Desktop cabinet using the Mini App's navigation, rows, and sheets. */
:root { --lf-site-font: Montserrat, system-ui, sans-serif; }
/* Keep legacy section captions and injected account controls on the same face. */
:where(body, body *) { font-family: var(--lf-site-font) !important; }

:root[data-theme="light"] {
  --ws-glass: linear-gradient(148deg, #ffffff73, #f4f6ff32 54%, #f3f2ff65);
  --ws-dock: linear-gradient(150deg, #ffffff85, #f1f6ff49 45%, #f0edff69);
  --ws-dock-selected: linear-gradient(155deg, #ffffff96, #e5e6ff65);
  --ws-dock-rim: inset 0 1px 1px #ffffffe8, inset 0 -1px 1px #ffffff65, 0 9px 25px -11px #39497750;
  --ws-sheet: linear-gradient(125deg, #f9fbff76, #e7e9ff68);
  --ws-highlight: linear-gradient(143deg, #ffffffd9, #ecedffb0);
  --ws-edge: rgba(255, 255, 255, .92);
  --ws-rim: inset 0 1px 0 #fff, inset 0 -1px 0 #ffffff38, 0 12px 28px -19px #35467551;
  --ws-shade: rgba(54, 62, 91, .22);
  --ws-control: rgba(118, 133, 177, .11);
  --ws-icon: rgba(96, 106, 237, .09);
}
:root[data-theme="dark"] {
  --ws-glass: linear-gradient(148deg, #768abb38, #404a7424 54%, #645a983b);
  --ws-dock: linear-gradient(150deg, #38436491, #242c4a86 45%, #322b528c);
  --ws-dock-selected: linear-gradient(155deg, #9b9af54d, #6c61b239);
  --ws-dock-rim: inset 0 1px 1px #e5eaff58, inset 0 -1px 1px #c0c9ff25, 0 11px 27px -10px #020613bd;
  --ws-sheet: linear-gradient(125deg, #303a58c9, #242c45bf);
  --ws-highlight: linear-gradient(143deg, #7f77d150, #6052a04c);
  --ws-edge: rgba(205, 216, 248, .24);
  --ws-rim: inset 0 1px 0 #e0e8ff26, inset 0 -1px 0 #ffffff0d, 0 15px 32px -19px #020616c4;
  --ws-shade: rgba(6, 11, 25, .48);
  --ws-control: rgba(167, 181, 235, .11);
  --ws-icon: rgba(154, 140, 255, .15);
}

.lf-workspace .cab-workspace { width: min(1200px, calc(100% - 64px)); padding-top: 19px; }
.lf-workspace .cab-footer { width: min(1200px, calc(100% - 64px)); }
.lf-workspace .ws-shell { display: flex; gap: 20px; align-items: center; justify-content: space-between; }
:is(.lf-landing-workspace, .lf-workspace) .header > .header-row,
.lf-workspace .cab-nav {
  background: var(--ws-dock);
  border-color: var(--ws-edge);
  box-shadow: var(--ws-dock-rim);
  -webkit-backdrop-filter: blur(7px) saturate(118%);
  backdrop-filter: blur(7px) saturate(118%);
}
.lf-workspace .cab-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: min(770px, 100%);
  margin: 0;
  gap: 5px;
  padding: 5px;
  border-radius: 25px;
}
.lf-workspace .cab-nav button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 48px;
  padding: 7px;
  border-radius: 19px;
}
.lf-workspace .cab-nav button > span { margin: 0; color: inherit; }
.lf-workspace .cab-nav button svg { flex: none; width: 19px; height: 19px; }
.lf-workspace .cab-nav button[aria-current="page"] {
  background: var(--ws-dock-selected);
  color: var(--accent);
  border-color: var(--ws-edge);
  box-shadow: var(--ws-dock-rim);
}
.ws-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.ws-page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin: 34px 0 20px; }
.ws-page-heading h1 { font-size: clamp(27px, 3vw, 38px); letter-spacing: -.04em; line-height: 1.14; margin: 0; }
.ws-page-heading p { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.ws-heading-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ws-heading-actions > span:empty { display: none; }
.lf-workspace .ws-heading-actions .cab-button { min-height: 41px; padding: 8px 13px; gap: 8px; border-radius: 15px; white-space: nowrap; }
.lf-workspace .ws-heading-actions .cab-action-icon svg { width: 17px; height: 17px; }
.ws-page-heading #wsBack { padding: 0 0 6px; min-height: 32px; }
.ws-section-title { font-size: 17px; letter-spacing: -.02em; margin: 0 0 11px; }
.ws-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ws-section-head h2, .ws-section-head h3 { margin: 0; }
.ws-section-head .cab-text-button { display: inline-flex; align-items: center; gap: 5px; }
.ws-section-head .cab-text-button svg { width: 15px; height: 15px; }
.ws-home-grid, .ws-profile { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.ws-column { display: grid; gap: 15px; min-width: 0; }
.lf-workspace .cab-glass { background: var(--ws-glass); border-color: var(--ws-edge); box-shadow: var(--ws-rim); border-radius: 23px; }
.ws-home-primary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 24px; overflow: hidden; }
.ws-home-primary h2 { margin: 0; font-size: clamp(22px, 2.6vw, 32px); letter-spacing: -.04em; line-height: 1.15; }
.ws-home-primary p { margin: 8px 0 17px; color: var(--muted); }
.ws-home-primary img { width: min(33%, 145px); height: auto; flex: none; filter: drop-shadow(0 12px 14px #29428640); }
.ws-shortcuts, .ws-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ws-shortcuts { gap: 12px; }
.ws-shortcut { text-align: left; display: grid; gap: 5px; padding: 14px; grid-template-columns: 1fr auto; color: var(--ink); }
.ws-shortcut strong, .ws-shortcut small { grid-column: 1 / -1; }
.ws-shortcut strong { margin-top: 4px; }
.ws-shortcut small, .ws-muted { color: var(--muted); }
.ws-stats button { display: flex; align-items: center; gap: 8px; background: none; color: var(--muted); padding: 13px 15px; font-size: 12px; }
.ws-stats button+button { border-left: 1px solid var(--line); }
.ws-stats strong { font-size: 23px; color: var(--ink); font-variant-numeric: tabular-nums; }

.ws-list { overflow: hidden; }
.ws-row { width: 100%; background: transparent; text-align: left; display: flex; align-items: center; gap: 12px; position: relative; min-height: 70px; padding: 11px 15px; color: var(--ink); }
.ws-row:hover { background: var(--accent-soft); }
.ws-row+.ws-row::before { content: ''; position: absolute; top: 0; left: 66px; right: 0; height: 1px; background: var(--line); }
.ws-row:focus-visible { outline-offset: -3px; }
.ws-icon { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 13px; flex: none; background: var(--ws-icon); color: var(--accent); }
.ws-icon svg, .ws-chevron svg { display: block; width: 19px; height: 19px; }
.ws-chevron { flex: none; color: var(--subtle); }
.ws-chevron svg { width: 16px; height: 16px; }
.ws-row-copy { display: grid; gap: 2px; min-width: 0; flex: 1; }
.ws-row-copy strong { font-size: 14px; font-weight: 680; line-height: 1.35; overflow-wrap: anywhere; }
.ws-row-copy small, .ws-row-end small, .ws-id { font-size: 12px; font-weight: 500; color: var(--muted); }
.ws-row-end { flex: none; display: grid; gap: 2px; text-align: right; font-size: 12px; }
.ws-row-end .ws-live { color: var(--green); }
.ws-list-page { width: min(100%, 900px); }
.ws-list-tools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(310px, .85fr); gap: 12px; }
.ws-search, .ws-segment { display: flex; align-items: center; gap: 7px; border: 1px solid var(--ws-edge); border-radius: 15px; background: var(--ws-control); }
.ws-search { padding: 0 12px; color: var(--muted); }
.ws-search svg { width: 19px; height: 19px; flex: none; }
.ws-search input { min-width: 0; width: 100%; min-height: 43px; border: 0; background: transparent; color: var(--ink); padding: 0 4px; }
.ws-search input::placeholder { color: var(--muted); }
.ws-segment { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); padding: 3px; }
.ws-segment button { min-height: 36px; padding: 4px; background: transparent; color: var(--ink); border-radius: 12px; font-size: 12px; }
.ws-segment button[aria-pressed="true"] { color: var(--accent); background: var(--ws-highlight); box-shadow: var(--ws-rim); }
.ws-list-count { margin: 14px 2px 8px !important; color: var(--muted); font-size: 12px; }

.lf-workspace .cab-modal {
  width: min(100% - 36px, 500px);
  max-height: min(82dvh, 790px);
  padding: 25px;
  border: 1px solid var(--ws-edge);
  border-radius: 26px;
  background: var(--ws-sheet);
  box-shadow: var(--ws-rim), 0 25px 75px -40px #18294ca1;
  -webkit-backdrop-filter: blur(17px) saturate(105%);
  backdrop-filter: blur(17px) saturate(105%);
}
.lf-workspace .cab-modal::backdrop { background: var(--ws-shade); backdrop-filter: blur(2px); }
.lf-workspace .cab-modal-head #cabDialogKicker { color: var(--accent); font-weight: 650; }
.lf-workspace .cab-modal h2 { font-size: 25px; margin: 8px 0 15px; }
.lf-workspace .cab-modal h3 { font-size: 16px; }
.lf-workspace #cabDialogClose { background: var(--ws-highlight); box-shadow: var(--ws-rim); }
.ws-sheet-actions { display: grid; gap: 8px; margin-top: 13px; }
.ws-sheet-actions .cab-button { justify-content: center; }
.ws-sheet-section { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; }
.ws-sheet-section .ws-muted { margin: 4px 0 9px; font-size: 12px; }
.ws-sheet-section .ws-list { margin-top: 8px; }
.lf-workspace .cab-modal .cab-field input, .lf-workspace .cab-modal .cab-field select { background: var(--ws-highlight); }
.ws-form-panel { padding: 21px; }
.ws-form-panel h2 { font-size: 18px; margin: 0 0 10px; }
.ws-balance { font-size: 38px; font-weight: 730; line-height: 1.15; letter-spacing: -.04em; }
.ws-balance small { font-size: 15px; }
.ws-ref-stats { display: flex; flex-wrap: wrap; gap: 14px 24px; }
.ws-ref-stats dd { margin: 0; font-weight: 700; }
.ws-ledger { padding: 0; margin: 0; list-style: none; }
.ws-ledger li { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ws-ledger li:last-child { border-bottom: 0; }
.ws-ledger small { display: block; color: var(--muted); }

.lf-landing-workspace .hero { padding-block: 29px 20px; }
.lf-landing-workspace .hero .hero-layout {
  min-height: 0;
  grid-template-columns: minmax(0,1.2fr) minmax(0,.8fr);
  gap: 10px;
}
.lf-landing-workspace .hero-copy { padding: clamp(23px,4vw,57px); }
.lf-landing-workspace .hero h1 { font-size: clamp(39px,5vw,74px); line-height: 1.02; letter-spacing: -.052em; margin: 0 0 16px; }
.lf-landing-workspace .hero-description { max-width: 47ch; font-size: 16px; line-height: 1.65; margin-bottom: 19px; }
.lf-landing-workspace .hero .scene { height: clamp(280px,31vw,390px); margin: 0; }
.lf-landing-workspace .hero .action-dock { margin: 14px 0 0; }
.lf-landing-workspace .action-dock .dock-card { min-height: 78px; }
.lf-landing-workspace .action-dock .dock-card:not(.dock-primary) {
  background: var(--ws-glass);
  box-shadow: var(--ws-rim);
}
.lf-landing-workspace .hero .hero-offer { margin: 14px 0 0; }

.lf-landing-workspace .phone-stage {
  width: 100%;
  max-width: 600px;
  height: auto;
  gap: 15px;
  padding: 0 5px 9px;
  overflow: visible;
}
.lf-landing-workspace .phone-stage :is(.phone-orbit, .phone-step-label) { display: none; }
.lf-landing-workspace .phone-aura {
  inset: 12% 8%;
  background: radial-gradient(ellipse, var(--glow) 5%, var(--glow-cool) 35%, transparent 69%);
  filter: none;
  pointer-events: none;
}
.ws-phone-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  position: relative;
  z-index: 2;
}
.lf-landing-workspace .ws-phone-controls :is(.phone-theme-tabs, .phone-view-tabs) {
  position: static;
  transform: none;
  margin: 0;
  padding: 3px;
  border-radius: 15px;
  border-color: var(--ws-edge);
  background: var(--ws-dock);
  box-shadow: var(--ws-rim);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.lf-landing-workspace .ws-phone-controls button { min-height: 34px; padding: 5px 11px; border-radius: 11px; }
.lf-landing-workspace .ws-phone-controls button[aria-pressed="true"] {
  background: var(--ws-dock-selected);
  color: var(--accent);
  box-shadow: var(--ws-rim);
}

.lf-landing-workspace .phone-shell.demo-phone {
  width: min(436px, 100%);
  height: auto;
  min-height: 0;
  aspect-ratio: 767 / 1599;
  margin: 0;
  overflow: visible;
  border-color: #5d6269;
  background: linear-gradient(132deg, #7b7e81, #292c32 19%, #0e1015 42%, #36383c 77%, #5d5f63);
  box-shadow: inset 0 0 0 3px #111217, inset 0 0 0 4px #ffffff1c,
    inset 0 0 0 12px #090a0e, 0 0 0 1px #171a21, 12px 25px 54px -20px #1219318f;
}
.lf-landing-workspace .phone-display { box-shadow: 0 0 0 1px #16171a; }
.ws-phone-hardware { position: absolute; inset: 0; pointer-events: none; }
.ws-phone-hardware i {
  position: absolute;
  left: -3px;
  width: 3px;
  height: 5.1%;
  border-radius: 2px 0 0 2px;
  background: linear-gradient(90deg, #404249, #797a7c 46%, #282a2d);
}
.ws-phone-hardware i:nth-child(1) { top: 16%; height: 3.1%; }
.ws-phone-hardware i:nth-child(2) { top: 21%; }
.ws-phone-hardware i:nth-child(3) { top: 27%; }
.ws-phone-hardware i:nth-child(4) { top: 23%; right: -3px; left: auto; height: 7.6%; transform: scaleX(-1); }
.lf-landing-workspace .demo-status {
  height: clamp(25px, 7vw, 37px);
  padding: 0 6.2%;
  font-size: 11px;
}
.lf-landing-workspace .demo-status > i {
  top: 19%;
  width: 28%;
  height: 65%;
  border-radius: 99px;
  background: #07080b;
  box-shadow: inset 0 1px 2px #ffffff12;
}
.lf-landing-workspace .demo-status > i::after {
  content: '';
  position: absolute;
  top: 31%;
  right: 10%;
  width: auto;
  height: 38%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, #344267, #111827 42%, #090a11 70%);
}
.lf-landing-workspace .demo-status-icons svg { display: block; }
.lf-landing-workspace .demo-home { height: clamp(14px, 4vw, 20px); }
.lf-landing-workspace .demo-home::after { width: 33%; height: 4px; top: auto; bottom: 5px; }
.lf-landing-workspace .phone-caption {
  position: relative;
  inset: auto;
  transform: none;
  text-align: center;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0;
}
.lf-landing-workspace .phone-scroll-hint { font-size: 10px; font-weight: 500; }

@media(max-width: 850px) {
  .lf-workspace .cab-workspace, .lf-workspace .cab-footer { width: calc(100% - 36px); }
  .ws-email { display: none; }
  .lf-workspace .cab-nav { width: 100%; }
  .ws-home-grid, .ws-profile { gap: 13px; }
}
@media(max-width: 680px) {
  .lf-workspace .cab-workspace { padding-top: 10px; padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
  .lf-workspace .cab-footer { padding-bottom: calc(89px + env(safe-area-inset-bottom)); }
  .lf-workspace .cab-nav { width: auto; position: fixed; z-index: 71; inset: auto 13px calc(11px + env(safe-area-inset-bottom)); }
  .lf-workspace .cab-nav button { flex-direction: column; gap: 2px; min-height: 47px; font-size: clamp(8px,2.4vw,11px); padding: 3px 1px; border-radius: 17px; }
  .ws-page-heading { margin: 15px 0 14px; align-items: center; }
  .ws-heading-actions { gap: 4px; }
  .lf-workspace .ws-heading-actions .cab-button { min-height: 38px; padding: 6px 8px; font-size: 11px; }
  .ws-home-grid, .ws-profile, .ws-list-tools { grid-template-columns: 1fr; }
  .ws-home-primary { padding: 17px; }
  .ws-row { gap: 8px; padding: 10px; min-height: 64px; }
  .ws-row+.ws-row::before { left: 56px; }
  .ws-row-end small { font-size: 11px; }
  .lf-workspace .cab-modal { margin: auto auto 0; width: min(100%,500px); padding: 18px 18px max(22px,env(safe-area-inset-bottom)); border-radius: 25px 25px 0 0; }
  .lf-workspace .cab-modal::before { content: ''; display: block; width: 32px; height: 4px; background: var(--line-strong); border-radius: 999px; margin: -7px auto 8px; }
  .lf-workspace[data-view="buy"] .cab-invoice { bottom: calc(73px + env(safe-area-inset-bottom)); }
  .lf-workspace[data-view="buy"] .cab-workspace { padding-bottom: calc(220px + env(safe-area-inset-bottom)); }
  .lf-workspace .cab-toast { bottom: calc(78px + env(safe-area-inset-bottom)); }
  .lf-landing-workspace .hero .hero-layout { display: grid; grid-template-columns: 1fr; gap: 0; }
  .lf-landing-workspace .hero-copy { padding: 22px 16px 3px; }
  .lf-landing-workspace .hero h1 { font-size: clamp(34px,10vw,53px); }
  .lf-landing-workspace .hero-description { font-size: 14px; }
  .lf-landing-workspace .hero-buttons { display: flex; flex-wrap: wrap; justify-content: flex-start; }
  .lf-landing-workspace .hero-buttons .button { min-height: 41px; font-size: 11px; padding: 9px 12px; gap: 8px; width: auto; }
  .lf-landing-workspace .hero .scene { height: clamp(205px,69vw,300px); margin: auto; }
}
@media (prefers-reduced-transparency: reduce) {
  :is(.lf-landing-workspace, .lf-workspace) .header > .header-row,
  .lf-landing-workspace .action-dock .dock-card:not(.dock-primary),
  .lf-landing-workspace .ws-phone-controls :is(.phone-theme-tabs, .phone-view-tabs),
  .lf-workspace .cab-glass, .lf-workspace .cab-nav, .lf-workspace .cab-modal {
    background: var(--panel) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}
