/* DayTrace Recruit service-UI layout - reuses the --dt-* variables defined
   by wp-assets/mu-plugins/daytrace-style.css so light/dark mode and card
   styling stay visually consistent with existing post content. */

* { box-sizing: border-box; }

body {
  background: var(--dt-bg);
  color: var(--dt-text);
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Apple SD Gothic Neo", sans-serif;
  padding-bottom: 0 !important; /* no fixed pagination bar on this theme */
}

.dt-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Header ---------- */

.dt-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--dt-bg);
  border-bottom: 1px solid var(--dt-card-border);
}

.dt-header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.85rem 1.25rem;
  max-width: 960px;
  margin: 0 auto;
}

.dt-root-link {
  color: var(--dt-muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.dt-root-link:hover {
  color: var(--dt-text);
}

.dt-logo {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--dt-text);
  text-decoration: none;
  white-space: nowrap;
}

.dt-nav {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
  flex: 1;
}

.dt-nav a {
  color: var(--dt-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}

.dt-nav a:hover { color: var(--dt-text); }

.dt-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dt-nav-toggle {
  display: none;
  border: 1px solid var(--dt-card-border);
  background: var(--dt-card-bg);
  color: var(--dt-text);
  border-radius: 6px;
  width: 36px;
  height: 36px;
  font-size: 1.1rem;
  cursor: pointer;
}

@media (max-width: 720px) {
  .dt-nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    gap: 0;
    padding-top: 0.5rem;
  }
  .dt-nav.dt-nav-open { display: flex; }
  .dt-nav a { padding: 0.6rem 0; border-top: 1px solid var(--dt-list-border); }
  .dt-header-inner { flex-wrap: wrap; gap: 0.6rem 1rem; }
  .dt-root-link { font-size: 0.75rem; }
  .dt-nav-toggle { display: inline-block; }
}

/* ---------- Hero / search ---------- */

.dt-hero {
  padding: 2.5rem 1.25rem 1.5rem;
  max-width: 960px;
  margin: 0 auto;
}

.dt-hero h1 {
  font-size: 1.7rem;
  margin: 0 0 0.9rem;
}

.dt-search-form {
  display: flex;
  gap: 0.5rem;
  max-width: 520px;
}

.dt-search-input {
  flex: 1;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--dt-card-border);
  border-radius: 6px;
  background: var(--dt-card-bg);
  color: var(--dt-text);
  font-size: 0.95rem;
}

.dt-search-submit {
  padding: 0.65rem 1.1rem;
  border: none;
  border-radius: 6px;
  background: var(--dt-dday-text);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

/* ---------- Summary cards ---------- */

.dt-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
  max-width: 960px;
  margin: 0 auto 2rem;
  padding: 0 1.25rem;
}

.dt-summary-card {
  display: block;
  padding: 1rem 1.1rem;
  border: 1px solid var(--dt-card-border);
  border-radius: 10px;
  background: var(--dt-card-bg);
  text-decoration: none;
  color: var(--dt-text);
}

.dt-summary-card .dt-summary-n {
  font-size: 1.6rem;
  font-weight: 800;
}

.dt-summary-card .dt-summary-label {
  font-size: 0.82rem;
  color: var(--dt-muted);
  margin-top: 0.2rem;
}

/* ---------- Sections / list ---------- */

.dt-section {
  max-width: 960px;
  margin: 0 auto 2.2rem;
  padding: 0 1.25rem;
}

.dt-section h2 {
  font-size: 1.15rem;
  margin: 0 0 0.9rem;
}

.dt-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--dt-list-border);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  text-decoration: none;
  color: var(--dt-text);
  flex-wrap: wrap;
}

.dt-list-item:hover { border-color: var(--dt-dday-text); }

.dt-list-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.dt-list-title { font-weight: 700; }

.dt-list-sub {
  font-size: 0.85rem;
  color: var(--dt-muted);
}

.dt-empty {
  padding: 1.5rem;
  text-align: center;
  color: var(--dt-muted);
  border: 1px dashed var(--dt-card-border);
  border-radius: 8px;
}

/* ---------- Entity Core Page ---------- */

.dt-entity-header {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.25rem 1rem;
}

.dt-entity-header h1 { font-size: 1.55rem; margin: 0 0 0.4rem; }

.dt-next-action {
  max-width: 960px;
  margin: 0 auto 1.5rem;
  padding: 1.1rem 1.25rem;
  background: var(--dt-card-bg);
  border: 1px solid var(--dt-card-border);
  border-radius: 10px;
}

