/* =============================================================================
   PROFIL - Styles
   ============================================================================= */

:root {
  --bg: #0f172a;
  --bg-light: #1e293b;
  --panel: #1e293b;
  --panel-darker: #0f172a;
  --border: #334155;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --orange: #f97316;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =============================================================================
   HEADER
   ============================================================================= */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

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

.header-center h1 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--orange);
  font-weight: 700;
  font-size: 1.2rem;
}

.header-brand i {
  font-size: 1.4rem;
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.back-btn:hover {
  background: var(--bg-light);
  border-color: var(--accent);
  color: var(--accent);
}

/* =============================================================================
   MAIN CONTENT
   ============================================================================= */
.main-content {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
}

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

/* =============================================================================
   SECTIONS
   ============================================================================= */
.profile-section {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.profile-section h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.profile-section h2 i {
  color: var(--orange);
}

/* =============================================================================
   INFO GRID
   ============================================================================= */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-item label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-item span {
  font-size: 0.95rem;
  color: var(--text);
}

/* =============================================================================
   NOTIFICATION TOGGLES
   ============================================================================= */
.notification-master {
  margin-bottom: 20px;
}

.notification-options {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.notification-options.hidden {
  display: none;
}

.notification-group {
  margin-bottom: 24px;
}

.notification-group:last-child {
  margin-bottom: 0;
}

.notification-group h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.notification-group h3 i {
  color: var(--accent);
  font-size: 0.85rem;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--panel-darker);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
}

.toggle-row.master-toggle {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.1) 0%, rgba(249, 115, 22, 0.05) 100%);
  border-color: var(--orange);
}

.toggle-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toggle-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}

.toggle-description {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.toggle-info-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.toggle-info-note i {
  color: var(--accent);
  margin-top: 2px;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border);
  transition: all 0.3s;
  border-radius: 26px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text);
  transition: all 0.3s;
  border-radius: 50%;
}

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

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

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

/* Notifications disabled message */
.notifications-disabled-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
}

.notifications-disabled-msg.hidden {
  display: none;
}

.notifications-disabled-msg i {
  font-size: 2.5rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.notifications-disabled-msg p {
  font-size: 0.9rem;
  line-height: 1.6;
}

/* =============================================================================
   TOAST
   ============================================================================= */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s ease;
}

.toast.success {
  border-left: 4px solid var(--success);
}

.toast.error {
  border-left: 4px solid var(--danger);
}

.toast.info {
  border-left: 4px solid var(--accent);
}

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

/* =============================================================================
   RESPONSIVE
   ============================================================================= */
@media (max-width: 768px) {
  .main-content {
    padding: 16px;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .toggle-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .toggle-switch {
    align-self: flex-end;
  }
}
