:root {
  --premium-bg: #07101c;
  --premium-panel: #0c1828;
  --premium-panel-2: #101f33;
  --premium-line: rgba(238, 192, 84, .28);
  --premium-gold: #f1c75b;
  --premium-green: #43e6a5;
  --premium-cyan: #52deef;
  --premium-red: #ff7188;
  --premium-text: #f5f7fb;
  --premium-muted: #93a4bd;
}

html.premium-dashboard-access-check body { visibility: hidden; }
body.premium-restart-open { overflow: hidden; }
.premium-dashboard-page { min-height: calc(100vh - 70px); padding: 28px; color: var(--premium-text); background: radial-gradient(circle at 80% 0, rgba(241, 199, 91, .08), transparent 34%), var(--premium-bg); }
.premium-dashboard-hero { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; align-items: end; max-width: 1240px; margin: 0 auto 18px; padding: 26px; border: 1px solid var(--premium-line); border-radius: 18px; background: linear-gradient(135deg, rgba(241, 199, 91, .09), rgba(12, 24, 40, .97) 52%); }
.premium-dashboard-kicker, .premium-wizard-panel > header span, .premium-dashboard-actions span, .premium-tracker-result header span { color: var(--premium-gold); font: 900 .65rem/1.2 ui-monospace, monospace; letter-spacing: .13em; }
.premium-dashboard-hero h1 { max-width: 760px; margin: 7px 0; font-size: clamp(1.6rem, 3vw, 2.7rem); line-height: 1.06; }
.premium-dashboard-hero p { max-width: 760px; margin: 0; color: var(--premium-muted); line-height: 1.55; }
.premium-dashboard-progress { display: grid; gap: 9px; }
.premium-dashboard-progress > div:first-child { display: flex; justify-content: space-between; align-items: baseline; color: var(--premium-muted); font: 800 .66rem/1.2 ui-monospace, monospace; letter-spacing: .1em; }
.premium-dashboard-progress strong { color: var(--premium-gold); font-size: 1.5rem; }
.premium-dashboard-progress-track { height: 9px; overflow: hidden; border: 1px solid rgba(241, 199, 91, .3); border-radius: 999px; background: #050b13; }
.premium-dashboard-progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--premium-gold), var(--premium-green)); box-shadow: 0 0 14px rgba(241, 199, 91, .45); transition: width .25s ease; }
.premium-dashboard-progress small { color: var(--premium-muted); }
.premium-dashboard-status { min-height: 20px; max-width: 1240px; margin: 0 auto 12px; color: var(--premium-muted); font-size: .78rem; }
.premium-dashboard-status[data-tone="error"] { color: var(--premium-red); }
.premium-dashboard-status[data-tone="ready"] { color: var(--premium-green); }

