/* ============================================================
   Comiida — Global Styles
   ============================================================ */

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

:root {
  --c-bg:       #0f0e17;
  --c-surface:  #1a1a2e;
  --c-surface2: #16213e;
  --c-accent:   #e94560;
  --c-accent2:  #0f3460;
  --c-text:     #fffffe;
  --c-muted:    #a7a9be;
  --c-border:   #2d2d4e;
  --c-success:  #2cb67d;
  --c-error:    #e94560;
  --radius:     10px;
  --shadow:     0 4px 24px rgba(0,0,0,.45);
}

html, body { height: 100%; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--c-bg); color: var(--c-text); line-height: 1.5; }

a { color: var(--c-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .6rem 1.4rem; border-radius: var(--radius); font-size: .95rem;
  font-weight: 600; cursor: pointer; border: 2px solid transparent;
  transition: opacity .15s, transform .1s;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn-primary  { background: var(--c-accent); color: #fff; }
.btn-primary:hover { opacity: .88; }
.btn-outline  { background: transparent; border-color: var(--c-border); color: var(--c-text); }
.btn-outline:hover { border-color: var(--c-accent); color: var(--c-accent); }
.btn-full     { width: 100%; }
.btn-sm       { padding: .35rem .9rem; font-size: .85rem; }

/* ---- Navbar ---- */
.navbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: .8rem 1.5rem; background: var(--c-surface); border-bottom: 1px solid var(--c-border);
  position: sticky; top: 0; z-index: 100;
}
.navbar-brand { font-size: 1.25rem; font-weight: 700; color: var(--c-text); }
.navbar-user  { display: flex; align-items: center; gap: .75rem; color: var(--c-muted); font-size: .9rem; }

/* ---- Auth pages ---- */
.auth-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 1.5rem;
  background: radial-gradient(ellipse at top, var(--c-surface2) 0%, var(--c-bg) 65%);
}
.auth-card {
  background: var(--c-surface); border-radius: 16px; padding: 2.5rem 2rem;
  width: 100%; max-width: 420px; box-shadow: var(--shadow);
}
.auth-card--wide { max-width: 560px; }

.auth-logo { display: flex; align-items: center; gap: .65rem; margin-bottom: 1.5rem; }
.auth-logo h1 { font-size: 1.4rem; font-weight: 700; }

.auth-card h2 { font-size: 1.5rem; margin-bottom: .25rem; }
.auth-subtitle { color: var(--c-muted); margin-bottom: 1.75rem; }
.auth-footer { margin-top: 1.5rem; text-align: center; color: var(--c-muted); font-size: .9rem; }
.auth-footer p + p { margin-top: .4rem; }

/* ---- Form fields ---- */
.field { display: flex; flex-direction: column; margin-bottom: 1rem; }
.field label { font-size: .85rem; font-weight: 600; color: var(--c-muted); margin-bottom: .4rem; }
.field input, .field select, .field textarea {
  background: var(--c-bg); border: 1.5px solid var(--c-border); border-radius: var(--radius);
  color: var(--c-text); padding: .65rem .85rem; font-size: .95rem; outline: none;
  transition: border-color .15s;
}
.field input:focus, .field select:focus { border-color: var(--c-accent); }
.field input::placeholder { color: var(--c-border); }
.field select option { background: var(--c-surface); }

.field-row { display: flex; gap: .75rem; }
.field-row .field { flex: 1; }

/* ---- Banners ---- */
.error-banner {
  background: rgba(233,69,96,.15); border: 1px solid var(--c-error);
  color: var(--c-error); padding: .7rem 1rem; border-radius: var(--radius);
  margin-bottom: 1rem; font-size: .9rem;
}
.success-banner {
  background: rgba(44,182,125,.15); border: 1px solid var(--c-success);
  color: var(--c-success); padding: .7rem 1rem; border-radius: var(--radius);
  margin-bottom: 1rem; font-size: .9rem;
}

/* ---- Step indicator ---- */
.steps { display: flex; gap: .5rem; margin-bottom: 1.5rem; }
.step {
  flex: 1; padding: .5rem; text-align: center; border-radius: var(--radius);
  background: var(--c-bg); font-size: .85rem; color: var(--c-muted); border: 1.5px solid var(--c-border);
}
.step.active { border-color: var(--c-accent); color: var(--c-accent); font-weight: 600; }

/* ---- Coming soon placeholder ---- */
.coming-soon {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: calc(100vh - 60px); text-align: center; gap: 1rem; color: var(--c-muted);
}
.coming-soon h2 { font-size: 1.6rem; color: var(--c-text); }

/* ---- Error pages ---- */
.error-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.error-card { text-align: center; padding: 2rem; }
.error-code { font-size: 6rem; font-weight: 800; color: var(--c-accent); line-height: 1; }
.error-card h1 { font-size: 1.75rem; margin: .5rem 0; }
.error-card p { color: var(--c-muted); margin-bottom: 1.5rem; }

/* ---- Map container (used in phases 2+) ---- */
#map { width: 100%; height: calc(100vh - 60px); }

/* ---- Responsive ---- */
@media (max-width: 480px) {
  .auth-card { padding: 1.75rem 1.25rem; }
  .field-row { flex-direction: column; }
}
