.emo-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.emo-auth-modal.is-open {
  display: block;
}

.emo-auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(3px);
}

.emo-auth-dialog {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 32px));
  margin: 70px auto 0;
  background: #ffffff;
  border: 1px solid rgba(17, 17, 17, 0.08);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.08);
  font-family: "Inter Tight", sans-serif;
}

.emo-auth-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 26px 28px 22px;
  border-top: 3px solid #111111;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
}

.emo-auth-head-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.emo-auth-kicker,
.emo-auth-success-kicker {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9a9a9a;
  font-weight: 500;
}

.emo-auth-title {
  margin: 0;
  font-size: 26px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #111111;
}

.emo-auth-title em {
  font-style: italic;
  font-weight: 400;
  color: #6e6e6e;
}

.emo-auth-sub {
  margin: 0;
  color: #666666;
  font-size: 13px;
  line-height: 1.45;
  max-width: 420px;
}

.emo-auth-close-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #9a9a9a;
  font-size: 12px;
}

.emo-auth-close-hint {
  letter-spacing: 0.02em;
}

.emo-auth-close {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: #9a9a9a;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.emo-auth-close:hover {
  color: #111111;
}

.emo-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
}

.emo-auth-tab {
  height: 56px;
  border: none;
  background: #ffffff;
  color: #9a9a9a;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  transition: color 0.12s ease;
}

.emo-auth-tab:hover {
  color: #111111;
}

.emo-auth-tab.is-active {
  color: #111111;
}

.emo-auth-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: #111111;
}

.emo-auth-panel,
.emo-auth-success {
  display: none;
}

.emo-auth-panel.is-active,
.emo-auth-success.is-active {
  display: block;
}

.emo-auth-panel-inner,
.emo-auth-success-inner {
  padding: 28px 28px 30px;
}

.emo-auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.emo-auth-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9a9a9a;
  font-weight: 500;
  margin-top: 2px;
}

.emo-auth-input,
.emo-auth-select {
  width: 100%;
  height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  background: #ffffff;
  color: #111111;
  font-size: 16px;
  font-weight: 400;
  outline: none;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.emo-auth-input:focus,
.emo-auth-select:focus {
  border-color: rgba(17, 17, 17, 0.18);
  background: #eef4ff;
}

.emo-auth-input::placeholder {
  color: #8d8d8d;
}

.emo-auth-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238d8d8d' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  cursor: pointer;
}

.emo-auth-submit {
  width: 100%;
  height: 54px;
  margin-top: 14px;
  border: 1px solid #111111;
  background: #111111;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, opacity 0.12s ease;
}

.emo-auth-submit:hover {
  background: #222222;
  border-color: #222222;
}

.emo-auth-submit:disabled {
  opacity: 0.55;
  cursor: default;
}

.emo-auth-link-btn {
  margin-top: 2px;
  align-self: flex-start;
  padding: 0;
  border: none;
  background: none;
  color: #666666;
  font-size: 13px;
  cursor: pointer;
}

.emo-auth-link-btn:hover {
  color: #111111;
}

.emo-auth-error {
  min-height: 18px;
  margin-top: 2px;
  color: #d94f2b;
  font-size: 12px;
  line-height: 1.4;
}

.emo-auth-success-inner {
  padding-top: 34px;
}

.emo-auth-success-kicker {
  margin-bottom: 8px;
}

.emo-auth-success .emo-auth-title {
  margin-bottom: 10px;
}

.emo-auth-success .emo-auth-sub {
  margin-bottom: 22px;
}

/* Logout modal */

.emo-logout-dialog {
  width: min(640px, calc(100vw - 32px));
  margin-top: 80px;
  padding: 0;
}

.emo-logout-copy {
  padding: 42px 48px 16px;
}

.emo-logout-copy .emo-auth-title {
  font-size: 26px;
  margin-bottom: 16px;
}

.emo-logout-copy .emo-auth-sub {
  font-size: 15px;
  max-width: 340px;
}

.emo-logout-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 0 48px 42px;
}

.emo-logout-btn {
  height: 54px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s ease;
}

.emo-logout-btn-secondary {
  background: #ffffff;
  color: #111111;
}

.emo-logout-btn-secondary:hover {
  background: #fafaf9;
}

.emo-logout-btn-primary {
  background: #111111;
  border-color: #111111;
  color: #ffffff;
}

.emo-logout-btn-primary:hover {
  background: #222222;
  border-color: #222222;
}

.emo-logout-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

@media (max-width: 700px) {
  .emo-auth-dialog {
    width: min(100vw - 20px, 600px);
    margin-top: 16px;
  }

  .emo-auth-head {
    padding: 20px 20px 18px;
  }

  .emo-auth-title {
    font-size: 24px;
  }

  .emo-auth-panel-inner,
  .emo-auth-success-inner {
    padding: 22px 20px 24px;
  }

  .emo-auth-tab {
    height: 52px;
    font-size: 13px;
  }

  .emo-auth-input,
  .emo-auth-select {
    height: 46px;
    font-size: 15px;
    padding: 0 14px;
  }

  .emo-auth-submit {
    height: 52px;
    font-size: 14px;
  }

  .emo-logout-dialog {
    margin-top: 36px;
  }

  .emo-logout-copy {
    padding: 28px 22px 10px;
  }

  .emo-logout-actions {
    grid-template-columns: 1fr;
    padding: 0 22px 28px;
  }

  .emo-logout-btn {
    height: 50px;
    font-size: 14px;
  }
}