/* ZutoAuto centered split-panel authentication modal */

.zuto-auth-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
  font-family: "Plus Jakarta Sans", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1b1b21;
}

.zuto-auth-modal.is-open {
  display: flex;
  pointer-events: auto;
}

.zuto-auth-shell {
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
  max-width: 72rem;
  max-height: min(900px, calc(100dvh - 2rem));
  height: auto;
  min-height: 0;
  background: #ffffff;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
}

@media (min-width: 768px) {
  .zuto-auth-shell {
    flex-direction: row;
  }
}

.zuto-auth-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #454652;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: color 0.2s, transform 0.2s;
}

.zuto-auth-close:hover {
  color: #1b1b21;
  transform: scale(1.05);
}

.zuto-auth-close:active {
  transform: scale(0.95);
}

/* Left brand pane */
.zuto-auth-brand {
  display: none;
  position: relative;
  width: 50%;
  flex-direction: column;
  justify-content: space-between;
  padding: 2rem 2.25rem;
  color: #ffffff;
  overflow: hidden;
  border-right: 1px solid rgba(198, 197, 212, 0.2);
  background-size: 200% 200%;
  background-image: linear-gradient(120deg, #1a237e 0%, #0d1245 50%, #1a237e 100%);
  animation: zutoAuthShine 8s linear infinite;
}

@media (min-width: 768px) {
  .zuto-auth-brand {
    display: flex;
  }
}

.zuto-auth-brand-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255, 152, 0, 0.15) 0%, transparent 60%);
  opacity: 0.8;
  mix-blend-mode: screen;
  pointer-events: none;
}

.zuto-auth-brand-orb {
  position: absolute;
  top: -10rem;
  left: -10rem;
  width: 24rem;
  height: 24rem;
  border-radius: 50%;
  background: rgba(189, 194, 255, 0.2);
  filter: blur(100px);
  pointer-events: none;
}

.zuto-auth-brand-top,
.zuto-auth-brand-center,
.zuto-auth-brand-bottom {
  position: relative;
  z-index: 10;
}

.zuto-auth-brand-logo {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.35rem;
}

.zuto-auth-brand-tagline {
  margin: 0;
  font-size: 0.95rem;
  color: #bdc2ff;
}

.zuto-auth-brand-headline {
  margin: 0 0 1.5rem;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-align: center;
}

.zuto-auth-brand-visual {
  width: 100%;
  max-width: 22rem;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  position: relative;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(13, 18, 69, 0.5);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
}

.zuto-auth-brand-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  mix-blend-mode: luminosity;
  opacity: 0.82;
  transition: opacity 0.5s ease, transform 0.7s ease;
}

.zuto-auth-brand-visual:hover .zuto-auth-brand-photo {
  opacity: 1;
  transform: scale(1.05);
}

.zuto-auth-brand-visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #1a237e, transparent 55%);
  opacity: 0.75;
}

.zuto-auth-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.zuto-auth-feature-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0.85rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.zuto-auth-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px -5px rgba(255, 152, 0, 0.2);
  border-color: rgba(255, 152, 0, 0.3);
}

.zuto-auth-feature-icon {
  color: #ff9800;
  margin-bottom: 0.45rem;
  font-size: 1.1rem;
}

.zuto-auth-feature-card strong {
  font-size: 0.8rem;
  font-weight: 600;
  color: #e0e0ff;
}

.zuto-auth-feature-desc {
  font-size: 0.7rem;
  color: rgba(226, 232, 255, 0.92);
  margin-top: 0.25rem;
  line-height: 1.35;
}

/* Right form pane */
.zuto-auth-form-pane {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow-y: auto;
  padding: 2rem 1.5rem;
  background: #ffffff;
}

@media (min-width: 768px) {
  .zuto-auth-form-pane {
    width: 50%;
    padding: 2.25rem 2rem;
  }
}

.zuto-auth-form-inner {
  width: 100%;
  max-width: 26rem;
  margin: 0 auto;
}

.zuto-auth-form-header {
  margin-bottom: 1.5rem;
  text-align: center;
}

@media (min-width: 768px) {
  .zuto-auth-form-header {
    text-align: left;
  }
}

.zuto-auth-form-header h2 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #1b1b21;
}

@media (min-width: 768px) {
  .zuto-auth-form-header h2 {
    font-size: 2rem;
  }
}

.zuto-auth-form-header p {
  margin: 0;
  font-size: 0.95rem;
  color: #454652;
}

.zuto-auth-error {
  display: none;
  background: #ffdad6;
  border: 1px solid #ffb4ab;
  color: #93000a;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.zuto-auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.zuto-auth-field label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #454652;
}

.zuto-auth-input-wrap {
  position: relative;
  border-radius: 0.25rem;
  transition: box-shadow 0.3s, transform 0.3s;
}

.zuto-auth-input-wrap:focus-within {
  box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.15), 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.zuto-auth-input-wrap .field-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  color: #c6c5d4;
  pointer-events: none;
  transition: color 0.3s;
}

.zuto-auth-input-wrap:focus-within .field-icon {
  color: #1a237e;
}

