/* ═══════════════════════════════════════════════
   KARKIUM AUTH PAGES — Login, Signup, Account
   Consistent with Karkium Design System v2.0
   ═══════════════════════════════════════════════ */

/* ─── Page Layout ─── */
.ka-auth-page {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: #0a0a0a;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #f5f5f5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.ka-auth {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 20px;
}

.ka-auth--account {
  justify-content: flex-start;
  padding-top: 60px;
}

/* ─── Card ─── */
.ka-auth__card {
  width: 100%;
  max-width: 420px;
  background: #111111;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  padding: 40px 36px;
}

.ka-auth__card--wide {
  max-width: 560px;
}

/* ─── Logo ─── */
.ka-auth__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  text-decoration: none;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 24px;
}

.ka-auth__logo-kar {
  color: #00e5a0;
}

.ka-auth__logo-kium {
  color: #f5f5f5;
}

/* ─── Account Header ─── */
.ka-account__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.ka-account__header .ka-auth__logo {
  margin-bottom: 0;
}

.ka-account__nav {
  display: flex;
  gap: 16px;
  align-items: center;
}

/* ─── Typography ─── */
.ka-auth__title {
  font-size: 24px;
  font-weight: 700;
  color: #f5f5f5;
  margin: 0 0 8px;
  text-align: center;
}

.ka-auth__subtitle {
  font-size: 14px;
  color: #a0a0a0;
  margin: 0 0 24px;
  text-align: center;
}

/* ─── Messages ─── */
.ka-auth__message {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.ka-auth__message--error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.ka-auth__message--success {
  background: rgba(0, 229, 160, 0.08);
  border: 1px solid rgba(0, 229, 160, 0.2);
  color: #00e5a0;
}

.ka-auth__message--warning {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fbbf24;
}

/* ─── Form ─── */
.ka-auth__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ka-auth__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ka-auth__field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ka-auth__label {
  font-size: 13px;
  font-weight: 500;
  color: #a0a0a0;
  letter-spacing: 0.02em;
}

.ka-auth__input {
  width: 100%;
  padding: 12px 14px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  color: #f5f5f5;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.ka-auth__input::placeholder {
  color: #666666;
}

.ka-auth__input:focus {
  border-color: #00e5a0;
  box-shadow: 0 0 0 3px rgba(0, 229, 160, 0.1);
}

.ka-auth__input:invalid:not(:placeholder-shown) {
  border-color: rgba(239, 68, 68, 0.5);
}

/* ─── Checkbox / Remember Me ─── */
.ka-auth__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ka-auth__checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #a0a0a0;
  cursor: pointer;
}

.ka-auth__checkbox {
  width: 16px;
  height: 16px;
  accent-color: #00e5a0;
  cursor: pointer;
}

/* ─── Password Strength ─── */
.ka-auth__strength {
  height: 4px;
  background: #222222;
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}

.ka-auth__strength-bar {
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: width 0.3s, background-color 0.3s;
}

.ka-auth__strength-text {
  font-size: 12px;
  color: #666666;
  min-height: 16px;
  display: block;
}

/* ─── Hint Text ─── */
.ka-auth__hint {
  font-size: 12px;
  color: #666666;
  line-height: 1.4;
}

/* ─── Fieldset ─── */
.ka-auth__fieldset {
  border: 1px solid #222222;
  border-radius: 12px;
  padding: 20px;
  margin: 0 0 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ka-auth__legend {
  font-size: 15px;
  font-weight: 600;
  color: #f5f5f5;
  padding: 0 8px;
}

/* ─── Badge ─── */
.ka-auth__badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(0, 229, 160, 0.08);
  border: 1px solid rgba(0, 229, 160, 0.2);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #00e5a0;
  letter-spacing: 0.02em;
}

/* ─── Button ─── */
.ka-auth__btn {
  width: 100%;
  padding: 14px 20px;
  background: #00e5a0;
  color: #0a0a0a;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  margin-top: 8px;
}

.ka-auth__btn:hover {
  background: #00cc8e;
}

.ka-auth__btn:active {
  transform: scale(0.98);
}

.ka-auth__btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ─── Links ─── */
.ka-auth__link {
  color: #00e5a0;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.ka-auth__link:hover {
  color: #00cc8e;
  text-decoration: underline;
}

.ka-auth__link--muted {
  color: #666666;
}

.ka-auth__link--muted:hover {
  color: #a0a0a0;
}

/* ─── Footer ─── */
.ka-auth__footer-text {
  text-align: center;
  font-size: 14px;
  color: #a0a0a0;
  margin-top: 20px;
}

.ka-auth__copyright {
  text-align: center;
  font-size: 12px;
  color: #444444;
  margin-top: 32px;
}

/* ─── Responsive ─── */
@media (max-width: 480px) {
  .ka-auth {
    padding: 24px 16px;
  }

  .ka-auth__card {
    padding: 28px 20px;
    border-radius: 12px;
  }

  .ka-auth__field-row {
    grid-template-columns: 1fr;
  }

  .ka-auth__title {
    font-size: 20px;
  }

  .ka-account__header {
    flex-direction: column;
    gap: 12px;
  }

  .ka-account__nav {
    width: 100%;
    justify-content: center;
  }
}
