/**
 * SIGMA ROYAL ENTERPRISE ERP
 * Dedicated Authentication Stylesheet (Login, Forgot Password, Reset Password)
 * Split-screen "world-class SaaS" layout: dark brand panel + light form panel.
 */

:root {
  --auth-bg: #f8fafc;
  --auth-surface: #ffffff;
  --auth-border: #e2e8f0;
  --auth-text-main: #0f172a;
  --auth-text-secondary: #334155;
  --auth-text-muted: #64748b;
  --auth-text-subtle: #94a3b8;
  --auth-primary: #0f766e;
  --auth-primary-hover: #115e59;
  --auth-primary-light: #f0fdfa;
  --auth-primary-border: #ccfbf1;
  --auth-primary-ring: rgba(15, 118, 110, 0.16);

  --auth-brand-bg-1: #062522;
  --auth-brand-bg-2: #0f766e;
  --auth-brand-bg-3: #041a18;
  --auth-brand-text: #f0fdfa;
  --auth-brand-text-muted: rgba(240, 253, 250, 0.68);
  --auth-brand-border: rgba(255, 255, 255, 0.14);

  --auth-font-display: 'Outfit', 'Roboto Slab', Georgia, 'Times New Roman', serif;
  --auth-font: 'Roboto Slab', Georgia, 'Times New Roman', serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  font-family: var(--auth-font);
  background-color: var(--auth-bg);
  color: var(--auth-text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ======================================================================
   SHELL — split screen, full viewport
   ====================================================================== */
.auth-shell {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: stretch;
}

/* ======================================================================
   LEFT: BRAND PANEL
   ====================================================================== */
.auth-brand-panel {
  position: relative;
  flex: 0 0 44%;
  max-width: 620px;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 12%, rgba(52, 211, 153, 0.16) 0%, transparent 55%),
    linear-gradient(
      160deg,
      var(--auth-brand-bg-1) 0%,
      var(--auth-brand-bg-2) 52%,
      var(--auth-brand-bg-3) 100%
    );
  display: flex;
  flex-direction: column;
}

.brand-panel-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 90% 70% at 30% 20%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 30% 20%, #000 30%, transparent 80%);
  pointer-events: none;
}

.brand-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(10px);
}

.brand-glow-1 {
  width: 420px;
  height: 420px;
  top: -140px;
  right: -140px;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.3) 0%, transparent 72%);
}

.brand-glow-2 {
  width: 480px;
  height: 480px;
  bottom: -200px;
  left: -160px;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.35) 0%, transparent 72%);
}

.brand-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

.brand-ring-1 {
  width: 340px;
  height: 340px;
  top: 10%;
  right: -110px;
}
.brand-ring-2 {
  width: 220px;
  height: 220px;
  bottom: 8%;
  right: 8%;
  border-color: rgba(255, 255, 255, 0.07);
}

.brand-panel-inner {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3rem 3.25rem;
  width: 100%;
}

.brand-logo-row {
  display: flex;
  align-items: center;
}

.auth-logo-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 9px; /* snug white chip (was 16px 22px) */
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.35);
}

.auth-logo-chip-img {
  height: 76px;
  width: auto;
  object-fit: contain;
  display: block;
}

.brand-panel-body {
  max-width: 460px;
}

.brand-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--auth-brand-border);
  color: #6ee7d4;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.brand-eyebrow i {
  font-size: 11px;
}

.brand-heading {
  font-family: var(--auth-font-display);
  font-size: clamp(1.65rem, 2.6vw, 2.15rem);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: var(--auth-brand-text);
  margin: 0 0 16px 0;
}

.brand-subheading {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--auth-brand-text-muted);
  margin: 0 0 28px 0;
}

.brand-feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.brand-feature-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--auth-brand-text);
}

.feature-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(52, 211, 153, 0.18);
  border: 1px solid rgba(110, 231, 212, 0.35);
  color: #6ee7d4;
  font-size: 10px;
}

.brand-panel-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.brand-security-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--auth-brand-border);
  font-size: 11.5px;
  color: var(--auth-brand-text-muted);
}

