/* Settings page — tab-strip layout (Account / Security / Usage / Billing / Promocode).
 * Variables come from lx-theme-remix.css which is loaded first.
 */

.settings-page { padding: 0; }

/* Verify-email banner — scoped copy of the dashboard's verify-banner styles
 * so the settings page can host it without dragging in lx-shell.css. */
.verify-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  margin: 0 0 8px;
  background: rgba(234, 179, 8, 0.08);
  border: 1px solid rgba(234, 179, 8, 0.35);
  border-radius: 12px;
  color: #fde68a;
  font-size: 13px;
}
.verify-banner[hidden] { display: none; }
.verify-banner-btn {
  flex: none;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(234, 179, 8, 0.45);
  background: transparent;
  color: #fde68a;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.verify-banner-btn:hover { background: rgba(234, 179, 8, 0.12); color: #fff3c0; }
.verify-banner-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.set-shell-v2 {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 32px 80px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Top bar */
.set-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ink-3);
  gap: 16px;
}

.set-topbar-right { display: flex; align-items: center; gap: 16px; }

.set-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--ink-3);
  border-radius: 100px;
  background: oklch(1 0 0 / 0.02);
}

.set-user-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(140deg, oklch(0.32 0.04 60), oklch(0.22 0.03 50));
  border: 1px solid var(--brass-3);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 11px;
  color: var(--brass-1);
  text-transform: uppercase;
}

.set-user-name { font-size: 13px; font-weight: 500; color: var(--fg-0); line-height: 1.1; }
.set-user-mail { font-size: 11px; color: var(--fg-3); margin-top: 2px; }

.set-back {
  background: transparent;
  border: 1px solid var(--ink-4);
  color: var(--fg-1);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 9px 16px;
  border-radius: 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.set-back:hover { color: var(--brass-1); border-color: var(--brass-3); background: oklch(1 0 0 / 0.02); }

.set-nav-item.signout.standalone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 100px;
  border: 1px solid oklch(0.55 0.18 25 / 0.35);
  background: transparent;
  color: var(--fg-0);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.set-nav-item.signout.standalone:hover {
  background: oklch(0.65 0.20 25 / 0.08);
  border-color: oklch(0.65 0.20 25 / 0.55);
  color: oklch(0.85 0.16 25);
}
.set-nav-item.signout.standalone .ico { display: inline-flex; }

/* Page title */
.set-page-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 6px;
}

.set-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass-2);
}

.set-h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 36px;
  letter-spacing: -0.025em;
  color: var(--fg-0);
  margin-top: 6px;
}

/* Tabs strip */
.set-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background:
    linear-gradient(180deg, oklch(1 0 0 / 0.02), oklch(1 0 0 / 0.005)),
    oklch(0.13 0.005 60);
  border: 1px solid var(--ink-3);
  border-radius: 100px;
  overflow-x: auto;
  position: sticky;
  top: 8px;
  z-index: 4;
  backdrop-filter: blur(12px);
  scrollbar-width: none;
}
.set-tabs::-webkit-scrollbar { display: none; }

.set-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 100px;
  background: transparent;
  border: none;
  color: var(--fg-1);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.set-tab .ico { color: var(--fg-3); display: inline-flex; }
.set-tab:hover { color: var(--fg-0); background: oklch(1 0 0 / 0.03); }
.set-tab:hover .ico { color: var(--brass-1); }

.set-tab.on {
  background: linear-gradient(140deg, var(--brass-0), var(--brass-1) 50%, var(--brass-2));
  color: oklch(0.16 0.01 60);
  box-shadow: 0 4px 16px -6px oklch(0.85 0.13 75 / 0.5);
}
.set-tab.on .ico { color: oklch(0.16 0.01 60); }

.set-main-v2 {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.set-page-head { padding: 4px 4px 4px; }
.set-h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 26px;
  letter-spacing: -0.02em;
  color: var(--fg-0);
}
.set-h2-sub { font-size: 13.5px; color: var(--fg-2); margin-top: 4px; }

.set-card {
  position: relative;
  padding: 22px 24px;
  background:
    linear-gradient(180deg, oklch(1 0 0 / 0.022), oklch(1 0 0 / 0.005)),
    oklch(0.14 0.005 60);
  border: 1px solid var(--ink-3);
  border-radius: var(--r-lg);
}

.set-card::before {
  content: '';
  position: absolute;
  top: 0; left: 14%; right: 14%; height: 1px;
  background: linear-gradient(to right, transparent, oklch(0.85 0.13 75 / 0.4), transparent);
  border-radius: inherit;
  pointer-events: none;
}

.set-card.no-pad { padding: 0; overflow: hidden; }

.set-card-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--fg-0);
  margin-bottom: 4px;
}
.set-card-title.center { text-align: center; }
.set-card-title.danger { color: oklch(0.78 0.15 25); }

.set-card-sub {
  font-size: 13px;
  color: var(--fg-2);
  margin-bottom: 14px;
  line-height: 1.5;
}
.set-card-sub.center { text-align: center; }

.set-section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 14px;
}

.set-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.set-card-head .set-section-label { margin-bottom: 0; }

