/* ===========================
   PAGE CONTAINER + HEADER
   =========================== */
.page-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 20px;
}

.header {
    display: flex;
    align-items: center;
    height: 60px; /* consistent */
    padding: 0 20px;
}

.header-actions {
    display: flex;
    gap: 12px; /* space between buttons */
    justify-content: flex-end;
    align-items: center;
    margin-top: 20px;
}

/* ===========================
   TABLE (Modernized)
   =========================== */
.modern-table {
    margin-top: 28px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.10);
    overflow: hidden;
    text-align: left;
}

    .modern-table table {
        width: 100%;
        border-collapse: collapse;
    }

    .modern-table th {
        background: #f7fafc;
        padding: 16px;
        font-size: 1.05rem;
        font-weight: 700;
        color: #2c3e50;
        border-bottom: 1px solid #e5e5e5;
    }

    .modern-table td {
        padding: 14px;
        font-size: 1rem;
        color: #444;
        border-bottom: 1px solid #f0f0f0;
    }

    .modern-table tr:last-child td {
        border-bottom: none;
    }

.actions-col {
    text-align: right;
    width: 180px;
}

/* ===========================
   BUTTON SYSTEM (Unified)
   =========================== */

/* Neutral base button */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
    border: none;
    gap: 6px; /* icon spacing */
}

/* Primary (large) — Add Person, Save, Continue */
.btn-primary {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: #fff;
    padding: 14px 26px;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 700;
}

    .btn-primary:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(46,204,113,0.35);
    }

.btn-next {
    display: none !important;
}

/* Secondary + Danger (medium) — Edit, Delete */
.btn-secondary,
.btn-danger {
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    min-width: 150px;
}

.btn-secondary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
}

    .btn-secondary:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(52,152,219,0.35);
    }

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
}

    .btn-danger:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(231,76,60,0.35);
    }

/* ===========================
   MODAL SYSTEM (Unified)
   =========================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    animation: modalOverlayFade 0.25s ease-out;
}

@keyframes modalOverlayFade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal {
    background: #fff;
    padding: 32px 28px;
    border-radius: 22px;
    width: 420px;
    max-width: 92%;
    box-shadow: 0 12px 32px rgba(0,0,0,0.18);
    position: relative;
    text-align: center;
    animation: modalSlideIn 0.35s ease-out;
    background-image: radial-gradient(circle at 22px 22px, rgba(46,204,113,0.06) 2px, transparent 2px), radial-gradient(circle at 62px 62px, rgba(52,152,219,0.06) 2px, transparent 2px);
    background-size: 90px 90px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-title {
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 18px;
    color: #2c3e50;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.modal-close-icon {
    position: absolute;
    top: 12px;
    right: 14px;
    background: transparent;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: #888;
    transition: 0.15s ease;
}

    .modal-close-icon:hover {
        color: #555;
        transform: scale(1.15);
    }

/* Modal buttons */
.modal-actions .btn-primary,
.modal-actions .btn-secondary,
.modal-actions .btn-danger {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
    border-radius: 12px;
    margin-bottom: 10px;
}

/* ===========================
   FORM FIELDS
   =========================== */
.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.reg-input,
.modal .form-control {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #ccc;
    font-size: 1rem;
    box-sizing: border-box;
}

.reg-header-title {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.reg-header-card {
    text-align: center;
    padding: 48px 32px;
    margin: 0 auto;
    max-width: 800px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fdf9 100%);
    background-image: radial-gradient(circle at 20px 20px, rgba(46,204,113,0.08) 2px, transparent 2px), radial-gradient(circle at 60px 60px, rgba(52,152,219,0.08) 2px, transparent 2px);
    background-size: 80px 80px;
    border-top: 6px solid #2ecc71;
    border-radius: 20px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.12);
    animation: regHeaderFade 0.45s ease-out;
}

