/* WSAG - Water and Sanitation Agency Gujranwala - Custom Styles */

:root {
    --primary-color: #0066cc;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --wsag-blue: #0066cc;
    --wsag-dark-blue: #004499;
}

/* Header Styles */
.bg-primary {
    background-color: var(--wsag-blue) !important;
}

.navbar-dark {
    background-color: var(--dark-color) !important;
}

.main-content {
    min-height: calc(100vh - 200px);
    padding-bottom: 2rem;
}

/* Footer Styles */
footer {
    margin-top: auto;
}

footer a:hover {
    color: var(--wsag-blue) !important;
    transition: color 0.3s ease;
}

footer .fab:hover, footer .fas:hover {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* Logo Animation */
.navbar-brand img, footer img {
    transition: transform 0.3s ease;
}

.navbar-brand:hover img, footer img:hover {
    transform: scale(1.05);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    line-height: 1.6;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    border-radius: 15px 15px 0 0 !important;
    padding: 1.5rem;
}

.card-body {
    padding: 2rem;
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.btn {
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0056b3 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    border: none;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.text-danger {
    color: var(--danger-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.border-bottom {
    border-bottom: 2px solid #e9ecef !important;
}

.alert {
    border-radius: 10px;
    border: none;
    padding: 1rem 1.5rem;
}

.alert-success {
    background: linear-gradient(135deg, #d1edff 0%, #a7d8f0 100%);
    color: #0c5460;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f1aeb5 100%);
    color: #721c24;
}

/* Form validation styles */
.was-validated .form-control:valid {
    border-color: var(--success-color);
}

.was-validated .form-control:invalid {
    border-color: var(--danger-color);
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Map container */
#map {
    height: 300px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

/* File upload styling */
.form-control[type="file"] {
    padding: 0.5rem;
}

.form-control[type="file"]::-webkit-file-upload-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    margin-right: 1rem;
    cursor: pointer;
}

/* Responsive design */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 10px;
    }
    
    .card {
        margin: 10px 0;
    }
    
    .btn-lg {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Animation for form sections */
.form-section {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Status badges */
.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-in-process {
    background-color: #cff4fc;
    color: #055160;
}

.status-verified {
    background-color: #d1e7dd;
    color: #0f5132;
}

.status-approved {
    background-color: #d1e7dd;
    color: #0f5132;
}

.status-rejected {
    background-color: #f8d7da;
    color: #721c24;
}

/* Dashboard cards */
.dashboard-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
}

.dashboard-card .card-icon {
    font-size: 3rem;
    opacity: 0.8;
}

.dashboard-card .card-number {
    font-size: 2.5rem;
    font-weight: bold;
}

.dashboard-card .card-title {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Dropdown Menu Fixes */
.dropdown-menu {
    z-index: 1050 !important;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    min-width: 200px;
    background-color: #fff !important;
}

.dropdown-menu.show {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.navbar .dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    color: #212529 !important;
    text-decoration: none;
    background-color: transparent;
    border: 0;
    display: block;
    width: 100%;
    clear: both;
    font-weight: 400;
    line-height: 1.5;
    white-space: nowrap;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #f8f9fa !important;
    color: #1e2125 !important;
}

.dropdown-header {
    padding: 0.5rem 1rem;
    margin-bottom: 0;
    font-size: 0.875rem;
    color: #6c757d;
    white-space: nowrap;
}

.dropdown-item-text {
    padding: 0.25rem 1rem;
    color: #6c757d;
    display: block;
}

.dropdown-divider {
    height: 0;
    margin: 0.5rem 0;
    overflow: hidden;
    border-top: 1px solid #dee2e6;
}

/* Table styling */
.table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.table thead th {
    background: var(--primary-color);
    color: white;
    border: none;
    font-weight: 600;
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-color: #f8f9fa;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Print styles */
@media print {
    .navbar, .btn, .alert {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    body {
        background: white;
    }
}