/* ============================================================
   RAMEXA WEB APP — Styles
   Mouse-following overlay + Dashboard panels
   Design: Noir & Violet Cosmos (matches landing page)
   ============================================================ */

:root {
  --bg-primary: #050510;
  --bg-secondary: #0a0a1a;
  --glass-bg: linear-gradient(135deg, rgba(20, 10, 40, 0.65) 0%, rgba(10, 5, 25, 0.55) 50%, rgba(25, 15, 50, 0.60) 100%);
  --glass-border: linear-gradient(160deg, rgba(180, 120, 255, 0.35) 0%, rgba(255,255,255,0.06) 40%, rgba(140, 80, 255, 0.22) 100%);
  --accent: #a855f7;
  --accent-light: #c084fc;
  --accent-glow: rgba(168, 85, 247, 0.3);
  --violet-deep: #7c3aed;
  --violet-bright: #d946ef;
  --text-primary: rgba(255,255,255,0.95);
  --text-secondary: rgba(255,255,255,0.55);
  --text-muted: rgba(255,255,255,0.30);
  --success: #4CD964;
  --danger: #FF3B30;
  --warning: #FF9500;
  --radius: 16px;
  --radius-sm: 12px;
}

/* ============================================================
   MOUSE-FOLLOWING OVERLAY
   ============================================================ */

#ramexa-overlay {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#ramexa-overlay.visible {
  opacity: 1;
}

#ramexa-overlay > * {
  pointer-events: auto;
}

/* --- Glass Panel (shared) --- */
.ramexa-glass-panel {
  position: relative;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(30, 30, 40, 0.85) 0%, rgba(20, 20, 30, 0.78) 50%, rgba(30, 30, 45, 0.82) 100%);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.35), 0 0 1px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  overflow: hidden;
}

.ramexa-glass-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  padding: 1.5px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.08) 40%, rgba(255, 255, 255, 0.20) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}

/* --- Input Frame --- */
#ramexa-glass-frame {
  width: 260px;
  height: 44px;
  display: flex;
  align-items: center;
  padding: 0 14px;
}

#ramexa-glass-frame:focus-within {
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(168, 85, 247, 0.3), 0 0 12px rgba(168, 85, 247, 0.12);
}

#ramexa-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #FFFFFF;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  caret-color: rgba(168, 133, 247, 0.9);
  position: relative;
  z-index: 2;
}

#ramexa-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
  font-weight: 400;
}

/* --- Spinner --- */
#ramexa-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 36px;
  height: 36px;
}

#ramexa-spinner::before {
  content: '';
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(30, 30, 40, 0.85) 0%, rgba(20, 20, 30, 0.78) 100%);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(24px);
}

#ramexa-spinner::after {
  content: '';
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  background: linear-gradient(160deg, rgba(255,255,255,0.45), rgba(255,255,255,0.08), rgba(255,255,255,0.20)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

#ramexa-spinner-canvas {
  position: relative;
  z-index: 1;
}

/* --- Success --- */
#ramexa-success {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 36px;
  height: 36px;
}

#ramexa-success::before {
  content: '';
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(30, 30, 40, 0.85) 0%, rgba(20, 20, 30, 0.78) 100%);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(24px);
}

#ramexa-success svg {
  position: relative;
  z-index: 1;
}

/* --- Result Frame --- */
#ramexa-result-frame {
  width: 360px;
  max-height: 280px;
  padding: 4px;
  position: relative;
}

.ramexa-copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 6px;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.ramexa-copy-btn:hover {
  background: rgba(168, 85, 247, 0.4);
  color: white;
}

.ramexa-scroll-area {
  max-height: 268px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.ramexa-scroll-area::-webkit-scrollbar { width: 4px; }
.ramexa-scroll-area::-webkit-scrollbar-track { background: transparent; }
.ramexa-scroll-area::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 4px; }

