:root {
    --neon-cyan: #00f3ff;
    --neon-gold: #d4af37;
    --neon-red: #ff003c;
    --bg-dark: #0a0a12;
    --bg-panel: rgba(20, 20, 30, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    font-family: var(--font-body);
    color: white;
    overflow-x: hidden;
}

/* --- LOGIN PAGE --- */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: radial-gradient(circle at center, #1a1a2e 0%, #000 100%);
}

.login-container {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border: 1px solid var(--neon-cyan);
    border-radius: 20px;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
    text-align: center;
    width: 350px;
    position: relative;
    overflow: hidden;
}

.hologram-effect {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0, 243, 255, 0.05) 50%, transparent 50%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 1;
}

.login-header i {
    font-size: 3rem;
    color: var(--neon-cyan);
    margin-bottom: 1rem;
    animation: spin 10s linear infinite;
}

.login-header h1 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    letter-spacing: 2px;
    color: white;
    text-shadow: 0 0 10px var(--neon-cyan);
}

.pin-display {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 2rem 0;
}

.dot {
    width: 15px;
    height: 15px;
    border: 2px solid var(--neon-cyan);
    border-radius: 50%;
    transition: all 0.3s;
}

.dot.filled {
    background: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
}

.pin-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    position: relative;
    z-index: 2;
}

.key {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--neon-cyan);
    color: white;
    padding: 15px;
    font-size: 1.2rem;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
    font-family: var(--font-heading);
}

.key:hover {
    background: var(--neon-cyan);
    color: black;
    box-shadow: 0 0 15px var(--neon-cyan);
}

.key:active {
    transform: scale(0.95);
}

#login-message {
    margin-top: 1rem;
    min-height: 20px;
    color: var(--neon-red);
    font-weight: bold;
    font-family: var(--font-heading);
}

/* --- DASHBOARD --- */
.dashboard-body {
    background: #050505;
    background-image:
        linear-gradient(rgba(0, 243, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s;
}

.loader-content {
    text-align: center;
}

.scanner {
    width: 100px;
    height: 100px;
    border: 5px solid transparent;
    border-top-color: var(--neon-cyan);
    border-bottom-color: var(--neon-gold);
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
    margin: 0 auto 1rem;
}

.loading-bar {
    width: 200px;
    height: 5px;
    background: #333;
    margin: 1rem auto;
    border-radius: 5px;
    overflow: hidden;
}

.progress {
    width: 0%;
    height: 100%;
    background: var(--neon-cyan);
    animation: loadBar 3s ease-out forwards;
}

/* Layout */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: rgba(10, 10, 18, 0.95);
    border-right: 1px solid rgba(0, 243, 255, 0.2);
    display: flex;
    flex-direction: column;
    padding: 2rem 1rem;
    position: fixed;
    height: 100%;
    backdrop-filter: blur(10px);
    z-index: 100;
}

.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 2rem;
}

.logo-area {
    color: var(--neon-cyan);
    font-size: 1.5rem;
    font-family: var(--font-heading);
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 15px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    transition: 0.3s;
    font-size: 1.1rem;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: rgba(0, 243, 255, 0.1);
    color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.1);
}

.logout-area {
    margin-top: auto;
}

