/* Frontend Global Styles – basierend auf Sample-Design, ohne admin-* Selektoren */
* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: var(--line-height);
}

.area-public {
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
}

.page-shell {
    position: relative;
    z-index: 1;
    padding: var(--space-lg) var(--space-md) var(--space-xl);
}

a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

a:hover { color: var(--accent-strong); }

h1, h2, h3 {
    margin: 0 0 var(--space-sm);
    color: var(--text-strong);
    line-height: 1.2;
}

h1 { font-size: clamp(28px, 3vw, 34px); font-weight: 800; }
h2 { font-size: clamp(22px, 2.4vw, 28px); font-weight: 800; }
h3 { font-size: clamp(18px, 2vw, 22px); font-weight: 700; }

/* Layout */
.layout {
    display: grid;
    grid-template-columns: minmax(240px, var(--sidebar-width, 320px)) 1fr;
    gap: var(--layout-gap);
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0;
}

.sidebar {
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    border: 1px solid color-mix(in srgb, var(--divider) 70%, transparent);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    position: sticky;
    top: 70px;
    height: fit-content;
}

.sidebar__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.sidebar__link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    color: var(--text);
    border: 1px solid transparent;
}

.sidebar__link:hover {
    color: var(--accent-strong);
    border-color: var(--divider);
    background: var(--surface-muted);
}

.sidebar__link--disabled { color: var(--text-hint); pointer-events: none; }

.sidebar__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.content {
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    border: 1px solid color-mix(in srgb, var(--divider) 70%, transparent);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: var(--space-xl);
    color: var(--text);
    min-height: 60vh;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: color-mix(in srgb, var(--panel) 80%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--divider) 70%, transparent);
    padding: var(--space-sm) var(--space-lg);
    box-shadow: var(--shadow-soft);
}

.navbar__brand { display: inline-flex; align-items: center; gap: var(--space-sm); }
.navbar__logo { height: 40px; width: auto; }
.navbar__links { display: flex; align-items: center; gap: var(--space-sm); }

.navbar__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xxs);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    color: var(--text);
    border: 1px solid transparent;
}

.navbar__link:hover { color: var(--accent-strong); border-color: var(--divider); }

/* Language Switcher kompakt */
.language-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    z-index: 50;
}

.language-switcher .lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xxs);
    padding: var(--space-xxs) var(--space-sm);
    border: 1px solid var(--divider);
    border-radius: var(--radius-sm);
    background: var(--panel);
    color: var(--text);
    cursor: pointer;
    border: 1px solid var(--divider);
}

.language-switcher .lang-flag {
    display: inline-flex;
    width: 28px;
    height: 18px;
    overflow: hidden;
    border-radius: 4px;
}

.language-switcher .lang-flag svg { width: 28px; height: 18px; display: block; }

.language-switcher .lang-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    display: none;
    flex-direction: column;
    gap: var(--space-xxs);
    padding: var(--space-xs);
    background: var(--panel);
    border: 1px solid var(--divider);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-soft);
    z-index: 20;
}

.language-switcher:focus-within .lang-menu,
.language-switcher.is-open .lang-menu { display: flex; }

.language-switcher .lang-option {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xxs);
    border: 0;
    background: transparent;
    color: var(--text);
    padding: var(--space-xxs) var(--space-sm);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.language-switcher .lang-option:hover { background: var(--surface-muted); color: var(--accent-strong); }

/* Buttons global im Sample-Look */
button,
input[type="submit"],
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    height: var(--button-height, 40px);
    padding: 0 var(--space-md);
    border-radius: var(--button-radius, var(--radius-sm, 8px));
    border: 1px solid var(--accent-strong);
    background: var(--accent);
    color: var(--accent-contrast, #0c121f);
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: var(--shadow-soft);
}

button:hover,
input[type="submit"]:hover,
.button:hover,
button:focus-visible,
input[type="submit"]:focus-visible,
.button:focus-visible {
    background: var(--accent-strong);
    border-color: var(--accent-strong);
    box-shadow:
        0 0 0 1px var(--accent-strong),
        0 12px 30px rgba(0, 0, 0, 0.35),
        0 0 18px color-mix(in srgb, var(--accent-strong) 70%, transparent);
    transform: translateY(-1px);
}

button:active,
input[type="submit"]:active,
.button:active { transform: translateY(0); }

.button--ghost {
    background: transparent;
    border-color: var(--divider);
    color: var(--text);
}

.button--ghost:hover,
.button--ghost:focus-visible {
    color: var(--accent-strong);
    border-color: var(--accent-strong);
    box-shadow:
        0 0 0 1px var(--accent-strong),
        0 12px 30px rgba(0, 0, 0, 0.35),
        0 0 18px color-mix(in srgb, var(--accent-strong) 70%, transparent);
    transform: translateY(-1px);
}

