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

body {
    font-family: 'Sarabun', 'Kanit', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

/* Login Section Styles */
.login-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    text-align: center;
}

.login-header h1 {
    color: #667eea;
    font-size: 1.8rem;
    margin: 15px 0 10px 0;
    font-weight: 600;
}

.login-header i {
    font-size: 3rem;
    color: #667eea;
}

.login-header p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1rem;
}

.login-form .form-group {
    text-align: left;
    margin-bottom: 25px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.login-form input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.login-form input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.login-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
}

.login-info p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

/* Header with User Info */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header-left h1 {
    font-size: 2.2rem;
    margin-bottom: 5px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.current-user {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    color: white;
    font-size: 0.9rem;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .header-left h1 {
        font-size: 1.8rem;
    }
    
    .header-right {
        justify-content: center;
    }
    
    .login-card {
        padding: 30px 20px;
    }
    
    .login-header h1 {
        font-size: 1.5rem;
    }
}

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

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Navigation */
nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    backdrop-filter: blur(10px);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.nav-btn.active {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}

/* Sections */
.section {
    display: none;
}

.section.active {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.card h2 {
    color: #333;
    margin-bottom: 25px;
    font-size: 1.8rem;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    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 3px rgba(102, 126, 234, 0.1);
}

/* Searchable drug inputs */
.form-group input[list] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px 12px;
    appearance: none;
    padding-right: 40px;
}

.form-group input[list]:focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23667eea' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.9rem;
}

/* Form Validation Styles */
.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: #dc3545;
    background-color: #fff5f5;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-group.has-error label {
    color: #dc3545;
}

.error-message {
    display: block;
    margin-top: 5px;
    color: #dc3545;
    font-size: 0.875rem;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success validation state */
.form-group.has-success input,
.form-group.has-success select,
.form-group.has-success textarea {
    border-color: #28a745;
    background-color: #f8fff9;
}

.form-group.has-success label {
    color: #28a745;
}

.form-help {
    font-style: italic;
    color: #888;
}

.optional {
    color: #999;
    font-weight: normal;
    font-size: 0.9rem;
}

/* Buttons */
.submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.load-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.load-btn:hover {
    background: #218838;
}

/* Dashboard Styles */
.dashboard-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    align-items: center;
}

.dashboard-controls select {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    background: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border-left: 4px solid #667eea;
}

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

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

/* Table Styles */
.data-table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
    position: sticky;
    top: 0;
}

table tbody tr:hover {
    background: #f8f9fa;
}

table tbody tr.my-report {
    background-color: #e3f2fd !important;
    border-left: 3px solid #2196f3;
}

table tbody tr.my-report:hover {
    background-color: #bbdefb !important;
}

.table-legend {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid #ddd;
}

.legend-color.my-report {
    background-color: #e3f2fd;
    border-color: #2196f3;
}

