/* Profile Module Styles - Complete */

:root {
    --primary-color: #4361ee;
    --primary-light: #e0e7ff;
    --primary-dark: #3730a3;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark: #1e293b;
    --gray-700: #334155;
    --gray-600: #475569;
    --gray-500: #64748b;
    --gray-400: #94a3b8;
    --gray-300: #cbd5e1;
    --gray-200: #e2e8f0;
    --gray-100: #f1f5f9;
    --gray-50: #f8fafc;
    --white: #ffffff;
    --box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --box-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

.profile-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* Profile Header Card */
.profile-header-card {
    background: linear-gradient(135deg, var(--white), var(--gray-100));
    border-radius: 24px;
    box-shadow: var(--box-shadow-lg);
    margin-bottom: 2rem;
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.profile-cover {
    height: 150px;
    background: linear-gradient(135deg, var(--primary-light), #d0dcff);
    position: relative;
}

.profile-avatar-wrapper {
    position: absolute;
    bottom: -50px;
    left: 2rem;
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--white);
    border: 4px solid var(--white);
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-large i {
    font-size: 6rem;
    color: var(--primary-color);
}

.avatar-upload-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid var(--white);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.avatar-upload-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.profile-header-info {
    padding: 4rem 2rem 2rem 2rem;
}

.profile-header-info h1 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.profile-username {
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.profile-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    color: var(--gray-600);
    font-size: 0.9rem;
}

.profile-meta i {
    margin-right: 0.25rem;
    color: var(--primary-color);
}

.profile-bio {
    color: var(--gray-700);
    line-height: 1.6;
    max-width: 600px;
}

/* Profile Tabs */
.profile-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 0.5rem;
    overflow-x: auto;
    white-space: nowrap;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: var(--gray-100);
    color: var(--primary-color);
}

.tab-btn.active {
    background: var(--primary-light);
    color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--box-shadow);
    border: 1px solid var(--gray-200);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.blue { background: var(--primary-light); color: var(--primary-color); }
.stat-icon.gold { background: #fff3e0; color: #f97316; }
.stat-icon.green { background: #e7f5e9; color: #2e7d32; }
.stat-icon.purple { background: #f3e8ff; color: #8b5cf6; }

.stat-details {
    flex: 1;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-bottom: 0.25rem;
}

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

/* Profile Sections Grid */
.profile-sections-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.profile-card {
    background: var(--white);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    border: 1px solid var(--gray-200);
}

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

.profile-card h3 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-200);
    color: var(--dark);
}

/* Info List */
.info-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.info-item i {
    width: 20px;
    color: var(--primary-color);
    margin-top: 0.2rem;
}

.info-item div {
    flex: 1;
}

.info-label {
    display: block;
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-bottom: 0.2rem;
}

.info-value {
    color: var(--dark);
    font-weight: 500;
}

/* Skills */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background: var(--gray-100);
    padding: 0.4rem 1rem;
    border-radius: 30px;
    font-size: 0.9rem;
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    background: var(--gray-50);
    transition: background 0.2s ease;
}

.activity-item:hover {
    background: var(--gray-100);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.activity-details {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.activity-time {
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* Forms */
.profile-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 1.5px solid var(--gray-200);
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.form-group small {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

/* Security Section */
.security-section {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.security-section h4 {
    color: var(--gray-700);
    margin-bottom: 1rem;
}

.security-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.5rem 0;
}

.security-info {
    flex: 1;
}

.security-label {
    font-weight: 600;
    color: var(--dark);
    margin-right: 1rem;
}

.security-status {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.security-status.verified {
    color: var(--secondary-color);
}

.danger-zone {
    border-color: var(--danger-color);
    background: #fff5f5;
}

/* Buttons */
.btn-edit-profile {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-edit-profile:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.btn-outline {
    background: none;
    border: 1.5px solid var(--gray-300);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-light);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: #d32f2f;
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

/* Addresses Grid */
.addresses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.address-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
}

.address-card.default {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.address-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--primary-color);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    font-size: 0.7rem;
}

/* Toggle Switches */
.toggle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
}

.toggle-item .note {
    margin-left: 1rem;
    color: var(--gray-500);
    font-size: 0.8rem;
}

.toggle-input {
    display: none;
}

.toggle-slider {
    width: 50px;
    height: 24px;
    background: var(--gray-300);
    border-radius: 30px;
    position: relative;
    transition: all 0.2s ease;
}

.toggle-slider:before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.2s ease;
}

.toggle-input:checked + .toggle-slider {
    background: var(--primary-color);
}

.toggle-input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-input:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* KYC Section */
.kyc-status-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    border-radius: 16px;
    background: var(--gray-50);
    margin-bottom: 2rem;
}

.kyc-status-icon {
    width: 60px;
    height: 60px;
    border-radius: 30px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-color);
}

.upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 1rem 0;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.upload-area i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-500);
}

