/* TV Wiesbach Volleyball - Turnierplaner Design */

:root {
    --tvw-green: #6fb500;
    --tvw-green-dark: #4f8500;
    --tvw-green-light: #a8e03b;
    --tvw-green-soft: #e8f5d7;

    --tvw-black: #111111;
    --tvw-black-soft: #1f1f1f;
    --tvw-white: #ffffff;

    --bg: #f4f7f1;
    --bg-soft: #eef5e7;
    --card: #ffffff;
    --text: #101010;
    --muted: #5f6b5f;
    --border: #d8e3cf;

    --danger: #dc2626;
    --danger-dark: #b91c1c;
    --warning: #f59e0b;

    --shadow: 0 18px 48px rgba(0, 0, 0, 0.10);
    --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.08);

    --radius: 26px;
    --radius-small: 15px;

    --container: 1120px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(111, 181, 0, 0.18), transparent 34rem),
        linear-gradient(180deg, #f6fbf0, var(--bg) 360px);
    color: var(--text);
}

a {
    color: inherit;
}

img {
    max-width: 100%;
}

/* Layout */

.tvw-hero {
    background:
        linear-gradient(135deg, rgba(17, 17, 17, 0.98), rgba(45, 45, 45, 0.95)),
        var(--tvw-black);
    color: var(--tvw-white);
    padding: 28px 22px 74px;
    border-bottom: 6px solid var(--tvw-green);
}

.tvw-hero-inner {
    max-width: var(--container);
    margin: 0 auto;
}

.tvw-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.tvw-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    font-weight: 900;
    font-size: 22px;
    letter-spacing: -0.03em;
}

.tvw-brand-logo {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    object-fit: contain;
    background: var(--tvw-white);
    padding: 4px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.tvw-brand-subtitle {
    font-size: 14px;
    opacity: 0.8;
    font-weight: 700;
    margin-top: 4px;
}

.tvw-hero-title {
    margin: 44px 0 0;
    font-size: clamp(40px, 8vw, 74px);
    line-height: 0.98;
    letter-spacing: -0.075em;
    max-width: 900px;
}

.tvw-accent {
    color: var(--tvw-green-light);
}

.tvw-page {
    max-width: var(--container);
    margin: -42px auto 0;
    padding: 0 22px 60px;
}

/* Buttons */

.tvw-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tvw-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 0;
    border-radius: 999px;
    padding: 12px 16px;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.tvw-button:hover {
    transform: translateY(-1px);
}

.tvw-button-primary {
    background: var(--tvw-green);
    color: #081100;
    box-shadow: 0 12px 24px rgba(111, 181, 0, 0.24);
}

.tvw-button-primary:hover {
    background: #84cf11;
}

.tvw-button-secondary {
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--tvw-white);
}

.tvw-button-secondary:hover {
    background: rgba(255, 255, 255, 0.16);
}

.tvw-button-card {
    border-radius: var(--radius-small);
    padding: 12px 15px;
    background: var(--tvw-green);
    color: #081100;
    box-shadow: 0 12px 24px rgba(111, 181, 0, 0.22);
}

.tvw-button-card:hover {
    background: #84cf11;
}

/* Cards */

.tvw-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.tvw-card-header {
    padding: 24px 26px;
    border-bottom: 1px solid var(--border);
}

.tvw-card-header h2 {
    margin: 0;
    font-size: 28px;
    letter-spacing: -0.04em;
}

.tvw-card-header p {
    margin: 7px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

/* Badges & Pills */

.tvw-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 11px;
    font-size: 14px;
    font-weight: 900;
    white-space: nowrap;
}

.tvw-badge-green {
    background: var(--tvw-green);
    color: #081100;
}

.tvw-badge-green-light {
    background: var(--tvw-green-soft);
    color: #355900;
    border: 1px solid #cfeab0;
}

.tvw-badge-dark {
    background: var(--tvw-black);
    color: var(--tvw-white);
}

.tvw-badge-muted {
    background: #eef1ea;
    color: #4c5a4c;
}

.tvw-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 10px;
    background: #f1f6eb;
    color: #314031;
    font-size: 14px;
    font-weight: 800;
    border: 1px solid #dce8d2;
}

/* Startseite / Turnierauswahl */

.tournament-list {
    display: grid;
}

.tournament-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 22px 26px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    transition: background 0.15s ease;
}

.tournament-row:last-child {
    border-bottom: 0;
}

.tournament-row:hover {
    background: #f8fbf4;
}

