/* Customer workspace. Type and spacing carry the hierarchy; violet marks actions. */
body:not(.admin-mode) {
  --motion-ease: cubic-bezier(.2,.72,.25,1);
  --touch-size: 44px;
}
body:not(.admin-mode) #main > :where(:not(footer)) { max-width: 1280px; margin-inline: auto; }
body:not(.admin-mode) #main > .login-stage { max-width: 650px; }
body:not(.admin-mode) .topbar { border-color: var(--line); }
body:not(.admin-mode) .nav-link {
  position: relative;
  transition: background-color 160ms ease, color 160ms ease;
}
body:not(.admin-mode) .nav-link.on::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 27%; bottom: 27%;
  width: 3px; background: var(--purple); border-radius: 2px;
}

.atlas-hero {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: clamp(300px, 26vw, 380px);
  padding: clamp(28px, 3.7vw, 62px);
  color: #f5f0fb;
  background: radial-gradient(ellipse at 78% 42%, #30273d, #1f1a29 39%, #19161f 74%);
  border-radius: 5px;
}
.atlas-art {
  position: absolute; z-index: -1; inset-inline-end: -3%; top: 50%;
  transform: translateY(-50%); width: 61%; height: auto; pointer-events: none;
}
.atlas-copy { max-width: 53%; }
.atlas-copy h1 {
  margin: 0; color: #faf6ff; font-size: clamp(40px, 4.5vw, 70px);
  line-height: 1.16; letter-spacing: -.045em; font-weight: 650; text-wrap: balance;
}
.atlas-copy em { color: #d1b3ec; font-weight: 500; font-style: normal; }
.atlas-copy p { color: #d5ccdf; font-size: clamp(14px, 1vw, 16px); margin: 15px 0 0; line-height: 1.65; }
.atlas-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 23px; margin-top: 24px; }
.atlas-actions .atlas-primary {
  display: inline-flex; align-items: center; gap: 18px; margin: 0; min-height: var(--touch-size);
  background: #dec5fa; color: #261634; font-size: 14px; padding: 10px 18px; border: 0; border-radius: 6px;
}
.atlas-primary .icon, .quick-links .icon:last-child, .row-chevron .icon { width: 16px; height: 16px; }
.atlas-secondary {
  display: inline-flex; align-items: center; min-height: var(--touch-size); color: #f1eaf8; font-size: 14px;
  text-decoration: underline; text-decoration-color: #817088; text-underline-offset: 5px;
}
.quick-links { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border-bottom: 1px solid var(--line); }
.quick-links a {
  display: flex; align-items: center; gap: 11px; min-width: 0;
  padding: 20px clamp(10px,1.5vw,28px); font-size: 14px; font-weight: 550;
}
.quick-links a + a { position: relative; }
.quick-links a + a::before { content:""; position:absolute; left:0; height:20px; border-left:1px solid var(--line); }
.quick-links a > .icon:first-child { width:18px; height:18px; color:var(--purple); flex-shrink:0; }
.quick-links a > .icon:last-child { margin-inline-start:auto; flex-shrink:0; color:var(--muted); }
.home-services-head { margin: clamp(28px,3vw,48px) 0 2px; align-items: baseline; }
.home-services-head h2, body:not(.admin-mode) .page-head h1 { letter-spacing: -.035em; }
.home-services-head h2 { font-size:clamp(24px,2.25vw,34px); }
.service-grid { column-gap:clamp(20px,3vw,48px); }
.service-grid .service-row {
  display: grid; grid-template-columns: 42px minmax(0,1fr) 16px; gap: 16px;
  min-height: 93px; padding: 18px 4px; color: var(--ink);
  transition: background-color 180ms var(--motion-ease);
}
.service-grid .service-icon {
  width: 42px; height: 42px; border-radius: 11px;
  background: color-mix(in srgb,var(--purple) 10%,var(--paper));
  border: 1px solid color-mix(in srgb,var(--purple) 17%,var(--paper));
  transition: background-color 180ms ease, color 180ms ease;
}
.service-copy { min-width: 0; }
.service-copy > strong, .service-copy > span { display: block; }
.service-copy strong { font-size: 16px; line-height: 1.45; font-weight: 600; }
.service-copy > span:not(.status) { margin-top: 3px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.service-copy .status { margin-top: 4px; }
.row-chevron { color: var(--muted); display: flex; }
.catalog-filters { display:flex; flex-wrap:wrap; gap:4px 16px; border-bottom:1px solid var(--line); }
.catalog-filters button {
  position:relative; min-height:44px; padding:8px 2px; background:none; color:var(--muted); border:0;
  font-size:14px; transition:color 160ms ease;
}
.catalog-filters button::after {
  content:""; position:absolute; bottom:-1px; height:2px; inset-inline:0; background:var(--purple);
  transform:scaleX(0); transform-origin:left; transition:transform 180ms var(--motion-ease);
}
.catalog-filters [aria-pressed=true] { color:var(--ink); font-weight:600; }
.catalog-filters [aria-pressed=true]::after { transform:scaleX(1); }
.order-switch { display:flex; align-items:center; gap:14px; flex-wrap:wrap; padding:0 0 22px; margin-bottom:24px; border-bottom:1px solid var(--line); }
.order-switch > span { font-size:14px; color:var(--muted); }
.order-switch .service-picker { display:block; width:auto; max-width:100%; min-height:44px; margin:0; padding:8px 12px; }
.order-columns { align-items:start; }
.order-columns .field label { font-weight:600; }
.order-columns .order-input { min-height:150px; padding:14px 16px; border-radius:7px; }
.order-columns .order-input:focus-visible { outline:2px solid var(--purple); outline-offset:2px; }
.order-columns #submit-order { min-height:46px; }
.order-columns .file-row .upload-label {
  position:relative; display:inline-flex; align-items:center; gap:9px; min-height:44px;
  flex-wrap:nowrap; margin:0; padding:8px 13px; overflow:hidden;
  border:1px solid var(--line); border-radius:6px; line-height:1.5;
  background:var(--surface); color:var(--ink); cursor:pointer;
}
.order-columns .upload-label .icon { display:block; align-self:center; width:17px; height:17px; flex:0 0 17px; color:var(--purple); }
.order-columns .upload-label > span { white-space:nowrap; }
.order-columns .file-row > .link { min-height:44px; }
.order-columns .upload-label input[type=file] {
  position:absolute; inset:0; margin:0; width:100%; height:100%; opacity:0; cursor:pointer;
}
.order-columns .upload-label:focus-within { outline:2px solid var(--purple); outline-offset:3px; }
.theme-toggle { position:relative; }
.theme-toggle svg {
  position:absolute; inset:0; margin:auto; width:18px; height:18px; fill:none;
  stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round;
  transition:transform 200ms ease, opacity 170ms ease;
}
[data-theme=dark] .theme-moon, [data-theme=light] .theme-sun { opacity:0; transform:rotate(-40deg) scale(.7); }
[data-theme=dark] .theme-sun, [data-theme=light] .theme-moon { opacity:1; transform:none; }
.order-columns .order-aside { width:auto; min-width:0; }
body:not(.admin-mode) :is(.atlas-primary,.quick-links a,.service-row) .icon:last-child,
.row-chevron { transition:transform 180ms var(--motion-ease),color 180ms ease; }
@media (hover:hover) and (pointer:fine) {
  .service-grid .service-row:hover { background:color-mix(in srgb,var(--purple) 4%,transparent); transform:none; }
  .service-row:hover .row-chevron,.quick-links a:hover .icon:last-child,.atlas-primary:hover .icon { transform:translateX(3px); }
  .service-row:hover .service-icon { background:var(--pale); }
  .quick-links a:hover,.service-row:hover strong { color:var(--purple); }
  .atlas-secondary:hover { text-decoration-color:#f1eaf8; }
}
@media (min-width:761px) {
  .order-columns .order-aside { position:sticky; top:16px; align-self:start; }
}
@media (max-width:760px) {
  .atlas-hero { min-height:262px; padding:25px 20px; align-items:flex-start; }
  .atlas-copy { max-width:78%; }
  .atlas-copy h1 { font-size: clamp(38px,7vw,50px); }
  .atlas-copy p { max-width:19em; }
  .atlas-art { width:64%; inset-inline-end:-17%; top:30%; opacity:.8; }
  .atlas-actions { gap:8px 17px; margin-top:20px; }
  .quick-links a { flex-direction:column; justify-content:flex-start; gap:5px; text-align:center; padding:15px 3px; font-size:12px; }
  .quick-links a + a::before { top:25%; height:50%; }
  .quick-links a > .icon:last-child { display:none; }
  .service-grid .service-row { min-height:75px; padding:14px 2px; gap:12px; }
  .home-services-head { margin-top:25px; }
  .order-switch { gap:8px; margin-bottom:17px; padding-bottom:16px; }
  .order-switch .service-picker { flex:1; min-width:0; }
  .order-columns #submit-order { width:100%; }
  .customer-mode .mobile-navigation a[aria-current=page] { background:transparent; }
  .customer-mode .mobile-navigation a[aria-current=page]::before {
    content:""; position:absolute; top:0; width:24px; height:2px; border-radius:2px; background:var(--purple);
  }
}
@media (max-width:440px) {
  .atlas-art { top:23%; width:67%; inset-inline-end:-14%; opacity:.84; }
  .atlas-copy { width:100%; max-width:100%; }
  .atlas-copy h1 { max-width:74%; }
  .atlas-copy p { max-width:20ch; }
  .catalog-filters { column-gap:12px; }
}
@media (prefers-reduced-motion:no-preference) {
  .page-enter .atlas-art { animation:atlas-arrive 750ms cubic-bezier(.16,.67,.25,1) backwards; }
  @keyframes atlas-arrive { from { opacity:0; transform:translate(14px,-47%); } }
  .catalog-results .service-row { animation:orions-row-in 190ms var(--motion-ease) backwards; }
}
@media (prefers-reduced-motion:reduce) {
  .atlas-art,.service-row,.row-chevron,.catalog-filters button::after,.quick-links .icon { animation:none; transition:none; }
}

/* The lit hemisphere stays fixed while the cloud bands turn underneath it. */
.ring-light {
  fill: none;
  stroke-linecap: round;
  stroke-dashoffset: calc(-23px + var(--arc));
}
.ring-halo { --arc: 7px; stroke: #b27bff; stroke-width: 7; opacity: .38; stroke-dasharray: 7 93; }
.ring-tail { --arc: 3.5px; stroke: #cb9cff; stroke-width: 3.7; stroke-dasharray: 3.5 96.5; }
.ring-head { --arc: .65px; stroke: #fff6ff; stroke-width: 4.5; stroke-dasharray: .65 99.35; }
.orbit-toggle {
  position: absolute; z-index: 1; right: 8px; bottom: 8px; width: 44px; height: 44px;
  display: grid; place-items: center; border: 0; background: transparent; color: #d7c8e9;
}
.orbit-toggle svg {
  width: 29px; height: 29px; padding: 5px; border: 1px solid #796a887d; border-radius: 50%;
  background: #221c2d; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.8;
}
.orbit-toggle:hover svg, .orbit-toggle:focus-visible svg { color: #fff; border-color: #c7a6ef; }
.play-mark, [data-orbit-paused=true] .pause-mark { display: none; }
[data-orbit-paused=true] .play-mark { display: block; }
@media (prefers-reduced-motion:no-preference) {
  .ring-light { animation: orbit-lap 6.4s linear infinite; }
  .planet-surface { animation: surface-turn 15s linear infinite; }
  .star-near { animation: starlight 3.7s ease-in-out -1.2s infinite; }
  .star-far { animation: starlight 5.1s ease-in-out -3.5s infinite reverse; }
  [data-orbit-paused=true] :is(.ring-light,.planet-surface,.star-pulse) { animation-play-state: paused; }
  @keyframes orbit-lap {
    from { stroke-dashoffset: calc(-23px + var(--arc)); }
    to { stroke-dashoffset: calc(-123px + var(--arc)); }
  }
  @keyframes surface-turn { to { transform: translateX(-256px); } }
  @keyframes starlight { 0%,100% {opacity:.2} 52% {opacity:1} 75% {opacity:.65} }

  .atlas-primary { position: relative; overflow: hidden; isolation: isolate; }
  .atlas-primary::before {
    content: ""; position: absolute; inset: -20% auto -20% -45%; width: 30%; pointer-events: none;
    background: linear-gradient(90deg,transparent,#fff9,transparent); transform: skewX(-18deg);
  }
  .atlas-primary:is(:hover,:focus-visible)::before { animation: action-shine 600ms ease-out; }
  @keyframes action-shine { to { transform: translateX(540%) skewX(-18deg); } }
  .service-icon, .quick-links a > .icon:first-child {
    transition: transform .23s cubic-bezier(.2,.85,.25,1.3), background-color .18s ease;
  }
  .service-row:focus-visible .service-icon, .quick-links a:focus-visible > .icon:first-child {
    transform: translateY(-2px) rotate(-5deg);
  }
  .service-grid .service-row:active .service-icon, .quick-links a:active > .icon:first-child,
  .customer-mode .mobile-navigation a:active .icon { transform: scale(.88); }
  .customer-mode .mobile-navigation .icon { transition: transform .18s ease; }
}
@media (prefers-reduced-motion:no-preference) and (hover:hover) and (pointer:fine) {
  .service-row:hover .service-icon, .quick-links a:hover > .icon:first-child { transform: translateY(-2px) rotate(-5deg); }
}
@media (prefers-reduced-motion:reduce) {
  .orbit-toggle { display:none; }
}

/* Customer history stays bounded and readable on narrow screens. */
.history-controls { display:flex; flex-wrap:wrap; align-items:end; gap:12px; margin:22px 0 6px; }
.history-controls > label { display:flex; flex:1 1 135px; flex-direction:column; gap:6px; min-width:0; margin:0; font-size:12px; }
.history-controls > .history-search { flex:2 1 210px; }
.history-controls input,.history-controls select { min-width:0; max-width:100%; height:44px; }
.history-controls input[type=date] { min-inline-size:0; }
.history-filter-actions { display:flex; align-items:center; gap:16px; min-height:44px; }
.history-filter-actions .btn { min-height:44px; }
.history-feedback { min-height:20px; color:var(--muted); font-size:12px; margin:8px 0; }
.history-pager { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; padding:18px 0 10px; }
.history-pager > div { display:flex; align-items:center; gap:12px; }
.history-pager span { color:var(--muted); font-size:12px; white-space:nowrap; }
.history-pager .btn { min-height:40px; }
.wallet-balance-header { display:flex; align-items:center; justify-content:space-between; gap:24px; flex-wrap:wrap; padding-bottom:22px; border-bottom:1px solid var(--line); }
.wallet-balance { display:flex; flex-direction:column; gap:4px; }
.wallet-balance small { color:var(--muted); font-size:12px; }
.wallet-balance strong { font-size:clamp(32px,4vw,44px); line-height:1.3; font-weight:600; letter-spacing:-1px; }
.wallet-topup-section { padding:24px 0; }
.wallet-funding { max-width:720px; }
.wallet-funding .info-note { margin:12px 0 20px; }
.wallet-history { border-top:1px solid var(--line); margin-top:20px; padding-top:8px; }
.wallet-event { display:grid; grid-template-columns:34px minmax(0,1fr) auto; gap:14px; align-items:center; padding:16px 0; border-bottom:1px solid var(--line); }
.wallet-event.has-job { grid-template-columns:34px minmax(0,1fr) auto 38px; }
.wallet-event-icon { display:grid; place-items:center; width:32px; height:32px; border-radius:50%; background:var(--pale); color:var(--purple); }
.wallet-event-icon .icon { width:17px; height:17px; }
.wallet-event-info { min-width:0; display:flex; flex-direction:column; gap:3px; }
.wallet-event-info strong { font-size:14px; font-weight:600; }
.wallet-event-info > span,.wallet-event-info small { color:var(--muted); font-size:12px; overflow-wrap:anywhere; }
.wallet-event-amount { text-align:right; display:flex; flex-direction:column; gap:3px; }
.wallet-event-amount strong { font-size:16px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.wallet-event-amount small { font-size:11px; color:var(--muted); }
.wallet-event.inactive .wallet-event-amount strong { text-decoration:line-through; color:var(--muted); }
.bank-amount { display:flex; align-items:center; gap:18px; margin:20px 0; }
.bank-amount > div { display:flex; flex-direction:column; gap:4px; }
.bank-amount small { color:var(--muted); }
.bank-amount strong { font-size:34px; line-height:1.3; font-variant-numeric:tabular-nums; }
.bank-deadline { border-inline-start:3px solid var(--purple); padding:14px 18px; margin:20px 0; background:var(--pale); }
.bank-deadline > div { display:flex; align-items:center; justify-content:space-between; gap:20px; }
.bank-deadline output { font-size:28px; font-weight:600; font-variant-numeric:tabular-nums; letter-spacing:.5px; }
.bank-deadline p { margin:8px 0; font-size:13px; }
.bank-deadline small { font-size:11px; color:var(--muted); }
.bank-deadline.is-expired { border-color:var(--orange); }
.payment-reference { padding:14px 0; margin:12px 0; }
.payment-reference summary { font-size:12px; color:var(--muted); }
.payment-reference code { display:block; overflow-wrap:anywhere; margin-top:12px; font-size:12px; }
.payment-history-status { display:flex; align-items:center; gap:10px; color:var(--muted); font-size:12px; }
.payment-history-status.done { color:var(--good); }
.payment-history-status .icon { flex:none; width:16px; }
@media (max-width:600px) {
  .history-controls { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:12px 10px; }
  .history-controls > .history-search,.history-filter-actions { grid-column:1/-1; }
  .history-controls:not([data-history-form=jobs]) > label:nth-of-type(2) { grid-column:1/-1; }
  .history-controls input,.history-controls select { padding:9px 10px; font-size:14px; }
  .history-pager { gap:10px; }
  .history-pager .btn { padding:7px 11px; font-size:12px; }
  .history-pager > div { gap:9px; }
  .wallet-balance-header { gap:12px; }
  .wallet-balance { width:100%; }
  .wallet-topup-section { padding:20px 0; }
  .wallet-event { grid-template-columns:28px minmax(0,1fr) auto; gap:8px; }
  .wallet-event.has-job { grid-template-columns:28px minmax(0,1fr) auto 30px; }
  .wallet-event-icon { width:26px; height:26px; }
  .wallet-event-info strong { font-size:13px; }
  .wallet-event-info > span,.wallet-event-info small { font-size:11px; }
  .wallet-event-amount strong { font-size:14px; }
  .wallet-event > .icon-button { width:30px; min-width:30px; height:38px; }
  .bank-deadline { padding:12px; }
  .bank-deadline > div { gap:10px; }
  .bank-deadline > div span { font-size:12px; }
  .bank-deadline output { font-size:26px; }
}

#job-history-new[hidden] { display:none; }
#job-history-new .link { margin-inline-start:12px; }

/* Shared result buckets, including empty categories. */
.result-buckets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px 10px;margin-top:10px}
.result-bucket{display:flex;align-items:center;gap:6px;min-width:0;min-height:32px;padding:4px 0;border:0;background:none;color:var(--ink);font:inherit;font-size:11px;text-align:left;cursor:pointer}
.result-bucket i{width:6px;height:6px;border-radius:50%;background:var(--bucket-color);flex-shrink:0}
.result-bucket span{flex:1;overflow-wrap:anywhere}.result-bucket strong{font-variant-numeric:tabular-nums;font-weight:600}
.result-bucket .result-bucket-label{display:flex;align-items:center;gap:6px;min-width:0}
.result-bucket .result-bucket-name{flex:0 1 auto;min-width:0}
.result-bucket strong{flex:0 0 auto}
.result-bucket:disabled{cursor:default;opacity:.68}.result-bucket:not(:disabled):hover span{text-decoration:underline;text-underline-offset:3px}
.result-bucket:focus-visible{outline:2px solid var(--purple);outline-offset:3px;border-radius:4px}
.result-bucket .result-receive{display:inline-flex;align-items:center;justify-content:center;flex:0 0 26px;width:26px;height:26px;border-radius:7px;background:color-mix(in srgb,var(--purple) 10%,transparent);color:var(--purple);transition:background .15s ease,transform .15s ease}
.result-receive .icon{width:15px;height:15px}
.result-bucket:not(:disabled):hover .result-receive{background:color-mix(in srgb,var(--purple) 19%,transparent);transform:translateY(-1px)}
.result-receive-hint{display:flex;align-items:center;gap:6px;margin:10px 0 0;color:var(--muted);font-size:11px;line-height:1.6}
.result-receive-hint>.icon{width:14px;height:14px;flex-shrink:0;color:var(--purple)}
.result-file[class*="bucket-"] .result-file-icon{color:var(--bucket-color)}
.result-export-action{min-height:40px;white-space:nowrap;gap:6px}
.bucket-detail-head{flex-wrap:wrap}
@media(prefers-reduced-motion:reduce){.result-bucket .result-receive{transition:none;transform:none!important}}
.bucket-completed{--bucket-color:#26b58d}.bucket-skipped{--bucket-color:#db9b36}.bucket-cookie_dead{--bucket-color:#b16bdf}.bucket-banned{--bucket-color:#df5679}.bucket-twostep{--bucket-color:#e99147}.bucket-wrong_pass{--bucket-color:#c17e68}.bucket-locked{--bucket-color:#8c91b3}.bucket-failed{--bucket-color:#e45d68}.bucket-processing{--bucket-color:#3aaaca}
.outcome-bar>[class^="bucket-"]{background:var(--bucket-color)}
.bucket-detail-head,.bucket-detail-head>div{display:flex;align-items:center;gap:10px}.bucket-detail-head{justify-content:space-between;margin:20px 0 8px}
.bucket-account{padding:16px 0;border-bottom:1px solid var(--line)}.bucket-account>div{display:flex;gap:12px;align-items:center}.bucket-account p{margin:6px 0;overflow-wrap:anywhere}.bucket-account small{color:var(--muted)}
.bucket-group-list{list-style:none;margin:10px 0 0;padding:0;color:var(--muted);font-size:12px}.bucket-group-list li{display:flex;gap:16px;justify-content:space-between;padding:4px 0}
@media(min-width:1100px){#live-job-detail .result-buckets{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){.result-standard .outcome-bar>span{transition:none}}

@media(pointer:coarse){.result-bucket{min-height:44px}}

.bucket-account-list{max-height:max(120px,calc(100dvh - 330px));overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding-inline-end:4px}.bucket-account-list:focus-visible{outline:2px solid var(--purple);outline-offset:2px}
