/* ============================================
   auth.css — Auth, Profile & Cookie styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Open+Sans:wght@400;500;600&display=swap');

/* ---- Auth page layout ---- */
.auth-body {
  background: linear-gradient(135deg, #004AAD 0%, #0a2e6b 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 1rem 3rem;
  font-family: 'Open Sans', sans-serif;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.8rem;
  text-decoration: none;
}

.auth-brand-mark {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: white;
  color: #004AAD;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.auth-brand-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: white;
  letter-spacing: -0.5px;
}

/* Card */
.auth-card {
  background: white;
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.2);
  overflow: hidden;
}

/* Tab switcher */
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid #e8f0fe;
}

.auth-tab {
  padding: 1.1rem;
  background: #f7faff;
  border: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: #90a4bc;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-tab.active {
  background: white;
  color: #004AAD;
  border-bottom: 2px solid #004AAD;
}

/* Form panel */
.auth-panel {
  display: none;
  padding: 1.8rem 2rem 2rem;
}
.auth-panel.active { display: block; }

.auth-panel h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: #1a202c;
  margin-bottom: 0.3rem;
}

.auth-panel .auth-sub {
  font-size: 0.82rem;
  color: #718096;
  margin-bottom: 1.4rem;
}

/* Field */
.auth-field {
  margin-bottom: 1rem;
}

.auth-field label {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #718096;
  margin-bottom: 0.35rem;
}

.auth-field input {
  width: 100%;
  padding: 0.68rem 1rem;
  border: 1.5px solid #dde8ff;
  border-radius: 10px;
  background: #f7faff;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.9rem;
  color: #1a202c;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.auth-field input:focus {
  border-color: #004AAD;
  background: white;
  box-shadow: 0 0 0 3px rgba(0, 74, 173,0.1);
}

.auth-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* Error message */
.auth-error {
  background: #fff0f0;
  border: 1px solid rgba(229,62,62,0.3);
  border-radius: 8px;
  color: #c53030;
  font-size: 0.82rem;
  padding: 0.6rem 0.9rem;
  margin-bottom: 1rem;
  display: none;
}
.auth-error.show { display: block; }

/* Submit */
.auth-btn {
  width: 100%;
  padding: 0.82rem;
  background: linear-gradient(135deg, #004AAD 0%, #0a2e6b 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 0.4rem;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.auth-btn:hover {
  background: linear-gradient(135deg, #003580 0%, #08234f 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 74, 173,0.35);
}

/* Inline success message used by password-reset flow */
.auth-success {
  background: #e6f9ef;
  border: 1px solid #68d391;
  color: #276749;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  display: none;
}
.auth-success.show { display: block; }

.auth-footer-note {
  text-align: center;
  font-size: 0.75rem;
  color: #a0aec0;
  margin-top: 1rem;
  line-height: 1.5;
}

.auth-footer-note a { color: #004AAD; text-decoration: none; }
.auth-footer-note a:hover { text-decoration: underline; }

/* ================================================================
   PROFILE PAGE
   ================================================================ */

.profile-body {
  background: #f0f4f8;
  min-height: 100vh;
  font-family: 'Open Sans', sans-serif;
}

.profile-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 6rem 1.5rem 5rem;
}

/* Header banner */
.profile-hero {
  background: linear-gradient(135deg, #003580, #004AAD);
  border-radius: 18px;
  padding: 2rem 2.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  color: white;
}

.profile-avatar-lg {
  width: 72px; height: 72px;
  border-radius: 16px;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.4);
  color: white;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.profile-hero-info h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.2rem;
}

.profile-hero-info p {
  opacity: 0.75;
  font-size: 0.88rem;
}

.profile-hero-actions {
  margin-left: auto;
}

.profile-edit-btn {
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.4);
  color: white;
  border-radius: 8px;
  padding: 0.5rem 1.1rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.profile-edit-btn:hover { background: rgba(255,255,255,0.25); }

/* Grid layout */
.profile-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  align-items: start;
}

/* Sidebar card */
.profile-sidebar-card {
  background: white;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  overflow: hidden;
}

.profile-sidebar-header {
  background: #f7faff;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid #e2e8f0;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: #5a7090;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.profile-form {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.profile-field label {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #718096;
  margin-bottom: 0.3rem;
}

.profile-field input {
  width: 100%;
  padding: 0.55rem 0.8rem;
  border: 1.5px solid #dde8ff;
  border-radius: 8px;
  background: #f7faff;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.85rem;
  color: #1a202c;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.profile-field input:focus {
  border-color: #004AAD;
  background: white;
  box-shadow: 0 0 0 3px rgba(0, 74, 173,0.1);
}

.profile-field input:disabled {
  background: #f0f4f8;
  color: #718096;
  cursor: not-allowed;
}

.profile-save-btn {
  padding: 0.65rem;
  background: #004AAD;
  color: white;
  border: none;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  display: none;
}
.profile-save-btn:hover { background: #003580; }
.profile-save-btn.visible { display: block; }

/* Main content area */
.profile-content-card {
  background: white;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  overflow: hidden;
}

/* Tab navigation */
.profile-tab-nav {
  display: flex;
  border-bottom: 1px solid #e2e8f0;
  padding: 0 1.4rem;
  background: #f7faff;
}

.profile-tab-btn {
  padding: 0.9rem 1rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: #90a4bc;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.profile-tab-btn.active {
  color: #004AAD;
  border-bottom-color: #004AAD;
}

.profile-tab-panel {
  display: none;
  padding: 1.4rem;
}
.profile-tab-panel.active { display: block; }

/* Event list items */
.reg-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.reg-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: white;
}

.reg-item:hover {
  border-color: #004AAD;
  box-shadow: 0 2px 12px rgba(0, 74, 173,0.08);
}

.reg-item.past {
  background: #f7faff;
  opacity: 0.75;
}

.reg-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: #e3f0ff;
  color: #004AAD;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.reg-item.past .reg-icon { background: #f0f4f8; color: #90a4bc; }

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

.reg-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: #1a202c;
  margin-bottom: 0.2rem;
}