.brand-security-pill i {
  color: #6ee7d4;
  font-size: 10.5px;
}

.brand-copyright {
  font-size: 11.5px;
  color: rgba(240, 253, 250, 0.42);
  margin: 0;
}

/* ======================================================================
   RIGHT: FORM PANEL
   ====================================================================== */
.auth-form-panel {
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 2rem;
  background-color: var(--auth-bg);
  background-image:
    radial-gradient(at 92% 8%, rgba(15, 118, 110, 0.05) 0px, transparent 50%),
    radial-gradient(at 8% 95%, rgba(15, 118, 110, 0.04) 0px, transparent 50%);
  position: relative;
}

.auth-form-panel-inner {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.auth-mobile-brand {
  display: none;
}

.auth-mobile-logo {
  height: 34px;
  width: auto;
  object-fit: contain;
}

.auth-form-container {
  width: 100%;
  animation: authCardFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Header & Brand Identity (form side) */
.auth-header {
  margin-bottom: 26px;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  background-color: var(--auth-primary-light);
  border: 1px solid var(--auth-primary-border);
  color: var(--auth-primary);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}

.auth-badge i {
  font-size: 11px;
}

.auth-title {
  font-family: var(--auth-font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--auth-text-main);
  margin: 0 0 6px 0;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  font-size: 13.5px;
  color: var(--auth-text-muted);
  margin: 0;
  line-height: 1.5;
}

/* Alert Notification Boxes */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 20px;
  box-sizing: border-box;
}

.auth-alert i {
  font-size: 15px;
  margin-top: 1px;
  flex-shrink: 0;
}

.auth-alert-content {
  flex: 1;
}

.auth-alert-error {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.auth-alert-warning {
  background-color: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.auth-alert-info {
  background-color: var(--auth-primary-light);
  border: 1px solid var(--auth-primary-border);
  color: var(--auth-primary);
}

.auth-alert-success {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.auth-alert-link {
  display: inline;
  margin: 0 0 0 4px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

/* Device limit dialog (two devices per account) */
.auth-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 28px 26px 22px;
  border: 1px solid var(--auth-border);
  border-radius: 16px;
  background: var(--auth-surface);
  color: var(--auth-text-main);
  box-shadow: 0 24px 60px -12px rgba(15, 23, 42, 0.35);
  text-align: center;
}

.auth-dialog::backdrop {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
}

.auth-dialog[open] {
  animation: authDialogIn 0.25s ease-out;
}

@keyframes authDialogIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.auth-dialog-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: #fffbeb;
  color: #b45309;
  font-size: 22px;
}

.auth-dialog-title {
  margin: 0 0 6px;
  font-family: var(--auth-font-display);
  font-size: 21px;
  font-weight: 700;
}

.auth-dialog-text,
.auth-dialog-help {
  margin: 0 0 14px;
  color: var(--auth-text-secondary);
  font-size: 13.5px;
  line-height: 1.5;
}

.auth-dialog-help {
  margin: 14px 0 18px;
  color: var(--auth-text-muted);
}

.auth-device-list {
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.auth-device-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--auth-border);
  border-radius: 10px;
  background: var(--auth-bg);
}

.auth-device-list li + li {
  margin-top: 8px;
}

.auth-device-list i {
  width: 22px;
  color: var(--auth-primary);
  font-size: 18px;
  text-align: center;
}

.auth-device-list span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.auth-device-list strong {
  font-size: 14px;
}

.auth-device-list small {
  color: var(--auth-text-muted);
  font-size: 12px;
}

/* "Sign out" next to each device in the Device limit dialog */
.auth-device-list li > span {
  flex: 1 1 auto;
}

.auth-device-signout-form {
  flex: 0 0 auto;
  margin-left: auto;
}

.auth-device-signout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--auth-primary);
  border-radius: 8px;
  background: transparent;
  color: var(--auth-primary);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.auth-device-signout:hover,
.auth-device-signout:focus-visible {
  background: var(--auth-primary);
  color: #ffffff;
}

.auth-device-list .auth-device-signout i {
  width: auto;
  color: inherit;
  font-size: 13px;
}

.auth-device-list .auth-device-signout span {
  display: inline;
}

.auth-btn-secondary-plain {
  width: 100%;
  padding: 11px 16px;
  border: 1px solid var(--auth-border);
  border-radius: 10px;
  background: transparent;
  color: var(--auth-text-secondary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.auth-btn-secondary-plain:hover,
.auth-btn-secondary-plain:focus-visible {
  border-color: var(--auth-primary);
  color: var(--auth-primary);
}

.auth-dialog form {
  margin: 0;
}

.auth-dialog .auth-btn-primary {
  width: 100%;
  justify-content: center;
}

/* Form Layout */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--auth-text-secondary);
}

.auth-label-link {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--auth-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.auth-label-link:hover {
  color: var(--auth-primary-hover);
  text-decoration: underline;
}

/* Input Fields */
.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 14px;
  color: var(--auth-text-subtle);
  font-size: 14px;
  pointer-events: none;
  transition: color 0.15s ease;
}

.auth-input {
  width: 100%;
  height: 46px;
  padding: 0 40px 0 38px;
  border: 1px solid var(--auth-border);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: var(--auth-text-main);
  background-color: #ffffff;
  box-sizing: border-box;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.auth-input::placeholder {
  color: var(--auth-text-subtle);
}

.auth-input:focus {
  outline: none;
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 3.5px var(--auth-primary-ring);
}

.auth-input-wrapper:focus-within .auth-input-icon {
  color: var(--auth-primary);
}

.auth-password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--auth-text-subtle);
  padding: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.auth-password-toggle:hover {
  color: var(--auth-text-secondary);
}

.auth-password-toggle:focus {
  outline: none;
  color: var(--auth-primary);
}

/* Action Button */
.auth-btn-primary {
  width: 100%;
  height: 46px;
  margin-top: 6px;
  background-color: var(--auth-primary);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.18s ease;
  box-shadow: 0 2px 4px rgba(15, 118, 110, 0.12);
}

.auth-btn-primary:hover {
  background-color: var(--auth-primary-hover);
  box-shadow: 0 8px 18px -4px rgba(15, 118, 110, 0.32);
  transform: translateY(-1px);
}

.auth-btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(15, 118, 110, 0.12);
}

