﻿/* =========================================================
   LOADING STYLES
   ========================================================= */

body.ajax-loading,
body.ajax-loading * {
    cursor: progress !important;
}

.ajax-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(1px);
}

    .ajax-overlay.active {
        display: flex;
    }

.ajax-loader {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: #ffffff;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: #333;
}

.ajax-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #d9d9d9;
    border-top-color: #0d6efd;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================================
   ENTITY LIST VIEW + _TableHeader PARTIAL
   Shared entity-page layout
   ========================================================= */

.container.entity-page-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    border: 1px solid #d6dee8;
    border-radius: 12px;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 250px);
    overflow: hidden;
    gap: 0;
}

.entity-page-container {
    --entity-border-color: #d6dee8;
}

    .entity-page-container .btn:focus,
    .entity-page-container .btn:active:focus,
    .entity-page-container .btn-link.nav-link:focus,
    .entity-page-container .form-check-input:focus {
        box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
    }

    .entity-page-container .table-hover tbody tr:hover {
        background-color: #f5f5f5;
    }

    .entity-page-container .table th,
    .entity-page-container .table td {
        vertical-align: middle;
    }

    .entity-page-container .sortable {
        cursor: pointer;
    }

    .entity-page-container .form-control::placeholder {
        font-size: 0.8em;
        color: grey;
        font-style: italic;
    }

    .entity-page-container button:disabled img {
        opacity: 0.4;
        filter: grayscale(100%);
        cursor: default;
    }

    .entity-page-container .edit-panel {
        overflow: hidden;
        transition: max-height 0.4s ease;
        max-height: 0;
    }

        .entity-page-container .edit-panel.open {
            max-height: 1000px;
        }

    .entity-page-container table {
        width: 100%;
        table-layout: fixed;
    }

    .entity-page-container th,
    .entity-page-container td {
        box-sizing: border-box;
    }

        .entity-page-container th input[type="text"] {
            width: 50px;
            max-width: 100%;
        }

    .entity-page-container th {
        white-space: nowrap;
    }

    .entity-page-container table.table-bordered th,
    .entity-page-container table.table-bordered td {
        border-right: 1px solid var(--entity-border-color);
    }

        .entity-page-container table.table-bordered th:last-child,
        .entity-page-container table.table-bordered td:last-child {
            border-right: none;
        }

    .entity-page-container .table-page-header {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-right: 10px;
        padding-bottom: 10px;
        color: #004085;
        background: #fff;
    }

    .entity-page-container .table-columns-header {
        flex: 0 0 auto;
        background: #fff;
        padding-right: var(--scrollbar-width, 0px);
        border-bottom: 1px solid var(--entity-border-color);
    }

    .entity-page-container .table-data-scroll {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        background: #fff;
    }

    .entity-page-container .fixed-header-table,
    .entity-page-container .fixed-body-table {
        width: 100%;
        margin-bottom: 0;
        table-layout: fixed;
        border-collapse: collapse;
        --bs-table-border-color: var(--entity-border-color);
        border-color: var(--entity-border-color) !important;
    }

        .entity-page-container .fixed-header-table th,
        .entity-page-container .fixed-body-table td {
            box-sizing: border-box;
            padding: 0.5rem;
        }

            .entity-page-container .fixed-header-table th:first-child,
            .entity-page-container .fixed-body-table td:first-child {
                width: 80px !important;
                min-width: 80px !important;
                max-width: 80px !important;
            }

        .entity-page-container .fixed-header-table th {
            background: #fff;
            color: #004085;
            white-space: nowrap;
        }

        .entity-page-container .fixed-header-table.table-bordered,
        .entity-page-container .fixed-body-table.table-bordered,
        .entity-page-container .fixed-header-table.table-bordered > :not(caption) > *,
        .entity-page-container .fixed-body-table.table-bordered > :not(caption) > *,
        .entity-page-container .fixed-header-table.table-bordered > :not(caption) > * > *,
        .entity-page-container .fixed-body-table.table-bordered > :not(caption) > * > * {
            border-color: var(--entity-border-color) !important;
        }

    .entity-page-container .fixed-header-table {
        border-bottom: 0 !important;
    }

        .entity-page-container .fixed-header-table thead,
        .entity-page-container .fixed-header-table thead tr,
        .entity-page-container .fixed-header-table thead th {
            border-bottom: 0 !important;
        }

    .entity-page-container .fixed-body-table {
        border-top: 0 !important;
    }

        .entity-page-container .fixed-body-table tbody tr:first-child,
        .entity-page-container .fixed-body-table tbody tr:first-child td {
            border-top: 0 !important;
        }

        .entity-page-container .fixed-header-table .col-id,
        .entity-page-container .fixed-body-table .col-id {
            width: 80px;
            min-width: 80px;
            max-width: 80px;
        }

        .entity-page-container .fixed-header-table .col-main,
        .entity-page-container .fixed-body-table .col-main {
            width: auto;
        }



        /* =========================================================
   GLOBAL EDIT FORM STYLE
   Shared input / dropdown / file styling for entity pages
   ========================================================= */

