/* ============================================================================
   HUA Keycloak login theme — modern layout.
   Reimplements the claude-design mockup as clean CSS. Light/dark via
   prefers-color-scheme. The .hua-classic rules are stubs for the future
   classic theme (parent=hua, variant=classic) and are inert for .hua-modern.
   ============================================================================ */

/* ----- Self-hosted fonts (fallbacks keep the theme usable if files absent) -- */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/manrope-variable.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/manrope-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/inter-variable.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/inter-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

/* ----- Design tokens ------------------------------------------------------- */
:root {
  --hua-b0: #004976;
  --hua-b1: #003358;
  --hua-b2: #0066a4;

  --hua-text: #0c1e2d;
  --hua-sub: #5a6e82;
  --hua-border: #cddae6;
  --hua-input-bg: #f6f9fb;
  --hua-card-bg: rgba(255, 255, 255, 0.97);
  --hua-card-shadow: 0 28px 72px rgba(0, 30, 55, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.6);
  --hua-divider: rgba(0, 40, 70, 0.08);
  --hua-page-bg: linear-gradient(150deg, #004976 0%, #002a47 55%, #001728 100%);

  --hua-error: #b03030;
  --hua-error-soft: #d95f5f;
  --hua-success: #1f7a4d;

  --hua-font-head: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --hua-font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --hua-text: #ddeaf5;
    --hua-sub: #6e97b4;
    --hua-border: #1e3a52;
    --hua-input-bg: rgba(8, 22, 36, 0.7);
    --hua-card-bg: rgba(18, 34, 50, 0.93);
    --hua-card-shadow: 0 28px 72px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06);
    --hua-divider: rgba(255, 255, 255, 0.07);
    --hua-page-bg: linear-gradient(150deg, #050d18 0%, #09192a 100%);
    --hua-error: #f09090;
  }
}

/* ----- Reset / base -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html.hua-html { min-height: 100%; background: var(--hua-page-bg); }

body.hua-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--hua-font-body);
  color: var(--hua-text);
  background: var(--hua-page-bg);
  /* keep the gradient covering the viewport so scroll-overflow shows no seam */
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ----- Page layout (modern = centered) ------------------------------------- */
.hua-page {
  display: flex;
  min-height: 100vh;
}

.hua-modern .hua-page {
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
}

.hua-card-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
}

.hua-modern .hua-card {
  position: relative;
  /* width adapts to content: login form stays narrow, text-heavy pages widen */
  width: fit-content;
  min-width: min(448px, 92vw);
  max-width: min(640px, 92vw);
  padding: 30px 44px 34px;
  border-radius: 18px;
  background: var(--hua-card-bg);
  -webkit-backdrop-filter: blur(28px);
  backdrop-filter: blur(28px);
  box-shadow: var(--hua-card-shadow);
  animation: huaFadeUp 0.32s ease-out;
}

/* ----- Logo row + divider -------------------------------------------------- */
.hua-logo-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.hua-logo { width: 52px; height: 52px; object-fit: contain; flex-shrink: 0; }
.hua-logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.hua-logo-title {
  font-family: var(--hua-font-head);
  font-size: 17px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--hua-text);
}
.hua-logo-sub { font-family: var(--hua-font-head); font-size: 13px; color: var(--hua-sub); }

.hua-divider { height: 1px; background: var(--hua-divider); margin-bottom: 16px; }

/* ----- Header / titles ----------------------------------------------------- */
.hua-header { margin-bottom: 22px; }
.hua-title {
  font-family: var(--hua-font-head);
  font-size: 26px; font-weight: 800; letter-spacing: -0.03em;
  color: var(--hua-text);
  margin: 0;
}
.hua-required-note { display: block; font-size: 12px; color: var(--hua-sub); margin-bottom: 6px; }
.required { color: var(--hua-error-soft); }

#kc-content, #kc-content-wrapper { animation: huaFadeUp 0.28s ease-out; }

/* ----- Form fields --------------------------------------------------------- */
.hua-form { margin: 0; }

