/* ==========================
   PROFILE PAGE
========================== */
.profile-hero{
    padding:80px 20px 50px;
    background:
    linear-gradient(
        135deg,
        rgba(239,68,68,.06),
        var(--background)
    );
    text-align:center;
}
.profile-avatar-large{
    width:120px;
    height:120px;
    margin:auto;
    border-radius:50%;
    background:linear-gradient(135deg,#EF4444,#DC2626);
    display:flex;
    justify-content:center;
    align-items:center;
    color:white;
    font-size:48px;
    box-shadow:0 20px 40px rgba(239,68,68,.25);
}
.profile-role{
    display:inline-block;
    margin-top:24px;
    padding:8px 18px;
    background:#FEECEC;
    color:var(--primary);
    border-radius:999px;
    font-weight:600;
}
.profile-hero h1{
    margin-top:18px;
    font-size:48px;
}
.profile-hero p{
    color:var(--text-light);
}
.profile-meta{
    display:flex;
    justify-content:center;
    gap:24px;
    margin:20px 0 30px;
    flex-wrap:wrap;
}
.profile-meta span{
    background:var(--surface);
    padding:10px 18px;
    border-radius:999px;
    box-shadow:0 8px 20px rgba(15,23,42,.08);
    font-size:14px;
    color:var(--text-light);
}
.profile-meta i{
    color:var(--primary);
    margin-right:8px;
}
.dashboard-panel{
    background:var(--surface);
    border-radius:25px;
    padding:30px;
    box-shadow:0 12px 35px rgba(0,0,0,.08);
}
.reviews-section{
    margin-top:40px;
    background:var(--surface);
    padding:30px;
    border-radius:25px;
    box-shadow:0 12px 35px rgba(0,0,0,.08);
}
.orders-list{
    display:flex;
    flex-direction:column;
    gap:20px;
}
.order-card{
    background:var(--surface);
    border:1px solid #eee;
    border-radius:18px;
    padding:24px;
    display:flex;
    flex-direction:column;
    gap:20px;
}
.order-header{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
}
.order-header h3{
    margin:0;
    font-size:1.4rem;
}
.order-price{
    display:block;
    margin-top:8px;
    color:var(--primary);
    font-size:1.2rem;
    font-weight:700;
}
.order-status{
    padding:8px 16px;
    border-radius:999px;
    font-weight:700;
    font-size:.85rem;
}
.order-status.accepted{
    background:#DCFCE7;
    color:#15803D;
}
.order-status.pending{
    background:#FEF3C7;
    color:#B45309;
}
.order-status.rejected{
    background:#FEE2E2;
    color:#DC2626;
}
.order-body{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:14px 20px;
}
.order-info{
    display:flex;
    align-items:center;
    gap:10px;
    color:#475569;
}
.order-info i{
    width:20px;
    color:var(--primary);
}
.order-actions{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
}
.order-actions button{
    border:none;
    border-radius:12px;
    padding:12px 18px;
    cursor:pointer;
    font-weight:600;
}
.accept-btn{
    background:#22C55E;
    color:#fff;
}
.reject-btn{
    background:#EF4444;
    color:#fff;
}
.message-btn{
    background:#111827;
    color:#fff;
}
.profile-main{
    max-width:1400px;
    margin:50px auto;
    padding:0 30px;
}
.profile-summary{
    background:var(--surface);
    border-radius:24px;
    padding:35px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:40px;
    box-shadow:0 10px 35px rgba(0,0,0,.08);
}
.profile-left{
    display:flex;
    gap:30px;
    align-items:flex-start;
}
.profile-left textarea{
    width:500px;
    height:120px;
    margin:20px 0;
    padding:15px;
    border:1px solid #e8e8e8;
    border-radius:15px;
    resize:none;
}
.profile-grid{
    display:grid;
    grid-template-columns:1fr 430px;
    gap:35px;
}
.dashboard-panel{
    background:var(--surface);
    border-radius:24px;
    padding:30px;
    box-shadow:0 10px 30px rgba(0,0,0,.08);
}
.panel-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:25px;
}
.panel-header h2{
    font-size:2rem;
}
.listings-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(230px,1fr));
    gap:25px;
}
.orders-list{
    display:flex;
    flex-direction:column;
    gap:20px;
}
.reviews-panel{
    margin-top:35px;
}
.profile-stats{
    display:flex;
    gap:20px;
}
.stat-card{
    width:120px;
    height:110px;
    background:var(--background);
    border-radius:18px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
}
.stat-card h2{
    font-size:2rem;
    color:var(--primary);
}
.stat-card p{
    color:#666;
}
.listing-card{
    background:var(--surface);
    border:1px solid #eee;
    border-radius:20px;
    overflow:hidden;
}
.listing-image{
    width:100%;
    height:180px;
    object-fit:cover;
}
.listing-content{
    padding:18px;
}
.listing-price{
    color:var(--primary);
    font-size:1.3rem;
    font-weight:700;
    margin:10px 0;
}
.listing-status{
    display:inline-block;
    background:#dff6e6;
    color:#138f4b;
    padding:6px 14px;
    border-radius:20px;
    margin-bottom:18px;
}
.listing-actions{
    display:flex;
    justify-content:space-between;
}
.listing-actions button{
    width:48px;
    height:48px;
    border:none;
    border-radius:12px;
    cursor:pointer;
}
.review-card{
    background:var(--surface);
    border:1px solid #eee;
    border-radius:18px;
    padding:22px;
    margin-bottom:20px;
}
.review-top{
    display:flex;
    align-items:center;
    gap:15px;
    margin-bottom:15px;
}
.review-avatar{
    width:52px;
    height:52px;
    border-radius:50%;
    background:var(--primary);
    color:white;
    display:flex;
    justify-content:center;
    align-items:center;
    font-weight:700;
    font-size:20px;
}
.review-stars{
    color:#F59E0B;
    margin-top:4px;
}
.review-comment{
    color:#475569;
    line-height:1.7;
    font-style:italic;
}
.profile-info{
    display:flex;
    flex-direction:column;
    justify-content:center;
    gap:18px;
    flex:1;
}
.profile-info .btn{
    width:220px;
}
@media (max-width:992px){
.profile-grid{
    grid-template-columns:1fr;
}
.profile-summary{
    flex-direction:column;
    align-items:flex-start;
    gap:30px;
}
.profile-stats{
    width:100%;
    justify-content:space-between;
}
.dashboard-grid{
    grid-template-columns:1fr;
}
}
@media (max-width:768px){
.profile-main{
    padding:18px;
}
.profile-summary{
    padding:24px;
}
.profile-left{
    flex-direction:column;
    align-items:center;
    width:100%;
    text-align:center;
}
.profile-left textarea{
    width:100%;
}
.profile-info{
    width:100%;
}
.profile-info .btn{
    width:100%;
}
.profile-stats{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:12px;
    width:100%;
}
.stat-card{
    width:100%;
    height:90px;
}
.panel-header{
    flex-direction:column;
    align-items:flex-start;
    gap:10px;
}
.panel-header h2{
    font-size:1.6rem;
}
}
@media (max-width:768px){
.listings-grid{
    grid-template-columns:1fr;
}
.my-item-card{
    display:flex;
    flex-direction:column;
    text-align:center;
}
.my-item-image{
    width:100%;
    height:220px;
}
.item-actions{
    flex-direction:row;
    justify-content:center;
    flex-wrap:wrap;
}
.item-actions button{
    flex:1;
    min-width:100px;
}
}
@media (max-width:768px){
.order-card{
    grid-template-columns:1fr;
}
.order-header{
    flex-direction:column;
    gap:12px;
}
.order-actions{
    flex-direction:column;
}
.order-actions button{
    width:100%;
}
}
@media (max-width:768px){
.review-card{
    padding:18px;
}
.review-top{
    align-items:flex-start;
}
.review-avatar{
    width:46px;
    height:46px;
}
}
@media (max-width:768px){
.profile-hero{
    padding:60px 20px 35px;
}
.profile-hero h1{
    font-size:2rem;
}
.profile-meta{
    flex-direction:column;
    gap:12px;
}
}
.modal-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.6);
    display:none;
    justify-content:center;
    align-items:center;
    z-index:9999;
}
.edit-profile-modal{
    width:500px;
    background:var(--surface);
    color:var(--text);
    border:1px solid var(--border);
    border-radius:24px;
    padding:35px;
    box-shadow:0 25px 70px rgba(0,0,0,.35);
}
.edit-profile-modal h2{
    margin-bottom:25px;
    color:var(--text);
}
.form-group{
    display:flex;
    flex-direction:column;
    gap:8px;
    margin-bottom:18px;
}
.form-group input,
.form-group select,
.form-group textarea{
    padding:14px;
    border-radius:12px;
    border:1px solid var(--border);
    background:var(--surface-2);
    color:var(--text);
}
.modal-buttons{
    display:flex;
    justify-content:flex-end;
    gap:12px;
    margin-top:25px;
}
.edit-profile-modal input,
.edit-profile-modal select,
.edit-profile-modal textarea{
    width:100%;
    background:var(--surface-2);
    color:var(--text);
    border:1px solid var(--border);
    border-radius:14px;
    padding:14px;
}
.profile-bio{
    margin: 18px auto 30px;
    max-width: 650px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
}
#userLevel{
    background:transparent;
    padding:0;
    border:none;
    box-shadow:none;
}
.profile-stats-mini{
    display:flex;
    justify-content:center;
    gap:18px;
    flex-wrap:wrap;
    margin:40px 0 30px;
}
.revenue-value{
    font-size: clamp(1rem, 2.6vw, 2.8rem);
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mini-stat{
    width:140px;
    padding:22px;
    border-radius:20px;
    background:var(--surface-2);
    border:1px solid var(--border);
    text-align:center;
    transition:.25s;
}
.mini-stat:hover{
    transform:translateY(-4px);
    box-shadow:0 12px 30px rgba(0,0,0,.15);
}
.mini-stat h3{
    color:var(--primary);
    font-size:1.6rem;
    margin-bottom:8px;
}
.mini-stat span{
    color:var(--text-secondary);
    font-size:.9rem;
}