﻿.coach-admin-page {
    --coach-navy: #071a33;
    --coach-navy-soft: #0b2d57;
    --coach-green: #5b8c3b;
    --coach-green-dark: #47702f;
    --coach-bg: #f4f7f3;
    --coach-border: #e1e7df;
    --coach-text: #172135;
    --coach-muted: #6f7b8c;
    min-height: 100vh;
    background: var(--coach-bg);
    color: var(--coach-text);
}

.coach-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
    padding: 30px;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--coach-navy), var(--coach-navy-soft));
    color: #fff;
    box-shadow: 0 14px 34px rgba(7, 26, 51, .18);
}

    .coach-page-header h1 {
        margin: 0 0 8px;
        font-size: clamp(1.7rem, 3vw, 2.35rem);
        font-weight: 900;
    }

    .coach-page-header p {
        margin: 0;
        color: #d6e2ef;
        line-height: 1.8;
    }

.coach-page-eyebrow {
    display: block;
    margin-bottom: 7px;
    color: #bdd0e7;
    font-size: .78rem;
    font-weight: 800;
}

.coach-page-header .btn {
    min-width: 135px;
    border-radius: 11px;
    font-weight: 800;
}

.coach-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.coach-stat-card {
    padding: 20px;
    border: 1px solid var(--coach-border);
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 8px 23px rgba(15, 23, 42, .05);
}

    .coach-stat-card span {
        display: block;
        color: #7e8998;
        font-size: .76rem;
        font-weight: 800;
    }

    .coach-stat-card strong {
        display: block;
        margin: 6px 0 3px;
        color: var(--coach-navy);
        font-size: 1.85rem;
        font-weight: 900;
    }

    .coach-stat-card small {
        color: #8b95a2;
        font-size: .7rem;
    }

.coach-filter-card, .coach-list-card, .coach-form-card {
    margin-bottom: 20px;
    padding: 22px;
    border: 1px solid var(--coach-border);
    border-radius: 19px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(15, 23, 42, .045);
}

    .coach-filter-card .form-label, .coach-form-card .form-label {
        color: #465368;
        font-size: .76rem;
        font-weight: 800;
    }

    .coach-filter-card .form-control, .coach-filter-card .form-select,
    .coach-form-card .form-control, .coach-form-card .form-select {
        min-height: 43px;
        border-color: #dfe5dc;
        border-radius: 10px;
        box-shadow: none;
    }

    .coach-form-card textarea.form-control {
        min-height: auto;
    }

    .coach-filter-card .form-control:focus, .coach-filter-card .form-select:focus,
    .coach-form-card .form-control:focus, .coach-form-card .form-select:focus {
        border-color: #87ad70;
        box-shadow: 0 0 0 .2rem rgba(91, 140, 59, .12);
    }

    .form-text, .coach-form-card small {
        color: #7c8796;
        font-size: .7rem;
    }

.coach-list-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 15px;
}

    .coach-list-heading h2 {
        margin: 0;
        font-size: 1.05rem;
        font-weight: 900;
    }

    .coach-list-heading p, .coach-list-heading span {
        margin: 4px 0 0;
        color: #7d8796;
        font-size: .74rem;
    }

.coach-list-table {
    min-width: 1120px;
    margin: 0;
}

    .coach-list-table thead th {
        padding: 13px 12px;
        border: 0;
        background: #f4f7f3;
        color: #596577;
        font-size: .72rem;
        font-weight: 900;
        white-space: nowrap;
    }

    .coach-list-table tbody td {
        padding: 14px 12px;
        border-color: #edf0ec;
        vertical-align: middle;
    }

    .coach-list-table tbody tr:hover {
        background: #fbfdf9;
    }

    .coach-list-table .is-inactive-row {
        opacity: .72;
        background: #fafafa;
    }

.coach-identity-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 270px;
}

