 :root{
      --bg:#07070b;
      --bg2:#0d0d14;
      --line:rgba(255,255,255,.12);
      --text:#fff;
      --muted:rgba(255,255,255,.82);
      --shadow:0 20px 60px rgba(0,0,0,.38);
      --topbar-height:76px;
      --accent:#8c24a8;
      --accent-2:#b54bd6;
      --accent-soft:#d8a4ff;
      --accent-deep:#681b98;
    }

    *{box-sizing:border-box;margin:0;padding:0}
    html,body{height:100%}
    body{
      font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
      color:var(--text);
      background:
        radial-gradient(circle at top left, rgba(124,92,255,.22), transparent 28%),
        radial-gradient(circle at top right, rgba(255,79,216,.18), transparent 26%),
        radial-gradient(circle at bottom center, rgba(0,212,255,.12), transparent 28%),
        linear-gradient(180deg,var(--bg),var(--bg2));
      overflow-x:hidden;
    }

    a{color:inherit;text-decoration:none}

    .portal-header-brand{
      position:fixed;
      top:0;
      left:0;
      width:100%;
      z-index:1000;
      display:flex;
      align-items:center;
      justify-content:space-between;
      padding:20px 32px;
      min-height:76px;
      border-bottom:1px solid rgba(255,255,255,.12);
      background:rgba(7,7,11,.92);
      backdrop-filter:blur(12px);
    }

    .portal-logo-text,
    .portal-home-link{
      font-size:16px;
      font-weight:800;
      letter-spacing:-.2px;
      color:#fff;
      text-decoration:none;
    }

    .portal-home-link{
      color:var(--accent-soft);
      text-decoration:underline;
    }

    .portal-home-link:hover,
    .portal-logo-text:hover,
    .auth-header p a.link:hover,
    .label-row a.forgot-link:hover,
    .auth-footer a:hover{
      color:#f0d3ff;
    }

    .portal-container{
      min-height:100vh;
      position:relative;
      display:grid;
      grid-template-columns: 1.1fr .9fr;
      padding-top: var(--topbar-height);
    }

    .hero-bg{
      position:absolute;
      inset:0;
      overflow:hidden;
      pointer-events:none;
      z-index:1;
    }

    .bg-photo{
      position:absolute;
      width:220px;
      height:220px;
      border-radius:30px;
      background-size:cover;
      background-position:center;
      box-shadow:0 25px 70px rgba(0,0,0,.40);
      border:1px solid rgba(255,255,255,.14);
      opacity:.82;
      animation: floaty 7s ease-in-out infinite;
      transform:translate3d(0,0,0);
      filter:saturate(1.08) contrast(1.02);
    }

    .bg-photo::after{
      content:"";
      position:absolute;
      inset:0;
      border-radius:30px;
      background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.18));
    }

    .p1{top:8%;left:6%;background-image:url('https://images.unsplash.com/photo-1547347298-4074fc3086f0?auto=format&fit=crop&w=900&q=80');animation-delay:0s}
    .p2{top:18%;right:10%;background-image:url('https://images.unsplash.com/photo-1514525253161-7a46d19cd819?auto=format&fit=crop&w=900&q=80');animation-delay:1.2s}
    .p3{bottom:12%;left:8%;background-image:url('https://images.unsplash.com/photo-1501386761578-eac5c94b800a?auto=format&fit=crop&w=900&q=80');animation-delay:2.1s}
    .p4{bottom:18%;right:12%;background-image:url('https://images.unsplash.com/photo-1493225457124-a3eb161ffa5f?auto=format&fit=crop&w=900&q=80');animation-delay:1.7s}
    .p5{top:42%;left:22%;background-image:url('https://images.unsplash.com/photo-1518611012118-696072aa579a?auto=format&fit=crop&w=900&q=80');animation-delay:.8s;width:180px;height:180px}
    .p6{top:48%;right:22%;background-image:url('https://images.unsplash.com/photo-1501387483519-3f7d1a0e6f8f?auto=format&fit=crop&w=900&q=80');animation-delay:2.6s;width:180px;height:180px}

    .bg-dim{
      position:absolute;
      inset:0;
      background:
        linear-gradient(180deg, rgba(7,7,11,.35), rgba(7,7,11,.78)),
        radial-gradient(circle at center, transparent 0%, rgba(7,7,11,.10) 60%, rgba(7,7,11,.55) 100%);
    }

    .login-hero{
      position:relative;
      z-index:2;
      display:flex;
      align-items:center;
      justify-content:flex-start;
      min-height:calc(100vh - var(--topbar-height));
      padding:40px 32px 40px;
      grid-column:1;
    }

    .hero-copy{
      max-width:560px;
      background:rgba(0,0,0,.22);
      border:1px solid rgba(255,255,255,.14);
      backdrop-filter:blur(10px);
      border-radius:34px;
      padding:30px;
      box-shadow:var(--shadow);
    }

    .hero-copy .pill{
      display:inline-flex;
      padding:8px 12px;
      border-radius:999px;
      border:1px solid rgba(255,255,255,.22);
      background:rgba(255,255,255,.06);
      font-size:12px;
      font-weight:800;
      letter-spacing:.04em;
      text-transform:uppercase;
      margin-bottom:14px;
    }

    .hero-copy h1{
      font-size:clamp(2.2rem,5vw,4.3rem);
      line-height:.95;
      letter-spacing:-2px;
      margin-bottom:14px;
    }

    .hero-copy p{
      color:var(--muted);
      font-size:15px;
      line-height:1.7;
      max-width:42ch;
    }

    .form-panel{
      position:relative;
      z-index:3;
      grid-column:2;
      display:flex;
      align-items:center;
      justify-content:flex-end;
      min-height:calc(100vh - var(--topbar-height));
      padding:40px 32px 40px 16px;
    }

    .form-card{
      width:100%;
      max-width:520px;
      background:rgba(10,10,14,.78);
      border:1px solid var(--line);
      backdrop-filter:blur(18px);
      border-radius:34px;
      box-shadow:var(--shadow);
      padding:30px;
    }

    .auth-header{
      margin-bottom:18px;
    }

    .auth-header h2{
      font-size:2rem;
      letter-spacing:-1px;
      line-height:1;
      margin-bottom:12px;
    }

    .auth-header p,
    .legal-check label{
      color:var(--muted);
      line-height:1.6;
      font-size:14px;
    }

    .auth-header p a.link{
      color:var(--accent-soft);
      text-decoration:underline;
      font-weight:800;
    }

    .field{
      margin-bottom:18px;
    }

    .field label{
      display:block;
      color:#fff;
      font-size:13px;
      font-weight:700;
      margin-bottom:8px;
    }

    .field input{
      width:100%;
      border-radius:16px;
      border:1px solid #3a3a42;
      background:#1a1a1f;
      color:#fff;
      padding:14px 16px;
      font-size:15px;
      outline:none;
    }

    .field input::placeholder{color:#a1a1aa}
    .field input:focus{
      border-color:var(--accent-2);
      box-shadow:0 0 0 3px rgba(140,36,168,.22);
    }

    .label-row{
      display:flex;
      justify-content:space-between;
      align-items:center;
      gap:12px;
    }

    .label-row a.forgot-link{
      color:var(--accent-soft);
      text-decoration:underline;
      font-weight:800;
      font-size:13px;
    }

    .legal-check{
      display:flex;
      align-items:center;
      gap:10px;
      margin-bottom:18px;
    }

    .legal-check input{
      width:16px;
      height:16px;
      accent-color:var(--accent-2);
      flex:0 0 auto;
    }

    .action-btn{
      width:100%;
      border:0;
      border-radius:999px;
      background:linear-gradient(90deg, var(--accent-deep), var(--accent), var(--accent-2));
      color:#fff;
      font-size:15px;
      font-weight:900;
      padding:15px 20px;
      cursor:pointer;
      transition:transform .18s ease, box-shadow .18s ease;
      box-shadow:0 12px 30px rgba(104,27,152,.28);
    }
    .action-btn:hover{
      transform:translateY(-2px);
      box-shadow:0 16px 34px rgba(104,27,152,.36);
    }

    .auth-footer{
      margin-top:18px;
      text-align:center;
      font-size:14px;
      color:#fff;
    }

    .auth-footer a{
      color:var(--accent-soft);
      text-decoration:underline;
      font-weight:800;
    }

    .error-box{
      color:#ff88e3;
      margin:0 0 15px 0;
      font-size:14px;
      line-height:1.5;
    }

    @keyframes floaty{
      0%{transform:translateY(0) translateX(0) rotate(0deg) scale(1)}
      25%{transform:translateY(-14px) translateX(8px) rotate(1deg) scale(1.02)}
      50%{transform:translateY(-22px) translateX(-6px) rotate(-1deg) scale(1.01)}
      75%{transform:translateY(-10px) translateX(10px) rotate(1deg) scale(1.02)}
      100%{transform:translateY(0) translateX(0) rotate(0deg) scale(1)}
    }

    @media (max-width: 1100px){
      .portal-container{grid-template-columns:1fr}
      .login-hero,.form-panel{
        grid-column:1;
        min-height:auto;
      }
      .login-hero{
        padding:40px 16px 20px;
      }
      .form-panel{
        padding:16px 16px 36px;
        justify-content:center;
      }
    }

    @media (max-width: 900px){
      .bg-photo{width:160px;height:160px;border-radius:24px}
      .p5,.p6{width:120px;height:120px}
      .portal-header-brand{padding:18px 24px}
      .hero-copy,.form-card{padding:22px}
    }

    @media (max-width: 640px){
      .bg-photo{opacity:.48}
      .p5,.p6{display:none}
      .form-panel{padding-top:8px}
      .login-hero{padding-bottom:8px}
      .form-card{width:100%}
      .portal-header-brand{padding:16px 16px}
      .portal-logo-text,.portal-home-link{font-size:14px}
    }
    
    .portal-home-link{
      color: var(--accent-soft);
      text-decoration: underline;
      font-weight: 800;
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .portal-home-link::before{
      content: "←";
      font-size: 14px;
      line-height: 1;
      position: relative;
      top: -1px;
    }