/* ═══════════════════════════════════════════════════════════════
   shared.css - Estilos compartidos entre todas las páginas
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg: #0e0e12;
  --surface: #1a1a22;
  --surface2: #22222c;
  --surface3: #2c2c38;
  --border: rgba(255,255,255,0.08);
  --border2: rgba(255,255,255,0.14);
  --accent: #5b8aff;
  --accent2: #7c6aff;
  --text: #e8e8f0;
  --text2: #9090a8;
  --text3: #5a5a70;
  --red: #ff5f5f;
  --green: #4fd98e;
  --yellow: #ffd166;
  --radius: 8px;
  --radius-lg: 12px;
}

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

html, body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV BAR ── */
.app-nav {
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.nav-logo { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; text-decoration: none; color: var(--text); }
.nav-logo-icon { width: 28px; height: 28px; background: linear-gradient(135deg, var(--accent), var(--accent2)); border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: white; }
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 4px; margin-left: 40px; }
.nav-link { padding: 8px 14px; color: var(--text2); text-decoration: none; font-size: 13px; border-radius: 6px; transition: all 0.15s; }
.nav-link:hover { color: var(--text); background: var(--surface2); }
.nav-link.active { color: var(--accent); background: rgba(91,138,255,0.1); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.user-menu { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; background: var(--surface2); border-radius: 999px; cursor: pointer; transition: background 0.15s; }
.user-menu:hover { background: var(--surface3); }
.user-avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent2)); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: white; overflow: hidden; }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-name-nav { font-size: 12px; color: var(--text); }
.plan-badge { font-size: 10px; padding: 2px 7px; border-radius: 999px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.plan-badge.free { background: var(--surface3); color: var(--text2); }
.plan-badge.premium { background: linear-gradient(135deg, #ffd166, #f59e0b); color: #2a1c00; }

/* ── BUTTONS ── */
.btn { padding: 10px 18px; border-radius: var(--radius); font-size: 13px; font-family: inherit; font-weight: 500; cursor: pointer; transition: all 0.15s; border: none; display: inline-flex; align-items: center; gap: 8px; justify-content: center; }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover:not(:disabled) { background: #6e98ff; transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border2); }
.btn-ghost:hover { background: var(--surface2); }
.btn-danger { background: rgba(255,95,95,0.1); color: var(--red); border: 1px solid rgba(255,95,95,0.2); }
.btn-danger:hover { background: rgba(255,95,95,0.2); }
.btn-gold { background: linear-gradient(135deg, #ffd166, #f59e0b); color: #2a1c00; font-weight: 600; }
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(245,158,11,0.4); }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 24px; font-size: 14px; }

/* ── CARDS ── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.card-title { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text2); margin-bottom: 16px; }

/* ── FORM ── */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 12px; color: var(--text2); margin-bottom: 6px; font-weight: 500; }
.form-input { width: 100%; background: var(--surface2); border: 1px solid var(--border2); border-radius: var(--radius); padding: 11px 14px; font-size: 14px; font-family: inherit; color: var(--text); outline: none; transition: all 0.15s; }
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91,138,255,0.15); }
.form-error { color: var(--red); font-size: 12px; margin-top: 6px; }
.form-success { color: var(--green); font-size: 12px; margin-top: 6px; }
.form-hint { color: var(--text3); font-size: 11px; margin-top: 4px; }

/* ── ALERTS / TOASTS ── */
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 13px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.alert-warn { background: rgba(255,209,102,0.1); border: 1px solid rgba(255,209,102,0.3); color: #ffd166; }
.alert-error { background: rgba(255,95,95,0.1); border: 1px solid rgba(255,95,95,0.3); color: var(--red); }
.alert-success { background: rgba(79,217,142,0.1); border: 1px solid rgba(79,217,142,0.3); color: var(--green); }
.alert-info { background: rgba(91,138,255,0.1); border: 1px solid rgba(91,138,255,0.3); color: var(--accent); }
.toast { position: fixed; top: 80px; right: 24px; background: var(--surface); border: 1px solid var(--border2); padding: 12px 18px; border-radius: var(--radius); font-size: 13px; z-index: 9999; box-shadow: 0 8px 32px rgba(0,0,0,0.5); animation: slideIn 0.3s; }
.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }
.toast.info { border-left: 3px solid var(--accent); }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } }

/* ── LOADING ── */
.spinner { width: 16px; height: 16px; border: 2px solid transparent; border-top-color: currentColor; border-radius: 50%; animation: spin 0.7s linear infinite; }
.spinner-lg { width: 36px; height: 36px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-full { position: fixed; inset: 0; background: rgba(14,14,18,0.85); display: flex; align-items: center; justify-content: center; z-index: 9999; backdrop-filter: blur(4px); }

/* ── DIVIDERS / UTIL ── */
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.divider-text { display: flex; align-items: center; gap: 12px; color: var(--text3); font-size: 11px; margin: 16px 0; text-transform: uppercase; letter-spacing: 0.1em; }
.divider-text::before, .divider-text::after { content: ''; flex: 1; height: 1px; background: var(--border); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--text3); }
::-webkit-scrollbar-track { background: transparent; }

/* ── PAGE LAYOUTS ── */
.page-container { max-width: 1100px; margin: 0 auto; padding: 32px 24px; }
.page-header { margin-bottom: 24px; }
.page-title { font-size: 24px; font-weight: 600; margin-bottom: 4px; }
.page-subtitle { font-size: 13px; color: var(--text2); }

/* ── AUTH PAGES ── */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: radial-gradient(ellipse at top, rgba(91,138,255,0.08), transparent 70%); }
.auth-box { width: 100%; max-width: 410px; background: var(--surface); border: 1px solid var(--border2); border-radius: var(--radius-lg); padding: 36px 32px; }
.auth-header { text-align: center; margin-bottom: 24px; }
.auth-logo { width: 48px; height: 48px; background: linear-gradient(135deg, var(--accent), var(--accent2)); border-radius: 12px; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 22px; }
.auth-title { font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.auth-subtitle { font-size: 13px; color: var(--text2); }

.google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 11px; background: white; color: #1f1f1f; border-radius: var(--radius); font-weight: 500; font-size: 14px; cursor: pointer; border: none; font-family: inherit; transition: all 0.15s; }
.google-btn:hover { background: #f5f5f5; }
.google-btn svg { width: 18px; height: 18px; }

.tab-switch { display: flex; background: var(--surface2); border-radius: var(--radius); padding: 3px; margin-bottom: 22px; }
.tab-switch button { flex: 1; padding: 8px; border: none; background: transparent; color: var(--text2); border-radius: 5px; cursor: pointer; font-size: 13px; font-family: inherit; transition: all 0.15s; }
.tab-switch button.active { background: var(--surface); color: var(--text); }
