/* Font Import */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #0e1b4d;
    /* Deep PUPR Blue */
    --secondary-color: #f1c40f;
    /* PUPR Yellow/Gold */
    --secondary-hover: #d4ac0d;
    --accent-color: #2c3e50;
    --bg-color: #f4f6f9;
    --text-color: #333;
    --white: #ffffff;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Poppins', sans-serif !important;
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* Navbar */
.main-header {
    background: var(--primary-color) !important;
    border-bottom: 2px solid var(--secondary-color) !important;
}

.main-header .nav-link {
    color: #fff !important;
}

/* Sidebar */
.main-sidebar {
    background: #00092b !important;
    /* Extremely Dark Blue */
}

.brand-link {
    border-bottom: 1px solid var(--secondary-color) !important;
    background-color: #fff !important;
    /* White BG for Logo Visibility */
}

.brand-image {
    float: left;
    line-height: .8;
    margin-left: .8rem;
    margin-right: .5rem;
    margin-top: -3px;
    max-height: 40px;
    /* Adjust height */
    width: auto;
    object-fit: contain;
}

/* Sidebar User Panel Name Wrap */
.user-panel .info {
    white-space: normal !important;
}

.user-panel .info a {
    white-space: normal !important;
    word-wrap: break-word !important;
    display: block;
}

.brand-text {
    color: var(--secondary-color) !important;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.nav-pills .nav-link.active,
.nav-pills .show>.nav-link {
    background-color: var(--secondary-color) !important;
    color: #fff !important;
    box-shadow: var(--shadow-md);
}

.nav-pills .nav-link:not(.active):hover {
    color: var(--secondary-color) !important;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    border-top: 4px solid var(--secondary-color);
    border-radius: 12px 12px 0 0 !important;
}

.card-title {
    color: var(--primary-color);
    font-weight: 600;
}

/* Info Boxes */
.info-box {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: none;
}

.info-box-icon {
    background: linear-gradient(135deg, var(--secondary-color), #e2c996) !important;
    color: #fff;
}

.info-box-content {
    background: #fff;
}

.info-box-text {
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
}

.info-box-number {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

/* Buttons */
.btn-primary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    box-shadow: 0 4px 6px rgba(192, 161, 107, 0.3);
    font-weight: 600;
    border-radius: 8px;
    padding: 8px 20px;
    transition: all 0.3s;
}

.btn-primary:hover {
    background-color: var(--secondary-hover);
    border-color: var(--secondary-hover);
    box-shadow: 0 6px 10px rgba(192, 161, 107, 0.4);
}

.btn-outline-primary {
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-outline-primary:hover {
    background-color: var(--secondary-color);
    color: #fff;
}

/* Forms */
.form-control {
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 10px 15px;
    height: auto;
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(192, 161, 107, 0.25);
}

label {
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 8px;
}

/* =============================
   DASHBOARD REFINEMENTS
   ============================= */

/* Logo Refinement */
.brand-link {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 !important;
    height: 70px;
    background: #fff !important;
    overflow: hidden;
}

.logo-wrapper {
    position: relative;
    padding: 5px 15px;
    width: 100%;
    /* Subtle inner glow */
    background: radial-gradient(ellipse at top, rgba(255, 255, 255, 1) 0%, rgba(240, 240, 240, 0.5) 100%);
}

.brand-image-glossy {
    max-height: 55px !important;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    /* Glossy Effect */
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2)) contrast(1.1) brightness(1.05);
    transition: transform 0.3s ease;
}

.brand-image-glossy:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.25)) contrast(1.15) brightness(1.1);
}

/* Shine Animation */
.logo-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    animation: shine 4s infinite;
}

@keyframes shine {
    0% {
        left: -100%;
    }

    20% {
        left: 200%;
    }

    100% {
        left: 200%;
    }
}

/* Elegant Content Wrapper */
.content-wrapper {
    background: linear-gradient(135deg, #f4f6f9 0%, #e9ecef 100%);
    /* Optional: Add subtle pattern if desired */
}

.content-header h1 {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.8rem;
    position: relative;
    padding-bottom: 10px;
}

.content-header h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 2px;
}

