/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Screens */
.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* Login Screen */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-form h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #333;
}

/* Change Password Screen */
.change-password-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    max-width: 500px;
    margin: 2rem auto;
}

.warning {
    background: #fff3cd;
    color: #856404;
    padding: 0.75rem;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    margin-bottom: 1rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.25);
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

/* Navigation */
.navbar {
    background: white;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-brand h1 {
    color: #667eea;
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #555;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
    background: #667eea;
    color: white;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-user span {
    font-weight: 600;
    color: #555;
}

/* Main Content */
.main-content {
    padding: 2rem;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
}

.stat-number.overdue {
    color: #dc3545;
}

/* Filters */
.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.filters select {
    max-width: 200px;
}

.admin-filter {
    transition: opacity 0.3s ease;
}

.admin-filter.hidden {
    display: none;
}

/* Tasks and Lists */
.tasks-list,
.proposals-list,
.users-list {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.task-item,
.proposal-item,
.user-item {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
}

.task-item:last-child,
.proposal-item:last-child,
.user-item:last-child {
    border-bottom: none;
}

.task-item:hover,
.proposal-item:hover,
.user-item:hover {
    background-color: #f8f9fa;
}

.task-header,
.proposal-header,
.user-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.task-title,
.proposal-title,
.user-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 0.25rem;
}

.task-meta,
.proposal-meta,
.user-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-in_progress {
    background: #cce5ff;
    color: #004085;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.priority-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.priority-urgent {
    background: #dc3545;
    color: white;
}

.priority-high {
    background: #fd7e14;
    color: white;
}

.priority-medium {
    background: #ffc107;
    color: #212529;
}

.priority-low {
    background: #6c757d;
    color: white;
}

.task-actions,
.proposal-actions,
.user-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.task-actions .btn,
.proposal-actions .btn,
.user-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

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

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

/* Error Messages */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 0.75rem;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    margin-bottom: 1rem;
    display: none;
}

.error-message.show {
    display: block;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 0.75rem;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
    margin-bottom: 1rem;
    display: none;
}

.success-message.show {
    display: block;
}

/* Loading States */
.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

/* Statistics Styles */
.statistics-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stat-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stat-section h3 {
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.3rem;
}

.stat-section .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-section .stat-card h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.stat-number.pending {
    color: #856404;
}

.stat-number.in-progress {
    color: #004085;
}

.stat-number.completed {
    color: #155724;
}

.stat-number.cancelled {
    color: #721c24;
}

.performance-summary {
    display: grid;
    gap: 1rem;
}

.performance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.performance-label {
    font-weight: 600;
    color: #333;
}

.performance-value {
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: white;
}

.performance-value.normal {
    background: #6c757d;
}

.performance-value.high {
    background: #dc3545;
}

.performance-value.good {
    background: #28a745;
}

.performance-value.poor {
    background: #dc3545;
}

/* Status badges for proposals */
.status-under_review {
    background: #cce5ff;
    color: #004085;
}

.status-approved {
    background: #d4edda;
    color: #155724;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

/* Task Detail Modal Styles */
.task-detail {
    max-width: 800px;
    margin: 0 auto;
}

.task-info h3 {
    margin-bottom: 1rem;
    color: #333;
}

.task-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.task-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.task-section:last-child {
    border-bottom: none;
}

.task-section h4 {
    margin-bottom: 0.5rem;
    color: #555;
    font-size: 1.1rem;
}

.task-section p {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

/* Task Logs Styles */
.task-logs {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #ddd;
}

.logs-container {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 5px;
    padding: 1rem;
    background: #f9f9f9;
}

.log-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ddd;
}

.log-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.log-date {
    font-size: 0.85rem;
    color: #666;
}

.log-action {
    font-weight: 500;
    color: #0066cc;
    margin-bottom: 0.25rem;
}

.log-change {
    font-size: 0.9rem;
    color: #333;
    margin-bottom: 0.25rem;
}

.log-notes {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

.no-logs {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 1rem;
}

/* Task Actions in Modal */
.task-actions-modal {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.task-actions-modal .btn {
    min-width: 120px;
}

/* Reassign Form Styles */
.reassign-info {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #f0f8ff;
    border-left: 4px solid #0066cc;
    border-radius: 4px;
}

.reassign-info p {
    margin: 0;
}

/* Form improvements for modal */
.form-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Button spacing in forms */
.btn + .btn {
    margin-left: 0.5rem;
}

/* Department Management Styles */
.departments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.department-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    transition: box-shadow 0.2s ease;
}

.department-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.department-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.department-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.5rem;
}

.department-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.9rem;
    color: #666;
}

.department-meta span {
    display: block;
}

.department-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.department-actions .btn {
    min-width: 80px;
}

/* Admin sections spacing */
.admin-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #eee;
}

