* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --black: #061a40;
    --white: #ffffff;
    --gray-100: #eef8ff;
    --gray-200: #cfeefe;
    --gray-600: #49657d;
    --gold: #38bdf8;
    --gold-hover: #0ea5e9;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --shadow: 0 20px 60px rgba(6, 26, 64, 0.10);
}

body {
    font-family: var(--font);
    background: linear-gradient(145deg, #ffffff 0%, #eef8ff 46%, #f8fcff 100%);
    color: var(--black);
    min-height: 100vh;
    padding: 24px;
}

.profile-container { max-width: 1120px; margin: 0 auto; }

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    margin-bottom: 32px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}
.top-bar .logo {
    font-size: 1.6rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--black);
}
.top-bar .logo span { color: var(--gold); }
.top-bar .actions { display: flex; gap: 12px; align-items: center; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 60px;
    font-weight: 600;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}
.btn-outline {
    background: transparent;
    color: var(--black);
    border: 1px solid var(--gray-200);
}
.btn-outline:hover {
    background: var(--black);
    color: var(--white);
}
.btn-gold {
    background: var(--gold);
    color: var(--black);
}
.btn-gold:hover {
    background: var(--gold-hover);
    transform: translateY(-2px);
}
.btn-sm { padding: 8px 16px; font-size: 0.8rem; }
.btn-danger {
    background: #0b4f8a;
    color: #fff;
}
.btn-danger:hover { background: var(--black); }

.profile-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) 2.1fr;
    gap: 32px;
}
@media (max-width: 768px) {
    .profile-grid { grid-template-columns: 1fr; gap: 24px; }
}

.profile-sidebar {
    background: linear-gradient(160deg, var(--black) 0%, #0b4f8a 100%);
    border-radius: var(--radius);
    padding: 36px 26px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.24);
    text-align: center;
    color: var(--white);
    position: sticky;
    top: 24px;
    align-self: start;
}
.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--black);
    margin: 0 auto 16px;
    border: 6px solid rgba(56, 189, 248, 0.36);
    box-shadow: 0 20px 42px rgba(6, 26, 64, 0.24);
}
.profile-sidebar h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 2px; }
.profile-sidebar .email {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.9rem;
    margin-bottom: 16px;
}
.profile-sidebar .member-since {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.78);
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}
.subscription-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-weight: 700;
}

.profile-main { display: flex; flex-direction: column; gap: 24px; }
.profile-card {
    background: rgba(255, 255, 255, 0.92);
    border-radius: var(--radius);
    padding: 28px 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    backdrop-filter: blur(10px);
}
.profile-card .card-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.profile-card .card-title i { color: var(--gold); }

.info-row {
    display: flex;
    padding: 14px 0;
    border-bottom: 1px solid var(--gray-200);
}
.info-row:last-child { border-bottom: none; }
.info-row .label {
    font-weight: 500;
    width: 140px;
    flex-shrink: 0;
    color: var(--gray-600);
}
.info-row .value { flex: 1; }
.info-row .value .edit-input {
    display: none;
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.9rem;
    background: var(--gray-100);
}
.info-row .value .edit-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.16);
}
.info-row .value .display-text { display: block; }
.info-row.editing .value .display-text { display: none; }
.info-row.editing .value .edit-input { display: block; }

.edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.edit-actions .btn-sm { padding: 4px 14px; font-size: 0.75rem; }

.order-list { margin-top: 8px; }
.order-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    background: #f8fcff;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}
.order-item:last-child { margin-bottom: 0; }
.order-item .order-info { flex: 1; }
.order-item .order-info .service { font-weight: 600; }
.order-item .order-info .meta {
    font-size: 0.8rem;
    color: var(--gray-600);
}
.order-item .order-status {
    padding: 4px 14px;
    border-radius: 60px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: capitalize;
}
.order-status.pending {
    background: #dff6ff;
    color: #0b4f8a;
}
.order-status.processing {
    background: #cfeefe;
    color: var(--black);
}
.order-status.completed {
    background: #eef8ff;
    color: #0b4f8a;
}

.empty-state {
    text-align: center;
    padding: 32px 20px;
    color: var(--gray-600);
}
.empty-state i {
    font-size: 2.4rem;
    opacity: 0.3;
    margin-bottom: 8px;
}

.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--black);
    color: var(--white);
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 500;
    box-shadow: 0 12px 40px rgba(6, 26, 64, 0.24);
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
    pointer-events: none;
}
.toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

@media (max-width: 480px) {
    .profile-card { padding: 20px 16px; }
    .info-row {
        flex-direction: column;
        gap: 4px;
        padding: 12px 0;
    }
    .info-row .label { width: 100%; }
    .top-bar {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    .top-bar .actions { width: 100%; flex-wrap: wrap; }
    .order-item { flex-direction: column; align-items: flex-start; }
    body { padding: 12px; }
}