.hua-group { margin-bottom: 14px; }
.hua-label-wrap { display: flex; align-items: center; gap: 4px; margin-bottom: 5px; }

.hua-label {
  display: block;
  font-family: var(--hua-font-body);
  font-size: 12.5px; font-weight: 500; letter-spacing: 0.01em;
  color: var(--hua-sub);
  margin-bottom: 5px;
}
.hua-label-wrap .hua-label { margin-bottom: 0; }

.hua-input {
  width: 100%;
  padding: 10px 13px;
  border-radius: 9px;
  border: 1.5px solid var(--hua-border);
  background: var(--hua-input-bg);
  color: var(--hua-text);
  font-family: var(--hua-font-body);
  font-size: 14.5px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.hua-input::placeholder { color: var(--hua-sub); opacity: 0.7; }
.hua-input:focus {
  outline: none;
  border-color: var(--hua-b2);
  box-shadow: 0 0 0 3px rgba(0, 102, 164, 0.16);
}
.hua-input[aria-invalid="true"] { border-color: var(--hua-error-soft); }
textarea.hua-input { min-height: 96px; resize: vertical; }

/* password field with visibility toggle */
.hua-input-group { position: relative; display: flex; }
.hua-input-group .hua-input { padding-right: 44px; }
.hua-pw-toggle {
  position: absolute;
  right: 6px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border: none; background: transparent; cursor: pointer;
  color: var(--hua-sub); border-radius: 7px;
}
.hua-pw-toggle:hover { color: var(--hua-b2); }
.hua-eye, .hua-eye-off {
  display: inline-block; width: 18px; height: 18px;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
}
.hua-eye {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}
.hua-eye-off {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-10-8-10-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 10 8 10 8a18.5 18.5 0 0 1-2.16 3.19M1 1l22 22'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-10-8-10-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 10 8 10 8a18.5 18.5 0 0 1-2.16 3.19M1 1l22 22'/%3E%3C/svg%3E");
}

/* field-level error */
.hua-error {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--hua-error);
}
.hua-help { margin-top: 6px; font-size: 12px; color: var(--hua-sub); }

/* ----- Options row (remember-me / forgot) ---------------------------------- */
.hua-setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hua-options-wrap { margin-left: auto; }
.hua-setting .checkbox { margin: 0; }
.hua-setting .checkbox label { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--hua-sub); cursor: pointer; }

