/* Reset & base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: "Segoe UI", "Segoe UI Web (West European)", -apple-system, BlinkMacSystemFont, "Roboto", "Helvetica Neue", sans-serif;
  background-color: #ffffff;
  background-image: url("background.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: #1b1b1b;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Centered page content */
.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 60px; /* leave room for footer */
  gap: 16px;
}

/* ========== Login card (closer to square) ========== */
.login-card {
  width: 440px;
  height: 340px;
  max-width: 100%;
  background: #ffffff;
  border: 1px solid #edebe9;
  border-radius: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  padding: 40px 36px 32px;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Microsoft logo */
.logo-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.ms-logo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  width: 23px;
  height: 23px;
  gap: 1px;
}

.ms-logo .sq {
  display: block;
  width: 100%;
  height: 100%;
}

.ms-logo .red    { background: #f25022; }
.ms-logo .green  { background: #7fba00; }
.ms-logo .blue   { background: #00a4ef; }
.ms-logo .yellow { background: #ffb900; }

.logo-text {
  font-size: 18px;
  font-weight: 600;
  color: #737373;
  letter-spacing: 0.01em;
}

/* Title */
.title {
  font-size: 24px;
  font-weight: 600;
  color: #1b1b1b;
  margin-bottom: 20px;
  line-height: 1.2;
}

/* Email input */
.input-group {
  position: relative;
  margin-bottom: 20px;
}

.email-input {
  width: 100%;
  border: none;
  border-bottom: 1px solid #8a8886;
  padding: 8px 0 10px;
  font-size: 15px;
  font-family: inherit;
  color: #1b1b1b;
  background: transparent;
  outline: none;
  transition: border-color 0.15s ease;
}

.email-input::placeholder {
  color: #8a8886;
}

.email-input:focus {
  border-bottom-color: #0067b8;
}

.email-input:focus + .input-underline {
  transform: scaleX(1);
}

.input-underline {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 0.5px;
  background: #0067b8;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
  pointer-events: none;
}

/* Links under input */
.create-account {
  font-size: 13px;
  color: #1b1b1b;
  margin-bottom: 12px;
}

.create-account a {
  color: #0067b8;
  text-decoration: none;
}

.create-account a:hover {
  text-decoration: underline;
  color: #005a9e;
}

.cant-access {
  font-size: 13px;
  margin-bottom: auto; /* push buttons to bottom */
}

.cant-access a {
  color: #0067b8;
  text-decoration: none;
}

.cant-access a:hover {
  text-decoration: underline;
  color: #005a9e;
}

/* Buttons */
.button-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 24px;
}

.btn {
  min-width: 108px;
  height: 32px;
  padding: 0 20px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
  border: none;
  cursor: pointer;
  border-radius: 0px;
  transition: background-color 0.1s ease, box-shadow 0.1s ease;
}

.btn-back {
  background: #cccccc;
  color: #1b1b1b;
}

.btn-back:hover {
  background: #959595;
}

.btn-back:active {
  background: #c8c6c4;
}

.btn-next {
  background: #0067b8;
  color: #ffffff;
}

.btn-next:hover {
  background: #005a9e;
}

.btn-next:active {
  background: #004578;
}

.btn:focus-visible {
  outline: 2px solid #0067b8;
  outline-offset: 2px;
}

/* ========== Sign-in options card ========== */
.options-card {
  width: 440px;
  max-width: 100%;
  background: #ffffff;
  border: 1px solid #edebe9;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  height: 52px;
  display: flex;
  align-items: center;
  padding: 0 16px;
}

.sign-in-options {
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  color: #1b1b1b;
  padding: 8px 4px;
  width: 100%;
  text-align: left;
  transition: background-color 0.1s ease;
}

.sign-in-options:hover {
  background: #f3f2f1;
}

.sign-in-options:focus-visible {
  outline: 2px solid #0067b8;
  outline-offset: 2px;
}

.key-icon {
  color: #1b1b1b;
  flex-shrink: 0;
}

/* ========== Footer (bottom right) ========== */
.footer {
  position: fixed;
  bottom: 3px;
  right: 1px;
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 12px;
  color: #1b1b1b;
}

.footer-link {
  color: #1b1b1b;
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
  color: #1b1b1b;
}

.footer-more {
  background: none;
  border: none;
  color: #1b1b1b;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  letter-spacing: 1px;
}

.footer-more:hover {
  color: #1b1b1b;
}

/* Responsive: shrink on smaller screens */
@media (max-width: 720px) {
  .login-card,
  .options-card {
    width: 100%;
    max-width: 440px;
  }

  .login-card {
    height: auto;
    min-height: 380px;
    padding: 32px 28px 28px;
  }

  .footer {
    right: 12px;
    bottom: 12px;
    gap: 14px;
  }
}