/* Profile row */
.set-profile {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 18px;
  align-items: center;
}

.set-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(140deg, oklch(0.32 0.04 60), oklch(0.22 0.03 50));
  border: 1px solid var(--brass-3);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  color: var(--brass-1);
  text-transform: uppercase;
}

.set-profile-meta h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.015em;
  color: var(--fg-0);
}
.set-profile-email { font-size: 13.5px; color: var(--fg-2); margin-top: 2px; }

.set-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid var(--ink-4);
  color: var(--fg-0);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.set-btn:hover { background: oklch(1 0 0 / 0.02); border-color: var(--brass-3); color: var(--brass-1); }
.set-btn svg { color: var(--brass-1); }
.set-btn.sm { padding: 7px 12px; font-size: 12px; }

/* Field rows */
.set-rows { padding: 4px 24px; }

.set-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px dashed var(--ink-3);
}
.set-row:first-child { border-top: none; }

.set-row-l {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
  grid-column: 1;
  grid-row: 1;
}

.set-row-v {
  font-size: 14px;
  color: var(--fg-0);
  grid-column: 1;
  grid-row: 2;
  font-weight: 500;
  margin-top: 4px;
}

.set-row-v.mono { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em; }

.set-row > .set-btn { grid-column: 2; grid-row: 1 / span 2; align-self: center; }

.set-row-stack > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  grid-column: 1;
  grid-row: 1 / span 2;
}
.set-row-stack > div > div:first-child { font-weight: 500; color: var(--fg-0); font-size: 14px; }
.set-row-stack > div > div:nth-child(2) {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
  font-weight: 400;
}

/* Theme picker */
.set-theme-row { display: flex; gap: 12px; flex-wrap: wrap; }

.set-theme {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--ink-3);
  background: transparent;
  border-radius: var(--r-md);
  cursor: pointer;
  font-family: inherit;
  color: var(--fg-1);
  font-size: 12px;
  transition: border-color 0.15s, color 0.15s;
}
.set-theme:hover { border-color: var(--brass-3); color: var(--brass-1); }
.set-theme.on {
  border-color: var(--brass-1);
  color: var(--brass-1);
  box-shadow: 0 0 0 1px var(--brass-1);
}

.set-theme-thumb {
  width: 64px; height: 44px;
  border-radius: 8px;
  border: 1px solid var(--ink-4);
}
.set-theme-thumb.light { background: linear-gradient(180deg, oklch(0.98 0.005 80), oklch(0.88 0.008 80)); }
.set-theme-thumb.dark  { background: linear-gradient(180deg, oklch(0.18 0.006 60), oklch(0.10 0.004 60)); }
.set-theme-thumb.auto  { background: linear-gradient(90deg, oklch(0.98 0.005 80) 50%, oklch(0.12 0.005 60) 50%); }

/* Form */
.set-form { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }

.set-input {
  width: 100%;
  padding: 12px 14px;
  background: oklch(0.10 0.004 60);
  border: 1px solid var(--ink-3);
  border-radius: var(--r-md);
  color: var(--fg-0);
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.set-input:focus { border-color: var(--brass-2); background: oklch(0.11 0.004 60); }
.set-input::placeholder { color: var(--fg-3); }

.set-cta {
  padding: 12px 22px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--ink-4);
  background: transparent;
  color: var(--fg-0);
  align-self: flex-start;
  transition: filter 0.15s, transform 0.1s, background 0.15s, border-color 0.15s, color 0.15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.set-cta.brass {
  background: linear-gradient(140deg, var(--brass-0), var(--brass-1) 50%, var(--brass-2));
  color: oklch(0.16 0.01 60);
  border-color: oklch(0.92 0.07 85 / 0.5);
  box-shadow: 0 6px 18px -8px oklch(0.85 0.13 75 / 0.5);
}
.set-cta.brass:hover { filter: brightness(1.08); }
.set-cta.brass:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: none;
}

.set-cta.danger {
  background: linear-gradient(140deg, oklch(0.65 0.20 25), oklch(0.55 0.22 22));
  color: oklch(0.98 0 0);
  border-color: oklch(0.78 0.15 25 / 0.4);
  box-shadow: 0 6px 18px -8px oklch(0.65 0.20 25 / 0.5);
}
.set-cta.danger:hover { filter: brightness(1.08); }

/* Danger zone card */
.set-card.danger {
  border-color: oklch(0.55 0.18 25 / 0.4);
  background:
    linear-gradient(180deg, oklch(0.65 0.20 25 / 0.06), transparent),
    oklch(0.14 0.005 60);
}
.set-card.danger::before {
  background: linear-gradient(to right, transparent, oklch(0.78 0.18 25 / 0.5), transparent);
}

/* Form messages (password change) */
.set-form-msg {
  font-size: 12.5px;
  margin-top: -2px;
  padding: 0 2px;
  min-height: 16px;
}
.set-form-msg.err { color: oklch(0.78 0.15 25); }
.set-form-msg.ok { color: oklch(0.78 0.13 152); }

/* Promocode */
.promo-card {
  text-align: center;
  padding: 38px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  max-width: 520px;
  margin: 6px auto 0;
}