/* Links & Help text */
.auth-footer-links {
  margin-top: 20px;
  text-align: center;
}

.auth-secondary-link {
  font-size: 13px;
  color: var(--auth-primary);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s ease;
}

.auth-secondary-link:hover {
  color: var(--auth-primary-hover);
  text-decoration: underline;
}

/* Bottom meta (form side) */
.auth-page-footer {
  margin-top: 32px;
  text-align: center;
}

.auth-copyright {
  font-size: 11.5px;
  color: var(--auth-text-subtle);
  margin: 0;
}

/* ======================================================================
   RESPONSIVE — MOBILE: native-app style curved header + bottom sheet
   ====================================================================== */
@media screen and (max-width: 980px) {
  .auth-shell {
    flex-direction: column;
    min-height: 100vh;
  }

  .auth-brand-panel {
    flex: 0 0 auto;
    max-width: none;
    min-height: 0;
    padding: 0 0 52px 0;
    border-radius: 0 0 36px 36px;
  }

  .brand-panel-inner {
    padding: 3rem 1.75rem 0 1.75rem;
    flex-direction: column;
    justify-content: flex-start;
    gap: 12px;
  }

  .brand-logo-row {
    display: none;
  }
  .brand-panel-footer {
    display: none;
  }
  .brand-feature-list {
    display: none;
  }
  .brand-subheading {
    display: none;
  }

  .brand-heading {
    font-size: 1.35rem;
  }

  /* FORM AREA — acts as a bottom-sheet pulled up under the curved header */
  .auth-form-panel {
    min-height: 0;
    flex: 1;
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
    background: var(--auth-surface);
  }

  .auth-form-panel-inner {
    flex: 1;
    max-width: none;
    background: var(--auth-surface);
    border-radius: 28px 28px 0 0;
    margin-top: -36px;
    padding: 0 1.5rem 2rem 1.5rem;
    position: relative;
    z-index: 2;
    box-shadow: 0 -16px 32px -14px rgba(15, 23, 42, 0.18);
  }

  /* Overlapping circular avatar, straddling the header/sheet seam */
  .auth-mobile-brand {
    display: flex;
    justify-content: center;
    margin-top: -46px;
    margin-bottom: 4px;
    position: relative;
    z-index: 3;
  }

  .auth-mobile-logo-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow:
      0 12px 26px -8px rgba(15, 23, 42, 0.3),
      0 0 0 6px rgba(255, 255, 255, 0.55);
  }

  .auth-mobile-logo {
    height: 54px;
    width: auto;
    object-fit: contain;
  }

  .auth-form-container {
    padding-top: 18px;
  }

  .auth-header {
    text-align: center;
  }
  .auth-badge {
    margin-left: auto;
    margin-right: auto;
  }

  /* Material-style filled inputs */
  .auth-input {
    height: 52px;
    border: 1.5px solid transparent;
    background-color: #f1f5f9;
    border-radius: 14px;
  }

  .auth-input:focus {
    background-color: #ffffff;
    border-color: var(--auth-primary);
  }

  .auth-btn-primary {
    height: 52px;
    border-radius: 14px;
    margin-top: 10px;
  }

  .auth-btn-primary:active {
    transform: scale(0.98);
  }

  .auth-page-footer {
    margin-top: 24px;
  }
}

