.modal-auth-card {
  width: 90%;
  max-width: 410px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  border-radius: 20px;
  border: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: authModalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authModalScaleIn {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-auth-header {
  padding: 20px 22px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-brand-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-brand-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.2px;
}

.auth-btn-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  color: #64748b;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  transition: all 0.15s ease;
}

.auth-btn-close:hover {
  background: #e2e8f0;
  color: #0f172a;
  transform: rotate(90deg);
}

.auth-segment-wrap {
  padding: 0 22px 14px;
}

.auth-segmented-control {
  display: flex;
  background: #f1f5f9;
  border-radius: 11px;
  padding: 3px;
  gap: 2px;
}

.segment-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 7px 0;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.segment-btn:focus-visible {
  box-shadow: 0 0 0 2px #bfdbfe;
}

.segment-btn.active {
  background: #ffffff;
  color: #0f172a;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.modal-auth-body {
  padding: 0 22px 18px;
}

.quick-preset-container {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-preset-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
}

.quick-preset-tag {
  background: #e2e8f0;
  color: #334155;
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
}

.quick-preset-hint {
  color: #64748b;
}

.quick-preset-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.quick-pill-btn {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  border-radius: 8px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
  outline: none;
  transition: all 0.18s ease;
  text-align: left;
}

.quick-pill-btn:hover {
  border-color: #93c5fd;
  background: #f0f7ff;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.1);
}

.quick-pill-btn:active {
  transform: scale(0.97);
}

.quick-pill-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pill-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
}

.pill-admin {
  background: #fef3c7;
  color: #b45309;
}

.pill-user {
  background: #dbeafe;
  color: #1d4ed8;
}

.pill-action-text {
  font-size: 10px;
  color: #2563eb;
  font-weight: 500;
}

.pill-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10.5px;
  color: #64748b;
  margin-top: 1px;
}

.auth-field-group {
  margin-bottom: 13px;
}

.auth-field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 5px;
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-input-field {
  width: 100%;
  height: 40px;
  padding: 0 12px 0 36px;
  font-size: 13px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #ffffff;
  outline: none;
  color: #0f172a;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-input-field:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
  background: #ffffff;
}

.auth-input-field.input-highlight {
  animation: fieldPulse 0.45s ease-out;
}

@keyframes fieldPulse {
  0% {
    background-color: #dbeafe;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25);
  }
  100% {
    background-color: #ffffff;
  }
}

.btn-auth-submit {
  width: 100%;
  height: 42px;
  margin-top: 6px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-auth-submit:hover {
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.38);
  transform: translateY(-1px);
}

.btn-auth-submit:active {
  transform: scale(0.985);
}

.submit-arrow {
  display: inline-flex;
  transition: transform 0.2s ease;
}

.btn-auth-submit:hover .submit-arrow {
  transform: translateX(3px);
}

.auth-modal-footer {
  padding: 0 22px 18px;
  text-align: center;
}

.footer-notice {
  font-size: 11px;
  color: #94a3b8;
}
