/* ====================== GLOBAL STYLES ====================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ====================== HEADER ====================== */
header {
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #fff, #e3f2fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-info span {
    font-weight: 600;
    font-size: 1.1rem;
}

/* ====================== MAIN CONTENT ====================== */
main {
    flex: 1;
    padding: 2rem;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

.flash-messages {
    margin-bottom: 2rem;
}

.flash {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease;
}
.login-error {
    margin-top: 1rem;
    padding: 0.8rem 1rem;
    background: #ffebee;
    color: #b71c1c;
    border-left: 4px solid #f44336;
    border-radius: 6px;
}


.flash:last-child {
    margin-bottom: 0;
}

/* ====================== ADMIN CONTAINER ====================== */
.admin-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

/* ====================== ADMIN TABS ====================== */
.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 3px solid #1a237e;
    margin-bottom: 2.5rem;
    padding-bottom: 8px;
}

.tab-btn {
    background: linear-gradient(135deg, #e8eaf6 0%, #c5cae9 100%);
    color: #5c6bc0;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 15px 15px 0 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.tab-btn:hover::before {
    left: 100%;
}

.tab-btn:hover {
    background: linear-gradient(135deg, #c5cae9 0%, #9fa8da 100%);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 25px rgba(92, 107, 192, 0.3);
}

.tab-btn.active {
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    color: white;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(26, 35, 126, 0.4);
}

.tab-content {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    min-height: 500px;
}

.tab-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.6s ease;
}

/* ====================== SECTION HEADER ====================== */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    border-radius: 20px;
    color: white;
    box-shadow: 0 15px 35px rgba(26, 35, 126, 0.3);
    position: relative;
    overflow: hidden;
}

.section-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

.section-header h2 {
    margin: 0;
    font-size: 2.8rem;
    font-weight: 800;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}

.section-subtitle {
    margin: 1rem 0 0 0;
    opacity: 0.9;
    font-size: 1.3rem;
    font-weight: 300;
    position: relative;
    z-index: 2;
}

/* ====================== BUTTONS ====================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 1rem 2rem;
    border: none;
    border-radius: 15px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.4s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transform: translateY(0);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(26, 35, 126, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #283593 0%, #303f9f 100%);
    box-shadow: 0 10px 30px rgba(26, 35, 126, 0.5);
}

.btn-secondary {
    background: linear-gradient(135deg, #388e3c 0%, #43a047 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(56, 142, 60, 0.4);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #43a047 0%, #4caf50 100%);
    box-shadow: 0 10px 30px rgba(56, 142, 60, 0.5);
}

.btn-accent {
    background: linear-gradient(135deg, #5e35b1 0%, #7e57c2 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(94, 53, 177, 0.4);
}

.btn-accent:hover {
    background: linear-gradient(135deg, #7e57c2 0%, #9575cd 100%);
    box-shadow: 0 10px 30px rgba(94, 53, 177, 0.5);
}

.btn-outline {
    background: transparent;
    border: 3px solid #6c757d;
    color: #6c757d;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.2);
}

.btn-outline:hover {
    background: #6c757d;
    color: white;
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #f57c00 0%, #ff9800 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(245, 124, 0, 0.4);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #ff9800 0%, #ffa726 100%);
    box-shadow: 0 10px 30px rgba(245, 124, 0, 0.5);
}

.btn-danger {
    background: linear-gradient(135deg, #d32f2f 0%, #f44336 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(211, 47, 47, 0.4);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #f44336 0%, #ef5350 100%);
    box-shadow: 0 10px 30px rgba(211, 47, 47, 0.5);
}

.btn-sm {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
}

.btn-icon {
    font-size: 1.3rem;
}

/* ====================== ON DUTY SECTION ====================== */
.refresh-controls {
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
}

.officer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.officer-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-left: 6px solid #4caf50;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    transition: all 0.4s ease;
    overflow: hidden;
}

.officer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(76, 175, 80, 0.1), transparent);
    transition: left 0.5s ease;
}

.officer-card:hover::before {
    left: 100%;
}

.officer-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.officer-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    position: relative;
}