@media screen and (max-width: 480px) {
  .brand-panel-inner {
    padding: 2.5rem 1.25rem 0 1.25rem;
  }
  .auth-form-panel-inner {
    padding: 0 1.25rem 0.5rem 1.25rem;
  }
  .auth-title {
    font-size: 22px;
  }
}

/* Royal + Sigma logos side by side in one chip */
.auth-logo-chip,
.auth-mobile-logo-chip {
  gap: 10px;
}
.logo-pair-divider {
  display: inline-block;
  align-self: stretch;
  width: 1px;
  margin: 6px 0;
  background: #e2e8f0;
}
@media screen and (max-width: 991.98px) {
  .auth-mobile-logo-chip {
    width: auto !important;
    padding: 0 18px;
    border-radius: 44px !important;
  }
}

/* ==========================================================================
   SCROLLBARS — never shown on phones/tablets (touch scrolling still works);
   on desktop invisible until the mouse is over the scrollable area.
   ========================================================================== */
@media (hover: none), (max-width: 991.98px) {
  * {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }
  *::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
    background: transparent !important;
  }
}
@media (hover: hover) and (min-width: 992px) {
  * {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
  }
  *:hover {
    scrollbar-color: rgba(100, 116, 139, 0.32) transparent;
  }
  *::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  *::-webkit-scrollbar-track {
    background: transparent !important;
  }
  *::-webkit-scrollbar-thumb {
    background-color: transparent !important;
    border-radius: 8px;
    border: 2px solid transparent;
    background-clip: padding-box;
  }
  *:hover::-webkit-scrollbar-thumb {
    background-color: rgba(100, 116, 139, 0.32) !important;
  }
  *::-webkit-scrollbar-thumb:hover {
    background-color: rgba(100, 116, 139, 0.55) !important;
  }
}

/* ==========================================================================
   BRAND PANEL CONTENT (views/auth_brand_panel.php): the two company names in the
   SAME type as the home page's left panel (module-hub.css .portal-brand-heading —
   user: left and right sizes close), then the Royal One tagline.
   ========================================================================== */
