/* =============================================================
   login.css — halaman login Win Artha Billing
   Tema dark + neon glow tipis, animasi entrance & loop.
   Dipakai oleh: application/views/login.php
   ============================================================= */

:root {
    /* Palette neon */
    --neon-cyan: #00e5ff;
    --neon-cyan-soft: rgba(0, 229, 255, 0.55);
    --neon-violet: #8a5cff;
    --neon-violet-soft: rgba(138, 92, 255, 0.55);
    --neon-pink: #ff4ecd;

    /* Background dark */
    --bg-0: #060914;
    --bg-1: #0b1126;
    --bg-2: #0f1734;

    /* Surface */
    --surface: rgba(15, 22, 48, 0.55);
    --surface-strong: rgba(20, 28, 60, 0.75);
    --border: rgba(138, 180, 255, 0.18);
    --border-strong: rgba(0, 229, 255, 0.45);

    /* Text */
    --text: #e6ecff;
    --text-muted: #8c9ac4;
    --text-dim: #5b6792;

    /* Radius */
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 20px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    color: var(--text);
    background:
        radial-gradient(1200px 800px at 10% -10%, rgba(138, 92, 255, 0.18), transparent 60%),
        radial-gradient(1000px 700px at 110% 110%, rgba(0, 229, 255, 0.16), transparent 55%),
        linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 60%, var(--bg-2) 100%);
    background-attachment: fixed;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Layered grid backdrop */
body::before {
    content: "";
    position: fixed; inset: 0;
    background-image:
        linear-gradient(rgba(138, 180, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(138, 180, 255, 0.045) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.85), transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.85), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Ambient orbs */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.55;
    pointer-events: none;
    z-index: 0;
}
.orb.orb-a {
    width: 420px; height: 420px;
    background: radial-gradient(circle, var(--neon-violet) 0%, transparent 65%);
    top: -120px; left: -120px;
    animation: floatA 14s ease-in-out infinite;
}
.orb.orb-b {
    width: 460px; height: 460px;
    background: radial-gradient(circle, var(--neon-cyan) 0%, transparent 65%);
    bottom: -160px; right: -140px;
    animation: floatB 18s ease-in-out infinite;
}
.orb.orb-c {
    width: 280px; height: 280px;
    background: radial-gradient(circle, var(--neon-pink) 0%, transparent 65%);
    top: 50%; left: 60%;
    opacity: 0.25;
    animation: floatC 22s ease-in-out infinite;
}
@keyframes floatA {
    0%,100% { transform: translate(0,0); }
    50%     { transform: translate(40px, 30px); }
}
@keyframes floatB {
    0%,100% { transform: translate(0,0); }
    50%     { transform: translate(-30px, -40px); }
}
@keyframes floatC {
    0%,100% { transform: translate(0,0) scale(1); }
    50%     { transform: translate(-20px, 20px) scale(1.05); }
}

/* Layout */
.login-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    align-items: stretch;
}
@media (max-width: 980px) {
    .login-shell { grid-template-columns: 1fr; }
    .hero { display: none !important; }
}

/* Hero */
.hero {
    position: relative;
    padding: 56px 64px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}
.hero-bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(600px 400px at 30% 30%, rgba(0, 229, 255, 0.18), transparent 60%),
        radial-gradient(700px 500px at 70% 80%, rgba(138, 92, 255, 0.22), transparent 60%),
        linear-gradient(135deg, rgba(11,17,38,0.7), rgba(15,23,52,0.4));
    border-right: 1px solid var(--border);
    z-index: -1;
}
.brand-row {
    display: flex; align-items: center; gap: 14px;
    font-weight: 700; letter-spacing: 0.4px;
}
.brand-mark {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-violet));
    display: grid; place-items: center;
    color: #0a0f24; font-size: 18px;
    box-shadow: 0 0 24px rgba(0, 229, 255, 0.35), inset 0 0 12px rgba(255,255,255,0.18);
}
.brand-name { font-size: 15px; }
.brand-sub { font-size: 12px; color: var(--text-muted); font-weight: 500; }