.entity-page-container .edit-panel select.form-control,
.entity-page-container .edit-panel input.form-control,
.entity-page-container .edit-panel input[type="file"] {
    height: 40px;
    border: 1px solid #cfd9e5;
    border-radius: 10px;
    background-color: #ffffff;
    color: #243447;
    font-size: 0.92rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    box-sizing: border-box;
}

.entity-page-container .edit-panel select.form-control,
.entity-page-container .edit-panel input.form-control {
    padding: 0 12px;
}

.entity-page-container .edit-panel input[type="file"] {
    padding: 6px 10px;
}

.entity-page-container .edit-panel select.form-control:hover,
.entity-page-container .edit-panel input.form-control:hover,
.entity-page-container .edit-panel input[type="file"]:hover {
    border-color: #b8cbe0;
    background-color: #fcfdff;
}

.entity-page-container .edit-panel select.form-control:focus,
.entity-page-container .edit-panel input.form-control:focus,
.entity-page-container .edit-panel input[type="file"]:focus {
    border-color: #7fb3e6;
    box-shadow: 0 0 0 3px rgba(15, 61, 117, 0.12);
    outline: none;
}

.entity-page-container .edit-panel select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 38px;
    background-image:
        linear-gradient(45deg, transparent 50%, #5b6b7f 50%),
        linear-gradient(135deg, #5b6b7f 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 3px),
        calc(100% - 12px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    cursor: pointer;
}

.entity-page-container .edit-panel select.form-control:disabled,
.entity-page-container .edit-panel input.form-control:disabled,
.entity-page-container .edit-panel input[type="file"]:disabled {
    background-color: #f8fafc;
    color: #64748b;
    border-color: #d7e0ea;
    cursor: default;
    opacity: 1;
    box-shadow: none;
}

.entity-page-container .edit-panel label {
    color: #004085;
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.4;
}

.entity-page-container .edit-panel {
    background: #ffffff;
    border-radius: 12px;
}

.entity-page-container .edit-panel .error-icon {
    font-size: 0.82rem;
    font-weight: 500;
}

    /* =========================================================
   GENERIC SIMPLE ENTITY EDIT ROW
   Used by Category / Championship / City / Role / etc.
   ========================================================= */

    .entity-page-container .simple-edit-panel {
        display: flex !important;
        align-items: center;
        gap: 10px;
        position: relative;
        width: 100%;
        min-width: 0;
    }

    .entity-page-container .simple-edit-field {
        width: 600px !important;
        min-width: 600px !important;
        max-width: 600px !important;
        flex: 0 0 600px !important;
    }

    .entity-page-container .simple-edit-actions {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        flex: 0 0 auto;
        margin-left: 8px;
    }

        .entity-page-container .simple-edit-actions .transparent-button {
            margin: 0 !important;
            flex: 0 0 auto;
        }

    .entity-page-container .simple-edit-panel .error-icon {
        flex: 0 0 auto;
        margin-left: 0;
    }
/* =========================================================
   HOME DASHBOARD
   ========================================================= */

.home-dashboard {
    max-width: 1280px;
    margin: 24px auto 32px;
    padding: 0 16px;
    box-sizing: border-box;
}

.home-banner {
    color: #0f3d75;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid #d9e3ee;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.dashboard-grid {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}

.dashboard-grid--top {
    grid-template-columns: 1fr;
    min-height: 136px;
    padding: 8px;
    border: 2px dashed transparent;
    border-radius: 18px;
    transition: background-color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

    .dashboard-grid--top.dashboard-drop-target {
        border-color: #7fb3e6;
        background: linear-gradient(180deg, rgba(127, 179, 230, 0.10) 0%, rgba(127, 179, 230, 0.05) 100%);
        box-shadow: inset 0 0 0 1px rgba(127, 179, 230, 0.12);
    }

.dashboard-grid--bottom {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
}

.dashboard-card {
    min-width: 0;
    position: relative;
    background: #ffffff;
    border: 1px solid #d9e3ee;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    will-change: transform;
    backface-visibility: hidden;
    transform-origin: center top;
    transition: box-shadow 0.24s ease, transform 0.24s ease, border-color 0.24s ease, background-color 0.24s ease;
}

    .dashboard-card:hover {
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
    }

.dashboard-card--featured {
    border-color: #bfd7ef;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.10);
}

    .dashboard-card--featured::before {
        content: "";
        position: absolute;
        inset: 0 0 auto 0;
        height: 4px;
        background: linear-gradient(90deg, #0f3d75 0%, #4a86c5 100%);
    }

.dashboard-card__title {
    margin: 0 0 14px 0;
    color: #0f3d75;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    user-select: none;
    cursor: grab;
    touch-action: none;
}

    .dashboard-card__title:active {
        cursor: grabbing;
    }

.dashboard-card__title-text {
    min-width: 0;
    flex: 1 1 auto;
}

.dashboard-card__drag-indicator {
    flex: 0 0 auto;
    color: #8aa4bf;
    font-size: 1rem;
    line-height: 1;
    letter-spacing: 1px;
    opacity: 0.95;
    transition: color 0.2s ease, transform 0.2s ease;
}

.dashboard-card:hover .dashboard-card__drag-indicator {
    color: #4a86c5;
    transform: translateY(-1px);
}

.dashboard-card__content {
    overflow: hidden;
}

.dashboard-card .table {
    margin-bottom: 0;
}

    .dashboard-card .table th,
    .dashboard-card .table td {
        border-color: #d9e3ee !important;
        vertical-align: middle;
    }

    .dashboard-card .table thead th {
        background: #f7faff;
        color: #0f3d75;
        font-size: 0.82rem;
        font-weight: 700;
        letter-spacing: 0.02em;
        white-space: nowrap;
    }

    .dashboard-card .table tbody tr:hover {
        background: #f8fbff;
    }

.dashboard-card .container {
    max-width: 100%;
    padding: 0;
    margin: 0;
}

.dashboard-card .mt-5 {
    margin-top: 0 !important;
}

/* League cards animate collapse/expand smoothly */
.dashboard-card--league {
    display: grid;
    grid-template-rows: auto 1fr;
    transition: grid-template-rows 0.34s cubic-bezier(0.22, 1, 0.36, 1), padding 0.24s ease, box-shadow 0.24s ease, transform 0.24s ease, border-color 0.24s ease, background-color 0.24s ease;
}

    .dashboard-card--league .dashboard-card__content {
        min-height: 0;
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.20s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .dashboard-card--league.dashboard-card--collapsed {
        grid-template-rows: auto 0fr;
        padding-top: 14px;
        padding-bottom: 14px;
        min-height: 72px;
    }

        .dashboard-card--league.dashboard-card--collapsed .dashboard-card__title {
            margin-bottom: 0;
            width: 100%;
        }

        .dashboard-card--league.dashboard-card--collapsed .dashboard-card__content {
            opacity: 0;
            transform: translateY(-8px);
            pointer-events: none;
        }

        .dashboard-card--league.dashboard-card--collapsed:hover {
            box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
        }

/* Punishment cards always expanded */
.dashboard-card--punishment .dashboard-card__content {
    display: block;
}

/* Hover target while dragging top card over bottom cards */
.dashboard-card--hover-target {
    border-color: #7fb3e6 !important;
    box-shadow: 0 0 0 3px rgba(127, 179, 230, 0.18);
}

/* Active dragged source card */
.dashboard-card--drag-active {
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16);
}

/* FLIP/layout animation helper state */
.dashboard-card--layout-animating {
    z-index: 5;
}

/* Drag and drop visuals */
.sortable-ghost {
    opacity: 1 !important;
    background: linear-gradient(180deg, #fbfdff 0%, #f4f9ff 100%);
    border: 1px dashed #7fb3e6 !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
}

.sortable-drag {
    opacity: 1 !important;
}

.sortable-chosen,
.dashboard-card.sortable-chosen {
    opacity: 1 !important;
    transform: scale(1.015);
    border-color: #7fb3e6 !important;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
}

.sortable-fallback {
    opacity: 1 !important;
    transform: scale(1.015);
    border: 1px solid #7fb3e6 !important;
    background: #ffffff !important;
    border-radius: 14px;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.20);
    cursor: grabbing !important;
    z-index: 1200 !important;
}

body.dashboard-dragging,
body.dashboard-dragging * {
    cursor: grabbing !important;
}

body.dashboard-dragging {
    user-select: none;
}

.dashboard-grid--top .dashboard-card,
.dashboard-grid--bottom .dashboard-card {
    align-self: start;
}

/* League table inside dashboard */
.league-table-wrap {
    overflow-x: auto;
}

.league-table {
    width: 100%;
    min-width: 760px;
    table-layout: fixed;
    border-color: #d9e3ee !important;
}

    .league-table th,
    .league-table td {
        padding: 0.7rem 0.5rem;
        text-align: center;
    }

        .league-table th.sortable {
            cursor: pointer;
            transition: background-color 0.2s ease;
        }

            .league-table th.sortable:hover {
                background: #edf4fc;
            }

    .league-table tbody td {
        color: #334155;
    }

    .league-table .league-team-name {
        text-align: left;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-weight: 600;
    }

    .league-table .logo-cell {
        text-align: center;
    }

        .league-table .logo-cell img {
            width: 36px;
            height: 36px;
            object-fit: contain;
            display: inline-block;
        }

.league-logo-placeholder {
    display: inline-block;
    width: 36px;
    text-align: center;
    color: #94a3b8;
    font-weight: 600;
}

.league-table .pts-column {
    background-color: #eef6ff;
    color: #0f3d75;
    font-weight: 700;
}

.league-table__empty {
    text-align: center !important;
    color: #64748b !important;
    padding: 1rem !important;
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-card,
    .dashboard-card--league,
    .dashboard-card--league .dashboard-card__content,
    .dashboard-grid--top,
    .dashboard-card__drag-indicator {
        transition: none !important;
    }
}
/* =========================================================
   BASE / GLOBAL
   ========================================================= */

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

body {
    margin: 0;
    padding: 0 0 70px 0;
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
}

header {
    background-color: white;
    color: #004080;
    padding: 10px 20px;
    border-bottom: 2px solid #004080;
    overflow: visible;
}

.header-content {
    display: flex;
    align-items: center;
    overflow: visible;
}

    .header-content img {
        height: 60px;
        margin-right: 20px;
    }

    .header-content h1 {
        margin: 0;
        font-size: 1.5em;
    }

.navbar {
    background-color: white;
    border-bottom: 2px solid #004080;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 10px 20px;
}

/* =========================================================
   HEADER MENU / ANIMATED DROPDOWN
   ========================================================= */
header nav.header-content {
    position: relative;
    z-index: 1000;
    overflow: visible;
}

    header nav.header-content .navbar-nav {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        margin: 0;
        padding: 0;
        list-style: none;
        overflow: visible;
    }

    header nav.header-content .nav-item {
        position: relative;
        display: inline-flex;
        align-items: center;
        margin: 0;
        flex: 0 0 auto;
        overflow: visible;
    }

.nav-linkM,
.nav-group-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    margin-right: 0;
    border: none;
    background: transparent;
    color: #1e3a8a;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.98rem;
    line-height: 1;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.nav-group-toggle {
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
    font-size: inherit;
    line-height: 1;
    font-weight: 700;
}

    .nav-linkM:hover,
    .nav-linkM:focus,
    .nav-group-toggle:hover,
    .nav-group-toggle:focus,
    .nav-item.dropdown:hover > .nav-group-toggle,
    .nav-item.dropdown:focus-within > .nav-group-toggle {
        color: #007bff;
        background-color: #B3E5FC;
        text-decoration: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.10);
        transform: translateY(-1px);
    }

/* Invisible bridge so the menu does not disappear while moving down */
.nav-item.dropdown::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 18px;
    background: transparent;
}

.nav-item.dropdown > .dropdown-menu {
    display: block !important;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 240px;
    margin: 0;
    padding: 10px 0;
    background: linear-gradient(180deg, #0a4d96 0%, #004080 100%);
    border: none;
    border-radius: 12px;
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.20);
    z-index: 2000;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform-origin: top center;
    transform: scaleY(0.08) translateY(-4px);
    transition: transform 0.24s ease, opacity 0.18s ease, visibility 0.18s ease;
}

.nav-item.dropdown:hover > .dropdown-menu,
.nav-item.dropdown:focus-within > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: scaleY(1) translateY(0);
}

.nav-item.dropdown .dropdown-item {
    display: block;
    position: relative;
    padding: 12px 18px;
    color: #ffffff;
    background: transparent;
    text-decoration: none;
    font-weight: 400;
    letter-spacing: 0.01em;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease, background-color 0.20s ease, padding-left 0.20s ease;
}

.nav-item.dropdown:hover .dropdown-item,
.nav-item.dropdown:focus-within .dropdown-item {
    opacity: 1;
    transform: translateY(0);
}

.nav-item.dropdown .dropdown-item:hover,
.nav-item.dropdown .dropdown-item:focus {
    background-color: #1e5aa8;
    color: #ffffff;
    padding-left: 24px;
}

/* =========================================================
   PUNISHMENT EDIT FORM - SAME APPROACH AS TEAM / PLAYER
   ========================================================= */

.punishment-page-container .edit-panel {
    display: block !important;
    width: 100%;
    overflow: hidden;
    transition: max-height 0.4s ease;
    max-height: 0;
    background: #ffffff;
    border-radius: 12px;
}

    .punishment-page-container .edit-panel.open {
        max-height: 1000px;
    }

.punishment-page-container .punishment-edit-layout {
    display: flex;
    flex-direction: column;
    padding: 10px;
}

.punishment-page-container .punishment-edit-row {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    margin-bottom: 6px;
    width: 100%;
}

.punishment-page-container .punishment-edit-label {
    width: 120px !important;
    min-width: 120px !important;
    max-width: 120px !important;
    margin-right: 8px !important;
    margin-bottom: 0 !important;
    flex: 0 0 120px;
    white-space: nowrap;
    color: #004085;
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.4;
}

.punishment-page-container .punishment-edit-field {
    width: 300px !important;
    min-width: 300px !important;
    max-width: 300px !important;
    flex: 0 0 300px !important;
}

.punishment-page-container .edit-panel input.punishment-edit-field,
.punishment-page-container .edit-panel select.punishment-edit-field {
    width: 300px !important;
    min-width: 300px !important;
    max-width: 300px !important;
    flex: 0 0 300px !important;
    height: 40px;
    box-sizing: border-box;
}

.punishment-page-container .punishment-edit-row .error-icon {
    flex: 0 0 auto;
    margin-left: 5px;
    font-size: 0.82rem;
    font-weight: 500;
}

.punishment-page-container .punishment-edit-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
    flex: 0 0 auto;
}

    .punishment-page-container .punishment-edit-actions .transparent-button {
        margin: 0 !important;
        flex: 0 0 auto;
    } 
/* =========================================================
   SHARED UTILITIES / COMMON COMPONENTS
   ========================================================= */

.icon-button {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    font-size: 1.5rem;
}

    .icon-button:focus {
        outline: none;
    }

.table-container {
    display: flex;
    align-items: center;
}

th.sticky-actions,
td.sticky-actions {
    position: sticky;
    right: 0;
    background-color: transparent;
    z-index: 9;
    white-space: nowrap;
}

th.sticky-actions {
    font-size: 0;
    background-color: transparent !important;
    border: none !important;
}

    th.sticky-actions::before {
        content: none;
    }

.custom-header {
    color: #004085 !important;
}

.text-wrap {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    color: #004085;
}

.button-group {
    display: none;
}

.clickable-row:hover .button-group {
    display: inline-block;
}

.clickable-row {
    cursor: pointer;
}

.card-no-cell,
.player-no-cell {
    width: 80px;
    font-weight: 600;
}

.player-name-cell {
    width: 250px;
}

.card-no-text,
.player-no-text {
    font-weight: normal;
}

.collapsible-content {
    transition: max-height 0.3s ease;
    overflow: hidden;
}

.expired-row {
    background-color: #ffe6e6 !important;
    color: #a00;
}

/* Logout Button */
.btn-outline-koxsys {
    color: #004085;
    border-color: #004085;
}

    .btn-outline-koxsys:hover,
    .btn-outline-koxsys:focus,
    .btn-outline-koxsys:active,
    .btn-outline-koxsys.active,
    .show > .btn-outline-koxsys.dropdown-toggle {
        color: #fff;
        background-color: #004085;
        border-color: #004085;
    }

.row-menu-link {
    width: 28px;
    min-width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 1px solid #d6dee8;
    border-radius: 6px;
    background: #fff;
    color: #4b5563;
    font-size: 18px;
    line-height: 1;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

    .row-menu-link:hover {
        background: #f8fbff;
        border-color: #b8cbe0;
        color: #0f3d75;
        box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    }

    .row-menu-link:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.2);
    }