.no-data {
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Severity badges */
.severity-low { background: #d4edda; color: #155724; padding: 4px 8px; border-radius: 4px; }
.severity-medium { background: #fff3cd; color: #856404; padding: 4px 8px; border-radius: 4px; }
.severity-high { background: #f8d7da; color: #721c24; padding: 4px 8px; border-radius: 4px; }
.severity-critical { background: #d1ecf1; color: #0c5460; padding: 4px 8px; border-radius: 4px; }

/* Setup Instructions */
.setup-instructions {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.setup-instructions h3 {
    color: #333;
    margin-bottom: 15px;
}

.setup-instructions ol {
    margin-left: 20px;
}

.setup-instructions li {
    margin-bottom: 8px;
    color: #555;
}

.setup-instructions a {
    color: #667eea;
    text-decoration: none;
}

.setup-instructions a:hover {
    text-decoration: underline;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    color: white;
    font-weight: 600;
    z-index: 1000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: #28a745;
}

.notification.error {
    background: #dc3545;
}

.notification.info {
    background: #17a2b8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 2rem;
    }

    .nav-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .card {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }

    .dashboard-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-controls select {
        width: 100%;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    .card {
        padding: 15px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 0.9rem;
    }

    table th,
    table td {
        padding: 8px;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Drug List Styles */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.section-header h2 {
    color: #333;
    margin: 0;
}

.filter-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.filter-section .form-row {
    gap: 15px;
}

.filter-section input,
.filter-section select {
    margin-bottom: 0;
}

.table-container {
    overflow-x: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
    position: sticky;
    top: 0;
    z-index: 10;
}

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

.data-table td:last-child {
    text-align: center;
}

/* Tags and Status Indicators */
.tag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}

.tag-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.tag-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.tag-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.tag-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.tag-secondary {
    background: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

/* Button Sizes */
.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    margin: 0 2px;
}

/* Responsive Table */
@media (max-width: 768px) {
    .data-table {
        font-size: 0.8rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 6px;
    }
    
    .btn-sm {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-section .form-row {
        flex-direction: column;
    }
}

/* Text Utilities */
.text-center {
    text-align: center;
}

.text-muted {
    color: #6c757d;
}

/* ===== ENHANCED DASHBOARD ANALYTICS STYLES ===== */

/* Enhanced Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.stat-card {
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

.stat-card.primary { border-left: 5px solid #007bff; }
.stat-card.success { border-left: 5px solid #28a745; }
.stat-card.info { border-left: 5px solid #17a2b8; }
.stat-card.warning { border-left: 5px solid #ffc107; }
.stat-card.secondary { border-left: 5px solid #6c757d; }
.stat-card.trend { border-left: 5px solid #e83e8c; }

.stat-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.stat-card.primary .stat-icon { background: linear-gradient(45deg, #007bff, #0056b3); }
.stat-card.success .stat-icon { background: linear-gradient(45deg, #28a745, #1e7e34); }
.stat-card.info .stat-icon { background: linear-gradient(45deg, #17a2b8, #117a8b); }
.stat-card.warning .stat-icon { background: linear-gradient(45deg, #ffc107, #e0a800); }
.stat-card.secondary .stat-icon { background: linear-gradient(45deg, #6c757d, #545b62); }
.stat-card.trend .stat-icon { background: linear-gradient(45deg, #e83e8c, #d91a72); }

.stat-content h3 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 2.8rem;
    font-weight: bold;
    color: #333;
    margin: 5px 0;
    font-family: 'Arial', sans-serif;
}

.stat-description {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

/* Analytics Section */
.analytics-section {
    margin: 40px 0;
}

.section-header {
    margin-bottom: 25px;
    text-align: center;
}

.section-header h3 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.section-header p {
    color: #6c757d;
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.analytics-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease;
}

.analytics-card:hover {
    transform: translateY(-3px);
}

.analytics-card.full-width {
    grid-column: 1 / -1;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.card-header h4 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-actions {
    display: flex;
    gap: 10px;
}

.btn-icon {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: #6c757d;
}

.btn-icon:hover {
    background: #e9ecef;
    color: #333;
}

.chart-container {
    position: relative;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}

.chart-container.large {
    height: 350px;
}

.chart-container canvas {
    max-width: 100%;
    max-height: 100%;
}

.chart-summary {
    display: flex;
    justify-content: space-around;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-top: 15px;
}

.summary-item {
    text-align: center;
}

.summary-item .label {
    display: block;
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 5px;
    font-weight: 600;
}

.summary-item .value {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

/* Time Distribution */
.time-distribution {
    padding: 20px 0;
}

.time-slot {
    margin-bottom: 20px;
}

.time-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.time-label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.time-count {
    font-weight: bold;
    color: #007bff;
    font-size: 16px;
}

.time-bar {
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin-bottom: 5px;
}

.time-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

.time-fill.morning {
    background: linear-gradient(90deg, #28a745, #20c997);
}

.time-fill.afternoon {
    background: linear-gradient(90deg, #ffc107, #fd7e14);
}

.time-fill.night {
    background: linear-gradient(90deg, #6f42c1, #e83e8c);
}

.time-percentage {
    font-size: 12px;
    color: #6c757d;
    text-align: right;
}

/* Location Ranking */
.location-ranking {
    padding: 20px 0;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #007bff;
    transition: background 0.2s;
}

.ranking-item:hover {
    background: #e9ecef;
}

.rank-badge {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
    font-size: 14px;
}

.location-info {
    flex: 1;
}

.location-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.location-count {
    font-size: 12px;
    color: #6c757d;
}

/* Trend Insights */
.trend-insights {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-top: 20px;
}

.insight-item {
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.insight-item i {
    font-size: 18px;
}

.text-danger { color: #dc3545; }
.text-success { color: #28a745; }
.text-info { color: #17a2b8; }

/* Enhanced Data Table */
.data-table-section {
    margin: 40px 0;
}

.table-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.search-input {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 14px;
    width: 250px;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #007bff;
}

.page-size-select {
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
}

.export-table-btn, .export-btn {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.export-table-btn:hover, .export-btn:hover {
    transform: translateY(-2px);
}

.data-table-container {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

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

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

.data-table th {
    background: linear-gradient(135deg, #495057, #343a40);
    color: white;
    padding: 15px 10px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.data-table th.sortable:hover {
    background: linear-gradient(135deg, #343a40, #23272b);
}

.data-table th span {
    display: inline-block;
    margin-right: 5px;
}

.data-table th i {
    font-size: 12px;
    opacity: 0.7;
}

.data-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

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

.data-table tbody tr.my-report {
    background: linear-gradient(135deg, #e3f2fd, #f3f9ff);
    border-left: 4px solid #007bff;
}

.data-table tbody tr.high-priority {
    background: linear-gradient(135deg, #ffebee, #fff5f5);
    border-left: 4px solid #dc3545;
}

.no-data {
    text-align: center;
    padding: 60px 20px;
}

.no-data-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: #6c757d;
}

.no-data-content i {
    font-size: 3rem;
    color: #dee2e6;
}

.no-data-content p {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.no-data-content small {
    font-size: 14px;
}

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

.pagination-info {
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
}

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

.pagination-btn {
    padding: 8px 16px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

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

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

.page-numbers {
    display: flex;
    gap: 5px;
}

.page-number {
    padding: 8px 12px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.page-number:hover {
    background: #e9ecef;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .insights-grid {
        grid-template-columns: 1fr;
    }
    
    .table-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-input {
        width: 100%;
    }
    
    .trend-insights {
        flex-direction: column;
        gap: 15px;
    }
    
    .table-pagination {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .pagination-controls {
        justify-content: center;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .chart-summary {
        flex-direction: column;
        gap: 10px;
    }
}

/* Action Buttons */
.btn-view {
    background: linear-gradient(45deg, #17a2b8, #138496);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
}

.btn-view:hover {
    background: linear-gradient(45deg, #138496, #117a8b);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.btn-view i {
    font-size: 14px;
}
