    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    :root {
      --red:     #D72B2B;
      --red-dk:  #a81f1f;
      --red-lt:  #f04040;
      --gray:    #7a7a7a;
      --dark:    #111418;
      --panel:   #181c22;
      --card:    #1e232c;
      --border:  #2a3040;
      --white:   #f5f5f5;
      --muted:   #9aa0ad;
    }

    html, body {
      height: 100%;
      font-family: 'Lato', sans-serif;
      background: var(--dark);
      color: var(--white);
      overflow: hidden;
    }

    /* ── BACKGROUND ── */
    .bg {
      position: fixed; inset: 0; z-index: 0;
      background:
        radial-gradient(ellipse 60% 80% at 0% 50%,  rgba(215,43,43,.12) 0%, transparent 65%),
        radial-gradient(ellipse 50% 60% at 100% 20%, rgba(215,43,43,.07) 0%, transparent 60%),
        linear-gradient(160deg, #0d1017 0%, #131820 50%, #0f1319 100%);
    }

    .bg::before {
      content: '';
      position: absolute; inset: 0;
      background-image:
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
      background-size: 48px 48px;
      mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
    }

    .bg::after {
      content: '';
      position: absolute; inset: 0;
      background: linear-gradient(90deg, transparent 0%, var(--red) 50%, transparent 100%);
      height: 1px; width: 100%;
      top: 38%; opacity: .18;
      animation: scanline 6s ease-in-out infinite;
    }

    @keyframes scanline {
      0%,100% { opacity: .10; top: 35%; }
      50%      { opacity: .22; top: 65%; }
    }

    /* ── LAYOUT ── */
    .page {
      position: relative; z-index: 1;
      height: 100vh;
      display: grid;
      grid-template-columns: 1fr 480px;
    }

    /* ── LEFT PANEL ── */
    .left {
      display: flex; flex-direction: column; justify-content: center;
      padding: 64px 72px;
      border-right: 1px solid var(--border);
      position: relative; overflow: hidden;
    }

    .left-logo {
      margin-bottom: 48px;
      animation: fadeUp .6s 0s both;
    }

    .left-logo-box {
      display: inline-flex; align-items: center;
      background: rgba(255,255,255,.04);
      border: 1px solid var(--border);
      border-radius: 5px;
      padding: 14px 24px;
      position: relative; overflow: hidden;
    }

    .left-logo-box::before {
      content: '';
      position: absolute; inset: 0;
      background: linear-gradient(135deg, rgba(215,43,43,.08) 0%, transparent 60%);
    }

    .left-logo-box .erp-label {
      font-family: 'Rajdhani', sans-serif;
      font-size: 22px; letter-spacing: 3px; text-transform: uppercase;
      color: var(--muted); font-weight: 700;
      position: relative; z-index: 1;
    }

    .left-badge {
      display: inline-flex; align-items: center; gap: 8px;
      background: rgba(215,43,43,.12);
      border: 1px solid rgba(215,43,43,.3);
      border-radius: 4px;
      padding: 10px;
      font-family: 'Rajdhani', sans-serif;
      font-size: 13px; letter-spacing: 2.5px; text-transform: uppercase;
      color: var(--red-lt);
      margin-bottom: 32px; width: fit-content;
      animation: fadeUp .6s .1s both;
    }

    .left-badge span {
      width: 6px; height: 6px; border-radius: 50%;
      background: var(--red); display: block;
      animation: pulse 2s infinite;
    }

    @keyframes pulse {
      0%,100% { opacity: 1; transform: scale(1); }
      50%      { opacity: .4; transform: scale(.6); }
    }

    .left h1 {
      font-family: 'Rajdhani', sans-serif;
      font-size: clamp(36px, 4vw, 58px);
      font-weight: 700; line-height: 1.05; letter-spacing: -1px;
      color: var(--white);
      animation: fadeUp .6s .2s both;
    }

    .left h1 em { font-style: normal; color: var(--red); }

    .left p {
      margin-top: 20px;
      font-size: 15px; font-weight: 300;
      color: var(--muted); line-height: 1.7; max-width: 420px;
      animation: fadeUp .6s .3s both;
    }

    .stats {
      display: flex; gap: 40px;
      margin-top: 52px;
      animation: fadeUp .6s .4s both;
    }

    .stat-item { display: flex; flex-direction: column; gap: 4px; }
    .stat-num  { font-family: 'Rajdhani', sans-serif; font-size: 28px; font-weight: 700; color: var(--white); }
    .stat-num span { color: var(--red); }
    .stat-lbl  { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }

    .left-div {
      width: 64px; height: 3px;
      background: linear-gradient(90deg, var(--red), transparent);
      margin-top: 48px;
      animation: fadeUp .6s .5s both;
    }

    .corner-mark {
      position: absolute; right: -1px; bottom: 60px;
      width: 5px; height: 64px;
      background: linear-gradient(to bottom, var(--red), transparent);
    }

    /* ── RIGHT / CARD ── */
    .right {
      display: flex; align-items: center; justify-content: center;
      padding: 48px 40px;
      background: var(--panel);
    }

    .card {
      width: 100%; max-width: 380px;
      animation: fadeUp .6s .15s both;
    }

    .logo-wrap {
      display: flex; flex-direction: column; align-items: center;
      margin-bottom: 32px;
    }

    .logo-bg {
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 7px;
      padding: 10px 20px;
      display: flex; align-items: center; justify-content: center;
    }

    .logo-bg img { height: 46px; width: auto; display: block; }

    .form-title {
      font-family: 'Rajdhani', sans-serif;
      font-size: 22px; font-weight: 600;
      color: var(--white); margin-bottom: 6px;
    }

    .form-sub { font-size: 13px; color: var(--muted); margin-bottom: 20px; }

    /* ── SERVER ALERT (PHP errors) ── */
    .alert {
      display: flex; align-items: center; gap: 8px;
      padding: 10px 14px; border-radius: 7px;
      font-size: 13px; margin-bottom: 18px;
      border: 1px solid transparent;
    }
    .alert.error   { background: rgba(215,43,43,.12); border-color: rgba(215,43,43,.3); color: #f87171; }
    .alert.success { background: rgba(22,163,74,.12);  border-color: rgba(22,163,74,.3);  color: #4ade80; }
    .alert svg     { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2; fill: none; flex-shrink: 0; }

    /* Encrypted ?m= message */
    .server-msg { font-size: 13px; color: #f87171; font-weight: 600; margin-bottom: 16px; }

    /* ── FIELDS ── */
    .field { margin-bottom: 18px; }

    .field label {
      display: block;
      font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
      color: var(--muted); margin-bottom: 8px;
    }

    .input-wrap { position: relative; display: flex; align-items: center; }

    .input-wrap .field-icon {
      position: absolute; left: 14px;
      width: 16px; height: 16px;
      stroke: var(--gray); stroke-width: 1.8;
      fill: none; pointer-events: none;
      transition: stroke .2s;
    }

    .input-wrap input {
      width: 100%;
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 13px 14px 13px 42px;
      font-family: 'Lato', sans-serif;
      font-size: 14px; color: var(--white);
      outline: none;
      transition: border-color .2s, box-shadow .2s;
    }

    .input-wrap input::placeholder { color: #4a5060; }

    /* Focus */
    .input-wrap input:focus {
      border-color: var(--red);
      box-shadow: 0 0 0 3px rgba(215,43,43,.12);
    }

    .input-wrap:has(input:focus) .field-icon { stroke: var(--red-lt); }

    /* HTML5 native invalid — shown only after user has interacted (:user-invalid) */
    .input-wrap input:user-invalid {
      border-color: var(--red-lt);
      box-shadow: 0 0 0 3px rgba(215,43,43,.15);
    }

    /* Suppress browser default validation popup UI (we rely on :user-invalid border) */
    input::-webkit-validation-bubble,
    input::-webkit-validation-bubble-message { display: none; }

    /* password eye toggle */
    .eye-btn {
      position: absolute; right: 14px;
      background: none; border: none; cursor: pointer;
      color: var(--gray); display: flex; align-items: center;
      transition: color .2s; padding: 0;
    }
    .eye-btn:hover { color: var(--white); }

    /* options row */
    .options {
      display: flex; align-items: center; justify-content: space-between;
      margin-bottom: 24px;
    }

    .checkbox-lbl {
      display: flex; align-items: center; gap: 8px;
      font-size: 13px; color: var(--muted); cursor: pointer;
      user-select: none;
    }

    .checkbox-lbl input[type="checkbox"] { display: none; }

    .chk-box {
      width: 16px; height: 16px;
      border: 1.5px solid var(--border); border-radius: 4px;
      display: flex; align-items: center; justify-content: center;
      transition: border-color .2s, background .2s; flex-shrink: 0;
    }

    .checkbox-lbl input:checked ~ .chk-box { background: var(--red); border-color: var(--red); }
    .chk-box svg { width: 10px; height: 10px; stroke: #fff; stroke-width: 3; fill: none; display: none; }
    .checkbox-lbl input:checked ~ .chk-box svg { display: block; }

    .forgot { font-size: 13px; color: var(--red-lt); text-decoration: none; transition: color .2s; }
    .forgot:hover { color: var(--red); }

    /* submit button */
    .btn-login {
      width: 100%; padding: 14px;
      background: linear-gradient(135deg, var(--red-dk), var(--red));
      border: none; border-radius: 8px;
      font-family: 'Rajdhani', sans-serif;
      font-size: 15px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
      color: #fff; cursor: pointer;
      position: relative; overflow: hidden;
      transition: transform .15s, box-shadow .2s;
      box-shadow: 0 4px 24px rgba(215,43,43,.25);
    }

    .btn-login::before {
      content: '';
      position: absolute; inset: 0;
      background: linear-gradient(135deg, rgba(255,255,255,.15), transparent);
      opacity: 0; transition: opacity .2s;
    }

    .btn-login:hover { transform: translateY(-1px); box-shadow: 0 8px 32px rgba(215,43,43,.4); }
    .btn-login:hover::before { opacity: 1; }
    .btn-login:active { transform: translateY(0); }

    /* ripple */
    .ripple {
      position: absolute; border-radius: 50%;
      background: rgba(255,255,255,.3);
      width: 80px; height: 80px;
      transform: scale(0);
      animation: rippleAnim .5s linear;
      pointer-events: none;
    }
    @keyframes rippleAnim { to { transform: scale(4); opacity: 0; } }

    /* footer */
    .card-footer {
      margin-top: 28px; padding-top: 18px;
      border-top: 1px solid var(--border);
      display: flex; align-items: center; justify-content: space-between;
    }
    .card-footer span { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--border); }
    .card-footer .ver { font-family: 'Rajdhani', sans-serif; font-size: 12px; color: var(--border); }

    /* ── ANIMATIONS ── */
    @keyframes fadeUp {
      from { opacity: 0; transform: translateY(18px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    /* ── RESPONSIVE ── */
    @media (max-width: 860px) {
      .page { grid-template-columns: 1fr; }
      .left { display: none; }
      .right { padding: 32px 24px; }
    }