.edit-panel {
    width: 100%;
    box-sizing: border-box;
}

.table-scroll-area table {
    margin-bottom: 0;
    width: 100%;
}

.fixed-header-table .col-id,
.fixed-body-table .col-id {
    width: 80px;
    min-width: 80px;
    max-width: 80px;
}

.fixed-header-table .col-main,
.fixed-body-table .col-main {
    width: auto;
}

.entity-page-container .edit-row td {
    white-space: nowrap;
}

.entity-page-container .edit-panel {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    max-height: 0;
}

    .entity-page-container .edit-panel.open {
        max-height: 1000px;
    }

.defaultvalue-edit-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.defaultvalue-edit-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.defaultvalue-edit-label {
    min-width: 100px;
    margin: 0;
}

.defaultvalue-edit-field {
    width: 300px;
    max-width: 100%;
}

.defaultvalue-edit-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-left: 110px;
}
    /*

    .entity-page-container .edit-panel input.form-control {
        flex: 1 1 auto;
        min-width: 0;
        max-width: 600px;
    }

    .entity-page-container .edit-panel .error-icon,
    .entity-page-container .edit-panel .transparent-button {
        flex: 0 0 auto;
    }*/




/* =========================================================
   GLOBAL TRANSPARENT ICON BUTTONS
   ========================================================= */

