/* Profile Page Styles */

/* Profile Container */
.profile-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Profile Header */
.profile-header {
  position: relative;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 24px;
}

.profile-cover {
  height: 180px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  background-size: 200% 200%;
  animation: gradientShift 10s ease infinite;
  position: relative;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.cover-overlay {
  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='%23ffffff' fill-opacity='0.1'%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-header-content {
  display: flex;
  align-items: flex-end;
  padding: 0 32px 24px;
  margin-top: -60px;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
  gap: 24px;
}

.profile-avatar-wrapper {
  position: relative;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: 4px solid white;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: white;
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-upload-btn {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: white;
  border: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #667eea;
  transition: all 0.2s;
}

.avatar-upload-btn:hover {
  background: #667eea;
  color: white;
  transform: scale(1.1);
}

.profile-header-info {
  flex: 1;
  min-width: 200px;
}

.profile-header-info h1 {
  font-size: 28px;
  font-weight: 700;
  color: #2d3748;
  margin: 0 0 8px;
}

.profile-role,
.profile-joined {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #718096;
  margin: 4px 0;
}

.profile-role i,
.profile-joined i {
  width: 16px;
  text-align: center;
}

.profile-header-stats {
  display: flex;
  gap: 32px;
}

.header-stat {
  text-align: center;
}

.header-stat-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: #667eea;
}

.header-stat-label {
  font-size: 13px;
  color: #718096;
}

/* Profile Tabs */
.profile-tabs {
  display: flex;
  gap: 8px;
  background: white;
  padding: 8px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  margin-bottom: 24px;
  overflow-x: auto;
}

.profile-tab {
  flex: 1;
  min-width: 140px;
  padding: 12px 20px;
  border: none;
  background: transparent;
  color: #718096;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.profile-tab:hover {
  background: #f7fafc;
  color: #4a5568;
}

.profile-tab.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Tab Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Profile Grid */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* Profile Section */
.profile-section {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.profile-section.full-width {
  grid-column: 1 / -1;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e1e4e8;
}

.section-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: #2d3748;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-header h3 i {
  color: #667eea;
}

.btn-edit-section {
  padding: 8px 16px;
  border: 1px solid #e1e4e8;
  background: white;
  color: #718096;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-edit-section:hover {
  background: #f7fafc;
  color: #667eea;
  border-color: #667eea;
}

/* Form Styles */
.profile-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: #4a5568;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 14px;
  border: 1px solid #e1e4e8;
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s;
  background: white;
}

.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
  background: #f7fafc;
  color: #4a5568;
  cursor: not-allowed;
}

.form-group input:not(:disabled):focus,
.form-group select:not(:disabled):focus,
.form-group textarea:not(:disabled):focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid #e1e4e8;
  margin-top: 8px;
}

/* Password Input */
.password-input-wrapper {
  position: relative;
  display: flex;
}

.password-input-wrapper input {
  width: 100%;
  padding-right: 44px;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #a0aec0;
  cursor: pointer;
  padding: 4px;
}

.toggle-password:hover {
  color: #667eea;
}

/* Password Strength */
.password-strength {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.password-strength .strength-bar {
  flex: 1;
  height: 4px;
  background: #e1e4e8;
  border-radius: 2px;
  transition: all 0.2s;
}

.password-strength.weak .strength-bar:nth-child(1) {
  background: #e53e3e;
}

.password-strength.medium .strength-bar:nth-child(1),
.password-strength.medium .strength-bar:nth-child(2) {
  background: #ed8936;
}

.password-strength.strong .strength-bar:nth-child(1),
.password-strength.strong .strength-bar:nth-child(2),
.password-strength.strong .strength-bar:nth-child(3) {
  background: #48bb78;
}

.password-strength.very-strong .strength-bar {
  background: #38a169;
}

/* Security Options */
.security-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.security-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: #f7fafc;
  border-radius: 12px;
  gap: 16px;
}

.security-option-info h4 {
  font-size: 15px;
  font-weight: 600;
  color: #2d3748;
  margin: 0 0 4px;
}

.security-option-info p {
  font-size: 13px;
  color: #718096;
  margin: 0;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #cbd5e0;
  border-radius: 26px;
  transition: all 0.3s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

.btn-link {
  background: none;
  border: none;
  color: #667eea;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-link:hover {
  color: #5a67d8;
}

/* Sessions List */
.sessions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.session-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #f7fafc;
  border-radius: 12px;
}

.session-item.current {
  background: rgba(102, 126, 234, 0.08);
  border: 1px solid rgba(102, 126, 234, 0.2);
}

