/* Munowatch-style auth pages for KaraWatch SPA */
:root {
  --kw-accent: #3d8ef8;
  --kw-accent2: #6c63ff;
  --kw-accent-hover: #2563eb;
  --kw-accent-glow: rgba(61, 142, 248, 0.35);
}

body.auth-gate-route {
  font-family: "Open Sans", "Inter", system-ui, sans-serif;
}

body.auth-gate-route .auth-layout {
  display: none;
}

.muno-auth-page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: #e5e7eb;
  background: #05060a;
  isolation: isolate;
  overflow: hidden;
}

.muno-auth-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 0;
  pointer-events: none;
}

.muno-auth-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 6, 10, 0.12) 0%, rgba(5, 6, 10, 0.08) 40%, rgba(5, 6, 10, 0.35) 100%),
    radial-gradient(ellipse at center, transparent 0%, rgba(5, 6, 10, 0.15) 100%);
  z-index: 1;
  pointer-events: none;
}

.muno-auth-header,
.muno-auth-main,
.muno-auth-footer {
  position: relative;
  z-index: 2;
}

.muno-auth-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px clamp(16px, 4vw, 48px);
  background: transparent;
}

.muno-auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
}

.muno-auth-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--kw-accent), var(--kw-accent2));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
  box-shadow: 0 0 20px var(--kw-accent-glow);
  flex-shrink: 0;
}

.muno-auth-logo .logo-text {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 800;
  background: linear-gradient(90deg, #fff, var(--kw-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.muno-auth-header-link {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--kw-accent);
  color: var(--kw-accent);
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.muno-auth-header-link:hover {
  background: linear-gradient(135deg, var(--kw-accent), var(--kw-accent2));
  border-color: var(--kw-accent);
  color: #fff;
}

.muno-auth-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.muno-auth-card {
  width: 100%;
  max-width: 420px;
  padding: 32px;
  margin-bottom: 32px;
  background: rgba(241, 245, 249, 0.94);
  color: #1f2937;
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  content-visibility: auto;
  contain-intrinsic-size: 520px;
}

.muno-auth-card.is-busy {
  opacity: 0.92;
  pointer-events: none;
}

.muno-auth-card h1 {
  margin: 0 0 8px;
  text-align: center;
  font-size: 1.625rem;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.02em;
}

.muno-auth-subtitle {
  margin: 0 0 20px;
  text-align: center;
  font-size: 0.9rem;
  color: #6b7280;
  line-height: 1.55;
}

.muno-auth-subtitle strong {
  color: #111827;
  font-weight: 700;
}

.muno-auth-hint {
  margin: 0 0 16px;
  text-align: center;
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.5;
}

.muno-auth-google-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.muno-auth-google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  border: none;
  border-radius: 4px;
  background: #f1f5f9;
  color: #111827;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: background 0.2s ease;
}

.muno-auth-google-btn:hover:not(:disabled) {
  background: #e2e8f0;
}

.muno-auth-google-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.muno-auth-spinner {
  display: none;
  font-size: 24px;
  color: var(--kw-accent);
  animation: muno-spin 1s linear infinite;
}

.muno-auth-spinner.is-visible {
  display: inline-block;
}

@keyframes muno-spin {
  to { transform: rotate(360deg); }
}

.muno-auth-or {
  position: relative;
  width: 100%;
  height: 24px;
  display: flex;
  justify-content: center;
  padding: 16px 0;
}

.muno-auth-or hr {
  position: absolute;
  top: 50%;
  width: 240px;
  max-width: 80%;
  border: 0;
  border-top: 1px solid #d1d5db;
}

.muno-auth-or span {
  position: relative;
  z-index: 1;
  width: 64px;
  text-align: center;
  background: #f1f5f9;
  color: #9ca3af;
  font-size: 0.875rem;
}

.muno-auth-field {
  display: flex;
  flex-direction: column;
  margin-top: 16px;
}

.muno-auth-field label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #6b7280;
}

.muno-auth-label-bar {
  width: 24px;
  height: 2px;
  background: var(--kw-accent);
  border-radius: 999px;
  flex-shrink: 0;
}

.muno-auth-required {
  color: #ef4444;
}

.muno-auth-field input[type="text"],
.muno-auth-field input[type="email"],
.muno-auth-field input[type="password"],
.muno-auth-field input[type="tel"] {
  width: 100%;
  padding: 16px;
  border: none;
  outline: 1px solid rgba(156, 163, 175, 0.35);
  border-radius: 8px;
  background: #f1f5f9;
  color: #111827;
  font-size: 1rem;
  font-family: inherit;
}

.muno-auth-field input:focus {
  outline: 2px solid var(--kw-accent);
}

.muno-auth-field-relative {
  position: relative;
}

.muno-auth-visibility {
  position: absolute;
  right: 8px;
  bottom: 14px;
  cursor: pointer;
  color: #6b7280;
  user-select: none;
  font-family: "Material Symbols Rounded", sans-serif;
  font-size: 22px;
}

.muno-auth-error {
  min-height: 1rem;
  margin-top: 4px;
  font-size: 0.75rem;
  color: #ef4444;
}

.muno-auth-forgot {
  display: block;
  margin-top: 16px;
  text-align: right;
  font-size: 0.875rem;
  color: var(--kw-accent);
  text-decoration: none;
}