button.transparent-button,
a.transparent-button,
input.transparent-button {
    -webkit-appearance: none !important;
    appearance: none !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 5px !important;
    min-width: 0 !important;
    width: auto !important;
    height: auto !important;
    line-height: 1 !important;
    vertical-align: middle !important;
    cursor: pointer;
}

    button.transparent-button:hover,
    button.transparent-button:focus,
    button.transparent-button:focus-visible,
    button.transparent-button:active,
    button.transparent-button:disabled,
    a.transparent-button:hover,
    a.transparent-button:focus,
    a.transparent-button:active,
    input.transparent-button:hover,
    input.transparent-button:focus,
    input.transparent-button:active {
        background: transparent !important;
        background-color: transparent !important;
        background-image: none !important;
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
    }

    button.transparent-button::-moz-focus-inner {
        border: 0 !important;
        padding: 0 !important;
    }

    button.transparent-button img,
    a.transparent-button img,
    input.transparent-button img {
        display: block;
        width: 16px;
        height: 16px;
        background: transparent !important;
        background-color: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    button.transparent-button:disabled img {
        opacity: 0.4;
        filter: grayscale(100%);
        cursor: default;
    }

.table-page-header button.transparent-button,
.edit-panel button.transparent-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

footer {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
    border-top: 1px solid #d9e3ee;
    box-shadow: 0 -4px 14px rgba(15, 23, 42, 0.08);
    z-index: 1000;
}

    footer > div {
        max-width: 1280px;
        margin: 0 auto;
        padding: 12px 20px;
        text-align: center;
        color: #5b6b7f;
        font-size: 0.9rem;
        font-weight: 500;
        line-height: 1.4;
        letter-spacing: 0.2px;
    }

        footer > div::before {
            content: "";
            display: block;
            width: 56px;
            height: 3px;
            margin: 0 auto 8px auto;
            border-radius: 999px;
            background: linear-gradient(90deg, #0f3d75 0%, #4a86c5 100%);
            opacity: 0.9;
        }
/* =========================================================
   USER PAGE
   ========================================================= */

.user-page-container .table-columns-header {
    overflow-x: hidden;
    overflow-y: hidden;
}

.user-page-container .table-data-scroll {
    overflow-y: auto;
    overflow-x: auto;
}

.user-page-container .user-fixed-header-table,
.user-page-container .user-fixed-body-table {
    width: 100%;
    min-width: 900px;
    table-layout: fixed;
    margin-bottom: 0;
}

    .user-page-container .user-fixed-header-table th,
    .user-page-container .user-fixed-body-table td {
        box-sizing: border-box;
        padding: 0.5rem;
    }

        .user-page-container .user-fixed-header-table th:nth-child(1),
        .user-page-container .user-fixed-body-table td:nth-child(1) {
            width: 220px !important;
            min-width: 220px !important;
            max-width: 220px !important;
        }

        .user-page-container .user-fixed-header-table th:nth-child(2),
        .user-page-container .user-fixed-body-table td:nth-child(2) {
            width: 160px !important;
            min-width: 160px !important;
            max-width: 160px !important;
        }

        .user-page-container .user-fixed-header-table th:nth-child(4),
        .user-page-container .user-fixed-body-table td:nth-child(4) {
            width: 220px !important;
            min-width: 220px !important;
            max-width: 220px !important;
        }

        .user-page-container .user-fixed-body-table td:nth-child(1),
        .user-page-container .user-fixed-body-table td:nth-child(3),
        .user-page-container .user-fixed-body-table td:nth-child(4) {
            white-space: normal;
            word-break: break-word;
            overflow-wrap: break-word;
        }

    .user-page-container .user-fixed-body-table .edit-row td {
        white-space: normal;
    }

.user-page-container .edit-panel {
    display: block !important;
}

.user-page-container .user-edit-layout {
    display: flex;
    flex-direction: column;
    padding: 10px;
}

.user-page-container .user-edit-row {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    margin-bottom: 6px;
    width: 100%;
}

.user-page-container .user-edit-label {
    width: 120px !important;
    min-width: 120px !important;
    max-width: 120px !important;
    margin-right: 8px !important;
    margin-bottom: 0 !important;
    flex: 0 0 120px;
    white-space: nowrap;
    color: #004085;
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.4;
}

.user-page-container .user-edit-field {
    width: 300px !important;
    min-width: 300px !important;
    max-width: 300px !important;
    flex: 0 0 300px !important;
}

.user-page-container .edit-panel input.user-edit-field,
.user-page-container .edit-panel select.user-edit-field {
    width: 300px !important;
    min-width: 300px !important;
    max-width: 300px !important;
    flex: 0 0 300px !important;
    height: 40px;
    box-sizing: border-box;
}

.user-page-container .user-edit-row .error-icon {
    flex: 0 0 auto;
    margin-left: 5px;
    font-size: 0.82rem;
    font-weight: 500;
}

.user-page-container .user-edit-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
    flex: 0 0 auto;
    width: auto;
    margin-top: 0;
    justify-content: flex-start;
}

    .user-page-container .user-edit-actions .transparent-button {
        margin: 0 !important;
        flex: 0 0 auto;
    }

/* =========================================================
   LEAGUE TABLE PAGE
   ========================================================= */

.league-table-page .table-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: nowrap;
    width: 100%;
}

    .league-table-page .table-page-header > div {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-left: auto;
        flex-shrink: 0;
    }