.brand-companies {
  display: flex;
  flex-direction: column;
  margin: 0;
  font-family: var(--auth-font-display);
  font-size: clamp(1.35rem, 2.1vw, 1.7rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: #ffffff;
}
.brand-company-divider {
  display: block;
  width: 56px;
  height: 2px;
  margin: 12px 0 11px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(94, 234, 212, 0.9), rgba(94, 234, 212, 0));
}
.brand-company-sister {
  color: #99f6e4;
}
.brand-tagline {
  max-width: 440px;
  margin-top: 26px;
  padding: 14px 18px;
  border-left: 3px solid rgba(94, 234, 212, 0.75);
  border-radius: 0 12px 12px 0;
  background: rgba(255, 255, 255, 0.06);
}
.brand-tagline p {
  margin: 0;
}
.brand-tagline-name {
  font-family: var(--auth-font-display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
}
.brand-tagline-kicker {
  margin-top: 2px !important;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6ee7d4;
}
.brand-tagline-text {
  margin-top: 8px !important;
  font-size: 0.92rem;
  font-style: italic;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.86);
}

/* ==========================================================================
   PHONES (user requests 2026-10-20): the teal header is EXACTLY as tall as the
   home screen's (module-hub.css: 192px, white sheet overlapping 22px); company
   names centred with the verse's meaning underneath; the logo sits on the seam —
   half on the teal, half on the white. Login / forgot / reset / change password.
   ========================================================================== */
@media screen and (max-width: 640px) {
  .auth-brand-panel {
    height: 204px;
    padding: 0;
    border-radius: 0 0 30px 30px;
  }
  .brand-panel-inner {
    height: 100%;
    padding: 24px 16px 58px 16px; /* same as the home screen: bottom = sheet + half logo */
    justify-content: center;
    align-items: center;
    gap: 0;
    text-align: center;
  }
  .brand-panel-body {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .brand-eyebrow {
    display: none;
  }
  .brand-companies {
    align-items: center;
    font-size: 0.8rem;
    line-height: 1.22;
    letter-spacing: 0.03em;
  }
  .brand-company-divider {
    width: 32px;
    height: 2px;
    margin: 4px auto;
    background: linear-gradient(
      90deg,
      rgba(94, 234, 212, 0),
      rgba(94, 234, 212, 0.9),
      rgba(94, 234, 212, 0)
    );
  }
  /* Tagline: "ROYAL ONE · AN INTEGRATED ERP PLATFORM" on one line, the motto below */
  .brand-tagline {
    max-width: none;
    margin-top: 7px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
  }
  .brand-tagline-name,
  .brand-tagline-kicker {
    display: inline;
    font-size: 0.58rem;
    letter-spacing: 0.1em;
  }
  .brand-tagline-kicker::before {
    content: ' · ';
  }
  .brand-tagline-text {
    margin-top: 2px !important;
    font-size: 0.7rem;
    line-height: 1.3;
  }

  /* Theme button: a white circle on the WHITE area, right of the logo (like the home
     screen's buttons): 6px below the top of the white sheet. */
  .auth-theme-toggle {
    position: absolute;
    top: calc(204px - 22px + 6px);
    right: 12px;
    width: 36px;
    height: 36px;
  }

  .auth-form-panel-inner {
    margin-top: -22px;
    border-radius: 24px 24px 0 0;
  }
  /* Logo on the seam: half on the teal, half on the white */
  .auth-mobile-brand {
    margin-top: -34px;
    margin-bottom: 0;
  }
  .auth-mobile-logo-chip {
    height: 68px;
    border: 1px solid #e2e8f0;
    box-shadow:
      0 10px 22px -10px rgba(15, 23, 42, 0.35),
      0 0 0 5px rgba(255, 255, 255, 0.6);
  }
  .auth-mobile-logo {
    height: 42px;
  }
  .auth-form-container {
    padding-top: 14px;
  }
}

@media screen and (max-width: 640px) and (max-height: 740px) {
  .auth-brand-panel {
    height: 192px; /* short phones: same as the home screen (module-hub.css) */
  }
  .auth-theme-toggle {
    top: calc(192px - 22px + 6px);
  }
}

/* Inauguration line (Administration -> Launch Ceremony, after the launch) */
.auth-plaque {
  margin: 0 0 6px;
  color: #0f766e;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
}

.auth-plaque i {
  color: #c8913f;
}
