.user-modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 10001; }
.user-modal.show { display: flex; align-items: center; justify-content: center; }
.user-modal-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); }
.user-modal-content { position: relative; background: #fff; border-radius: 16px; padding: 32px; width: 90%; max-width: 440px; max-height: 90vh; overflow-y: auto; z-index: 1; animation: modalSlideIn 0.3s ease; }
.user-modal-close { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; border: none; background: #f0f0f0; border-radius: 50%; cursor: pointer; font-size: 18px; display: flex; align-items: center; justify-content: center; }
.user-modal-header { text-align: center; margin-bottom: 24px; }
.user-modal-logo { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 22px; font-weight: 700; color: #333; margin-bottom: 16px; }
.user-modal-logo i { color: #667eea; }
.user-modal-header h2 { font-size: 22px; margin-bottom: 6px; }
.user-modal-header p { color: #888; font-size: 14px; }
.user-modal .form-group { margin-bottom: 16px; }
.user-modal .form-group label { display: block; margin-bottom: 6px; font-weight: 600; color: #333; font-size: 14px; }
.user-modal .input-icon { position: relative; }
.user-modal .input-icon i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #999; font-size: 15px; }
.user-modal .input-icon input { width: 100%; padding: 12px 14px 12px 40px; border: 2px solid #e9ecef; border-radius: 10px; font-size: 15px; box-sizing: border-box; }
.user-modal .input-icon input:focus { outline: none; border-color: #667eea; background: #f8f9ff; }
.user-modal .form-row { display: flex; gap: 12px; }
.user-modal .form-row .form-group { flex: 1; }
.user-modal .btn-submit { width: 100%; padding: 14px; background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; border: none; border-radius: 10px; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.user-modal .btn-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3); }
.user-modal .form-footer { text-align: center; margin-top: 20px; font-size: 14px; color: #666; }
.user-modal .form-footer a { color: #667eea; text-decoration: none; font-weight: 600; }
.size-guide-tabs { display: flex; gap: 0; background: #f0f0f0; border-radius: 10px; padding: 3px; margin-bottom: 20px; }
.size-tab { flex: 1; padding: 10px; text-align: center; border: none; background: transparent; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 14px; transition: all 0.3s; }
.size-tab.active { background: #fff; color: #667eea; box-shadow: 0 2px 6px rgba(0,0,0,0.06); }
.size-table { width: 100%; border-collapse: collapse; }
.size-table th { background: #f8f9fa; padding: 12px 14px; text-align: left; font-size: 13px; color: #555; border-bottom: 2px solid #e9ecef; }
.size-table td { padding: 10px 14px; border-bottom: 1px solid #f0f0f0; font-size: 14px; }
.size-table tr:hover td { background: #f8f9ff; }
.user-dropdown { position: relative; }
.user-btn { display: flex; align-items: center; gap: 8px; background: none; border: none; cursor: pointer; padding: 8px 12px; border-radius: 10px; transition: all 0.2s; }
.user-btn:hover { background: #f0f0f0; }
.user-avatar { width: 36px; height: 36px; background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; }
.user-name { font-size: 14px; font-weight: 600; color: #333; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-btn .fa-chevron-down { font-size: 10px; color: #999; transition: transform 0.2s; }
.user-btn:hover .fa-chevron-down { transform: rotate(180deg); }
.user-dropdown-menu { display: none; position: absolute; right: 0; top: 100%; margin-top: 8px; background: #fff; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,0.12); min-width: 220px; z-index: 1000; overflow: hidden; border: 1px solid #f0f0f0; }
.user-dropdown-menu.show { display: block; animation: fadeInDown 0.2s ease; }
.dropdown-item { display: flex; align-items: center; gap: 10px; padding: 12px 16px; color: #333; text-decoration: none; font-size: 14px; transition: background 0.2s; border: none; background: none; width: 100%; text-align: left; cursor: pointer; }
.dropdown-item:hover { background: #f8f9ff; }
.dropdown-item i { width: 18px; text-align: center; color: #667eea; }
.dropdown-divider { height: 1px; background: #f0f0f0; margin: 4px 0; }
.user-menu-container { display: flex; align-items: center; }
.header-link { display: flex; align-items: center; gap: 6px; color: #555; text-decoration: none; font-size: 14px; padding: 8px 12px; border-radius: 8px; transition: all 0.2s; }
.header-link:hover { background: #f0f0f0; color: #333; }
@keyframes modalSlideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeInDown { from { transform: translateY(-10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes slideInRight { from { transform: translateX(100px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOutRight { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100px); opacity: 0; } }
.user-dashboard { padding: 40px 0; min-height: 70vh; background: #f8f9fa; }
.dashboard-layout { display: grid; grid-template-columns: 280px 1fr; gap: 30px; }
.dashboard-sidebar { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); height: fit-content; position: sticky; top: 20px; }
.user-profile-card { text-align: center; padding-bottom: 20px; border-bottom: 1px solid #f0f0f0; margin-bottom: 16px; }
.profile-avatar { width: 70px; height: 70px; background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; margin: 0 auto 12px; }
.user-profile-card h3 { font-size: 18px; margin-bottom: 4px; }
.user-profile-card p { font-size: 13px; color: #888; }
.member-since { font-size: 12px; color: #aaa; margin-top: 6px; display: block; }
.dashboard-nav { display: flex; flex-direction: column; gap: 2px; }
.dash-nav { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; color: #555; text-decoration: none; font-size: 14px; font-weight: 500; transition: all 0.2s; }
.dash-nav:hover { background: #f0f0f0; color: #333; }
.dash-nav.active { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; }
.dash-nav i { width: 20px; text-align: center; }
.dashboard-content { min-height: 500px; }
.dash-section { display: none; }
.dash-section.active { display: block; animation: fadeIn 0.3s ease; }
.dash-card { background: #fff; border-radius: 12px; padding: 28px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); margin-bottom: 20px; }
.dash-card h2 { font-size: 20px; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.section-header-flex { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.profile-form .form-group { margin-bottom: 16px; }
.profile-form .form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px; color: #333; }
.profile-form .form-group input { width: 100%; padding: 12px 14px; border: 2px solid #e9ecef; border-radius: 10px; font-size: 15px; box-sizing: border-box; }
.profile-form .form-group input:focus { outline: none; border-color: #667eea; }
.profile-form .form-row { display: flex; gap: 16px; }
.profile-form .form-row .form-group { flex: 1; }
.btn-primary { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; border: none; border-radius: 10px; font-weight: 600; cursor: pointer; font-size: 14px; transition: all 0.2s; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3); }
.btn-danger { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; background: #ef4444; color: #fff; border: none; border-radius: 10px; font-weight: 600; cursor: pointer; font-size: 14px; }
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state i { font-size: 50px; color: #ddd; margin-bottom: 16px; display: block; }
.empty-state h3 { margin-bottom: 8px; color: #333; }
.empty-state p { color: #888; margin-bottom: 20px; }
.order-card { border: 1px solid #f0f0f0; border-radius: 12px; margin-bottom: 16px; overflow: hidden; }
.order-header { display: flex; justify-content: space-between; padding: 14px 20px; background: #f8f9fa; font-size: 14px; }
.order-id { font-weight: 700; color: #667eea; }
.order-date { color: #888; }
.order-items { padding: 12px 20px; }
.order-item { display: flex; gap: 12px; align-items: center; padding: 8px 0; }
.order-item img { width: 50px; height: 50px; object-fit: contain; border-radius: 6px; background: #f8f9fa; }
.order-item-info h4 { font-size: 14px; margin-bottom: 2px; }
.order-item-info p { font-size: 13px; color: #888; }
.order-footer { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-top: 1px solid #f0f0f0; }
.order-status { padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.order-status.processing { background: #fef3c7; color: #b45309; }
.order-status.shipped { background: #e0e7ff; color: #4338ca; }
.order-status.delivered { background: #d1fae5; color: #065f46; }
.order-total { font-weight: 700; color: #333; }
.wishlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.wishlist-item { background: #fff; border: 1px solid #f0f0f0; border-radius: 10px; overflow: hidden; position: relative; }
.wishlist-item img { width: 100%; height: 160px; object-fit: contain; background: #f8f9fa; }
.wishlist-item-info { padding: 12px; }
.wishlist-item-info h4 { font-size: 14px; margin-bottom: 6px; }
.wishlist-item-info h4 a { color: #333; text-decoration: none; }
.wishlist-item-info .price { color: #667eea; font-weight: 700; }
.btn-remove { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; border: none; background: #fee2e2; color: #ef4444; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.addresses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.address-card { border: 2px solid #e9ecef; border-radius: 12px; padding: 20px; position: relative; }
.address-card.default { border-color: #667eea; background: #f8f9ff; }
.default-badge { position: absolute; top: -10px; right: 16px; background: #667eea; color: #fff; font-size: 11px; padding: 3px 10px; border-radius: 10px; font-weight: 600; }
.address-card h4 { margin-bottom: 8px; }
.address-card p { font-size: 14px; color: #666; margin-bottom: 4px; }
.delivery-note { font-size: 13px; color: #667eea; margin-top: 8px; }
.address-actions { display: flex; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #f0f0f0; }
.address-actions button { padding: 6px 12px; border: 1px solid #e9ecef; border-radius: 8px; background: #fff; cursor: pointer; font-size: 13px; display: flex; align-items: center; gap: 4px; transition: all 0.2s; }
.address-actions button:hover { background: #f8f9ff; border-color: #667eea; }
.address-actions button.danger { color: #ef4444; border-color: #fee2e2; }
.address-actions button.danger:hover { background: #fef2f2; }
.recently-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.recently-item { background: #fff; border: 1px solid #f0f0f0; border-radius: 10px; overflow: hidden; text-decoration: none; transition: box-shadow 0.2s; }
.recently-item:hover { box-shadow: 0 4px 15px rgba(0,0,0,0.08); }
.recently-item img { width: 100%; height: 140px; object-fit: contain; background: #f8f9fa; }
.recently-info { padding: 10px 12px; }
.recently-info h4 { font-size: 13px; color: #333; margin-bottom: 4px; }
.recently-info .price { color: #667eea; font-weight: 700; font-size: 15px; }
.compare-table-wrap { overflow-x: auto; }
.compare-table { width: 100%; border-collapse: collapse; }
.compare-table th, .compare-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid #f0f0f0; }
.compare-table th { background: #f8f9fa; font-size: 14px; min-width: 160px; }
.compare-table th img { width: 80px; height: 80px; object-fit: contain; margin-bottom: 8px; }
.compare-table th h4 { font-size: 13px; margin-bottom: 4px; }
.btn-remove-sm { width: 24px; height: 24px; border-radius: 50%; border: none; background: #fee2e2; color: #ef4444; cursor: pointer; font-size: 12px; margin-top: 8px; }
.affiliate-link-box { display: flex; gap: 10px; }
.affiliate-link-box input { flex: 1; padding: 14px 16px; border: 2px solid #e9ecef; border-radius: 10px; font-size: 15px; }
.affiliate-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.stat-card { display: flex; align-items: center; gap: 16px; padding: 20px; background: #f8f9fa; border-radius: 12px; }
.stat-icon { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.stat-value { font-size: 22px; font-weight: 700; color: #333; display: block; }
.stat-label { font-size: 13px; color: #888; }
@media (max-width: 768px) {
    .dashboard-layout { grid-template-columns: 1fr; }
    .dashboard-sidebar { position: static; }
    .profile-form .form-row { flex-direction: column; gap: 0; }
    .addresses-grid { grid-template-columns: 1fr; }
    .affiliate-stats-grid { grid-template-columns: 1fr; }
}