.hero-headline { max-width: 520px; }
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 12px; border-radius: 999px;
    background: rgba(0, 229, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.25);
    color: var(--neon-cyan);
    font-size: 12px; font-weight: 600; letter-spacing: 0.3px;
    box-shadow: 0 0 16px rgba(0, 229, 255, 0.15);
}
.hero-eyebrow .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--neon-cyan);
    box-shadow: 0 0 8px var(--neon-cyan);
    animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink {
    0%,100% { opacity: 1; }
    50%     { opacity: 0.35; }
}
.hero h1 {
    margin: 18px 0 14px;
    font-size: 40px; line-height: 1.1; font-weight: 800;
    background: linear-gradient(120deg, #ffffff 0%, #b8d6ff 40%, var(--neon-cyan) 100%);
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
}
.hero p {
    margin: 0; color: var(--text-muted); font-size: 15px; line-height: 1.6;
}

.stat-row {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
    margin-top: 28px;
}
.stat {
    padding: 14px 16px;
    border-radius: var(--r-md);
    background: var(--surface);
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.stat .num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px; font-weight: 600; color: var(--text);
}
.stat .lbl {
    font-size: 11px; color: var(--text-muted); margin-top: 2px;
    letter-spacing: 0.4px; text-transform: uppercase;
}

.hero-foot { font-size: 12px; color: var(--text-dim); }

/* Auth side */
.auth {
    display: flex; align-items: center; justify-content: center;
    padding: 40px 28px;
}
.auth-card {
    position: relative;
    width: 100%; max-width: 440px;
    padding: 36px 32px;
    border-radius: var(--r-lg);
    background: linear-gradient(180deg, rgba(20, 28, 60, 0.78), rgba(12, 18, 42, 0.78));
    border: 1px solid var(--border);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    box-shadow:
        0 30px 80px rgba(0,0,0,0.45),
        0 0 0 1px rgba(255,255,255,0.02) inset,
        0 0 32px rgba(0, 229, 255, 0.06);
}
.auth-card::before {
    content: "";
    position: absolute; inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(140deg, var(--neon-cyan-soft), transparent 35%, transparent 65%, var(--neon-violet-soft));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    opacity: 0.9;
}

.auth-head {
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 8px;
}
.auth-icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    display: grid; place-items: center;
    color: var(--neon-cyan);
    background: rgba(0, 229, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.3);
    box-shadow: 0 0 18px rgba(0, 229, 255, 0.18), inset 0 0 14px rgba(0, 229, 255, 0.08);
}
.auth-title { font-size: 22px; font-weight: 700; letter-spacing: 0.2px; }
.auth-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

.auth-divider {
    height: 1px; margin: 22px 0;
    background: linear-gradient(90deg, transparent, rgba(138, 180, 255, 0.25), transparent);
    position: relative;
    overflow: hidden;
}

/* Field */
.field { position: relative; margin-bottom: 16px; }
.field label {
    display: block; font-size: 12px; font-weight: 600;
    color: var(--text-muted); margin-bottom: 8px;
    letter-spacing: 0.3px; text-transform: uppercase;
}
.field .control { position: relative; }
.field .control i.prefix {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--text-dim); font-size: 14px;
    transition: color .2s ease, text-shadow .2s ease;
}
.field .control .toggle {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    background: transparent; border: 0;
    color: var(--text-dim); cursor: pointer;
    padding: 6px 8px; border-radius: 8px;
    transition: color .2s ease, background .2s ease;
}
.field .control .toggle:hover { color: var(--text); background: rgba(255,255,255,0.04); }

.field input[type="text"],
.field input[type="email"],
.field input[type="password"] {
    width: 100%;
    height: 46px;
    padding: 0 14px 0 42px;
    font-family: inherit; font-size: 14px;
    color: var(--text);
    background: rgba(7, 12, 30, 0.65);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.field input::placeholder { color: var(--text-dim); }
.field input:hover { border-color: rgba(138, 180, 255, 0.32); }
.field input:focus {
    border-color: var(--border-strong);
    background: rgba(7, 12, 30, 0.85);
    box-shadow: 0 0 0 4px rgba(0, 229, 255, 0.1), 0 0 18px rgba(0, 229, 255, 0.18);
}
.field input:focus ~ i.prefix,
.field .control:focus-within i.prefix {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.7);
}

.invalid-feedback {
    display: block; margin-top: 6px;
    font-size: 12px; color: #ff7a8a;
}