.promo-input-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  align-items: center;
}

.promo-input {
  text-align: center;
  font-family: var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 13px;
  padding: 14px 18px;
  width: 100%;
  max-width: 360px;
}

.promo-card .set-cta { align-self: center; padding: 11px 36px; }

.promo-hint {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
}

/* Stats grid */
.set-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: oklch(0.11 0.005 60);
  border: 1px solid var(--ink-3);
  border-radius: var(--r-md);
  overflow: hidden;
}

.set-stat {
  padding: 14px 16px;
  border-right: 1px solid var(--ink-3);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.set-stat:last-child { border-right: none; }

.set-stat-l {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.set-stat-v {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.015em;
  color: var(--fg-0);
}
.set-stat-v.brass {
  background: linear-gradient(180deg, oklch(0.94 0.07 78), oklch(0.72 0.13 70));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.set-select {
  padding: 7px 12px;
  background: oklch(0.10 0.004 60);
  border: 1px solid var(--ink-3);
  border-radius: 10px;
  color: var(--fg-0);
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
}

.set-empty {
  font-size: 13px;
  color: var(--fg-3);
  text-align: center;
  padding: 18px 0;
}
.set-empty.pad { padding: 22px; }

/* Transaction list */
.set-tx {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  border-top: 1px dashed var(--ink-3);
}
.set-tx:first-child { border-top: none; }
.set-tx-label { font-size: 13.5px; color: var(--fg-0); font-weight: 500; }
.set-tx-date {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-top: 3px;
}
.set-tx-amt {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.set-tx-amt.pos { color: oklch(0.78 0.16 152); }
.set-tx-amt.neg { color: var(--fg-1); }

/* Chart */
.set-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 100px;
  padding: 8px 0 0;
}
.set-bar {
  flex: 1;
  min-height: 3px;
  background: linear-gradient(to top, oklch(0.65 0.11 75 / 0.5), oklch(0.85 0.13 75 / 0.9));
  border-radius: 3px 3px 0 0;
  transition: filter 0.15s;
}
.set-bar.is-zero { background: linear-gradient(to top, oklch(0.32 0.01 60), oklch(0.42 0.01 60)); opacity: 0.5; }
.set-bar:hover { filter: brightness(1.2); }

.set-chart-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
}

/* Balance card */
.balance-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.set-balance-v {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 4px;
}
.set-balance-v .amount {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 36px;
  letter-spacing: -0.025em;
  background: linear-gradient(180deg, oklch(0.94 0.07 78), oklch(0.72 0.13 70));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}
.set-balance-v .per { font-size: 14px; color: var(--fg-2); }
.set-balance-v .per.slash { color: var(--fg-3); }

/* Subscription card */
.sub-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
}

.sub-bullets {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--fg-1);
}
.sub-bullets span { display: inline-flex; align-items: center; gap: 8px; }
.sub-bullets span svg { color: var(--brass-1); }
.sub-bullets .muted { color: var(--fg-3); }
.sub-bullets .muted svg { color: var(--fg-3); }

/* Table */
.set-table {
  width: 100%;
  border-collapse: collapse;
}
.set-table thead tr {
  background: oklch(0.16 0.005 60);
}
.set-table th {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
  text-align: left;
  padding: 12px 18px;
  font-weight: 500;
}
.set-table th.right, .set-table td.right { text-align: right; }
.set-table td {
  padding: 14px 18px;
  font-size: 13.5px;
  color: var(--fg-0);
  border-top: 1px dashed var(--ink-3);
}
.set-table td.pos { color: oklch(0.78 0.16 152); font-weight: 600; }

/* Toast */
.set-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 20px;
  border-radius: 100px;
  background:
    linear-gradient(180deg, oklch(1 0 0 / 0.04), oklch(1 0 0 / 0.01)),
    oklch(0.16 0.005 60);
  border: 1px solid var(--ink-4);
  color: var(--fg-0);
  font-size: 13px;
  z-index: 100;
  box-shadow: 0 12px 32px -12px oklch(0 0 0 / 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.set-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

/* Mobile */
@media (max-width: 880px) {
  .set-shell-v2 { padding: 18px 16px 60px; }
  .set-topbar { flex-wrap: wrap; }
  .set-h1 { font-size: 30px; }
  .set-stat-grid { grid-template-columns: 1fr 1fr; }
  .set-stat:nth-child(2) { border-right: none; }
  .set-stat { border-bottom: 1px solid var(--ink-3); }
  .set-stat:nth-last-child(-n+2) { border-bottom: none; }
  .set-profile { grid-template-columns: 56px 1fr; }
  .set-profile .set-btn { grid-column: 1 / -1; justify-self: start; }
  .balance-card { flex-direction: column; align-items: flex-start; }
  .sub-card { grid-template-columns: 1fr; }
  .set-user-mail { display: none; }
}

@media (max-width: 520px) {
  .set-shell-v2 { padding: 14px 12px 48px; }
  .set-h1 { font-size: 26px; }
  .set-card { padding: 18px 16px; }
  .set-rows { padding: 4px 16px; }
}