.ramexa-result-label {
  color: rgba(255, 255, 255, 0.92);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 12px;
  line-height: 18px;
  padding: 10px 12px;
  word-wrap: break-word;
  white-space: pre-wrap;
  position: relative;
  z-index: 2;
}

.hidden { display: none !important; }

/* ============================================================
   NAVIGATION AUTH AREA
   ============================================================ */

.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 10px;
  padding: 6px 12px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
}

.nav-user-btn:hover {
  background: rgba(168, 85, 247, 0.2);
}

.nav-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-avatar-letter {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--violet-bright));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
}

.nav-user-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-icon-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.nav-icon-btn:hover {
  background: rgba(168, 85, 247, 0.15);
  color: var(--accent-light);
  border-color: rgba(168, 85, 247, 0.3);
}

/* ============================================================
   AUTH MODAL
   ============================================================ */

#auth-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}

#auth-modal.hidden { display: none; }

.auth-card {
  width: 400px;
  max-width: 90vw;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(20, 10, 40, 0.95) 0%, rgba(10, 5, 25, 0.9) 100%);
  border: 1px solid rgba(168, 85, 247, 0.2);
  padding: 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.auth-card h2 {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.auth-card .auth-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
}

.auth-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
}

.auth-field {
  margin-bottom: 16px;
}

.auth-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.auth-field input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.auth-field input:focus {
  border-color: var(--accent);
}

.auth-error {
  color: var(--danger);
  font-size: 13px;
  margin-bottom: 12px;
  min-height: 18px;
}

.auth-submit {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--violet-deep));
  border: none;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.auth-submit:hover { opacity: 0.9; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.1);
}

.auth-oauth-btns {
  display: flex;
  gap: 10px;
}

.auth-oauth-btn {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.auth-oauth-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(168, 85, 247, 0.3);
}

.auth-switch {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

.auth-switch a {
  color: var(--accent-light);
  text-decoration: none;
  cursor: pointer;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* ============================================================
   DASHBOARD PANEL
   ============================================================ */

#panel-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

#panel-overlay.hidden { display: none; }

#panel-container {
  width: 520px;
  max-width: 90vw;
  height: 100vh;
  background: linear-gradient(180deg, #0a0a1a 0%, #050510 100%);
  border-left: 1px solid rgba(168, 85, 247, 0.15);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 85, 247, 0.2) transparent;
}

#panel-container::-webkit-scrollbar { width: 6px; }
#panel-container::-webkit-scrollbar-track { background: transparent; }
#panel-container::-webkit-scrollbar-thumb { background: rgba(168, 85, 247, 0.2); border-radius: 6px; }

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.panel-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.panel-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 28px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.panel-close:hover { color: var(--text-primary); }

.panel-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  overflow-x: auto;
  flex-shrink: 0;
}

.panel-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.panel-tab:hover {
  background: rgba(168, 85, 247, 0.1);
  color: var(--text-primary);
}

.panel-tab.active {
  background: rgba(168, 85, 247, 0.2);
  color: var(--accent-light);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.panel-content {
  flex: 1;
  padding: 20px 24px;
  overflow-y: auto;
  min-height: 0;
}

.panel-loading {
  text-align: center;
  color: var(--text-secondary);
  padding: 40px 0;
}

.panel-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 0;
  line-height: 1.6;
}

.panel-error {
  color: var(--danger);
  padding: 20px;
  text-align: center;
}

.panel-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.panel-input:focus { border-color: var(--accent); }

.panel-textarea {
  resize: vertical;
  min-height: 80px;
}

.panel-btn {
  padding: 10px 20px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(217, 70, 239, 0.2));
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: var(--accent-light);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
}

.panel-btn:hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.4), rgba(217, 70, 239, 0.3));
}

.panel-btn-secondary {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
  color: var(--text-secondary);
  margin-left: 8px;
}

.panel-btn-danger {
  background: rgba(255, 59, 48, 0.15);
  border-color: rgba(255, 59, 48, 0.3);
  color: var(--danger);
}