.button--success {
    background: var(--success);
    border-color: var(--success);
    color: var(--accent-contrast, #0c121f);
}

.button--success:hover,
.button--success:focus-visible {
    background: color-mix(in srgb, var(--success) 88%, #ffffff 12%);
    border-color: var(--success);
    box-shadow:
        0 0 0 1px var(--success),
        0 12px 30px rgba(0, 0, 0, 0.35),
        0 0 18px color-mix(in srgb, var(--success) 70%, transparent);
}

.button--danger {
    background: var(--danger);
    border-color: var(--danger);
    color: var(--text-strong);
}

.button--danger:hover,
.button--danger:focus-visible {
    background: color-mix(in srgb, var(--danger) 88%, #ffffff 12%);
    border-color: var(--danger);
    box-shadow:
        0 0 0 1px var(--danger),
        0 12px 30px rgba(0, 0, 0, 0.35),
        0 0 18px color-mix(in srgb, var(--danger) 70%, transparent);
    color: var(--text-strong);
}

.button--muted {
    background: var(--surface-muted);
    border-color: var(--divider);
    color: var(--text);
}

/* Auth/Hero im Sample-Stil */
body.auth {
    min-height: 100vh;
    background: var(--bg);
    overflow-x: hidden;
}

body.auth main {
    min-height: calc(100vh - 48px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 12px;
    box-sizing: border-box;
}

.auth-language-switcher { position: fixed; top: var(--space-sm); right: var(--space-sm); z-index: 40; }

.auth-hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 18px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
    align-items: stretch;
}

.auth-hero__intro {
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    border: 1px solid color-mix(in srgb, var(--divider) 70%, transparent);
    box-shadow: var(--shadow-soft);
    border-radius: 18px;
    overflow: hidden;
    padding: clamp(18px, 2vw, 24px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    height: 100%;
}

.auth-brand__logo {
    display: block;
    max-width: 280px;
    width: 100%;
    height: auto;
}

.auth-hero__lead { margin: 0; color: var(--text-muted); line-height: 1.6; }
.auth-hero__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; color: var(--text-muted); }
.auth-hero__list li { position: relative; padding-left: 18px; }
.auth-hero__list li::before { content: '•'; position: absolute; left: 0; color: var(--accent); }

.auth-hero__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 12px; }
.auth-hero__stat { padding: 18px; box-shadow: var(--shadow-soft); border: 1px solid var(--divider); border-radius: var(--radius-md); background: var(--surface); }
.auth-hero__stat-label { display: block; font-size: 12px; letter-spacing: 0.4px; text-transform: uppercase; color: var(--text-muted); }
.auth-hero__stat-value { font-size: 22px; line-height: 1.3; color: var(--text-strong); }
.auth-hero__stat-sub { color: var(--text-muted); }

.auth-card {
    max-width: none;
    width: 100%;
    margin: 40px auto;
    background: var(--surface);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--divider);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.auth-card--login {
    background: color-mix(in srgb, var(--panel) 78%, transparent);
    border: 1px solid color-mix(in srgb, var(--divider) 70%, transparent);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 28px 24px;
    height: 100%;
}

.auth-hero .auth-card {
    margin: 0;
}

.auth-card__header { display: flex; flex-direction: column; gap: 6px; }
.auth-card__subtitle { margin: 0; color: var(--text-muted); }

.auth-field { margin: var(--space-md) 0 var(--space-lg); }
.auth-field .floating-field { margin: 0; }

.auth-actions { display: flex; align-items: center; gap: var(--space-sm); flex-wrap: wrap; }
.auth-links { display: flex; flex-direction: column; gap: var(--space-xxs); color: var(--text-muted); }

/* Video-Background für Auth/Sample-Pages */
.fe-sample__bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.fe-sample__bg video { width: 100%; height: 100%; object-fit: cover; }

.fe-sample__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--panel);
    opacity: 0.55;
}

/* Keyframes übernommen aus Sample */
@keyframes gradient-pulse {
    0%   { background-position: 0 0, 11px 11px, 0% 50%; }
    50%  { background-position: 0 0, 11px 11px, 100% 50%; }
    100% { background-position: 0 0, 11px 11px, 0% 50%; }
}

@keyframes dots-drift {
    from { background-position: 0 0, 11px 11px, 0% 50%; }
    to { background-position: 22px 22px, 33px 33px, 0% 50%; }
}

@media (max-width: 900px) {
    .auth-hero {
        grid-template-columns: 1fr;
        margin: 32px auto;
    }

    .auth-card {
        margin: 0 auto;
    }

    .layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        top: 0;
    }
}