.league-table-page .league-table-wrap {
    width: 100%;
}

.league-table-page #LeagueTableEntry-Table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    display: table !important;
    margin-bottom: 0;
}

    .league-table-page #LeagueTableEntry-Table th,
    .league-table-page #LeagueTableEntry-Table td {
        vertical-align: middle;
        box-sizing: border-box;
        white-space: nowrap;
    }

.league-table-page .league-team-name {
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
}

.league-table-page #LeagueTableEntry-Table td,
.league-table-page #LeagueTableEntry-Table th {
    text-align: center;
}

    .league-table-page #LeagueTableEntry-Table td:nth-child(3),
    .league-table-page #LeagueTableEntry-Table th:nth-child(3) {
        text-align: left;
    }


/* =========================================================
   DEFAULT VALUE PAGE
   ========================================================= */

.defaultvalue-page-container .edit-panel {
    display: block !important;
    width: 100%;
    overflow: hidden;
    transition: max-height 0.4s ease;
    max-height: 0;
    background: #ffffff;
    border-radius: 12px;
}

    .defaultvalue-page-container .edit-panel.open {
        max-height: 1000px;
    }

.defaultvalue-page-container .defaultvalue-edit-layout {
    display: flex;
    flex-direction: column;
    padding: 10px;
}

.defaultvalue-page-container .defaultvalue-edit-row {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    margin-bottom: 6px;
    width: 100%;
}