.admin-section:last-child {
    border-bottom: none;
}

/* Proposal Detail Modal Styles */
.proposal-detail {
    max-width: 100%;
}

.proposal-info {
    margin-bottom: 2rem;
}

.proposal-info h3 {
    margin: 0 0 1rem 0;
    color: #333;
}

.proposal-meta {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.proposal-section {
    margin-bottom: 1.5rem;
}

.proposal-section h4 {
    margin: 0 0 0.5rem 0;
    color: #555;
    font-size: 1.1rem;
}

.proposal-section p {
    margin: 0.25rem 0;
    line-height: 1.5;
}

.proposal-logs {
    border-top: 1px solid #eee;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

.proposal-logs h4 {
    margin: 0 0 1rem 0;
    color: #555;
}

.proposal-actions {
    border-top: 1px solid #eee;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.proposal-actions select {
    min-width: 200px;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% {
        color: rgba(0,0,0,0);
        text-shadow:
            .25em 0 0 rgba(0,0,0,0),
            .5em 0 0 rgba(0,0,0,0);
    }
    40% {
        color: #666;
        text-shadow:
            .25em 0 0 rgba(0,0,0,0),
            .5em 0 0 rgba(0,0,0,0);
    }
    60% {
        text-shadow:
            .25em 0 0 #666,
            .5em 0 0 rgba(0,0,0,0);
    }
    80%, 100% {
        text-shadow:
            .25em 0 0 #666,
            .5em 0 0 #666;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .tab-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .task-header,
    .proposal-header,
    .user-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .task-meta,
    .proposal-meta,
    .user-meta {
        flex-wrap: wrap;
    }
}

/* Webhook Settings Styles */
.webhook-settings {
    margin-top: 20px;
}

.webhook-settings .form-group {
    margin-bottom: 15px;
}

.webhook-settings label {
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
    color: #333;
}

.webhook-settings input[type="url"],
.webhook-settings input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.webhook-settings .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
}

.webhook-settings .checkbox-label input[type="checkbox"] {
    margin: 0;
}

.webhook-info {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    margin-top: 20px;
}

.webhook-info p {
    margin: 0 0 10px 0;
    font-size: 14px;
}

.webhook-info ul {
    margin: 10px 0;
    padding-left: 20px;
}

.webhook-info li {
    font-size: 14px;
    margin-bottom: 5px;
}

/* Zalo Settings Styles */
.zalo-settings {
    margin-top: 20px;
}

.zalo-settings .form-group {
    margin-bottom: 15px;
}

.zalo-settings label {
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
    color: #333;
}

.zalo-settings h4 {
    margin: 20px 0 10px 0;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.zalo-settings input[type="text"],
.zalo-settings input[type="password"],
.zalo-settings textarea {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
}

.zalo-settings .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
}

.zalo-settings .checkbox-label input[type="checkbox"] {
    margin: 0;
}

.zalo-info {
    background-color: #e8f4fd;
    border: 1px solid #bee5eb;
    border-radius: 4px;
    padding: 15px;
    margin-top: 20px;
}

.zalo-info p {
    margin: 0 0 10px 0;
    font-size: 14px;
}

.zalo-info ul {
    margin: 10px 0;
    padding-left: 20px;
}

.zalo-info li {
    font-size: 14px;
    margin-bottom: 5px;
    font-family: monospace;
}

 
/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: 0.3s;
}

/* Admin tabs */
.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e0e0e0;
    overflow-x: auto;
}

