/* =========================
   PROFILE SECTION
========================= */
.profile-box{
    max-width:1200px;
    margin:30px auto;
    background:#fff;
    border-radius:20px;
    box-shadow:0 10px 30px rgba(0,0,0,.1);
    overflow:hidden;
}

/* HEADER */
.profile-header{
    display:flex;
    align-items:center;
    gap:25px;
    padding:30px;
    background:linear-gradient(135deg,#2563eb,#1e40af);
    color:#fff;
}

.profile-image img{
    width:120px;
    height:120px;
    border-radius:50%;
    object-fit:cover;
    border:5px solid rgba(255,255,255,.3);
}

.profile-info h2{
    margin:0;
    font-size:28px;
}

.profile-info p{
    margin-top:8px;
    opacity:.9;
}

/* DETAILS */
.profile-details{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:20px;
    padding:30px;
}

.detail-card{
    background:#f8fafc;
    padding:20px;
    border-radius:15px;
    transition:.3s;
    border:1px solid #e5e7eb;
}

.detail-card:hover{
    transform:translateY(-5px);
    box-shadow:0 10px 20px rgba(0,0,0,.08);
}

.detail-card h4{
    margin-bottom:10px;
    color:#2563eb;
}

.detail-card p{
    margin:0;
    color:#555;
}

.full-width{
    grid-column:1/-1;
}

/* ACTION BUTTONS */
.profile-actions{
    display:flex;
    gap:15px;
    padding:0 30px 30px;
}

.action-btn{
    border:none;
    padding:14px 24px;
    border-radius:12px;
    cursor:pointer;
    font-size:15px;
    font-weight:600;
    transition:.3s;
}

.action-btn:hover{
    transform:translateY(-3px);
}

.primary{
    background:#2563eb;
    color:#fff;
}

.success{
    background:#16a34a;
    color:#fff;
}

.dark{
    background:#111827;
    color:#fff;
}

/* =========================
   MODALS (UPDATED - SMALLER)
========================= */
.profile-modal,
.modal,
.payment-modal{
    display:none;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.6);
    z-index:9999;
    justify-content:center;
    align-items:center;
    padding:15px;
}

/* 🔽 REDUCED MODAL SIZE */
.modal-content,
.modal-box,
.payment-content{
    background:#fff;
    width:100%;
    max-width:420px;   /* reduced from 600px */
    border-radius:16px;
    padding:18px;      /* reduced from 25px */
    box-shadow:0 15px 40px rgba(0,0,0,.2);
    animation:popup .25s ease;
}

/* ANIMATION */
@keyframes popup{
    from{
        transform:scale(.85);
        opacity:0;
    }
    to{
        transform:scale(1);
        opacity:1;
    }
}

/* HEADER */
.modal-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:12px;  /* reduced */
}

.modal-header h3{
    margin:0;
    color:#1f2937;
    font-size:18px;
}

/* CLOSE BUTTON */
.close,
.close-btn,
.close-payment{
    font-size:28px;
    cursor:pointer;
    color:#ef4444;
}

/* FORM */
.form-group{
    margin-bottom:12px;
}

.form-group label{
    display:block;
    margin-bottom:5px;
    font-weight:600;
    color:#374151;
    font-size:14px;
}

.form-group input,
.form-group textarea,
.form-group select{
    width:100%;
    padding:10px; /* reduced */
    border:1px solid #d1d5db;
    border-radius:8px;
    outline:none;
    transition:.3s;
    font-size:14px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus{
    border-color:#2563eb;
    box-shadow:0 0 0 3px rgba(37,99,235,.15);
}

textarea{
    min-height:90px;
    resize:vertical;
}

/* BUTTONS */
.save-btn,
.btn{
    width:100%;
    background:#2563eb;
    color:#fff;
    border:none;
    padding:12px;
    border-radius:8px;
    font-size:14px;
    font-weight:600;
    cursor:pointer;
    transition:.3s;
}

.save-btn:hover,
.btn:hover{
    background:#1d4ed8;
}

/* MOBILE */
@media(max-width:768px){

    .profile-header{
        flex-direction:column;
        text-align:center;
    }

    .profile-actions{
        flex-direction:column;
    }

    .action-btn{
        width:100%;
    }

    .profile-details{
        grid-template-columns:1fr;
    }

    /* even smaller modal on mobile */
    .modal-content,
    .modal-box,
    .payment-content{
        max-width:95%;
        padding:15px;
    }
}