* {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
  margin: 0;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
  color: #1a1a2e;
  font-size: 14px;
  line-height: 1.5;
}

/* Header */

.app-header {
  display: grid;
  grid-template-columns: 1.5fr 3fr 1.5fr;
  align-items: center;
  padding: 14px 24px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-bottom: 3px solid #c00000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.court-info {
  text-align: center;
}

.court-name {
  font-weight: 800;
  font-size: 15px;
  color: #c00000;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.city-name {
  font-weight: 700;
  font-size: 13px;
  color: #c00000;
}

.main-title {
  text-align: center;
}

.title-line1 {
  font-weight: 900;
  color: #c00000;
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 1px 1px 2px rgba(192, 0, 0, 0.1);
}

.title-line2 {
  font-weight: 700;
  color: #c00000;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.user-info {
  text-align: right;
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

/* Layout */

main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 16px 24px 30px;
}

.left-panel,
.right-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* NEW: Sidebar Layout cho Dashboard & Judge */
.main-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  padding: 16px 24px 30px;
  min-height: calc(100vh - 100px);
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  height: fit-content;
  position: sticky;
  top: 20px;
}

.sidebar-btn {
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
  color: #333;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 4px solid transparent;
}

.sidebar-btn:hover {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border-left-color: #1565c0;
  transform: translateX(5px);
}

.sidebar-btn.active {
  background: linear-gradient(135deg, #c00000 0%, #8b0000 100%);
  color: #fff;
  border-left-color: #ffcc00;
  box-shadow: 0 4px 15px rgba(192, 0, 0, 0.3);
}

.sidebar-btn .icon {
  font-size: 18px;
}

.main-content-area {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.content-panel {
  display: none;
}

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

.card {
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  border: none;
  padding: 20px 22px;
  border-radius: 16px;
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.08),
    0 4px 12px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  box-shadow: 
    0 15px 50px rgba(0, 0, 0, 0.12),
    0 8px 20px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
}

.card:hover::before {
  opacity: 1;
}

.card h3 {
  margin: 0 0 18px 0;
  padding: 12px 18px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  box-shadow: 
    0 6px 20px rgba(102, 126, 234, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Tables - Enhanced with elevation and brighter colors */

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  font-weight: 500;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
}

th,
td {
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 12px 14px;
}

th {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  text-align: center;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  position: relative;
}

th::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.1) 100%);
}

th:first-child {
  border-top-left-radius: 12px;
}

th:last-child {
  border-top-right-radius: 12px;
}

tbody tr:last-child td:first-child {
  border-bottom-left-radius: 12px;
}

tbody tr:last-child td:last-child {
  border-bottom-right-radius: 12px;
}

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

tbody tr {
  background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
  transition: all 0.25s ease;
}

tbody tr:nth-child(even) {
  background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
}