.dt-next-action .dt-label {
  font-size: 0.8rem;
  color: var(--dt-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dt-next-action .dt-title { font-weight: 700; font-size: 1.05rem; margin: 0.2rem 0; }

.dt-status-line {
  max-width: 960px;
  margin: 0 auto 1.5rem;
  padding: 0 1.25rem;
  font-size: 1rem;
}

.dt-annual-table-wrap {
  max-width: 960px;
  margin: 0 auto 1.5rem;
  padding: 0 1.25rem;
  overflow-x: auto;
}

.dt-annual-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.dt-annual-table th, .dt-annual-table td {
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid var(--dt-list-border);
  text-align: left;
  white-space: nowrap;
}

.dt-annual-table th { color: var(--dt-muted); font-weight: 600; font-size: 0.8rem; }

.dt-status-active { color: #16a34a; font-weight: 700; }
:root[data-theme="dark"] .dt-status-active { color: #4ade80; }

.dt-data-info {
  max-width: 960px;
  margin: 0 auto 2rem;
  padding: 0 1.25rem;
  font-size: 0.8rem;
  color: var(--dt-muted);
}

/* ---------- Footer ---------- */

.dt-site-footer {
  border-top: 1px solid var(--dt-card-border);
  margin-top: 3rem;
  padding: 2rem 1.25rem 3rem;
  font-size: 0.85rem;
  color: var(--dt-muted);
}

.dt-footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
}

.dt-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.dt-footer-links a { color: var(--dt-muted); text-decoration: none; }
.dt-footer-links a:hover { color: var(--dt-text); }

.dt-footer-disclaimer {
  max-width: 960px;
  margin: 1.25rem auto 0;
  font-size: 0.78rem;
  opacity: 0.8;
}

/* ---------- Filter form ---------- */

.dt-filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  max-width: 960px;
  margin: 0 auto 1.5rem;
  padding: 0 1.25rem;
}

.dt-filter-form select {
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--dt-card-border);
  border-radius: 6px;
  background: var(--dt-card-bg);
  color: var(--dt-text);
  font-size: 0.9rem;
}

.dt-filter-form button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  background: var(--dt-dday-text);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
}

.dt-filter-reset {
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  border: 1px solid var(--dt-card-border);
  background: transparent;
  color: var(--dt-muted);
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
}

/* ---------- Event card grid ---------- */

.dt-event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  max-width: 960px;
  margin: 0 auto 2rem;
  padding: 0 1.25rem;
}

.dt-event-card {
  display: block;
  border: 1px solid var(--dt-card-border);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: var(--dt-text);
  background: var(--dt-card-bg);
}

.dt-event-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  background: var(--dt-list-border);
}

.dt-event-card-body { padding: 0.7rem 0.85rem 0.9rem; }

.dt-event-card-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dt-event-card-meta {
  font-size: 0.8rem;
  color: var(--dt-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

/* ---------- Event detail page ---------- */

.dt-detail-hero {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.25rem 0;
}

.dt-detail-hero img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.dt-detail-hero h1 { font-size: 1.5rem; margin: 0 0 0.6rem; }

.dt-detail-facts {
  max-width: 720px;
  margin: 0 auto 1.5rem;
  padding: 0 1.25rem;
}

.dt-fact-row {
  display: flex;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--dt-list-border);
  font-size: 0.92rem;
}

.dt-fact-label { width: 5em; flex-shrink: 0; color: var(--dt-muted); }

.dt-computed-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.8rem 0;
}

.dt-badge {
  display: inline-block;
  padding: 0.2em 0.7em;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--dt-tag-bg);
  color: var(--dt-tag-text);
}

.dt-detail-body {
  max-width: 720px;
  margin: 0 auto 1.5rem;
  padding: 0 1.25rem;
}

.dt-related-links {
  max-width: 720px;
  margin: 0 auto 2rem;
  padding: 0 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.dt-related-links a {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--dt-card-border);
  border-radius: 999px;
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--dt-text);
}

.dt-calendar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}
.dt-cal-btn {
  display: inline-block;
  padding: 0.4em 0.9em;
  border: 1px solid rgba(128, 128, 128, 0.35);
  border-radius: 8px;
  font-size: 0.85rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.dt-cal-btn:hover {
  border-color: currentColor;
  background-color: rgba(128, 128, 128, 0.08);
}

.dt-fav-btn {
  display: inline-block;
  padding: 0.4em 0.9em;
  border: 1px solid rgba(128, 128, 128, 0.35);
  border-radius: 8px;
  font-size: 0.85rem;
  background: none;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
  margin: 0 0 0.75rem;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.dt-fav-btn:hover {
  border-color: currentColor;
  background-color: rgba(128, 128, 128, 0.08);
}
.dt-fav-btn.dt-fav-saved {
  border-color: #e0245e;
  color: #e0245e;
}
.dt-fav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.dt-fav-list li {
  padding: 0.6rem 0.9rem;
  border: 1px solid rgba(128, 128, 128, 0.25);
  border-radius: 8px;
}
.dt-fav-gone {
  color: var(--dt-muted, #888);
  font-size: 0.8rem;
}
