/* Microsoft 365 Login - Accurate Recreation */
.m365-login-page {
  min-height: 100vh;
  min-height: -webkit-fill-available;
  display: flex;
  position: relative;
  overflow: hidden;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background Image Layer */
.m365-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('https://ema-bucket-main.s3.us-east-2.amazonaws.com/app_assets/1tsq-vue.jpg') center/cover no-repeat;
  z-index: 0;
}

.m365-background::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.25) 100%);
}

/* Content Layer */
.m365-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
}

.m365-header {
  display: flex;
  justify-content: flex-start;
  padding: 48px 0 0 48px;
}

.vue-logo {
  height: 36px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.m365-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.m365-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05);
  border-radius: 0;
  overflow: hidden;
}

.m365-card-inner {
  width: 100%;
  overflow: hidden;
}

.m365-slide-container {
  display: flex;
  width: 200%;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.m365-slide-container.slide-out {
  transform: translateX(-50%);
}

.m365-view {
  width: 50%;
  padding: 44px;
  flex-shrink: 0;
  box-sizing: border-box;
}

.m365-login-view {
  min-height: 440px;
  display: flex;
  flex-direction: column;
}

.m365-auth-view {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 440px;
}

.m365-auth-content {
  text-align: center;
  width: 100%;
  max-width: 100%;
}

.m365-auth-content .m365-title {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.m365-auth-status {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.m365-auth-text {
  color: #605e5c;
  font-size: 15px;
  margin: 0;
  font-weight: 400;
}

/* Success Checkmark Animation */
.success-checkmark {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  position: relative;
}

.checkmark {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: block;
  stroke-width: 3;
  stroke-miterlimit: 10;
  animation: scale-success 0.3s ease-in-out 0.9s both;
  position: relative;
}

.checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 3;
  stroke-miterlimit: 10;
  stroke: #16a34a;
  fill: #16a34a;
  animation: stroke-circle 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards, fill-circle 0.4s ease-in-out 0.4s forwards;
}

.checkmark-check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  stroke: #ffffff;
  stroke-width: 3;
  stroke-linecap: round;
  animation: stroke-check 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke-circle {
  100% { stroke-dashoffset: 0; }
}

@keyframes fill-circle {
  100% { fill-opacity: 1; }
}

@keyframes stroke-check {
  100% { stroke-dashoffset: 0; }
}

@keyframes scale-success {
  0%, 100% { transform: none; }
  50% { transform: scale3d(1.1, 1.1, 1); }
}

.success-text {
  color: #16a34a;
  font-weight: 600;
  font-size: 16px;
}

/* Error State */
.error-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

.m365-error-title {
  color: #1b1b1b;
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.m365-error-message {
  color: #605e5c;
  font-size: 15px;
  margin: 8px 0 0;
  line-height: 1.5;
}

.m365-back-btn {
  margin-top: 24px;
  width: 100%;
  max-width: 200px;
  height: 32px;
  padding: 0 16px;
  background: #0067b8;
  color: #ffffff;
  border: 1px solid #0067b8;
  border-radius: 2px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.1s ease;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
}

.m365-back-btn:hover {
  background: #005a9e;
  border-color: #005a9e;
}

/* Form Styles */
.m365-title {
  font-size: 24px;
  font-weight: 600;
  color: #1b1b1b;
  margin: 0;
}

.m365-subtitle {
  font-size: 15px;
  color: #605e5c;
  margin: 8px 0 24px;
}

.m365-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.m365-label {
  font-size: 13px;
  color: #1b1b1b;
  font-weight: 600;
  margin-top: 8px;
}

.m365-input {
  height: 32px;
  padding: 6px 10px;
  border: 1px solid #8a8886;
  border-radius: 0;
  font-size: 15px;
  color: #1b1b1b;
  background: #fff;
  outline: none;
}

.m365-input:focus {
  border-color: #0067b8;
  box-shadow: 0 0 0 1px #0067b8;
}

.m365-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.m365-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #1b1b1b;
  user-select: none;
}

.m365-submit {
  margin-top: 24px;
  height: 32px;
  background: #0067b8;
  color: #fff;
  border: 1px solid #0067b8;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.1s ease;
}

.m365-submit:hover {
  background: #005a9e;
  border-color: #005a9e;
}

.m365-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.m365-help {
  margin-top: auto;
  padding-top: 16px;
}

.m365-help-link {
  font-size: 13px;
  color: #0067b8;
  text-decoration: none;
}

.m365-help-link:hover {
  text-decoration: underline;
}

.m365-footer {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  color: rgba(255,255,255,0.85);
  font-size: 12px;
}

.m365-footer a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
}

.m365-footer a:hover {
  text-decoration: underline;
}

.m365-footer .sep {
  opacity: 0.8;
}

/* Microsoft-like loading dots */
.ms-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.ms-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  opacity: 0.5;
  animation: ms-bounce 1s infinite ease-in-out;
}

.ms-dot:nth-child(2) { animation-delay: 0.15s; }
.ms-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes ms-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.35; }
  40% { transform: translateY(-6px); opacity: 1; }
}

