/**
 * Binangonan Complaint Management System
 * Global Styling - Government Blue & White Theme
 * 
 * Color Scheme:
 * Primary Blue: #003366 (Deep Government Blue)
 * Secondary Blue: #004d99 (Lighter Blue)
 * White: #FFFFFF
 * Gray: #f8f9fa, #e9ecef, #999
 */

:root {
    --primary-blue: #003366;
    --secondary-blue: #004d99;
    --bg-light: #f8f9fa;
    --text-dark: #333333;
    --text-muted: #666666;
    --border-color: #ddd;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

/* ============================================
   MAIN LAYOUT
   ============================================ */

.main-layout{
    display:flex;
    width:100%;
    min-height:100vh;
}

/* Desktop */
.main-layout aside{
    width:250px;
    min-width:250px;
    max-width:250px;
    flex:0 0 250px;
    box-sizing:border-box;
}

.main-layout main {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    max-width: none;
    margin-left: 0;
    padding: 30px;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Mobile */
@media (max-width:768px){

    .main-layout aside{

        position:fixed;
        left:-260px;
        top:0;
        width:250px;
        height:100vh;
        background:#fff;
        z-index:1050;
        transition:.3s;

    }

    .main-layout aside.active{

        left:0;

    }

    .main-layout main{

        margin-left:0;
        padding:15px;

    }

}

/* ============================================
   NAVBAR STYLING
   ============================================ */

.navbar {
    background-color: white !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: 60px;
    display: flex;
    align-items: center;
}

.navbar-brand {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-blue) !important;
}

.navbar-brand i {
    margin-right: 8px;
}

.navbar .nav-link {
    color: var(--text-dark) !important;
    font-size: 14px;
    margin: 0 8px;
    transition: color 0.3s ease;
}

.navbar .nav-link:hover {
    color: var(--primary-blue) !important;
}

.navbar .dropdown-menu {
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #ddd;
}

.navbar .dropdown-item:hover {
    background-color: var(--bg-light);
    color: var(--primary-blue);
}

/* ============================================
   SIDEBAR STYLING
   ============================================ */

#sidebar {
    background-color: #f5f5f5;
    border-right: 1px solid var(--border-color);
}

#sidebar .card {
    border-radius: 8px;
    border: none;
}

#sidebar .nav-section {
    margin-bottom: 20px;
}

#sidebar .nav-link {
    color: var(--text-dark);
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

#sidebar .nav-link:hover {
    background-color: #e9ecef;
    color: var(--primary-blue);
    transform: translateX(3px);
}

#sidebar .nav-link.active {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 51, 102, 0.2);
}

#sidebar .nav-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* ============================================
   CARDS & CONTAINERS
   ============================================ */

.card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.card-header {
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    border-radius: 8px 8px 0 0;
    padding: 16px;
    font-weight: 600;
    color: var(--primary-blue);
}

.card-body {
    padding: 20px;
}

/* ============================================
   STATISTICS CARDS
   ============================================ */

.stat-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: default;
}

.stat-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary-blue);
    margin: 10px 0;
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .stat-icon {
    font-size: 28px;
    color: var(--secondary-blue);
    opacity: 0.8;
    margin-bottom: 10px;
}

/* ============================================
   TABLES
   ============================================ */

.table {
    background-color: white;
    margin-bottom: 0;
    font-size: 14px;
}

.table thead {
    background-color: var(--bg-light);
    border-bottom: 2px solid var(--border-color);
}

.table thead th {
    color: var(--primary-blue);
    font-weight: 600;
    padding: 12px;
    vertical-align: middle;
    border: none;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f9f9f9;
}

.table tbody td {
    padding: 12px;
    vertical-align: middle;
    color: var(--text-dark);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(248, 249, 250, 0.5);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    padding: 8px 16px;
    font-weight: 500;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-size: 14px;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: white;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.3);
    color: white;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: #e9ecef;
    color: var(--text-dark);
}

.btn-secondary:hover {
    background-color: #dee2e6;
    color: var(--text-dark);
}

.btn-outline-primary {
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary-blue);
    color: white;
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-success:hover {
    background-color: #218838;
    color: white;
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
    color: white;
}

