/* ═══════════════════════════════════════════════════════════════════════════
   KrümelBot — Konto UI v2
   Scoped to .account-layout.acb-ui — does not affect home/guild views
   ═══════════════════════════════════════════════════════════════════════════ */

.account-layout.acb-ui {
  --acb-rail-w: 272px;
  --acb-bg: #060a12;
  --acb-surface: rgba(10, 16, 28, 0.92);
  --acb-surface-2: rgba(14, 22, 38, 0.95);
  --acb-border: rgba(255, 255, 255, 0.08);
  --acb-border-strong: rgba(255, 255, 255, 0.14);
  --acb-accent: #3b82f6;
  --acb-accent-soft: rgba(59, 130, 246, 0.18);
  --acb-text: rgba(255, 255, 255, 0.92);
  --acb-muted: rgba(255, 255, 255, 0.48);
  --acb-shadow: 0 4px 24px rgba(0, 0, 0, 0.28);
  background: var(--acb-bg);
  padding: 0;
  min-height: calc(100vh - 52px);
  overflow: hidden;
}

.account-layout.acb-ui .acb-shell {
  display: grid;
  grid-template-columns: var(--acb-rail-w) minmax(0, 1fr);
  gap: 0;
  max-width: none;
  width: 100%;
  margin: 0;
  min-height: calc(100vh - 52px);
  align-items: stretch;
}

/* ── Sidebar ── */
.account-layout.acb-ui .account-rail.acb {
  width: var(--acb-rail-w);
  min-width: var(--acb-rail-w);
  padding: 0;
  border-radius: 0;
  border: none;
  border-right: 1px solid var(--acb-border);
  background: #08080f;
  position: sticky;
  top: 0;
  height: calc(100vh - 52px);
  align-self: start;
}

.account-layout.acb-ui .acb-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.account-layout.acb-ui .acb-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--acb-border);
}

.account-layout.acb-ui .acb-back {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--acb-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--acb-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.account-layout.acb-ui .acb-back:hover {
  color: #fff;
  border-color: var(--acb-border-strong);
  background: rgba(255, 255, 255, 0.07);
}

.account-layout.acb-ui .acb-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
  padding: 4px 6px 4px 2px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background 0.15s;
}

.account-layout.acb-ui .acb-brand:hover {
  background: rgba(255, 255, 255, 0.04);
}

.account-layout.acb-ui .acb-logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(145deg, #3b82f6, #1e40af);
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.4);
  flex-shrink: 0;
}

.account-layout.acb-ui .acb-logo-text {
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--acb-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-layout.acb-ui .acb-nav-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 8px 4px;
}

.account-layout.acb-ui .acb-footer {
  flex-shrink: 0;
  padding: 8px 8px 12px;
  border-top: 1px solid var(--acb-border);
}

/* Nav */
.account-layout.acb-ui .account-nav {
  gap: 1px;
}

.account-layout.acb-ui .account-nav-group-label {
  margin: 12px 0 4px 10px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: rgba(255, 255, 255, 0.34);
}

.account-layout.acb-ui .account-nav-btn {
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--acb-muted);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.account-layout.acb-ui .account-nav-btn svg {
  flex-shrink: 0;
  opacity: 0.72;
}

.account-layout.acb-ui .account-nav-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.account-layout.acb-ui .account-nav-btn:hover svg {
  opacity: 1;
}

.account-layout.acb-ui .account-nav-btn.is-active {
  background: var(--acb-accent-soft);
  border-color: rgba(59, 130, 246, 0.28);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.account-layout.acb-ui .account-nav-btn.is-active svg {
  opacity: 1;
  color: #93c5fd;
}

.account-layout.acb-ui .account-nav-badge {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(59, 130, 246, 0.32);
  color: #93c5fd;
}

.account-layout.acb-ui .acb-nav-logout {
  margin-top: 0;
  color: rgba(248, 113, 113, 0.88);
}

.account-layout.acb-ui .acb-nav-logout:hover {
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.2);
  color: #fca5a5;
}

/* Main column */
.account-layout.acb-ui .acb-main {
  min-width: 0;
  overflow-y: auto;
  height: calc(100vh - 52px);
  padding: 24px clamp(20px, 3vw, 40px) 40px;
  box-sizing: border-box;
}

.account-layout.acb-ui .account-page {
  max-width: min(920px, 100%);
}

@media (max-width: 900px) {
  .account-layout.acb-ui {
    overflow-y: auto;
  }

  .account-layout.acb-ui .acb-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .account-layout.acb-ui .account-rail.acb {
    position: static;
    width: 100%;
    min-width: 0;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--acb-border);
  }

  .account-layout.acb-ui .acb-inner {
    max-height: none;
  }

  .account-layout.acb-ui .acb-nav-scroll {
    max-height: 280px;
  }

  .account-layout.acb-ui .acb-main {
    height: auto;
    overflow: visible;
  }
}