.panel-btn-sm {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.panel-btn-sm:hover { background: rgba(255,255,255,0.1); }

/* ============================================================
   HISTORY
   ============================================================ */

.history-search { margin-bottom: 16px; }

.history-list { display: flex; flex-direction: column; gap: 8px; }

.history-item {
  padding: 12px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  transition: border-color 0.2s;
}

.history-item:hover { border-color: rgba(168, 85, 247, 0.2); }

.history-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.history-prompt {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

.history-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.history-fav, .history-copy, .history-del {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 14px;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
}

.history-fav:hover, .history-fav.active { color: #FFCC00; }
.history-copy:hover { color: var(--accent-light); }
.history-del:hover { color: var(--danger); }

.history-preview {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 6px;
}

.history-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted);
}

.history-type {
  background: rgba(168, 85, 247, 0.15);
  padding: 1px 8px;
  border-radius: 4px;
  color: var(--accent-light);
}

/* ============================================================
   STATS
   ============================================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  text-align: center;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent-light);
  margin-bottom: 4px;
}

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

.stats-subtitle {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.stats-types { margin-bottom: 24px; }

.stat-type-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 4px;
}

.stat-type-row:nth-child(odd) { background: rgba(255,255,255,0.02); }

.stat-type-name { color: var(--text-secondary); font-size: 13px; }
.stat-type-count { color: var(--accent-light); font-weight: 600; font-size: 13px; }

.stats-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 100px;
  margin-bottom: 24px;
  padding: 8px 0;
}

.chart-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.chart-bar {
  width: 100%;
  min-height: 2px;
  background: linear-gradient(180deg, var(--accent), var(--violet-deep));
  border-radius: 3px 3px 0 0;
  transition: height 0.3s ease;
}

.chart-label {
  font-size: 8px;
  color: var(--text-muted);
  margin-top: 4px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.stats-meta {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ============================================================
   SETTINGS
   ============================================================ */

/* --- Settings Profile Card --- */
.settings-profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  margin-bottom: 24px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.08) 0%, rgba(217, 70, 239, 0.05) 100%);
  border: 1px solid rgba(168, 85, 247, 0.15);
}

.settings-avatar-wrap {
  flex-shrink: 0;
}

.settings-avatar-img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(168, 85, 247, 0.3);
}

.settings-avatar-letter {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--violet-bright));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: white;
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.3);
}

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

