* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

:root {
    --accent: #9696f5;
    --accent-dark: #6b6be0;
    --accent-light: rgba(150, 150, 245, 0.12);
    --glass: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --surface: #111117;
    --surface2: #18181f;
    --surface3: #1e1e28;
    --text: #f0f0f8;
    --muted: #8888aa;
    --danger: #ff4d6d;
    --danger-light: rgba(255, 77, 109, 0.12);
    --success: #22c55e;
    --client-color: #06b6d4;
    --worker-color: #a78bfa;
}

body {
    min-height: 100vh;
    background: #0a0a0f;
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(150, 150, 245, 0.15), transparent),
        radial-gradient(ellipse 40% 30% at 80% 80%, rgba(6, 182, 212, 0.06), transparent);
    color: var(--text);
    overflow-x: hidden;
}

/* ─── NAVBAR ─── */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    background: rgba(10, 10, 15, 0.85);
    border-bottom: 1px solid var(--glass-border);
}

.navbar {
    width: 100%;
    max-width: 1200px;
    height: 80px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    width: auto;
    transition: transform 0.3s cubic-bezier(.4, 0, .2, 1);
}

.logo:hover {
    transform: scale(1.04);
    display: inline-block;
}

.logo a {
    font-size: 2.4rem;
    font-weight: 800;
    color: #7c6bff;
    letter-spacing: -1px;
    text-decoration: none;
}

.logo span {
    font-size: 2.8rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -2px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--muted);
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text);
}

.nav-back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text);
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.nav-back-btn:hover {
    background: var(--accent-light);
    border-color: var(--accent);
    color: var(--accent);
}

/* ─── PAGE LAYOUT ─── */
.profile-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

/* ─── HERO BANNER ─── */
.profile-hero {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 32px;
    border: 1px solid var(--glass-border);
    background: var(--surface2);
}

.profile-banner {
    height: 160px;
    background: linear-gradient(135deg, #1a0545 0%, #0d1b6b 40%, #051535 70%, #0a0a0f 100%);
    position: relative;
}

.profile-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239696f5' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.profile-banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(transparent, var(--surface2));
}

.profile-info-bar {
    background: var(--surface2);
    padding: 0 30px 28px;
    display: flex;
    align-items: flex-end;
    gap: 24px;
}

/* ─── AVATAR ─── */
.big-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-dark), #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    border: 4px solid var(--surface2);
    margin-top: -50px;
    flex-shrink: 0;
    box-shadow: 0 8px 32px rgba(150, 150, 245, 0.3);
    letter-spacing: 1px;
    transition: transform 0.3s;
    cursor: default;
    position: relative;
    z-index: 2;
}

.big-avatar:hover {
    transform: scale(1.05);
}

.profile-meta {
    flex: 1;
    padding-top: 8px;
}

.profile-meta h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.profile-meta .user-email {
    color: var(--muted);
    font-size: 0.9rem;
}

.user-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 8px;
}

.user-type-badge.client {
    background: rgba(6, 182, 212, 0.12);
    color: var(--client-color);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.user-type-badge.worker {
    background: rgba(167, 139, 250, 0.12);
    color: var(--worker-color);
    border: 1px solid rgba(167, 139, 250, 0.3);
}

.profile-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
    flex-wrap: wrap;
}

/* ─── CARDS GRID ─── */
.cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.cards-grid .card-full {
    grid-column: 1 / -1;
}

.info-card {
    background: var(--surface2);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 26px;
    transition: border-color 0.25s, transform 0.25s;
}

.info-card:hover {
    border-color: rgba(150, 150, 245, 0.25);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 18px;
    flex-shrink: 0;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

/* ─── FIELD ROWS ─── */
.field-row {
    display: flex;
    align-items: flex-start;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    gap: 14px;
}

.field-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.field-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 14px;
    flex-shrink: 0;
}

.field-content {
    flex: 1;
}

.field-label {
    font-size: 0.72rem;
    color: var(--muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.field-value {
    font-size: 0.95rem;
    color: var(--text);
    font-weight: 500;
    word-break: break-all;
}

.field-value.muted {
    color: var(--muted);
    font-style: italic;
}

/* ─── SKILLS CHIPS ─── */
.skills-display {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.skill-tag {
    padding: 6px 14px;
    background: rgba(150, 150, 245, 0.1);
    color: var(--accent);
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    border: 1px solid rgba(150, 150, 245, 0.25);
}

/* ─── FORM INPUTS ─── */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text);
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(150, 150, 245, 0.12);
}

.form-input:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ─── BUTTONS ─── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(150, 150, 245, 0.35);
}

.btn-ghost {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-danger {
    background: var(--danger-light);
    border: 1px solid rgba(255, 77, 109, 0.3);
    color: var(--danger);
}

.btn-danger:hover {
    background: rgba(255, 77, 109, 0.2);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.82rem;
}

/* ─── STATS CARD ─── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.stat-item {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px 20px;
    text-align: center;
    transition: 0.2s;
}

.stat-item:hover {
    border-color: rgba(150, 150, 245, 0.25);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 4px;
}

/* ─── DANGER ZONE ─── */
.danger-zone {
    border-color: rgba(255, 77, 109, 0.2);
}

.danger-zone .card-icon {
    background: rgba(255, 77, 109, 0.1);
    color: var(--danger);
}

/* ─── LOADING ─── */
.skeleton {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
    height: 18px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ─── TOAST ─── */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: var(--surface2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--text);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease forwards;
    pointer-events: all;
    min-width: 260px;
}

.toast.success {
    border-left: 3px solid var(--success);
}

.toast.error {
    border-left: 3px solid var(--danger);
}

@keyframes slideIn {
    from {
        transform: translateX(100px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100px);
        opacity: 0;
    }
}

/* ─── NOT LOGGED IN ─── */
.not-logged-in {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    gap: 16px;
}

.not-logged-in i {
    font-size: 64px;
    color: var(--muted);
    opacity: 0.4;
}

.not-logged-in h2 {
    font-size: 1.5rem;
    color: var(--text);
}

.not-logged-in p {
    color: var(--muted);
    font-size: 0.95rem;
    max-width: 340px;
}

/* ─── SPINNER ─── */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ─── SECTION DIVIDER ─── */
.section-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 20px 0;
}

/* ─── EDIT MODAL ─── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-box {
    background: var(--surface2);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.25s ease;
}

.modal-overlay.active .modal-box {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 26px;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.modal-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--muted);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.modal-body {
    padding: 26px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 18px 26px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 700px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }

    .cards-grid .card-full {
        grid-column: 1;
    }

    .profile-info-bar {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 14px;
        padding: 0 20px 24px;
    }

    .profile-actions {
        justify-content: center;
    }

    .stat-grid {
        grid-template-columns: 1fr 1fr;
    }

    .nav-links {
        display: none;
    }

    .modal-box {
        max-height: 95vh;
        border-radius: 16px;
    }

    .modal-overlay {
        padding: 12px;
        align-items: flex-end;
    }
}

@media (max-width: 480px) {
    .profile-page {
        padding: 24px 16px 60px;
    }

    .profile-meta h2 {
        font-size: 1.3rem;
    }

    .stat-grid {
        grid-template-columns: 1fr 1fr;
    }

    .info-card {
        padding: 20px;
    }
}