/* ============================================================================
   KOI INNOVATIONS — AUTH & ACCOUNT STYLES
   ============================================================================
   Shared styling for /auth/, /account/, /admin/ pages.
   Matches the existing koi-unified design system.
   ============================================================================ */

:root {
  --koi-black: #0A0A0A;
  --koi-gold: #C9A84C;
  --paper: #FFFFFF;
  --ink: #0A0A0A;
  --ink-on-dark: #F5F5F5;
  --muted: #6B6B6B;
  --muted-on-dark: #B8B8B8;
  --rule: #E5E5E5;
  --rule-on-dark: #2A2A2A;
  --danger: #B85C5C;
  --success: #5C8A5C;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Playfair Display', Georgia, serif;
  background: var(--koi-black);
  color: var(--ink-on-dark);
  line-height: 1.65;
  font-size: 17px;
  font-weight: 400;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ============================================================================
   NAVIGATION
   ============================================================================ */

.koi-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  padding: 1.5rem 2.5rem;
  border-bottom: 1px solid var(--rule-on-dark);
}

.koi-nav-brand {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--koi-gold);
  font-weight: 500;
  white-space: nowrap;
}

.koi-nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
}

.koi-nav-link {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted-on-dark);
  transition: color 0.2s ease;
}

.koi-nav-link:hover { color: var(--ink-on-dark); }

/* ============================================================================
   AUTH PAGE LAYOUT (signup, login, reset)
   ============================================================================ */

.auth-shell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 80px);
  padding: 3rem 1.5rem;
}

.auth-card {
  width: 100%;
  max-width: 480px;
  text-align: center;
}

.auth-mark {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--koi-gold);
  margin-bottom: 2rem;
}

.auth-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 500;
  line-height: 1.05;
  margin-bottom: 1rem;
}

.auth-subtitle {
  font-size: 1.05rem;
  color: var(--muted-on-dark);
  margin-bottom: 2.5rem;
  line-height: 1.55;
}

/* ============================================================================
   FORMS
   ============================================================================ */

.koi-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  text-align: left;
}

.koi-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.koi-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-on-dark);
  font-weight: 500;
}

.koi-input {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  padding: 0.85rem 1rem;
  background: transparent;
  border: 1px solid var(--rule-on-dark);
  color: var(--ink-on-dark);
  border-radius: 2px;
  transition: border-color 0.2s ease;
}

.koi-input:focus {
  outline: none;
  border-color: var(--koi-gold);
}

.koi-input::placeholder {
  color: var(--muted);
}

.koi-button {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 1rem 1.5rem;
  background: var(--koi-gold);
  color: var(--koi-black);
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  margin-top: 0.5rem;
}

.koi-button:hover { background: #D4B25A; }
.koi-button:active { transform: translateY(1px); }
.koi-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.koi-button-ghost {
  background: transparent;
  color: var(--ink-on-dark);
  border: 1px solid var(--rule-on-dark);
}
.koi-button-ghost:hover {
  background: rgba(255,255,255,0.04);
}

/* ============================================================================
   MESSAGES
   ============================================================================ */

.koi-message {
  padding: 0.85rem 1rem;
  border-radius: 2px;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  border-left: 2px solid;
}

.koi-message-error {
  background: rgba(184, 92, 92, 0.08);
  border-left-color: var(--danger);
  color: #E89A9A;
}

.koi-message-success {
  background: rgba(92, 138, 92, 0.08);
  border-left-color: var(--success);
  color: #9CC59C;
}

.koi-message-info {
  background: rgba(201, 168, 76, 0.06);
  border-left-color: var(--koi-gold);
  color: var(--ink-on-dark);
}

/* ============================================================================
   LINKS / FOOTER
   ============================================================================ */

.auth-footer-link {
  margin-top: 2rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: var(--muted-on-dark);
  text-align: center;
}

.auth-footer-link a {
  color: var(--koi-gold);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.auth-footer-link a:hover {
  border-bottom-color: var(--koi-gold);
}

/* ============================================================================
   GATED CONTENT (used inside doors when user is logged in but wrong tier)
   ============================================================================ */

.gate-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 5rem 2rem;
  text-align: center;
}

.gate-mark {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--koi-gold);
  margin-bottom: 2rem;
}

.gate-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.gate-body {
  font-size: 1.1rem;
  color: var(--muted-on-dark);
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.gate-cta-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================================
   LOADING STATE
   ============================================================================ */

.koi-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 50vh;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted-on-dark);
}

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

@media (max-width: 640px) {
  .koi-nav {
    flex-direction: column;
    gap: 0.85rem;
    padding: 1.1rem 1.25rem;
    text-align: center;
  }
  .koi-nav-links {
    gap: 0.85rem 1.25rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  .auth-shell { padding: 2rem 1rem; }
}