.settings-profile-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-profile-email {
  font-size: 13px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-profile-date {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.settings-section {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.settings-section:last-child { border-bottom: none; }

.settings-section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.settings-section h3 svg {
  color: var(--accent-light);
  flex-shrink: 0;
}

.settings-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.settings-field {
  margin-bottom: 14px;
}

.settings-field label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.settings-field label input[type="checkbox"] {
  margin-right: 8px;
  accent-color: var(--accent);
}

.settings-field-hint {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.settings-pref-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.settings-toggles {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.settings-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
  color: var(--text-secondary);
}

.settings-toggle:hover {
  background: rgba(168, 85, 247, 0.06);
  border-color: rgba(168, 85, 247, 0.15);
}

.settings-toggle input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

.settings-toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-toggle-label svg {
  color: var(--accent-light);
}

/* --- Danger Zone --- */
.settings-danger-zone {
  border-bottom: none !important;
  margin-top: 8px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 59, 48, 0.04);
  border: 1px solid rgba(255, 59, 48, 0.12) !important;
}

.settings-danger-zone h3 {
  color: var(--danger) !important;
}

.settings-danger-zone h3 svg {
  color: var(--danger) !important;
}

.settings-danger-actions {
  display: flex;
  gap: 10px;
}

.panel-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.panel-btn svg {
  flex-shrink: 0;
}

.field-error {
  color: var(--danger);
  font-size: 12px;
  margin: 4px 0;
  min-height: 16px;
}

@media (max-width: 640px) {
  .settings-pref-grid { grid-template-columns: 1fr; }
  .settings-profile-card { flex-direction: column; text-align: center; }
}

/* ============================================================
   TASKS
   ============================================================ */

.tasks-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.tasks-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.tasks-list { display: flex; flex-direction: column; gap: 10px; }

.task-item {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.task-item.paused { opacity: 0.6; }
.task-item.completed { border-color: rgba(76, 217, 100, 0.2); }
.task-item.failed { border-color: rgba(255, 59, 48, 0.2); }

.task-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

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

.task-status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.task-status-badge.active { background: rgba(76, 217, 100, 0.15); color: var(--success); }
.task-status-badge.paused { background: rgba(255, 149, 0, 0.15); color: var(--warning); }
.task-status-badge.completed { background: rgba(76, 217, 100, 0.15); color: var(--success); }
.task-status-badge.failed { background: rgba(255, 59, 48, 0.15); color: var(--danger); }

.task-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.task-detail {
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  padding: 2px 8px;
  border-radius: 4px;
}

.task-actions {
  display: flex;
  gap: 8px;
}

/* ============================================================
   NOTIFICATIONS
   ============================================================ */

.ramexa-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  z-index: 100000;
  opacity: 0;
  transition: all 0.3s ease;
  backdrop-filter: blur(20px);
}

.ramexa-notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.ramexa-notification.success {
  background: rgba(76, 217, 100, 0.2);
  border: 1px solid rgba(76, 217, 100, 0.3);
  color: var(--success);
}

.ramexa-notification.error {
  background: rgba(255, 59, 48, 0.2);
  border: 1px solid rgba(255, 59, 48, 0.3);
  color: var(--danger);
}

.ramexa-notification.warning {
  background: rgba(255, 149, 0, 0.2);
  border: 1px solid rgba(255, 149, 0, 0.3);
  color: var(--warning);
}

.ramexa-notification.info {
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: var(--accent-light);
}

/* ============================================================
   SHORTCUT HINT (bottom of page)
   ============================================================ */

.shortcut-hint {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 10px;
  background: rgba(20, 10, 40, 0.7);
  border: 1px solid rgba(168, 85, 247, 0.2);
  backdrop-filter: blur(16px);
  color: var(--text-secondary);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.shortcut-hint:hover {
  border-color: rgba(168, 85, 247, 0.4);
  color: var(--accent-light);
}

.shortcut-hint kbd {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  font-family: monospace;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 640px) {
  #panel-container { width: 100vw; }

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

  .auth-card { padding: 24px 16px; }

  .auth-oauth-btns { flex-direction: column; }

  #ramexa-overlay { display: none; }

  .shortcut-hint { display: none; }
}

/* ============================================================
   DRAG-AND-DROP UPLOAD ZONE
   ============================================================ */

.ramexa-dropzone {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 5, 16, 0.85);
  backdrop-filter: blur(12px);
  transition: opacity 200ms ease;
}

.ramexa-dropzone.hidden {
  opacity: 0;
  pointer-events: none;
}

.ramexa-dropzone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 48px 64px;
  border-radius: var(--radius);
  border: 2px dashed rgba(168, 85, 247, 0.5);
  background: linear-gradient(135deg, rgba(20, 10, 40, 0.6), rgba(10, 5, 25, 0.5));
  box-shadow: 0 0 60px rgba(168, 85, 247, 0.15);
  text-align: center;
  animation: dropzonePulse 2s ease-in-out infinite;
}

.ramexa-dropzone-inner p {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent-light);
  margin: 0;
}

.ramexa-dropzone-inner span {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

@keyframes dropzonePulse {
  0%, 100% { border-color: rgba(168, 85, 247, 0.5); box-shadow: 0 0 60px rgba(168, 85, 247, 0.15); }
  50% { border-color: rgba(217, 70, 239, 0.6); box-shadow: 0 0 80px rgba(217, 70, 239, 0.2); }
}

/* ── Custom Context Menu ── */
.ramexa-context-menu {
  position: fixed;
  z-index: 100000;
  min-width: 200px;
  background: rgba(15, 10, 30, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 12px;
  padding: 6px 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transition: opacity 0.15s, transform 0.15s;
}
.ramexa-context-menu.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.95);
}
.ramexa-context-action {
  display: block;
  width: 100%;
  padding: 8px 16px;
  background: transparent;
  border: none;
  color: var(--text-primary, #e8e0f0);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}
.ramexa-context-action:hover {
  background: rgba(168, 85, 247, 0.2);
}

/* ============================================================
   STATUS OVERLAY (standalone modal)
   ============================================================ */

#status-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
}

#status-overlay.hidden { display: none; }

#status-modal {
  width: 460px;
  max-width: 92vw;
  max-height: 85vh;
  background: linear-gradient(180deg, #0c0a1e 0%, #060510 100%);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5), 0 0 40px rgba(168, 85, 247, 0.08);
}

.status-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.status-modal-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary, rgba(255, 255, 255, 0.95));
}

