html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

/* The template's focus ring was a hardcoded Bootstrap blue on white; it now uses the
   same teal ring as everything else and a surface-coloured gap that tracks dark mode. */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem var(--torrec-surface), 0 0 0 0.25rem rgba(var(--torrec-teal-rgb), .55);
}

/* The default template's sticky-footer scaffolding stood here:
       html { position: relative; min-height: 100%; }
       body { margin-bottom: 60px; }
   It paired with `.footer { position: absolute; bottom: 0 }` in _Layout.cshtml.css. The 60px
   margin reserved room for that absolute footer, so it rendered as a blank strip *below* the
   footer and pushed the document past 100vh — every page scrolled a little and the footer sat
   short of the bottom edge. torrec-theme.css positions the footer with a flex column instead,
   which needs neither rule. */

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Auth screens (_LayoutBare) — centered single card.
   `.torrec-auth-body { margin-bottom: 0 }` used to sit here purely to cancel the template's
   60px body margin on these pages. With that margin gone the override does nothing, so it was
   removed; _LayoutBare keeps the class as a styling hook. */

.torrec-auth {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background-color: var(--torrec-bg);
}

/* The same two radial washes every retrofitted page carries behind its top band,
   here centred behind the card — the sign-in screen is the first thing anyone
   sees and had no brand presence at all beyond the logo. */
.torrec-auth::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 45% 38% at 50% 22%, rgba(var(--torrec-teal-rgb), .16), transparent 70%),
    radial-gradient(ellipse 38% 32% at 78% 84%, color-mix(in srgb, var(--torrec-cielo, #A39C95) 13%, transparent), transparent 74%),
    radial-gradient(ellipse 30% 28% at 14% 72%, rgba(var(--torrec-teal-rgb), .07), transparent 72%);
  pointer-events: none;
  z-index: -1;
}
/* The brand's accent bar, echoed as a thin line across the top of the screen. */
.torrec-auth::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--torrec-teal) 0%, var(--torrec-teal) 62%, var(--torrec-terracotta) 62%, var(--torrec-terracotta) 100%);
  pointer-events: none;
}

/* The premium panel recipe, in brand tokens. This card previously took its
   background from --color-sf-flyout-bg-color — a raw Syncfusion theme variable —
   so the auth screens were the one surface in the app that did not track the
   --torrec-* palette at all. */
.torrec-auth-card {
  width: 420px;
  max-width: 100%;
  padding: 2.25rem 2.25rem 2rem;
  border: 1px solid color-mix(in srgb, var(--torrec-border) 76%, var(--torrec-teal) 24%);
  border-radius: var(--torrec-radius-lg);
  background:
    radial-gradient(circle at top left, rgba(var(--torrec-teal-rgb), .08), transparent 42%),
    linear-gradient(180deg, color-mix(in srgb, var(--torrec-surface) 92%, var(--torrec-surface-2) 8%), var(--torrec-surface));
  box-shadow: var(--torrec-elev-3);
  color: var(--torrec-text);
}

/* The card's title is a display heading, whatever tag the view used (h4). */
.torrec-auth-card h4,
.torrec-auth-standalone h4 {
  font-family: var(--torrec-font-display);
  font-size: var(--torrec-text-lg);
  font-weight: 700;
  letter-spacing: var(--torrec-tracking-display);
}
.torrec-auth-card .text-muted {
  line-height: 1.5;
}
/* /platform login: the break-glass password form folded under "Emergency access" (HostAdmin/Login.cshtml). */
.torrec-breakglass > summary {
  cursor: pointer;
  user-select: none;
}
/* Complex login renders inside the full portal layout; give its panel the same
   floating weight as the bare-layout card. Two classes: torrec-theme.css loads
   after this file and its single-class .torrec-panel would otherwise win. */
.torrec-panel.torrec-auth-standalone {
  padding: 2rem;
  border-radius: var(--torrec-radius-lg);
  box-shadow: var(--torrec-elev-3);
}

/* Syncfusion's e-card is a hoverable/clickable component by default and swaps
   its background-color on :hover. This card is a static wrapper, not a
   clickable card, so hold the background still. */
.torrec-auth-card.e-card,
.torrec-auth-card.e-card:hover {
  background:
    radial-gradient(circle at top left, rgba(var(--torrec-teal-rgb), .08), transparent 42%),
    linear-gradient(180deg, color-mix(in srgb, var(--torrec-surface) 92%, var(--torrec-surface-2) 8%), var(--torrec-surface));
}

/* An eyebrow over the card's own title, matching the two-tier heading every other
   page now uses. */
.torrec-auth-eyebrow {
  display: block;
  margin-bottom: .3rem;
  text-align: center;
  font-size: .68rem;
  line-height: 1;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--torrec-text-muted);
}

.torrec-auth-card .e-btn.e-primary {
  min-height: 42px;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 8px 16px rgba(var(--torrec-teal-rgb), .2);
}

.torrec-auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid color-mix(in srgb, var(--torrec-border) 70%, transparent);
}
.torrec-auth-brand .torrec-brand__name {
  font-size: 1.5rem;
}

.torrec-auth-brand .torrec-brand__icon {
  width: 64px;
  height: 64px;
}

/* Phones: the card fills the width and loses the desktop's generous padding —
   2rem of padding inside a 360px viewport leaves very little field width. */
@media (max-width: 480px) {
  .torrec-auth {
    padding: .75rem;
    align-items: flex-start;
    padding-top: 2rem;
  }

  .torrec-auth-card {
    width: 100%;
    padding: 1.25rem 1.1rem;
  }

  .torrec-auth-brand {
    margin-bottom: 1rem;
  }

  .torrec-auth-brand .torrec-brand__icon {
    width: 52px;
    height: 52px;
  }
}