.session-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #667eea;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.session-info {
  flex: 1;
}

.session-device {
  font-size: 15px;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.session-device .badge-current {
  font-size: 11px;
  padding: 2px 8px;
  background: #d1fae5;
  color: #059669;
  border-radius: 4px;
  font-weight: 600;
}

.session-details {
  font-size: 13px;
  color: #718096;
}

.btn-revoke {
  padding: 8px 16px;
  border: 1px solid #e53e3e;
  background: white;
  color: #e53e3e;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-revoke:hover {
  background: #e53e3e;
  color: white;
}

/* Activity Timeline */
.activity-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.activity-filters select,
.activity-filters input {
  padding: 10px 14px;
  border: 1px solid #e1e4e8;
  border-radius: 8px;
  font-size: 14px;
  background: white;
}

.activity-timeline {
  position: relative;
  padding-left: 30px;
}

.activity-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e1e4e8;
}

.activity-item {
  position: relative;
  padding: 16px 20px;
  background: #f7fafc;
  border-radius: 12px;
  margin-bottom: 16px;
}

.activity-item::before {
  content: '';
  position: absolute;
  left: -26px;
  top: 22px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #667eea;
  border: 2px solid white;
  box-shadow: 0 0 0 2px #667eea;
}

.activity-item.login::before { background: #48bb78; box-shadow: 0 0 0 2px #48bb78; }
.activity-item.order::before { background: #4299e1; box-shadow: 0 0 0 2px #4299e1; }
.activity-item.product::before { background: #ed8936; box-shadow: 0 0 0 2px #ed8936; }
.activity-item.settings::before { background: #9f7aea; box-shadow: 0 0 0 2px #9f7aea; }

.activity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.activity-title {
  font-size: 15px;
  font-weight: 600;
  color: #2d3748;
  display: flex;
  align-items: center;
  gap: 8px;
}

.activity-title i {
  font-size: 14px;
}

.activity-time {
  font-size: 13px;
  color: #a0aec0;
}

.activity-description {
  font-size: 14px;
  color: #718096;
}

/* Notification Settings */
.notification-settings {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.notification-group h4 {
  font-size: 16px;
  font-weight: 600;
  color: #2d3748;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e1e4e8;
}

.notification-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.notification-option:last-child {
  border-bottom: none;
}

.notification-option-info span {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #2d3748;
}

.notification-option-info small {
  font-size: 13px;
  color: #718096;
}

.notification-channels {
  display: flex;
  gap: 16px;
}

.channel-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.channel-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: #667eea;
}

.channel-checkbox span {
  font-size: 13px;
  color: #4a5568;
  display: flex;
  align-items: center;
  gap: 4px;
}

.channel-checkbox span i {
  font-size: 12px;
  color: #a0aec0;
}

/* Buttons */
.btn-primary {
  padding: 12px 24px;
  border: none;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
  padding: 12px 24px;
  border: 1px solid #e1e4e8;
  background: white;
  color: #4a5568;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary:hover {
  background: #f7fafc;
  border-color: #cbd5e0;
}

/* Notification Toast */
.notification-toast {
  position: fixed;
  top: 80px;
  right: 20px;
  padding: 16px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10000;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.3s ease-out;
}

.notification-toast.show {
  opacity: 1;
  transform: translateX(0);
}

.notification-toast.success {
  border-left: 4px solid #48bb78;
}

.notification-toast.success i {
  color: #48bb78;
}

.notification-toast.error {
  border-left: 4px solid #e53e3e;
}

.notification-toast.error i {
  color: #e53e3e;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.breadcrumb a {
  color: #718096;
  text-decoration: none;
}

.breadcrumb a:hover {
  color: #667eea;
}

.breadcrumb span {
  color: #a0aec0;
}

.breadcrumb span:last-child {
  color: #2d3748;
  font-weight: 500;
}

/* Responsive */
@media (max-width: 992px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }
  
  .profile-section.full-width {
    grid-column: auto;
  }
  
  .profile-header-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .profile-header-info {
    width: 100%;
  }
  
  .profile-header-stats {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .profile-cover {
    height: 120px;
  }
  
  .profile-avatar {
    width: 100px;
    height: 100px;
    font-size: 40px;
  }
  
  .profile-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .profile-tab {
    min-width: 120px;
    flex: 0 0 auto;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .notification-option {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .session-item {
    flex-wrap: wrap;
  }
  
  .activity-filters {
    flex-direction: column;
  }
}

