﻿.cyclist-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    padding: 24px;
}

.cyclist-header-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px;
    border-radius: 20px;
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 100%);
    color: #ffffff;
}

.cyclist-header-copy {
    min-width: 0;
}

.cyclist-page-kicker,
.cyclist-card-kicker {
    margin: 0 0 6px;
    color: #bfdbfe;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.cyclist-card-kicker {
    color: #2563eb;
}

.cyclist-page-title {
    margin: 0 0 8px;
    font-size: 32px;
    font-weight: 900;
}

.cyclist-page-subtitle {
    margin: 0;
    font-size: 15px;
    color: #dbeafe;
    font-weight: 700;
}

.cyclist-dashboard-white-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 0 26px;
    border-radius: 14px;
    color: #070b3f;
    background: #ffffff;
    font-size: 17px;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
    transition: 0.2s ease;
}

    .cyclist-dashboard-white-btn:hover {
        color: #070b3f;
        background: #f8fafc;
        transform: translateY(-2px);
    }

.cyclist-filter-card,
.cyclist-table-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px;
    border: 1px solid #e5e7eb;
}

.cyclist-card-title h2,
.cyclist-table-header h2 {
    margin: 0 0 18px;
    color: #0f172a;
    font-size: 20px;
    font-weight: 900;
}

.cyclist-filter-form {
    display: grid;
    grid-template-columns: 1fr 260px auto;
    gap: 16px;
    align-items: end;
}

.cyclist-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .cyclist-form-group label {
        color: #334155;
        font-size: 13px;
        font-weight: 800;
    }

.cyclist-input {
    width: 100%;
    height: 44px;
    border-radius: 12px;
    border: 1px solid #d1d5db;
    padding: 0 12px;
    color: #111827;
    background: #ffffff;
    outline: none;
}

    .cyclist-input:focus {
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
    }

.cyclist-button-group {
    display: flex;
    gap: 10px;
}

.cyclist-primary-btn,
.cyclist-reset-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 18px;
    border-radius: 12px;
    border: none;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: 0.2s ease;
}

.cyclist-primary-btn {
    color: #ffffff;
    background: #2563eb;
}

    .cyclist-primary-btn:hover {
        background: #1d4ed8;
    }

.cyclist-reset-btn {
    color: #991b1b;
    background: #fee2e2;
}

    .cyclist-reset-btn:hover {
        color: #991b1b;
        background: #fecaca;
    }

.cyclist-count {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 8px;
    margin-top: 18px;
    padding: 10px 14px;
    border-radius: 999px;
    color: #1d4ed8;
    background: #dbeafe;
    border: 1px solid #bfdbfe;
    font-size: 14px;
    font-weight: 800;
}

.cyclist-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cyclist-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.cyclist-table {
    width: 100%;
    min-width: 850px;
    border-collapse: collapse;
}

    .cyclist-table th {
        text-align: left;
        padding: 12px;
        color: #475569;
        background: #f1f5f9;
        font-size: 13px;
        font-weight: 900;
        white-space: nowrap;
    }

    .cyclist-table td {
        padding: 14px 12px;
        border-top: 1px solid #e5e7eb;
        color: #111827;
        vertical-align: middle;
    }

    .cyclist-table tbody tr:hover {
        background: #f8fafc;
    }

.cyclist-name {
    font-size: 15px;
    font-weight: 800;
    color: #111827;
}

.cyclist-team {
    font-size: 14px;
    font-weight: 700;
    color: #64748b;
}

.cyclist-status,
.race-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
}

.status-active {
    color: #166534;
    background: #dcfce7;
    border-color: #bbf7d0;
}

.status-inactive {
    color: #991b1b;
    background: #fee2e2;
    border-color: #fecaca;
}

.race-badge {
    min-width: 56px;
}

.race-yes {
    color: #1d4ed8;
    background: #dbeafe;
    border-color: #bfdbfe;
}

.race-no {
    color: #64748b;
    background: #f1f5f9;
    border-color: #e5e7eb;
}