/* Row */
.row-between {
    display: flex; align-items: center; justify-content: space-between;
    margin: 6px 0 18px;
}
.check {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--text-muted);
    user-select: none; cursor: pointer;
}
.check input { display: none; }
.check .box {
    width: 16px; height: 16px; border-radius: 5px;
    border: 1px solid var(--border);
    background: rgba(7, 12, 30, 0.65);
    display: grid; place-items: center;
    transition: all .2s ease;
}
.check input:checked + .box {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-violet));
    border-color: transparent;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.45);
}
.check input:checked + .box::after {
    content: "\f00c";
    font-family: "Font Awesome 6 Free"; font-weight: 900;
    font-size: 9px; color: #0a0f24;
}
.link-muted {
    font-size: 13px; color: var(--text-muted);
    text-decoration: none; transition: color .2s ease;
}
.link-muted:hover { color: var(--neon-cyan); }

/* Button */
.btn-neon {
    position: relative;
    width: 100%; height: 48px;
    border: 0; border-radius: var(--r-md);
    font-family: inherit; font-size: 14px; font-weight: 700; letter-spacing: 0.4px;
    color: #04101e;
    background: linear-gradient(135deg, var(--neon-cyan) 0%, #5fa8ff 50%, var(--neon-violet) 100%);
    background-size: 200% 100%;
    cursor: pointer;
    box-shadow:
        0 10px 30px rgba(0, 229, 255, 0.25),
        0 0 0 1px rgba(255,255,255,0.08) inset,
        0 0 24px rgba(0, 229, 255, 0.18);
    transition: transform .15s ease, filter .25s ease;
    overflow: hidden;
}
.btn-neon:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}
.btn-neon:active { transform: translateY(0); }
.btn-neon::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.35) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform .8s ease;
}
.btn-neon:hover::after { transform: translateX(100%); }
.btn-neon i { margin-left: 8px; transition: transform .3s ease; }
.btn-neon:hover i { transform: translateX(4px); }

.auth-foot {
    margin-top: 22px; text-align: center;
    font-size: 12px; color: var(--text-dim);
}
.auth-foot strong { color: var(--text-muted); font-weight: 600; }

/* Alerts */
.alert {
    position: relative;
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 14px;
    margin: 0 0 18px;
    border-radius: var(--r-md);
    font-size: 13px; line-height: 1.4;
    border: 1px solid transparent;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: alertIn .3s ease both;
}
.alert .ico { flex: 0 0 auto; margin-top: 1px; font-size: 14px; }
.alert .msg { flex: 1; }
.alert .close {
    background: transparent; border: 0; color: inherit;
    opacity: 0.6; cursor: pointer; font-size: 16px; line-height: 1;
    padding: 0 0 0 8px;
}
.alert .close:hover { opacity: 1; }
.alert-success {
    color: #b6ffd9;
    background: rgba(0, 229, 160, 0.08);
    border-color: rgba(0, 229, 160, 0.32);
    box-shadow: 0 0 18px rgba(0, 229, 160, 0.12);
}
.alert-success .ico { color: #00e5a0; }
.alert-danger {
    color: #ffc6cf;
    background: rgba(255, 78, 120, 0.08);
    border-color: rgba(255, 78, 120, 0.32);
    box-shadow: 0 0 18px rgba(255, 78, 120, 0.12);
}
.alert-danger .ico { color: #ff7a8a; }
.alert-info, .alert-warning {
    color: #d8e3ff;
    background: rgba(0, 229, 255, 0.06);
    border-color: rgba(0, 229, 255, 0.28);
}
@keyframes alertIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Kompatibilitas alert legacy dari controller (Bootstrap-like) */
.alert.fade.show { display: flex; }
.alert .close span { display: inline-block; }
.field input.is-invalid {
    border-color: rgba(255, 78, 120, 0.55);
    box-shadow: 0 0 0 3px rgba(255, 78, 120, 0.12);
}

/* ============================================================
   Animasi entrance & loop neon glow
   ============================================================ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.hero .brand-row      { animation: fadeUp .7s .05s ease both; }
.hero-headline        { animation: fadeUp .8s .15s ease both; }
.hero-foot            { animation: fadeIn 1s .4s ease both; }
.auth-card            { animation: fadeUp .7s .2s cubic-bezier(.2,.8,.2,1) both; }
.field                { animation: fadeUp .55s ease both; }
.field:nth-of-type(1) { animation-delay: .35s; }
.field:nth-of-type(2) { animation-delay: .45s; }
.row-between          { animation: fadeUp .55s .55s ease both; }
.btn-neon             { animation: fadeUp .55s .65s ease both, btnFlow 6s 1s ease-in-out infinite, btnPulse 2.6s 1s ease-in-out infinite; }

/* Rotating conic neon halo di tepi card */
.auth-card { isolation: isolate; }
.auth-card::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    padding: 2px;
    background: conic-gradient(
        from var(--ang, 0deg),
        transparent 0deg,
        var(--neon-cyan) 40deg,
        transparent 120deg,
        transparent 200deg,
        var(--neon-violet) 260deg,
        transparent 340deg
    );
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0.55;
    filter: blur(0.5px);
    pointer-events: none;
    animation: spinHalo 8s linear infinite;
    z-index: -1;
}
@property --ang {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}
@keyframes spinHalo {
    to { --ang: 360deg; }
}
@supports not (background: conic-gradient(from var(--ang, 0deg), red, blue)) {
    .auth-card::after { animation: rotateHalo 8s linear infinite; }
    @keyframes rotateHalo {
        from { transform: rotate(0deg); }
        to   { transform: rotate(360deg); }
    }
}

/* Auth icon pulsing glow */
.auth-icon { animation: iconPulse 2.8s ease-in-out infinite; }
@keyframes iconPulse {
    0%, 100% {
        box-shadow:
            0 0 14px rgba(0, 229, 255, 0.18),
            inset 0 0 14px rgba(0, 229, 255, 0.08);
    }
    50% {
        box-shadow:
            0 0 28px rgba(0, 229, 255, 0.55),
            0 0 48px rgba(138, 92, 255, 0.28),
            inset 0 0 18px rgba(0, 229, 255, 0.18);
    }
}

/* Brand mark pulse + shine */
.brand-mark {
    position: relative;
    overflow: hidden;
    animation: brandPulse 3.6s ease-in-out infinite;
}
@keyframes brandPulse {
    0%, 100% { box-shadow: 0 0 18px rgba(0, 229, 255, 0.3); }
    50%      { box-shadow: 0 0 32px rgba(138, 92, 255, 0.55), 0 0 12px rgba(0, 229, 255, 0.5); }
}
.brand-mark::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.45) 50%, transparent 70%);
    transform: translateX(-100%);
    animation: brandShine 5s ease-in-out infinite;
}
@keyframes brandShine {
    0%, 70% { transform: translateX(-100%); }
    85%     { transform: translateX(100%); }
    100%    { transform: translateX(100%); }
}

