/* ================== ROOT ================== */
:root {
    --primary: #E53935;
    --bg: #F7F8FA;
    --text: #1A1A1A;

    --radius: 16px;
    --radius-sm: 10px;

    --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* ================== GLOBAL ================== */
body {
    background: var(--bg);
    font-family: 'Inter', sans-serif;
    margin: 0;
}

/* ================== LAYOUT ================== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 250px;
    background: #0B1B2B;
    color: white;
    padding: 20px;
    flex-shrink: 0;
}

.sidebar-logo {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 30px;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #cbd5e1;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    margin-bottom: 8px;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    background: #1e293b;
    color: white;
}

.sidebar-alert {
    background: #1e293b;
    padding: 15px;
    border-radius: 10px;
    font-size: 14px;
}

/* ===== MAIN AREA ===== */
.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ===== TOPBAR ===== */
.topbar {
    background: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.search-input {
    width: 300px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 35px;
    height: 35px;
    background: #eee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== CONTENT ===== */
.app-main {
    padding: 20px;
}

/* ================== MAP ================== */
.map-container {
    height: 500px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin: 20px 0;
}

.map-full {
    height: 600px;
}

.map-wrapper {
    height: 250px;
    width: 100%;
}

#map {
    height: 100%;
    width: 100%;
}

/* ================== INCIDENT UI ================== */
.card {
    box-shadow: var(--shadow);
    margin-bottom: 15px;
    border-radius: var(--radius-sm);
}

.priority-high {
    color: #dc3545;
    font-weight: bold;
}

.priority-critical {
    color: #8b0000;
    font-weight: bold;
}

/* ================== STATUS BADGES ================== */
.status-badge {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: bold;
}

.status-pending {
    background: #ffc107;
}

.status-assigned {
    background: #0dcaf0;
}

.status-in_progress {
    background: #0d6efd;
    color: white;
}

.status-resolved {
    background: #198754;
    color: white;
}

/* ================== MOBILE ================== */
.mobile-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    border-bottom: 1px solid #eee;
}

.app-header {
    background: linear-gradient(135deg, #cecbcb, #ffffff);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-greeting {
    font-weight: 600;
    font-size: 16px;
}

.app-subtext {
    font-size: 12px;
    opacity: 0.8;
}

/* ===== BOTTOM NAV ===== */
.app-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;

    background: #fff;
    border-top: 1px solid #eee;

    display: flex;
    justify-content: space-around;
    align-items: center;

    z-index: 1000;
}

.app-bottom-nav .nav-item {
    flex: 1;
    text-align: center;
    font-size: 11px;
    color: #888;
    text-decoration: none;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.app-bottom-nav .nav-item i {
    font-size: 18px;
}

.app-bottom-nav .nav-item.active {
    color: var(--primary);
}

/* ===== SOS BUTTON ===== */
.nav-sos {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);

    width: 65px;
    height: 65px;
    border-radius: 50%;

    background: var(--primary);
    color: white;

    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: bold;
    font-size: 14px;

    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    border: 4px solid white;
}

/* ================== RESPONSIVE ================== */
@media (max-width: 991px) {
    .sidebar {
        display: none;
    }

    .search-input {
        width: 100%;
    }

    .app-main {
        padding-bottom: 90px;
    }
}