/* Elegant Info Boxes */
.info-box {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    /* Soft shadow */
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    position: relative;
}

.info-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--secondary-color);
}

.info-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(14, 27, 77, 0.1);
}

.info-box-icon {
    width: 80px;
    /* Larger icon area */
    background: linear-gradient(135deg, #f8f9fa, #e9ecef) !important;
    color: var(--primary-color) !important;
    border-radius: 0 15px 15px 0 !important;
    /* Unique shape */
}

.info-box-content {
    padding: 20px 15px;
}

.info-box-text {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
}

.info-box-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Elegant Cards */
.card {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.card-header {
    background: var(--primary-color) !important;
    color: #fff;
    border-radius: 15px 15px 0 0 !important;
    padding: 1.2rem;
    border-bottom: 3px solid var(--secondary-color);
}

.card-title {
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    color: #fff !important;
}

/* Map specific elegance */
#map {
    border: none;
    border-radius: 12px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
}

/* =============================
   MODERN LOGIN PAGE STYLES
   ============================= */
.login-modern {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    height: 100vh;
    overflow: hidden;
    background: #fff;
    display: flex;
}

.login-container {
    display: flex;
    width: 100%;
    height: 100%;
}

/* LEFT SIDE: BRANDING */
.login-brand-section {
    width: 60%;
    position: relative;
    background: radial-gradient(circle at center, #0e1b4d 0%, #00092b 100%);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-align: center;
}

.brand-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://images.unsplash.com/photo-1541888946425-d81bb19240f5?auto=format&fit=crop&q=80') center/cover;
    opacity: 0.1;
    /* Subtle texture */
    z-index: 0;
}

.brand-content {
    position: relative;
    z-index: 2;
    padding: 2rem;
}

.brand-logo-main {
    max-width: 180px;
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

.brand-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.brand-content p {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
}

/* RIGHT SIDE: FORM */
.login-form-section {
    width: 40%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    position: relative;
    z-index: 5;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
}

.form-wrapper {
    width: 100%;
    max-width: 450px;
    padding: 40px;
}

.login-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #888;
    margin-bottom: 2rem;
}

.alert-danger-modern {
    background: #fee;
    color: #e74c3c;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #e74c3c;
}

/* Modern Inputs */
.input-group-modern {
    margin-bottom: 1.5rem;
}

.input-group-modern label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
    font-size: 0.9rem;
}

.input-field {
    position: relative;
}

.input-field i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
}

.input-field input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 1px solid #eee;
    background: #f9f9f9;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
}

.input-field input:focus {
    background: #fff;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(241, 196, 15, 0.15);
    outline: none;
}

/* Checkbox */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.checkbox-modern {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
    user-select: none;
}

.checkbox-modern input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    background: #eee;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: all 0.2s;
}

.checkbox-modern input:checked~.checkmark {
    background: var(--secondary-color);
}

.checkbox-modern input:checked~.checkmark:after {
    content: '';
    position: absolute;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Button */
.btn-login-modern {
    display: block;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-color), #1a252f);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 10px 20px rgba(14, 27, 77, 0.2);
}

.btn-login-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(14, 27, 77, 0.3);
}

.login-footer {
    margin-top: 3rem;
    text-align: center;
    font-size: 0.85rem;
    color: #aaa;
}

/* Responsive */
@media (max-width: 768px) {
    .login-brand-section {
        display: none;
        /* Hide branding on mobile for simplicity or stack it */
    }

    .login-form-section {
        width: 100%;
    }

    .form-wrapper {
        padding: 30px;
    }
}



/* Map */
#map,
#mapPicker {
    border-radius: 12px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
    border: 4px solid #fff;
}

/* Theme Overrides */
.card-primary:not(.card-outline)>.card-header {
    background-color: var(--primary-color) !important;
    border-bottom: 2px solid var(--secondary-color);
}

.btn-primary {
    background-image: linear-gradient(to right, var(--secondary-color), #d4b47d);
    border: none;
}

/* Glassmorphism for Stats */
.info-box {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Table Styling */
.table thead th {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}