.reg-header-card-sub {
    text-align: left;
    padding: 48px 32px;
    margin: 0 auto;
    max-width: 760px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fdf9 100%);
    background-image: radial-gradient(circle at 20px 20px, rgba(46,204,113,0.08) 2px, transparent 2px), radial-gradient(circle at 60px 60px, rgba(52,152,219,0.08) 2px, transparent 2px);
    background-size: 80px 80px;
    border-top: 6px solid #2ecc71;
    border-radius: 20px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.12);
    animation: regHeaderFade 0.45s ease-out;
}

.page-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 25px;
}

.reg-header-inner {
    max-width: 680px;
    margin: 0 auto;
}

.player-name-mobile {
    display: none;
}

.player-mobile-detail {
    display: none;
}

/* = Desktop */
.modern-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 26px;
    height: 26px;
    border: 2px solid #2ecc71;
    border-radius: 6px;
    cursor: pointer;
    background: #fff;
    margin-right: 14px;
    flex-shrink: 0;
    position: relative; /* REQUIRED */
}

    .modern-checkbox:checked {
        background: #2ecc71;
        border-color: #27ae60;
    }

        .modern-checkbox:checked::after {
            content: "";
            position: absolute;
            left: 6px; /* centered for 26px box */
            top: 4px;
            width: 7px;
            height: 14px;
            border: solid #fff;
            border-width: 0 3px 3px 0;
            transform: rotate(45deg);
        }


.mobile-hide{
    display: none !important;
}


/* ===========================
   MOBILE MODAL
   =========================== */
@media (max-width: 700px) {

    /* Collapse table into cards */
    .modern-table table,
    .modern-table thead,
    .modern-table tbody,
    .modern-table th,
    .modern-table td,
    .modern-table tr {
        display: block;
        width: 100%;
    }

    .modern-table thead {
        display: none;
    }

    .modern-table tr {
        margin-bottom: 15px;
        background: #fff;
        padding: 15px;
        border-radius: 12px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    }

    /* MOBILE CARD CONTENT */
    .mobile-flex {
        display: block !important;
        padding-left: 0;
    }

    /* Checkbox + name on same row */
    .mobile-top-row {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 8px;
    }

    /* Mobile text */
    .player-name-mobile {
        display: inline-block;
        font-weight: 700;
        font-size: 1.05rem;
        line-height: 1.35;
    }

    .player-mobile-detail {
        display: block;
        font-size: 0.95rem;
        margin-top: 4px;
        margin-bottom: 4px;
        line-height: 1.35;
        color: #555;
    }

    /* Hide desktop columns */
    .desktop-only {
        display: none !important;
    }

    .reg-mobile-topbar {
        padding: 0.75rem 1rem;
        max-height: 40px;
    }

    /* Reduce main content padding */
    .reg-main {
        padding-top: 0.25rem;
    }

    /* Reduce header card padding */
    .reg-header-card {
        padding-top: 0rem;
    }

    /* Remove default H1 margin */
    .reg-header-title {
        margin-top: 0;
    }

    .reg-header-card-sub {
        text-align: left;
        margin: 0 auto;
        max-width: 700px;
        background: linear-gradient(135deg, #ffffff 0%, #f8fdf9 100%);
        background-image: radial-gradient(circle at 20px 20px, rgba(46,204,113,0.08) 2px, transparent 2px), radial-gradient(circle at 60px 60px, rgba(52,152,219,0.08) 2px, transparent 2px);
        background-size: 80px 80px;
        border-top: 6px solid #2ecc71;
        border-radius: 20px;
        box-shadow: 0 10px 28px rgba(0,0,0,0.12);
        animation: regHeaderFade 0.45s ease-out;
    }

    .reg-header-inner {
        max-width: 680px;
        margin: 0;
    }

    .actions-col {
        text-align: left;
        width: 180px;
    }

    .btn-next {
        background: linear-gradient(135deg, #1abc9c, #16a085);
        color: #fff;
        padding: 14px 26px;
        border-radius: 14px;
        font-size: 1.05rem;
        font-weight: 700;
        display: flex !important;
    }

        .btn-next:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(46,204,113,0.35);
        }

}