.tournament-name {
    font-size: 22px;
    font-weight: 950;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.tournament-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tvw-empty {
    padding: 46px 26px;
    text-align: center;
}

.tvw-empty-icon {
    font-size: 52px;
    margin-bottom: 12px;
}

.tvw-empty h2 {
    margin: 0 0 8px;
    font-size: 28px;
    letter-spacing: -0.04em;
}

.tvw-empty p {
    margin: 0 auto 22px;
    color: var(--muted);
    max-width: 560px;
    line-height: 1.55;
}

/* Responsive */

@media (max-width: 720px) {
    .tvw-hero {
        padding-bottom: 62px;
    }

    .tvw-hero-title {
        margin-top: 32px;
    }

    .tvw-card-header,
    .tournament-row {
        grid-template-columns: 1fr;
    }

    .tvw-button-card {
        width: 100%;
    }

    .tvw-brand {
        align-items: flex-start;
    }

    .tvw-brand-logo {
        width: 60px;
        height: 60px;
    }

    .tvw-actions {
        width: 100%;
        flex-direction: column;
    }

    .tvw-button {
        width: 100%;
    }
}
/* Admin Login */

.tvw-auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.tvw-login-shell {
    width: 100%;
    max-width: 1080px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    background: var(--card);
    border-radius: 34px;
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border);
}

.tvw-login-hero {
    background:
        linear-gradient(135deg, rgba(17, 17, 17, 0.98), rgba(36, 36, 36, 0.96)),
        var(--tvw-black);
    color: var(--tvw-white);
    padding: 54px;
    border-right: 6px solid var(--tvw-green);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 560px;
}

.tvw-login-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    font-weight: 950;
    font-size: 23px;
    letter-spacing: -0.04em;
}

.tvw-login-logo {
    width: 82px;
    height: 82px;
    border-radius: 20px;
    background: var(--tvw-white);
    padding: 5px;
    object-fit: contain;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
}

.tvw-login-hero h1 {
    margin: 48px 0 0;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1;
    letter-spacing: -0.07em;
}

.tvw-login-hero-accent {
    color: var(--tvw-green-light);
}

.tvw-login-card {
    padding: 54px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tvw-login-card h2 {
    margin: 0 0 8px;
    font-size: 34px;
    letter-spacing: -0.045em;
}

.tvw-login-subtitle {
    margin: 0 0 30px;
    color: var(--muted);
    line-height: 1.5;
}

.tvw-form {
    display: grid;
    gap: 18px;
}

.tvw-field {
    display: grid;
    gap: 8px;
}

.tvw-field label {
    font-size: 14px;
    font-weight: 900;
    color: #324032;
}

.tvw-input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 15px 16px;
    font: inherit;
    color: var(--text);
    background: #f8fbf4;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.tvw-input:focus {
    border-color: var(--tvw-green);
    box-shadow: 0 0 0 4px rgba(111, 181, 0, 0.16);
    background: var(--tvw-white);
}

.tvw-submit {
    width: 100%;
    border-radius: 16px;
    padding: 16px 18px;
    background: var(--tvw-green);
    color: #081100;
    box-shadow: 0 14px 30px rgba(111, 181, 0, 0.24);
}

.tvw-submit:hover {
    background: #84cf11;
}

.tvw-alert {
    padding: 14px 16px;
    border-radius: 16px;
    font-weight: 800;
    margin-bottom: 20px;
}

.tvw-alert-error {
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.tvw-login-footer-link {
    margin-top: 20px;
    display: inline-flex;
    color: var(--muted);
    font-weight: 800;
    text-decoration: none;
}

.tvw-login-footer-link:hover {
    color: var(--tvw-green-dark);
}

@media (max-width: 860px) {
    .tvw-login-shell {
        grid-template-columns: 1fr;
    }

    .tvw-login-hero {
        min-height: auto;
        padding: 36px;
        border-right: 0;
        border-bottom: 6px solid var(--tvw-green);
    }

    .tvw-login-card {
        padding: 36px;
    }
}

@media (max-width: 520px) {
    .tvw-auth-page {
        padding: 12px;
    }

    .tvw-login-shell {
        border-radius: 24px;
    }

    .tvw-login-hero,
    .tvw-login-card {
        padding: 28px;
    }

    .tvw-login-logo {
        width: 66px;
        height: 66px;
    }
}
/* Admin Passwort ändern */

.tvw-alert-success {
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.tvw-password-hint {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #f8fbf4;
    border: 1px solid var(--border);
    color: var(--muted);
    line-height: 1.5;
    font-size: 14px;
}
/* Admin Layout */

.tvw-admin-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 290px 1fr;
    background:
        radial-gradient(circle at top left, rgba(111, 181, 0, 0.14), transparent 34rem),
        var(--bg);
}

.tvw-admin-sidebar {
    background:
        linear-gradient(180deg, #111111, #1f1f1f),
        var(--tvw-black);
    color: var(--tvw-white);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 26px;
    border-right: 6px solid var(--tvw-green);
}

.tvw-admin-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 950;
    font-size: 21px;
    letter-spacing: -0.04em;
}

.tvw-admin-logo {
    width: 62px;
    height: 62px;
    border-radius: 17px;
    background: var(--tvw-white);
    padding: 4px;
    object-fit: contain;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24);
}