.admin-tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.admin-tab-btn:hover {
    color: #3498db;
    background-color: #f8f9fa;
}

.admin-tab-btn.active {
    color: #3498db;
    border-bottom-color: #3498db;
    background-color: #f8f9fa;
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
}

/* Responsive navigation */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: #2c3e50;
        flex-direction: column;
        gap: 0;
        transition: left 0.3s ease;
        z-index: 1000;
        padding: 1rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        width: 100%;
        padding: 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        text-align: center;
    }
    
    .nav-user {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-container {
        padding: 0 0.5rem;
    }
    
    .nav-brand h1 {
        font-size: 1.2rem;
    }
    
    .admin-tabs {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .admin-tab-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
} 

/* Modern Data Table Styles */
.table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 20px 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.data-table th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}

.data-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

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

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

.data-table td {
    padding: 16px 12px;
    vertical-align: middle;
    border: none;
}

.data-table .task-title,
.data-table .proposal-title {
    font-weight: 600;
    color: #2c3e50;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.data-table .task-description,
.data-table .proposal-description {
    color: #7f8c8d;
    font-size: 12px;
    margin-top: 4px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Status and Priority Badges */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    min-width: 80px;
    text-align: center;
}

.priority-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    min-width: 60px;
    text-align: center;
}

/* Status Colors */
.status-pending { background: #fff3cd; color: #856404; }
.status-in_progress { background: #d1ecf1; color: #0c5460; }
.status-completed { background: #d4edda; color: #155724; }
.status-cancelled { background: #f8d7da; color: #721c24; }

/* Priority Colors */
.priority-low { background: #e8f5e8; color: #2d5a2d; }
.priority-medium { background: #fff3cd; color: #856404; }
.priority-high { background: #f8d7da; color: #721c24; }
.priority-urgent { background: #f8d7da; color: #721c24; font-weight: bold; }

/* Action Buttons */
.table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.table-actions .btn {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.table-actions .btn-primary {
    background: #007bff;
    color: white;
}

.table-actions .btn-primary:hover {
    background: #0056b3;
}

.table-actions .btn-warning {
    background: #ffc107;
    color: #212529;
}

.table-actions .btn-warning:hover {
    background: #e0a800;
}

.table-actions .btn-success {
    background: #28a745;
    color: white;
}

.table-actions .btn-success:hover {
    background: #1e7e34;
}

.table-actions .btn-danger {
    background: #dc3545;
    color: white;
}

.table-actions .btn-danger:hover {
    background: #c82333;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.pagination-info {
    margin-right: 20px;
    color: #6c757d;
    font-size: 14px;
}

.pagination-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    background: white;
    color: #007bff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    text-decoration: none;
}

.pagination-btn:hover:not(:disabled) {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination-page {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    background: white;
    color: #007bff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    margin: 0 2px;
}

.pagination-page:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination-page.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* Responsive Table */
@media (max-width: 768px) {
    .table-container {
        overflow-x: auto;
    }
    
    .data-table {
        min-width: 800px;
    }
    
    .data-table th,
    .data-table td {
        padding: 12px 8px;
        font-size: 12px;
    }
    
    .table-actions {
        flex-direction: column;
        gap: 4px;
    }
    
    .table-actions .btn {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .pagination {
        flex-direction: column;
        gap: 10px;
    }
    
    .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 8px;
    color: #495057;
}

.empty-state p {
    margin-bottom: 20px;
}

/* Loading State */
.table-loading {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.table-loading .spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
} 

/* Dashboard Tables */
.dashboard-tables {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 30px;
}

.dashboard-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
}

.section-header h3 {
    margin: 0;
    color: #495057;
    font-size: 18px;
    font-weight: 600;
}

.view-all-link {
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.view-all-link:hover {
    background: #007bff;
    color: white;
    text-decoration: none;
}

.dashboard-section .table-container {
    margin: 0;
    box-shadow: none;
    border-radius: 0;
}

.dashboard-section .data-table {
    font-size: 13px;
}

.dashboard-section .data-table th {
    padding: 12px 8px;
    font-size: 12px;
}

.dashboard-section .data-table td {
    padding: 12px 8px;
    font-size: 12px;
}

.dashboard-section .table-actions .btn {
    padding: 4px 8px;
    font-size: 11px;
}

/* Responsive Dashboard */
@media (max-width: 768px) {
    .dashboard-tables {
        gap: 20px;
    }
    
    .section-header {
        padding: 16px 20px;
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .section-header h3 {
        font-size: 16px;
    }
    
    .dashboard-section .data-table {
        min-width: 600px;
    }
} 

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e9ecef;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 8px 0;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 8px 4px;
    text-decoration: none;
    color: #6c757d;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin: 0 4px;
}

.bottom-nav-item:hover {
    color: #007bff;
    background: #f8f9fa;
    text-decoration: none;
}

.bottom-nav-item.active {
    color: #007bff;
    background: #e3f2fd;
}

.nav-icon {
    font-size: 20px;
    margin-bottom: 4px;
    display: block;
}

.nav-label {
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

/* Hide desktop nav on mobile */
@media (max-width: 768px) {
    .navbar {
        display: none;
    }
    
    .mobile-bottom-nav {
        display: flex;
    }
    
    .main-content {
        padding-bottom: 80px; /* Space for bottom nav */
    }
    
    /* Adjust container padding for mobile */
    .container {
        padding: 16px;
    }
    
    /* Make tables scrollable on mobile */
    .table-container {
        overflow-x: auto;
    }
    
    .data-table {
        min-width: 600px;
    }
    
    /* Adjust dashboard tables for mobile */
    .dashboard-tables {
        gap: 20px;
    }
    
    .dashboard-section .data-table {
        min-width: 500px;
    }
}

/* Mobile-specific adjustments */
@media (max-width: 480px) {
    .bottom-nav-item {
        padding: 6px 2px;
        margin: 0 2px;
    }
    
    .nav-icon {
        font-size: 18px;
    }
    
    .nav-label {
        font-size: 10px;
    }
    
    .container {
        padding: 12px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-card h3 {
        font-size: 12px;
    }
    
    .stat-number {
        font-size: 18px;
    }
} 

/* Statistics Styles */
.statistics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.statistics-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.statistics-controls .form-control {
    min-width: 150px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
}

.statistics-section {
    margin-bottom: 32px;
}

.stats-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stats-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.stats-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 20px;
}

.stats-card-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.stats-card-content {
    padding: 20px;
}

.stats-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.metric-label {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 4px;
    font-weight: 500;
}

.metric-value {
    font-size: 24px;
    font-weight: 700;
    color: #495057;
}

.metric-value.overdue {
    color: #dc3545;
}

.stats-progress {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.progress-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-label {
    min-width: 140px;
    font-size: 14px;
    color: #495057;
    font-weight: 500;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-value {
    min-width: 50px;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    text-align: right;
}

/* Department and User Statistics Tables */
.statistics-section h3 {
    margin-bottom: 16px;
    color: #495057;
    font-size: 20px;
    font-weight: 600;
}

.statistics-section .data-table {
    margin-top: 16px;
}

.statistics-section .data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.statistics-section .data-table td {
    vertical-align: middle;
}

/* Loading and Error States */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #6c757d;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e9ecef;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .statistics-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .statistics-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .statistics-controls .form-control {
        min-width: auto;
    }
    
    .stats-overview-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .stats-metrics {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .metric-value {
        font-size: 20px;
    }
    
    .progress-item {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .progress-label {
        min-width: auto;
    }
    
    .progress-value {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .stats-metrics {
        grid-template-columns: 1fr;
    }
    
    .statistics-controls {
        gap: 8px;
    }
    
    .stats-card-content {
        padding: 16px;
    }
    
    .stats-card-header {
        padding: 12px 16px;
    }
    
    .stats-card-header h3 {
        font-size: 16px;
    }
} 