:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --muted: #4b5563;
  --text: #0f172a;
  --heading: #0b1220;
  --bg: #f8fafc;
  --border: #e6edf3;
  --danger: #b91c1c;
  --success: #166534;
}

html {
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  color: var(--heading);
}

h1 { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; font-weight: 600; }

p { color: var(--text); font-size: 0.975rem; }

a { color: var(--primary); }
a:hover { color: var(--primary-hover); }

.container { max-width: 1100px; }

.card {
  border: 0;
  border-radius: 12px;
}

.card-body { padding: 1.75rem; }

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: none;
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #fff;
}

.btn-primary:disabled {
  background: var(--primary);
  border-color: var(--primary);
  opacity: 0.7;
}

.form-control,
.form-select {
  border-radius: 8px;
  padding: 0.75rem 0.875rem;
  border-color: var(--border);
}

.form-control:focus,
.form-select:focus {
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.08);
  border-color: var(--primary);
}

.form-control:disabled,
.form-control[readonly] {
  background: #f1f5f9;
  color: #334155;
  opacity: 1;
  cursor: default;
}

.form-hint {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.8125rem;
}

.text-muted { color: var(--muted) !important; }

.text-danger,
.field-validation-error,
.validation-summary-errors {
  color: var(--danger) !important;
}

.shadow-sm { box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06) !important; }

.brand-logo__img {
  height: auto;
  width: auto;
  max-height: 56px;
  max-width: min(240px, 80vw);
  object-fit: contain;
}

.navbar-brand {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-brand img,
.navbar-brand__logo {
  height: 32px;
  width: auto;
  max-width: min(180px, 50vw);
  object-fit: contain;
}

.navbar-user {
  font-size: 0.8125rem;
  color: var(--muted);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-page {
  position: relative;
  padding-bottom: 72px;
}

.powered-by {
  position: fixed;
  right: 20px;
  bottom: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  font-size: 0.75rem;
  line-height: 1;
  color: var(--muted);
}

.powered-by__label { letter-spacing: 0.02em; }

.powered-by__mark {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.powered-by__name {
  font-weight: 600;
  color: var(--text);
}

.password-input {
  position: relative;
}

.password-input .form-control {
  padding-right: 4.5rem;
}

.password-input__toggle {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.25rem 0.4rem;
  border-radius: 6px;
}

.password-input__toggle:hover,
.password-input__toggle:focus {
  text-decoration: underline;
}

.password-match {
  margin-top: 0.35rem;
  font-size: 0.8125rem;
}

.password-match--ok { color: var(--success); }
.password-match--mismatch { color: var(--danger); }

.status-banner {
  border: 0;
  border-radius: 10px;
}

.signed-in-home {
  text-align: center;
}

.signed-in-home__email {
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.success-mark {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: #dcfce7;
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.readonly-field {
  margin-bottom: 0.25rem;
}

.navbar-nav {
  flex-wrap: wrap;
}

@media (max-width: 576px) {
  .navbar-user {
    display: none;
  }

  .powered-by {
    position: static;
    justify-content: center;
    margin: 1.5rem auto 1rem;
    width: fit-content;
  }

  .account-page {
    padding-bottom: 1.5rem;
  }
}
