/* The customer dashboard in the homepage's look. Loaded after home.css (colours, buttons, nav, footer). */
body.dash { min-height: 100vh; }
.dash main { max-width: 1150px; margin: 0 auto; padding: 100px 20px 40px; }
.dash section { padding: 0; max-width: none; margin: 0 0 34px; }
.dash h2 { font-size: 24px; font-weight: 700; margin: 0 0 14px; text-align: left; }
.dash h3 { font-size: 20px; }

/* Header: who is logged in + language */
.who { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 500; }
.who img { width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(255, 210, 87, .5); }
.lang {
  background: rgba(255, 255, 255, .05); color: var(--text); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 10px; font: 500 14px "Outfit", sans-serif;
}

/* Welcome */
.welcome {
  position: relative; overflow: hidden; padding: 34px 32px !important; border-radius: var(--radius);
  background: radial-gradient(ellipse at 90% 0%, rgba(255, 210, 87, .14), transparent 55%),
              radial-gradient(ellipse at 0% 100%, rgba(255, 107, 213, .08), transparent 50%), var(--panel);
  border: 1px solid rgba(255, 210, 87, .25);
}
.welcome h1 { font-size: clamp(30px, 5vw, 46px); font-weight: 800; letter-spacing: -.5px; }
.welcome p { color: #c9cedb; margin: 8px 0 18px; font-size: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; font-size: 15px; font-weight: 500;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line); color: var(--muted);
}
.chip.ok { color: #8ff0c4; border-color: rgba(62, 207, 142, .45); background: rgba(62, 207, 142, .07); }
.chip.gold { color: var(--gold); border-color: rgba(255, 210, 87, .45); background: rgba(255, 210, 87, .08); }
.chip.bad { color: #ffb3bb; border-color: rgba(255, 70, 90, .45); background: rgba(255, 70, 90, .08); }
.welcome .cta { margin: 0; }

/* The one payment banner */
.alert-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  padding: 18px 22px !important; border-radius: var(--radius);
  background: rgba(255, 70, 90, .08); border: 1px solid rgba(255, 70, 90, .45);
}
.alert-bar b { color: #ffd9de; }
.alert-bar p { margin: 0; color: #f0c9ce; }
.alert-bar .btn { background: #ff5d6c; color: #1a0004; }
.alert-bar.info { background: rgba(255, 210, 87, .07); border-color: rgba(255, 210, 87, .4); }
.alert-bar.info p { color: #f3e3b0; }
.alert-bar.info b { color: var(--gold); }
.alert-bar.help { background: var(--panel); border-color: var(--line); }
.alert-bar.help p { color: #c9cedb; }
.alert-bar.help b { color: var(--text); }
.alert-bar.help .btn { background: rgba(255, 255, 255, .04); color: var(--text); border-color: rgba(255, 255, 255, .18); }
.welcome .small-note { font-size: 14px; color: var(--muted); margin: 14px 0 0; }
.alert-bar.ok { background: rgba(62, 207, 142, .08); border-color: rgba(62, 207, 142, .45); }
.alert-bar.ok p { color: #c4f5df; }

/* Product tiles */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tile {
  display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line); transition: border-color .2s, transform .2s;
}
.tile:hover { border-color: rgba(255, 210, 87, .35); }
.tile .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tile .icon { font-size: 28px; line-height: 1; filter: drop-shadow(0 0 10px rgba(255, 210, 87, .45)); }
.tile .tprice { font-size: 30px; font-weight: 800; }
.tile .tprice small { font-size: 15px; font-weight: 500; color: var(--muted); }
.tile .meta { color: var(--muted); font-size: 15px; margin: 0; }
.tile .meta b { color: var(--text); font-weight: 600; }
.tile ul { list-style: none; padding: 0; margin: 0; color: #c9cedb; font-size: 15px; }
.tile li { padding: 3px 0 3px 22px; position: relative; }
.tile li::before { content: "✦"; position: absolute; left: 2px; color: var(--gold); }
.tile .grow { flex: 1; }
.tile.own { border-color: rgba(255, 210, 87, .3); background: linear-gradient(180deg, rgba(255, 210, 87, .06), var(--panel) 40%); }
.tile.add { border-style: dashed; color: var(--text); }
.tile.add:hover { transform: translateY(-3px); }
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap;
  background: rgba(255, 255, 255, .06); color: var(--muted);
}
.badge.ok { background: rgba(62, 207, 142, .12); color: #8ff0c4; }
.badge.warn { background: rgba(255, 210, 87, .12); color: var(--gold); }
.badge.bad { background: rgba(255, 70, 90, .14); color: #ff9aa5; }
.mini-map { height: 120px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.billing { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 18px; color: var(--muted); font-size: 15px; }

/* Two columns: trainer + how to */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.panel { padding: 24px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.panel h2 { font-size: 20px; }
.trainer-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.trainer-row .team { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; }
.team.valor { background: linear-gradient(135deg, #ff4b4b, #b31212); }
.team.mystic { background: linear-gradient(135deg, #3d8bff, #1246b3); }
.team.instinct { background: linear-gradient(135deg, #ffd23d, #c79a00); color: #1a1200; }
.trainer-row small { display: block; color: var(--muted); }
.panel .small { font-size: 14px; color: var(--muted); }
.panel code { padding: 2px 8px; border-radius: 6px; background: rgba(255, 210, 87, .1); color: var(--gold); font-size: 15px; }
.panel ol { padding-left: 20px; color: #c9cedb; }
.panel ol li { margin: 6px 0; }

/* Areas map */
.areas-map { height: 360px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.area-label { background: rgba(16, 18, 28, .9); border: 1px solid rgba(255, 210, 87, .5); color: var(--gold); border-radius: 999px; padding: 3px 10px; font: 600 13px "Outfit", sans-serif; white-space: nowrap; }

.preview-note { display: inline-block; margin-bottom: 14px; }

/* Single-column pages (the move-over link) */
.dash main.narrow { max-width: 640px; }
.dash main.narrow .tile { margin: 18px 0; }
.dash main.narrow .welcome p { margin: 10px 0; }
.dash .buy-map { height: 260px; }
.server-choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; cursor: pointer;
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.server-choice:has(input:checked) { border-color: var(--gold); background: rgba(255, 210, 87, .06); }
.server-choice:has(input:disabled) { opacity: .55; cursor: default; }
.server-choice input { margin-top: 4px; accent-color: #ffd257; }
.server-choice small { display: block; color: var(--muted); font-size: 14px; }
.dash main.narrow h3 { margin-top: 8px; }
.dash main.narrow .tile ul { margin: 6px 0; }

/* Text pages (terms, guide, the add-on's landing page) */
/* Wide screens: a wider column + a sticky "On this page" list, and a soft glow so the sides aren't a flat void */
.dash main.doc-page { max-width: 1180px; margin: 0 auto; padding: 100px 20px 40px; display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 34px; align-items: start; }
.dash main.doc-page .doc-body { max-width: 840px; }
.dash .toc { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line); font-size: 14px; }
.dash .toc b { color: var(--gold); font-size: 13px; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 6px; }
.dash .toc a { color: var(--muted); padding: 5px 8px; border-radius: 8px; line-height: 1.35; }
.dash .toc a:hover { color: var(--text); background: rgba(255, 210, 87, .08); }
body.dash { background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 210, 87, .10), transparent 60%),
  radial-gradient(ellipse 50% 40% at 100% 30%, rgba(255, 107, 213, .05), transparent 60%), var(--bg); background-attachment: fixed; }
.dash .doc { margin: 0 0 18px; scroll-margin-top: 90px; }
/* .dash section's padding: 0 (for layout sections) mustn't strip a panel's own padding */
.dash section.panel { padding: 22px 26px; }
.dash .tiles.three .tile { display: block; line-height: 1.6; color: #c9cedb; }
.dash .tiles.three .tile b { color: var(--gold); }
.dash .doc h2 { font-size: 20px; }
.dash .doc ul { padding-left: 20px; margin: 6px 0; color: #c9cedb; }
.dash .doc li { margin: 8px 0; line-height: 1.55; }
.dash .doc p { color: #c9cedb; line-height: 1.6; }
.dash .doc b { color: var(--text); }
.dash .doc code { white-space: normal; }
.dash .tiles.three { grid-template-columns: repeat(3, 1fr); margin-bottom: 18px; }
.dash main.narrow .tiles.three .tile { margin: 0; }

/* Hidden sections stay hidden even when their class sets display */
.dash [hidden] { display: none !important; }

/* Plain buttons made by the page (same look as the homepage's .btn) */
.dash button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 20px; border-radius: 999px;
  font: 600 15px "Outfit", sans-serif; cursor: pointer; color: var(--text);
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .18); transition: border-color .2s, transform .15s;
}
.dash button:hover:not(:disabled) { border-color: var(--gold); }
.dash button:disabled { opacity: .45; cursor: not-allowed; }
.dash button.primary { color: #1a1200; border-color: transparent; background: linear-gradient(135deg, var(--gold), var(--gold-2)); box-shadow: 0 6px 22px rgba(255, 190, 40, .3); }
.dash button.danger { color: #ffb3bb; border-color: rgba(255, 70, 90, .45); }
.dash button.small, .dash .nav button { padding: 6px 14px; font-size: 14px; white-space: nowrap; }
.dash button.link { padding: 0; border: 0; background: none; color: var(--gold); font-weight: 500; font-size: inherit; }
.dash .alert-bar button { background: #ff5d6c; color: #1a0004; border-color: transparent; }
.dash input {
  padding: 10px 16px; border-radius: 999px; border: 1px solid rgba(255, 210, 87, .35); background: rgba(255, 255, 255, .04);
  color: var(--text); font: 500 16px "Outfit", sans-serif; outline: none; min-width: 0;
}
.dash input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 210, 87, .15); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.small { font-size: 14px; color: var(--muted); }
.badge.gold { background: rgba(255, 210, 87, .15); color: var(--gold); }
.dash code { padding: 2px 8px; border-radius: 6px; background: rgba(255, 210, 87, .1); color: var(--gold); font-size: 14px; }
.notice { padding: 12px 16px; border-radius: 14px; margin: 0 0 14px; border: 1px solid var(--line); background: var(--panel); }
.notice.ok { border-color: rgba(62, 207, 142, .45); color: #c4f5df; }
.notice.warn { border-color: rgba(255, 210, 87, .45); color: #f3e3b0; }
.notice.bad { border-color: rgba(255, 70, 90, .45); color: #ffd9de; }
#notices { position: relative; }
.trainer-row { flex-wrap: wrap; margin-bottom: 4px; }
.trainer-row .grow { flex: 1; min-width: 160px; }
.trainer-row p { margin: 4px 0; }
.team { flex: none; }
.tile .server { padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.tile .server .meta { margin-top: 4px; }
/* Language flags from common.js */
.langs { display: inline-flex; gap: 4px; }
.dash .langs .lang { padding: 4px 6px; font-size: 16px; border-color: transparent; background: none; opacity: .55; }
.dash .langs .lang.active { opacity: 1; border-color: rgba(255, 210, 87, .45); }

@media (max-width: 860px) {
  .dash main.doc-page { display: block; padding: 84px 16px 30px; }
  .dash .toc { display: none; }
  .dash main { padding: 84px 16px 30px; }
  .welcome { padding: 24px 20px !important; }
  .tiles, .two, .dash .tiles.three { grid-template-columns: 1fr; }
  .nav { padding: 12px 16px; gap: 10px; }
  .nav nav { gap: 8px; }
  .brand { font-size: 17px; }
  .nav .who { font-size: 0; gap: 0; } /* avatar only: the name is a bare text node from common.js */
  .nav nav > a:not(.btn) { font-size: 14px; }
  .lang { padding: 5px 6px; font-size: 13px; }
  .nav .btn.small { padding: 6px 12px; font-size: 13px; }
  .areas-map { height: 280px; }
}
/* Phones: the header (logo, avatar, log out, 3 languages) must fit 390px without cutting off the last flag. */
@media (max-width: 480px) {
  .dash .langs { gap: 0; }
  .dash .langs .lang { padding: 4px 3px; font-size: 13px; }
}