.cyclist-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.cyclist-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 12px;
    color: #1e3a8a;
    background: #eef2ff;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: 0.2s ease;
}

    .cyclist-page-btn:hover {
        color: #1e3a8a;
        background: #e0e7ff;
    }

    .cyclist-page-btn.active {
        color: #ffffff;
        background: #2563eb;
        border-color: #2563eb;
    }

.cyclist-empty {
    padding: 28px;
    border-radius: 16px;
    color: #64748b;
    background: #f8fafc;
    text-align: center;
    font-size: 15px;
    font-weight: 800;
}

.cyclist-table-wrapper::-webkit-scrollbar {
    height: 10px;
}

.cyclist-table-wrapper::-webkit-scrollbar-track {
    background: #e5e7eb;
    border-radius: 999px;
}

.cyclist-table-wrapper::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 999px;
}

@media (max-width: 1000px) {
    .cyclist-filter-form {
        grid-template-columns: 1fr 1fr;
    }

    .cyclist-button-group {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .cyclist-page {
        padding: 14px;
    }

    .cyclist-header-card {
        flex-direction: column;
        align-items: stretch;
        padding: 24px;
    }

    .cyclist-page-title {
        font-size: 26px;
    }

    .cyclist-dashboard-white-btn {
        width: 100%;
    }

    .cyclist-filter-form {
        grid-template-columns: 1fr;
    }

    .cyclist-button-group {
        flex-direction: column;
    }

    .cyclist-primary-btn,
    .cyclist-reset-btn {
        width: 100%;
    }
}

/* ── Header actions ───────────────────────────────────────── */
.cyclist-header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}

.cyclist-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 0 26px;
    border-radius: 14px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border: 2px solid rgba(255, 255, 255, 0.55);
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    transition: 0.2s ease;
    white-space: nowrap;
}

    .cyclist-add-btn:hover {
        background: rgba(255, 255, 255, 0.28);
        border-color: #ffffff;
    }

/* ── Toast notifications ──────────────────────────────────── */
.cyclist-toast {
    padding: 14px 20px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 800;
}

.cyclist-toast-success {
    color: #166534;
    background: #dcfce7;
    border: 1px solid #bbf7d0;
}

.cyclist-toast-error {
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fecaca;
    margin-bottom: 16px;
}

/* ── Modal ────────────────────────────────────────────────── */
.cyclist-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

    .cyclist-modal-backdrop.active {
        display: flex;
    }

.cyclist-modal {
    background: #ffffff;
    border-radius: 20px;
    padding: 32px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

.cyclist-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
}

    .cyclist-modal-header h2 {
        margin: 0;
        color: #0f172a;
        font-size: 20px;
        font-weight: 900;
    }

.cyclist-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    font-size: 20px;
    cursor: pointer;
    transition: 0.2s ease;
    flex-shrink: 0;
}

    .cyclist-modal-close:hover {
        background: #e2e8f0;
        color: #0f172a;
    }

.cyclist-modal-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.cyclist-modal-actions {
    margin-top: 8px;
}

.cyclist-required {
    color: #dc2626;
}

@media (max-width: 768px) {
    .cyclist-header-actions {
        flex-direction: column;
        width: 100%;
    }

    .cyclist-add-btn {
        width: 100%;
        justify-content: center;
    }

    .cyclist-modal {
        padding: 24px;
    }
}

/* ── Delete button (in table row) ────────────────────────── */
.cyclist-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0 14px;
    border-radius: 10px;
    border: none;
    color: #991b1b;
    background: #fee2e2;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s ease;
    white-space: nowrap;
}

    .cyclist-delete-btn:hover {
        background: #fecaca;
    }

/* ── Danger confirm button (in modal) ────────────────────── */
.cyclist-danger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 18px;
    border-radius: 12px;
    border: none;
    color: #ffffff;
    background: #dc2626;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s ease;
}

    .cyclist-danger-btn:hover {
        background: #b91c1c;
    }

/* ── Smaller modal variant ───────────────────────────────── */
.cyclist-modal-sm {
    max-width: 400px;
}

.cyclist-delete-confirm-text {
    margin: 0 0 24px;
    color: #475569;
    font-size: 15px;
    line-height: 1.6;
}