.status-modal-body {
  padding: 20px 24px 24px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.status-overview {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  margin-bottom: 24px;
  border-radius: var(--radius, 14px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.status-overview.status-ok {
  background: linear-gradient(135deg, rgba(76, 217, 100, 0.08) 0%, rgba(52, 199, 89, 0.04) 100%);
  border-color: rgba(76, 217, 100, 0.2);
}

.status-overview.status-degraded {
  background: linear-gradient(135deg, rgba(255, 204, 0, 0.08) 0%, rgba(255, 149, 0, 0.04) 100%);
  border-color: rgba(255, 204, 0, 0.2);
}

.status-overview.status-down {
  background: linear-gradient(135deg, rgba(255, 59, 48, 0.08) 0%, rgba(255, 69, 58, 0.04) 100%);
  border-color: rgba(255, 59, 48, 0.2);
}

.status-indicator {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
}

.status-indicator::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  animation: statusPulse 2s ease-in-out infinite;
}

.status-indicator-ok {
  background: #4CD964;
  box-shadow: 0 0 12px rgba(76, 217, 100, 0.4);
}

.status-indicator-ok::after {
  border: 2px solid rgba(76, 217, 100, 0.3);
}

.status-indicator-degraded {
  background: #FFCC00;
  box-shadow: 0 0 12px rgba(255, 204, 0, 0.4);
}

.status-indicator-degraded::after {
  border: 2px solid rgba(255, 204, 0, 0.3);
}

.status-indicator-down {
  background: #FF3B30;
  box-shadow: 0 0 12px rgba(255, 59, 48, 0.4);
}

.status-indicator-down::after {
  border: 2px solid rgba(255, 59, 48, 0.3);
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.15); }
}

.status-overview-text { flex: 1; min-width: 0; }

.status-overview-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary, rgba(255, 255, 255, 0.95));
  margin-bottom: 2px;
}

.status-overview-subtitle {
  font-size: 13px;
  color: var(--text-secondary, rgba(255, 255, 255, 0.55));
}

.status-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary, rgba(255, 255, 255, 0.95));
  margin-bottom: 12px;
}

.status-services {
  margin-bottom: 24px;
}

.status-service-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 6px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.2s;
}

.status-service-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.status-service-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary, rgba(255, 255, 255, 0.95));
}

.status-service-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 6px;
}

.status-service-ok .status-service-badge {
  background: rgba(76, 217, 100, 0.15);
  color: #4CD964;
}

.status-service-down .status-service-badge {
  background: rgba(255, 59, 48, 0.15);
  color: #FF3B30;
}

.status-service-na .status-service-badge {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted, rgba(255, 255, 255, 0.35));
}

.status-details {
  margin-bottom: 24px;
}

.status-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.status-detail-row:last-child { border-bottom: none; }

.status-detail-label {
  font-size: 13px;
  color: var(--text-secondary, rgba(255, 255, 255, 0.55));
}

.status-detail-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, rgba(255, 255, 255, 0.95));
}