.coach-avatar {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    overflow: hidden;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #eef5ea;
    box-shadow: 0 0 0 1px #d9e4d3, 0 7px 17px rgba(15, 23, 42, .1);
}

    .coach-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.coach-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--coach-green-dark);
    font-size: 1.25rem;
    font-weight: 900;
    background: linear-gradient(135deg, #eef5ea, #dce9d5);
}

.coach-identity-cell strong {
    display: block;
    color: #1f2b3d;
    font-size: .88rem;
    font-weight: 900;
}

.coach-identity-cell small {
    display: block;
    margin-top: 2px;
    color: #7b8796;
    font-size: .69rem;
}

.coach-mini-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
}

    .coach-mini-tags span {
        padding: 3px 7px;
        border-radius: 999px;
        background: #f0f3f6;
        color: #687586;
        font-size: .62rem;
        font-weight: 700;
    }

.coach-club-role-cell {
    min-width: 200px;
}

.coach-club-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.coach-club-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    overflow: hidden;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #f5f7f4;
    box-shadow: 0 0 0 1px #dfe5dc;
}

    .coach-club-logo img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        padding: 3px;
    }

.coach-club-role-cell strong {
    font-size: .78rem;
    font-weight: 900;
}

.coach-club-role-cell small {
    display: block;
    margin-top: 5px;
    color: #778294;
    font-size: .68rem;
}

.coach-license-cell {
    min-width: 190px;
}

    .coach-license-cell strong, .coach-license-cell small {
        display: block;
    }

    .coach-license-cell strong {
        color: #354256;
        font-size: .76rem;
        font-weight: 900;
    }

    .coach-license-cell small {
        margin: 4px 0 6px;
        color: #7b8795;
        font-size: .66rem;
    }

.coach-status-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    min-width: 130px;
}

.coach-status-badge, .flag-positive, .flag-warning, .flag-muted, .flag-available, .flag-danger {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: .63rem;
    font-weight: 900;
}

.status-active, .flag-positive {
    background: #e3f5e6;
    color: #26713b;
}

.status-paused, .flag-warning {
    background: #fff1d8;
    color: #916000;
}

.status-retired, .status-neutral, .flag-muted {
    background: #edf0f3;
    color: #687485;
}

.status-suspended, .flag-danger {
    background: #fee4e4;
    color: #b92d2d;
}

.flag-available {
    background: #e7efff;
    color: #285ba1;
}

.coach-counts {
    display: grid;
    gap: 5px;
    min-width: 100px;
}

    .coach-counts span {
        color: #778294;
        font-size: .68rem;
    }

    .coach-counts strong {
        color: #324054;
    }

.coach-row-actions {
    display: flex;
    justify-content: center;
    gap: 7px;
    min-width: 135px;
}

    .coach-row-actions form {
        margin: 0;
    }

    .coach-row-actions .btn {
        border-radius: 8px;
        font-size: .68rem;
        font-weight: 800;
    }

.coach-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

    .coach-pagination span {
        color: #667286;
        font-size: .76rem;
        font-weight: 800;
    }

    .coach-pagination .btn {
        min-width: 90px;
        border-radius: 9px;
        font-weight: 800;
    }

.coach-empty-state {
    padding: 50px 20px;
    text-align: center;
}

    .coach-empty-state > div {
        font-size: 2.4rem;
    }

    .coach-empty-state h3 {
        margin: 10px 0 6px;
        font-size: 1.05rem;
        font-weight: 900;
    }

    .coach-empty-state p {
        color: #7d8795;
        font-size: .8rem;
    }

.coach-section-heading {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #edf0ec;
}

    .coach-section-heading.with-action {
        justify-content: space-between;
    }

.coach-section-number {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: #eef5ea;
    color: var(--coach-green-dark);
    font-size: 1rem;
    font-weight: 900;
}

.coach-section-heading h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 900;
}

.coach-section-heading p {
    margin: 4px 0 0;
    color: #7d8796;
    font-size: .74rem;
}

