/* =====================================================
   CM Group Settings v3 - Unified Design System
   Matching products.css design tokens exactly
   ===================================================== */

:root {
  /* CM Brand Colors - EXACT match with products.css */
  --cm-blue: #024d8f;
  --cm-blue-dark: #013d6f;
  --cm-blue-light: #0a6bc4;
  
  /* Surfaces - EXACT match */
  --surface-primary: #ffffff;
  --surface-secondary: #f8f9fb;
  --surface-elevated: #ffffff;
  
  /* Text - EXACT match */
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;
  
  /* Borders - EXACT match */
  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;
  
  /* Status Colors - EXACT match */
  --accent-green: #10b981;
  --accent-orange: #f59e0b;
  --accent-red: #ef4444;
  
  /* Shadows - EXACT match */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  
  /* Radii - EXACT match */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* Transitions - EXACT match */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms ease;
}

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

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--surface-secondary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

/* ===== HEADER - EXACT MATCH WITH products.css ===== */
.header {
  background: transparent;
  border-bottom: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: background var(--transition-normal), box-shadow var(--transition-normal), backdrop-filter var(--transition-normal);
}

.header.scrolled {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border-light);
}

.header:hover {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 48px;
  display: flex;
  align-items: center;
  height: 72px;
  gap: 36px;
}

.header-logo img { height: 36px; }
.header-logo .logo-white { display: block; }
.header-logo .logo-color { display: none; }
.header.scrolled .header-logo .logo-white,
.header:hover .header-logo .logo-white { display: none; }
.header.scrolled .header-logo .logo-color,
.header:hover .header-logo .logo-color { display: block; }

.header-nav {
  display: flex;
  gap: 28px;
  list-style: none;
  align-items: center;
}

.header-nav > li {
  position: relative;
  display: flex;
  align-items: center;
}

.header-nav > li > a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
  transition: color var(--transition-fast);
}

.header-nav > li > a:hover { color: var(--cm-blue); }

.header-nav > li > a.locked {
  color: var(--text-tertiary);
  cursor: default;
}

.soon-badge {
  font-size: 9px;
  background: var(--surface-secondary);
  color: var(--text-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-left: 6px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.user-dropdown { position: relative; display: inline-flex; }
.user-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-primary);
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  font-family: inherit;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}
.user-dropdown-btn:hover { background: var(--surface-secondary); }
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--cm-blue);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-dropdown-btn svg { color: var(--text-tertiary); }

/* Mega Menu - EXACT match */
.mega-menu {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  background: var(--surface-elevated);
  border-top: 1px solid var(--border-light);
  box-shadow: var(--shadow-xl);
  z-index: 999;
}
.header-nav > li.open .mega-menu { display: block; }

.mega-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 48px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
}

.mega-col h4 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  padding-left: 12px;
}

.mega-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: background var(--transition-fast);
}
.mega-item:hover { background: var(--surface-secondary); }

.mega-item-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #e8f4fd 0%, #f0f7ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mega-item-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--cm-blue);
  fill: none;
  stroke-width: 1.5;
}

.mega-item-text h5 {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.mega-item-text p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.mega-overlay {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.1);
  z-index: 998;
}
.mega-overlay.active { display: block; }

/* ===== SETTINGS PAGE HEADER ===== */
.settings-page-header {
  background: linear-gradient(135deg, #0a1628 0%, #0f2847 50%, #1a3a5c 100%);
  padding: 100px 0 40px;
}

.settings-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 48px;
}

.settings-header-inner h1 {
  font-size: 28px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.settings-header-inner p {
  font-size: 15px;
  color: rgba(255,255,255,0.7);
}

/* ===== MAIN CONTAINER ===== */
.app-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 48px 80px;
}

/* ===== TABS - products.css style ===== */
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
}

.tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: calc(var(--radius-xl) - 4px);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tab svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

.tab:hover {
  color: var(--text-primary);
  background: var(--surface-secondary);
}

.tab.active {
  color: #fff;
  background: var(--cm-blue);
  font-weight: 600;
  box-shadow: var(--shadow-md);
}

