/* ============================================================
   GLOBAL RESET
============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: #0f172a;
    overflow: hidden;
}

/* ============================================================
   BACKGROUND & TIRES
============================================================ */
.login-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1; /* behind card */
}

.bg-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom right,
        rgba(15, 23, 42, 0.95),
        rgba(30, 41, 59, 0.90),
        rgba(124, 45, 18, 0.85)
    );
    z-index: 1;
}

/* Tires animation */
.tire {
    position: absolute;
    opacity: 0.15;
    z-index: 1;
    will-change: transform;
    pointer-events: none;
}

@keyframes tireSlide {
    0% { transform: translateX(-200px) rotate(0deg); }
    100% { transform: translateX(140vw) rotate(1080deg); }
}

.tire1 { width: 120px; top: 20%; animation: tireSlide 20s linear infinite; }
.tire2 { width: 160px; top: 50%; animation: tireSlide 25s linear infinite; animation-delay: 4s; opacity: 0.1; }
.tire3 { width: 200px; top: 35%; animation: tireSlide 30s linear infinite; animation-delay: 8s; opacity: 0.08; }
.tire4 { width: 140px; bottom: 15%; animation: tireSlide 18s linear infinite; animation-delay: 12s; opacity: 0.15; }

/* ============================================================
   LOGIN CONTAINER
============================================================ */
.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 450px;
    margin: auto;
    padding: 30px 15px;
    text-align: center;
}

/* ============================================================
   LOGO AREA
============================================================ */
.logo-area {
    text-align: center;
    margin-bottom: 20px;
}

.jmr-logo {
    max-width: 200px;
    width: 100%;
    height: auto;
    display: inline-block;
}

.subtitle {
    color: #cbd5e1;
    margin-top: 8px;
    font-size: 14px;
}

/* ============================================================
   LOGIN CARD
============================================================ */
.login-card {
    background: rgba(15, 23, 42, 0.55);
    padding: 35px 30px;
    border-radius: 14px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(100, 116, 139, 0.4);
    position: relative;
    overflow: hidden;

    /* entrance animation */
    transform: translateY(40px) scale(0.95);
    opacity: 0;
    animation: cardEntrance 0.8s forwards ease-out;
}

@keyframes cardEntrance {
    0% { transform: translateY(40px) scale(0.95); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

.login-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(249, 115, 22, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Animated gradient border */
.animated-border::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 14px;
    border: 2px solid transparent;
    background: linear-gradient(270deg, #f97316, #facc15, #f97316, #f43f5e);
    background-size: 600% 600%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: gradientBorder 6s linear infinite;
    pointer-events: none;
}

@keyframes gradientBorder {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animated-corner {
    position: absolute;
    top: 0;
    right: 0;
    width: 130px;
    height: 130px;
    background: rgba(249, 115, 22, 0.12);
    clip-path: polygon(100% 0, 0 0, 100% 100%);
    animation: cornerPulse 3s infinite ease-in-out;
}

@keyframes cornerPulse {
    0% { opacity: 0.45; }
    50% { opacity: 0.85; }
    100% { opacity: 0.45; }
}

/* ============================================================
   FORM FIELDS
============================================================ */
.field { margin-bottom: 20px; }
.field label { color: #e2e8f0; margin-bottom: 5px; display: block; }
.label-row { display: flex; justify-content: space-between; }
.forgot { color: #fb923c; font-size: 13px; }

.input-icon { position: relative; }
.input-icon i { position: absolute; top: 50%; left: 12px; transform: translateY(-50%); color: #64748b; }
.input-icon input {
    width: 100%;
    background: rgba(30, 41, 59, 0.6);
    padding: 12px 12px 12px 40px;
    border-radius: 8px;
    border: 1px solid #475569;
    color: white;
    outline: none;
}
.input-icon input:focus { border-color: #fb923c; }

.toggle { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: #64748b; cursor: pointer; }

/* ============================================================
   LOGIN BUTTON
============================================================ */
.login-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(90deg, #ea580c, #f97316, #ea580c);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.login-btn:hover {
    filter: brightness(1.15);
    transform: scale(1.03);
}

.glow-btn::before {
    content: "";
    position: absolute;
    top: var(--y);
    left: var(--x);
    width: 120px;
    height: 120px;
    transform: translate(-50%, -50%);
    background: rgba(255, 177, 71, 0.6);
    border-radius: 50%;
    filter: blur(30px);
    pointer-events: none;
    transition: 0.15s ease-out;
}

.login-btn::after {
    content: "";
    position: absolute;
    top:0; left:-75%;
    width:50%; height:100%;
    background: linear-gradient(120deg, rgba(255,255,255,0.2), rgba(255,255,255,0.6), rgba(255,255,255,0.2));
    transform: skewX(-20deg);
    transition: 0.5s;
}
.login-btn:hover::after { left: 125%; }

/* ============================================================
   FOOTER
============================================================ */
.footer-text { color: #94a3b8; margin-top: 25px; font-size: 13px; }
.contact-admin { color: #94a3b8; font-size: 14px; margin-top: 15px; text-align: center; }
.contact-admin a { color: #fb923c; cursor: pointer; }

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 480px) {
    .jmr-logo { max-width: 140px; }
    .login-card { padding: 25px 20px; }
}