/* Panel-Layout: Login, Serverauswahl, Shell, Dashboard, Views. Tokens aus /assets/css/. */

/* Zentrierte Login-Karte */
.center-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(400px, 100%); text-align: center; padding: 44px 32px; }
.login-logo { width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 14px;
  background: var(--surface-3); display: grid; place-items: center; }
.login-logo .icon { width: 28px; height: 28px; }
.login-card .btn { margin-top: 10px; }

/* Seiten */
.page { max-width: 1100px; margin: 0 auto; padding: 40px 24px; }
.page--narrow { max-width: 860px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.sec-title { font-size: 13px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-faint); margin: 28px 0 12px; }

/* Serverauswahl */
.guild-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.guild-card { display: flex; align-items: center; gap: 14px; }
.guild-card[data-open] { cursor: pointer; }
.guild-card > .icon { color: var(--ink-faint); }
.guild-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.guild-meta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.g-icon { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.g-icon--fallback { background: var(--surface-3); color: var(--ink-muted);
  display: grid; place-items: center; font-weight: 700; }
.g-icon--s { width: 30px; height: 30px; font-size: 13px; }

/* Shell */
.layout { display: flex; min-height: 100dvh; }
.sidebar { width: 240px; flex-shrink: 0; display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--line);
  position: sticky; top: 0; height: 100dvh; padding: 14px; }
.server-switch { display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface-2); cursor: pointer; text-align: left;
  transition: border-color var(--t-fast); }
.server-switch:hover { border-color: var(--line-strong); }
.server-switch .g-icon { width: 28px; height: 28px; font-size: 12px; }
.server-switch .icon { width: 14px; height: 14px; color: var(--ink-muted); flex-shrink: 0; }
.sw-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-weight: 650; font-size: 14px; }
.nav { flex: 1; overflow-y: auto; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--ink-faint); margin: 20px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; margin-bottom: 2px;
  border-radius: 10px; color: var(--ink-muted); text-decoration: none; font-size: 14px;
  transition: background var(--t-fast), color var(--t-fast); }
.nav a:hover, .nav a.is-active { color: var(--ink); background: var(--surface-2); }
.nav a .icon { width: 16px; height: 16px; }
.side-user { display: flex; align-items: center; gap: 10px;
  padding: 12px 6px 2px; border-top: 1px solid var(--line); }
.side-user .btn { padding: 6px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; align-items: center; gap: 10px; padding: 10px 14px;
  border-bottom: 1px solid var(--line); background: var(--surface);
  position: sticky; top: 0; z-index: 40; }
.view { padding: 36px 32px; max-width: 1100px; width: 100%; margin: 0 auto; }
.scrim { display: none; }

@media (max-width: 900px) {
  .sidebar { position: fixed; z-index: 55; left: 0; top: 0; translate: -100% 0; transition: translate var(--t); }
  .layout.is-open .sidebar { translate: 0 0; }
  .layout.is-open .scrim { display: block; position: fixed; inset: 0;
    background: rgba(0, 0, 0, .55); z-index: 50; }
  .topbar { display: flex; }
  .view { padding: 24px 16px; }
}

/* Dashboard */
.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin: 20px 0; }
.stat { display: flex; align-items: center; gap: 14px; }
.stat-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--surface-3);
  display: grid; place-items: center; flex-shrink: 0; }
.stat-icon .icon { width: 18px; height: 18px; color: var(--ink-muted); }
.stat-value { display: block; font-size: 20px; letter-spacing: -.01em; }
.stat .muted { font-size: 13px; }

.first-steps { margin-top: 6px; }
.progress { height: 6px; border-radius: 99px; background: var(--surface-3);
  margin: 12px 0 18px; overflow: hidden; }
.progress b { display: block; height: 100%; background: var(--ok);
  border-radius: 99px; transition: width var(--t); }
.steps-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.steps-list li { display: flex; align-items: center; gap: 10px; }
.steps-list li.is-done { color: var(--ink-faint); text-decoration: line-through; }
.step-check { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-strong);
  display: grid; place-items: center; flex-shrink: 0; color: var(--ink-muted); }
.steps-list li.is-done .step-check { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.step-check .icon { width: 12px; height: 12px; }

/* Clans */
.clan-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.clan-card { display: flex; flex-direction: column; gap: 8px; }
.clan-head { display: flex; align-items: center; gap: 10px; }
.clan-head strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clan-head .btn { padding: 5px; flex-shrink: 0; }
.clan-crest { width: 34px; height: 34px; object-fit: contain; flex-shrink: 0; }
.clan-crest--fallback { display: grid; place-items: center; background: var(--surface-3); border-radius: 8px; }
.clan-crest--fallback .icon { width: 16px; height: 16px; color: var(--ink-muted); }
.clan-badges { display: flex; gap: 8px; flex-wrap: wrap; }

/* Bald verfügbar / Hinweise */
.soon { text-align: center; padding: 70px 24px; max-width: 460px; margin: 0 auto; }
.soon-icon { width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 16px;
  background: var(--surface-3); display: grid; place-items: center; }
.soon-icon .icon { width: 28px; height: 28px; color: var(--ink-muted); }

/* Einstellungen */
.settings-grid { display: grid; gap: 14px; align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.info-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 0; }
.info-list dt { color: var(--ink-muted); font-size: 13.5px; }
.info-list dd { margin: 0; overflow-wrap: anywhere; }

/* Tiers */
.tiers { display: grid; gap: 14px; align-items: stretch; margin-top: 8px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.tier-card { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; min-width: 0; }
.tier-card.is-current { border-color: var(--ink); }
.tier-price { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.tier-price .muted { font-size: 14px; font-weight: 500; }
.tier-features { list-style: none; margin: 0; padding: 0; flex: 1;
  display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.tier-features li { display: flex; gap: 8px; align-items: center; }
.tier-features .icon { width: 14px; height: 14px; color: var(--ok); flex-shrink: 0; }
.icon--inline { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; }

/* Tier-Karten: Farbverläufe für Tier 2/3 */
.tier-card.t2 { background: linear-gradient(160deg, rgba(232,180,90,.07), var(--surface) 55%); }
.tier-card.t3 { background: linear-gradient(160deg, rgba(236,77,146,.09), var(--surface) 55%); }
