/* style.css - Global Stylesheet - Helles "Sportlich/Frisch" Theme (Rasen-Gruen + Sport-Blau) */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-gradient-start: #f4faf6;
    --bg-gradient-end: #eef4fb;
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-border: rgba(15, 23, 42, 0.08);
    --primary: #15803d;
    --primary-glow: rgba(21, 128, 61, 0.25);
    --secondary: #1d4ed8;
    --secondary-glow: rgba(29, 78, 216, 0.22);
    --accent: #0891b2;
    --accent-glow: rgba(8, 145, 178, 0.25);
    --danger: #dc2626;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-radius-sm: 8px;
    --border-radius-md: 14px;
    --border-radius-lg: 24px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(160deg, var(--bg-gradient-start), var(--bg-gradient-end));
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.5;
}

a {
    color: var(--secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary);
}

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-gradient-end);
}
::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.15);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 23, 42, 0.28);
}

/* Header & Navbar */
header {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.maintenance-banner {
    background: var(--danger);
    color: #fff;
    text-align: center;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.maintenance-banner a {
    color: #fff;
    text-decoration: underline;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
    background: rgba(15, 23, 42, 0.05);
}

.nav-link.acp-link {
    color: var(--accent);
    font-weight: 600;
}

.btn-nav {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white !important;
    padding: 0.5rem 1.2rem;
    font-weight: 600;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--primary-glow);
}

/* Container & Layout */
main {
    flex: 1;
    min-width: 0;
    max-width: 1200px;
    width: 100%;
    margin: 2rem auto;
    padding: 0 2rem;
}

footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.6);
    margin-top: auto;
}

.footer-links {
    margin-top: 0.6rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-links .sep {
    margin: 0 0.5rem;
    color: var(--card-border);
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2.5rem;
    background: linear-gradient(to right, var(--text-primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 1.8rem;
    border-bottom: 2px solid rgba(15, 23, 42, 0.06);
    padding-bottom: 0.5rem;
}

/* Cards & Containers */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-md);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 28px 0 rgba(15, 23, 42, 0.08);
    transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.card:hover {
    border-color: rgba(21, 128, 61, 0.2);
}

/* Legal pages (Impressum / Datenschutz) */
.legal-content h1 {
    font-size: 2.1rem;
}

.legal-content h3 {
    margin-top: 1.75rem;
    color: var(--primary);
    font-size: 1.1rem;
}

.legal-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

.legal-content .legal-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--card-border);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group .form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

.form-control {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    font-family: inherit;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 90px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    text-align: center;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px var(--primary-glow);
}

.btn-secondary {
    background: rgba(15, 23, 42, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--card-border);
}

.btn-secondary:hover {
    background: rgba(15, 23, 42, 0.1);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn:active {
    transform: translateY(0);
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius-sm);
    margin-bottom: 1.5rem;
    font-weight: 500;
    border: 1px solid transparent;
}

.alert-success {
    background: rgba(21, 128, 61, 0.1);
    border-color: rgba(21, 128, 61, 0.25);
    color: #15803d;
}

.alert-danger {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.25);
    color: #b91c1c;
}

.alert-info {
    background: rgba(29, 78, 216, 0.08);
    border-color: rgba(29, 78, 216, 0.2);
    color: #1d4ed8;
}

/* Grid & Utilities */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    .acp-layout {
        flex-direction: column;
        align-items: stretch;
    }
    .acp-sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        position: static;
    }
    .tabs-header {
        flex-wrap: wrap;
        overflow-x: visible;
    }
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    color: var(--text-primary);
}

.table th, .table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.table th {
    background: rgba(15, 23, 42, 0.02);
    color: var(--text-secondary);
    font-weight: 600;
}

.table tbody tr:hover {
    background: rgba(21, 128, 61, 0.04);
}