.coach-switch-box {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 43px;
    padding: 10px 12px;
    border: 1px solid #dfe5dc;
    border-radius: 10px;
    background: #fafcf9;
}

    .coach-switch-box .form-check-input {
        margin: 0;
    }

    .coach-switch-box .form-check-label {
        margin: 0;
        color: #465368;
        font-size: .76rem;
        font-weight: 800;
    }

.coach-media-box {
    height: 100%;
    padding: 15px;
    border: 1px solid #e4e9e2;
    border-radius: 14px;
    background: #fafcf9;
}

.coach-media-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 165px;
    overflow: hidden;
    margin-bottom: 13px;
    border-radius: 12px;
    background: linear-gradient(135deg, #eef5ea, #f9fbf8);
    color: #759064;
    font-size: 2rem;
}

    .coach-media-preview.is-profile {
        width: 165px;
        margin-right: auto;
        margin-left: auto;
        border-radius: 50%;
    }

    .coach-media-preview.is-banner {
        height: 130px;
    }

    .coach-media-preview.is-video {
        flex-direction: column;
        gap: 8px;
    }

    .coach-media-preview img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .coach-media-preview.is-banner img {
        object-fit: cover;
    }

    .coach-media-preview.is-video small {
        max-width: 100%;
        overflow: hidden;
        padding: 0 8px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.coach-child-empty {
    padding: 28px;
    border: 1px dashed #cad5c4;
    border-radius: 13px;
    background: #fafcf9;
    color: #7b8795;
    font-size: .78rem;
    text-align: center;
}

.coach-child-table {
    min-width: 900px;
}

    .coach-child-table th {
        border: 0;
        background: #f4f7f3;
        color: #5f6b7b;
        font-size: .7rem;
        font-weight: 900;
    }

    .coach-child-table td {
        color: #445165;
        font-size: .72rem;
        vertical-align: middle;
    }

.coach-child-actions {
    display: flex;
    gap: 6px;
    white-space: nowrap;
}

.coach-inline-editor {
    margin-top: 18px;
    padding: 20px;
    border: 1px solid #ccdbc4;
    border-radius: 15px;
    background: #f8fbf6;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.7);
}

.inline-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 17px;
}

    .inline-editor-header h3 {
        margin: 0;
        color: #2f4923;
        font-size: .95rem;
        font-weight: 900;
    }

.inline-editor-actions {
    display: flex;
    gap: 9px;
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px solid #dfe8da;
}

    .inline-editor-actions .btn {
        border-radius: 9px;
        font-weight: 800;
    }

.coach-form-actions {
    position: sticky;
    bottom: 15px;
    z-index: 20;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
    padding: 15px;
    border: 1px solid #dce4d8;
    border-radius: 15px;
    background: rgba(255,255,255,.95);
    box-shadow: 0 12px 30px rgba(15,23,42,.12);
    backdrop-filter: blur(10px);
}

    .coach-form-actions .btn {
        min-width: 170px;
        border-radius: 11px;
        font-weight: 900;
    }

@media (max-width: 1100px) {
    .coach-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .coach-page-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 23px 18px;
        border-radius: 18px;
    }

        .coach-page-header > div:last-child {
            width: 100%;
        }

        .coach-page-header .btn {
            flex: 1;
            min-width: 0;
        }

    .coach-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .coach-stat-card {
        padding: 15px;
    }

    .coach-filter-card, .coach-list-card, .coach-form-card {
        padding: 17px;
        border-radius: 15px;
    }

    .coach-section-heading.with-action {
        align-items: flex-start;
        flex-direction: column;
    }

        .coach-section-heading.with-action > .btn {
            width: 100%;
        }

    .coach-form-actions {
        position: static;
        display: grid;
        grid-template-columns: 1fr;
    }

        .coach-form-actions .btn {
            width: 100%;
            min-width: 0;
        }
}

@media (max-width: 480px) {
    .coach-stats-grid {
        grid-template-columns: 1fr;
    }

    .coach-row-actions {
        flex-direction: column;
    }

    .inline-editor-actions {
        flex-direction: column;
    }

        .inline-editor-actions .btn {
            width: 100%;
        }
}
