/* ===== Not found ===== */
.profile-not-found { max-width:600px;margin:80px auto;text-align:center;padding:40px;background:#fff;border-radius:20px;box-shadow:0 8px 30px rgba(0,0,0,.06); }
.profile-not-found-icon { font-size:80px;margin-bottom:20px; }
.profile-not-found h1 { font-size:28px;color:#333;margin-bottom:16px; }
.profile-not-found p  { color:#666;font-size:16px;margin-bottom:24px; }
.profile-not-found a  { display:inline-block;padding:14px 32px;background:linear-gradient(135deg,#9F7AEA,#38B2AC);color:#fff;text-decoration:none;border-radius:12px;font-weight:600; }
.profile-not-found a:hover { transform:translateY(-2px); }

/* ===== Profile background layer (used inside .about_q_b) ===== */
.profile-banner-layer { position: absolute; inset: 0; }
.profile-banner-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,.25) 100%); }
.profile-bg-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== Profile header ===== */
.profile-header { display:flex;align-items:flex-start;gap:20px;padding:20px 20px 8px;position:relative;z-index:1; margin-bottom: 20px }
.profile-avatar-holder { flex-shrink:0; }
.profile-avatar-holder .gt-avatar-wrap { width:80px;height:80px; }
.profile-avatar-holder .gt-avatar-initial { font-size:30px;font-weight:700; }
.profile-avatar-holder .gt-avatar-wrap img { width:80px;height:80px;object-fit:cover;display:block; }
.avatar-upload-wrap { position:relative;display:inline-flex;cursor:pointer; }
.avatar-upload-wrap input[type=file] { display:none; }
.avatar-upload-overlay {
    position:absolute;inset:0;border-radius:50%;
    background:rgba(0,0,0,.45);display:flex;align-items:center;justify-content:center;
    opacity:0;transition:opacity .2s;color:#fff;font-size:18px;
}
.avatar-upload-wrap:hover .avatar-upload-overlay { opacity:1; }
.profile-info h1 { font-size:22px;color:#322659;margin:0 0 4px; }
.profile-info .username { color:#9F7AEA;font-size:14px; }
.profile-bio { color:#666;font-size:14px;margin-top:6px;max-width:500px;line-height:1.5; }
.profile-stars { font-size:13px;color:#9F7AEA;margin-top:4px; }

/* ===== Stats row ===== */
.profile-stats {
    display: flex;
    gap: 16px;
    margin: 24px 0;
    flex-wrap: wrap;
}

.stat-card {
    flex: 1;
    min-width: 160px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: white;
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 2px 12px rgba(50,38,89,.08);
    transition: transform .2s, box-shadow .2s;
    border: 1px solid #f0ebff;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(159,122,234,.15);
}
.stat-card__icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}
.stat-card__icon-wrap--purple { background: #f3eeff; color: #9F7AEA; }
.stat-card__icon-wrap--teal   { background: #e6faf8; color: #38B2AC; }
.stat-card__icon-wrap--green  { background: #dcfce7; color: #22c55e; }
.stat-card__num {
    font-size: 32px;
    font-weight: 800;
    color: #322659;
    line-height: 1;
}
.stat-card__label {
    font-size: 12px;
    color: #aaa;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 500;
}

/* ===== Bio edit ===== */
.bio-edit-section { background:#faf5ff;border-radius:14px;padding:16px;margin-bottom:20px; }
.bio-edit-section h3 { color:#322659;font-size:15px;margin:0 0 10px; }
.bio-textarea { width:100%;min-height:70px;border:1px solid #e9e5f5;border-radius:8px;padding:10px;font-size:14px;color:#322659;resize:vertical;box-sizing:border-box; }
.bio-save-btn { margin-top:8px;background:#9F7AEA;color:#fff;border:none;padding:9px 22px;border-radius:8px;font-weight:600;cursor:pointer;transition:all .2s; }
.bio-save-btn:hover { background:#7c5dc9; }
.bio-char-count { font-size:12px;color:#999;margin-top:4px; }

/* ===== Tabs ===== */
.profile-tabs { display:flex;gap:0;border-bottom:2px solid #ede9f8;margin-bottom:20px;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none; }
.profile-tabs::-webkit-scrollbar { display:none; }
.profile-tab { padding:10px 20px;font-size:14px;font-weight:600;color:#999;cursor:pointer;border:none;background:none;border-bottom:2px solid transparent;margin-bottom:-2px;transition:all .15s;white-space:nowrap;flex-shrink:0; }
.profile-tab.active { color:#9F7AEA;border-bottom-color:#9F7AEA; }
.profile-tab:hover:not(.active) { color:#322659; }

/* ===== Owner cards ===== */
.owner-card { background:#fff;border-radius:16px;overflow:hidden;box-shadow:0 2px 12px rgba(0,0,0,.06);transition:all .2s;display:flex;flex-direction:column; }
.owner-card:hover { box-shadow:0 6px 20px rgba(0,0,0,.1); }
.owner-card-link { text-decoration:none;display:block; }
.owner-card-img { width:100%;height:140px;object-fit:cover;background:#faf5ff;display:flex;align-items:center;justify-content:center;font-size:40px;position:relative; }
.owner-card-img img { width:100%;height:100%;object-fit:cover; }
.status-badge { position:absolute;top:8px;right:8px;padding:3px 10px;border-radius:20px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.5px; }
.badge-published { background:#c6f6d5;color:#276749; }
.badge-draft     { background:#e9e5f5;color:#553c9a; }
.badge-hidden    { background:#fef3c7;color:#92400e; }
.badge-promoted  { background:#fde8ff;color:#6b21a8; }
.owner-card-body { padding:12px 14px;flex:1; }
.owner-card-title { font-size:14px;font-weight:600;color:#322659;margin-bottom:4px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden; }
.owner-card-stats { font-size:12px;color:#999; }
.owner-card-actions { width:100%;display:flex;flex-wrap:wrap;gap:6px;padding:10px 14px 14px;border-top:1px solid #f5f0ff; }
.action-btn { 
    flex:1;
    /* min-width:60px; */
    /* display: block; */
    width: max-content;
    padding:7px 10px;
    border:none;
    border-radius:8px;
    font-size:12px;
    font-weight:600;
    cursor:pointer;
    transition:all .15s;
    text-align:center;
    text-decoration:none;
    white-space:nowrap;
 }
.action-btn:hover { transform:translateY(-1px); }
.btn-edit    { background:#eef2ff;color:#4f46e5; }
.btn-publish { background:#d1fae5;color:#065f46; }
.btn-hide    { background:#fef3c7;color:#92400e; }
.btn-show    { background:#e0f2fe;color:#075985; }
.btn-promote { background:#fde8ff;color:#6b21a8; }
.btn-delete  { background:#fee2e2;color:#991b1b; }
.btn-theme   { background:#fdf4ff;color:#7c3aed; }
.owner-tests-grid { display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:18px; }

/* ===== Passed tests ===== */
.passed-grid { display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:18px; }
.passed-card { background:#fff;border-radius:16px;overflow:hidden;box-shadow:0 2px 12px rgba(0,0,0,.06);transition:all .2s; }
.passed-card:hover { transform:translateY(-3px);box-shadow:0 8px 24px rgba(0,0,0,.1); }
.passed-card__cover { width:100%;height:110px;object-fit:cover;background:#faf5ff;display:flex;align-items:center;justify-content:center;font-size:32px; }
.passed-card__cover img { width:100%;height:100%;object-fit:cover; }
.passed-card__body { padding:12px 14px; }
.passed-card__test { font-size:12px;color:#9F7AEA;font-weight:600;margin-bottom:4px; }
.passed-card__result { font-size:14px;font-weight:700;color:#322659;margin-bottom:4px; }
.passed-card__desc { font-size:12px;color:#888;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden; }
.passed-card__date { font-size:11px;color:#bbb;margin-top:6px; }

/* ===== SweetAlert2 theming ===== */
.swal2-confirm { background:linear-gradient(135deg,#9F7AEA,#38B2AC) !important;box-shadow:0 4px 14px rgba(56,178,172,.35) !important; }
.swal2-popup { border-radius:20px !important; }
.swal2-title { color:#322659 !important; }

.empty-tests { text-align:center;padding:40px;color:#888;font-size:16px; }

/* ===== Mobile responsive ===== */
@media (max-width: 520px) {
    .profile-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin: 16px 0;
    }

    .stat-card {
        min-width: 0;
        padding: 14px 16px;
        gap: 10px;
    }

    .stat-card__icon-wrap { width: 40px; height: 40px; border-radius: 10px; font-size: 18px; }
    .stat-card__num { font-size: 22px; }
    .stat-card__label { font-size: 11px; }
}

@media (max-width: 600px) {
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
        padding: 16px 16px 8px;
    }

    .profile-avatar-holder .gt-avatar-wrap { width: 64px; height: 64px; }
    .profile-avatar-holder .gt-avatar-initial { font-size: 24px; }
    .profile-avatar-holder .gt-avatar-wrap img { width: 64px; height: 64px; }

    .profile-info h1 { font-size: 18px; }
    .profile-bio { max-width: 100%; font-size: 13px; }

    .owner-tests-grid { grid-template-columns: 1fr; }
    .passed-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}


@media (max-width: 600px) {
    .profile-tab { padding: 8px 14px; font-size: 13px; }
}

@media (max-width: 430px) {
    .profile-stats { grid-template-columns: 1fr; }
}

@media (max-width: 400px) {
    .profile-tab { padding: 7px 8px; font-size: 12px; }
}
