/* Copied from dsp-bidder/public/login.css for a consistent admin login experience */
/* 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;
}

.m365-back-btn:active {
  background: #004578;
  border-color: #004578;
}

.m365-title {
  margin: 0 0 4px;
  font-size: 24px;
  font-weight: 600;
  color: #1b1b1b;
  letter-spacing: -0.015em;
}

.m365-subtitle {
  margin: 0 0 24px;
  font-size: 15px;
  font-weight: 400;
  color: #1b1b1b;
}

.m365-form {
  display: flex;
  flex-direction: column;
}

.m365-label {
  font-size: 13px;
  font-weight: 600;
  color: #1b1b1b;
  margin: 0 0 4px;
  display: block;
}

.m365-input {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  margin: 0 0 16px;
  border: 1px solid #8a8886;
  border-radius: 2px;
  background: #ffffff;
  font-size: 15px;
  color: #323130;
  outline: none;
  transition: all 0.1s ease;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
}

.m365-input:hover:not(:disabled) {
  border-color: #323130;
}

.m365-input:focus:not(:disabled) {
  border-color: #0078d4;
  border-width: 2px;
  padding: 0 9px;
}

.m365-input:disabled {
  background: #f3f2f1;
  color: #a19f9d;
  cursor: not-allowed;
  border-color: #c8c6c4;
}

.m365-input::placeholder {
  color: #605e5c;
  opacity: 1;
}

.m365-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: 0 0 24px;
}

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

.m365-remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.m365-remember input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.m365-submit {
  width: 100%;
  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;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
}

.m365-submit:hover:not(:disabled) {
  background: #005a9e;
  border-color: #005a9e;
}

.m365-submit:active:not(:disabled) {
  background: #004578;
  border-color: #004578;
}

.m365-submit:disabled {
  background: #f3f2f1;
  border-color: #f3f2f1;
  color: #a19f9d;
  cursor: not-allowed;
}

/* Microsoft-style Three Dot Bouncing Animation */
.ms-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 20px;
}

.ms-dot {
  width: 8px;
  height: 8px;
  background: #0067b8;
  border-radius: 50%;
  animation: ms-bounce 1.4s infinite ease-in-out both;
}

.m365-submit .ms-dot {
  background: #ffffff;
}

.ms-dot:nth-child(1) {
  animation-delay: -0.32s;
}

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

@keyframes ms-bounce {
  0%, 80%, 100% {
    transform: translateY(0) scale(1);
  }
  40% {
    transform: translateY(-10px) scale(1.1);
  }
}

.m365-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 0 20px 24px;
  color: #ffffff;
  font-size: 12px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.m365-footer a {
  color: #ffffff;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

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

.m365-footer .sep {
  color: rgba(255, 255, 255, 0.7);
}

/* Responsive Design */
@media (max-width: 768px) {
  .m365-header {
    padding: 16px;
  }
  .vue-logo {
    height: 32px;
  }
  .m365-card {
    max-width: 100%;
    width: 100%;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.98);
  }
  .m365-view {
    padding: 32px 24px;
  }
  .m365-input {
    height: 44px;
    font-size: 16px;
    padding: 0 12px;
  }
  .m365-submit {
    height: 44px;
    font-size: 16px;
  }
}