/* Responsive Tabellen: statt horizontalem Scrollen wird jede Zeile ab
   700px Breite zu einer Karte mit Label:Wert-Paaren gestapelt. Voraussetzung:
   jedes <td> traegt ein data-label-Attribut (siehe render_standings_table_html
   in tournament_logic.php sowie die ACP-Listen und die Turnier-Uebersichten). */
@media (max-width: 700px) {
    .table-responsive .table thead {
        display: none;
    }
    .table-responsive .table,
    .table-responsive .table tbody,
    .table-responsive .table tr,
    .table-responsive .table td {
        display: block;
        width: 100%;
    }
    .table-responsive .table tr {
        margin-bottom: 1rem;
        border: 1px solid var(--card-border);
        border-radius: var(--border-radius-sm);
        padding: 0.5rem 0.75rem;
        background: rgba(255, 255, 255, 0.5);
    }
    .table-responsive .table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        text-align: right;
        border-bottom: 1px dashed var(--card-border);
        padding: 0.5rem 0;
        min-width: 0;
    }
    .table-responsive .table td:last-child {
        border-bottom: none;
    }
    .table-responsive .table td[data-label]::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-secondary);
        text-align: left;
        white-space: nowrap;
    }
    .table-responsive .table td:not([data-label])::before {
        display: none;
    }
    .table-responsive .table td .inline-actions {
        justify-content: flex-end;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }
    .table-responsive .table td .inline-actions .btn,
    .table-responsive .table td .inline-actions form {
        width: 100%;
        display: block;
    }
}

/* Changelog Accordion styles */
.changelog-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.changelog-item {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.changelog-item:hover {
    border-color: rgba(21, 128, 61, 0.25);
}

.changelog-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.015);
    user-select: none;
    transition: background var(--transition-fast);
}

.changelog-header:hover {
    background: rgba(15, 23, 42, 0.035);
}

.changelog-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.changelog-version {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-primary);
}

.changelog-date {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.changelog-badge {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-weight: 600;
}

.changelog-toggle-icon {
    width: 24px;
    height: 24px;
    transition: transform var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.changelog-toggle-icon::before {
    content: "▼";
    font-size: 0.8rem;
}

.changelog-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal), opacity var(--transition-normal), padding var(--transition-normal);
    padding: 0 1.5rem;
    border-top: 1px solid transparent;
}

/* Open state styles */
.changelog-item.open {
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(21, 128, 61, 0.12);
}

.changelog-item.open .changelog-header {
    background: rgba(21, 128, 61, 0.05);
}

.changelog-item.open .changelog-toggle-icon {
    transform: rotate(180deg);
}

.changelog-item.open .changelog-content {
    max-height: 1400px; /* high enough limit for content */
    opacity: 1;
    padding: 1.5rem;
    border-top: 1px solid var(--card-border);
}

.changelog-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.changelog-list-item {
    position: relative;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.changelog-list-item::before {
    content: "";
    position: absolute;
    left: 0.3rem;
    top: 0.6rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--primary);
}

.changelog-list-item.feature::before {
    background-color: var(--accent);
}

.changelog-list-item.fix::before {
    background-color: var(--danger);
}

/* Tournament Admin Area */
.admin-badge {
    background: rgba(8, 145, 178, 0.12);
    color: var(--accent);
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    border: 1px solid rgba(8, 145, 178, 0.2);
}

.role-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.role-badge.role-admin {
    background: rgba(29, 78, 216, 0.12);
    color: var(--secondary);
    border: 1px solid rgba(29, 78, 216, 0.25);
}

.role-badge.role-user {
    background: rgba(15, 23, 42, 0.06);
    color: var(--text-secondary);
    border: 1px solid var(--card-border);
}

.role-badge.role-banned {
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger);
    border: 1px solid rgba(220, 38, 38, 0.25);
}

.tabs-header {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--card-border);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.75rem 1.25rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Matches & Scoring */
.match-card {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition-fast);
}

.match-card:hover {
    border-color: rgba(21, 128, 61, 0.2);
    background: rgba(255, 255, 255, 0.9);
}

