/* ============================================
   Violation Record System - Main Stylesheet
   ============================================ */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #f4f6f9;
    overflow-x: hidden;
}

/* ============================================
   SIDEBAR STYLES
   ============================================ */
#sidebar {
    min-width: 280px;
    max-width: 280px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    transition: all 0.3s ease;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 999;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
}

#sidebar.collapsed {
    margin-left: -280px;
}

#sidebar .sidebar-header {
    padding: 25px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#sidebar .sidebar-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

#sidebar .sidebar-header h3 i {
    color: #f39c12;
    margin-right: 10px;
}

#sidebar ul.components {
    padding: 20px 0;
}

#sidebar ul li {
    margin-bottom: 5px;
}

#sidebar ul li a {
    padding: 12px 20px;
    font-size: 1rem;
    display: block;
    color: #e0e0e0;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

#sidebar ul li a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    padding-left: 25px;
}

#sidebar ul li.active > a {
    background: linear-gradient(90deg, #f39c12, #e67e22);
    color: #fff;
    border-radius: 0 10px 10px 0;
}

#sidebar ul li a i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

/* Dropdown styles */
#sidebar .dropdown-toggle {
    position: relative;
}

#sidebar .dropdown-toggle::after {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

#sidebar .collapse ul {
    background: rgba(0, 0, 0, 0.2);
}

#sidebar .collapse ul li a {
    padding: 10px 20px 10px 45px;
    font-size: 0.9rem;
}

#sidebar .collapse ul li a:hover {
    padding-left: 50px;
}

#sidebar .collapse ul li.active a {
    background: rgba(243, 156, 18, 0.3);
}

/* ============================================
   MAIN CONTENT STYLES
   ============================================ */
#content {
    margin-left: 280px;
    transition: all 0.3s ease;
    min-height: 100vh;
}

#content.expanded {
    margin-left: 0;
}

/* Navbar Styles */
.navbar-custom {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 12px 20px;
    border-radius: 0;
    margin-bottom: 20px;
}

#sidebarCollapse {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
}

#sidebarCollapse:hover {
    color: #f39c12;
}

.navbar-text {
    font-weight: 500;
    color: #333;
}

/* Welcome Section */
.welcome-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.welcome-section h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

/* Stat Cards */
.stat-box {
    background: #fff;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.stat-box i {
    font-size: 2.5rem;
    color: #f39c12;
    margin-bottom: 15px;
}

.stat-box h4 {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
    font-weight: 500;
}

.stat-box h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    overflow: hidden;
}

.card-header {
    background: #fff;
    border-bottom: 2px solid #f0f0f0;
    padding: 20px 25px;
    font-weight: 600;
}

.card-header h5, .card-header h4 {
    margin: 0;
    color: #333;
}

.card-header h5 i, .card-header h4 i {
    color: #f39c12;
    margin-right: 10px;
}

.card-body {
    padding: 25px;
}

/* Form Styles */
.form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.form-control, .form-select {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 10px 15px;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.form-control:focus, .form-select:focus {
    border-color: #f39c12;
    box-shadow: 0 0 0 0.2rem rgba(243, 156, 18, 0.25);
}

/* Buttons */
.btn {
    padding: 5px 15px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
    font-size: 0.75rem;
}

.btn-primary {
    background: linear-gradient(90deg, #f39c12, #e67e22);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(90deg, #e67e22, #d35400);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.3);
}

.btn-secondary {
    background: #6c757d;
    border: none;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Table Styles */
.table {
    margin-bottom: 0;
}

.table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
    color: #555;
    font-weight: 600;
    padding: 8px 10px;
    font-size: 0.8rem;
}

.table tbody td {
    padding: 6px 10px;
    vertical-align: middle;
    font-size: 0.8rem;
}

.table-hover tbody tr:hover {
    background: #f8f9fa;
}

/* File Upload Area */
#fileList {
    max-height: 200px;
    overflow-y: auto;
}

.file-item {
    background: #f8f9fa;
    padding: 8px 12px;
    margin: 5px 0;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #555;
}

.file-item i {
    color: #f39c12;
    margin-right: 8px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

/* Responsive */
@media (max-width: 768px) {
    #sidebar {
        margin-left: -280px;
    }
    
    #sidebar.collapsed {
        margin-left: 0;
    }
    
    #content {
        margin-left: 0;
    }
    
    #content.expanded {
        margin-left: 280px;
    }
    
    .stat-box {
        margin-bottom: 15px;
    }
    
    .welcome-section h1 {
        font-size: 1.3rem;
    }
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Badge Styles */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
}

.badge-pending {
    background: #ffc107;
    color: #856404;
}

.badge-reviewed {
    background: #17a2b8;
    color: #fff;
}

.badge-resolved {
    background: #28a745;
    color: #fff;
}

.badge-appealed {
    background: #dc3545;
    color: #fff;
}

/* Photo Preview Styles */
.photo-preview-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background: #f8f9fa;
}

.preview-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.photo-actions {
    padding: 8px;
    text-align: center;
    background: white;
}

.remove-photo {
    width: 100%;
    font-size: 0.8rem;
}

.photo-actions .btn-danger:hover {
    background: #dc3545;
    transform: translateY(-1px);
}

/* Total Amount Card */
.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.bg-gradient-primary h2 {
    font-size: 2.5rem;
    font-weight: 700;
}

.bg-gradient-primary small {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Action buttons in table */
.btn-group-sm .btn {
    padding: 3px 6px;
    font-size: 0.7rem;
}

.btn-group-sm .btn i {
    font-size: 0.7rem;
}

/* Add Violation button */
.card-header .btn-sm {
    padding: 4px 10px;
    font-size: 0.75rem;
}

/* Filter buttons */
#applyFilterBtn, #resetFilterBtn {
    padding: 4px 10px;
    font-size: 0.75rem;
}