/* ============================================================
   HelpDesk 360 — Authentication Page Styles
   Dark + Neon Glassmorphism
   ============================================================ */

:root {
    --hd-bg: #050816;
    --hd-bg-2: #0B1026;
    --hd-card: rgba(13, 20, 45, 0.85);
    --hd-border: rgba(0, 212, 255, 0.35);
    --hd-border-strong: rgba(0, 212, 255, 0.7);
    --hd-blue: #00D4FF;
    --hd-purple: #7B2CFF;
    --hd-fuchsia: #FF00D4;
    --hd-cyan: #00FFE5;
    --hd-text: #FFFFFF;
    --hd-text-2: #B8C2D9;
    --hd-error: #FF0066;
    --hd-success: #00FF88;
    --hd-warning: #FFAA00;
    --hd-info: #00D4FF;
    --hd-gradient: linear-gradient(135deg, #00D4FF 0%, #7B2CFF 50%, #FF00D4 100%);
    --hd-gradient-soft: linear-gradient(135deg, rgba(0,212,255,.18), rgba(123,44,255,.18), rgba(255,0,212,.18));
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Inter', 'Poppins', system-ui, -apple-system, sans-serif;
    background: var(--hd-bg);
    color: var(--hd-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body.hd-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
    background:
        radial-gradient(ellipse at top left, rgba(123,44,255,.18), transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(0,212,255,.18), transparent 50%),
        radial-gradient(ellipse at center, rgba(255,0,212,.10), transparent 60%),
        var(--hd-bg);
    padding: 2rem 1rem;
}

/* Animated background orbs */
.hd-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .55;
    pointer-events: none;
    z-index: 0;
    animation: hd-float 14s ease-in-out infinite;
}
.hd-orb-1 { width: 480px; height: 480px; background: #00D4FF; top: -160px; left: -160px; animation-delay: 0s; }
.hd-orb-2 { width: 420px; height: 420px; background: #7B2CFF; top: 30%;  right: -160px; animation-delay: 4s; }
.hd-orb-3 { width: 380px; height: 380px; background: #FF00D4; bottom: -160px; left: 30%; animation-delay: 8s; }

@keyframes hd-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(40px, -30px) scale(1.08); }
    66%      { transform: translate(-30px, 40px) scale(.95); }
}

/* Animated grid overlay */
body.hd-auth::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(0,212,255,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,212,255,.04) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}

/* Floating particles */
.hd-particles { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.hd-particle {
    position: absolute;
    width: 4px; height: 4px;
    background: var(--hd-blue);
    border-radius: 50%;
    opacity: .6;
    box-shadow: 0 0 8px var(--hd-blue);
    animation: hd-rise 12s linear infinite;
}
.hd-particle:nth-child(2)  { left:  8%; animation-delay: 1s;  background:#7B2CFF; box-shadow:0 0 8px #7B2CFF; }
.hd-particle:nth-child(3)  { left: 18%; animation-delay: 3s;  background:#FF00D4; box-shadow:0 0 8px #FF00D4; }
.hd-particle:nth-child(4)  { left: 30%; animation-delay: 5s; }
.hd-particle:nth-child(5)  { left: 45%; animation-delay: 2s;  background:#7B2CFF; box-shadow:0 0 8px #7B2CFF; }
.hd-particle:nth-child(6)  { left: 58%; animation-delay: 7s;  background:#FF00D4; box-shadow:0 0 8px #FF00D4; }
.hd-particle:nth-child(7)  { left: 70%; animation-delay: 4s; }
.hd-particle:nth-child(8)  { left: 80%; animation-delay: 6s;  background:#7B2CFF; box-shadow:0 0 8px #7B2CFF; }
.hd-particle:nth-child(9)  { left: 90%; animation-delay: 8s;  background:#FF00D4; box-shadow:0 0 8px #FF00D4; }
.hd-particle:nth-child(10) { left: 95%; animation-delay: 1.5s; }

@keyframes hd-rise {
    0%   { transform: translateY(110vh) scale(.6); opacity: 0; }
    10%  { opacity: .8; }
    90%  { opacity: .6; }
    100% { transform: translateY(-10vh) scale(1.4); opacity: 0; }
}

/* ====== Auth Card ====== */
.hd-auth-wrap {
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 2;
    animation: hd-enter .8s cubic-bezier(.2,.7,.2,1) both;
}

@keyframes hd-enter {
    from { opacity: 0; transform: translateY(28px) scale(.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.hd-auth-card {
    background: var(--hd-card);
    border: 1px solid var(--hd-border);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    box-shadow:
        0 0 0 1px rgba(255,255,255,.04) inset,
        0 24px 60px -20px rgba(0,0,0,.65),
        0 0 40px -10px rgba(0,212,255,.25);
    position: relative;
    overflow: hidden;
}

/* Glow border ring */
.hd-auth-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 26px;
    background: var(--hd-gradient);
    z-index: -1;
    opacity: .35;
    filter: blur(14px);
    animation: hd-pulse 4s ease-in-out infinite;
}

@keyframes hd-pulse {
    0%, 100% { opacity: .25; }
    50%      { opacity: .55; }
}

/* Logo / brand */
.hd-brand {
    text-align: center;
    margin-bottom: 1.5rem;
}
.hd-brand-mark {
    width: 84px; height: 84px;
    margin: 0 auto 1rem;
    border-radius: 22px;
    background: var(--hd-gradient);
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: 1px;
    box-shadow: 0 14px 30px -8px rgba(0,212,255,.45), 0 0 40px -8px rgba(255,0,212,.4);
    position: relative;
}
.hd-brand-mark i { font-size: 2rem; }
.hd-brand-mark::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 24px;
    background: var(--hd-gradient);
    z-index: -1;
    opacity: .6;
    filter: blur(12px);
}
.hd-brand-title {
    font-size: 1.85rem;
    font-weight: 800;
    margin: 0;
    background: var(--hd-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -.5px;
}
.hd-brand-subtitle {
    font-size: .92rem;
    color: var(--hd-text-2);
    margin: .4rem 0 0;
    font-weight: 400;
}

/* Form */
.hd-form { display: flex; flex-direction: column; gap: 1.1rem; }

.hd-field { position: relative; }

.hd-label {
    display: block;
    margin-bottom: .45rem;
    font-size: .82rem;
    color: var(--hd-text-2);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .8px;
}

.hd-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.hd-input-icon {
    position: absolute;
    left: 1rem;
    color: var(--hd-text-2);
    font-size: .95rem;
    transition: color .2s ease;
    pointer-events: none;
}

.hd-input {
    width: 100%;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 14px;
    color: var(--hd-text);
    padding: .95rem 1rem .95rem 2.7rem;
    font-size: .98rem;
    font-family: inherit;
    transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
    outline: none;
}
.hd-input::placeholder { color: rgba(184,194,217,.55); }
.hd-input:hover { border-color: rgba(0,212,255,.35); }
.hd-input:focus {
    border-color: var(--hd-blue);
    background: rgba(0,212,255,.06);
    box-shadow: 0 0 0 4px rgba(0,212,255,.15), 0 0 22px rgba(0,212,255,.25);
}
.hd-input:focus + .hd-input-icon,
.hd-input-wrap:focus-within .hd-input-icon { color: var(--hd-blue); }

.hd-password-toggle {
    position: absolute;
    right: .85rem;
    background: none;
    border: 0;
    color: var(--hd-text-2);
    cursor: pointer;
    padding: .35rem;
    font-size: .95rem;
    border-radius: 8px;
    transition: color .2s ease, background .2s ease;
}
.hd-password-toggle:hover { color: var(--hd-blue); background: rgba(0,212,255,.08); }

/* Row */
.hd-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: -.25rem;
    flex-wrap: wrap;
    gap: .5rem;
}

.hd-check {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    cursor: pointer;
    color: var(--hd-text-2);
    font-size: .9rem;
    user-select: none;
}
.hd-check input { position: absolute; opacity: 0; pointer-events: none; }
.hd-check-mark {
    width: 18px; height: 18px;
    border-radius: 5px;
    border: 1px solid rgba(255,255,255,.20);
    background: rgba(255,255,255,.04);
    display: inline-grid;
    place-items: center;
    transition: all .2s ease;
}
.hd-check-mark::after {
    content: '';
    width: 9px; height: 5px;
    border: 2px solid #fff;
    border-top: 0; border-right: 0;
    transform: rotate(-45deg) scale(0);
    transition: transform .15s ease-out;
}
.hd-check input:checked + .hd-check-mark {
    background: var(--hd-gradient);
    border-color: transparent;
    box-shadow: 0 0 12px rgba(0,212,255,.4);
}
.hd-check input:checked + .hd-check-mark::after { transform: rotate(-45deg) scale(1); }

.hd-link {
    color: var(--hd-blue);
    text-decoration: none;
    font-size: .9rem;
    transition: color .2s ease, text-shadow .2s ease;
}
.hd-link:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(0,212,255,.6);
}

/* Submit */
.hd-btn {
    width: 100%;
    border: 0;
    border-radius: 14px;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    color: #fff;
    background: var(--hd-gradient);
    background-size: 200% 100%;
    background-position: 0% 50%;
    cursor: pointer;
    transition: background-position .5s ease, transform .15s ease, box-shadow .25s ease;
    box-shadow: 0 14px 30px -10px rgba(0,212,255,.55), 0 0 24px -6px rgba(255,0,212,.45);
    letter-spacing: .3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    position: relative;
    overflow: hidden;
}
.hd-btn:hover { background-position: 100% 50%; transform: translateY(-1px); }
.hd-btn:active { transform: translateY(0); }
.hd-btn:disabled { opacity: .6; cursor: not-allowed; }
.hd-btn::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.20), transparent);
    transform: translateX(-100%);
}
.hd-btn:hover::after { animation: hd-shine 1s ease forwards; }
@keyframes hd-shine { to { transform: translateX(100%); } }

/* Flash messages */
.hd-flash {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-size: .92rem;
    border: 1px solid;
    backdrop-filter: blur(8px);
    animation: hd-enter .3s ease;
}
.hd-flash i:first-child { font-size: 1.1rem; }
.hd-flash-close {
    margin-left: auto;
    background: none;
    border: 0;
    color: inherit;
    cursor: pointer;
    opacity: .6;
    font-size: .85rem;
    padding: .25rem;
}
.hd-flash-close:hover { opacity: 1; }
.hd-flash-success { background: rgba(0,255,136,.10); border-color: rgba(0,255,136,.40); color: #6BFFB8; }
.hd-flash-error   { background: rgba(255,0,102,.12); border-color: rgba(255,0,102,.40); color: #FF6B9D; }
.hd-flash-warning { background: rgba(255,170,0,.10); border-color: rgba(255,170,0,.40); color: #FFD66B; }
.hd-flash-info    { background: rgba(0,212,255,.10); border-color: rgba(0,212,255,.40); color: #6BE9FF; }

/* Footer */
.hd-auth-footer {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--hd-text-2);
    font-size: .8rem;
    letter-spacing: .3px;
}
.hd-auth-footer .hd-version {
    display: inline-block;
    margin-left: .5rem;
    padding: 2px 8px;
    background: rgba(0,212,255,.10);
    color: var(--hd-blue);
    border-radius: 999px;
    font-weight: 600;
    font-size: .7rem;
    border: 1px solid rgba(0,212,255,.3);
}

/* Back to landing link */
.hd-back-link {
    position: fixed;
    top: 20px;
    left: 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,.55);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    transition: all .2s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
}
.hd-back-link:hover {
    color: #00D4FF;
    border-color: rgba(0,212,255,.45);
    background: rgba(0,212,255,.08);
    transform: translateX(-3px);
}

/* Small */
@media (max-width: 520px) {
    .hd-auth-card { padding: 2rem 1.25rem; border-radius: 20px; }
    .hd-brand-title { font-size: 1.55rem; }
    .hd-back-link { top: 12px; left: 12px; font-size: 12px; padding: 6px 12px; }
}