.muno-auth-forgot:hover {
  text-decoration: underline;
}

.muno-auth-submit {
  width: 100%;
  margin: 16px 0;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--kw-accent), var(--kw-accent2));
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease, filter 0.2s ease;
}

.muno-auth-submit:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.muno-auth-submit:disabled {
  background: rgba(61, 142, 248, 0.45);
  cursor: not-allowed;
}

.muno-auth-switch {
  margin: 16px 0 0;
  text-align: center;
  font-size: 0.875rem;
  color: #4b5563;
}

.muno-auth-switch a {
  color: var(--kw-accent);
  font-weight: 600;
  text-decoration: none;
}

.muno-auth-switch a:hover {
  text-decoration: underline;
}

.muno-auth-tnc {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 16px 0;
  font-size: 0.875rem;
  color: #4b5563;
}

.muno-auth-tnc input {
  margin-top: 3px;
  accent-color: var(--kw-accent);
}

.muno-auth-tnc a {
  color: var(--kw-accent);
}

.muno-auth-footer {
  background: #010318;
  padding: 32px;
  color: #6b7280;
  font-size: 14px;
}

.muno-auth-footer-grid {
  display: grid;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .muno-auth-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .muno-auth-footer-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.muno-auth-footer-title {
  color: #fff;
  font-weight: 700;
  margin: 0 0 16px;
}

.muno-auth-footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.muno-auth-footer-list li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.muno-auth-footer-list a:hover {
  color: #fff;
}

.muno-auth-footer-list svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.muno-auth-footer-contacts svg {
  width: 20px;
  height: 20px;
}

.muno-auth-socials {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.muno-auth-social {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.muno-auth-social:hover {
  background: var(--kw-accent);
}

.muno-auth-google-hidden {
  display: none !important;
}

@media (max-width: 480px) {
  .muno-auth-card {
    padding: 24px 20px;
  }

  .muno-auth-logo .logo-text {
    font-size: 1.25rem;
  }
}

/* Munowatch-style legal page (privacy / terms) */
.muno-legal-page {
  background: #010318;
  min-height: 100%;
}

.muno-legal-header {
  padding: 16px clamp(16px, 8vw, 320px);
  background: linear-gradient(180deg, #010318 0%, transparent 100%);
}

.muno-legal-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
}

.muno-legal-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--kw-accent), var(--kw-accent2));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
  box-shadow: 0 0 20px var(--kw-accent-glow);
  flex-shrink: 0;
}

.muno-legal-logo .logo-text {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 800;
  background: linear-gradient(90deg, #fff, var(--kw-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.muno-legal-main {
  background: #fff;
  color: #4b5563;
  padding: 16px clamp(16px, 8vw, 320px) 48px;
}

.muno-legal-bar {
  width: 128px;
  height: 8px;
  background: #000;
  margin-bottom: 8px;
}

.muno-legal-title {
  margin: 0 0 24px;
  font-size: clamp(1.75rem, 4vw, 1.875rem);
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
}

.muno-legal-body {
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.7;
  color: #4b5563;
}

.muno-legal-body h1,
.muno-legal-body h2,
.muno-legal-body h3 {
  color: #111827;
  font-weight: 700;
  margin: 1.5em 0 0.75em;
}

.muno-legal-body h1 { font-size: 1.75rem; }
.muno-legal-body h2 { font-size: 1.5rem; }
.muno-legal-body h3 { font-size: 1.25rem; }

.muno-legal-body p {
  margin: 0 0 1em;
}

.muno-legal-body hr {
  border: 0;
  border-top: 1px solid #e5e7eb;
  margin: 24px 0;
}

.muno-legal-body a {
  color: var(--kw-accent);
  font-weight: 600;
}

.muno-legal-body ul,
.muno-legal-body ol {
  margin: 0 0 1em 1.25em;
}

@media (max-width: 480px) {
  .muno-legal-logo .logo-text {
    font-size: 1.25rem;
  }
}

.muno-auth-switch-muted {
  margin-top: -4px;
  font-size: 0.8125rem;
}

.muno-auth-switch-muted a {
  color: #6b7280;
}

.muno-auth-status {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
}

.muno-auth-status .material-symbols-rounded {
  font-size: 34px;
}

.muno-auth-status-info {
  background: #eef4ff;
  color: #2563eb;
}

.muno-auth-status-success {
  background: #ecfdf5;
  color: #059669;
}

.muno-auth-status-error {
  background: #fef2f2;
  color: #dc2626;
}

.muno-auth-status-pending {
  background: #eef4ff;
  color: var(--kw-accent);
}

.muno-auth-spin-icon {
  animation: muno-spin 1s linear infinite;
}

.muno-auth-submit-secondary {
  background: #fff;
  color: #111827;
  border: 1px solid #cbd5e1;
  box-shadow: none;
}

.muno-auth-submit-secondary:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #94a3b8;
}

.muno-auth-submit-link {
  display: block;
  text-align: center;
  text-decoration: none;
  line-height: 1.2;
}

.muno-auth-code-input {
  letter-spacing: 0.35em;
  font-weight: 700;
  text-align: center;
  font-size: 1.125rem;
}

.muno-auth-field input::placeholder {
  color: #9ca3af;
}
