body {
    font-family: "Noto Sans", sans-serif;
    transition: background-color 0.3s, color 0.3s;
}

[data-bs-theme="dark"] {
    background-color: #121212;
    color: #ffffff;
}

[data-bs-theme="dark"] .table {
    background-color: #1e1e1e;
    color: #ffffff;
}

[data-bs-theme="dark"] .table th,
[data-bs-theme="dark"] .table td {
    border-color: #333;
}

[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: #1b1b1b;
    color: #ffffff;
    border-color: #333;
}

[data-bs-theme="dark"] .navbar {
    background-color: #8b0000 !important;
}

[data-bs-theme="dark"] .btn-outline-light {
    border-color: #fff;
    color: #fff;
}

[data-bs-theme="dark"] .btn-outline-light:hover {
    background-color: #fff;
    color: #000;
}

.navbar {
    background-color: #75031a !important;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
    overflow: visible;
}

.navbar > .container {
    align-items: center;
}

.brand-with-logo {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.65rem;
    position: relative;
    z-index: 2;
    margin-bottom: -1.85rem;
}

.club-logo {
    display: block;
    height: 76px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.22));
    transform: translateY(0.65rem);
}

.brand-with-logo span {
    line-height: 1.1;
    padding-top: 1.05rem;
    font-weight: 600;
    font-size: 1.18rem;
    letter-spacing: 0.01em;
}

.theme-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border-radius: 999px;
}

.theme-icon-button svg {
    display: block;
}

.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.language-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid #f8f9fa;
    border-radius: 999px;
    text-decoration: none;
    color: #f8f9fa;
    background: transparent;
    line-height: 1;
}

.language-flag:hover {
    background: #f8f9fa;
    color: #000;
}

.language-flag.is-active {
    border-color: #f8f9fa;
}

.flag-icon {
    display: inline-block;
    width: 1.45rem;
    height: 1rem;
    border-radius: 0.15rem;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.45);
    flex: 0 0 auto;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.flag-at {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 12'%3E%3Crect width='18' height='12' fill='%23ed2939'/%3E%3Crect y='4' width='18' height='4' fill='%23ffffff'/%3E%3C/svg%3E");
}

.flag-gb {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30'%3E%3CclipPath id='t'%3E%3Cpath d='M0,0 v30 h60 v-30 z'/%3E%3C/clipPath%3E%3Cpath d='M0,0 v30 h60 v-30 z' fill='%23012169'/%3E%3Cpath d='M0,0 L60,30 M60,0 L0,30' stroke='%23fff' stroke-width='6' clip-path='url(%23t)'/%3E%3Cpath d='M0,0 L60,30 M60,0 L0,30' stroke='%23C8102E' stroke-width='4' clip-path='url(%23t)'/%3E%3Cpath d='M30,0 v30 M0,15 h60' stroke='%23fff' stroke-width='10'/%3E%3Cpath d='M30,0 v30 M0,15 h60' stroke='%23C8102E' stroke-width='6'/%3E%3C/svg%3E");
}

.admin-initials-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid #f8f9fa;
    border-radius: 999px;
    color: #f8f9fa;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1;
    text-transform: uppercase;
    text-decoration: none;
    background: transparent;
}

.admin-initials-badge:hover {
    background: #f8f9fa;
    color: #000;
}

.btn-primary {
    background-color: #75031a !important;
    border-color: #75031a !important;
}

.btn-primary:hover {
    background-color: #b22222 !important;
    border-color: #b22222 !important;
}

.btn-danger {
    background-color: #8b0000 !important;
    border-color: #8b0000 !important;
}

.btn-danger:hover {
    background-color: #a52a2a !important;
    border-color: #a52a2a !important;
}

.inline-form {
    display: inline-block;
    margin: 0;
}

.actions-cell {
    white-space: nowrap;
}

.current-logo-preview {
    max-height: 160px;
    width: auto;
}

.container.mt-4:first-of-type {
    margin-top: 2.4rem !important;
}

@media (min-width: 992px) {
    .navbar .navbar-nav {
        padding-top: 0.7rem;
    }
}

.view-toggle-bar {
    display: flex;
    justify-content: flex-end;
}

.assignment-group h2 {
    border-bottom: 1px solid rgba(127, 127, 127, 0.25);
    padding-bottom: 0.35rem;
}

@media (max-width: 767.98px) {
    .brand-with-logo span {
        font-size: 0.95rem;
        padding-top: 0.55rem;
    }

    .brand-with-logo {
        margin-bottom: -0.9rem;
    }

    .club-logo {
        height: 58px;
        transform: translateY(0.3rem);
    }

    .theme-icon-button {
        margin-top: 0.5rem;
    }

    .language-switcher {
        margin-top: 0.5rem;
    }

    .admin-initials-badge {
        margin-top: 0.5rem;
    }

    .actions-cell {
        white-space: normal;
    }

    .actions-cell .btn,
    .actions-cell .inline-form {
        margin-top: 0.25rem;
    }

    .view-toggle-bar {
        justify-content: flex-start;
    }

    .container.mt-4:first-of-type {
        margin-top: 1.35rem !important;
    }
}
