@layer  pages {
body[data-page="password_reset"] *{ box-sizing: border-box; }
    body[data-page="password_reset"]{ height: 100%; min-height: 100dvh; }

    body[data-page="password_reset"]{
      margin: 0;
      background: var(--bg);
      color: var(--text);
      overflow-x: hidden;
      font-family: "Cinzel", serif;
      padding-top: var(--topbar-h);
    }

    /* ===== Reset card (same as login card styling) ===== */
    body[data-page="password_reset"] main.stage{
      width: 100%;
      height: 100%;
      margin: 0;
      padding: 0 !important;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 1;
    }

    body[data-page="password_reset"] .login-card{
      position: relative;
      width: min(448px, 92vw);
      border-radius: 18px;
      background: var(--cv-card-bg);
      color: rgb(18, 18, 22);
      border: 1px solid rgba(216, 178, 104, 0.32);
      box-shadow:
        var(--cv-shadow),
        0 1px 0 rgba(255,255,255,0.70) inset,
        0 -18px 38px rgba(0,0,0,0.08) inset;
      overflow: hidden;
      min-height: 530px; /* slightly taller to fit extra field + messages */
      transform: translateZ(0);
    }

    body[data-page="password_reset"] .login-card::before{
      content: "";
      position: absolute;
      inset: 0;
      border-radius: var(--cv-radius);
      padding: 1px;
      background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 40%),
          rgba(216, 178, 104, 0.95) 0%,
          rgba(216, 178, 104, 0.40) 30%,
          rgba(0, 0, 0, 0.10) 62%,
          rgba(0, 0, 0, 0.10) 100%);
      -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
      -webkit-mask-composite: xor;
      mask-composite: exclude;
      opacity: 0;
      transition: opacity 160ms ease;
      pointer-events: none;
    }
    body[data-page="password_reset"] .login-card:hover::before{ opacity: 1; }

    body[data-page="password_reset"] .login-card-top{
      background: rgb(7, 7, 10);
      padding: 14px 18px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    body[data-page="password_reset"] .login-strip-title{
      color: rgba(250, 245, 245, 0.96);
      font-weight: 800;
      letter-spacing: 0.14em;
      font-size: 16px;
      text-transform: uppercase;
      text-align:center;
    }
    body[data-page="password_reset"] .login-card-body{
      padding: calc(18px + 1.75cm) 22px 22px 22px;
    }
    body[data-page="password_reset"] .login-sub{
      margin: 0 0 16px 0;
      font-size: 13px;
      opacity: 0.90;
      letter-spacing: 0.02em;
      text-align: center;
    }

    body[data-page="password_reset"] .cv-form{
      display: grid;
      gap: 14px;
      min-height: 280px;
      align-content: start;
      width: min(252px, 100%);
      margin-left: auto;
      margin-right: auto;
    }

    body[data-page="password_reset"] .cv-field{ display:grid; gap: 8px; }
    body[data-page="password_reset"] .cv-label{
      font-size: 12px;
      opacity: 0.88;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    body[data-page="password_reset"] .cv-input-wrap{
      position: relative;
      display: grid;
      align-items: center;
    }

    body[data-page="password_reset"] .cv-field input{
      width: 100%;
      padding: 12px 44px 12px 12px;
      border-radius: 14px;
      border: 1px solid rgba(0, 0, 0, 0.16);
      background: rgb(255, 255, 255);
      color: rgb(18, 18, 22);
      outline: none;
      font-family: inherit;
    }

    body[data-page="password_reset"] .cv-field input:focus{
      border-color: rgba(216, 178, 104, 0.85);
      box-shadow: 0 0 0 4px rgba(216, 178, 104, 0.18);
    }

    body[data-page="password_reset"] .pass-toggle{
      position: absolute;
      right: 10px;
      top: 50%;
      transform: translateY(-50%);
      border: none;
      background: transparent;
      color: rgba(18, 18, 22, 0.72);
      padding: 6px;
      border-radius: 10px;
      cursor: pointer;
    }
    body[data-page="password_reset"] .pass-toggle:hover{
      color: rgba(18, 18, 22, 0.92);
      background: rgba(0, 0, 0, 0.05);
    }
    body[data-page="password_reset"] .pass-toggle:focus{
      outline: none;
      box-shadow: 0 0 0 4px rgba(216, 178, 104, 0.22);
    }
    body[data-page="password_reset"] .pass-toggle .icon-eye{ width: 18px; height: 18px; display:block; }
    body[data-page="password_reset"] .pass-toggle .icon-eye-closed{ display:none; }
    body[data-page="password_reset"] .pass-toggle.is-on .icon-eye-open{ display:none; }
    body[data-page="password_reset"] .pass-toggle.is-on .icon-eye-closed{ display:block; }

    body[data-page="password_reset"] .caps-indicator{
      display: block;
      min-height: 14px;
      margin-top: 2px;
      padding: 0;
      background: transparent;
      color: rgba(18, 18, 22, 0.80);
      font-weight: 900;
      letter-spacing: 0.18em;
      font-size: 12px;
      opacity: 0;
      visibility: hidden;
    }
    body[data-page="password_reset"] .caps-indicator.is-on{
      opacity: 1;
      visibility: visible;
    }

    body[data-page="password_reset"] .form-hint{
      margin: 2px auto 0;
      width: min(252px, 100%);
      font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, sans-serif;
      font-size: 12px;
      color: rgba(18,18,22,0.62);
      text-align: left;
      line-height: 1.45;
    }

    body[data-page="password_reset"] .form-msg{
      margin: 6px auto 0;
      width: min(252px, 100%);
      font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, sans-serif;
      font-size: 12px;
      line-height: 1.45;
      color: rgba(18,18,22,0.70);
      min-height: 18px; /* prevents jump */
    }
    body[data-page="password_reset"] .form-msg.error{ color: rgba(160, 20, 20, 0.92); }
    body[data-page="password_reset"] .form-msg.ok{ color: rgba(18, 110, 55, 0.92); }

    body[data-page="password_reset"] .login-btn{
      width: 100%;
      border: 1px solid rgba(216, 178, 104, 0.36);
      background: rgb(7, 7, 10);
      color: rgba(250, 245, 245, 0.98);
      font-family: inherit;
      font-weight: 800;
      letter-spacing: 0.12em;
      font-size: 13px;
      padding: 12px 14px;
      border-radius: 10px;
      box-shadow:
        0 14px 30px rgba(0,0,0,0.30),
        0 1px 0 rgba(255,255,255,0.08) inset,
        0 -10px 18px rgba(0,0,0,0.22) inset;
      cursor: pointer;
      transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
    }

    body[data-page="password_reset"] .login-btn:not(:disabled):hover{
      transform: translateY(-2px);
      box-shadow:
        0 20px 44px rgba(0,0,0,0.34),
        0 1px 0 rgba(255,255,255,0.10) inset,
        0 -10px 18px rgba(0,0,0,0.24) inset;
      filter: brightness(1.03);
    }

    body[data-page="password_reset"] .login-btn:disabled{
      opacity: 1;
      cursor: not-allowed;
      background: var(--cv-card-bg);
      color: rgba(7, 7, 10, 0.56);
      border: 1px solid rgba(216, 178, 104, 0.86);
      box-shadow:
        0 14px 30px rgba(0,0,0,0.22),
        0 1px 0 rgba(255,255,255,0.10) inset,
        0 -10px 18px rgba(0,0,0,0.14) inset,
        0 0 0 2px rgba(216, 178, 104, 0.18);
      filter: none;
    }

    body[data-page="password_reset"] .login-links{
      display: grid;
      gap: 10px;
      margin-top: 18px;
      width: min(252px, 100%);
      margin-left: auto;
      margin-right: auto;
      justify-items: stretch;
      text-align: center;
    }

    body[data-page="password_reset"] .login-links a{
      display: block;
      width: 100%;
      color: rgba(18, 18, 22, 0.82);
      text-decoration: none;
      font-size: 13px;
      letter-spacing: 0.02em;
      padding: 2px 0;
    }
}


/* ===== Final patch: password reset page aligned vertically with login page ===== */
body[data-page="password_reset"]{
  display: block;
  min-height: 100dvh;
}
body[data-page="password_reset"] .stage{
  width: 100%;
  min-height: calc(100dvh - var(--topbar-h));
  margin: 0;
  padding: 0 22px 22px !important;
  display: flex;
  align-items: center;
  justify-content: center;
}
body[data-page="password_reset"] .login-card{
  width: min(538px, 92vw);
}
body[data-page="password_reset"] .login-card-body{
  padding: 28px 22px 22px 22px !important;
}
body[data-page="password_reset"] .cv-form{
  width: min(304px, 100%);
}


/* ===== Final patch v7: enabled primary button uses medium beige ===== */
body[data-page="password_reset"] .login-btn{
  background: rgb(216, 178, 104) !important;
  color: rgb(18, 18, 22) !important;
  border: 1px solid rgba(164, 129, 67, 0.42) !important;
  box-shadow:
    0 14px 30px rgba(0,0,0,0.22),
    0 1px 0 rgba(255,255,255,0.16) inset,
    0 -8px 16px rgba(0,0,0,0.10) inset !important;
}
body[data-page="password_reset"] .login-btn:not(:disabled):hover{
  filter: brightness(1.03) !important;
}


/* ===== Final patch v9: reset strip inset and off-white button states ===== */
body[data-page="password_reset"] .login-card-top{
  margin: 14px 14px 0 14px !important;
  border-radius: 0 !important;
  width: auto !important;
}
body[data-page="password_reset"] .login-btn:not(:disabled){
  background: rgb(244, 239, 231) !important;
  color: rgb(18,18,22) !important;
  border: 1px solid rgba(193, 175, 145, 0.58) !important;
  box-shadow:
    0 14px 30px rgba(0,0,0,0.18),
    0 1px 0 rgba(255,255,255,0.46) inset,
    0 -8px 16px rgba(0,0,0,0.06) inset !important;
}
body[data-page="password_reset"] .login-btn:disabled{
  background: rgb(251, 249, 245) !important;
  color: rgba(18,18,22,0.46) !important;
  border: 1px solid rgba(210, 199, 180, 0.72) !important;
  opacity: 1 !important;
  box-shadow:
    0 10px 22px rgba(0,0,0,0.10),
    0 1px 0 rgba(255,255,255,0.55) inset,
    0 -6px 12px rgba(0,0,0,0.03) inset !important;
  filter: none !important;
}

body[data-page="password_reset"] .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}

.cube-symbol-small{font-size:18px;letter-spacing:0.06em;}