.officer-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-icon {
    font-size: 2.5rem;
}

.officer-info h3 {
    margin: 0 0 1rem 0;
    color: #1a237e;
    font-size: 1.5rem;
    font-weight: 700;
}

.officer-stats {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.stat-label {
    font-weight: 600;
    color: #666;
    font-size: 1rem;
    min-width: 100px;
}

.stat-value {
    color: #333;
    font-weight: 500;
    font-size: 1.1rem;
}

.status-indicator {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.status-indicator.online {
    background: #4caf50;
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.3);
    animation: pulse 2s infinite;
}

.status-indicator.offline {
    background: #f44336;
    box-shadow: 0 0 0 4px rgba(244, 67, 54, 0.3);
}

/* ====================== STATS SECTION ====================== */
.stats-controls {
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: flex-end;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.stat-card.primary { border-left: 6px solid #1a237e; }
.stat-card.success { border-left: 6px solid #4caf50; }
.stat-card.warning { border-left: 6px solid #ff9800; }
.stat-card.info { border-left: 6px solid #2196f3; }
.stat-card.danger { border-left: 6px solid #f44336; }

.stat-icon {
    font-size: 3.5rem;
    opacity: 0.9;
    flex-shrink: 0;
}

.stat-content h3 {
    margin: 0 0 1rem 0;
    color: #555;
    font-size: 1.3rem;
    font-weight: 600;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, #1a237e, #283593);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card.success .stat-number { 
    background: linear-gradient(135deg, #388e3c, #4caf50);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card.warning .stat-number { 
    background: linear-gradient(135deg, #f57c00, #ff9800);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card.info .stat-number { 
    background: linear-gradient(135deg, #1976d2, #2196f3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card.danger .stat-number { 
    background: linear-gradient(135deg, #d32f2f, #f44336);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.table-section {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.table-section h3 {
    margin: 0 0 2rem 0;
    color: #1a237e;
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
}

.table-container {
    overflow-x: auto;
    border-radius: 15px;
    border: 2px solid #e9ecef;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.stats-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 800px;
}

.stats-table th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.5rem;
    text-align: left;
    font-weight: 700;
    color: #1a237e;
    border-bottom: 3px solid #1a237e;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
}

.stats-table td {
    padding: 1.5rem;
    border-bottom: 2px solid #f1f3f4;
    color: #555;
    font-size: 1.1rem;
    transition: background-color 0.3s ease;
}

.stats-table tr:last-child td {
    border-bottom: none;
}

.stats-table tr:hover td {
    background: linear-gradient(135deg, #f8f9fa 0%, #e3f2fd 100%);
    transform: scale(1.01);
}

.stats-table tr {
    transition: transform 0.3s ease;
}

.stats-table tr:hover {
    transform: translateX(5px);
}

.no-data {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 3rem;
    font-size: 1.2rem;
}

/* ====================== CASES SECTION ====================== */
.cases-controls {
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: flex-end;
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2rem;
}

.case-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.4s ease;
    position: relative;
}

.case-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.case-card:hover::before {
    left: 100%;
}

.case-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.case-card.deleted {
    border-left: 6px solid #f44336;
}

.case-header {
    padding: 2rem;
    border-bottom: 2px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.case-header h3 {
    margin: 0;
    color: #1a237e;
    font-size: 1.5rem;
    font-weight: 700;
}

.case-badge {
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.xử-án { 
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1976d2;
}

.bảo-lãnh { 
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    color: #7b1fa2;
}

.giao-thông { 
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    color: #388e3c;
}

.thu-xe { 
    background: linear-gradient(135deg, #fff3e0 0%, #ffccbc 100%);
    color: #f57c00;
}

.deleted-badge { 
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #d32f2f;
}

.case-body {
    padding: 2rem;
}

.case-info {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.info-label {
    font-weight: 600;
    color: #666;
    min-width: 120px;
    font-size: 1rem;
}

.info-value {
    color: #333;
    flex: 1;
    font-size: 1.1rem;
    line-height: 1.5;
}

.case-footer {
    padding: 1.5rem 2rem;
    border-top: 2px solid #eee;
    display: flex;
    justify-content: flex-end;
    background: rgba(248, 249, 250, 0.5);
}

/* ====================== DELETED CASES ====================== */
.deleted-controls {
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: flex-end;
}

.deleted-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2rem;
}

/* ====================== PERIOD STATS SECTION ====================== */
.filter-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.filter-group {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.filter-item {
    margin-bottom: 1.5rem;
}

.filter-item:last-child {
    margin-bottom: 0;
}

.filter-label {
    display: block;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.filter-select, .filter-input, .date-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    background: #f7fafc;
    transition: all 0.3s ease;
}

.filter-select:focus, .filter-input:focus, .date-input:focus {
    border-color: #4299e1;
    outline: none;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.help-text {
    background: #edf2f7;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid #4299e1;
}

.help-text p {
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    color: #2d3748;
}

.help-text ul {
    margin: 0;
    padding-left: 1.5rem;
}

.help-text li {
    margin-bottom: 0.3rem;
}

.help-text code {
    background: #e2e8f0;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
}

.results-container {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    min-height: 400px;
}

/* ====================== ERROR STATES ====================== */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #718096;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: block;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin: 0 0 1rem 0;
    color: #4a5568;
}

.empty-state p {
    font-size: 1.1rem;
    margin: 0;
}

.no-data {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 2rem;
    font-size: 1.1rem;
}

.error-state {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-left: 6px solid #f44336;
    padding: 2rem;
    border-radius: 12px;
    margin: 1rem 0;
}

.error-state h3 {
    color: #d32f2f;
    margin: 0 0 1rem 0;
}

.error-state p {
    color: #b71c1c;
    margin: 0;
}

/* ====================== LOADING STATES ====================== */
.tab-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #718096;
}

.tab-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #4299e1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

/* ====================== LOADING OVERLAY ====================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(10px);
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
    margin-bottom: 2rem;
}

.loading-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: #4a5568;
    margin: 0 0 1rem 0;
}

.loading-subtext {
    font-size: 1.1rem;
    color: #718096;
    margin: 0;
}

/* ====================== REAL-TIME BADGE ====================== */
.real-time-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-left: 1rem;
}

.real-time-badge .pulse {
    animation: pulse 2s infinite;
}

/* ====================== STATS CARD ====================== */
.stats-card {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.stat-item-large {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-label-large {
    font-weight: 600;
    color: #666;
    font-size: 1.2rem;
}

.stat-value-large {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1a237e;
}

/* ====================== FOOTER ====================== */
footer {
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: auto;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

footer p {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ====================== ANIMATIONS ====================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

/* ====================== RESPONSIVE DESIGN ====================== */
@media (max-width: 1200px) {
    .admin-container {
        padding: 1.5rem;
    }
    
    .section-header h2 {
        font-size: 2.4rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    body {
        padding: 0;
    }
    
    main {
        padding: 1rem;
    }
    
    .admin-container {
        padding: 1rem;
        border-radius: 15px;
    }
    
    .admin-tabs {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .tab-btn {
        border-radius: 12px;
        margin-bottom: 0.5rem;
        width: 100%;
        justify-content: center;
    }
    
    .tab-content {
        padding: 1.5rem;
        border-radius: 15px;
    }
    
    .section-header {
        padding: 2rem 1.5rem;
        border-radius: 15px;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1.1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .stat-card {
        padding: 2rem;
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        margin-bottom: 1rem;
    }
    
    .officer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .officer-card {
        padding: 1.5rem;
        flex-direction: column;
        text-align: center;
    }
    
    .officer-avatar {
        margin-bottom: 1rem;
    }
    
    .cases-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .deleted-list {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .filter-panel {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .filter-item {
        min-width: 100%;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .action-btn {
        width: 100%;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .refresh-controls,
    .stats-controls,
    .cases-controls,
    .deleted-controls {
        justify-content: center;
    }
    
    .table-container {
        border-radius: 12px;
    }
    
    .stats-table th,
    .stats-table td {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .results-container {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .user-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .tab-content {
        padding: 1rem;
    }
    
    .section-header {
        padding: 1.5rem 1rem;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .filter-group {
        padding: 1.5rem;
    }
    
    .action-btn {
        padding: 1.2rem 1.5rem;
        font-size: 1.1rem;
    }
    
    .empty-icon {
        font-size: 3rem;
    }
    
    .empty-state h3 {
        font-size: 1.5rem;
    }
}

/* ====================== CUSTOM SCROLLBAR ====================== */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    border-radius: 10px;
    border: 2px solid #f1f1f1;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #283593 0%, #303f9f 100%);
}

::-webkit-scrollbar-corner {
    background: #f1f1f1;
}

/* ====================== UTILITY CLASSES ====================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.hidden { display: none; }
.visible { display: block; }

.fade-in { animation: fadeIn 0.6s ease; }
.slide-in { animation: slideIn 0.6s ease; }
.fade-in-up { animation: fadeInUp 0.8s ease; }

.pulse { animation: pulse 2s infinite; }
.bounce { animation: bounce 2s infinite; }

/* ====================== PRINT STYLES ====================== */
@media print {
    .admin-tabs,
    .refresh-controls,
    .stats-controls,
    .cases-controls,
    .deleted-controls,
    .action-buttons,
    .filter-panel,
    .help-text,
    .case-footer,
    .btn {
        display: none !important;
    }
    
    .tab-content {
        display: block !important;
        opacity: 1 !important;
        transform: none !important;
        box-shadow: none !important;
        background: white !important;
    }
    
    .section-header {
        background: #1a237e !important;
        color: white !important;
        box-shadow: none !important;
    }
    
    .stat-card {
        box-shadow: none !important;
        border: 2px solid #ddd !important;
    }
    
    .officer-card {
        box-shadow: none !important;
        border: 2px solid #ddd !important;
    }
    
    .case-card {
        box-shadow: none !important;
        border: 2px solid #ddd !important;
    }
}

/* ====================== DARK MODE SUPPORT ====================== */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
        color: #e0e0e0;
    }
    
    .admin-container {
        background: rgba(30, 30, 30, 0.95);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    }
    
    .tab-content {
        background: #2d2d2d;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    }
    
    .stat-card,
    .officer-card,
    .case-card,
    .table-section,
    .results-container {
        background: #3d3d3d;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        color: #e0e0e0;
    }
    
    .filter-group {
        background: #3d3d3d;
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .filter-select, .filter-input {
        background: linear-gradient(135deg, #3d3d3d 0%, #2d2d2d 100%);
        border-color: #4a5568;
        color: #e0e0e0;
    }
    
    .help-text {
        background: linear-gradient(135deg, #2d4d2d 0%, #3d5d3d 100%);
    }
    
    .stats-table th {
        background: linear-gradient(135deg, #3d3d3d 0%, #2d2d2d 100%);
        color: #bb86fc;
    }
    
    .stats-table td {
        color: #e0e0e0;
        border-color: #4d4d4d;
    }
    
    .stats-table tr:hover td {
        background: linear-gradient(135deg, #3d3d3d 0%, #4d4d4d 100%);
    }
    
    .stat-overview-card {
        background: linear-gradient(135deg, #3d3d3d 0%, #2d2d2d 100%);
    }
    
    .results-table td {
        background: #3d3d3d;
        color: #e0e0e0;
        border-color: #4d4d4d;
    }
}

/* ====================== HIGH CONTRAST MODE ====================== */
@media (prefers-contrast: high) {
    .btn {
        border: 3px solid currentColor;
    }
    
    .tab-btn {
        border: 2px solid #1a237e;
    }
    
    .stat-card {
        border: 3px solid currentColor;
    }
    
    .officer-card {
        border: 3px solid currentColor;
    }
    
    .case-card {
        border: 3px solid currentColor;
    }
}

/* ====================== REDUCED MOTION ====================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .tab-btn:hover,
    .btn:hover,
    .stat-card:hover,
    .officer-card:hover,
    .case-card:hover {
        transform: none !important;
    }
}
