/* Audirie login — warm sand two-pane design */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600&family=Instrument+Serif&display=swap');

:root {
  --aud-page: #EDE7E0;
  --aud-card: #FDFBF8;
  --aud-panel: #F3ECE4;
  --aud-edge: #E2DAD1;
  --aud-input-edge: #D8CFC5;
  --aud-ink: #14242E;
  --aud-body: #6B6259;
  --aud-muted: #8A8078;
  --aud-label: #3E4A52;
  --aud-accent: #1878A6;
  --aud-accent-dark: #12648C;
  --aud-error: #B4432B;
}

html, body {
  height: 100%;
  margin: 0;
}

.aud-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  box-sizing: border-box;
  background: var(--aud-page);
  font-family: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--aud-ink);
}

.aud-login-page *, .aud-login-page *::before, .aud-login-page *::after {
  box-sizing: border-box;
}

.aud-card {
  display: grid;
  grid-template-columns: 300px 1fr;
  width: 760px;
  max-width: 100%;
  min-height: 470px;
  background: var(--aud-card);
  border: 1px solid var(--aud-edge);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 60px -32px rgba(20, 36, 46, .34);
}

/* ── Sidebar panel ── */

.aud-panel {
  background: var(--aud-panel);
  padding: 34px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}

.aud-panel-logo {
  height: 28px;
  width: auto;
  align-self: flex-start;
}

.aud-panel-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: audRise .34s ease both;
}

.aud-org-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--aud-accent);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  font-weight: 600;
}

.aud-panel-title {
  margin: 0;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 26px;
  line-height: 1.15;
  color: var(--aud-ink);
  font-weight: 400;
}

.aud-panel-copy {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--aud-body);
}

.aud-trust {
  font-size: 12px;
  color: var(--aud-muted);
}

/* ── Main pane ── */

.aud-main {
  padding: 38px 40px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  justify-content: center;
}

.aud-step {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: audRise .32s ease both;
}

.aud-heading {
  margin: 0;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 30px;
  line-height: 1.12;
  color: var(--aud-ink);
  font-weight: 400;
}

.aud-subline {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--aud-body);
}

.aud-footnote {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--aud-muted);
}

/* ── Fields ── */

.aud-field {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.aud-field label,
.aud-field .form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--aud-label);
  margin: 0;
}

.aud-main input.form-control,
.aud-input {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 16px;
  color: var(--aud-ink);
  background: #FFFFFF;
  border: 1.5px solid var(--aud-input-edge);
  border-radius: 11px;
  padding: 14px 16px;
  height: auto;
  width: 100%;
}

.aud-main input.form-control:focus,
.aud-input:focus {
  outline: none;
  border-color: var(--aud-accent);
  box-shadow: 0 0 0 4px rgba(24, 120, 166, .14);
}

/* Neutralise bootstrap floating-label duplication inside the new design */
.aud-main .form-floating > label {
  position: static;
  padding: 0 0 6px;
  height: auto;
  transform: none;
  pointer-events: auto;
  order: -1;
}

.aud-main .form-floating {
  display: flex;
  flex-direction: column;
}

/* ── Buttons ── */

.aud-btn-primary {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #FFFFFF;
  background: var(--aud-accent);
  border: none;
  border-radius: 11px;
  padding: 15px 18px;
  cursor: pointer;
  transition: background .16s ease;
  width: 100%;
}

.aud-btn-primary:hover:not(:disabled) {
  background: var(--aud-accent-dark);
}

.aud-btn-primary:disabled {
  opacity: .65;
  cursor: default;
}

.aud-link-btn {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 14px;
  color: var(--aud-accent);
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  align-self: flex-start;
  text-align: left;
}

.aud-link-btn:hover {
  color: #115C7F;
  text-decoration: underline;
}

.aud-link-btn.aud-quiet {
  color: var(--aud-body);
  text-decoration: underline;
}

/* ── Choice cards (methods / organisations) ── */

.aud-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.aud-option {
  font-family: 'Instrument Sans', sans-serif;
  text-align: left;
  background: #FFFFFF;
  border: 1.5px solid var(--aud-input-edge);
  border-radius: 12px;
  padding: 15px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: border-color .16s ease, background .16s ease;
}

.aud-option:hover {
  border-color: var(--aud-accent);
  background: #F7FBFD;
}

.aud-option.aud-option-primary {
  border-color: var(--aud-accent);
}

.aud-option-title {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--aud-ink);
}

.aud-option-detail {
  font-size: 13px;
  color: #7A7168;
}

/* ── Banners / errors ── */

.aud-banner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 13px 15px;
  border-radius: 11px;
}

.aud-banner-error {
  background: #FCF2EF;
  border: 1px solid #F1D9D1;
}

.aud-banner-info {
  background: #EAF4F9;
  border: 1px solid #C9E0EC;
}

.aud-banner-error, .aud-banner-error p, .aud-banner-error .text-danger,
.aud-banner-error .text-danger p {
  color: #8C3A24 !important;
  font-size: 13.5px;
  line-height: 1.6;
  margin: 0;
}

.aud-banner-info, .aud-banner-info p {
  color: #2A5A72;
  font-size: 13.5px;
  line-height: 1.6;
  margin: 0;
}

.aud-banner a {
  color: inherit;
  text-decoration: underline;
}

.aud-inline-error {
  font-size: 13px;
  color: var(--aud-error) !important;
  margin: 0;
}

/* ── Spinner / progress / tick ── */

.aud-spinner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid var(--aud-edge);
  border-top-color: var(--aud-accent);
  animation: audSpin .8s linear infinite;
}

.aud-progress {
  height: 4px;
  background: #EFE8E0;
  border-radius: 99px;
  overflow: hidden;
}

.aud-progress > div {
  height: 100%;
  background: var(--aud-accent);
  animation: audProg 2.2s linear both;
}

.aud-tick {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--aud-accent);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
}

/* ── Identifier line ("you@x.com · change") ── */

.aud-identifier {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 14px;
  color: var(--aud-accent);
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  align-self: flex-start;
}

.aud-identifier:hover {
  text-decoration: underline;
}

/* ── Utility row for secondary actions ── */

.aud-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ── Toast (redirect errors) keeps bootstrap toast, repositioned ── */

.aud-toast-holder {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
}

.aud-toast-holder .toast {
  opacity: 1;
  background: #FFFFFF;
  border: 1px solid #F1D9D1;
  border-radius: 12px;
  box-shadow: 0 12px 30px -18px rgba(20, 36, 46, .4);
  max-width: 420px;
}

/* ── Animations ── */

@keyframes audProg {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

@keyframes audSpin {
  to { transform: rotate(360deg); }
}

@keyframes audRise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Mobile: panel becomes a banner on top ── */

@media (max-width: 720px) {
  .aud-login-page {
    padding: 16px 12px;
    align-items: flex-start;
  }

  .aud-card {
    grid-template-columns: 1fr;
    width: 100%;
    min-height: 0;
    border-radius: 26px;
  }

  .aud-panel {
    border-bottom: 1px solid var(--aud-edge);
    padding: 22px 24px;
    gap: 10px;
  }

  .aud-panel-title {
    font-size: 21px;
  }

  .aud-trust {
    display: none;
  }

  .aud-main {
    padding: 24px;
  }

  .aud-btn-primary {
    padding: 16px 18px; /* 48px touch target */
  }
}
