/* Power Pages dual stacked sign-in → Village Portal Core */

:root {
  font-family: "Segoe UI", "Segoe UI Web (West European)", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #1a1f2e;
  background: #faf9f8;
}

* { box-sizing: border-box; }

html, body {
  min-height: 100%;
  margin: 0;
}

body {
  overflow-x: hidden;
  background: #faf9f8; /* Power Pages / Fluent canvas — flat, no gradient */
  -webkit-font-smoothing: antialiased;
}

.signin-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.signin-card {
  display: flex;
  width: min(940px, 100%);
  min-height: 560px;
  background: #fff;
  border: 1px solid #e3e6eb;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.12);
}

.brand-panel {
  flex: 0 0 42%;
  max-width: 42%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, #1277c8, #005a9e);
  color: #fff;
  padding: 40px 38px;
  display: flex;
  flex-direction: column;
}

.brand-panel::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  right: -130px;
  top: 34%;
  border: 1.5px solid rgba(255, 255, 255, 0.10);
  border-radius: 50%;
  z-index: 0;
}

.brand-panel > * { position: relative; z-index: 1; }

.brand-top {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.brand-bar {
  width: 3px;
  height: 42px;
  background: #fff;
  border-radius: 2px;
  flex: none;
  margin-top: 2px;
}

.brand-name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.brand-subtitle {
  font-size: 13px;
  font-style: italic;
  color: rgba(255, 255, 255, 0.82);
  margin-top: 3px;
}

.brand-middle { margin-top: auto; }

.brand-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.6px;
  color: rgba(255, 255, 255, 0.72);
}

.brand-middle h1 {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 12px 0 14px;
  line-height: 1.02;
}

.brand-middle p {
  font-size: 14.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.86);
  max-width: 300px;
  margin: 0;
}

.brand-footer { margin-top: 34px; }

.brand-rule {
  height: 1px;
  background: rgba(255, 255, 255, 0.22);
  margin-bottom: 16px;
}

.brand-platform {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.86);
}

.brand-platform > span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  padding: 3px 8px;
  border-radius: 4px;
}

.brand-platform strong { color: #fff; }

.signin-panel {
  flex: 1;
  padding: 44px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.signin-panel h2,
.signin-board-title {
  font-size: 27px;
  font-weight: 600;
  color: #1a1f2e;
  letter-spacing: -0.01em;
  margin: 0;
}

.signin-board-title {
  margin: 0 0 4px;
}

.signin-subtitle,
.signin-board-subtitle {
  font-size: 14px;
  color: #5a6473;
  margin: 5px 0 18px;
}

.signin-board-subtitle {
  margin: 0 0 16px;
}

.microsoft-button {
  width: 100%;
  background: #106ebe;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 13px 0;
  border: 1px solid #106ebe;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14.5px;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.12s, border-color 0.12s;
}

.microsoft-button:hover,
.microsoft-button:focus-visible {
  background: #005a9e;
  border-color: #005a9e;
}

.microsoft-button:focus-visible {
  outline: 3px solid rgba(16, 110, 190, 0.25);
  outline-offset: 2px;
}

.microsoft-button svg {
  width: 18px;
  height: 18px;
  display: block;
  flex: none;
}

.signin-divider {
  height: 1px;
  background: #e3e6eb;
  margin: 22px 0 20px;
  border: 0;
}

.board-form {
  width: 100%;
  margin: 0;
}

.board-label {
  display: block;
  width: 100%;
  font-size: 13px;
  font-weight: 600;
  color: #1a1f2e;
  margin: 0 0 6px;
}

.board-input {
  display: block;
  width: 100%;
  height: 40px;
  margin: 0 0 14px;
  padding: 8px 12px;
  border: 1px solid #a19f9d;
  border-radius: 6px;
  background: #fff;
  color: #1a1f2e;
  font-size: 14px;
  font-family: inherit;
}

.board-input:focus {
  outline: none;
  border-color: #106ebe;
  box-shadow: 0 0 0 1px #106ebe;
}

.board-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
  width: 100%;
  margin: 0 0 14px;
}

.board-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  font-size: 13px;
  font-weight: 400;
  color: #5a6473;
  cursor: pointer;
}