.btn-warning {
    background-color: var(--warning);
    color: #333;
}

.btn-warning:hover {
    background-color: #e0a800;
    color: #333;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* ============================================
   BADGES & LABELS
   ============================================ */

.badge {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
    display: inline-block;
}

.badge.bg-success {
    background-color: var(--success) !important;
    color: white;
}

.badge.bg-danger {
    background-color: var(--danger) !important;
    color: white;
}

.badge.bg-warning {
    background-color: var(--warning) !important;
    color: #333;
}

.badge.bg-info {
    background-color: var(--info) !important;
    color: white;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
    color: white;
}

/* ============================================
   FORMS
   ============================================ */

.form-label {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
}

.form-control {
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 10px 12px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: white;
    color: var(--text-dark);
}

.form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(0, 51, 102, 0.25);
    color: var(--text-dark);
}

.form-control::placeholder {
    color: #999;
}

.form-select {
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--text-dark);
    background-color: white;
}

.form-select:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(0, 51, 102, 0.25);
}

.form-check-input {
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.form-check-label {
    cursor: pointer;
    font-size: 14px;
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
    border-radius: 5px;
    border: 1px solid transparent;
    padding: 12px 16px;
    font-size: 14px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeeba;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

/* ============================================
   MODALS
   ============================================ */

.modal-content {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: white;
    border-bottom: 1px solid var(--border-color);
    border-radius: 8px 8px 0 0;
}

.modal-header .btn-close {
    opacity: 0.8;
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
    display: flex;
    gap: 5px;
}

.page-link {
    color: var(--primary-blue);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 6px 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.page-link:hover {
    background-color: var(--bg-light);
    color: var(--primary-blue);
}

.page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    border-color: var(--primary-blue);
    color: white;
}

/* ============================================
   UTILITIES
   ============================================ */

.text-primary {
    color: var(--primary-blue) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-success {
    color: var(--success) !important;
}

.text-danger {
    color: var(--danger) !important;
}

.bg-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%) !important;
    color: white !important;
}

.border-primary {
    border-color: var(--primary-blue) !important;
}

.shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.shadow {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 992px) {
    .main-layout aside {
        width: 200px;
    }
    
    .main-layout main {
        margin-left: 200px;
    }
}

@media (max-width: 768px) {
    .main-layout aside {
        position: fixed;
        left: -250px;
        z-index: 1000;
        transition: left 0.3s ease;
        width: 250px;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    }
    
    .main-layout aside.open {
        left: 0;
    }
    
    .main-layout main {
        margin-left: 0;
        padding: 15px;
    }
    
    .page-header {
        margin-bottom: 20px !important;
    }
    
    .stat-card {
        margin-bottom: 15px;
    }
}

@media (max-width: 576px) {
    body {
        font-size: 13px;
    }
    
    .navbar {
        height: 50px;
    }
    
    .btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .table {
        font-size: 12px;
    }
    
    .table thead th,
    .table tbody td {
        padding: 8px !important;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-fade {
    animation: fadeIn 0.3s ease;
}

.animate-slide {
    animation: slideIn 0.3s ease;
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* ================= MOBILE SIDEBAR ================= */

.sidebar{
    width:250px;
    min-width:250px;
    max-width:250px;
    box-sizing:border-box;
    transition:.3s;
}

@media (max-width:768px){

    .sidebar{
        position:fixed;
        top:70px;
        left:-250px;
        height:calc(100vh - 70px);
        background:#fff;
        z-index:1050;
        overflow-y:auto;
        box-shadow:3px 0 10px rgba(0,0,0,.2);
    }

    .sidebar.active{
        left:0;
    }

    main{
        margin-left:0 !important;
        width:100%;
    }

}

@media(max-width:768px){

.main-layout{

display:block;

}

.main-layout aside{

left:-250px;

}

.main-layout aside.active{

left:0;

}

.main-layout main{

margin-left:0;

padding:15px;

width:100%;

}

}

    .form-section,
    .card,
    .container,
    .container-fluid {
        max-width: 100%;
        box-sizing: border-box;
    }

    #incidentMap {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
