/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --light: #f8fafc;
    --dark: #1e293b;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--dark);
    color: white;
    padding: 1.5rem 0;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 0 1.5rem 2rem;
    border-bottom: 1px solid #334155;
    margin-bottom: 1rem;
}

.sidebar-header h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
}

.sidebar-nav {
    padding: 0 1rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.nav-item:hover, .nav-item.active {
    background: var(--primary);
    color: white;
    transform: translateX(5px);
}

.nav-item i {
    font-size: 1.25rem;
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Top Bar */
.top-bar {
    background: white;
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-details {
    text-align: right;
}

.user-name {
    font-weight: 600;
    color: var(--dark);
}

.user-role {
    font-size: 0.875rem;
    color: var(--secondary);
}

.logout-btn {
    background: var(--danger);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* Content Area */
.content-area {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

/* Page Header */
.page-header {
    margin-bottom: 1rem;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--secondary);
    font-size: 1.1rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.stat-info h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: var(--secondary);
    font-size: 0.9rem;
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}


.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}


.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

/* ___________________ Mobile View Form ___________________ */
.form-row_m {
    display: grid;
    grid-template-columns: 1fr;
    /* gap: 1rem; */
}
.form-group_m {
    margin-bottom: 0.5rem;
}

.form-control_m {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-label_m {
    /* display: block; */
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}


/* Desktop default */
.container-desktop {
    display: block !important;
}

.container-mobile {
    display: none !important;
}

/* Mobile view */
@media screen and (max-width: 768px) {
    .container-desktop {
        display: none !important;
    }

    .container-mobile {
        display: block !important;
    }
}



/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    justify-content: center;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    border-radius: 8px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tr:hover {
    background: #f8fafc;
}

/* Status Badges */
.status-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: #d1fae5;
    color: #065f46;
}

.status-inactive {
    background: #fee2e2;
    color: #991b1b;
}

.status-due {
    background: #fef3c7;
    color: #92400e;
}

/* Search Box */
.search-box {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    width: 100%;
    max-width: 300px;
}

.search-box:focus {
    outline: none;
    border-color: var(--primary);
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left-color: #10b981;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left-color: #ef4444;
}

/* Actions */
.actions {
    display: flex;
    gap: 0.5rem;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
}

/* Responsive Design */


@media (max-width: 768px) {
    .top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    z-index: 1000;
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
}
.page-header{
    padding-top: 50px;
}
.sidebar-header{
    padding-top: 50px;
}
}


@media (max-width: 1024px) {
    .sidebar {
        width: 250px;
    }
    
    .content-area {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: fixed;
        top: 0;
        left: -100%;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .top-bar {
        padding: 1rem;
    }
    
    .content-area {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .user-details {
        display: none;
    }
    
    .card-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .search-box {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .actions {
        flex-direction: column;
    }
}

/* Tablet Optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* Desktop Optimizations */
@media (min-width: 1025px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* Dark overlay for mobile menu */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.overlay.active {
    display: block;
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Enhanced Table Responsiveness */
.table-container {
    overflow-x: auto;
    border-radius: 8px;
    margin: 0 -1rem;
    padding: 0 1rem;
    -webkit-overflow-scrolling: touch;
}

.table-container::-webkit-scrollbar {
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Data table styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    min-width: 800px; /* Ensure table is wide enough to show all columns */
}

.data-table th,
.data-table td {
    padding: 1rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tr:hover {
    background: #f8fafc;
}

/* Actions column styling */
.actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-start;
}

.actions .btn {
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ensure table is properly scrollable on all screens */
@media (max-width: 768px) {
    .table-container {
        margin: 0 -0.5rem;
        padding: 0 0.5rem;
    }
    
    .data-table {
        min-width: 900px; /* Wider on mobile to ensure all columns are visible with scrolling */
    }
    
    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
}

/* Desktop - Allow scrolling if needed but show full table when possible */
@media (min-width: 769px) {
    .table-container {
        margin: 0;
        padding: 0;
    }
    
    .data-table {
        min-width: 100%; /* Use full available width */
        width: auto; /* Let table expand naturally */
    }
    
    /* On larger screens, if table doesn't fit, allow horizontal scrolling */
    @media (min-width: 769px) and (max-width: 1200px) {
        .table-container {
            overflow-x: auto;
        }
        
        .data-table {
            min-width: 800px; /* Ensure minimum width for all columns */
        }
    }
    
    /* On very large screens, table should fit without scrolling */
    @media (min-width: 1201px) {
        .table-container {
            overflow-x: visible;
        }
        
        .data-table {
            min-width: auto;
            width: 100%;
        }
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .table-container {
        margin: 0 -0.25rem;
        padding: 0 0.25rem;
    }
    
    .data-table {
        min-width: 950px; /* Even wider on very small screens */
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem 0.375rem;
        font-size: 0.75rem;
    }
    
    .actions {
        gap: 0.25rem;
    }
    
    .btn-sm {
        padding: 0.375rem;
        min-width: 35px;
    }
    
    .btn-sm i {
        font-size: 0.7rem;
    }
}


/* ****************************** */
/* Diesel Tracking Filter Form Responsive */



/* Diesel Request Filter Form Responsive */
.filter-form-container {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-date-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-label {
    font-weight: 600;
    color: var(--dark);
    white-space: nowrap;
    font-size: 0.9rem;
}

.filter-date-input {
    width: auto;
    min-width: 140px;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .filter-form-container {
        gap: 1rem;
        justify-content: space-between;
    }
    
    .filter-form {
        width: 100%;
        gap: 1rem;
    }
    
    .filter-date-group {
        width: 100%;
        justify-content: space-between;
    }
    
    .filter-date-input {
        min-width: 120px;
        flex: 1;
    }
    
    .filter-buttons {
        width: 100%;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .filter-buttons .btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .filter-date-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .filter-date-group > div {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .filter-label {
        min-width: 60px;
        font-size: 0.85rem;
    }
    
    .filter-date-input {
        min-width: 100px;
        flex: 1;
    }
    
    .filter-buttons {
        flex-direction: column;
    }
    
    .filter-buttons .btn {
        width: 100%;
    }
}
/* Diesel Tracking Filter Form Responsive */


/* Diesel Request Recent Requests Table Responsive */
.recent-requests-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    background: white;
}

.recent-requests-table {
    width: 100%;
    min-width: 600px; /* Minimum width for table to be readable */
    border-collapse: collapse;
    background: white;
}

.recent-requests-table th,
.recent-requests-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.recent-requests-table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.recent-requests-table tr:hover {
    background: #f8fafc;
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    .recent-requests-container {
        margin: 0 -1rem;
        padding: 0 1rem;
        border-left: none;
        border-right: none;
    }
    
    .recent-requests-table {
        min-width: 700px; /* Wider on mobile to ensure all columns are visible */
    }
    
    .recent-requests-table th,
    .recent-requests-table td {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    /* Add scroll indicators for mobile */
    .recent-requests-container::after {
        content: '→';
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--primary);
        font-size: 1.5rem;
        opacity: 0.7;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }
    
    .recent-requests-container.scrolled::after {
        content: '↔';
    }
}

@media (max-width: 480px) {
    .recent-requests-container {
        margin: 0 -0.5rem;
        padding: 0 0.5rem;
    }
    
    .recent-requests-table {
        min-width: 750px; /* Even wider on very small screens */
    }
    
    .recent-requests-table th,
    .recent-requests-table td {
        padding: 0.5rem;
        font-size: 0.75rem;
    }
    
    .status-badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Tablet specific */
@media (min-width: 769px) and (max-width: 1024px) {
    .recent-requests-container {
        overflow-x: auto;
    }
    
    .recent-requests-table {
        min-width: 100%;
    }
}

/* Scrollbar styling */
.recent-requests-container::-webkit-scrollbar {
    height: 6px;
}

.recent-requests-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.recent-requests-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.recent-requests-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Enhanced mobile table handling */
@media (max-width: 767px) {
    .table-container {
        margin: 0 -0.5rem;
        padding: 0 0.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table {
        min-width: 600px;
    }
    
    .form-grid {
        display: flex;
        flex-direction: column;
    }
    
    .card-container {
        order: 2;
    }
    
    .form-grid > .card:first-child {
        order: 1;
    }
}

/* Mobile form improvements */
@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .card {
        margin: 0.5rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* For Reserve Management */

/* Reserve Management Specific Styles */
.balance-calculation-card {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-left: 4px solid #16a34a;
    margin-bottom: 2rem;
}

/* .balance-calculation-content {
    padding: 1.5rem;
} */

.balance-calculation-content h4 {
    margin: 0 0 1rem 0;
    color: #15803d;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.balance-items {
    display: grid;
    gap: 0.75rem;
}

.balance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #dcfce7;
}

.balance-item.current-balance {
    background: #dcfce7;
    border: 2px solid #16a34a;
    padding: 1rem;
}

.balance-item.current-balance span {
    font-weight: 700;
    color: #15803d;
}

.balance-item.current-balance strong {
    color: #15803d;
    font-size: 1.3rem;
}

.added-amount {
    color: #3b82f6;
    font-size: 1.1rem;
}

.distributed-amount {
    color: #f59e0b;
    font-size: 1.1rem;
}

.info-card {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-left: 4px solid #0369a1;
    margin-bottom: 2rem;
}

.info-card-content {
    padding: 1.5rem;
}

.info-card-content h4 {
    margin: 0 0 1rem 0;
    color: #075985;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.guide-items {
    display: grid;
    gap: 1rem;
}

.guide-item {
    display: flex;
    align-items: start;
    gap: 1rem;
}

.guide-icon {
    background: #0369a1;
    color: white;
    padding: 0.5rem;
    border-radius: 6px;
    min-width: 30px;
    text-align: center;
}

.guide-icon.add-icon {
    background: #0369a1;
}

.guide-icon.distribute-icon {
    background: #f59e0b;
}

.guide-item strong {
    color: #075985;
    display: block;
    margin-bottom: 0.25rem;
}

.guide-item p {
    margin: 0;
    color: #0c4a6e;
    font-size: 0.9rem;
}

/* Form styles */
.form-hint {
    color: var(--secondary);
    font-size: 0.85rem;
    /* margin-top: 0.5rem; */
    display: block;
}

.form-error {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: none;
}

.reserve-info {
    color: #d97706;
}

/* Status display */
.status-display {
    padding: 0.75rem;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    display: none;
    border: 1px solid;
    transition: all 0.3s ease;
}

.status-display.active {
    display: block;
}

.no-status-placeholder {
    padding: 0.75rem;
    border: 1px dashed #d1d5db;
    border-radius: 6px;
    text-align: center;
    color: #9ca3af;
}

/* Owner Image styles */
.owner-image-container {
    padding: 1.5rem;
    text-align: center;
}

.owner-image {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    border: 2px solid var(--border);
}

.owner-image-caption {
    margin-top: 0.5rem;
    font-weight: 600;
}

.no-owner-image {
    padding: 2rem;
    color: var(--secondary);
}

.no-owner-image i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Reserve Overview styles */
.reserve-overview {
    padding: 1.5rem;
}

.balance-display {
    text-align: center;
    margin-bottom: 1.5rem;
}

.balance-display h2 {
    color: #10b981;
    margin: 0;
    font-size: 2.5rem;
}

.balance-display p {
    color: var(--secondary);
    margin: 0.5rem 0 0 0;
}

.overview-stats {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.overview-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
}

.added-stat {
    color: #3b82f6;
}

.distributed-stat {
    color: #f59e0b;
}

.usage-section {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.usage-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.usage-bar {
    background: #e5e7eb;
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
}

.usage-fill {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    height: 100%;
}

/* Transaction History styles */
.export-button-container {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.history-table-container {
    max-height: 600px;
    overflow-y: auto;
}

.time-text {
    color: var(--secondary);
}

.pagination-container {
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.record-count {
    color: var(--secondary);
}

.pagination-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.history-summary {
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.current-balance-summary {
    font-weight: 600;
    color: #10b981;
}

.no-transactions {
    text-align: center;
    padding: 3rem;
    color: var(--secondary);
}

.no-transactions i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.transaction-hint {
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.transaction-action {
    margin-top: 1.5rem;
}

/* Status badge styles */
.status-badge.status-due {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.status-active {
    background: #d1fae5;
    color: #065f46;
}

/* Status color classes */
.status-active-bg {
    background-color: #d1fae5;
    color: #065f46;
    border-color: #10b981;
}

.status-expiring-bg {
    background-color: #fef3c7;
    color: #92400e;
    border-color: #f59e0b;
}

.status-upcoming-bg {
    background-color: #dbeafe;
    color: #1e40af;
    border-color: #3b82f6;
}

.status-inactive-bg {
    background-color: #fee2e2;
    color: #991b1b;
    border-color: #ef4444;
}

.status-unknown-bg {
    background-color: #f3f4f6;
    color: #6b7280;
    border-color: #9ca3af;
}





/* Header */
/* Add to style.css - Dropdown specific styles */

/* Dropdown container */
.nav-dropdown {
    position: relative;
    margin-bottom: 0.5rem;
}

/* Dropdown toggle button */
.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    color: #cbd5e1;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    padding: 0.875rem 1rem;
    text-align: left;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-dropdown-toggle:hover {
    background: var(--primary);
    color: white;
    transform: translateX(5px);
}

.nav-dropdown.active .nav-dropdown-toggle {
    background: var(--primary);
    color: white;
    transform: translateX(5px);
}

/* Dropdown icon */
.dropdown-icon {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

.nav-dropdown.active .dropdown-icon {
    transform: rotate(180deg);
}

/* Dropdown content */
.nav-dropdown-content {
    display: none;
    padding-left: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    animation: slideDown 0.3s ease;
}

.nav-dropdown.active .nav-dropdown-content {
    display: block;
}

/* Nested nav items in dropdown */
.nav-dropdown-content .nav-item {
    padding: 0.75rem 1rem;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    border-left: 2px solid transparent;
    transition: all 0.3s ease;
}

.nav-dropdown-content .nav-item:hover,
.nav-dropdown-content .nav-item.active {
    background: rgba(37, 99, 235, 0.3);
    color: white;
    border-left-color: white;
    transform: translateX(3px);
}

/* Animation for dropdown */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 300px;
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .nav-dropdown-content {
        padding-left: 1.5rem;
    }
    
    .nav-dropdown-content .nav-item {
        padding: 0.625rem 0.875rem;
        font-size: 0.85rem;
    }
    
    .nav-dropdown-toggle {
        padding: 0.75rem;
    }
}

/* /////////////////////// */
/* Mobile dropdown improvements */
@media (max-width: 768px) {
    /* Make dropdown toggle easier to tap on mobile */
    .nav-dropdown-toggle {
        padding: 1rem;
        font-size: 1rem;
    }
    
    /* Make dropdown items easier to tap */
    .nav-dropdown-content .nav-item {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }
    
    /* Make dropdown arrow more visible */
    .dropdown-icon {
        font-size: 1rem;
        margin-left: auto;
        padding-left: 1rem;
    }
    
    /* Don't close sidebar when interacting with dropdowns */
    .nav-dropdown.active {
        background: rgba(37, 99, 235, 0.1);
        border-radius: 8px;
        margin: 0.5rem 0;
    }
    
    .nav-dropdown-content {
        background: rgba(255, 255, 255, 0.08);
        border-left: 2px solid var(--primary);
        margin: 0.5rem 0;
    }
    
    /* Prevent sidebar close when clicking in dropdown area */
    .nav-dropdown * {
        pointer-events: auto !important;
    }
}

/* Desktop hover improvements */
@media (min-width: 769px) {
    .nav-dropdown:hover .nav-dropdown-toggle {
        background: var(--primary);
        color: white;
        transform: translateX(5px);
    }
    
    .nav-dropdown:hover .nav-dropdown-content {
        display: block;
    }
}



/* Take Image From Mobile */
/* Camera modal styles */
#cameraModal video {
    transform: scaleX(1); /* Normal orientation */
}

#cameraModal .btn {
    transition: all 0.3s ease;
}

#cameraModal .btn:hover {
    transform: translateY(-2px);
}

#cameraModal .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

/* Image preview controls */
#imagePreviewContainer .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #cameraModal > div {
        width: 95%;
        padding: 1rem;
    }
    
    .camera-controls {
        flex-wrap: wrap;
    }
    
    .camera-controls button {
        flex: 1;
        min-width: 120px;
    }
}

/* Mobile reordering for departments.php */
@media (max-width: 768px) {
    .form-grid {
        display: flex;
        flex-direction: column;
    }
    
    /* Departments List (originally second) - Show below on mobile */
    .form-grid > .card:nth-child(2) {
        order: 2;
    }
    
    /* Add New Department (originally first) - Show above on mobile */
    .form-grid > .card:first-child {
        order: 1;
    }
}