/* Headline gradient flow */
.hero h1 {
    background-size: 220% 100%;
    animation: textFlow 8s ease-in-out infinite;
}
@keyframes textFlow {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

/* Auth divider scanning line */
.auth-divider::after {
    content: "";
    position: absolute; top: 0; left: -30%;
    width: 30%; height: 100%;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
    filter: blur(0.5px);
    animation: scanX 3.5s ease-in-out infinite;
}
@keyframes scanX {
    0%   { left: -30%; opacity: 0; }
    20%  { opacity: 1; }
    80%  { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

/* Underline neon animasi saat input focus */
.field .control::after {
    content: "";
    position: absolute;
    left: 14px; right: 14px; bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), var(--neon-violet), transparent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .35s ease;
    pointer-events: none;
    opacity: 0.85;
}
.field .control:focus-within::after { transform: scaleX(1); }

/* Button continuous flow + pulse glow */
@keyframes btnFlow {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}
@keyframes btnPulse {
    0%, 100% {
        box-shadow:
            0 10px 30px rgba(0, 229, 255, 0.25),
            0 0 0 1px rgba(255,255,255,0.08) inset,
            0 0 24px rgba(0, 229, 255, 0.18);
    }
    50% {
        box-shadow:
            0 14px 40px rgba(0, 229, 255, 0.4),
            0 0 0 1px rgba(255,255,255,0.12) inset,
            0 0 38px rgba(138, 92, 255, 0.4);
    }
}

/* Hero eyebrow tag glow loop */
.hero-eyebrow { animation: tagGlow 3.2s ease-in-out infinite; }
@keyframes tagGlow {
    0%, 100% { box-shadow: 0 0 12px rgba(0, 229, 255, 0.15); }
    50%      { box-shadow: 0 0 22px rgba(0, 229, 255, 0.4); }
}

/* Stat cards hover */
.stat {
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.stat:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 229, 255, 0.45);
    box-shadow: 0 10px 24px rgba(0, 229, 255, 0.12);
}

/* Responsive */
@media (max-width: 480px) {
    .auth { padding: 24px 16px; }
    .auth-card { padding: 28px 22px; }
    .hero { padding: 36px 28px; }
    .hero h1 { font-size: 30px; }
}

/* Honor reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}