/* ----- Checkboxes / radios ------------------------------------------------- */
.hua-check, .hua-radio { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.hua-check-input, .hua-radio-input { width: 16px; height: 16px; accent-color: var(--hua-b2); }
.hua-check-label, .hua-radio-label { font-size: 13.5px; color: var(--hua-text); cursor: pointer; }
.hua-disabled { opacity: 0.55; }

/* ----- Buttons ------------------------------------------------------------- */
.hua-btn {
  display: inline-block;
  padding: 11px 18px;
  border-radius: 9px;
  border: 1.5px solid var(--hua-border);
  background: var(--hua-input-bg);
  color: var(--hua-text);
  font-family: var(--hua-font-body);
  font-size: 14.5px; font-weight: 600; letter-spacing: 0.02em;
  text-align: center; text-decoration: none;
  cursor: pointer;
  transition: all 0.18s;
}
.hua-btn:hover { border-color: var(--hua-b2); }
.hua-btn-block { display: block; width: 100%; }

.hua-btn-primary {
  margin-top: 14px;
  border: none;
  color: #fff;
  background: linear-gradient(135deg, var(--hua-b2) 0%, var(--hua-b0) 100%);
  box-shadow: 0 4px 18px rgba(0, 73, 118, 0.38);
}
.hua-btn-primary:hover {
  filter: brightness(1.13);
  transform: translateY(-1px);
  box-shadow: 0 7px 22px rgba(0, 73, 118, 0.48);
}
.hua-btn-primary:active { transform: translateY(0); }
.hua-buttons { margin-top: 4px; }

/* ----- Links --------------------------------------------------------------- */
a, .hua-link {
  color: var(--hua-b2);
  font-weight: 500;
  text-decoration: none;
}
a:hover, .hua-link:hover { text-decoration: underline; }
.hua-options-wrap a, .hua-setting a { font-size: 12.5px; }

/* registration / info footer */
.hua-signup { margin-top: 20px; text-align: center; font-size: 13px; color: var(--hua-sub); }
#kc-registration, #kc-registration-container { font-size: 13px; color: var(--hua-sub); }

/* ----- Alerts -------------------------------------------------------------- */
.hua-alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 13.5px; line-height: 1.45;
  border: 1px solid transparent;
}
.hua-alert-title { color: inherit; }
.hua-alert-icon {
  flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E");
}
.hua-alert-error   { color: #b03030; background: rgba(217, 95, 95, 0.12); border-color: rgba(217, 95, 95, 0.35); }
.hua-alert-warning { color: #8a6d1f; background: rgba(220, 170, 40, 0.14); border-color: rgba(220, 170, 40, 0.4); }
.hua-alert-success { color: #1f7a4d; background: rgba(40, 160, 100, 0.13); border-color: rgba(40, 160, 100, 0.4); }
.hua-alert-info    { color: var(--hua-b2); background: rgba(0, 102, 164, 0.1); border-color: rgba(0, 102, 164, 0.3); }
@media (prefers-color-scheme: dark) {
  .hua-alert-error { color: #f0a0a0; }
  .hua-alert-info  { color: #7fc0ec; }
}

/* ----- Language switcher --------------------------------------------------- */
.hua-locale { position: absolute; top: 22px; right: 24px; }
.hua-locale-dropdown { position: relative; }
#kc-current-locale-link {
  background: transparent;
  border: 1px solid var(--hua-border);
  border-radius: 100px;
  padding: 4px 12px;
  font-family: var(--hua-font-body);
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--hua-sub);
  cursor: pointer;
}
#kc-current-locale-link:hover { color: var(--hua-b2); border-color: var(--hua-b2); }
.hua-locale-list {
  display: none; /* opened by menu-button-links.js via inline display:block */
  list-style: none; margin: 6px 0 0; padding: 6px;
  position: absolute; right: 0; min-width: 140px;
  background: var(--hua-card-bg);
  border: 1px solid var(--hua-border);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 30, 55, 0.2);
  z-index: 20;
}
.hua-locale-item { list-style: none; }
.hua-locale-link { display: block; padding: 7px 10px; border-radius: 7px; font-size: 13px; color: var(--hua-text); }
.hua-locale-link:hover { background: rgba(0, 102, 164, 0.1); text-decoration: none; }
.hua-flag { font-style: normal; line-height: 1; }

/* ----- attempted-username (show-username) ---------------------------------- */
.hua-attempted-username { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--hua-text); }
.hua-reset-login { display: inline-flex; }

/* ----- Social / identity providers ----------------------------------------- */
.hua-social { margin-top: 20px; }
.hua-social hr { border: none; border-top: 1px solid var(--hua-divider); margin: 18px 0; }
.hua-social h2 { font-family: var(--hua-font-head); font-size: 14px; font-weight: 600; color: var(--hua-sub); margin: 0 0 12px; text-align: center; }
.hua-social-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hua-social-list.hua-social-grid { display: grid; grid-template-columns: 1fr 1fr; }
.hua-btn-social { display: flex; align-items: center; justify-content: center; gap: 8px; }
.hua-social-logo { font-style: normal; }

/* ----- select-authenticator ------------------------------------------------ */
.hua-select-auth { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hua-select-auth-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border: 1.5px solid var(--hua-border);
  border-radius: 11px;
  background: var(--hua-input-bg);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.hua-select-auth-item:hover { border-color: var(--hua-b2); box-shadow: 0 4px 14px rgba(0, 73, 118, 0.12); }
.hua-select-auth-icon { font-size: 20px; color: var(--hua-b2); }
.hua-select-auth-heading { font-family: var(--hua-font-head); font-weight: 700; font-size: 14.5px; color: var(--hua-text); }
.hua-select-auth-desc { font-size: 12.5px; color: var(--hua-sub); }
.hua-select-auth-fill { flex: 1; }
.hua-select-auth-arrow { color: var(--hua-sub); }

/* ----- Segmented one-time-code input --------------------------------------- */
/* Default (no JS): show the single fallback field, hide the boxes. */
.hua-otp-boxes { display: none; }
.hua-otp-enhanced .hua-otp-boxes { display: flex; gap: 10px; justify-content: center; }
.hua-otp-enhanced .hua-otp-fallback { display: none; }

.hua-otp-box {
  flex: 0 0 auto;
  width: 46px;
  height: 54px;
  text-align: center;
  font-family: var(--hua-font-head);
  font-size: 22px; font-weight: 600;
  color: var(--hua-text);
  background: var(--hua-input-bg);
  border: 1.5px solid var(--hua-border);
  border-radius: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
  -moz-appearance: textfield;
}
.hua-otp-box::-webkit-outer-spin-button,
.hua-otp-box::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.hua-otp-box:focus {
  outline: none;
  border-color: var(--hua-b2);
  box-shadow: 0 0 0 3px rgba(0, 102, 164, 0.16);
}
.hua-otp-box[aria-invalid="true"] { border-color: var(--hua-error-soft); }

@media (max-width: 480px) {
  .hua-otp-box { width: 40px; height: 48px; font-size: 19px; }
  .hua-otp-enhanced .hua-otp-boxes { gap: 7px; }
}

/* ----- OTP credential list ------------------------------------------------- */
.hua-otp-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; padding: 0; list-style: none; }
.hua-otp-header { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1.5px solid var(--hua-border); border-radius: 10px; cursor: pointer; }
.hua-otp-input:checked + .hua-otp-header { border-color: var(--hua-b2); box-shadow: 0 0 0 3px rgba(0, 102, 164, 0.16); }
.hua-otp-title { font-size: 13.5px; color: var(--hua-text); }

/* ----- OAuth consent / grant (base markup, styled via CSS only) ------------ */
#kc-oauth h3 {
  font-family: var(--hua-font-head);
  font-size: 14.5px; font-weight: 600; line-height: 1.5;
  color: var(--hua-text);
  margin: 0 0 12px;
}
#kc-oauth > ul {
  list-style: none; margin: 0 0 18px; padding: 0;
  display: flex; flex-direction: column; gap: 8px;
}
#kc-oauth > ul > li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--hua-border);
  border-radius: 10px;
  background: var(--hua-input-bg);
  font-size: 13.5px; color: var(--hua-text);
}
#kc-oauth > ul > li::before {
  content: ""; flex-shrink: 0;
  width: 18px; height: 18px; margin-top: 1px;
  background-color: var(--hua-b2);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}