.reg-meta {
  font-size: 0.75rem;
  color: #718096;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.reg-cat-badge {
  padding: 2px 8px;
  border-radius: 5px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  background: #e3f0ff;
  color: #1565c0;
}

.reg-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.reg-btn {
  padding: 0.38rem 0.8rem;
  border-radius: 7px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.18s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.reg-btn.edit   { background: #e3f0ff; color: #004AAD; }
.reg-btn.edit:hover { background: #c8e2ff; }
.reg-btn.delete { background: #fff0f0; color: #e53e3e; }
.reg-btn.delete:hover { background: #ffe0e0; }

/* Edit inline modal */
.reg-edit-panel {
  display: none;
  background: #f7faff;
  border: 1.5px solid #dde8ff;
  border-radius: 10px;
  padding: 1rem;
  margin-top: 0.5rem;
}
.reg-edit-panel.open { display: block; }
.reg-edit-panel label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #718096;
  margin-bottom: 0.25rem;
  display: block;
}
.reg-edit-panel input {
  width: 100%;
  padding: 0.5rem 0.8rem;
  border: 1.5px solid #dde8ff;
  border-radius: 8px;
  background: white;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.85rem;
  outline: none;
  box-sizing: border-box;
  margin-bottom: 0.75rem;
}
.reg-edit-panel input:focus { border-color: #004AAD; box-shadow: 0 0 0 3px rgba(0, 74, 173,0.1); }

/* Empty state */
.reg-empty {
  text-align: center;
  padding: 3rem 2rem;
  color: #90a4bc;
}
.reg-empty-icon { font-size: 3rem; margin-bottom: 0.75rem; }
.reg-empty h3 {
  font-family: 'Montserrat', sans-serif;
  color: #4a5568;
  margin-bottom: 0.5rem;
}
.reg-empty p { font-size: 0.85rem; }
.reg-empty a { color: #004AAD; text-decoration: none; font-weight: 600; }

/* ================================================================
   COOKIE BANNER
   ================================================================ */

#cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9999;
  background: #1a202c;
  border-top: 3px solid #004AAD;
  padding: 1rem 2rem;
  animation: slideUp 0.4s ease;
}

#cookie-banner.cookie-hide {
  animation: slideDown 0.4s ease forwards;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
@keyframes slideDown {
  from { transform: translateY(0); }
  to   { transform: translateY(100%); }
}

.cookie-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.cookie-text {
  flex: 1;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.82rem;
  color: #cbd5e0;
  line-height: 1.5;
}

.cookie-text strong {
  display: block;
  color: white;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.cookie-text a { color: #63b3ff; text-decoration: none; }
.cookie-text a:hover { text-decoration: underline; }

.cookie-actions {
  display: flex;
  gap: 0.6rem;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 0.55rem 1.2rem;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.cookie-btn.outline {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.3);
  color: white;
}
.cookie-btn.outline:hover { border-color: white; }

.cookie-btn.solid {
  background: #004AAD;
  border: 1.5px solid #004AAD;
  color: white;
}
.cookie-btn.solid:hover { background: #003580; border-color: #003580; }

@media (max-width: 600px) {
  .cookie-inner { flex-direction: column; align-items: flex-start; }
  .cookie-actions { width: 100%; }
  .cookie-btn { flex: 1; text-align: center; }
  .auth-field-row { grid-template-columns: 1fr; }
  .auth-panel { padding: 1.4rem 1.2rem 1.5rem; }
  .auth-card { border-radius: 16px; }

  /* --- PROFILE --- */
  .profile-grid { grid-template-columns: 1fr; }
  .profile-main { padding: 5rem 1rem 3rem; }

  .profile-hero {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
    gap: 1rem;
  }
  .profile-hero-info h1 { font-size: 1.2rem; }
  .profile-hero-actions { margin-left: 0; }

  .profile-tab-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 0.8rem;
    gap: 0;
  }
  .profile-tab-nav::-webkit-scrollbar { display: none; }
  .profile-tab-btn {
    flex-shrink: 0;
    font-size: 0.76rem;
    padding: 0.75rem 0.75rem;
    white-space: nowrap;
  }

  .profile-tab-panel { padding: 1rem; }

  .reg-item {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.85rem;
  }
  .reg-icon { display: none; }
  .reg-info { min-width: 0; width: 100%; }
  .reg-title { font-size: 0.85rem; }
  .reg-meta { font-size: 0.72rem; gap: 0.5rem; }
  .reg-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .reg-btn { font-size: 0.7rem; padding: 0.35rem 0.7rem; }

  .fav-item { flex-wrap: wrap; }
  .fav-thumb { width: 48px; height: 48px; }

  .reg-empty { padding: 2rem 1rem; }
  .reg-empty-icon { font-size: 2.5rem; }

  /* --- AUTH PAGE --- */
  .auth-body { padding: 3rem 0.75rem 2rem; }
  .auth-body .lang-selector-wrap {
    position: fixed;
    top: 0.75rem;
    right: 0.75rem;
  }
}

@media (max-width: 400px) {
  .profile-hero-info h1 { font-size: 1rem; }
  .profile-avatar-lg { width: 56px; height: 56px; font-size: 1.2rem; }
  .profile-edit-btn { font-size: 0.72rem; padding: 0.4rem 0.9rem; }
  .auth-panel h2 { font-size: 1.05rem; }
}