.modal-body {
    padding: 1.5rem;
}

.warning-message {
    background: #fff3e0;
    color: #f97316;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Loading States */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--gray-500);
}

/* Account Badge */
.account-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 1rem;
    vertical-align: middle;
}

.account-badge.basic {
    background: var(--gray-200);
    color: var(--gray-700);
}

.account-badge.premium {
    background: linear-gradient(135deg, #ffd700, #ffa500);
    color: #000;
}

.account-badge.admin {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

/* Profile Title Section */
.profile-title-section {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

/* Verification Badge */
.verification-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    font-size: 0.7rem;
    margin-left: 0.5rem;
    background: var(--gray-200);
    color: var(--gray-600);
}

.verification-badge.verified {
    background: #e7f5e9;
    color: #2e7d32;
}

/* Email Display Group */
.email-display-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.email-display-group input {
    flex: 1;
    background: var(--gray-100);
}

.email-display-group .btn-outline {
    white-space: nowrap;
}

/* Phone Input Group */
.phone-input-group {
    display: flex;
    gap: 0.5rem;
}

.phone-input-group input {
    flex: 1;
}

.phone-verified {
    font-size: 0.8rem;
    color: var(--gray-600);
    margin-top: 0.25rem;
    display: block;
}

.phone-verified.verified {
    color: var(--secondary-color);
}

.phone-verified a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Password Requirements Note */
.password-requirements-note {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--gray-100);
    border-radius: 12px;
}

.password-requirements-note p {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.password-requirements-note ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.password-requirements-note li {
    font-size: 0.8rem;
    color: var(--gray-600);
}

/* Password Match Feedback */
.password-match-feedback {
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.password-match-feedback.match {
    color: var(--secondary-color);
}

.password-match-feedback.no-match {
    color: var(--danger-color);
}

/* Session Management */
.sessions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.session-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 12px;
    border: 1px solid var(--gray-200);
}

.session-item.current {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.session-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.session-details {
    flex: 1;
}

.session-device {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.current-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    font-size: 0.7rem;
}

.session-info {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--gray-600);
    margin-bottom: 0.25rem;
}

.session-info i {
    margin-right: 0.25rem;
}

.session-browser {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--white);
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: var(--gray-200);
}

.btn-icon.danger:hover {
    background: #fee2e2;
    color: var(--danger-color);
}

/* Login History */
.login-history {
    margin-top: 2rem;
}

.login-history h4 {
    margin-bottom: 1rem;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--white);
    border-radius: 8px;
    border: 1px solid var(--gray-200);
}

.history-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.history-icon.success {
    background: #e7f5e9;
    color: #2e7d32;
}

.history-icon.failed {
    background: #fee2e2;
    color: var(--danger-color);
}

.history-details {
    flex: 1;
}

.history-device {
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.failed-badge {
    margin-left: 0.5rem;
    background: var(--danger-color);
    color: white;
    padding: 0.1rem 0.4rem;
    border-radius: 20px;
    font-size: 0.7rem;
}

.history-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--gray-600);
}

.history-meta i {
    margin-right: 0.25rem;
}

/* KYC Status Badge */
.kyc-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 1rem;
}

.kyc-status-badge.not_started {
    background: var(--gray-200);
    color: var(--gray-700);
}

.kyc-status-badge.pending {
    background: #fff3e0;
    color: #f97316;
}

.kyc-status-badge.verified {
    background: #e7f5e9;
    color: #2e7d32;
}

.kyc-status-badge.rejected {
    background: #fee2e2;
    color: var(--danger-color);
}

.kyc-status-badge i {
    font-size: 1rem;
}

/* Info values with status */
.info-value.kyc-status.not_started {
    color: var(--gray-600);
}

.info-value.kyc-status.pending {
    color: #f97316;
}

.info-value.kyc-status.verified {
    color: #2e7d32;
}

.info-value.kyc-status.rejected {
    color: var(--danger-color);
}

/* Quick Actions Grid */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: center;
}

