/*
 * AgendaBuilder Pro — Shared Styles
 * Navy (#1a2744) and Gold (#B8860B) color scheme
 */

:root {
  --navy: #1a2744;
  --navy-light: #243556;
  --navy-dark: #111b30;
  --gold: #B8860B;
  --gold-light: #DAA520;
  --gold-dark: #8B6508;
  --cream: #FFF8EE;
  --bg: #F7F8FA;
  --white: #FFFFFF;
  --text: #1a2744;
  --text-light: #5a6a80;
  --border: #D4D9E2;
  --danger: #DC3545;
  --success: #28A745;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(26,39,68,.08);
  --shadow-lg: 0 8px 32px rgba(26,39,68,.12);
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── NAV ── */
.site-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 32px;
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  position: sticky; top: 0; z-index: 100;
}
.site-nav .logo {
  font-size: 1.2rem; font-weight: 700; letter-spacing: .5px;
  color: var(--gold-light); text-decoration: none;
}
.site-nav .logo span { color: var(--white); font-weight: 400; }
.nav-links { display: flex; align-items: center; gap: 16px; }
.nav-links a {
  color: rgba(255,255,255,.8); text-decoration: none; font-size: .9rem;
  transition: color .2s;
}
.nav-links a:hover { color: var(--gold-light); }
.nav-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--gold); color: var(--navy);
  padding: 3px 10px; border-radius: 12px;
  font-size: .75rem; font-weight: 700;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 24px; border: none; border-radius: var(--radius);
  font-size: .95rem; font-weight: 600; cursor: pointer;
  text-decoration: none; transition: all .2s;
  font-family: inherit;
}
.btn-primary {
  background: var(--gold); color: var(--white);
  box-shadow: 0 2px 8px rgba(184,134,11,.3);
}
.btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn-secondary {
  background: var(--navy); color: var(--white);
}
.btn-secondary:hover { background: var(--navy-light); }
.btn-outline {
  background: transparent; color: var(--navy);
  border: 2px solid var(--navy);
}
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-outline-gold {
  background: transparent; color: var(--gold);
  border: 2px solid var(--gold);
}
.btn-outline-gold:hover { background: var(--gold); color: var(--white); }
.btn-danger {
  background: transparent; color: var(--danger);
  border: 2px solid var(--danger);
}
.btn-danger:hover { background: var(--danger); color: var(--white); }
.btn-lg { padding: 14px 36px; font-size: 1.1rem; }
.btn-sm { padding: 6px 14px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ── FORMS ── */
.form-card {
  background: var(--white);
  border-radius: 12px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
  max-width: 440px;
  width: 100%;
}
.form-card h2 {
  font-size: 1.5rem; margin-bottom: 4px; color: var(--navy);
}
.form-card .subtitle {
  color: var(--text-light); margin-bottom: 24px; font-size: .9rem;
}
.field {
  margin-bottom: 18px;
}
.field label {
  display: block; font-size: .85rem; font-weight: 600;
  color: var(--text); margin-bottom: 5px;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="password"] {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-size: .95rem; font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184,134,11,.12);
}
.pw-peek { position: relative; }
.pw-peek input { padding-right: 42px !important; }
.pw-peek .pw-eye {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  cursor: pointer; font-size: 18px; color: #888; user-select: none;
  transition: color .15s;
}
.pw-peek .pw-eye:hover { color: #B8860B; }
.field .error-text {
  color: var(--danger); font-size: .8rem; margin-top: 4px; display: none;
}
.field.has-error input { border-color: var(--danger); }
.field.has-error .error-text { display: block; }

.checkbox-row {
  display: flex; align-items: flex-start; gap: 8px; margin-bottom: 18px;
}
.checkbox-row input[type="checkbox"] {
  margin-top: 3px; accent-color: var(--gold); width: 16px; height: 16px;
}
.checkbox-row label { font-size: .85rem; color: var(--text-light); cursor: pointer; }

.form-footer {
  text-align: center; margin-top: 20px; font-size: .9rem; color: var(--text-light);
}
.form-footer a { color: var(--gold); text-decoration: none; font-weight: 600; }
.form-footer a:hover { text-decoration: underline; }

.alert {
  padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px;
  font-size: .9rem; display: none;
}
.alert-error { background: #FDE8E8; color: var(--danger); border: 1px solid #F5C6CB; }
.alert-success { background: #D4EDDA; color: #155724; border: 1px solid #C3E6CB; }
.alert.show { display: block; }

/* ── AUTH PAGE LAYOUT ── */
.auth-page {
  min-height: calc(100vh - 58px);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, var(--navy-light) 100%);
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(26,39,68,.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-box {
  background: var(--white); border-radius: 16px;
  padding: 40px; max-width: 480px; width: 100%;
  box-shadow: var(--shadow-lg);
  text-align: center;
  transform: scale(.9); transition: transform .3s;
}
.modal-overlay.active .modal-box { transform: scale(1); }
.modal-box h2 { font-size: 1.4rem; color: var(--navy); margin-bottom: 8px; }
.modal-box .modal-subtitle { color: var(--text-light); margin-bottom: 24px; }
.modal-features {
  text-align: left; margin: 20px 0;
  list-style: none; padding: 0;
}
.modal-features li {
  padding: 8px 0; font-size: .95rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.modal-features li::before {
  content: '\2713'; color: var(--success); font-weight: 700;
}
.modal-close {
  position: absolute; top: 16px; right: 20px;
  border: none; background: none; font-size: 1.4rem;
  cursor: pointer; color: var(--text-light);
}
.modal-price {
  font-size: 2rem; font-weight: 700; color: var(--gold);
  margin: 16px 0 4px;
}
.modal-price-sub { font-size: .85rem; color: var(--text-light); margin-bottom: 20px; }

/* ── LOADING SPINNER ── */
.spinner {
  display: inline-block; width: 20px; height: 20px;
  border: 2.5px solid rgba(255,255,255,.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.page-loading {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 16px;
  color: var(--gold-light); font-size: 1.1rem;
}
.page-loading .spinner { width: 36px; height: 36px; border-width: 3px; border-top-color: var(--gold); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .site-nav { padding: 12px 16px; }
  .form-card { padding: 28px 24px; }
  .site-nav .logo { font-size: 1rem; }
  .nav-links { gap: 10px; }
  .nav-links a { font-size: .8rem; }
}
</style>
