/* ==== SIDEBAR BASIS ==== */

/* Basis-Layout: Sidebar links, Inhalt rechts */
.layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Main-Bereich rechts neben der Sidebar */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
}


.sidebar {
    width: 260px;
    background: radial-gradient(circle at top left, #1e293b, #020617);
    border-right: 1px solid rgba(148, 163, 184, 0.4);
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    font-size: 14px;
}

/* Header + Logo */

.sidebar-top {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.sidebar-logo-img {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 20%, #38bdf8, #1d4ed8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0b1120;
    font-weight: 700;
    font-size: 1.1rem;
}

.sidebar-logo-text {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-logo-title {
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-logo-sub {
    font-size: 0.75rem;
    color: rgba(200, 210, 255, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Navigation */

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.nav-section-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(148, 163, 184, 0.9);
    margin: 12px 0 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    text-decoration: none;
    color: rgba(226, 232, 240, 0.9);
    font-size: 0.9rem;
    line-height: 1.2;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.nav-link .nav-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.nav-link span:last-child {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-link:hover {
    background: rgba(148, 163, 184, 0.1);
}

.nav-link.active {
    background: linear-gradient(90deg, #2563eb, #4f46e5);
    color: #e5e7eb;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}

/* UNTERER USER-BEREICH */

.sidebar-bottom {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.35);
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.8rem;
    color: rgba(148, 163, 184, 0.9);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-bottom .user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 0, #60a5fa, #1d4ed8);
    color: #e5e7eb;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.sidebar-bottom .user-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.sidebar-bottom .user-name {
    font-weight: 500;
    color: #e5e7eb;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-bottom .user-role,
.sidebar-bottom .user-company {
    font-size: 0.75rem;
    color: rgba(148, 163, 184, 0.95);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-bottom .sidebar-logout {
    margin-top: 4px;
    color: #60a5fa;
    text-decoration: none;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sidebar-bottom .sidebar-logout:hover {
    text-decoration: underline;
}

/* ===== MOBILE NAVIGATION ===== */

.mobile-header {
    display: none;
    background: #020617;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(148,163,184,0.3);
    align-items: center;
    justify-content: space-between;
}

.burger-btn {
    background: none;
    border: none;
    color: #e2e8f0;
    font-size: 1.6rem;
    cursor: pointer;
}

.mobile-title {
    color: #e2e8f0;
    font-size: 1.1rem;
}

/* Overlay für ausgeklappte Sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 998;
}

/* ===== AB HIER MOBILE LAYOUT ===== */
@media (max-width: 900px) {

    .layout {
        display: block;
    }

    /* Mobile-Header immer oben fixieren */
    .mobile-header {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 9998;
        background: #020617;
        padding: 14px 18px;
        border-bottom: 1px solid rgba(148,163,184,0.3);
        align-items: center;
        justify-content: space-between;
    }

    /* Content nach unten schieben, damit nichts unter dem Header liegt */
    .main {
        padding-top: 56px; /* ggf. 60–70px, je nach Optik */
    }

    #sidebar {
        position: fixed !important;
        top: 0;
        left: 0;
        bottom: 0;
        width: 260px;
        max-width: 80%;
        background: radial-gradient(circle at top left, #1e293b, #020617);
        transform: translateX(-100%) !important;
        transition: transform 0.25s ease;
        z-index: 9999;
    }

    #sidebar.open {
        transform: translateX(0) !important;
    }

    .sidebar-overlay.active {
        display: block;
    }
}
/* ===== RECHTLICHE LINKS Unten in der Sidebar ===== */

.sidebar-legal {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 6px;
    padding-top: 4px;
    border-top: 1px dashed rgba(148, 163, 184, 0.35);
}

.sidebar-legal a {
    color: rgba(148, 163, 184, 0.9);
    text-decoration: none;
    font-size: 0.78rem;
    line-height: 1.3;
}

.sidebar-legal a:hover {
    color: #e5e7eb;
    text-decoration: underline;
}
/* ===== User-Level / Badges unten in der Sidebar ===== */

.user-tiers-wrapper {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed rgba(148, 163, 184, 0.35);
}

.user-tiers-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(148, 163, 184, 0.9);
    margin-bottom: 4px;
}

/* Grid für die Badges */
.user-tiers {
    display: grid;
    grid-template-columns: repeat(3, auto);
    justify-content: center;  /* oder space-between */
    gap: 4px 6px;
}


/* klickbares Badge (als <a>) */
.tier-pill {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;

    background:
        radial-gradient(circle at 20% 0, rgba(248, 250, 252, 0.14), transparent 60%),
        rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.75);
    box-shadow:
        0 0 0 1px rgba(15, 23, 42, 1),
        0 4px 10px rgba(15, 23, 42, 0.8);

    transition:
        transform 0.12s ease,
        box-shadow 0.12s ease,
        border-color 0.12s ease,
        background 0.12s ease;
    color: #e5e7eb;
}

/* Zusatzklasse für „erreicht“ – leicht farbig */
.tier-pill--earned {
    border-color: rgba(56, 189, 248, 0.85);
    box-shadow:
        0 0 0 1px rgba(15, 23, 42, 1),
        0 0 14px rgba(56, 189, 248, 0.45);
}

/* Icon innen */
.tier-pill-icon {
    pointer-events: none;
}

/* Hover-Effekt: enterprise-glow */
.tier-pill--earned:hover {
    transform: translateY(-1px) scale(1.03);
    border-color: rgba(56, 189, 248, 1);
    box-shadow:
        0 0 0 1px rgba(15, 23, 42, 1),
        0 0 18px rgba(56, 189, 248, 0.9);
    background:
        radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.40), transparent 60%),
        rgba(15, 23, 42, 0.98);
}

/* Touch / Mobile */
@media (max-width: 900px) {
    .user-tiers {
        gap: 3px;
    }

    .tier-pill {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
}
.sidebar-cta {
    position: relative;
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: #f9fafb;
    overflow: hidden;
    cursor: pointer;
    transform: translateY(0);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.55);
    transition:
        transform 0.18s ease-out,
        box-shadow 0.18s ease-out,
        background-position 0.4s ease-out;
    background-size: 200% 200%;
}

/* Logout: rot/orange, dramatisch */
.sidebar-cta--logout {
    background-image: linear-gradient(135deg, #dc2626, #fb923c, #b91c1c);
    backdrop-filter: blur(6px);
}

/* Login: blau/türkis, „sicher“ */
.sidebar-cta--login {
    background-image: linear-gradient(135deg, #0ea5e9, #22c55e, #0369a1);
    backdrop-filter: blur(6px);
}

.sidebar-cta-glow {
    position: absolute;
    inset: -40%;
    background: radial-gradient(circle at 0 0,
        rgba(248, 250, 252, 0.22),
        transparent 55%);
    opacity: 0.0;
    pointer-events: none;
    transition: opacity 0.25s ease-out;
}

.sidebar-cta-icon {
    font-size: 18px;
    z-index: 1;
}

.sidebar-cta-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
    z-index: 1;
}

.sidebar-cta-main {
    font-size: 13px;
}

.sidebar-cta-sub {
    font-size: 11px;
    opacity: 0.85;
}

/* Hover-Effekt */
.sidebar-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 13px 26px rgba(15, 23, 42, 0.75);
    background-position: 100% 0;
}

.sidebar-cta:hover .sidebar-cta-glow {
    opacity: 1;
}

/* Active / Klick-Effekt */
.sidebar-cta:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 5px 10px rgba(15, 23, 42, 0.6);
}

/* === Base: Uiverse-Style Button === */
.button {
  margin: 0;
  height: auto;
  background: transparent;
  padding: 0;
  border: none;
  cursor: pointer;

  --border-right: 0; /* kein Balken mehr */
  --text-stroke-color: rgba(255,255,255,0.6);
  --animation-color: #37FF8B; /* Standard, per Klasse überschrieben */
  --fs-size: 1.05rem; /* etwas kleiner für Sidebar */
  letter-spacing: 2px;
  text-decoration: none;
  font-size: var(--fs-size);
  font-family: "Arial", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  position: relative;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1px var(--text-stroke-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;

  /* leichtes Dauer-Glühen */
  filter: drop-shadow(0 0 4px rgba(55, 255, 139, 0.18));
}

/* Grundtext */
.actual-text {
  padding: 4px 8px;
  position: relative;
  z-index: 1;
}

/* Glow-Text-Overlay – kein Balken, nur Text */
.hover-text {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  color: var(--animation-color);
  -webkit-text-stroke: 1px var(--animation-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;

  /* KEIN width-Fly-in mehr */
  width: 100%;
  opacity: 0;

  transition: opacity 0.35s ease-out,
              filter 0.35s ease-out;
  pointer-events: none;
}

/* Hover → Text glüht auf, füllt die Buchstaben */
.button:hover .hover-text {
  opacity: 1;
  filter: drop-shadow(0 0 23px var(--animation-color));
}

/* Sidebar-spezifische Anpassung */
.sidebar-bottom .button {
  width: 100%;
  margin-top: 12px;
  justify-content: center;
}

/* Logout = rot-neon */
.sidebar-logout-btn {
  --animation-color: #ff4b4b;
}

/* Login = grün-neon */
.sidebar-login-btn {
  --animation-color: #37FF8B;
}