.defaultvalue-page-container .defaultvalue-edit-label {
    width: 130px !important;
    min-width: 130px !important;
    max-width: 130px !important;
    margin-right: 8px !important;
    margin-bottom: 0 !important;
    flex: 0 0 130px;
    white-space: nowrap;
    color: #004085;
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.4;
}

.defaultvalue-page-container .defaultvalue-edit-field {
    width: 300px !important;
    min-width: 300px !important;
    max-width: 300px !important;
    flex: 0 0 300px !important;
}

.defaultvalue-page-container .edit-panel input.defaultvalue-edit-field,
.defaultvalue-page-container .edit-panel select.defaultvalue-edit-field {
    width: 300px !important;
    min-width: 300px !important;
    max-width: 300px !important;
    flex: 0 0 300px !important;
    height: 40px;
    box-sizing: border-box;
}

.defaultvalue-page-container .defaultvalue-edit-row .error-icon {
    flex: 0 0 auto;
    margin-left: 5px;
    font-size: 0.82rem;
    font-weight: 500;
}

.defaultvalue-page-container .defaultvalue-edit-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
    flex: 0 0 auto;
}

    .defaultvalue-page-container .defaultvalue-edit-actions .transparent-button {
        margin: 0 !important;
        flex: 0 0 auto;
    }

