:root {
  --app-bg: #f6f7f9;
  --app-border: #dde2e8;
}

body {
  background: var(--app-bg);
  color: #1f2933;
}

.app-shell {
  padding: 24px;
}

.page-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
}

.panel {
  background: #fff;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  padding: 18px;
}

.panel-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.panel-header h2 {
  font-size: 1rem;
  margin: 0;
}

.admin-side-panel {
  top: 18px;
}

.access-form-strip {
  background: #f8fafc;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  padding: 14px;
}

.access-form-strip .form-label {
  color: #667085;
  font-size: 0.8rem;
  margin-bottom: 4px;
}

.section-subtitle {
  color: #475467;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 10px;
}

.auth-layout {
  display: grid;
  min-height: calc(100vh - 96px);
  place-items: center;
}

.auth-panel {
  background: #fff;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  max-width: 420px;
  padding: 28px;
  width: 100%;
}

.toast-stack {
  bottom: 24px;
  max-width: 420px;
  position: fixed;
  right: 24px;
  width: calc(100vw - 48px);
  z-index: 1080;
}

.flash-toast {
  border-radius: 8px;
  margin-left: auto;
}

.flash-toast.fade-out {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.admin-card {
  background: #fff;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  color: inherit;
  display: block;
  min-height: 110px;
  padding: 18px;
  text-decoration: none;
}

.admin-card:hover {
  border-color: #9fb4ce;
  color: inherit;
}

.admin-card span {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}

.admin-card small {
  color: #667085;
}

.import-panel {
  max-width: 680px;
}

.metric {
  background: #fff;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  display: block;
  min-height: 96px;
  padding: 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}

.metric:hover {
  border-color: #9fb4ce;
  box-shadow: 0 6px 18px rgba(31, 41, 51, 0.06);
}

.metric span {
  color: #667085;
  display: block;
  font-size: 0.875rem;
  margin-bottom: 6px;
}

.metric strong {
  display: block;
  font-size: 1.5rem;
}

.import-preview-table td,
.import-preview-table th {
  white-space: nowrap;
}

.text-preline {
  white-space: pre-line;
}

.context-summary {
  background: #f2f5f8;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  padding: 12px;
}

.context-summary span,
.context-summary small {
  color: #667085;
  display: block;
  font-size: 0.85rem;
}

.context-summary strong {
  display: block;
  font-size: 1rem;
}

.timeline {
  display: grid;
  gap: 18px;
}

.timeline-section {
  display: grid;
  gap: 10px;
}

.timeline-section-title {
  align-items: center;
  display: flex;
  min-height: 24px;
}

.timeline-item {
  align-items: stretch;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 76px 1fr;
  overflow: hidden;
}

.timeline-date {
  align-items: center;
  background: #f2f5f8;
  border-right: 1px solid var(--app-border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px 8px;
  text-align: center;
}

.timeline-date strong {
  font-size: 0.95rem;
  line-height: 1.1;
}

.timeline-date span {
  color: #667085;
  font-size: 0.8rem;
}

.timeline-body {
  padding: 12px;
}

.timeline-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

@media (max-width: 575.98px) {
  .app-shell {
    padding: 16px;
  }

  .timeline-item {
    grid-template-columns: 64px 1fr;
  }
}
