/* GeoStack Indoor Positioning Platform - Custom Styles */

* { box-sizing: border-box; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #1e293b; }
::-webkit-scrollbar-thumb { background: #475569; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #6366f1; }

body { font-family: 'Inter', 'Segoe UI', system-ui, sans-serif; }

/* Glow effects */
.glow-indigo { box-shadow: 0 0 20px rgba(99,102,241,0.3); }
.glow-green  { box-shadow: 0 0 20px rgba(34,197,94,0.3); }
.glow-red    { box-shadow: 0 0 20px rgba(239,68,68,0.3); }
.glow-amber  { box-shadow: 0 0 20px rgba(245,158,11,0.3); }

/* Pulse ring animation */
@keyframes pulseRing {
    0%   { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(2);   opacity: 0; }
}
.pulse-ring {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.pulse-ring::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.4;
    animation: pulseRing 1.5s ease-out infinite;
}

/* Fade-in animation */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.4s ease-out forwards; }

/* Staggered children */
.stagger-children > *:nth-child(1) { animation-delay: 0.0s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.3s; }

/* Slide-in from left */
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}
.slide-in-left { animation: slideInLeft 0.3s ease-out forwards; }

/* Card hover lift */
.stat-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    will-change: transform;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

/* Activity item entrance */
@keyframes activitySlide {
    from { opacity: 0; transform: translateX(10px); }
    to   { opacity: 1; transform: translateX(0); }
}
.activity-item { animation: activitySlide 0.3s ease-out forwards; }

/* Live dot blink */
@keyframes liveBlink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}
.live-blink { animation: liveBlink 1.2s ease-in-out infinite; }

/* Map marker bounce */
@keyframes markerBounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-4px); }
}
.marker-bounce { animation: markerBounce 2s ease-in-out infinite; }

/* Status badge */
.badge-online  { background: rgba(34,197,94,0.15); color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.badge-offline { background: rgba(100,116,139,0.15); color: #94a3b8; border: 1px solid rgba(100,116,139,0.3); }
.badge-alert   { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.badge-warning { background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }

/* Sidebar nav active */
.nav-active {
    background: rgba(99,102,241,0.15) !important;
    color: #a5b4fc !important;
    border-left: 3px solid #6366f1;
}

/* Table row hover */
.table-row:hover { background: rgba(99,102,241,0.05); }

/* Leaflet map overrides */
#map-container .leaflet-container {
    background: #0f172a;
    border-radius: 0;
}
#map-container .leaflet-popup-content-wrapper {
    background: #1e293b;
    color: #e2e8f0;
    border: 1px solid #334155;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
#map-container .leaflet-popup-tip { background: #1e293b; }
#map-container .leaflet-control-zoom a {
    background: #1e293b;
    color: #e2e8f0;
    border: 1px solid #334155;
}
#map-container .leaflet-control-zoom a:hover { background: #334155; }
#map-container .leaflet-bar { border: 1px solid #334155 !important; }

/* Zone polygon tooltip */
.zone-tooltip {
    background: #1e293b;
    border: 1px solid #475569;
    color: #e2e8f0;
    border-radius: 8px;
    font-size: 12px;
    padding: 4px 10px;
}

/* Heatmap gradient override */
.leaflet-heatmap-layer { border-radius: 12px; }

/* Progress bar animation */
@keyframes progressGrow {
    from { width: 0; }
}
.progress-animate { animation: progressGrow 1s ease-out forwards; }

/* Chart tooltip dark */
.chart-tooltip {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    border-radius: 8px !important;
    color: #e2e8f0 !important;
}

/* Modal backdrop */
.modal-backdrop {
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
}

/* Notification dot */
.notif-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid #0f172a;
}

/* RFID / BLE badge */
.badge-rfid { background: rgba(99,102,241,0.15); color: #818cf8; border: 1px solid rgba(99,102,241,0.3); }
.badge-ble  { background: rgba(14,165,233,0.15);  color: #38bdf8; border: 1px solid rgba(14,165,233,0.3); }
.badge-wifi { background: rgba(168,85,247,0.15);  color: #c084fc; border: 1px solid rgba(168,85,247,0.3); }

/* Smooth sidebar transitions */
aside a { transition: background 0.15s, color 0.15s, border 0.15s; }

/* Glassy card */
.glass-card {
    background: rgba(30,41,59,0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(51,65,85,0.6);
}

/* Input focus ring */
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 2px rgba(99,102,241,0.2);
}

/* Leaflet employee icon */
.employee-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    font-size: 10px;
    font-weight: bold;
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    transition: transform 0.2s;
}
.employee-icon:hover { transform: scale(1.2); cursor: pointer; }
.employee-icon.alert-icon { border-color: #ef4444; animation: pulseRing 1s ease-out infinite; }

/* Scrollable content area */
.scroll-area {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #475569 #1e293b;
}

/* Timeline dot */
.timeline-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
}
.timeline-line {
    width: 1px;
    flex-shrink: 0;
    background: #334155;
    margin: 2px auto;
}
