:root {
  --bg: #f6f8fb;
  --card: #ffffff;
  --line: #d9e0ea;
  --text: #1d2939;
  --muted: #667085;
  --primary: #0b5cab;
  --ok: #067647;
  --danger: #b42318;
}
body { background: var(--bg); color: var(--text); }
.hero-block { margin: 1rem 0 1.5rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; color: var(--primary); font-weight: 700; margin-bottom: .3rem; }
.lead { color: var(--muted); font-size: 1.05rem; }
.guidance-box, .submission-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  margin: 1rem 0 1.25rem;
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
.policy-summary-card {
  margin-bottom: 1.5rem;
}
.policy-scroll {
  max-height: 220px;
  overflow-y: auto;
  padding-right: .5rem;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.full { grid-column: 1 / -1; }
label { display:block; font-weight:600; margin-bottom:.35rem; }
input[type="text"], input[type="email"], input[type="number"], input[type="file"], textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: .7rem .8rem;
  background: white;
}
input[type="file"] {
  padding: .55rem .7rem;
}
textarea { min-height: 120px; resize: vertical; }
.help-text, .muted, .small-note { color: var(--muted); font-size: .94rem; }
.selected-files {
  margin-top: .55rem;
  color: var(--muted);
  font-size: .94rem;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .45rem .7rem;
  background: #f8fafc;
}
.checkrow { display:flex; gap:.65rem; align-items:flex-start; margin: .9rem 0; font-weight:400; }
.checkrow input[type="checkbox"] { margin-top: .3rem; width: auto; }
.actions { display:flex; gap:.8rem; align-items:center; flex-wrap:wrap; margin-top: 1rem; }
button {
  background: var(--primary);
  color:white;
  border:0;
  border-radius: 10px;
  padding: .75rem 1rem;
  font-weight:700;
}
.secondary-btn {
  background: #eef4fb;
  color: var(--primary);
  border: 1px solid #c8dcf3;
}
.progress {
  width: 260px;
  max-width:100%;
  height: 10px;
  background:#e7edf5;
  border-radius: 999px;
  overflow:hidden;
  display:block;
}
.bar {
  width: 0%;
  height:100%;
  background: var(--primary);
  transition: width .2s ease;
}
.submission-status {
  display: grid;
  gap: .45rem;
  min-width: min(320px, 100%);
  color: var(--primary);
  font-weight: 600;
}
.submission-status-row {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  min-height: 1.5rem;
}
.submission-spinner {
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  border: 2px solid rgba(11, 92, 171, .18);
  border-top-color: var(--primary);
  animation: submission-spin .8s linear infinite;
  flex: 0 0 auto;
}
.is-submitting button[type="submit"] {
  opacity: .85;
  cursor: wait;
}
.is-finalizing #progress-bar {
  width: 100% !important;
  background: linear-gradient(90deg, rgba(11, 92, 171, .2) 0%, var(--primary) 35%, rgba(11, 92, 171, .2) 70%);
  background-size: 200% 100%;
  animation: submission-bar-slide 1s linear infinite;
}
.ok { color: var(--ok); font-weight:700; }
.danger { color: var(--danger); font-weight:700; }
@keyframes submission-spin {
  to { transform: rotate(360deg); }
}
@keyframes submission-bar-slide {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}
.modal-backdrop {
  display:none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.5);
  align-items:center;
  justify-content:center;
  padding: 1rem;
  z-index: 999;
}
.modal-card {
  width: min(760px, 100%);
  max-height: 85vh;
  overflow:auto;
  background: white;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 20px 60px rgba(2, 6, 23, .25);
}
.modal-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--line);
}
.modal-body { padding: 1rem 1.2rem 1.2rem; }
.link-btn {
  background: transparent;
  color: var(--primary);
  padding: .2rem;
}
.inline-link {
  display: inline;
  border: 0;
  font-weight: 600;
  text-decoration: underline;
  vertical-align: baseline;
}
.tool-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 10px;
  padding: .75rem 1rem;
  font-weight: 700;
}
.tool-link:hover,
.tool-link:focus {
  color: white;
  filter: brightness(.96);
}
.modal-open {
  overflow: hidden;
}
@media (max-width: 760px) {
  .form-grid { grid-template-columns: 1fr; }
}

.admin-shell {
  display: grid;
  gap: 1rem;
}
.admin-page #title-block-header {
  display: none;
}
.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .8rem;
}
.admin-eyebrow {
  margin-bottom: 0;
}
.admin-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.1rem 1.2rem;
  box-shadow: 0 8px 28px rgba(15, 23, 42, .06);
}
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  flex-wrap: wrap;
}
.admin-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.admin-title {
  margin: 0;
}
.admin-status {
  color: var(--muted);
  font-size: .95rem;
}
.admin-table-wrap {
  overflow-x: auto;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}
.admin-table th,
.admin-table td {
  padding: .9rem .95rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.admin-table th {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  background: #f8fafc;
}
.admin-table strong {
  display: block;
}
.admin-meta {
  color: var(--muted);
  font-size: .92rem;
}
.status-pill {
  display: inline-block;
  border-radius: 999px;
  padding: .3rem .65rem;
  font-size: .82rem;
  font-weight: 700;
}
.status-pill.synced {
  background: #dcfce7;
  color: #166534;
}
.status-pill.pending,
.status-pill.failed {
  background: #fee2e2;
  color: #991b1b;
}
.admin-empty,
.admin-error {
  padding: 1.2rem 0 .2rem;
}
.admin-error {
  color: var(--danger);
  font-weight: 600;
}
