/* ==========================================================================
   user.xntou.cn — Apple / macOS WorkBuddy User Center & Auth Window
   ========================================================================== */

body.page-user,
body.page-auth {
  background: #f5f5f7;
}

/* macOS WorkBuddy Auth Window (/login, /register) */
.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  width: min(1020px, calc(100% - 32px));
  margin: 40px auto 64px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 24px;
  overflow: hidden;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.1),
    0 4px 16px rgba(0, 0, 0, 0.04);
  min-height: 600px;
}

.auth-value {
  position: relative;
  padding: 34px 36px 36px;
  color: #e5e5ea;
  background:
    radial-gradient(560px 280px at 88% 4%, rgba(15, 118, 110, 0.34), transparent 60%),
    radial-gradient(420px 240px at 14% 96%, rgba(217, 119, 6, 0.16), transparent 62%),
    linear-gradient(165deg, #111315 0%, #171b1f 55%, #122625 100%);
  display: flex;
  flex-direction: column;
}

.auth-value-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.auth-value-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #5eead4;
  background: rgba(94, 234, 212, 0.1);
  border: 1px solid rgba(94, 234, 212, 0.22);
  padding: 3px 10px;
  border-radius: 980px;
}

.auth-value .kicker {
  color: #5eead4;
  font-size: 12px;
  margin-bottom: 8px;
}