.defaultvalue-page-container .edit-row td {
    white-space: normal !important;
}
/* =========================================================
   RESPONSIVE
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 1100px) {
    .dashboard-grid--bottom {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .entity-page-container .table-page-header,
    .league-table-page .table-page-header,
    .dashboard-card .table-page-header {
        flex-wrap: wrap;
        align-items: flex-start;
    }

        .entity-page-container .table-page-header > div,
        .league-table-page .table-page-header > div,
        .dashboard-card .table-page-header > div {
            margin-left: 0;
            width: 100%;
            justify-content: flex-start;
            flex-wrap: wrap;
        }

    header nav.header-content .navbar-nav {
        flex-wrap: wrap;
        gap: 8px;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    body {
        padding-bottom: 64px;
        overflow-x: hidden;
    }

    header,
    .navbar,
    .home-dashboard {
        padding-left: 12px;
        padding-right: 12px;
    }

        header > .header-content {
            flex-direction: column;
            align-items: flex-start;
            gap: 10px;
        }

        header nav.header-content {
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            flex-wrap: nowrap;
            overflow: visible;
        }

            header nav.header-content .navbar-nav {
                display: flex;
                flex-direction: row;
                flex-wrap: nowrap;
                align-items: center;
                gap: 4px;
                margin: 0;
                padding: 0;
                overflow: visible;
                white-space: nowrap;
                flex: 1 1 auto;
                min-width: 0;
            }

            header nav.header-content .nav-item {
                margin: 0;
                flex: 0 0 auto;
            }

            header nav.header-content .nav-linkM,
            header nav.header-content .nav-group-toggle {
                display: inline-flex;
                padding: 8px 10px;
                border-radius: 8px;
                white-space: nowrap;
                font-size: 0.85rem;
            }

            header nav.header-content form {
                flex: 0 0 auto;
            }

    .nav-item.dropdown > .dropdown-menu {
        min-width: 200px;
        top: calc(100% + 8px);
    }
    footer {
        position: fixed;
        left: 0;
        bottom: 0;
        width: 100%;
        margin: 0;
        z-index: 1000;
    }

        footer > div {
            padding: 10px 14px;
            font-size: 0.85rem;
        }



    .container.entity-page-container,
    .user-page-container {
        padding: 12px;
    }

    .container.entity-page-container {
        height: calc(100vh - 240px);
        min-height: 0;
        overflow: hidden;
    }

    .entity-page-container .table-columns-header,
    .entity-page-container .table-data-scroll,
    .user-page-container .table-data-scroll,
    .league-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .entity-page-container .fixed-header-table,
    .entity-page-container .fixed-body-table,
    .user-page-container .user-fixed-header-table,
    .user-page-container .user-fixed-body-table,
    .league-table {
        min-width: 700px;
    }

    .user-page-container .user-fixed-header-table,
    .user-page-container .user-fixed-body-table {
        min-width: 700px;
    }

        .entity-page-container .fixed-header-table th,
        .entity-page-container .fixed-body-table td,
        .user-page-container .user-fixed-header-table th,
        .user-page-container .user-fixed-body-table td,
        .league-table th,
        .league-table td {
            padding: 0.45rem;
            font-size: 0.85rem;
        }

    input,
    select,
    textarea,
    button,
    .btn {
        min-height: 44px;
    }

    .row-menu-link {
        width: 36px;
        min-width: 36px;
        height: 36px;
    }

    .button-group {
        display: inline-block;
    }

    .welcome-message {
        font-size: 1.2rem;
        padding: 14px 18px;
    }

    .dashboard-grid--bottom {
        grid-template-columns: 1fr;
    }

    .dashboard-card {
        padding: 12px;
    }

        .dashboard-card .table-page-header {
            margin: -12px -12px 12px -12px;
            padding: 12px;
        }

    .home-banner {
        padding: 14px 16px;
        font-size: 0.95rem;
    }

    .home-dashboard {
        padding: 0 12px;
    }
}

.page-container .table-auto {
    width: 100%;
    table-layout: auto;
}

    .page-container .table-auto th,
    .page-container .table-auto td {
        vertical-align: middle;
        white-space: nowrap;
    }


.user-page-container .user-fixed-body-table {
    table-layout: fixed !important;
}

    .user-page-container .user-fixed-body-table .edit-row > td {
        white-space: normal !important;
    }

.user-page-container .user-edit-layout,
.user-page-container .user-edit-row {
    min-width: 0;
}

