/*
 * Modern Theme for Environmental Protectors Cooperative
 * A fresh, clean, and professional UI overhaul
 * Version: 1.0
 */

/* ========================================
   Global Styles & Typography
   ======================================== */
body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #334155;
    background-color: #f1f5f9;
    font-size: 14px;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: #1e293b;
    letter-spacing: -0.02em;
}

/* ========================================
   Navbar / Header Modernization
   ======================================== */
.navbar {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15);
    border-bottom: none;
    backdrop-filter: blur(10px);
}

.navbar-header {
    background: transparent;
}

.navbar .navbar-nav > li > a {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar .navbar-nav > li > a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.top-left-part {
    background: transparent;
}

.logo-text {
    color: #ffffff !important;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.5px;
}

/* ========================================
   Sidebar Modernization
   ======================================== */
.left-sidebar {
    background: #ffffff;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.05);
    border-right: 1px solid #e2e8f0;
}

.sidebar-nav ul {
    padding: 20px 0;
}

.sidebar-nav ul li a {
    color: #64748b;
    padding: 14px 25px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0;
    margin: 2px 12px;
}

.sidebar-nav ul li a:hover {
    background: linear-gradient(135deg, #f0f1ff 0%, #f8f9ff 100%);
    color: #6366f1;
    border-radius: 10px;
    padding-left: 30px;
}

.sidebar-nav ul li a.active,
.sidebar-nav ul li a:focus {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.sidebar-nav ul li a i {
    font-size: 18px;
    margin-right: 12px;
    width: 24px;
    transition: transform 0.3s ease;
}

.sidebar-nav ul li a:hover i {
    transform: scale(1.1);
}

.sidebar-nav .has-arrow::after {
    border-color: #94a3b8;
    transition: all 0.3s ease;
}

.sidebar-nav ul li a:hover.has-arrow::after {
    border-color: #6366f1;
}

/* Submenu styling */
.sidebar-nav ul li ul.collapse li a {
    padding-left: 60px;
    font-size: 13px;
    color: #64748b;
}

.sidebar-nav ul li ul.collapse li a:hover {
    color: #6366f1;
    background: #f8fafc;
    padding-left: 65px;
}

.nav-devider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
    margin: 15px 20px;
}

/* ========================================
   Card Modernization
   ======================================== */
.card {
    border-radius: 16px;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    background: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.card-title {
    font-weight: 600;
    color: #1e293b;
    font-size: 18px;
    padding: 20px 25px 15px;
    border-bottom: 1px solid #f1f5f9;
}

.card-body {
    padding: 25px;
}

/* Dashboard stat cards with gradients */
.card.p-30 {
    padding: 25px !important;
    position: relative;
    overflow: hidden;
}

.card.p-30::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.card.p-30:nth-child(1) {
    border-top: 3px solid #6366f1;
}

.card.p-30:nth-child(2) {
    border-top: 3px solid #10b981;
}

.card.p-30:nth-child(3) {
    border-top: 3px solid #f59e0b;
}

.card.p-30:nth-child(4) {
    border-top: 3px solid #ef4444;
}

.card .media h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
}

.card .media p {
    color: #64748b;
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card .media-left span i {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 24px !important;
}

.color-primary {
    background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%) !important;
    color: #6366f1 !important;
}

.color-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%) !important;
    color: #10b981 !important;
}

.color-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
    color: #f59e0b !important;
}

.color-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%) !important;
    color: #ef4444 !important;
}

/* ========================================
   Button Modernization
   ======================================== */
.btn {
    border-radius: 10px;
    padding: 10px 24px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #ffffff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.btn-info {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: #ffffff;
}

.btn-info:hover {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    box-shadow: 0 4px 16px rgba(6, 182, 212, 0.3);
}

/* ========================================
   Form Modernization
   ======================================== */
.form-control {
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    padding: 12px 16px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: #ffffff;
}

.form-control:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background-color: #ffffff;
}

.form-group label {
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

select.form-control {
    cursor: pointer;
}

/* ========================================
   Table Modernization
   ======================================== */
.table-responsive {
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: #475569;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
    padding: 16px 20px;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f8fafc;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.table tbody td {
    padding: 16px 20px;
    vertical-align: middle;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #fafbfc;
}

/* ========================================
   Badge Modernization
   ======================================== */
.badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #ffffff;
}

.badge-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
}

.badge-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
}

.badge-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
}

/* ========================================
   Breadcrumb Modernization
   ======================================== */
.page-breadcrumb {
    background: #ffffff;
    padding: 20px 30px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-item a {
    color: #6366f1;
    font-weight: 500;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: #4f46e5;
    text-decoration: none;
}

.breadcrumb-item.active {
    color: #64748b;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #cbd5e1;
}

/* ========================================
   Alert Modernization
   ======================================== */
.alert {
    border-radius: 12px;
    border: none;
    padding: 16px 20px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #78350f;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #7f1d1d;
}

.alert-info {
    background: linear-gradient(135deg, #cffafe 0%, #a5f3fc 100%);
    color: #164e63;
}

/* ========================================
   Modal Modernization
   ======================================== */
.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #f1f5f9;
    padding: 24px 30px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 16px 16px 0 0;
}

.modal-title {
    font-weight: 600;
    color: #1e293b;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    border-top: 1px solid #f1f5f9;
    padding: 20px 30px;
}

/* ========================================
   Page Wrapper
   ======================================== */
.page-wrapper {
    background: #f1f5f9;
    min-height: 100vh;
}

.container-fluid {
    padding: 25px 30px;
}

/* ========================================
   Preloader Modernization
   ======================================== */
.preloader {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.cssload-speeding-wheel {
    border-top-color: #ffffff;
    border-left-color: #ffffff;
}

/* ========================================
   Dropdown Modernization
   ======================================== */
.dropdown-menu {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 8px;
}

.dropdown-item {
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 500;
    transition: all 0.2s ease;
    color: #334155;
}

.dropdown-item:hover {
    background: #f1f5f9;
    color: #6366f1;
}

.dropdown-divider {
    border-top-color: #e2e8f0;
}

/* ========================================
   Pagination Modernization
   ======================================== */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 3px;
    border: 2px solid #e2e8f0;
    color: #6366f1;
    font-weight: 600;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background: #6366f1;
    color: #ffffff;
    border-color: #6366f1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-color: #6366f1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* ========================================
   Progress Bar Modernization
   ======================================== */
.progress {
    height: 10px;
    border-radius: 10px;
    background: #e2e8f0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.progress-bar {
    border-radius: 10px;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* ========================================
   Custom Scrollbar
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card,
.alert,
.modal-content {
    animation: fadeIn 0.3s ease-out;
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 768px) {
    .container-fluid {
        padding: 15px;
    }
    
    .card {
        margin-bottom: 15px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .sidebar-nav ul li a {
        padding: 12px 20px;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .left-sidebar,
    .navbar,
    .btn,
    .page-breadcrumb {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #e2e8f0 !important;
    }
}

