html {
  font-size: 14px;
}


.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  background: #ffffff;
  color: #1f2937;
  font-family: "Trebuchet MS", "Verdana", sans-serif;
  margin-bottom: 60px;
}

.footer {
  border-top: 1px solid rgba(31, 41, 55, 0.12);
  padding: 12px 0;
  margin-top: 24px;
  color: #6b7280;
  font-size: 0.9rem;
}

.alert {
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.alert-danger {
  background: #fee2e2;
  color: #7f1d1d;
  border: 1px solid rgba(185, 28, 28, 0.2);
}

:root {
  --card-bg: #ffffff;
  --card-border: rgba(31, 41, 55, 0.1);
  --accent: #c9783b;
  --muted: #6b7280;
}

h1, h2, h3 {
  font-family: "Georgia", "Times New Roman", serif;
  letter-spacing: 0.01em;
}

.container {
  margin: 0 auto;
  padding: 0;
  width: 100%;
}

.page-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.muted {
  color: var(--muted);
  margin-bottom: 0;
}

.grid-list {
  margin-bottom: 28px;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.grid-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 8px 20px rgba(31, 41, 55, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.grid-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(31, 41, 55, 0.12);
}

.grid-title {
  font-weight: 700;
  margin-bottom: 8px;
}

.grid-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.92rem;
}

.non-timeslot {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
}

.nav-group {
  margin-bottom: 12px;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.link-row a {
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff2e4;
  color: #7a3d13;
  text-decoration: none;
  border: 1px solid rgba(201, 120, 59, 0.3);
}

.alerts {
  background: #fff6f0;
  border: 1px solid rgba(201, 120, 59, 0.35);
  border-radius: 12px;
  padding: 16px;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(31, 41, 55, 0.08);
}

.schedule-table th,
.schedule-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(31, 41, 55, 0.08);
  vertical-align: top;
}

.schedule-table th {
  text-align: left;
  background: rgba(239, 241, 247, 0.7);
}

.time-cell {
  font-weight: 700;
  color: #1f2937;
  width: 100px;
}
.entry-grid {
  font-weight: 700;
}

.legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(31, 41, 55, 0.12);
  background: rgba(255, 255, 255, 0.85);
  margin-bottom: 14px;
}

.legend-title {
  font-weight: 700;
  color: #1f2937;
}

.legend-items {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: #4b5563;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-end;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(31, 41, 55, 0.12);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-group label {
  font-weight: 600;
  color: #374151;
}

.filter-group select {
  min-width: 180px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(31, 41, 55, 0.18);
  background: #ffffff;
}

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

.table-section {
  margin-bottom: 28px;
}

.split-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 30px;
  align-items: start;
  margin-bottom: 24px;
}

.split-panel h2 {
  margin-bottom: 14px;
  color: #f05a00;
  font-size: 1.05rem;
}

.split-empty {
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  color: #6b7280;
  font-size: 0.9rem;
}

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

.split-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 18px 120px;
  gap: 10px;
  align-items: center;
}

.slot-time {
  font-weight: 600;
  font-size: 0.9rem;
  color: #1f2937;
}

.slot-card {
  border-radius: 8px;
  padding: 6px 10px;
  background: #f1f1f1;
  color: #1f2937;
  min-height: 28px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.slot-title {
  font-weight: 600;
  font-size: 0.88rem;
}

.slot-sub {
  font-size: 0.78rem;
  opacity: 0.9;
}

.slot-grid {
  font-size: 0.72rem;
  color: rgba(31, 41, 55, 0.65);
}

.slot-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #6b7280;
  position: relative;
}

.slot-booking {
  font-size: 0.9rem;
  color: #374151;
}

.slot-booking a {
  color: inherit;
  text-decoration: none;
}

.slot-card.status-processed {
  background: #f06292;
  color: #ffffff;
}

.slot-card.status-booked {
  background: #e5e7eb;
  color: #374151;
}

.slot-card.status-not_arrived {
  background: #fb76b8;
  color: #ffffff;
}

.slot-card.grid-dow.status-not_arrived {
  background: #f06292;
  color: #ffffff;
}

.slot-card.grid-dow.status-booked {
  background: #f06292;
  color: #ffffff;
}

.slot-card.grid-rpc.status-buffer {
  background: #c4e6ff;
  color: #1f2937;
}

@keyframes statusPulse {
  0% { opacity: 1; }
  50% { opacity: 0.45; }
  100% { opacity: 1; }
}

@keyframes statusRipple {
  0% { transform: scale(0.6); opacity: 0.5; }
  100% { transform: scale(2.6); opacity: 0; }
}

.slot-dot.status-not_arrived,
.slot-dot.status-arrived {
  animation: statusPulse 1.6s ease-in-out infinite;
}

.slot-dot.status-not_arrived::after,
.slot-dot.status-arrived::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  border: 2px solid currentColor;
  opacity: 0;
  animation: statusRipple 1.6s ease-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .slot-dot.status-not_arrived,
  .slot-dot.status-arrived {
    animation: none;
  }

  .slot-dot.status-not_arrived::after,
  .slot-dot.status-arrived::after {
    animation: none;
  }
}

.slot-card.status-arrived {
  background: #0ea5e9;
  color: #ffffff;
}

.slot-card.status-buffer {
  background: #f4dddd;
  color: #7c2d12;
}

.slot-card.status-unknown {
  background: #f3e8ff;
  color: #4c1d95;
}

.slot-card.status-empty {
  background: #f1f1f1;
  color: #9ca3af;
}

.slot-card.grid-rpc {
  background: #03a9f4;
  color: #ffffff;
}

.slot-card.grid-bulk {
  background: #008080;
  color: #ffffff;
}

.slot-dot.status-processed { background: #f6d700; color: #f6d700; }
.slot-dot.status-not_arrived { background: #fb76b8; color: #fb76b8; }
.slot-dot.status-booked { background: #b5b3b6; color: #b5b3b6; }
.slot-dot.status-arrived { background: #22c55e; color: #22c55e; }
.slot-dot.status-buffer { background: #555555; color: #555555; }
.slot-dot.status-unknown { background: #7c4a0d; color: #7c4a0d; }
.slot-dot.status-empty { background: #e5e7eb; color: #e5e7eb; }

.btn-apply,
.btn-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(31, 41, 55, 0.18);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  background: #ffffff;
  color: #1f2937;
}

.btn-apply {
  background: #ffe6cf;
  border-color: rgba(201, 120, 59, 0.5);
  color: #7a3d13;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.85rem;
  background: #f3f4f6;
  color: #374151;
}

.status-badge.booked { background: #e5e7eb; color: #374151; }
.status-badge.processed { background: #e0f2fe; color: #0f4c75; }
.status-badge.not_arrived { background: #fef3c7; color: #92400e; }
.status-badge.buffer { background: #fff1f2; color: #9f1239; }
.status-badge.empty { background: #f0fdf4; color: #166534; }
.status-badge.arrived { background: #dcfce7; color: #166534; }
.status-badge.unknown { background: #f8fafc; color: #475569; }

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}