.quick-action-btn:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
    transform: translateY(-2px);
}

.quick-action-btn i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.quick-action-btn span {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--dark);
}

/* Preferences Section */
.preferences-section {
    margin-bottom: 2rem;
}

.preference-item {
    margin-bottom: 1rem;
}

.preference-item label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
}

.preference-item select {
    width: 100%;
    padding: 0.75rem;
    border: 1.5px solid var(--gray-200);
    border-radius: 10px;
    font-size: 0.95rem;
}

/* Theme Options */
.theme-options {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
}

.theme-option {
    flex: 1;
    cursor: pointer;
}

.theme-option input[type="radio"] {
    display: none;
}

.theme-preview {
    padding: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    text-align: center;
    transition: all 0.2s ease;
}

.theme-preview.light {
    background: #ffffff;
    color: #333;
}

.theme-preview.dark {
    background: #1a1f2e;
    color: #fff;
}

.theme-preview.system {
    background: linear-gradient(135deg, #fff 50%, #1a1f2e 50%);
    color: #333;
}

.theme-preview i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.theme-preview span {
    display: block;
    font-size: 0.8rem;
}

input[type="radio"]:checked + .theme-preview {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

/* File Upload Preview */
.file-preview {
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: 8px;
    background: var(--gray-100);
    max-width: 200px;
}

.file-preview img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.file-preview i {
    font-size: 2rem;
    color: var(--danger-color);
    margin-right: 0.5rem;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* Alert Styles */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-info {
    background: var(--primary-light);
    color: var(--primary-color);
}

.alert-warning {
    background: #fff3e0;
    color: #f97316;
}

/* Warning Button */
.btn-warning {
    background: #f97316;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-warning:hover {
    background: #ea580c;
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

/* Notifications */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

.notification {
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--box-shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 10px;
    animation: slideIn 0.3s ease;
    border-left: 4px solid;
    min-width: 300px;
    max-width: 400px;
}

.notification.success {
    border-left-color: var(--secondary-color);
}

.notification.success i {
    color: var(--secondary-color);
}

.notification.error {
    border-left-color: var(--danger-color);
}

.notification.error i {
    color: var(--danger-color);
}

.notification.info {
    border-left-color: var(--primary-color);
}

.notification.info i {
    color: var(--primary-color);
}

.notification.fade-out {
    animation: slideOut 0.3s ease forwards;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--gray-500);
    margin-left: auto;
    padding: 0 4px;
}

.notification-close:hover {
    color: var(--dark);
}

/* Profile Summary - Mobile Optimized */
.profile-summary-container {
    position: relative;
    z-index: 100;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
}

.profile-summary {
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.75rem 1rem;
}

.profile-summary-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.profile-avatar-medium {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary-color);
    font-size: 2rem;
    flex-shrink: 0;
}

.profile-avatar-medium img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info-compact {
    flex: 1;
    min-width: 0;
}

.profile-name {
    font-weight: 600;
    color: var(--dark);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.95rem;
}

/* Balance Container */
.balance-container {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
}

.balance-label {
    color: var(--gray-600);
    font-weight: 500;
}

.balance-amount {
    font-weight: 600;
    color: var(--primary-color);
}

.balance-amount.hidden-balance {
    letter-spacing: 2px;
    font-weight: normal;
    color: var(--gray-600);
}

.balance-toggle {
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    padding: 2px 4px;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s ease;
}

.balance-toggle:hover {
    color: var(--primary-color);
}

.profile-expand-icon {
    color: var(--gray-500);
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

/* Expanded state */
.profile-summary.expanded .profile-expand-icon {
    transform: rotate(180deg);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--gray-500);
    font-style: italic;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .profile-avatar-wrapper {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .profile-header-info {
        text-align: center;
        padding-top: 5rem;
    }
    
    .profile-meta {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .profile-sections-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .profile-title-section {
        flex-direction: column;
        align-items: center;
    }
    
    .account-badge {
        margin-left: 0;
        margin-top: 0.5rem;
    }
    
    .session-item {
        flex-wrap: wrap;
    }
    
    .session-info {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .password-requirements-note ul {
        grid-template-columns: 1fr;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .theme-options {
        flex-direction: column;
    }
    
    .email-display-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .phone-input-group {
        flex-direction: column;
    }
    
    .notification {
        min-width: 250px;
        max-width: 300px;
        left: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .security-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .profile-tabs {
        padding-bottom: 0;
    }
    
    .tab-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .history-meta {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .kyc-status-card {
        flex-direction: column;
        text-align: center;
    }
}

/* Dark Theme Support */
.dark-theme {
    --white: #1e293b;
    --gray-50: #0f172a;
    --gray-100: #1e293b;
    --gray-200: #334155;
    --gray-300: #475569;
    --gray-400: #64748b;
    --gray-500: #94a3b8;
    --gray-600: #cbd5e1;
    --gray-700: #e2e8f0;
    --dark: #f1f5f9;
    --primary-light: #1e3a8a;
}

.dark-theme .profile-card,
.dark-theme .stat-card,
.dark-theme .modal-content {
    background: var(--white);
    border-color: var(--gray-300);
}

.dark-theme .profile-header-card {
    background: linear-gradient(135deg, var(--white), var(--gray-100));
}

.dark-theme input,
.dark-theme select,
.dark-theme textarea {
    background: var(--gray-100);
    color: var(--dark);
    border-color: var(--gray-300);
}

.dark-theme .btn-outline {
    color: var(--gray-600);
    border-color: var(--gray-300);
}

.dark-theme .session-item,
.dark-theme .history-item,
.dark-theme .address-card {
    background: var(--gray-100);
    border-color: var(--gray-300);
}
/* ── Profile Page Layout ─────────────────────────────── */
.profile-container { max-width: 800px; margin: 0 auto; padding: 1.5rem 1rem 6rem; }

.profile-header-card { background: white; border-radius: 16px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); padding: 1.5rem; display: flex; align-items: flex-start; gap: 1.5rem; margin-bottom: 1.5rem; }

.profile-avatar-section { position: relative; flex-shrink: 0; }
.profile-avatar-large { width: 90px; height: 90px; min-width: 90px; border-radius: 50%; background: linear-gradient(135deg, #4361ee, #3730a3); display: flex; align-items: center; justify-content: center; font-size: 2.2rem; font-weight: 700; color: white; overflow: hidden; box-shadow: 0 4px 16px rgba(67,97,238,0.3); }
.profile-avatar-large img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar-upload-btn { position: absolute; bottom: 0; right: 0; width: 28px; height: 28px; background: #4361ee; border: 2px solid white; border-radius: 50%; color: white; font-size: 0.7rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.avatar-upload-btn:hover { background: #3730a3; }

.profile-header-info { flex: 1; min-width: 0; }
.profile-header-info h2 { font-size: 1.3rem; font-weight: 700; color: #1e293b; margin: 0 0 0.2rem; }
.profile-username { color: #64748b; font-size: 0.9rem; margin: 0 0 0.4rem; }
.profile-bio { color: #475569; font-size: 0.9rem; margin: 0 0 0.75rem; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }
.profile-meta span { font-size: 0.82rem; color: #64748b; }
.profile-meta i { color: #4361ee; margin-right: 0.25rem; }

.profile-tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; overflow-x: auto; padding-bottom: 0.25rem; scrollbar-width: none; }
.profile-tabs::-webkit-scrollbar { display: none; }
.tab-btn { display: flex; align-items: center; gap: 0.4rem; padding: 0.5rem 1rem; background: white; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 0.85rem; font-weight: 500; color: #64748b; cursor: pointer; white-space: nowrap; transition: all 0.2s; }
.tab-btn.active { background: #4361ee; color: white; border-color: #4361ee; }
.tab-btn:hover:not(.active) { background: #f1f5f9; color: #4361ee; }

.profile-card { background: white; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); margin-bottom: 1rem; overflow: hidden; }
.card-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid #f1f5f9; }
.card-header h3 { font-size: 0.95rem; font-weight: 600; color: #1e293b; margin: 0; }
.card-header h3 i { color: #4361ee; margin-right: 0.4rem; }
.card-body { padding: 1rem 1.25rem; }

.btn-edit { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.85rem; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 6px; font-size: 0.82rem; font-weight: 500; color: #475569; cursor: pointer; transition: all 0.2s; }
.btn-edit:hover { background: #e0e7ff; color: #4361ee; border-color: #4361ee; }
.btn-primary { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1.25rem; background: #4361ee; color: white; border: none; border-radius: 8px; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.btn-primary:hover { background: #3730a3; }

.info-row { display: flex; justify-content: space-between; align-items: center; padding: 0.6rem 0; border-bottom: 1px solid #f8fafc; }
.info-row:last-child { border-bottom: none; }
.info-label { font-size: 0.82rem; color: #94a3b8; font-weight: 500; }
.info-value { font-size: 0.9rem; color: #1e293b; font-weight: 500; text-align: right; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 500; color: #64748b; margin-bottom: 0.35rem; }
.form-input { width: 100%; padding: 0.6rem 0.85rem; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 0.9rem; color: #1e293b; transition: border-color 0.2s; box-sizing: border-box; }
.form-input:focus { outline: none; border-color: #4361ee; box-shadow: 0 0 0 3px rgba(67,97,238,0.1); }

.kyc-status { padding: 0.5rem 0; font-size: 0.9rem; color: #475569; }

@media (max-width: 480px) {
    .profile-header-card { flex-direction: column; align-items: center; text-align: center; }
    .profile-meta { justify-content: center; }
    .info-row { flex-direction: column; align-items: flex-start; gap: 0.2rem; }
    .info-value { text-align: left; }
}

/* ── Utility styles ──────────────────────────────────── */
.profile-summary-row { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.summary-item { flex: 1; min-width: 120px; background: white; border-radius: 10px; padding: 0.75rem 1rem; box-shadow: 0 2px 8px rgba(0,0,0,0.05); text-align: center; }
.summary-label { display: block; font-size: 0.75rem; color: #94a3b8; margin-bottom: 0.2rem; }
.summary-value { display: block; font-size: 0.9rem; font-weight: 600; color: #1e293b; }

.profile-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.badge { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.2rem 0.6rem; border-radius: 20px; font-size: 0.75rem; font-weight: 600; background: #e0e7ff; color: #4361ee; }
.badge-kyc { background: #dcfce7; color: #16a34a; }
.badge-email { background: #dcfce7; color: #16a34a; }

.profile-avatar-medium { display: none; }

.form-row { display: flex; gap: 1rem; }
.form-row .form-group { flex: 1; }

.form-actions { display: flex; gap: 0.75rem; margin-top: 1rem; flex-wrap: wrap; }
.btn-secondary { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.6rem 1.25rem; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 0.9rem; font-weight: 500; color: #475569; cursor: pointer; transition: all 0.2s; }
.btn-secondary:hover { background: #e2e8f0; }
.btn-danger { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1.25rem; background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; border-radius: 8px; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.btn-danger:hover { background: #dc2626; color: white; }

.strength-bar { height: 4px; background: #e2e8f0; border-radius: 2px; margin-top: 0.4rem; }
.strength-fill { height: 100%; border-radius: 2px; width: 0; transition: width 0.3s, background 0.3s; }
.strength-text { font-size: 0.78rem; color: #64748b; }
.feedback-text { font-size: 0.78rem; color: #dc2626; }

.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 0.6rem 0; border-bottom: 1px solid #f1f5f9; }
.toggle-row:last-child { border-bottom: none; }
.toggle-row label { font-size: 0.9rem; color: #1e293b; font-weight: 500; }
.toggle-input { width: 18px; height: 18px; cursor: pointer; accent-color: #4361ee; }

.success-text { color: #16a34a; font-size: 0.9rem; }
.warning-text { color: #d97706; font-size: 0.9rem; }
.error-text { color: #dc2626; font-size: 0.9rem; }

@media (max-width: 480px) {
    .form-row { flex-direction: column; gap: 0; }
    .profile-summary-row { gap: 0.4rem; }
    .summary-item { min-width: calc(50% - 0.2rem); }
}

/* ===== DARK MODE - PROFILE ===== */
html.dark-mode .profile-card,
html.dark-mode .profile-section { background: #1e293b; border-color: #334155; box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
html.dark-mode .profile-name { color: #f1f5f9; }
html.dark-mode .profile-username,
html.dark-mode .profile-bio { color: #94a3b8; }
html.dark-mode .profile-stat-value { color: #f1f5f9; }
html.dark-mode .profile-stat-label { color: #64748b; }
html.dark-mode .profile-tab { color: #94a3b8; border-bottom-color: transparent; }
html.dark-mode .profile-tab.active { color: #818cf8; border-bottom-color: #818cf8; }
html.dark-mode .profile-tab:hover { color: #818cf8; }
html.dark-mode .form-control { background: #0f172a; border-color: #334155; color: #e2e8f0; }
html.dark-mode .form-control:focus { border-color: #4361ee; }
html.dark-mode .form-label { color: #cbd5e1; }
html.dark-mode .section-title { color: #f1f5f9; border-bottom-color: #334155; }