.logout-area a {
    color: var(--neon-red);
    text-decoration: none;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Widgets */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

h1 {
    font-family: var(--font-heading);
    text-shadow: 0 0 10px var(--neon-cyan);
}

.system-status {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: #0f0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: #0f0;
    border-radius: 50%;
    box-shadow: 0 0 5px #0f0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: var(--bg-panel);
    border: var(--glass-border);
    padding: 1.5rem;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.card-icon {
    font-size: 2rem;
    color: var(--neon-gold);
    background: rgba(212, 175, 55, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-info h3 {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.number-counter {
    font-size: 2rem;
    font-weight: bold;
    font-family: var(--font-heading);
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    margin-top: 5px;
    border-radius: 2px;
}

.fill {
    height: 100%;
    background: var(--neon-cyan);
    box-shadow: 0 0 5px var(--neon-cyan);
}

/* Map Mockup */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.nav-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-badge {
    background: #ff003c;
    color: white;
    font-size: 0.65rem;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(255, 0, 60, 0.5);
    font-family: var(--font-heading);
}

/* Leaflet Map Styling */
#map {
    z-index: 1;
}

.leaflet-container {
    background: #000 !important;
}

.leaflet-tile-pane {
    filter: invert(100%) hue-rotate(180deg) brightness(0.7) contrast(1.2);
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .tracking-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        width: 60px;
        padding: 1rem 0.5rem;
    }

    .sidebar span,
    .sidebar .logo-area span {
        display: none;
    }

    .nav-badge {
        position: absolute;
        top: 5px;
        right: 5px;
    }

    .main-content {
        padding: 1rem;
    }

    .card {
        padding: 1rem;
    }
}

.tracking-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

/* Flight Table Styles */
.flight-table-container {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 243, 255, 0.2);
    border-radius: 10px;
    padding: 1rem;
    overflow: hidden;
}

.table-scroll {
    max-height: 350px;
    overflow-y: auto;
}

.cyber-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.cyber-table th {
    text-align: left;
    padding: 10px;
    color: var(--neon-cyan);
    border-bottom: 2px solid var(--neon-cyan);
    font-family: var(--font-heading);
    text-transform: uppercase;
}

.cyber-table td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cyber-table tr:hover {
    background: rgba(0, 243, 255, 0.05);
}

/* Debug Console Styles */
.debug-console-container {
    margin-top: 1.5rem;
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
}

.console-header {
    background: #222;
    padding: 8px 15px;
    font-size: 0.75rem;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #333;
    color: #888;
}

.status-indicator {
    color: #0f0;
    text-shadow: 0 0 5px #0f0;
}

.console-body {
    padding: 15px;
    height: 120px;
    overflow-y: auto;
    font-size: 0.8rem;
    color: #00ff00;
    line-height: 1.4;
    white-space: pre-wrap;
}

/* Airplane Marker Styles */
.airplane-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neon-cyan);
    filter: drop-shadow(0 0 5px var(--neon-cyan));
    transition: transform 0.3s;
}

/* Popup Photo Styles */
.popup-pet-photo {
    width: 100px; /* Fallback */
    height: 100px; /* Fallback */
    max-width: 100%;
    max-height: 150px;
    display: block;
    margin: 5px auto;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid var(--neon-cyan);
    background: #000;
}

.map-text {
    position: absolute;
    bottom: 10px;
    left: 10px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: var(--neon-cyan);
    z-index: 10;
    pointer-events: none;
}

@media (max-width: 1200px) {
    .tracking-grid {
        grid-template-columns: 1fr;
    }
}

/* Notifications */
.notification-list {
    list-style: none;
    margin-top: 1rem;
}

.notification-list li {
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 0.5rem;
    padding: 0.8rem;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    border-left: 2px solid var(--neon-cyan);
}

.time {
    color: var(--neon-gold);
    font-family: var(--font-heading);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--bg-dark);
    padding: 2rem;
    border: 1px solid var(--neon-cyan);
    border-radius: 15px;
    width: 400px;
    text-align: center;
    position: relative;
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.2);
}

.close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
}

.cyber-btn {
    background: var(--neon-cyan);
    color: black;
    border: none;
    padding: 0.8rem 2rem;
    font-family: var(--font-heading);
    font-weight: bold;
    cursor: pointer;
    margin-top: 1rem;
    clip-path: polygon(10% 0, 100% 0, 100% 80%, 90% 100%, 0 100%, 0 20%);
}

.cyber-btn:hover {
    background: white;
    box-shadow: 0 0 15px white;
}

/* Animations */
@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes radarSpin {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes loadBar {
    0% {
        width: 0;
    }

    100% {
        width: 100%;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .dashboard-wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }

    .main-content {
        margin-left: 0;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }
}