/* assets/css/style.css */

/* ============================================
   GLOBAL STYLES - Green Theme
   ============================================ */

:root {
    --primary-dark: #1a472a;
    --primary-medium: #2d8a4e;
    --primary-light: #4CAF50;
    --primary-gradient: linear-gradient(135deg, #1a472a 0%, #2d8a4e 50%, #1a472a 100%);
    --sidebar-bg: #1a1a2e;
    --sidebar-hover: #2d8a4e;
    --sidebar-active: #2d8a4e;
    --text-light: #ffffff;
    --text-dark: #333333;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
}

.min-vh-100 {
    min-height: 100vh;
}

/* ============================================
   CARDS
   ============================================ */

.card {
    border-radius: 15px;
    border: none;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.card:hover {
    box-shadow: var(--shadow-hover);
}

.card-header {
    border-radius: 15px 15px 0 0 !important;
    font-weight: 600;
    background: var(--primary-gradient) !important;
    color: white;
}

/* ============================================
   BADGES
   ============================================ */

.badge {
    padding: 5px 12px;
    font-weight: 500;
    border-radius: 20px;
}

/* ============================================
   NAVBAR - Green Theme
   ============================================ */

.navbar {
    background: var(--primary-gradient) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.navbar-dark .navbar-brand {
    font-weight: 700;
    color: white;
}

.navbar-dark .navbar-brand:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   SIDEBAR - Green Theme (FIXED)
   ============================================ */

.list-group-item {
    border: none;
    padding: 12px 20px;
    color: #333;
    transition: all 0.3s;
    border-radius: 10px;
    margin-bottom: 3px;
    background: transparent;
}

.list-group-item:hover {
    background: rgba(45, 138, 78, 0.1);
    color: var(--primary-medium);
    transform: translateX(5px);
}

/* ✅ ACTIVE STATE - GREEN (instead of blue) */
.list-group-item.active {
    background: var(--primary-gradient) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(45, 138, 78, 0.3);
    border: none;
}

.list-group-item.active:hover {
    transform: translateX(5px);
    background: var(--primary-gradient) !important;
    color: white !important;
}

.list-group-item.active i {
    color: white;
}

.list-group-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    color: #6c757d;
}

.list-group-item.active i {
    color: white;
}

/* Sidebar wrapper */
.sidebar-wrapper {
    background: white;
    border-radius: 15px;
    padding: 15px;
    box-shadow: var(--shadow);
}

/* ============================================
   BUTTONS - Green Theme
   ============================================ */

.btn-primary {
    background: var(--primary-gradient) !important;
    border: none;
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(45, 138, 78, 0.4);
}

.btn-success {
    background: var(--primary-medium) !important;
    border: none;
    transition: all 0.3s;
}

.btn-success:hover {
    background: var(--primary-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(45, 138, 78, 0.4);
}

.btn-warning {
    transition: all 0.3s;
}

.btn-warning:hover {
    transform: translateY(-2px);
}

.btn-danger {
    transition: all 0.3s;
}

.btn-danger:hover {
    transform: translateY(-2px);
}

.btn-info {
    transition: all 0.3s;
}

.btn-info:hover {
    transform: translateY(-2px);
}

/* ============================================
   STAT CARDS
   ============================================ */

.stat-card {
    border: none;
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s;
    cursor: default;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.stat-card .stat-icon {
    font-size: 2rem;
    opacity: 0.8;
}

.stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 5px 0;
}

.stat-card .stat-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Stat Card Colors - Green Theme */
.stat-primary {
    background: var(--primary-gradient) !important;
    color: white;
}

.stat-success {
    background: linear-gradient(135deg, #2d8a4e, #4CAF50) !important;
    color: white;
}

.stat-warning {
    background: linear-gradient(135deg, #f57c00, #ffa726) !important;
    color: white;
}

.stat-danger {
    background: linear-gradient(135deg, #c62828, #ef5350) !important;
    color: white;
}

.stat-info {
    background: linear-gradient(135deg, #00695c, #00897b) !important;
    color: white;
}

/* ============================================
   TABLES
   ============================================ */

.table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

.table thead th {
    background: var(--primary-gradient) !important;
    color: white;
    border: none;
    padding: 12px 15px;
    font-weight: 600;
}

.table tbody tr {
    transition: all 0.3s;
}

.table tbody tr:hover {
    background: rgba(45, 138, 78, 0.05);
}

.table tbody td {
    vertical-align: middle;
    padding: 12px 15px;
}

/* ============================================
   FORMS
   ============================================ */

.form-control {
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    padding: 10px 15px;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: var(--primary-medium);
    box-shadow: 0 0 0 0.2rem rgba(45, 138, 78, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--text-dark);
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
    border: none;
    border-radius: 10px;
    padding: 15px 20px;
}

.alert-success {
    background: #e8f5e9;
    color: #1a472a;
    border-left: 4px solid var(--primary-medium);
}

.alert-danger {
    background: #fce4ec;
    color: #c62828;
    border-left: 4px solid #c62828;
}

.alert-warning {
    background: #fff3e0;
    color: #e65100;
    border-left: 4px solid #f57c00;
}

.alert-info {
    background: #e0f7fa;
    color: #00695c;
    border-left: 4px solid #00897b;
}

/* ============================================
   MODALS
   ============================================ */

.modal-header {
    background: var(--primary-gradient) !important;
    color: white;
    border-radius: 15px 15px 0 0;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: var(--shadow-hover);
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .navbar,
    .list-group,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .container,
    .container-fluid {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .stat-card .stat-number {
        font-size: 1.8rem;
    }
    
    .list-group-item {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .table {
        font-size: 0.85rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 8px 10px;
    }
}

/* ============================================
   SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-medium);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ============================================
   ADDITIONAL GREEN THEME ELEMENTS
   ============================================ */

/* Pagination */
.page-item.active .page-link {
    background: var(--primary-gradient) !important;
    border-color: var(--primary-medium) !important;
}

.page-link {
    color: var(--primary-medium);
}

.page-link:hover {
    color: var(--primary-dark);
}

/* Dropdown */
.dropdown-item:hover {
    background: rgba(45, 138, 78, 0.1);
    color: var(--primary-medium);
}

/* Progress Bar */
.progress-bar {
    background: var(--primary-gradient) !important;
}

/* Tabs */
.nav-tabs .nav-link.active {
    color: var(--primary-medium);
    border-bottom: 3px solid var(--primary-medium);
}

.nav-tabs .nav-link:hover {
    color: var(--primary-dark);
}

/* Toast/Notification */
.toast-header {
    background: var(--primary-gradient) !important;
    color: white;
}

/* Tooltip */
.tooltip-inner {
    background: var(--primary-dark);
}

/* Popover */
.popover-header {
    background: var(--primary-gradient) !important;
    color: white;
}

/* Badge in stats */
.badge-primary {
    background: var(--primary-medium) !important;
}

/* Card Footer */
.card-footer {
    background: rgba(45, 138, 78, 0.05);
    border-top: 1px solid rgba(45, 138, 78, 0.1);
}

/* Focus outline */
*:focus {
    outline-color: var(--primary-medium) !important;
}

/* Selection color */
::selection {
    background: var(--primary-medium);
    color: white;
}

/* Scroll to top button */
#scrollTopBtn {
    background: var(--primary-gradient) !important;
    color: white;
    border: none;
    border-radius: 50%;
    padding: 10px 15px;
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

#scrollTopBtn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}