/* ===== TAB PANELS ===== */
.tab-panel { display: none; animation: fadeIn 0.3s ease; }
.tab-panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ===== STATS ROW - Fintech Style (Light Background) ===== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  transition: all var(--transition-normal);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.5;
  fill: none;
}

/* Bloomberg-Inspired Investment Bank Colors */
.stat-icon-products {
  background: rgba(255,176,59,0.15);
}
.stat-icon-products svg { stroke: #FFB03B; }

.stat-icon-downloads {
  background: rgba(0,200,150,0.15);
}
.stat-icon-downloads svg { stroke: #00C896; }

.stat-icon-member {
  background: rgba(100,149,237,0.15);
}
.stat-icon-member svg { stroke: #6495ED; }

.stat-info { display: flex; flex-direction: column; }
.stat-value {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.stat-label {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ===== SECTIONS ===== */
.section { margin-bottom: 32px; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.section-action {
  font-size: 14px;
  font-weight: 600;
  color: var(--cm-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.section-action:hover { color: var(--cm-blue-dark); }
.section-badge {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  background: var(--surface-secondary);
  padding: 4px 12px;
  border-radius: 20px;
}

/* ===== SUBSCRIPTIONS GRID - Fintech Style (Light Background) ===== */
.subs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.sub-card {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-normal);
}

.sub-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}

.sub-card-img {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
}
.sub-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.sub-card:hover .sub-card-img img {
  transform: scale(1.08);
}

.sub-card-content { flex: 1; min-width: 0; }
.sub-card-content h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.sub-card-content p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Bloomberg-Inspired Badge Colors */
.sub-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sub-badge-active { background: rgba(0,200,150,0.15); color: #00C896; }
.sub-badge-expiring { background: rgba(255,176,59,0.15); color: #FFB03B; }
.sub-badge-expired { background: rgba(148,163,184,0.15); color: #94A3B8; }
.sub-badge svg { width: 8px; height: 8px; }

/* Pulse animation for live badge */
.pulse {
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

/* ===== ACTIONS GRID - Fintech Style (Light Background) ===== */
.actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.action-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  text-decoration: none;
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.action-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}

.action-card:hover .action-arrow { transform: translateX(4px); }

.action-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: var(--surface-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.action-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--text-secondary);
  stroke-width: 1.5;
  fill: none;
}

/* Bloomberg-Inspired Action Icon Colors */
.action-icon.icon-2fa {
  background: rgba(0,200,150,0.15);
}
.action-icon.icon-2fa svg { stroke: #00C896; }

.action-icon.icon-support {
  background: rgba(100,149,237,0.15);
}
.action-icon.icon-support svg { stroke: #6495ED; }

.action-text { flex: 1; min-width: 0; }
.action-text h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.action-text p {
  font-size: 13px;
  color: var(--text-tertiary);
}

.action-arrow {
  width: 20px;
  height: 20px;
  stroke: var(--text-tertiary);
  stroke-width: 1.5;
  fill: none;
  transition: transform var(--transition-fast);
}

/* ===== EMPTY STATE - products.css style ===== */
.empty-state {
  text-align: center;
  padding: 80px 40px;
  background: linear-gradient(135deg, var(--surface-secondary) 0%, #eef4fc 100%);
  border-radius: var(--radius-xl);
  border: 2px dashed var(--border-medium);
}

.empty-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  background: linear-gradient(135deg, var(--cm-blue) 0%, var(--cm-blue-light) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.empty-icon svg {
  width: 40px;
  height: 40px;
  stroke: #fff;
  stroke-width: 1.5;
  fill: none;
}

.empty-state h3 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.empty-state p {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

/* ===== PROFILE TAB - products.css style ===== */
.profile-container { max-width: 100%; }

.profile-avatar-section {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  margin-bottom: 24px;
  transition: all var(--transition-normal);
}

.profile-avatar-section:hover {
  box-shadow: var(--shadow-lg);
}

.large-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cm-blue) 0%, var(--cm-blue-light) 100%);
  color: #fff;
  font-size: 24px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar-info h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.avatar-info p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.member-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 5px 12px;
  background: linear-gradient(135deg, #e8f4fd 0%, #f0f7ff 100%);
  color: var(--cm-blue);
  border-radius: 20px;
}

.profile-form {
  background: var(--surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.form-section {
  padding: 24px;
  border-bottom: 1px solid var(--border-light);
}
.form-section:last-of-type { border-bottom: none; }
.form-section h3 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
  margin-bottom: 20px;
}

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

.form-field { margin-bottom: 16px; }
.form-field:last-child { margin-bottom: 0; }
.form-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.form-field input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--surface-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}
.form-field input:hover { border-color: var(--border-medium); }
.form-field input:focus {
  outline: none;
  border-color: var(--cm-blue);
  box-shadow: 0 0 0 3px rgba(2,77,143,0.1);
}

.form-static-field {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 42px;
  padding: 0 14px;
  background: var(--surface-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}
.form-static-field span {
  font-size: 14px;
  color: var(--text-primary);
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-green);
}
.verified-badge svg { stroke: var(--accent-green); fill: none; stroke-width: 2; }

.form-hint {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 6px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
}
.toggle-row:last-child { border-bottom: none; padding-bottom: 0; }
.toggle-row:first-of-type { padding-top: 0; }
.toggle-info h4 {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.toggle-info p {
  font-size: 13px;
  color: var(--text-tertiary);
}

.toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-track {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border-medium);
  border-radius: 24px;
  transition: all var(--transition-fast);
}
.toggle-track::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}
.toggle input:checked + .toggle-track { background: var(--cm-blue); }
.toggle input:checked + .toggle-track::before { transform: translateX(20px); }

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 24px;
  background: var(--surface-secondary);
  border-top: 1px solid var(--border-light);
}

/* ===== SECURITY TAB - products.css style ===== */
.security-container { max-width: 100%; }

.security-section {
  background: var(--surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  margin-bottom: 24px;
  overflow: hidden;
}

.security-section h3 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
  padding: 14px 20px;
  background: var(--surface-secondary);
  border-bottom: 1px solid var(--border-light);
}

.security-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--border-light);
}
.security-item:last-child { border-bottom: none; }

.security-item-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: var(--surface-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.security-item-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--text-secondary);
  stroke-width: 1.5;
  fill: none;
}

.security-item-icon.icon-shield {
  background: linear-gradient(135deg, rgba(16,185,129,0.15) 0%, rgba(16,185,129,0.08) 100%);
}
.security-item-icon.icon-shield svg { stroke: var(--accent-green); }

.security-item-content { flex: 1; min-width: 0; }
.security-item-content h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.security-item-content p {
  font-size: 13px;
  color: var(--text-tertiary);
}

.sessions-list { padding: 0 20px; }
.session-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
}
.session-item:last-child { border-bottom: none; }

.session-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--surface-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.session-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-secondary);
  stroke-width: 1.5;
  fill: none;
}

.session-info { flex: 1; }
.session-info h4 {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.session-info p {
  font-size: 13px;
  color: var(--text-tertiary);
}

.session-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 5px 12px;
  background: var(--accent-green);
  color: #fff;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.danger-zone { border-color: rgba(239,68,68,0.3); }
.danger-zone h3 {
  background: rgba(239,68,68,0.1);
  color: var(--accent-red);
}

.danger-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
}
.danger-content h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.danger-content p {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ===== BILLING TAB - products.css style ===== */
.billing-container { max-width: 100%; }
.billing-summary { margin-bottom: 32px; }

.billing-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.billing-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border-light);
}
.billing-card-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.plan-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 5px 12px;
  background: linear-gradient(135deg, #e8f4fd 0%, #f0f7ff 100%);
  color: var(--cm-blue);
  border-radius: 20px;
}

.billing-card-body { padding: 20px; }
.billing-card-body p {
  font-size: 14px;
  color: var(--text-secondary);
}

.history-list, .downloads-list {
  background: var(--surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.history-item, .download-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
}
.history-item:last-child, .download-item:last-child { border-bottom: none; }

.history-item-info h4, .download-item-info h4 {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.history-item-info p, .download-item-info p {
  font-size: 13px;
  color: var(--text-tertiary);
}
.history-date, .download-date {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ===== BUTTONS - products.css style ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 24px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: var(--cm-blue);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-md);
}
.btn-primary:hover {
  background: var(--cm-blue-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.btn-primary svg { stroke: currentColor; fill: none; stroke-width: 2; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-secondary:hover {
  background: var(--surface-secondary);
  border-color: var(--cm-blue);
  color: var(--cm-blue);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--surface-secondary);
}

.btn-danger-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  color: var(--accent-red);
  background: transparent;
  border: 1px solid var(--accent-red);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-danger-outline:hover {
  color: #fff;
  background: var(--accent-red);
}

.btn-full { width: 100%; }

/* ===== MODALS - products.css style ===== */
.modal {
  position: fixed;
  inset: 0;
  margin: auto;
  width: 480px;
  max-width: calc(100% - 32px);
  max-height: calc(100% - 32px);
  padding: 0;
  border: none;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  background: var(--surface-elevated);
  overflow: hidden;
}
.modal::backdrop {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(4px);
}
.modal-lg { width: 640px; }

.modal-content { padding: 28px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.modal-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-secondary);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.modal-close:hover { background: var(--border-light); }
.modal-close svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-secondary);
  stroke-width: 2;
  fill: none;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}

.input-password { position: relative; }
.input-password input { padding-right: 44px; }

.pw-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.pw-toggle:hover { background: var(--surface-secondary); }
.pw-toggle svg {
  width: 18px;
  height: 18px;
  stroke: var(--text-tertiary);
  stroke-width: 1.5;
  fill: none;
}
.pw-toggle .eye-closed { display: none; }
.pw-toggle.active .eye-open { display: none; }
.pw-toggle.active .eye-closed { display: block; }

.password-strength { margin-top: 10px; }
.strength-bar {
  height: 4px;
  background: var(--border-light);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
}
.strength-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--cm-blue);
  border-radius: 2px;
  transition: width 0.3s ease, background 0.3s ease;
}
.strength-bar.weak span { width: 33%; background: var(--accent-red); }
.strength-bar.medium span { width: 66%; background: var(--accent-orange); }
.strength-bar.strong span { width: 100%; background: var(--accent-green); }
.strength-text { font-size: 12px; color: var(--text-tertiary); }

.mfa-setup { display: flex; flex-direction: column; gap: 24px; }
.mfa-step { display: flex; gap: 16px; }
.step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8f4fd 0%, #f0f7ff 100%);
  color: var(--cm-blue);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step-content { flex: 1; }
.step-content h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.step-content p {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

.qr-box {
  display: inline-block;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.secret-code {
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1px;
  padding: 12px 16px;
  background: var(--surface-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.otp-input { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.otp-input input {
  width: 42px;
  height: 52px;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  font-family: 'SF Mono', Monaco, monospace;
  background: var(--surface-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}
.otp-input input:focus {
  outline: none;
  border-color: var(--cm-blue);
  box-shadow: 0 0 0 3px rgba(2,77,143,0.1);
}
.otp-separator { color: var(--text-tertiary); font-weight: 500; }

/* ===== TOAST - products.css style ===== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--text-primary);
  color: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  font-size: 14px;
  font-weight: 500;
  animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
}
.toast.toast-success { background: var(--accent-green); }
.toast.toast-error { background: var(--accent-red); }

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

/* ===== FOOTER - products.css style ===== */
.footer {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 48px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface-primary);
}

.footer p {
  font-size: 13px;
  color: var(--text-tertiary);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-links a:hover { color: var(--cm-blue); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .header-inner { padding: 0 20px; }
  .settings-header-inner { padding: 0 20px; }
  .app-container { padding: 24px 20px 60px; }
  .stats-row { grid-template-columns: 1fr; }
  .subs-grid, .actions-grid { grid-template-columns: 1fr; }
  .tabs { overflow-x: auto; gap: 0; }
  .tab { flex: none; padding: 12px 20px; }
  .form-row { grid-template-columns: 1fr; }
  .modal { width: 100%; max-width: 100%; max-height: 100%; border-radius: 0; }
  .footer { flex-direction: column; gap: 16px; text-align: center; }
  .frequency-options { grid-template-columns: 1fr; }
  .notif-group-header { flex-wrap: wrap; }
  .notif-item { flex-wrap: wrap; gap: 12px; }
}

/* ===== NOTIFICATIONS TAB ===== */
.notifications-container {
  max-width: 100%;
}

/* Master Toggle Section */
.notif-master-section {
  background: var(--surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  margin-bottom: 24px;
  overflow: hidden;
}

.notif-master {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
}

.notif-master-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--cm-blue), var(--cm-blue-light));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-master-icon svg {
  width: 24px;
  height: 24px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
}

.notif-master-info {
  flex: 1;
}

.notif-master-info h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.notif-master-info p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Notification Groups */
.notif-groups {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.notif-group {
  background: var(--surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: box-shadow var(--transition-fast);
}

.notif-group:hover {
  box-shadow: var(--shadow-md);
}

.notif-group-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.notif-group-header:hover {
  background: var(--surface-secondary);
}

.notif-group-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--surface-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-group-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--cm-blue);
  fill: none;
  stroke-width: 2;
}

.notif-group-info {
  flex: 1;
}

.notif-group-info h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.notif-group-info p {
  font-size: 13px;
  color: var(--text-secondary);
}

.notif-group-badge {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface-secondary);
  padding: 4px 10px;
  border-radius: 12px;
}

.notif-chevron {
  width: 20px;
  height: 20px;
  stroke: var(--text-tertiary);
  fill: none;
  stroke-width: 2;
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.notif-group.expanded .notif-chevron {
  transform: rotate(180deg);
}

/* Notification Items */
.notif-group-items {
  border-top: 1px solid var(--border-light);
  background: var(--surface-secondary);
}

.notif-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 14px 76px;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition-fast);
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item:hover {
  background: rgba(255,255,255,0.5);
}

.notif-item-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.notif-item-info h5 {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.notif-item-info p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Priority Indicators */
.notif-priority {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.notif-priority.critical {
  background: var(--accent-red);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.notif-priority.high {
  background: var(--accent-orange);
}

.notif-priority.normal {
  background: var(--cm-blue);
}

.notif-priority.low {
  background: var(--text-tertiary);
}

/* Locked Items */
.notif-item-locked {
  background: rgba(255,255,255,0.3);
}

.notif-item-locked h5::after {
  content: 'Required';
  font-size: 9px;
  background: var(--surface-secondary);
  color: var(--text-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.toggle-locked .toggle-track {
  background: var(--cm-blue);
  opacity: 0.6;
  cursor: not-allowed;
}

/* Email Frequency Section */
.notif-frequency-section {
  background: var(--surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 24px;
}

.notif-frequency-section h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.notif-frequency-section .section-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.frequency-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.frequency-option {
  cursor: pointer;
}

.frequency-option input {
  display: none;
}

.frequency-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 16px;
  background: var(--surface-secondary);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
  text-align: center;
}

.frequency-option:hover .frequency-card {
  border-color: var(--cm-blue);
}

.frequency-option input:checked + .frequency-card {
  border-color: var(--cm-blue);
  background: rgba(2, 77, 143, 0.05);
}

.frequency-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
}

.frequency-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-secondary);
  fill: none;
  stroke-width: 2;
}

.frequency-option input:checked + .frequency-card .frequency-icon {
  background: var(--cm-blue);
}

.frequency-option input:checked + .frequency-card .frequency-icon svg {
  stroke: #fff;
}

.frequency-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.frequency-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Save Actions */
.notif-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