.tvw-admin-user {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.84);
    font-size: 14px;
    line-height: 1.5;
}

.tvw-admin-user strong {
    display: block;
    color: var(--tvw-white);
    font-size: 16px;
    margin-bottom: 4px;
}

.tvw-admin-nav {
    display: grid;
    gap: 8px;
}

.tvw-admin-nav a {
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.76);
    font-weight: 850;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tvw-admin-nav a:hover,
.tvw-admin-nav a.active {
    background: rgba(255, 255, 255, 0.12);
    color: var(--tvw-white);
}

.tvw-admin-footer {
    margin-top: auto;
    display: grid;
    gap: 10px;
}

.tvw-admin-logout {
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(239, 68, 68, 0.15);
    color: #fecaca;
    font-weight: 900;
    text-align: center;
}

.tvw-admin-main {
    padding: 34px;
    min-width: 0;
}

.tvw-admin-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.tvw-admin-title {
    margin: 0;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1;
    letter-spacing: -0.065em;
}

.tvw-admin-subtitle {
    margin: 9px 0 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.5;
}

.tvw-button-light {
    background: var(--tvw-white);
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: none;
}

.tvw-button-light:hover {
    background: #f8fbf4;
}

.tvw-button-danger {
    background: var(--danger);
    color: var(--tvw-white);
    box-shadow: 0 12px 24px rgba(220, 38, 38, 0.18);
}

.tvw-button-danger:hover {
    background: var(--danger-dark);
}

.tvw-flash-list {
    display: grid;
    gap: 10px;
    margin-bottom: 24px;
}

.tvw-flash {
    padding: 14px 16px;
    border-radius: 16px;
    font-weight: 800;
    border: 1px solid var(--border);
    background: var(--tvw-white);
}

.tvw-flash.success {
    color: #166534;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.tvw-flash.error {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}

.tvw-flash.info {
    color: #355900;
    background: var(--tvw-green-soft);
    border-color: #cfeab0;
}

.tvw-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 26px;
}

.tvw-stat-card {
    background: var(--tvw-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow-soft);
}

.tvw-stat-value {
    font-size: 38px;
    font-weight: 950;
    letter-spacing: -0.055em;
}

.tvw-stat-label {
    color: var(--muted);
    font-weight: 850;
    margin-top: 4px;
}

.tvw-dashboard-grid {
    display: grid;
    gap: 16px;
}

.tvw-dashboard-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    background: var(--tvw-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    padding: 22px;
}

.tvw-dashboard-card:hover {
    border-color: #c7e4a6;
}

.tvw-dashboard-name {
    margin: 0 0 10px;
    font-size: 25px;
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: -0.045em;
}

.tvw-dashboard-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.tvw-dashboard-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tvw-mini-stat {
    border-radius: 15px;
    background: #f8fbf4;
    border: 1px solid var(--border);
    padding: 10px 12px;
    min-width: 96px;
}

.tvw-mini-stat strong {
    display: block;
    font-size: 20px;
    line-height: 1;
}

.tvw-mini-stat span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    margin-top: 4px;
}

.tvw-dashboard-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 170px;
}

.tvw-progress {
    height: 10px;
    border-radius: 999px;
    background: #e4ecd9;
    overflow: hidden;
    margin-top: 14px;
    max-width: 360px;
}

.tvw-progress-bar {
    height: 100%;
    background: var(--tvw-green);
    border-radius: inherit;
}

.tvw-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 1100px) {
    .tvw-admin-layout {
        grid-template-columns: 1fr;
    }

    .tvw-admin-sidebar {
        border-right: 0;
        border-bottom: 6px solid var(--tvw-green);
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }

    .tvw-admin-user {
        margin-left: auto;
    }

    .tvw-admin-footer {
        margin-top: 0;
    }

    .tvw-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .tvw-admin-main {
        padding: 22px;
    }

    .tvw-admin-topbar,
    .tvw-dashboard-card {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .tvw-stat-grid {
        grid-template-columns: 1fr;
    }

    .tvw-admin-sidebar {
        padding: 22px;
    }

    .tvw-admin-user,
    .tvw-admin-nav,
    .tvw-admin-footer {
        width: 100%;
        margin-left: 0;
    }

    .tvw-dashboard-actions {
        min-width: 0;
    }

    .tvw-dashboard-actions .tvw-button,
    .tvw-card-actions .tvw-button {
        width: 100%;
    }
}