/* Custom Styles for PacoB Collect */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-color: #1f2937;
    --light-color: #f3f4f6;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 0;
    border-radius: 0.5rem;
    width: 95%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

@media (max-width: 640px) {
    .modal-content {
        width: 98%;
        max-height: 95vh;
        border-radius: 0.375rem;
    }
}

.modal-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
}

@media (min-width: 640px) {
    .modal-header {
        padding: 1rem 1.25rem;
    }
    .modal-header h2 {
        font-size: 1.125rem;
    }
}

.modal-body {
    padding: 0.75rem 1rem;
}

@media (min-width: 640px) {
    .modal-body {
        padding: 1rem 1.25rem;
    }
}

.modal-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .modal-footer {
        padding: 1rem 1.25rem;
        gap: 0.75rem;
    }
}

.close {
    color: #9ca3af;
    font-size: 1.25rem;
    font-weight: bold;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.2s;
}

.close:hover,
.close:focus {
    color: #000;
}

.close:hover,
.close:focus {
    color: #000;
}

.loading {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f4f6;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.alert {
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.table-responsive {
    overflow-x: auto;
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
}

/* GPS Location Indicator */
.gps-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.gps-status.active {
    background-color: #d1fae5;
    color: #065f46;
}

.gps-status.inactive {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Stats Cards */
.stat-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.stat-label {
    color: #6b7280;
    font-size: 0.75rem;
    margin-top: 0.375rem;
    font-weight: 500;
}

/* Logo Styles */
.app-logo {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.app-logo:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

.logo-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    border-radius: 50%;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 0.375rem;
    transition: all 0.3s ease;
}

.logo-container:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

/* Enhanced Button Styles */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Enhanced Input Styles */
.form-input {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input:hover {
    border-color: #9ca3af;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Table Enhancements */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background-color: #f9fafb;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.table td {
    padding: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    color: #6b7280;
}

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

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Sidebar Logo Styles */
.logo-container-sidebar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    border-radius: 50%;
    box-shadow: 0 4px 10px -2px rgba(0, 0, 0, 0.3);
    padding: 0.375rem;
    transition: all 0.3s ease;
}

.app-logo-sidebar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.logo-container-sidebar:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px -3px rgba(0, 0, 0, 0.4);
}

/* Enhanced Sidebar Navigation Styles */
.nav-link {
    position: relative;
    transition: all 0.2s ease;
}

.nav-link:hover {
    transform: translateX(2px);
}

.nav-link.active,
.nav-link[aria-current="page"] {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

/* Sidebar Icon Enhancements */
.sidebar-icon {
    transition: transform 0.2s ease;
}

.nav-link:hover .sidebar-icon {
    transform: scale(1.1);
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .stat-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .app-logo,
    .logo-container {
        width: 44px;
        height: 44px;
    }
    
    .logo-container-sidebar {
        width: 36px;
        height: 36px;
    }
}

/* Footer Styles */
#mainFooter {
    transition: margin-left 0.3s ease-in-out;
}

@media (max-width: 1023px) {
    #mainFooter {
        margin-left: 0 !important;
    }
}