#kc-oauth #kc-form-options { display: none; }
#kc-oauth #kc-form-buttons > div { display: flex; gap: 10px; }
#kc-oauth #kc-form-buttons .hua-btn { flex: 1; margin-top: 0; }
#kc-oauth .clearfix { clear: both; }

/* ----- Instruction icons (optional polish: error/verify-email) ------------- */
.hua-icon-circle {
  width: 60px; height: 60px; border-radius: 50%;
  margin: 0 auto 24px;
  display: flex; align-items: center; justify-content: center;
}
.hua-icon-circle svg { stroke: #fff; }
.hua-icon-circle.hua-icon-info { background: linear-gradient(135deg, var(--hua-b2), var(--hua-b0)); box-shadow: 0 8px 24px rgba(0, 73, 118, 0.32); }
.hua-icon-circle.hua-icon-error { background: linear-gradient(135deg, #d95f5f, #b03030); box-shadow: 0 8px 24px rgba(176, 48, 48, 0.3); }

/* status-page instruction text (error / verify-email / reset etc.) */
.instruction { font-size: 14px; line-height: 1.55; color: var(--hua-sub); margin: 0 0 14px; }
#kc-error-message, #kc-error-message .instruction { text-align: center; }

/* ----- Keep any content inside the fixed-width card (no h-scroll) ---------- */
#kc-content { overflow-wrap: anywhere; word-break: break-word; }
#kc-content img { max-width: 100%; height: auto; }

/* TOTP / authenticator setup */
#kc-totp-settings { margin: 0 0 18px; padding-left: 20px; }
#kc-totp-settings > li { margin-bottom: 12px; font-size: 13.5px; color: var(--hua-text); }
#kc-totp-settings p { margin: 0 0 6px; }
#kc-totp-settings ul { margin: 4px 0 0; padding-left: 18px; color: var(--hua-sub); font-size: 12.5px; }
#kc-totp-secret-key {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px; letter-spacing: 1px;
  background: var(--hua-input-bg);
  border: 1px solid var(--hua-border);
  border-radius: 8px;
  padding: 8px 10px;
  word-break: break-all;
}
#kc-totp-secret-qr-code { display: block; margin: 10px 0; border-radius: 10px; }

/* Recovery codes list */
#kc-recovery-codes-list, .kc-recovery-codes-list {
  list-style: none; margin: 12px 0; padding: 14px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px;
  background: var(--hua-input-bg);
  border: 1px solid var(--hua-border);
  border-radius: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px; word-break: break-all;
}

/* ======================================================================== */
/* CLASSIC variant (stubs — activated by the future hua-classic theme)      */
/* ======================================================================== */
.hua-classic .hua-page { flex-direction: row; align-items: stretch; }
.hua-classic .hua-brand {
  position: relative; width: 40%; min-width: 300px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: linear-gradient(175deg, var(--hua-b0) 0%, var(--hua-b1) 100%);
}
.hua-classic .hua-brand-bg {
  position: absolute; inset: 0;
  background: center/cover no-repeat;
  /* user supplies img/brand-bg.jpg later: */
  background-image: url('../img/brand-bg.jpg');
}
.hua-classic .hua-brand-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(0, 40, 80, 0.72) 0%, rgba(0, 20, 50, 0.85) 100%);
}
.hua-classic .hua-brand-inner { position: relative; z-index: 1; text-align: center; padding: 80px 48px 60px; color: #fff; }
.hua-classic .hua-brand-logo { width: 112px; height: 112px; object-fit: contain; margin-bottom: 28px; filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.35)); }
.hua-classic .hua-brand-title { font-family: var(--hua-font-head); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 4px; }
.hua-classic .hua-brand-sub { font-family: var(--hua-font-head); font-size: 18px; color: rgba(255, 255, 255, 0.7); margin: 0; }
.hua-classic .hua-brand-divider { width: 44px; height: 1px; background: rgba(255, 255, 255, 0.25); margin: 22px auto; }
.hua-classic .hua-brand-tag { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.4); }
.hua-classic .hua-brand-footer { position: absolute; bottom: 32px; left: 0; right: 0; text-align: center; font-size: 11px; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.22); }
.hua-classic .hua-card-wrap { flex: 1; align-items: center; padding: 80px 48px 60px; background: var(--hua-card-bg); }
.hua-classic .hua-card { width: 360px; max-width: 100%; background: transparent; box-shadow: none; backdrop-filter: none; }
.hua-classic .hua-logo-row { display: none; }
.hua-classic .hua-divider { display: none; }

/* ----- Responsive ---------------------------------------------------------- */
@media (max-width: 768px) {
  .hua-modern .hua-card { padding: 26px 24px 30px; }
  .hua-title { font-size: 23px; }
  .hua-classic .hua-page { flex-direction: column; }
  .hua-classic .hua-brand { width: 100%; min-width: 0; min-height: 240px; }
  .hua-classic .hua-card-wrap { padding: 40px 24px; }
}