.premium-wizard { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; max-width: 1240px; margin: 0 auto; }
.premium-wizard[hidden] { display: none !important; }
.premium-wizard-steps { display: grid; align-content: start; gap: 8px; }
.premium-wizard-steps button { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; width: 100%; padding: 13px; border: 1px solid #26374d; border-radius: 12px; color: var(--premium-text); text-align: left; background: #091422; }
.premium-wizard-steps button:disabled { opacity: .55; }
.premium-wizard-steps button.is-active { border-color: var(--premium-gold); background: rgba(241, 199, 91, .08); box-shadow: 0 0 0 2px rgba(241, 199, 91, .08); }
.premium-wizard-steps button.is-complete { border-color: rgba(67, 230, 165, .45); }
.premium-wizard-steps i { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: #08111d; font-style: normal; font-weight: 900; background: var(--premium-gold); }
.premium-wizard-steps span { min-width: 0; }
.premium-wizard-steps strong, .premium-wizard-steps small { display: block; }
.premium-wizard-steps small { margin-top: 3px; color: var(--premium-muted); font-size: .66rem; }
.premium-wizard-steps b { color: var(--premium-muted); font: 800 .58rem/1.2 ui-monospace, monospace; text-transform: uppercase; }
.premium-wizard-steps .is-complete b { color: var(--premium-green); }

.premium-wizard-panel { min-width: 0; padding: 24px; border: 1px solid #26374d; border-radius: 16px; background: linear-gradient(180deg, var(--premium-panel-2), var(--premium-panel)); box-shadow: 0 16px 40px rgba(0, 0, 0, .2); }
.premium-wizard-panel > header h2 { margin: 6px 0; font-size: 1.45rem; }
.premium-wizard-panel > header p { margin: 0 0 18px; color: var(--premium-muted); line-height: 1.5; }
.premium-connection-strip { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; margin-bottom: 17px; padding: 13px; border: 1px solid rgba(82, 222, 239, .25); border-radius: 11px; background: rgba(82, 222, 239, .05); }
.premium-connection-strip strong, .premium-connection-strip span { display: block; }
.premium-connection-strip span { margin-top: 3px; color: var(--premium-muted); font-size: .72rem; }
.premium-connection-strip a { color: var(--premium-cyan); font-size: .72rem; }
.premium-connection-strip button, .premium-clan-picker button, .premium-wizard-panel footer button, .premium-dashboard-actions button { min-height: 38px; padding: 0 14px; border: 1px solid var(--premium-gold); border-radius: 9px; color: #09111b; font-weight: 900; background: var(--premium-gold); cursor: pointer; }
.premium-connection-strip button:disabled, .premium-clan-picker button:disabled, .premium-wizard-panel footer button:disabled, .premium-dashboard-actions button:disabled { opacity: .5; cursor: wait; }
.premium-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.premium-form-grid label, .premium-clan-picker label { display: grid; gap: 6px; color: var(--premium-muted); font-size: .7rem; font-weight: 800; }
.premium-form-grid input, .premium-form-grid select, .premium-clan-picker select { width: 100%; min-height: 43px; padding: 0 11px; border: 1px solid #314762; border-radius: 9px; color: var(--premium-text); background: #07111e; }
.premium-form-grid input:focus, .premium-form-grid select:focus, .premium-clan-picker select:focus { border-color: var(--premium-gold); outline: 2px solid rgba(241, 199, 91, .11); }
.premium-form-grid small { font-size: .62rem; font-weight: 500; }
.premium-mode-choice, .premium-clan-path { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 18px 0 0; padding: 0; border: 0; }
.premium-mode-choice legend { grid-column: 1 / -1; margin-bottom: 7px; font-size: .75rem; font-weight: 900; }
.premium-mode-choice label, .premium-clan-path label { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border: 1px solid #314762; border-radius: 11px; background: #081421; cursor: pointer; }
.premium-mode-choice label:has(input:checked), .premium-clan-path label:has(input:checked) { border-color: var(--premium-gold); background: rgba(241, 199, 91, .07); }
.premium-mode-choice input, .premium-clan-path input { margin-top: 3px; accent-color: var(--premium-gold); }
.premium-mode-choice strong, .premium-mode-choice small, .premium-clan-path strong, .premium-clan-path small { display: block; }
.premium-mode-choice small, .premium-clan-path small { margin-top: 4px; color: var(--premium-muted); font-size: .67rem; line-height: 1.4; }
.premium-wizard-panel > footer { display: flex; gap: 10px; align-items: center; justify-content: flex-end; margin-top: 20px; padding-top: 16px; border-top: 1px solid #24364d; }
.premium-wizard-panel > footer span { margin-right: auto; color: var(--premium-muted); font-size: .68rem; }
.premium-wizard-panel footer button.secondary, .premium-dashboard-actions button.secondary { border-color: #38506c; color: var(--premium-text); background: #0c1929; }

.premium-clan-path { margin: 0 0 15px; }
.premium-clan-picker { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.premium-clan-preview { display: grid; grid-template-columns: 1.2fr repeat(4, minmax(90px, 1fr)); gap: 10px; margin-top: 14px; padding: 14px; border: 1px solid rgba(67, 230, 165, .25); border-radius: 12px; background: rgba(67, 230, 165, .05); }
.premium-clan-preview div { min-width: 0; }
.premium-clan-preview span, .premium-clan-preview strong, .premium-clan-preview small { display: block; }
.premium-clan-preview span { color: var(--premium-muted); font: 800 .58rem/1.2 ui-monospace, monospace; text-transform: uppercase; }
.premium-clan-preview strong { margin-top: 5px; overflow: hidden; color: var(--premium-green); text-overflow: ellipsis; white-space: nowrap; }
.premium-clan-preview small { margin-top: 4px; color: var(--premium-muted); }
.premium-boost-summary { margin-bottom: 12px; padding: 13px; border: 1px solid rgba(82, 222, 239, .25); border-radius: 10px; color: var(--premium-muted); background: rgba(82, 222, 239, .05); }
.premium-boost-options { display: grid; gap: 9px; }
.premium-boost-option { overflow: hidden; border: 1px solid #30445d; border-radius: 11px; background: #081421; }
.premium-boost-option:has(> .premium-boost-option-head input[type="radio"]:checked) { border-color: var(--premium-gold); background: rgba(241, 199, 91, .07); }
.premium-boost-option-head { display: grid; grid-template-columns: auto 80px minmax(0, 1fr) auto; gap: 13px; align-items: center; padding: 13px; cursor: pointer; }
.premium-boost-option input { accent-color: var(--premium-gold); }
.premium-boost-option-head > strong { color: var(--premium-gold); font-size: 1.25rem; }
.premium-boost-option-head span strong, .premium-boost-option-head span small { display: block; }
.premium-boost-option-head span small { margin-top: 4px; color: var(--premium-muted); }
.premium-boost-option-head b { color: var(--premium-green); }
.premium-boost-checklist { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 13px 13px 105px; }
.premium-boost-checklist > span { color: var(--premium-muted); font-size: .67rem; }
.premium-boost-ability-checkbox { display: inline-flex; gap: 7px; align-items: center; min-height: 34px; padding: 6px 9px; border: 1px solid #38506c; border-radius: 8px; color: var(--premium-muted); font-size: .68rem; font-weight: 800; background: #091624; cursor: pointer; }
.premium-boost-ability-checkbox:has(input:checked) { border-color: rgba(67, 230, 165, .55); color: var(--premium-text); background: rgba(67, 230, 165, .08); }
.premium-boost-ability-checkbox small { color: var(--premium-muted); font-weight: 500; }
.premium-install-note { margin-top: 14px; padding: 12px 14px; border-left: 3px solid var(--premium-cyan); color: var(--premium-muted); background: rgba(82, 222, 239, .05); }
.premium-install-note strong { color: var(--premium-text); }
.premium-install-note p { margin: 4px 0 0; font-size: .71rem; line-height: 1.45; }

.premium-dashboard { max-width: 1240px; margin: 0 auto; }
.premium-dashboard-actions { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.premium-dashboard-actions > div { margin-right: auto; }
.premium-dashboard-actions strong { display: block; margin-top: 3px; }
.premium-dashboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.premium-dashboard-card { min-height: 130px; padding: 16px; border: 1px solid #293e57; border-radius: 13px; background: linear-gradient(145deg, #102035, #0a1625); }
.premium-dashboard-card span, .premium-dashboard-card strong, .premium-dashboard-card small { display: block; }
.premium-dashboard-card span { color: var(--premium-gold); font: 900 .6rem/1.2 ui-monospace, monospace; letter-spacing: .1em; }
.premium-dashboard-card strong { margin-top: 12px; font-size: 1.15rem; }
.premium-dashboard-card small { margin-top: 6px; color: var(--premium-muted); line-height: 1.45; }
.premium-tracker-result { margin-top: 14px; overflow: hidden; border: 1px solid var(--premium-line); border-radius: 15px; background: var(--premium-panel); }
.premium-tracker-result > header { display: flex; gap: 16px; justify-content: space-between; align-items: center; padding: 18px; border-bottom: 1px solid #283c54; }
.premium-tracker-result h2 { margin: 5px 0 0; font-size: 1.25rem; }
.premium-tracker-result a { color: var(--premium-gold); font-weight: 800; }
.premium-result-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: #253850; }
.premium-result-metrics div { padding: 15px; background: #0c192a; }
.premium-result-metrics span, .premium-result-metrics strong { display: block; }
.premium-result-metrics span { color: var(--premium-muted); font-size: .62rem; text-transform: uppercase; }
.premium-result-metrics strong { margin-top: 7px; color: var(--premium-cyan); font-size: 1rem; }
.premium-tracker-result > p { margin: 0; padding: 14px 18px; color: var(--premium-muted); line-height: 1.5; }
.premium-dashboard-disclaimer { margin-top: 14px; padding: 13px 15px; border: 1px solid #2a3e56; border-radius: 10px; color: var(--premium-muted); font-size: .72rem; line-height: 1.5; }

.premium-wizard-history { max-width: 1240px; margin: 18px auto 0; overflow: hidden; border: 1px solid #293e57; border-radius: 15px; background: var(--premium-panel); }
.premium-wizard-history[hidden], .premium-restart-choice[hidden] { display: none !important; }
.premium-wizard-history > header { display: flex; gap: 20px; justify-content: space-between; align-items: end; padding: 18px; border-bottom: 1px solid #293e57; }
.premium-wizard-history > header span { color: var(--premium-gold); font: 900 .62rem/1.2 ui-monospace, monospace; letter-spacing: .12em; }
.premium-wizard-history h2 { margin: 5px 0 0; font-size: 1.25rem; }
.premium-wizard-history > header p { max-width: 540px; margin: 0; color: var(--premium-muted); font-size: .7rem; line-height: 1.45; text-align: right; }
.premium-history-table-wrap { overflow-x: auto; }
.premium-wizard-history table { width: 100%; min-width: 860px; border-collapse: collapse; }
.premium-wizard-history th, .premium-wizard-history td { padding: 13px 15px; border-bottom: 1px solid #21344a; text-align: left; vertical-align: top; }
.premium-wizard-history th { color: var(--premium-muted); font: 900 .59rem/1.2 ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; background: #091523; }
.premium-wizard-history td { color: var(--premium-text); font-size: .72rem; }
.premium-wizard-history td strong, .premium-wizard-history td small { display: block; }
.premium-wizard-history td small { margin-top: 4px; color: var(--premium-muted); line-height: 1.35; }
.premium-wizard-history tbody tr:last-child td { border-bottom: 0; }

.premium-restart-choice { position: fixed; z-index: 10000; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(2, 7, 13, .82); backdrop-filter: blur(5px); }
.premium-restart-choice > article { width: min(620px, 100%); overflow: hidden; border: 1px solid var(--premium-line); border-radius: 16px; background: linear-gradient(180deg, #122239, #0a1625); box-shadow: 0 28px 90px rgba(0, 0, 0, .55); }
.premium-restart-choice header { padding: 22px; border-bottom: 1px solid #2a3d56; }
.premium-restart-choice header span { color: var(--premium-gold); font: 900 .62rem/1.2 ui-monospace, monospace; letter-spacing: .12em; }
.premium-restart-choice h2 { margin: 7px 0; font-size: 1.35rem; }
.premium-restart-choice header p { margin: 0; color: var(--premium-muted); font-size: .74rem; line-height: 1.5; }
.premium-restart-choice > article > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 18px 22px; }
.premium-restart-choice > article > div button { padding: 15px; border: 1px solid rgba(67, 230, 165, .45); border-radius: 11px; color: var(--premium-text); text-align: left; background: rgba(67, 230, 165, .08); cursor: pointer; }
.premium-restart-choice > article > div button.danger { border-color: rgba(255, 113, 136, .45); background: rgba(255, 113, 136, .07); }
.premium-restart-choice button strong, .premium-restart-choice button small { display: block; }
.premium-restart-choice button small { margin-top: 6px; color: var(--premium-muted); line-height: 1.4; }
.premium-restart-choice footer { display: flex; justify-content: flex-end; padding: 0 22px 20px; }
.premium-restart-choice footer button { min-height: 38px; padding: 0 15px; border: 1px solid #38506c; border-radius: 9px; color: var(--premium-text); background: #0c1929; cursor: pointer; }

@media (max-width: 980px) {
  .premium-dashboard-hero { grid-template-columns: 1fr; }
  .premium-wizard { grid-template-columns: 1fr; }
  .premium-wizard-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .premium-wizard-steps button { grid-template-columns: auto 1fr; }
  .premium-wizard-steps button > b { grid-column: 2; }
  .premium-dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .premium-result-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 660px) {
  .premium-dashboard-page { padding: 15px; }
  .premium-dashboard-hero, .premium-wizard-panel { padding: 18px; }
  .premium-wizard-steps { grid-template-columns: 1fr; }
  .premium-wizard-steps button { grid-template-columns: 32px 1fr auto; }
  .premium-wizard-steps button > b { grid-column: auto; }
  .premium-form-grid, .premium-mode-choice, .premium-clan-path { grid-template-columns: 1fr; }
  .premium-connection-strip, .premium-clan-picker { grid-template-columns: 1fr; }
  .premium-clan-preview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .premium-clan-preview div:first-child { grid-column: 1 / -1; }
  .premium-boost-option-head { grid-template-columns: auto 60px 1fr; }
  .premium-boost-option-head > b { grid-column: 3; }
  .premium-boost-checklist { padding: 0 13px 13px; }
  .premium-wizard-panel > footer, .premium-dashboard-actions { align-items: stretch; flex-direction: column; }
  .premium-wizard-panel > footer span, .premium-dashboard-actions > div { width: 100%; margin: 0; }
  .premium-dashboard-grid, .premium-result-metrics { grid-template-columns: 1fr; }
  .premium-tracker-result > header { align-items: flex-start; flex-direction: column; }
  .premium-wizard-history > header { align-items: flex-start; flex-direction: column; }
  .premium-wizard-history > header p { text-align: left; }
  .premium-restart-choice > article > div { grid-template-columns: 1fr; }
}
