:root {
    --primary: #3DED75;
    --primary-hover: #31D968;

    --accent: #238A48;
    --accent-hover: #1B6F3A;

    --secondary: #DDFBE7;

    --sidebar: #17452A;

    /* Brand palette centered on #3DED75. */
    --topbar-gradient: linear-gradient(90deg, #2FCB66 0%, #3DED75 52%, #8AF4AA 100%);
    --sidebar-gradient: linear-gradient(0deg, #0F2A1B 0%, #17452A 52%, #28663E 100%);

    --background: #F7F9F8;
    --surface: #FFFFFF;

    --text: #111827;
    --muted: #6B7280;
    --border: #E5E7EB;

    --sidebar-width: 240px;
    --topbar-height: 64px;
}


/* =========================================================
   GENEL
========================================================= */

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;

    background: var(--background);
    color: var(--text);

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
}


/* =========================================================
   TOPBAR
========================================================= */

.app-topbar {
    height: var(--topbar-height);

    background: var(--topbar-gradient);
    color: var(--text);

    display: flex;
    align-items: center;

    padding: 0 24px;

    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;

    z-index: 1020;

    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.app-topbar-title {
    font-size: 15px;
    font-weight: 600;

    color: var(--text);
}

.app-user {
    margin-left: auto;

    display: flex;
    align-items: center;
    gap: 12px;

    color: var(--text);
}


/* =========================================================
   SIDEBAR
========================================================= */

.app-sidebar {
    width: var(--sidebar-width);

    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;

    background: var(--sidebar-gradient);

    padding: 20px 14px;

    color: #FFFFFF;

    z-index: 1030;
}

.app-logo {
    font-size: 24px;
    font-weight: 700;

    color: #FFFFFF;

    padding: 6px 12px 24px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;

    gap: 6px;
}

.sidebar-link {
    display: flex;
    align-items: center;

    min-height: 46px;

    padding: 11px 13px;

    border-radius: 10px;

    color: rgba(255, 255, 255, 0.78);

    text-decoration: none;

    font-size: 15px;
    font-weight: 400;

    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        transform 0.15s ease;
}

.sidebar-link:hover {
    color: #FFFFFF;

    background: rgba(255, 255, 255, 0.08);
}

.sidebar-link.active {
    background: var(--primary);

    color: #163122;

    font-weight: 600;
}


/* =========================================================
   CONTENT
========================================================= */

.app-content {
    min-height: 100vh;

    margin-left: var(--sidebar-width);

    padding:
        calc(var(--topbar-height) + 32px)
        28px
        32px;

    background: var(--background);
}

.page-title {
    margin-bottom: 6px;

    color: var(--text);

    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
}

.page-subtitle {
    margin-bottom: 0;

    color: var(--muted);

    font-size: 15px;
}


/* =========================================================
   CARD
========================================================= */

.app-card {
    height: 100%;

    padding: 20px;

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: 14px;
}

.app-card-title {
    margin-bottom: 8px;

    color: var(--text);

    font-size: 16px;
    font-weight: 600;
}

.app-card-subtitle {
    color: var(--muted);

    font-size: 14px;
}


/* =========================================================
   BUTTON
========================================================= */

.btn-brand {
    background: var(--accent);
    border-color: var(--accent);

    color: #FFFFFF;

    font-weight: 600;

    border-radius: 8px;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease;
}

.btn-brand:hover,
.btn-brand:focus {
    background: var(--accent-hover);
    border-color: var(--accent-hover);

    color: #FFFFFF;
}

.btn-brand:active {
    background: var(--accent-hover) !important;
    border-color: var(--accent-hover) !important;

    color: #FFFFFF !important;
}


/* =========================================================
   BOOTSTRAP FORM ELEMANLARI
========================================================= */

.form-control,
.form-select {
    min-height: 42px;

    border-color: var(--border);

    border-radius: 9px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 0.2rem rgba(141, 237, 117, 0.20);
}

.form-label {
    color: var(--text);

    font-size: 14px;
    font-weight: 500;
}


/* =========================================================
   TABLE
========================================================= */

.table {
    --bs-table-bg: transparent;

    margin-bottom: 0;

    color: var(--text);
}

.table > :not(caption) > * > * {
    padding: 14px 12px;

    border-bottom-color: var(--border);
}

.table thead th {
    color: var(--muted);

    font-size: 13px;
    font-weight: 600;

    border-bottom-width: 1px;
}


/* =========================================================
   BADGE
========================================================= */

.badge-success-soft {
    background: rgba(35, 138, 72, 0.12);

    color: var(--accent);
}

.badge-secondary-soft {
    background: var(--secondary);

    color: #24633A;
}

.badge-danger-soft {
    background: #FEECEC;

    color: #C24141;
}

.badge-warning-soft {
    background: #FFF3D8;

    color: #A76B00;
}


/* =========================================================
   TEXT
========================================================= */

.text-muted {
    color: var(--muted) !important;
}


/* =========================================================
   MODAL
========================================================= */

.athlete-modal {
    border: 0;

    border-radius: 14px;

    overflow: hidden;
}


/*
   Bootstrap scrollable modalın maksimum yüksekliği.
*/
.modal-dialog-scrollable {
    height: calc(100% - 2rem);
}


/*
   Modal-content ekran yüksekliğini aşmasın.
*/
.modal-dialog-scrollable .modal-content {
    max-height: 100%;

    overflow: hidden;
}


/*
   Sadece modalın orta kısmı kayar.
*/
.modal-dialog-scrollable .modal-body {
    overflow-y: auto;
    overflow-x: hidden;

    overscroll-behavior: contain;
}


/*
   Header sabit.
*/
.athlete-modal .modal-header {
    flex-shrink: 0;

    padding: 20px 24px;

    border-bottom: 1px solid var(--border);
}


/*
   Kayan içerik.
*/
.athlete-modal .modal-body {
    padding: 20px 24px;
}


/*
   Footer sabit.
*/
.athlete-modal .modal-footer {
    flex-shrink: 0;

    padding: 16px 24px;

    border-top: 1px solid var(--border);

    background: var(--surface);
}


/* =========================================================
   MODAL TABLARI
========================================================= */

.athlete-form-tabs {
    border-bottom-color: var(--border);
}

.athlete-form-tabs .nav-link {
    color: var(--muted);

    font-weight: 500;
}

.athlete-form-tabs .nav-link:hover {
    color: var(--accent);

    border-color: transparent;
}

.athlete-form-tabs .nav-link.active {
    color: var(--accent);

    font-weight: 600;
}


/* =========================================================
   LOGIN
========================================================= */

.login-page {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;

    background: var(--background);
}

.login-card {
    width: 100%;
    max-width: 410px;

    padding: 32px;

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: 16px;
}

.login-logo {
    margin-bottom: 6px;

    color: var(--sidebar);

    font-size: 28px;
    font-weight: 700;
}


/* =========================================================
   SCROLLBAR
========================================================= */

::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #CBD2CE;

    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #AEB8B2;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 991.98px) {

    .app-sidebar {
        display: none;
    }

    .app-topbar {
        left: 0;

        padding: 0 16px;
    }

    .app-content {
        margin-left: 0;

        padding:
            calc(var(--topbar-height) + 24px)
            16px
            24px;
    }

    .page-title {
        font-size: 30px;
    }

    .modal-dialog {
        margin-left: 12px;
        margin-right: 12px;
    }
}


@media (max-width: 575.98px) {

    .app-topbar-title {
        font-size: 14px;
    }

    .app-user {
        gap: 6px;

        font-size: 14px;
    }

    .app-content {
        padding-left: 12px;
        padding-right: 12px;
    }

    .app-card {
        padding: 16px;
    }

    .page-title {
        font-size: 26px;
    }

    .athlete-modal .modal-header,
    .athlete-modal .modal-body,
    .athlete-modal .modal-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
}