:root {
  --hids-blue: #263c8a;
  --hids-blue-mid: #4d5b96;
  --hids-blue-dark: #1a2a5c;
  --hids-blue-soft: #e8ecf7;
  --hids-text: #1a1f36;
  --hids-muted: #6b7289;
  --hids-border: #d8deef;
  --hids-error: #c62828;
}

* {
  box-sizing: border-box;
}
html, body {
  padding: 0;
  margin: 0;
  min-width: 320px;
}
body {
  background: #f4f6fb;
  font-family: "Outfit", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 26px;
  color: var(--hids-text);
}
a {
  color: var(--hids-blue);
  text-decoration-color: #aab6de;
}
a:hover {
  color: var(--hids-blue-dark);
}
label {
  cursor: pointer;
  color: var(--hids-muted);
  display: block;
  margin-bottom: 6px;
  font-size: 0.875em;
  font-weight: 500;
}
h1,
h2,
h3,
h4 {
  font-weight: 600;
}
.section {
  margin-bottom: 45px;
}

input[type="text"], input[type="email"], input[type="password"], select {
  padding: 12px 14px;
  border-radius: 10px;
  width: 100%;
  box-shadow: none;
  border: 1px solid var(--hids-border);
  font-size: 1em;
  font-family: inherit;
  background: #fff;
  color: var(--hids-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus {
  border-color: var(--hids-blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(38, 60, 138, 0.15);
}

input:focus::placeholder {
  color: transparent;
}

input[disabled] {
  opacity: 0.5;
}

.center {
  text-align: center;
}
.right {
  text-align: right;
}
.small {
  font-size: 0.875em;
}
.error {
  color: var(--hids-error);
}
.button {
  background: var(--hids-blue);
  padding: 14px 30px;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  color: #fff;
  display: inline-block;
  min-width: 150px;
  font-size: 1.05em;
  font-weight: 600;
  font-family: inherit;
  text-align: center;
  transition: background 0.15s ease, transform 0.15s ease;
}
.button:hover {
  background: var(--hids-blue-dark);
  color: #fff;
}
.button.button-outline {
  background: #fff;
  border: 1px solid var(--hids-blue);
  color: var(--hids-blue);
}
.button.button-outline:hover {
  border-color: var(--hids-blue-dark);
  background-color: var(--hids-blue-dark);
  color: #fff;
}

.container {
  margin: 60px auto 15px auto;
  max-width: 550px;
}

.wrap {
  background: #fff;
  padding: 40px;
  box-shadow: 0 8px 30px rgba(38, 60, 138, 0.06);
  border: 1px solid var(--hids-border);
  border-radius: 16px;
}

.header {
  border-bottom: 1px solid var(--hids-border);
  padding-bottom: 15px;
  margin-bottom: 30px;
}
.header .logo img {
  width: auto;
  max-width: 200px;
  max-height: 56px;
  object-fit: contain;
}

.unsub-all {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid var(--hids-border);
}

.row {
  margin-bottom: 20px;
}
.lists {
  list-style-type: none;
  padding: 0;
}
.lists li {
  margin: 0 0 5px 0;
}
.lists .description {
  margin: 0 0 15px 0;
  font-size: 0.875em;
  line-height: 1.3rem;
  color: var(--hids-muted);
  margin-left: 25px;
}
.form .nonce {
  display: none;
}
.form .captcha {
  margin-top: 30px;
}

.archive {
  list-style-type: none;
  margin: 25px 0 0 0;
  padding: 0;
}
.archive .date {
  display: block;
  color: var(--hids-muted);
  font-size: 0.875em;
}
.archive li {
  margin-bottom: 15px;
}
.feed {
  margin-right: 15px;
}

.home-options {
  margin-top: 30px;
}
.home-options a {
  margin: 0 7px;
}

.pagination {
  margin-top: 30px;
  text-align: center;
}
.pg-page {
  display: inline-block;
  padding: 0 10px;
  text-decoration: none;
}
.pg-page.pg-selected {
  text-decoration: underline;
  font-weight: bold;
}

/* ——— Auth / login layout ——— */
.auth-body {
  min-height: 100vh;
  background: var(--hids-blue-dark);
  overflow-x: hidden;
}

.auth-page {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background:
    linear-gradient(105deg, rgba(26, 42, 92, 0.72) 0%, rgba(38, 60, 138, 0.55) 48%, rgba(26, 42, 92, 0.78) 100%),
    url("/public/static/login-bg.jpg") center / cover no-repeat;
}

.auth-hero {
  flex: 1 1 58%;
  display: flex;
  align-items: flex-end;
  padding: 48px 56px;
  color: #fff;
}

.auth-hero-content {
  max-width: 420px;
  animation: auth-rise 0.7s ease both;
}

.auth-hero-logo {
  display: block;
  width: auto;
  max-width: 260px;
  height: auto;
  margin-bottom: 18px;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.25));
}

.auth-hero-tagline {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.5;
}

.auth-side {
  flex: 0 0 min(460px, 42%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 28px;
  background: rgba(244, 246, 251, 0.12);
  backdrop-filter: blur(2px);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 18px;
  padding: 36px 32px 32px;
  box-shadow:
    0 24px 60px rgba(10, 18, 48, 0.35),
    0 2px 0 rgba(255, 255, 255, 0.4) inset;
  animation: auth-card-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-card-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--hids-border);
}

.auth-card-brand img {
  width: auto;
  max-width: 132px;
  height: 48px;
  object-fit: contain;
  object-position: left center;
}

.auth-card-brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.auth-card-brand-text strong {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--hids-blue);
  line-height: 1.2;
}

