.sms-auth-open {
  overflow: hidden;
}

.sms-actions [data-sms-auth="login"][hidden],
.sms-actions [data-sms-user-link][hidden] {
  display: none !important;
}

.sms-auth-modal[hidden] {
  display: none !important;
}

.sms-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.sms-auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 20, 42, 0.55);
  backdrop-filter: blur(4px);
}

.sms-auth-dialog {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  max-height: min(90vh, 720px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  background: #fff;
  border-radius: 20px;
  padding: 24px 22px 22px;
  box-shadow: 0 28px 80px rgba(16, 20, 42, 0.28);
}

.sms-auth-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #8b92a8;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.sms-auth-close:hover {
  background: #f6f7fb;
  color: #10142a;
}

.sms-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 4px;
  margin: 0 36px 14px 0;
  border-radius: 12px;
  background: #f6f7fb;
  border: 1px solid rgba(24, 31, 71, 0.1);
  flex-shrink: 0;
}

.sms-auth-tab {
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #5a6178;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.sms-auth-tab.active {
  background: #fff;
  color: #10142a;
  box-shadow: 0 2px 8px rgba(16, 20, 42, 0.08);
}

.sms-auth-title {
  margin: 0 36px 8px 0;
  font-size: 22px;
  font-weight: 700;
  color: #10142a;
  font-family: "Space Grotesk", Inter, sans-serif;
  flex-shrink: 0;
}

.sms-auth-lead {
  margin: 0 0 14px;
  color: #5a6178;
  font-size: 14px;
  line-height: 1.5;
}

.sms-auth-form {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.sms-auth-panel[hidden],
.sms-auth-form[hidden],
#sms-auth-main-panel[hidden],
.sms-auth-field[hidden] {
  display: none !important;
}

.sms-auth-panel {
  min-width: 0;
}

.sms-auth-field {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #5a6178;
  letter-spacing: 0.02em;
}

.sms-auth-field input[type="text"],
.sms-auth-field input[type="email"],
.sms-auth-field input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(24, 31, 71, 0.14);
  border-radius: 10px;
  padding: 11px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #10142a;
  background: #fff;
}

.sms-auth-field input:focus {
  outline: 2px solid rgba(73, 84, 230, 0.28);
  border-color: #4954e6;
}

.sms-auth-consent-label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12px !important;
  font-weight: 500 !important;
  color: #5a6178 !important;
  line-height: 1.45;
  letter-spacing: 0;
}

.sms-auth-consent-label a {
  color: #4954e6;
}

.sms-auth-error {
  margin: 0;
  color: #c0353a;
  font-size: 13px;
  font-weight: 500;
}

.sms-auth-submit,
.sms-auth-form .sms-btn-primary {
  width: 100%;
  height: 46px;
  border-radius: 12px !important;
}

.sms-auth-forgot {
  margin: 12px 0 0;
  text-align: center;
}

.sms-auth-forgot button {
  border: 0;
  background: none;
  color: #4954e6;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  text-decoration: underline;
}

.sms-auth-account {
  display: grid;
  gap: 12px;
}

.sms-auth-account .sms-btn-ghost {
  width: 100%;
}

@media (max-width: 560px) {
  .sms-auth-modal {
    padding: 16px;
  }

  .sms-auth-dialog {
    width: 100%;
    border-radius: 20px;
    padding: 22px 18px 20px;
    max-height: min(92vh, 100%);
  }
}
