:root {
  --primary-navy: #112240;
  --secondary-navy: #1e3a8a;
  --accent-gold: #d97706;
  --accent-yellow: #ffff00;
  --bg-main: #f1f5f9;
  --card-bg: #ffffff;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --border-color: #cbd5e1;
  --success-green: #15803d;
  --danger-red: #b91c1c;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Mukta', 'Noto Sans Devanagari', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-dark);
  font-size: 15px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.app-header {
  background: linear-gradient(135deg, #0b1528 0%, #1e3a8a 100%);
  color: #ffffff;
  padding: 14px 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-bottom: 3px solid #f59e0b;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.brand-logo {
  height: 52px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
}

.brand-titles {
  display: flex;
  flex-direction: column;
}

.header-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.header-subtitle {
  font-size: 13px;
  color: #cbd5e1;
}

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

.date-badge {
  background: rgba(255, 255, 255, 0.12);
  padding: 6px 14px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.date-label {
  font-size: 13px;
  color: #e2e8f0;
}

.date-input {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  width: 110px;
  text-align: center;
}

/* Layout */
.main-container {
  max-width: 1400px;
  margin: 24px auto;
  padding: 0 20px;
  flex: 1;
  width: 100%;
}

.card {
  background-color: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  margin-bottom: 24px;
  overflow: hidden;
}

.card-header {
  padding: 16px 22px;
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary-navy);
}

.section-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.vllm-badge {
  background-color: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.card-body {
  padding: 22px;
}

/* Dropzone */
.dropzone {
  border: 2px dashed #93c5fd;
  border-radius: 10px;
  background-color: #f0f7ff;
  padding: 30px 20px;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dropzone:hover, .dropzone.dragover {
  border-color: #2563eb;
  background-color: #e0f2fe;
}

.file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-icon {
  margin-bottom: 10px;
}

.dropzone-primary-text {
  font-size: 16px;
  font-weight: 600;
  color: #1e3a8a;
}

.dropzone-sub-text {
  font-size: 13px;
  color: #64748b;
  margin-top: 4px;
}

.selected-file-name {
  margin-top: 12px;
  font-weight: 700;
  color: #047857;
  font-size: 14px;
}

.upload-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
  border: none;
}

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

.btn-primary {
  background-color: #1e3a8a;
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  background-color: #1e40af;
}

.btn-outline {
  background-color: #ffffff;
  color: #334155;
  border: 1.5px solid #cbd5e1;
}

.btn-outline:hover:not(:disabled) {
  background-color: #f1f5f9;
}

.btn-success {
  background-color: #15803d;
  color: #ffffff;
}

.btn-success:hover:not(:disabled) {
  background-color: #166534;
}

.btn-danger {
  background-color: #b91c1c;
  color: #ffffff;
}

.btn-danger:hover:not(:disabled) {
  background-color: #991b1b;
}

.btn-secondary {
  background-color: #f8fafc;
  color: #1e293b;
  border: 1.5px solid #94a3b8;
}

.btn-secondary:hover:not(:disabled) {
  background-color: #e2e8f0;
}

/* Progress bar */
.progress-section {
  margin-top: 20px;
  background-color: #f8fafc;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #1e3a8a;
}

.progress-track {
  width: 100%;
  height: 10px;
  background-color: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #059669);
  transition: width 0.3s ease;
}

.hidden {
  display: none !important;
}

/* Table Toolbar */
.table-header-flex {
  flex-wrap: wrap;
  gap: 12px;
}

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

.table-toolbar {
  padding: 12px 20px;
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.search-filter-group {
  display: flex;
  gap: 10px;
  flex: 1;
  max-width: 550px;
}

.search-box {
  position: relative;
  flex: 1;
}

.search-box svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}

.search-box input {
  width: 100%;
  padding: 7px 12px 7px 32px;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  font-size: 14px;
}

.search-box input:focus, .filter-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.filter-select {
  padding: 7px 12px;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  font-size: 14px;
  background-color: #ffffff;
}

.row-actions-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.record-counter {
  font-size: 13.5px;
  font-weight: 700;
  background-color: #e2e8f0;
  padding: 5px 12px;
  border-radius: 20px;
  color: #1e293b;
}

/* Official Police Banner preview */
.official-banner-preview {
  background-color: var(--accent-yellow);
  border: 1.5px solid #000;
  border-bottom: none;
  margin: 16px 20px 0 20px;
  text-align: center;
  font-weight: 800;
  font-size: 14px;
  padding: 7px 6px;
  color: #000;
  letter-spacing: 0.2px;
}

/* Table */
.table-responsive {
  padding: 0 20px 20px 20px;
  overflow-x: auto;
}

.crime-table {
  width: 100%;
  border-collapse: collapse;
  border: 1.5px solid #000;
  background-color: #ffffff;
}

.crime-table th {
  border: 1px solid #000;
  padding: 8px 6px;
  background-color: #f1f5f9;
  color: #000;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  vertical-align: middle;
}

.crime-table td {
  border: 1px solid #000;
  padding: 8px;
  font-size: 13px;
  vertical-align: middle;
  background-color: #ffffff;
}

.crime-table tr:hover td {
  background-color: #f8fafc;
}

/* Editable inputs inside table */
.cell-input {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  color: #000;
  resize: vertical;
  padding: 4px;
  border-radius: 4px;
  line-height: 1.35;
}

.cell-input:focus {
  background-color: #fff;
  border: 1.5px solid #2563eb;
  outline: none;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

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

.font-bold {
  font-weight: 700;
}

.sr-num {
  font-weight: 800;
  text-align: center;
  font-size: 13px;
  color: #1e3a8a;
}

.btn-del-row {
  background: none;
  border: none;
  color: #dc2626;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.btn-del-row:hover {
  background-color: #fee2e2;
}

.empty-cell {
  text-align: center;
  padding: 40px 20px !important;
  color: #64748b;
  font-size: 14px;
  background-color: #f8fafc !important;
}

/* Footer */
.app-footer {
  background-color: #ffffff;
  border-top: 1px solid #e2e8f0;
  text-align: center;
  padding: 14px;
  font-size: 13px;
  color: #64748b;
  margin-top: auto;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

.toast {
  background: #1e293b;
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  animation: slideIn 0.2s ease-out;
  border-left: 4px solid #3b82f6;
}

.toast.success { border-left-color: #10b981; }
.toast.error { border-left-color: #ef4444; }

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