
  :root{
    --bg: #F6F7FB;
    --card: #FFFFFF;
    --card-2: #F1F3F8;
    --line: #E9EBF1;
    --text: #171A21;
    --text-dim: #6B7280;
    --text-faint: #9CA3AF;
    --red: #FF3B4E;
    --red-dim: #E2233A;
    --violet: #7C5CFF;
    --violet-dim: #5A3FE0;
    --green: #16A34A;
    --blue: #2563EB;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --font-display: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;
    --app-max: 430px;
  }

  *{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent;}
  html{background:#DDE1EA;}
  body{ font-family: var(--font-body); color: var(--text); background: var(--bg); display:flex; justify-content:center; min-height:100vh; }

  #app{ width:100%; max-width: var(--app-max); min-height:100vh; position:relative; background: var(--bg); overflow-x:hidden; }

  @media (min-width: 431px){
    body{ background:#E7E9F0; padding: 28px 0; align-items:flex-start; }
    #app{
      min-height: calc(100vh - 56px);
      border-radius: 34px;
      box-shadow: 0 0 0 8px #ffffff, 0 0 0 9px #d9dce4, 0 40px 80px -20px rgba(20,24,40,0.25);
      overflow: hidden;
      position:relative;
    }
    #app::before{
      content:"";
      position:absolute; top:0; left:50%; transform:translateX(-50%);
      width:120px; height:22px; background:#ffffff; border-radius:0 0 16px 16px; z-index:1000;
    }
  }

  a{ text-decoration:none; color:inherit; }
  button{ font-family:inherit; border:none; background:none; color:inherit; cursor:pointer; }
  ::-webkit-scrollbar{ display:none; }

  /* ---------- ALERTS ---------- */
  #alertContainer{
    position:fixed; top:0; left:50%; transform:translateX(-50%);
    width:100%; max-width: var(--app-max); z-index: 2000;
    display:flex; flex-direction:column; gap:8px; padding:10px; pointer-events:none;
  }
  .app-alert{
    pointer-events:auto; display:flex; align-items:flex-start; gap:10px;
    padding:13px 14px; border-radius: 14px; background: #ffffff; border:1px solid var(--line);
    box-shadow: 0 14px 34px -10px rgba(20,24,40,0.22);
    transform: translateY(-140%); opacity:0;
    animation: alertIn .45s cubic-bezier(.2,.9,.25,1.2) forwards;
  }
  .app-alert.leaving{ animation: alertOut .35s cubic-bezier(.4,0,.7,.6) forwards; }
  @keyframes alertIn{ to{ transform: translateY(0); opacity:1; } }
  @keyframes alertOut{ to{ transform: translateY(-140%); opacity:0; } }
  .app-alert .icon-wrap{ width:26px;height:26px;border-radius:50%; display:flex;align-items:center;justify-content:center; flex-shrink:0; }
  .app-alert .icon-wrap svg{ width:14px; height:14px; }
  .app-alert .msg{ font-size:13px; line-height:1.4; font-weight:500; color: var(--text); flex:1; padding-top:2px; }
  .app-alert.error{ cursor:pointer; border-color: rgba(255,59,78,0.32); } .app-alert.error .icon-wrap{ background: rgba(255,59,78,0.12); } .app-alert.error .icon-wrap svg{ stroke: var(--red); }
  .app-alert.success .icon-wrap{ background: rgba(22,163,74,0.12); } .app-alert.success .icon-wrap svg{ stroke: var(--green); } .app-alert.success{ border-color: rgba(22,163,74,0.28); }

  /* ---------- MAIN ---------- */
  main{ padding: 40px 24px 34px; min-height:100vh; display:flex; flex-direction:column; }

  .reveal{ opacity:0; transform: translateY(14px); transition: opacity .5s cubic-bezier(.2,.8,.2,1), transform .5s cubic-bezier(.2,.8,.2,1); }
  .reveal.in{ opacity:1; transform:none; }

  /* ---------- LOGO / HEADER ---------- */
  .login-top{ display:flex; justify-content:space-between; align-items:flex-start; margin-bottom: 30px; }
  .brand{
    font-family: var(--font-display); font-weight:800; font-size:24px;
    letter-spacing:-0.02em; color: var(--text); display:flex; align-items:center;
  }
  .brand .accent{ color: var(--red); }
  .brand-dot{ width:6px;height:6px;border-radius:50%; background: var(--red); margin-left:6px; }

  .help-btn{
    width:38px; height:38px; border-radius:12px;
    display:flex; align-items:center; justify-content:center;
    background: var(--card); border:1px solid var(--line);
    transition: transform .15s ease, background .2s ease;
  }
  .help-btn svg{ width:18px; height:18px; stroke: var(--text-dim); }
  .help-btn:active{ transform: scale(0.92); background: var(--card-2); }

  .welcome{ margin-bottom: 24px; }
  .welcome h1{ font-family: var(--font-display); font-size:22px; font-weight:800; letter-spacing:-0.01em; }
  .welcome p{ font-size:13px; color: var(--text-dim); margin-top:6px; line-height:1.5; }

  /* ---------- FORM FIELDS ---------- */
  .field-group{ margin-bottom: 14px; }
  .label{
    font-size:12.5px; font-weight:700; color: var(--text);
    margin-bottom:8px; display:block;
  }
  .field{
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 13px 14px;
  }
  .field.invalid{ border-color: rgba(255,59,78,0.5); }
  .field-row{ display:flex; align-items:center; gap:10px; }
  .field-row svg{ width:18px; height:18px; stroke: var(--text-faint); flex-shrink:0; }
  .field-prefix{ font-size:14px; font-weight:700; color: var(--text-dim); }
  .field input{
    flex:1; border:none; outline:none; background:transparent;
    font-family: var(--font-body); font-size:14.5px; font-weight:600; color: var(--text);
    min-width:0;
  }
  .field input::placeholder{ color: var(--text-faint); font-weight:500; }

  .toggle-pass{
    width:26px; height:26px; border-radius:8px; flex-shrink:0;
    display:flex; align-items:center; justify-content:center;
  }
  .toggle-pass svg{ width:17px; height:17px; stroke: var(--text-faint); }

  .field-error{
    display:none; align-items:center; gap:5px;
    font-size:11.5px; font-weight:600; color: var(--red-dim);
    margin-top:6px; padding-left:2px;
  }
  .field-error.show{ display:flex; }
  .field-error svg{ width:12px; height:12px; stroke: var(--red-dim); flex-shrink:0; }

  .pass-strength{ display:flex; gap:4px; margin-top:8px; padding-left:2px; }
  .pass-strength .bar{ height:3px; flex:1; border-radius:2px; background: var(--line); transition: background .2s ease; }
  .pass-strength.weak .bar:nth-child(1){ background: var(--red-dim); }
  .pass-strength.medium .bar:nth-child(1),
  .pass-strength.medium .bar:nth-child(2){ background: #F59E0B; }
  .pass-strength.strong .bar{ background: var(--green); }

  /* ---------- SUBMIT ---------- */
  .submit-btn{
    width:100%;
    padding: 15px;
    border-radius: 100px;
    background: linear-gradient(135deg, var(--red), var(--red-dim));
    color:#fff;
    font-size:14.5px; font-weight:700;
    display:flex; align-items:center; justify-content:center; gap:8px;
    transition: transform .15s ease, opacity .2s ease;
    margin-top: 8px;
  }
  .submit-btn svg{ width:17px; height:17px; stroke:#fff; }
  .submit-btn:active{ transform: scale(0.97); }

  .terms-note{ font-size:11px; color: var(--text-faint); text-align:center; line-height:1.5; margin-top:14px; padding: 0 8px; }
  .terms-note b{ color: var(--text-dim); }

  .divider-row{ display:flex; align-items:center; gap:12px; margin: 22px 0; }
  .divider-row .line{ flex:1; height:1px; background: var(--line); }
  .divider-row span{ font-size:11.5px; color: var(--text-faint); font-weight:600; }

  .login-row{
    display:flex; justify-content:center; align-items:center; gap:5px;
    font-size:13px; color: var(--text-dim);
  }
  .login-row a{ color: var(--red-dim); font-weight:700; }
  .login-row a:active{ opacity:0.6; }

  .spacer{ flex:1; }

  .safe-end{ height:6px; }
