:root {
  --bg: #f5f2ed;
  --bg-2: #fbfaf7;
  --line: rgba(45, 45, 58, 0.14);
  --text: #2d2d3a;
  --muted: #8c8279;
  --primary: #5d7b6f;
  --primary-dark: #4a665b;
  --accent: #c4a882;
  --card: #fbfaf7;
  --shadow: 0 2px 8px rgba(45,45,58,0.08);
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Assistant', system-ui, sans-serif;
  color: var(--text);
  background: #f5f2ed;
  padding: 14px;
  -webkit-font-smoothing: antialiased;
}

.display-header {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 12px;
  align-items: stretch;
}

.clock-panel,
.title-panel,
.status-panel {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow);
  border-radius: 18px;
  padding: 12px 14px;
}

.label {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 700;
}

.now-time {
  margin: 4px 0;
  font-weight: 700;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  color: var(--primary-dark);
  font-weight: 800;
  line-height: 1;
}

.now-date {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.title-panel {
  display: grid;
  align-content: center;
  text-align: center;
  background: linear-gradient(135deg, rgba(93, 123, 111, 0.16), rgba(255, 255, 255, 0.95));
}

.title-panel h1 {
  margin: 0;
  font-weight: 700;
  font-size: clamp(1.35rem, 2.6vw, 2.2rem);
}

.title-panel p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 600;
}

.status-panel {
  display: grid;
  align-content: center;
  gap: 8px;
  justify-items: start;
}

.range-text {
  margin: 0;
  font-weight: 700;
  font-size: 1.12rem;
  color: var(--accent);
  font-weight: 700;
}

.countdown-text {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 700;
}

.back-link {
  color: var(--primary-dark);
  font-weight: 700;
}

.notifications-wrap {
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(93, 123, 111, 0.14);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 10px 12px;
}

.notifications-wrap h2 {
  margin: 0 0 8px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary-dark);
}

.notifications-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  max-height: 176px;
  overflow-y: auto;
  scroll-behavior: smooth;
  padding-left: 4px;
}

.notice-item {
  background: rgba(237, 245, 252, 0.9);
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--primary);
  border-radius: 10px;
  padding: 8px 10px;
  font-weight: 600;
  min-height: 56px;
}

.notice-item.critical {
  border-inline-start-color: var(--accent);
  background: rgba(255, 239, 223, 0.85);
}

.table-wrap {
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(93, 123, 111, 0.16);
  border-radius: 16px;
  overflow: auto;
  box-shadow: var(--shadow);
}

.display-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.display-table th,
.display-table td {
  border: 1px solid rgba(93, 123, 111, 0.10);
  padding: 6px 8px;
  text-align: center;
  vertical-align: middle;
}

.display-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(135deg, #ede8e0, #dfdbd2);
  color: #2d2d3a;
  font-size: 0.92rem;
}

.display-table .time-col {
  position: sticky;
  right: 0;
  z-index: 3;
  width: 72px;
  background: linear-gradient(135deg, #5d7b6f, #4a665b);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
}

.slot-empty {
  color: var(--muted);
  opacity: 0.5;
  font-size: 0.8rem;
}

.slot-booked {
  background: rgba(93, 123, 111, 0.07);
  border-radius: 6px;
  font-size: 0.92rem;
  line-height: 1.4;
  padding: 4px 6px;
}

.slot-booked .meta {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}

.live-row .time-col,
.live-row td {
  box-shadow: inset 0 0 0 2px rgba(196, 168, 130, 0.36);
}

@media (max-width: 1050px) {
  .display-header {
    grid-template-columns: 1fr;
  }

  .status-panel {
    justify-items: stretch;
  }

  .notifications-list {
    grid-template-columns: 1fr;
  }
}