.zuto-auth-input-wrap input {
  width: 100%;
  padding: 0.7rem 2.75rem 0.7rem 2.35rem;
  border: 1px solid #c6c5d4;
  border-radius: 0.25rem;
  background: #ffffff;
  color: #1b1b21;
  font-size: 0.95rem;
  outline: none;
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.3s;
}

.zuto-auth-input-wrap:focus-within input {
  border-color: #1a237e;
}

.zuto-auth-pass-toggle {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  color: #c6c5d4;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zuto-auth-pass-toggle:hover,
.zuto-auth-pass-toggle:focus-visible {
  color: #454652;
  outline: none;
}

.zuto-auth-signup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

@media (max-width: 480px) {
  .zuto-auth-signup-grid {
    grid-template-columns: 1fr;
  }
}

.zuto-auth-file-input {
  width: 100%;
  padding: 0.65rem;
  border: 1px dashed rgba(26, 35, 126, 0.35);
  border-radius: 0.5rem;
  color: #454652;
  font-size: 0.85rem;
  box-sizing: border-box;
  background: #f5f2fb;
}

.zuto-auth-submit {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.7rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.25rem;
  background: #1a237e;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.zuto-auth-submit:hover:not(:disabled) {
  background: rgba(26, 35, 126, 0.92);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.12);
}

.zuto-auth-submit:active:not(:disabled) {
  transform: scale(0.98);
}

.zuto-auth-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.zuto-auth-submit-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-100%);
  pointer-events: none;
}

.zuto-auth-submit:hover .zuto-auth-submit-shimmer {
  animation: zutoAuthShimmer 2.5s infinite;
}

.zuto-auth-switch {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.95rem;
  color: #334155;
}

.zuto-auth-switch a {
  color: #1a237e;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  transition: color 0.2s;
}

.zuto-auth-switch a:hover {
  color: #ff9800;
}

.zuto-auth-optional {
  font-weight: 400;
  color: #767683;
}

/* Auth toasts (login / logout) */
.zuto-auth-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 10000000;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  max-width: min(22rem, calc(100vw - 2rem));
  padding: 0.85rem 1.15rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.28s ease, transform 0.28s ease;
  pointer-events: none;
}

.zuto-auth-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.zuto-auth-toast--success {
  background: linear-gradient(135deg, #1a237e, #0d1245);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.zuto-auth-toast--info {
  background: linear-gradient(135deg, #374151, #1f2937);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.zuto-auth-toast--error {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.zuto-auth-toast i {
  font-size: 1rem;
  flex-shrink: 0;
}

@keyframes zutoAuthFadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes zutoAuthShine {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes zutoAuthShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.zuto-auth-animate {
  animation: zutoAuthFadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.zuto-auth-delay-1 { animation-delay: 0.1s; opacity: 0; }
.zuto-auth-delay-2 { animation-delay: 0.2s; opacity: 0; }
.zuto-auth-delay-3 { animation-delay: 0.3s; opacity: 0; }
.zuto-auth-delay-4 { animation-delay: 0.4s; opacity: 0; }
.zuto-auth-delay-5 { animation-delay: 0.5s; opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .zuto-auth-animate,
  .zuto-auth-brand,
  .zuto-auth-input-wrap:focus-within,
  .zuto-auth-feature-card,
  .zuto-auth-close,
  .zuto-auth-submit {
    animation: none !important;
    transform: none !important;
    transition: none !important;
  }
}

@media (max-width: 767px) {
  .zuto-auth-modal {
    padding: 0.75rem;
    align-items: flex-start;
  }

  .zuto-auth-shell {
    max-height: calc(100dvh - 1.5rem);
    margin-top: 0.25rem;
  }

  .zuto-auth-form-pane {
    padding: 2.75rem 1.25rem 1.5rem;
  }
}

/* Account-type picker (post signup / first module visit) */
.zuto-account-type-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000001;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
}
.zuto-account-type-modal.is-open { display: flex; }
.zuto-account-type-card {
  width: 100%;
  max-width: 32rem;
  max-height: min(90dvh, 720px);
  overflow: auto;
  background: #fff;
  border-radius: 0.75rem;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.35);
  color: #1b1b21;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
}
.zuto-account-type-card h2 {
  margin: 0 0 0.4rem;
  font-size: 1.5rem;
  font-weight: 700;
}
.zuto-account-type-card > p {
  margin: 0 0 1.25rem;
  color: #454652;
  font-size: 0.95rem;
}
.zuto-account-type-options {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.zuto-account-type-option {
  text-align: left;
  border: 1px solid #c6c5d4;
  background: #fff;
  border-radius: 0.5rem;
  padding: 1rem;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.zuto-account-type-option:hover {
  border-color: #1a237e;
  box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.12);
}
.zuto-account-type-option.is-selected {
  border-color: #1a237e;
  background: #f5f2fb;
}
.zuto-account-type-option strong {
  display: block;
  font-size: 0.95rem;
  color: #1a237e;
  margin-bottom: 0.25rem;
}
.zuto-account-type-option span {
  font-size: 0.82rem;
  color: #454652;
  line-height: 1.4;
}
.zuto-account-type-submit {
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 0.25rem;
  background: #1a237e;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.zuto-account-type-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.zuto-account-type-error {
  display: none;
  margin-bottom: 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.5rem;
  background: #ffdad6;
  color: #93000a;
  font-size: 0.85rem;
}