.auth-value h1 {
  color: #ffffff;
  font-size: 30px;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.auth-value .lead {
  color: #a1a1a6;
  font-size: 14.5px;
  margin-top: 10px;
  line-height: 1.6;
}

.auth-bonus-card {
  margin-top: 24px;
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-bonus-label {
  color: #a1a1a6;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.auth-bonus {
  margin-top: 4px;
  font-size: 46px;
  line-height: 1;
  font-weight: 760;
  letter-spacing: -0.04em;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.auth-bonus small {
  font-size: 15px;
  margin-left: 6px;
  color: #5eead4;
  font-weight: 620;
}

.auth-modality-list {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.auth-modality-list li {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #e5e5ea;
  font-size: 13.5px;
}

.auth-modality-list li::before {
  content: "✓";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.2);
  color: #5eead4;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.auth-seal {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  color: #86868b;
  font-size: 12px;
  line-height: 1.65;
}

.auth-seal strong {
  color: #f5f5f7;
  font-weight: 620;
}

.auth-panel {
  padding: 40px 38px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #ffffff;
}

.auth-panel h2 {
  font-size: 26px;
  letter-spacing: -0.025em;
  margin-bottom: 6px;
  color: #1d1d1f;
}

.auth-panel .card-desc {
  color: #6e6e73;
  font-size: 14px;
}

.auth-panel .tabs-bar {
  margin: 18px 0 20px;
}

.auth-panel .form-input {
  background: #f5f5f7;
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 12px;
  min-height: 44px;
}

.auth-panel .form-input:focus {
  background: #ffffff;
  border-color: #0f766e;
}

.auth-panel .modal-footnote {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
}

.auth-panel .modal-footnote a {
  color: #0f766e;
  font-weight: 600;
}

/* WorkBuddy macOS Console Shell (/, /works, /credits, /settings) */
.console-shell {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  min-height: calc(100vh - var(--header-h));
  max-width: 1420px;
  margin: 14px auto 28px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.07);
}

.console-shell > aside,
.console-sidebar {
  background: #f5f5f7;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  padding: 18px 12px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.console-side-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.console-side-head p {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: #424245;
  letter-spacing: 0.02em;
}

.console-shell > main,
.console-main,
.console-content {
  padding: 26px 32px 40px;
  min-width: 0;
  background: #fafafc;
}

.console-nav {
  display: grid;
  gap: 3px;
}

.console-nav-link,
.console-sidebar a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  color: #424245;
  font-weight: 600;
  font-size: 13.5px;
  transition: background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.console-nav-link:hover,
.console-sidebar a:hover {
  background: rgba(0, 0, 0, 0.045);
  color: #1d1d1f;
}

.console-nav-link.is-active,
.console-sidebar a.is-active,
.console-sidebar a[aria-current="page"] {
  background: #ffffff;
  color: #0f766e;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* Apple Obsidian Wallet Hero Card */
.wallet-hero-card {
  position: relative;
  overflow: hidden;
  padding: 28px 30px;
  border-radius: 20px;
  color: #f5f5f7;
  background:
    radial-gradient(480px 220px at 96% 0%, rgba(15, 118, 110, 0.42), transparent 60%),
    linear-gradient(140deg, #111315 0%, #1c1f23 62%, #132c2a 100%);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
}

.wallet-hero-card .kicker { color: #5eead4; margin-bottom: 6px; }

.wallet-balance {
  margin-top: 6px;
  font-size: 50px;
  line-height: 1;
  font-weight: 760;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: #ffffff;
}

.wallet-balance small {
  font-size: 15px;
  margin-left: 8px;
  font-weight: 600;
  color: #5eead4;
}

.wallet-bonus {
  margin-top: 10px;
  font-size: 13.5px;
  color: #a1a1a6;
}

.wallet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.wallet-hero-card .btn-gold {
  --btn-bg: #ffffff;
  --btn-fg: #1d1d1f;
  --btn-bd: #ffffff;
  color: #1d1d1f !important;
  box-shadow: none;
}

.wallet-hero-card .btn-gold:hover {
  --btn-bg: #5eead4;
  --btn-bd: #5eead4;
  color: #0a3633 !important;
}

.wallet-hero-card .btn-outline {
  --btn-bg: rgba(255, 255, 255, 0.08);
  --btn-fg: #ffffff;
  --btn-bd: rgba(255, 255, 255, 0.18);
  color: #ffffff !important;
}

.wallet-hero-card .btn-outline:hover {
  --btn-bg: rgba(255, 255, 255, 0.16);
  color: #ffffff !important;
}

/* Works Grid */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.work-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  min-width: 0;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.work-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.07);
}

.work-card .work-preview,
.work-card .card-media {
  aspect-ratio: 16 / 9;
  background: #111315;
  color: #e5e5ea;
}

.work-card img,
.work-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-card audio {
  width: calc(100% - 20px);
  margin: 18px 10px;
}

.work-preview-text {
  padding: 14px;
  font-size: 13px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  background: #f5f5f7;
  color: #424245;
  aspect-ratio: auto;
  min-height: 120px;
}

.work-card-body {
  padding: 14px 16px 16px;
  display: grid;
  gap: 8px;
}

.work-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.work-card-title {
  font-size: 15px;
  font-weight: 680;
  color: #1d1d1f;
}

.work-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Ledger Table & Token Vault */
.ledger-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.ledger-table th,
.ledger-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.ledger-table th {
  background: #fafafa;
  color: #6e6e73;
  font-size: 12px;
  font-weight: 650;
}

.delta-plus { color: #059669; font-weight: 700; font-variant-numeric: tabular-nums; }
.delta-minus { color: #b45309; font-weight: 700; font-variant-numeric: tabular-nums; }

.token-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #1d1d1f;
  color: #f5f5f7;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.token-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 13px;
}

.token-box .btn { flex: none; }
.token-box .btn-ghost { --btn-fg: #e5e5ea; color: #e5e5ea !important; }
.token-box .btn-ghost:hover { --btn-bg: rgba(255, 255, 255, 0.1); --btn-fg: #fff; color: #fff !important; }
.token-box .btn-outline { --btn-bg: rgba(255, 255, 255, 0.1); --btn-fg: #ffffff; --btn-bd: rgba(255, 255, 255, 0.22); color: #ffffff !important; }
.token-box .btn-outline:hover { --btn-bg: rgba(255, 255, 255, 0.2); }
.token-help { margin-top: 8px; color: #6e6e73; font-size: 12px; }

.console-section { margin-top: 26px; }
.console-section h2 { font-size: 19px; letter-spacing: -0.02em; margin-bottom: 12px; color: #1d1d1f; }

@media (max-width: 1024px) {
  .auth-layout, .console-shell { grid-template-columns: 1fr; margin: 12px; width: auto; }
  .works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .console-shell > aside, .console-sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 12px;
  }
  .console-nav { display: flex; gap: 6px; overflow-x: auto; }
  .console-nav-link, .console-sidebar a { white-space: nowrap; }
}

@media (max-width: 768px) {
  .auth-value, .auth-panel, .console-shell > main, .console-main, .console-content { padding: 22px 18px; }
  .auth-bonus, .wallet-balance { font-size: 38px; }
  .works-grid { grid-template-columns: 1fr; }
  .token-box { flex-wrap: wrap; }
  .token-value { flex-basis: 100%; }
}