.board-remember input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.board-forgot {
  color: #106ebe;
  font-size: 13px;
  text-decoration: none;
  flex: none;
  white-space: nowrap;
  margin-left: auto;
}

.board-forgot:hover { text-decoration: underline; }

.board-submit { margin-top: 4px; }

.signin-help {
  font-size: 12px;
  color: #8a92a0;
  line-height: 1.6;
  margin: 18px 0 0;
}

[hidden] { display: none !important; }
.signin-card.account-card--compact { width: min(900px, 100%); min-height: 530px; }
.account-form { display: grid; gap: 15px; }
.account-field { display: grid; gap: 6px; }
.account-field > span:first-child,
.account-note { font-size: 12px; color: #5a6473; line-height: 1.5; }
.account-field > span:first-child { font-weight: 600; }
.account-field input {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #a19f9d;
  border-radius: 6px;
  background: #fff;
  color: #1a1f2e;
  font: inherit;
}
.account-primary,
.account-secondary {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.account-primary { border: 1px solid #106ebe; background: #106ebe; color: #fff; cursor: pointer; }
.account-secondary { border: 1px solid #a19f9d; background: transparent; color: #1a1f2e; }
.account-message {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #a4262c;
  border-radius: 6px;
  background: #fde7e9;
  color: #a4262c;
  font-size: 13px;
  line-height: 1.45;
}
.account-message.success { border-color: #107c10; background: #dff6dd; color: #107c10; }
.account-message.info { border-color: #106ebe; background: #f3f8fd; color: #005a9e; }
.password-control { display: flex; position: relative; }
.password-control input { padding-right: 62px; }
.password-toggle {
  position: absolute;
  right: 4px;
  top: 4px;
  bottom: 4px;
  border: 0;
  background: transparent;
  color: #106ebe;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
#external-change-password-form .account-note { margin: 0 0 12px; }

@media (prefers-color-scheme: dark) {
  :root,
  body {
    background: #1b1a19; /* matches Power Pages html.dark page background */
    color: #f3f2f1;
  }

  .signin-card {
    background: #252423;
    border-color: #3b3a39;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  }

  .brand-panel {
    background: linear-gradient(155deg, #0f5fa6, #003f72);
  }

  .signin-panel h2,
  .signin-board-title { color: #f3f2f1; }

  .signin-subtitle,
  .signin-board-subtitle { color: #c8c6c4; }

  .signin-divider { background: #3b3a39; }

  .board-label { color: #f3f2f1; }

  .board-input {
    background: #1b1a19;
    border-color: #4a4847;
    color: #f3f2f1;
  }

  .board-remember { color: #c8c6c4; }
  .board-forgot { color: #3aa0f3; }
  .signin-help { color: #a19f9d; }
  .account-field > span:first-child,
  .account-note { color: #c8c6c4; }
  .account-field input { background: #1b1a19; border-color: #4a4847; color: #f3f2f1; }
  .account-secondary { border-color: #4a4847; color: #f3f2f1; }
  .account-message { border-color: #f1707a; background: #3a1417; color: #f1707a; }
  .account-message.success { border-color: #6bc96b; background: #123320; color: #6bc96b; }
  .account-message.info { border-color: #15466e; background: #10243a; color: #3aa0f3; }

  .microsoft-button:hover,
  .microsoft-button:focus-visible {
    background: #1a82d6;
    border-color: #1a82d6;
  }
}

@media (max-width: 760px) {
  .signin-shell {
    padding: 14px;
    place-items: start center;
  }

  .signin-card {
    flex-direction: column;
    min-height: 0;
  }

  .brand-panel {
    flex: none;
    max-width: 100%;
    padding: 30px 26px;
  }

  .brand-panel::after { display: none; }
  .brand-middle { margin-top: 22px; }
  .brand-middle h1 { font-size: 30px; }
  .brand-footer { margin-top: 22px; }
  .signin-panel { padding: 30px 26px; }
}
