:root {
  --brand: #4f46e5;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", "Courier New", monospace;
}

body {
  background: #f5f6fa;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.app-header {
  background: var(--brand);
  color: #fff;
  padding: 0.6rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-header h1 {
  font-weight: 600;
}

.app-header .vr {
  background: rgba(255, 255, 255, 0.35);
  align-self: stretch;
}

.drop-zone {
  border: 2px dashed #cbd5e1;
  border-radius: 1rem;
  padding: 2.2rem 1rem;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.drop-zone i {
  font-size: 2.4rem;
  color: var(--brand);
}

.drop-zone.drag {
  border-color: var(--brand);
  background: #eef2ff;
}

.empty-state i {
  font-size: 3rem;
  opacity: 0.4;
}

.stats-bar {
  flex-wrap: wrap;
}

.grid-scroll {
  overflow: auto;
  max-height: calc(100vh - 250px);
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
}

table.grid {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  width: max-content;
  min-width: 100%;
}

table.grid th,
table.grid td {
  border: 1px solid #e2e8f0;
  padding: 6px 12px;
  white-space: nowrap;
}

table.grid thead th {
  position: sticky;
  top: 0;
  background: #f1f5f9;
  color: #334155;
  font-weight: 600;
  z-index: 2;
}

table.grid .row-header {
  position: sticky;
  left: 0;
  background: #f8fafc;
  font-weight: 600;
  color: #334155;
  z-index: 1;
  text-align: left;
}

table.grid .asg-col {
  left: var(--id-col-w, 130px);
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}

table.grid thead th.row-header {
  z-index: 3;
  top: 0;
}

table.grid td.cell {
  text-align: center;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  transition: background 0.1s ease;
}

table.grid td.cell:hover {
  background: #e0e7ff !important;
}

td.cell.full {
  background: #d1fae5;
  color: #065f46;
}

td.cell.partial {
  background: #fef3c7;
  color: #92400e;
}

td.cell.gsm {
  background: #ffedd5;
  color: #c2410c;
}

td.cell.none {
  background: #fee2e2;
  color: #991b1b;
}

td.cell.empty {
  color: #cbd5e1;
}

.legend {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.4rem 0.75rem;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: middle;
}

.legend-dot.full { background: #d1fae5; }
.legend-dot.partial { background: #fef3c7; }
.legend-dot.gsm { background: #ffedd5; }
.legend-dot.none { background: #fee2e2; }

.modal-body .table-responsive {
  max-height: 60vh;
}

#modalTable {
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

#modalTable td {
  white-space: nowrap;
}

.modal-date-label {
  pointer-events: none;
  cursor: default;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