.auth-card-brand-text span {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--hids-muted);
  letter-spacing: 0;
}

.auth-card .login h2 {
  margin: 0 0 6px;
  font-size: 1.65rem;
  color: var(--hids-text);
  letter-spacing: -0.02em;
}

.auth-subtitle {
  margin: 0 0 24px;
  color: var(--hids-muted);
  font-size: 0.95rem;
  line-height: 1.45;
  font-weight: 400;
}

.auth-card .login .form p {
  margin: 0 0 16px;
}

.auth-card .login .submit {
  margin-top: 8px;
  margin-bottom: 0;
}

.auth-forgot {
  margin-top: 18px !important;
}

.auth-forgot a {
  color: var(--hids-blue-mid);
  text-decoration: none;
  font-weight: 500;
}
.auth-forgot a:hover {
  color: var(--hids-blue);
  text-decoration: underline;
}

.login .submit {
  margin-top: 20px;
}
.login button {
  width: 100%;
  vertical-align: middle;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login button img {
  max-width: 24px;
  margin-right: 10px;
}
.login input[name=totp_code] {
  font-size: 2em;
  letter-spacing: 5px;
  text-align: center;
}

@keyframes auth-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes auth-card-in {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

footer.container {
  margin-top: 15px;
  text-align: center;
  color: #aaa;
  font-size: 0.775em;
  margin-top: 30px;
  margin-bottom: 30px;
}
footer a {
  color: #aaa;
  text-decoration: none;
}
footer a:hover {
  color: #111;
}

@media screen and (max-width: 900px) {
  .auth-page {
    flex-direction: column;
    background:
      linear-gradient(180deg, rgba(26, 42, 92, 0.78) 0%, rgba(38, 60, 138, 0.65) 40%, rgba(26, 42, 92, 0.88) 100%),
      url("/public/static/login-bg.jpg") center / cover no-repeat;
  }

  .auth-hero {
    flex: 0 0 auto;
    padding: 36px 24px 12px;
    align-items: center;
    text-align: center;
    justify-content: center;
  }

  .auth-hero-content {
    max-width: none;
  }

  .auth-hero-logo {
    margin-left: auto;
    margin-right: auto;
    max-width: 200px;
  }

  .auth-side {
    flex: 1 1 auto;
    padding: 16px 20px 36px;
    background: transparent;
  }

  .auth-card {
    max-width: 440px;
    width: 100%;
  }
}

@media screen and (max-width: 650px) {
  .wrap {
    margin: 0;
    padding: 20px 16px;
    max-width: none;
    border-radius: 0;
  }

  .auth-hero {
    padding: 28px 16px 8px;
  }

  .auth-hero-logo {
    max-width: 160px;
  }

  .auth-hero-tagline {
    font-size: 0.95rem;
  }

  .auth-side {
    padding: 12px 14px 28px;
  }

  .auth-card {
    padding: 24px 18px;
    border-radius: 14px;
  }

  .auth-card .login h2 {
    font-size: 1.4rem;
  }

  .auth-card .login input[type="text"],
  .auth-card .login input[type="password"],
  .auth-card .login input[type="email"],
  .auth-card input {
    font-size: 16px; /* avoids iOS zoom on focus */
    min-height: 44px;
  }

  .auth-card .login button,
  .auth-card button {
    min-height: 46px;
    font-size: 1rem;
  }
}

@media screen and (max-width: 400px) {
  .auth-card-brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .auth-card-brand img {
    max-width: 120px;
    height: auto;
  }
}
