:root {
  --rc-bg: #f4f8ff;
  --rc-card: #ffffff;
  --rc-border: #d8e4f5;
  --rc-text: #17325c;
  --rc-muted: #6f86aa;
  --rc-blue: #1f6feb;
  --rc-navy: #143d8d;
  --rc-sky: #e9f2ff;
  --rc-yellow: #f5c451;
  --rc-yellow-soft: #fff5d6;
  --rc-success: #16a34a;
  --rc-success-soft: #eaf8ef;
  --rc-shadow: 0 14px 34px rgba(20, 61, 141, 0.08);
}

body {
  background: linear-gradient(180deg, #f7faff 0%, var(--rc-bg) 100%);
  color: var(--rc-text);
}

.app-content {
  padding-bottom: 32px;
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.page-kicker {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rc-sky), #fff7dd);
  color: var(--rc-navy);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.page-title {
  color: var(--rc-navy);
  margin-bottom: 6px;
}

.page-subtitle,
.content-subtitle,
.pager-info {
  color: var(--rc-muted);
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card,
.content-card {
  background: var(--rc-card);
  border: 1px solid var(--rc-border);
  border-radius: 20px;
  box-shadow: var(--rc-shadow);
}

.stat-card {
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: "";
  position: absolute;
  inset: auto -20px -20px auto;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  opacity: .22;
}

.stat-card-total::after { background: var(--rc-blue); }
.stat-card-done::after { background: var(--rc-success); }
.stat-card-cancel::after { background: var(--rc-yellow); }
.stat-card-pending::after { background: #0284c7; }

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex: 0 0 52px;
}

.stat-card-total .stat-icon { background: linear-gradient(135deg, #dfeeff, #eef5ff); }
.stat-card-done .stat-icon { background: linear-gradient(135deg, #e6f7ed, #f2fbf6); }
.stat-card-cancel .stat-icon { background: linear-gradient(135deg, #fff3d1, #fff9ea); }
.stat-card-pending .stat-icon { background: linear-gradient(135deg, #e7f6ff, #f1faff); }

.stat-label {
  color: var(--rc-muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 32px;
  line-height: 1;
  font-weight: 800;
  color: var(--rc-navy);
}

.content-card-body {
  padding: 22px;
}

.content-title {
  color: var(--rc-navy);
  margin: 0 0 6px;
}

.section-head,
.table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.form-group.span-2 {
  grid-column: span 2;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--rc-navy);
}

.form-control {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--rc-border);
  border-radius: 14px;
  background: #fff;
  color: var(--rc-text);
  padding: 11px 14px;
  outline: 0;
  transition: .2s ease;
}

.form-control:focus {
  border-color: var(--rc-blue);
  box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.12);
}

.filter-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  align-items: center;
  padding-top: 4px;
}

.btn {
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid transparent;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--rc-blue), var(--rc-navy));
  color: #fff;
}

.btn-secondary {
  background: #fff6da;
  border-color: #f4df95;
  color: #866100;
}

.btn-outline {
  background: #eef5ff;
  border-color: #c9dcfb;
  color: var(--rc-navy);
}

.table-meta-chip {
  background: linear-gradient(135deg, #eef5ff, #fff8dc);
  color: var(--rc-navy);
  border: 1px solid #d8e4f5;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 700;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--rc-border);
  border-radius: 18px;
}

.report-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1000px;
}

.report-table thead th {
  background: linear-gradient(135deg, #173f8b, #246ddf);
  color: #fff;
  font-weight: 700;
  text-align: left;
  padding: 14px 16px;
  position: sticky;
  top: 0;
  z-index: 1;
}

.report-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid #e7eef9;
  vertical-align: middle;
  color: var(--rc-text);
  background: #fff;
}

.report-table tbody tr:nth-child(even) td {
  background: #fbfdff;
}

.report-table tbody tr:hover td {
  background: #f3f8ff;
}

.empty-cell {
  text-align: center;
  padding: 24px !important;
  color: var(--rc-muted) !important;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  border: 1px solid transparent;
  white-space: nowrap;
}

.status-new {
  background: #e8f1ff;
  color: #1453bf;
  border-color: #cdddfd;
}

.status-onsite,
.status-assigned {
  background: #e8f7ff;
  color: #0b7bb0;
  border-color: #c4e9fb;
}

.status-servicing {
  background: var(--rc-yellow-soft);
  color: #926400;
  border-color: #f1df9a;
}

.status-done {
  background: var(--rc-success-soft);
  color: #147a3b;
  border-color: #cdebd8;
}

.status-cancel {
  background: #fff1c7;
  color: #8a6500;
  border-color: #f0df9f;
}

.status-other {
  background: #eef2f7;
  color: #4b5f82;
  border-color: #dae3ef;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}

.pager-actions {
  display: flex;
  gap: 10px;
}

.loading-mask {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(20, 40, 90, 0.28);
  backdrop-filter: blur(3px);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  z-index: 9999;
}

@media (max-width: 1200px) {
  .report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .report-header,
  .section-head,
  .table-head,
  .pager {
    flex-direction: column;
    align-items: stretch;
  }

  .report-grid,
  .filter-grid {
    grid-template-columns: 1fr;
  }

  .form-group.span-2 {
    grid-column: span 1;
  }

  .filter-actions,
  .pager-actions {
    justify-content: stretch;
  }

  .filter-actions .btn,
  .pager-actions .btn,
  .report-actions .btn {
    width: 100%;
  }

  .content-card-body {
    padding: 18px;
  }
}