@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-dark: #090b0f;
    --bg-card: rgba(17, 22, 34, 0.75);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-glow: rgba(0, 242, 254, 0.25);
    
    --primary-gradient: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    --accent-blue: #00f2fe;
    --accent-purple: #9d4edd;
    
    --status-pending: #ff9900;
    --status-path: #00f2fe;
    --status-success: #39ff14;
    --status-danger: #ff073a;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

/* Reset & Scrollbar */
* {
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    margin: 0;
    padding: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(0, 242, 254, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(157, 78, 221, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    padding-bottom: 60px;
    overflow-x: hidden;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #0d111a;
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-blue);
}

/* Glassmorphic Navbar */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.custom-nav {
    background: rgba(13, 17, 26, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.brand-glow {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
    text-shadow: 0 0 30px rgba(0, 242, 254, 0.3);
    text-decoration: none;
}

.nav-links-container {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-btn {
    color: var(--text-muted);
    font-weight: 500;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    position: relative;
}

.nav-btn:hover, .nav-btn.active {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.nav-btn.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 15%;
    width: 70%;
    height: 2px;
    background: var(--primary-gradient);
    border-radius: 4px;
    box-shadow: 0 0 10px var(--accent-blue);
}

/* Main Container */
.main-wrapper {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* Premium Card Design */
.premium-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.premium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s;
}

.premium-card:hover::before {
    transform: translateX(100%);
}

.premium-card:hover {
    border-color: var(--border-color-glow);
    box-shadow: 0 8px 32px 0 rgba(0, 242, 254, 0.08);
    transform: translateY(-2px);
}

.card-title-custom {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.75rem;
}

/* Form Design */
.form-group-custom {
    margin-bottom: 1.25rem;
}

.form-label-custom {
    display: block;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-input-custom {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    color: var(--text-main);
    font-size: 0.95rem;
}

.form-input-custom:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: rgba(0, 242, 254, 0.02);
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.25);
}

/* Futuristic Buttons */
.btn-primary-custom {
    background: var(--primary-gradient);
    border: none;
    border-radius: 10px;
    color: #000;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.35);
}

.btn-primary-custom:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 242, 254, 0.5);
    filter: brightness(1.1);
}

.btn-primary-custom:active {
    transform: translateY(1px);
}

.btn-secondary-custom {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-main);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-secondary-custom:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-muted);
}

/* Badges */
.badge-custom {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-pending {
    background: rgba(255, 153, 0, 0.15);
    color: var(--status-pending);
    border: 1px solid rgba(255, 153, 0, 0.3);
}

.badge-path {
    background: rgba(0, 242, 254, 0.15);
    color: var(--status-path);
    border: 1px solid rgba(0, 242, 254, 0.3);
}

.badge-success {
    background: rgba(57, 255, 20, 0.12);
    color: var(--status-success);
    border: 1px solid rgba(57, 255, 20, 0.3);
}

.badge-danger {
    background: rgba(255, 7, 58, 0.15);
    color: var(--status-danger);
    border: 1px solid rgba(255, 7, 58, 0.3);
}

/* Flex Grid and Layout structures */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Lists and Tables */
.scrollable-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.list-item-custom {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.list-item-custom:hover {
    border-color: rgba(0, 242, 254, 0.15);
    background: rgba(255, 255, 255, 0.04);
}

/* Monitoring Stat Cards */
.monitoreo-card {
    border-left: 4px solid var(--accent-blue);
}

.monitoreo-card.pending { border-left-color: var(--status-pending); }
.monitoreo-card.path { border-left-color: var(--status-path); }
.monitoreo-card.success { border-left-color: var(--status-success); }
.monitoreo-card.danger { border-left-color: var(--status-danger); }

.stat-val {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0.5rem 0;
    line-height: 1;
}

/* Map Dashboard Container */
.map-container {
    height: 600px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

#map {
    height: 100%;
    width: 100%;
    background: #0f141d;
}

/* Custom leaflet style overrides for dark mode feel */
.leaflet-container {
    background: #0f141d !important;
}

.leaflet-popup-content-wrapper {
    background: var(--bg-card) !important;
    color: var(--text-main) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
}

.leaflet-popup-tip {
    background: rgba(17, 22, 34, 0.95) !important;
}

/* Footer style */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(13, 17, 26, 0.9);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-color);
    padding: 0.75rem 2rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    z-index: 999;
}

/* Alerts */
.alert-premium {
    background: rgba(57, 255, 20, 0.08);
    border: 1px solid rgba(57, 255, 20, 0.2);
    border-radius: 12px;
    color: var(--status-success);
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-premium.error {
    background: rgba(255, 7, 58, 0.08);
    border: 1px solid rgba(255, 7, 58, 0.2);
    color: var(--status-danger);
}