* { box-sizing: border-box; margin: 0; padding: 0; }

    :root {
      --page-bg: #ececec;
      --text-dark: #1f2b3d;
      --text-muted: #677385;
      --line: #d8dce0;
      --input-border: #d4d9df;
      --btn: #4a4a4a;
      --btn-hover: #3d3d3d;
      --radius: 30px;
    }

    body {
      min-height: 100vh;
      font-family: "Inter", "Segoe UI", Roboto, sans-serif;
      background: var(--page-bg);
      padding: 0;
      color: var(--text-dark);
    }

    .frame {
      width: 100%;
      min-height: 100vh;
      background: #ffffff;
      display: grid;
      grid-template-rows: 1fr auto;
      overflow: hidden;
    }

    .content {
      display: grid;
      grid-template-columns: 1.25fr 1fr;
      padding: 70px 44px 40px;
      gap: 48px;
      align-items: center;
    }

    .illustration-col {
      display: flex;
      justify-content: center;
      align-items: center;
      min-height: 430px;
    }

    .illustration-box {
      width: 100%;
      max-width: 600px;
      border-radius: 0;
      background: transparent;
      padding: 0;
      border: none;
    }

    .logo-img {
      width: 100%;
      max-width: 600px;
      height: auto;
      display: block;
      object-fit: contain;
    }

    .form-col {
      border-left: 1px solid var(--line);
      min-height: 430px;
      display: flex;
      align-items: center;
      justify-content: center;
      padding-left: 46px;
    }

    .form-wrap {
      width: min(360px, 100%);
    }

    h1 {
      font-size: 41px;
      font-weight: 700;
      color: var(--text-dark);
      margin-bottom: 58px;
      letter-spacing: -0.2px;
      text-align: center;
    }

    #emailStep h1 {
      font-size: 36px;
      font-weight: 700;
      letter-spacing: -0.2px;
      color: #1f2b3d;
      margin-bottom: 12px;
      text-align: center;
    }

    .email-copy {
      font-size: 14px;
      line-height: 1.45;
      color: #59667a;
      text-align: center;
      margin-bottom: 24px;
    }

    #emailStep label {
      font-size: 14px;
      font-weight: 600;
      color: #2f3b4b;
      margin-bottom: 10px;
    }

    #emailStep input {
      background: #f5f6f8;
      border: 1px solid #d5dae1;
      border-radius: 7px;
      padding: 13px 14px;
      font-size: 14px;
      margin-bottom: 18px;
    }

    label {
      display: block;
      font-size: 12px;
      font-weight: 600;
      color: #334255;
      margin-bottom: 8px;
    }

    input {
      width: 100%;
      border: 1px solid var(--input-border);
      background: #f0f1f2;
      border-radius: 8px;
      padding: 12px 14px;
      font-size: 13px;
      color: #253446;
      margin-bottom: 22px;
      outline: none;
    }

    input::placeholder { color: #8d9bad; }
    input.input-error {
      border-color: #c73434;
      box-shadow: 0 0 0 3px rgba(199, 52, 52, 0.14);
    }
    .field-error {
      min-height: 14px;
      margin-top: 6px;
      margin-bottom: 10px;
      color: #b3261e;
      font-size: 11px;
      line-height: 1.2;
    }

    .submit-btn {
      width: 100%;
      border: none;
      border-radius: 6px;
      padding: 12px 14px;
      background: var(--btn);
      color: #fff;
      font-size: 18px;
      font-weight: 700;
      cursor: pointer;
      transition: background 0.2s;
    }

    .submit-btn:hover { background: var(--btn-hover); }

    .hidden { display: none !important; }

    .code-view {
      min-height: 430px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: 22px;
    }

    .code-header {
      text-align: center;
    }

    .code-title {
      font-size: 52px;
      font-weight: 700;
      color: #1f2b3d;
      letter-spacing: -0.3px;
      margin-bottom: 10px;
    }

    .code-copy {
      font-size: 14px;
      color: #44566e;
      line-height: 1.45;
      margin-bottom: 18px;
    }

    .code-copy strong { color: #1f2b3d; }

    .code-top label {
      font-size: 18px;
      margin-bottom: 10px;
      color: #2a3a4f;
    }

    .code-top input {
      font-size: 18px;
      padding: 12px 14px;
      margin-bottom: 0;
    }

    .code-mid {
      text-align: center;
      color: #4f6077;
      font-size: 16px;
      line-height: 1.6;
      margin-top: auto;
      margin-bottom: auto;
    }

    .resend-link {
      color: #cfd5df;
      text-decoration: underline;
      font-weight: 600;
      pointer-events: none;
      margin-left: 6px;
    }

    .resend-active .resend-link {
      color: #4f6077;
      pointer-events: auto;
    }

    .countdown {
      display: block;
      margin-top: 8px;
    }

    .reset-view {
      min-height: 430px;
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    .reset-btn {
      width: 100%;
      border: none;
      border-radius: 9px;
      background: #36383c;
      color: #ffffff;
      font-size: 20px;
      font-weight: 700;
      padding: 12px 16px;
      margin-top: 8px;
      cursor: pointer;
      transition: background 0.2s ease;
    }

    .reset-btn:hover {
      background: #2f3135;
    }

    .reset-title {
      font-size: 30px;
      font-weight: 700;
      letter-spacing: -0.3px;
      color: #1f2b3d;
      text-align: center;
      margin-bottom: 8px;
    }

    .reset-copy {
      text-align: center;
      font-size: 14px;
      color: #44566e;
      line-height: 1.45;
      margin-bottom: 10px;
    }

    .password-wrap { position: relative; }

    .password-wrap input {
      padding-right: 44px;
      margin-bottom: 0;
    }

    .password-toggle {
      position: absolute;
      right: 12px;
      top: 50%;
      transform: translateY(-50%);
      width: 22px;
      height: 22px;
      border: none;
      background: transparent;
      padding: 0;
      opacity: 0.75;
      cursor: pointer;
      display: inline-grid;
      place-items: center;
      color: #6f7d8d;
    }

    .password-toggle:hover { opacity: 1; }

    .eye-icon {
      position: absolute;
      inset: 0;
      width: 18px;
      height: 18px;
      margin: auto;
      pointer-events: none;
    }

    .hint {
      font-size: 11px;
      color: #6f7d8d;
      margin: 8px 0 0;
    }

    /* Toast Messages */
    .toast-container {
      position: fixed;
      top: 40px;
      right: 30px;
      z-index: 1055;
    }
    .toast-message {
      padding: 15px 40px 15px 15px;
      margin-bottom: 10px;
      border-radius: 6px;
      color: #fff;
      position: relative;
      font-size: 15px;
      min-width: 240px;
    }
    .toast-message.error { background-color: #dc3545; }
    .toast-message.success { background-color: #28a745; }
    .toast-close {
      position: absolute;
      top: 5px;
      right: 10px;
      font-size: 20px;
      cursor: pointer;
      color: #fff;
      border: none;
      background: transparent;
    }

    /* Back to login link */
    .back-login {
      display: block;
      text-align: center;
      margin-top: 16px;
      font-size: 13px;
      color: #3d73cc;
      text-decoration: none;
    }
    .back-login:hover { text-decoration: underline; }

    @media (max-width: 1200px) {
      .content {
        grid-template-columns: 1.12fr 1fr;
        padding: 56px 30px 30px;
        gap: 34px;
      }

      .logo-img { max-width: 540px; }
      .form-col { padding-left: 34px; }
      h1 { font-size: 36px; margin-bottom: 40px; }
      .submit-btn { font-size: 20px; }
      .code-title { font-size: 40px; }
      .code-copy { font-size: 13px; margin-bottom: 14px; }
      .code-top label { font-size: 17px; }
      .code-top input { font-size: 17px; }
      .code-mid { font-size: 15px; }
      .reset-title { font-size: 40px; }
      .reset-copy { font-size: 13px; }
    }

    @media (max-width: 980px) {
      .content {
        grid-template-columns: 1fr;
        padding: 30px 20px 20px;
        gap: 22px;
      }

      .illustration-col {
        min-height: 0;
        justify-content: center;
      }

      .illustration-box {
        width: min(660px, 100%);
      }

      .form-col {
        border-left: none;
        border-top: 1px solid var(--line);
        min-height: 0;
        padding: 24px 0 0;
      }

      .form-wrap {
        width: min(520px, 100%);
      }

      h1 { font-size: 32px; margin-bottom: 24px; }
      .submit-btn { font-size: 19px; }
      .code-view { min-height: 360px; }
      .code-title { font-size: 34px; }
      .code-top label { font-size: 16px; margin-bottom: 8px; }
      .code-top input { font-size: 16px; padding: 11px 12px; }
      .code-mid { font-size: 14px; }
      .reset-view { min-height: 360px; }
      .reset-title { font-size: 34px; }
    }

    @media (max-width: 560px) {
      .content {
        padding: 18px 14px 14px;
        gap: 16px;
      }

      .illustration-col {
        display: none;
      }

      .form-col {
        border-top: none;
        padding-top: 18px;
      }

      h1 {
        font-size: 28px;
        margin-bottom: 18px;
      }

      #emailStep h1 {
        font-size: 30px;
        margin-bottom: 10px;
      }

      .email-copy {
        font-size: 13px;
        margin-bottom: 18px;
      }

      label { font-size: 12px; }
      input {
        font-size: 14px;
        padding: 11px 12px;
        margin-bottom: 14px;
      }

      .submit-btn {
        font-size: 16px;
        padding: 11px 12px;
      }

      .code-view {
        min-height: calc(100vh - 250px);
      }

      .code-top label {
        font-size: 15px;
        margin-bottom: 10px;
      }

      .code-title { font-size: 24px; }
      .code-copy { font-size: 11px; margin-bottom: 12px; }
      .reset-title { font-size: 24px; }
      .reset-copy { font-size: 11px; }

      .code-top input {
        font-size: 15px;
        padding: 11px 12px;
      }

      .code-mid {
        font-size: 14px;
      }
    }

    @media (max-width: 380px) {
      h1 { font-size: 24px; }
    }