tbody tr:hover {
  background: linear-gradient(135deg, #e8f0fe 0%, #d4e4fc 100%);
  transform: scale(1.005);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

/* Enhanced text styling for table cells */
tbody td {
  font-weight: 600;
  color: #2d3748;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
  letter-spacing: 0.2px;
}

.stats-table td:first-child,
.case-table td:first-child {
  font-weight: 700;
  color: #1a202c;
}

/* Numbered columns (STT) */
.case-table td:first-child,
.stats-table td:first-child,
.user-table td:first-child {
  font-weight: 800;
  color: #667eea;
  text-shadow: 0 1px 2px rgba(102, 126, 234, 0.2);
}

/* Table wrapper for better elevation */
.table-wrapper {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.05);
  background: #fff;
}

/* Căn đều các cột từ cột 2 trở đi trong bảng thống kê */
.stats-table th:first-child,
.stats-table td:first-child {
  width: 15%;
}

.stats-table th:not(:first-child),
.stats-table td:not(:first-child) {
  width: calc(85% / 7);
  text-align: center;
}

/* ============================================
   SPECIFIC TABLE THEMES - Brighter & Elevated
   ============================================ */

/* Stats Table - Blue theme */
.stats-table th {
  background: linear-gradient(135deg, #42a5f5 0%, #1976d2 100%);
}

/* Case Table - Teal theme */
.case-table th {
  background: linear-gradient(135deg, #26c6da 0%, #00acc1 100%);
}

/* Judge Table - Orange theme */
.judge-table th {
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

/* Khieu nai to cao Table - Rose theme */
.kntc-table th {
  background: linear-gradient(135deg, #ec407a 0%, #d81b60 100%);
}

/* Mien giam an phi Table - Indigo theme */
.mgap-table th {
  background: linear-gradient(135deg, #7c4dff 0%, #651fff 100%);
}

/* Mien giam chap hanh an HS Table - Deep Purple theme */
.mgchhs-table th {
  background: linear-gradient(135deg, #9575cd 0%, #7e57c2 100%);
}

/* Hoi tham Table - Purple Gradient */
.hoitham-table th {
  background: linear-gradient(135deg, #ab47bc 0%, #8e24aa 100%);
}

/* Excel Table - Warm Yellow theme */
.excel-two-col-table th {
  background: linear-gradient(135deg, #ffca28 0%, #ffa000 100%);
  color: #5d4037;
}

/* THAHS Stats Table - Red theme (updated) */
.thahs-stats-table th {
  background: linear-gradient(135deg, #ef5350 0%, #e53935 100%);
  color: #fff;
}

/* Small input table styling */
.small-input-table th {
  background: linear-gradient(135deg, #66bb6a 0%, #43a047 100%);
}

/* Form thêm vụ việc */

.add-case-form .form-row {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.add-case-form label {
  width: 140px;
  font-size: 13px;
  font-weight: 600;
  color: #444;
}

.add-case-form input,
.add-case-form select {
  flex: 1;
  padding: 10px 14px;
  font-size: 13px;
  border: 2px solid #e8e8e8;
  border-radius: 10px;
  transition: all 0.25s ease;
  font-weight: 500;
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
}

.add-case-form input:hover,
.add-case-form select:hover {
  border-color: #c0c0c0;
}

.add-case-form input:focus,
.add-case-form select:focus {
  border-color: #667eea;
  box-shadow: 
    0 0 0 4px rgba(102, 126, 234, 0.15),
    inset 0 2px 4px rgba(0, 0, 0, 0.02);
  outline: none;
  background: #fff;
}

.form-row-btn {
  justify-content: flex-end;
  margin-top: 16px;
}

/* Buttons */

.primary-btn,
.secondary-btn,
.excel-btn {
  padding: 12px 22px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
  letter-spacing: 0.3px;
}

.primary-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.35);
}

.primary-btn:hover {
  background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.45);
}

.primary-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.35);
}

.secondary-btn {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  color: #495057;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.secondary-btn:hover {
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
}

.btn-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.excel-btn {
  text-align: left;
  background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
  border: none;
  color: #f57c00;
  padding: 14px 18px;
  box-shadow: 0 4px 15px rgba(255, 152, 0, 0.2);
}

.excel-btn:hover {
  background: linear-gradient(135deg, #ffecb3 0%, #ffe082 100%);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 152, 0, 0.35);
}

.excel-btn.warning {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  color: #e65100;
}

/* Google Sheets button */
.sheets-btn {
  width: 100%;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%);
  color: #2e7d32;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: left;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.25);
}

.sheets-btn:hover {
  background: linear-gradient(135deg, #a5d6a7 0%, #81c784 100%);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
}

/* Excel table buttons full width */
.excel-two-col-table .excel-btn {
  width: 100%;
  text-align: left;
}

/* Bảng Thẩm phán */

.judge-table th:first-child,
.judge-table td:first-child {
  width: 30%;
  text-align: left;
  font-weight: 700;
}

.judge-table th:not(:first-child),
.judge-table td:not(:first-child) {
  width: calc(70% / 5);
  text-align: center;
}

.judge-table tbody tr {
  cursor: pointer;
  transition: all 0.3s ease;
}

.judge-table tbody tr:hover {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  transform: scale(1.008);
  box-shadow: 0 6px 20px rgba(255, 152, 0, 0.2);
}

/* View Thẩm phán */

.hidden {
  display: none;
}

/* Judge View giữ nguyên layout 2 cột như Dashboard */
#judgeView {
  grid-template-columns: 220px 1fr;
}

.judge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px 0;
}

.sub-title {
  font-weight: 800;
  font-size: 18px;
  color: #ff6600;
  text-shadow: 1px 1px 2px rgba(255, 102, 0, 0.1);
}

.judge-content {
  padding: 0 24px 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.judge-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.case-table td:nth-last-child(2),
.case-table th:nth-last-child(2),
.case-table td:last-child,
.case-table th:last-child {
  text-align: center;
}

/* Link X - Take number */

.take-number-link {
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, #42a5f5 0%, #1e88e5 100%);
  transition: all 0.25s ease;
  display: inline-block;
  box-shadow: 0 3px 10px rgba(30, 136, 229, 0.3);
  font-size: 12px;
}

.take-number-link:hover {
  background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(30, 136, 229, 0.45);
}

/* Bảng lấy số tố tụng – input nhỏ hơn */

.small-input-table input,
.small-input-table select {
  width: 100%;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 8px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
}

.small-input-table input:focus,
.small-input-table select:focus {
  border-color: #1565c0;
  outline: none;
}

/* Ghi chú nhỏ */

.note {
  font-size: 12px;
  color: #666;
  margin-top: 8px;
  font-style: italic;
}

/* Delete case link (Admin only) */
.delete-case-link {
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ef5350 0%, #e53935 100%);
  transition: all 0.25s ease;
  display: inline-block;
  box-shadow: 0 3px 10px rgba(229, 57, 53, 0.3);
}

.delete-case-link:hover {
  background: linear-gradient(135deg, #e53935 0%, #d32f2f 100%);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(229, 57, 53, 0.45);
}

/* Tab buttons for Judge view */
.tab-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  background: #fff;
  color: #c00000;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tab-btn:hover {
  background: #fff5f5;
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(192, 0, 0, 0.2);
}

.tab-btn.active {
  background: linear-gradient(135deg, #c00000 0%, #8b0000 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(192, 0, 0, 0.4);
}

.judge-tab-content {
  transition: all 0.3s ease;
}

/* THAHS Stats Table */
.thahs-stats-table {
  margin-top: 10px;
}

/* Additional table enhancements */
.case-table,
.stats-table,
.judge-table,
.kntc-table,
.mgap-table,
.mgchhs-table,
.hoitham-table {
  margin-top: 15px;
  border-radius: 12px;
  overflow: hidden;
}

/* Action buttons in tables */
.action-btn {
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 2px;
}

.action-btn.edit {
  background: linear-gradient(135deg, #4fc3f7 0%, #29b6f6 100%);
  color: #fff;
}

.action-btn.edit:hover {
  background: linear-gradient(135deg, #29b6f6 0%, #03a9f4 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(41, 182, 246, 0.4);
}

.action-btn.delete {
  background: linear-gradient(135deg, #ef5350 0%, #e53935 100%);
  color: #fff;
}

.action-btn.delete:hover {
  background: linear-gradient(135deg, #e53935 0%, #d32f2f 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(229, 57, 53, 0.4);
}

.action-btn.success {
  background: linear-gradient(135deg, #66bb6a 0%, #43a047 100%);
  color: #fff;
}

.action-btn.success:hover {
  background: linear-gradient(135deg, #43a047 0%, #388e3c 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(67, 160, 71, 0.4);
}

/* Responsive */

@media (max-width: 1100px) {
  main {
    grid-template-columns: 1fr;
  }
  
  .main-layout {
    grid-template-columns: 1fr;
  }
  
  .sidebar-menu {
    flex-direction: row;
    flex-wrap: wrap;
    position: static;
  }
  
  .sidebar-btn {
    flex: 1 1 auto;
    min-width: 150px;
  }
  
  .app-header {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 8px;
  }
  
  .user-info {
    text-align: center;
  }
}

/* Modal Styles */
.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

/* Modal hidden state - phải ưu tiên hơn .modal */
.modal.hidden {
  display: none !important;
}

.modal-content {
  background: #fff;
  padding: 28px 32px;
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.close-modal {
  position: absolute;
  right: 18px;
  top: 12px;
  font-size: 28px;
  font-weight: bold;
  color: #999;
  cursor: pointer;
  transition: all 0.2s;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.close-modal:hover {
  color: #fff;
  background: #c00000;
}

/* Header buttons */
.app-header button {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #c0c0c0 0%, #a0a0a0 100%);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #a0a0a0 0%, #888 100%);
}

/* Selection */
::selection {
  background: #c00000;
  color: #fff;
}

/* ============================================
   ENHANCED TABLE STYLING - Unified & Elevated
   ============================================ */

/* Override inline styles for table headers */
.case-table thead tr,
.stats-table thead tr,
.judge-table thead tr {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.case-table th,
.stats-table th {
  padding: 14px 12px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.6px !important;
  text-transform: uppercase !important;
  border: none !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Ensure white text on colored headers */
.case-table thead tr[style*="background"] th,
.stats-table thead tr[style*="background"] th {
  color: #fff !important;
}

/* Better row styling */
.case-table tbody td,
.stats-table tbody td {
  padding: 12px 10px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Alternating row colors - brighter */
.case-table tbody tr:nth-child(odd),
.stats-table tbody tr:nth-child(odd) {
  background: linear-gradient(135deg, #ffffff 0%, #fefefe 100%);
}

.case-table tbody tr:nth-child(even),
.stats-table tbody tr:nth-child(even) {
  background: linear-gradient(135deg, #f8faff 0%, #f0f4ff 100%);
}

/* Enhanced hover effect */
.case-table tbody tr:hover,
.stats-table tbody tr:hover {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%) !important;
  transform: scale(1.002);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
}

/* Table container elevation */
.card .case-table,
.card .stats-table,
.card .judge-table {
  margin-top: 15px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.06),
    0 1px 4px rgba(0, 0, 0, 0.04);
}

/* Stats date filter section */
.stats-date-filter {
  background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 16px;
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.04),
    0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.stats-date-filter label {
  font-weight: 600;
  color: #555;
  font-size: 13px;
}

.stats-date-filter input[type="date"] {
  padding: 8px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 13px;
  transition: all 0.2s ease;
}

.stats-date-filter input[type="date"]:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
  outline: none;
}

.stats-date-filter button {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.stats-date-filter button.primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.stats-date-filter button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.stats-date-filter button.secondary {
  background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
  color: #555;
}

.stats-date-filter button.secondary:hover {
  background: linear-gradient(135deg, #e0e0e0 0%, #d0d0d0 100%);
}

/* Filter summary text */
.filter-summary {
  font-size: 13px;
  font-weight: 600;
  color: #667eea;
  margin-left: auto;
  padding: 6px 12px;
  background: rgba(102, 126, 234, 0.1);
  border-radius: 6px;
}

/* Excel table styling */
.excel-two-col-table {
  margin-top: 15px;
}

.excel-two-col-table th {
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%) !important;
  color: #fff !important;
  padding: 14px 16px !important;
}

.excel-two-col-table td {
  padding: 12px 16px;
  vertical-align: middle;
}

/* Panel titles with icons */
.card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Animation for table rows */
@keyframes fadeInRow {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.case-table tbody tr,
.stats-table tbody tr {
  animation: fadeInRow 0.3s ease forwards;
}

/* Responsive table improvements */
@media (max-width: 768px) {
  .case-table,
  .stats-table {
    font-size: 11px;
  }
  
  .case-table th,
  .case-table td,
  .stats-table th,
  .stats-table td {
    padding: 8px 6px !important;
  }
  
  .stats-date-filter {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ============================================
   ADMIN PANEL TABLE STYLING
   ============================================ */

/* User table styling */
.user-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.04);
  margin-top: 15px;
}

.user-table th {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 14px 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.user-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  vertical-align: middle;
}

.user-table tbody tr:nth-child(odd) {
  background: linear-gradient(135deg, #ffffff 0%, #fefefe 100%);
}

.user-table tbody tr:nth-child(even) {
  background: linear-gradient(135deg, #f8faff 0%, #f0f4ff 100%);
}

.user-table tbody tr:hover {
  background: linear-gradient(135deg, #e8f0fe 0%, #d4e4fc 100%);
  transform: scale(1.002);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
  transition: all 0.2s ease;
}

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

/* Counter table styling */
.counter-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.06);
  margin-top: 10px;
}

.counter-table th {
  background: linear-gradient(135deg, #ffd54f 0%, #ffb300 100%);
  color: #5d4037;
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border: none;
}

.counter-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  font-size: 13px;
}

.counter-table tbody tr:nth-child(odd) {
  background: #fffef5;
}

.counter-table tbody tr:nth-child(even) {
  background: #fff9e6;
}

.counter-table tbody tr:hover {
  background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
}

/* Admin panel styling */
.panel {
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  padding: 20px;
  border-radius: 16px;
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.08),
    0 4px 12px rgba(0, 0, 0, 0.04);
  margin-bottom: 20px;
}

.panel h3 {
  margin: 0 0 18px 0;
  padding: 12px 18px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
}

.panel h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

/* Admin form styling */
.panel form {
  background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
  padding: 18px;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.03);
}

.panel form input,
.panel form select {
  padding: 10px 14px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 13px;
  transition: all 0.2s ease;
  background: #fff;
}

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

.panel form button {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.panel form button[type="submit"] {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.35);
}

.panel form button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.45);
}

/* Table action buttons */
.user-table button,
.counter-table button {
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 2px;
}

.user-table button.edit-btn,
.user-table .edit-btn {
  background: linear-gradient(135deg, #4fc3f7 0%, #29b6f6 100%);
  color: #fff;
}

.user-table button.edit-btn:hover,
.user-table .edit-btn:hover {
  background: linear-gradient(135deg, #29b6f6 0%, #03a9f4 100%);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(41, 182, 246, 0.4);
}

.user-table button.delete-btn,
.user-table .delete-btn {
  background: linear-gradient(135deg, #ef5350 0%, #e53935 100%);
  color: #fff;
}

.user-table button.delete-btn:hover,
.user-table .delete-btn:hover {
  background: linear-gradient(135deg, #e53935 0%, #d32f2f 100%);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(229, 57, 53, 0.4);
}

.user-table button.reset-btn {
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
  color: #fff;
}

.user-table button.reset-btn:hover {
  background: linear-gradient(135deg, #f57c00 0%, #ef6c00 100%);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(255, 152, 0, 0.4);
}

/* ============================================
   ENHANCED TABLE TEXT STYLING - Nổi & Đẹp
   ============================================ */

/* Case table enhanced styling */
.case-table tbody td {
  font-weight: 600;
  color: #1e293b;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
  padding: 14px 12px;
  line-height: 1.5;
  vertical-align: middle;
}

/* Important columns - bolder text */
.case-table tbody td:nth-child(2), /* Số thụ lý */
.case-table tbody td:nth-child(4), /* Loại vụ việc */
.case-table tbody td:nth-child(5), /* Nguyên đơn */
.case-table tbody td:nth-child(8) /* Thẩm phán */
{
  font-weight: 700;
  color: #0f172a;
}

/* Status columns with colors */
.case-table tbody td:nth-child(11) { /* Tình trạng */
  font-weight: 700;
}

/* Stats table text enhancement */
.stats-table tbody td {
  font-weight: 700;
  font-size: 15px;
  color: #1e293b;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
  text-align: center;
  padding: 16px 12px;
}

/* Numbers in stats should pop */
.stats-table tbody td {
  background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(248,250,252,0.9) 100%);
}

/* User/Admin table enhanced text */
.user-table tbody td {
  font-weight: 600;
  color: #1e293b;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
  padding: 14px 12px;
}

/* Hội thẩm table styling */
.user-table tbody td:nth-child(3) { /* Tên */
  font-weight: 700;
  color: #7c3aed;
}

.user-table tbody td:nth-child(4) { /* Chuyên */
  font-weight: 600;
  color: #059669;
}

.user-table tbody td:nth-child(6) { /* Nơi xử */
  font-weight: 600;
  color: #dc2626;
}

/* Table row number styling */
.case-table tbody td:first-child,
.stats-table tbody td:first-child,
.user-table tbody td:first-child {
  font-weight: 800;
  font-size: 14px;
  color: #667eea;
  text-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
  background: linear-gradient(135deg, #f0f4ff 0%, #e8ecff 100%);
}

/* Enhanced table header with glow effect */
.case-table thead th,
.stats-table thead th,
.user-table thead th {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 16px 12px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Colored backgrounds for different status */
.case-table tbody tr[data-status="completed"] td {
  background: linear-gradient(135deg, #dcfce7 0%, #d1fae5 100%);
}

.case-table tbody tr[data-status="pending"] td {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

/* Table cell borders for clarity */
.case-table tbody td,
.stats-table tbody td,
.user-table tbody td {
  border-right: 1px solid rgba(0, 0, 0, 0.04);
}

.case-table tbody td:last-child,
.stats-table tbody td:last-child,
.user-table tbody td:last-child {
  border-right: none;
}

/* Subtle inner shadow for depth */
.case-table tbody,
.stats-table tbody,
.user-table tbody {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

/* Action buttons in tables - more prominent */
.take-number-link,
.delete-case-link {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 11px;
}

/* Zebra stripe with subtle gradient */
.case-table tbody tr:nth-child(odd),
.user-table tbody tr:nth-child(odd) {
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
}

.case-table tbody tr:nth-child(even),
.user-table tbody tr:nth-child(even) {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

/* Hover effect with lift */
.case-table tbody tr:hover td,
.user-table tbody tr:hover td {
  background: linear-gradient(180deg, #e0f2fe 0%, #bae6fd 100%);
  color: #0369a1;
}

/* Special highlight for important data */
.highlight-cell {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
  font-weight: 700 !important;
  color: #92400e !important;
}

/* ============================================
   COMPACT TABLE STYLES - For many columns
   ============================================ */
.compact-table {
  font-size: 11px !important;
}

.compact-table th {
  padding: 8px 4px !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.3px !important;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.compact-table td {
  padding: 6px 4px !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
  vertical-align: middle;
  word-break: break-word;
}

.compact-table td:first-child {
  font-size: 10px !important;
  font-weight: 600 !important;
}

/* Make text wrap in compact cells */
.compact-table td {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Action buttons smaller in compact table */
.compact-table .action-btn,
.compact-table .delete-case-link {
  padding: 4px 8px !important;
  font-size: 10px !important;
}

/* Hover tooltip for truncated text */
.compact-table td[title] {
  cursor: help;
}

/* Responsive for compact tables */
@media (max-width: 1200px) {
  .compact-table {
    font-size: 10px !important;
  }
  
  .compact-table th {
    padding: 6px 3px !important;
    font-size: 9px !important;
  }
  
  .compact-table td {
    padding: 5px 3px !important;
    font-size: 10px !important;
  }
}