.match-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    min-width: 80px;
    flex-shrink: 0;
}

.match-teams {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 1rem;
}

.match-team {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.match-team span:first-child {
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 0;
}

.match-team.winner {
    font-weight: 600;
    color: var(--text-primary);
}

.match-team.loser {
    color: var(--text-muted);
}

.match-score-display {
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.match-action {
    margin-left: 1rem;
    flex-shrink: 0;
}

/* Match-Karten auf schmalen Bildschirmen: gestapelt statt nebeneinander
   gequetscht (Ort/Uhrzeit, Teamnamen+Ergebnis und Aktions-Buttons jeweils
   auf eigener "Zeile" mit voller Breite). */
@media (max-width: 640px) {
    .match-card {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    .match-info {
        min-width: 0;
    }
    .match-teams {
        padding: 0;
    }
    .match-action {
        margin-left: 0;
        width: 100%;
    }
    .match-action .btn {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
}

/* Standings styling */
.standings-pos {
    width: 30px;
    font-weight: 700;
    color: var(--text-secondary);
}

.standings-pos.top-pos {
    color: var(--accent);
}

/* Tournament Bracket CSS */
.bracket-container {
    display: flex;
    overflow-x: auto;
    padding: 2rem 0;
    gap: 3rem;
    align-items: center;
}

.bracket-round {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 2rem;
    min-width: 250px;
}

.bracket-round-title {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 0.5rem;
}

.bracket-match {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-sm);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    position: relative;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.bracket-match-team {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.bracket-match-team.winner {
    background: rgba(21, 128, 61, 0.1);
    color: var(--text-primary);
    font-weight: 600;
}

.bracket-match-score {
    font-weight: 700;
}

/* Modal styles for score inputs */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 200;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-md);
    padding: 2rem;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--text-primary);
}

.score-input-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.score-input-team {
    flex: 1;
    font-weight: 600;
    text-align: center;
    font-size: 1.1rem;
}

.score-input-field {
    width: 80px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Dashboard statistics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-sm);
    padding: 1.25rem;
    text-align: center;
}

.stat-val {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* =========================
   ACP (Admin Control Panel)
   ========================= */
.acp-layout {
    display: flex;
    gap: 2rem;
    align-items: stretch;
}

.acp-sidebar {
    width: 220px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-md);
    padding: 1rem;
    position: sticky;
    top: 90px;
}

.acp-sidebar-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 700;
    padding: 0.5rem 0.75rem;
}

.acp-sidebar a {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.65rem 0.75rem;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
    display: block;
}

.acp-sidebar a:hover {
    background: rgba(21, 128, 61, 0.08);
    color: var(--primary);
}

.acp-sidebar a.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
}

.acp-sidebar hr {
    border: 0;
    border-top: 1px solid var(--card-border);
    margin: 0.5rem 0;
}

.acp-main {
    flex: 1;
    min-width: 0;
}

/* Toggle switch */
/* Hoehere Spezifitaet als ".form-group label" (Zeile ~259) noetig, da der
   Switch als <label class="toggle-switch"> immer innerhalb eines .form-group
   verwendet wird - sonst gewinnt dessen "display: block" und der Track
   kollabiert (der Schalter-Kreis landet dann ueber dem Text). */
.form-group .toggle-switch,
.toggle-switch {
    display: inline-flex;
    position: relative;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.toggle-switch input {
    display: none;
}

.toggle-switch .track {
    width: 46px;
    height: 26px;
    background: rgba(15, 23, 42, 0.15);
    border-radius: 999px;
    position: relative;
    transition: background var(--transition-fast);
    flex-shrink: 0;
}

.toggle-switch .track::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    transition: transform var(--transition-fast);
}

.toggle-switch input:checked + .track {
    background: var(--danger);
}

.toggle-switch input:checked + .track::before {
    transform: translateX(20px);
}

/* Small inline action forms in tables */
.inline-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    min-width: 0;
}

.inline-actions form {
    display: inline;
}
