:root {
  --navy: #0b1d33;
  --sky: #4daeeb;
  --yellow: #ffcb2e;
  --mint: #00d9ba;
  --coral: #ff6b6b;
  --white: #ffffff;
  --muted: #a9bfd2;
  --panel: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.16);
  font-family: "Poppins", "Inter", "Avenir Next", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(77, 174, 235, 0.16), transparent 34%),
    linear-gradient(180deg, #071728 0%, var(--navy) 60%, #081623 100%);
  font-family: "Poppins", "Inter", "Avenir Next", Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.admin-shell {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 2vw, 34px);
}

.admin-topbar,
.brand,
.admin-links,
.history-head,
.history-tools,
.publish-control,
.button-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-topbar {
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  width: 64px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--navy);
  background: var(--yellow);
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
}

.brand strong {
  display: block;
  font-size: clamp(24px, 2vw, 34px);
  line-height: 1;
}

.brand small,
.section-label,
label,
th,
td,
#save-status {
  color: var(--muted);
  font-weight: 800;
}

.brand small,
.section-label {
  text-transform: uppercase;
}

.admin-links a,
button,
select,
input {
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
}

.admin-links a {
  padding: 13px 16px;
  color: var(--navy);
  background: var(--sky);
}

.entry-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.8fr) minmax(0, 1.4fr);
  gap: 24px;
  margin-top: 26px;
}

.entry-panel,
.history-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.entry-panel {
  padding: clamp(20px, 2vw, 30px);
  display: grid;
  align-content: start;
  gap: 18px;
}

.history-panel {
  overflow: hidden;
}

.section-label {
  margin: 0 0 7px;
  color: var(--sky);
  font-size: 14px;
}

h1,
h2 {
  margin: 0;
  color: var(--white);
}

h1 {
  font-size: clamp(40px, 4vw, 62px);
  line-height: 1;
}

h2 {
  font-size: clamp(28px, 2.5vw, 40px);
}

label {
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field-grid[hidden] {
  display: none;
}

select,
input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid rgba(77, 174, 235, 0.36);
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

option {
  color: var(--navy);
}

button {
  min-height: 50px;
  padding: 0 20px;
  border: 0;
  color: var(--navy);
  background: var(--mint);
  cursor: pointer;
}

button.secondary {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.history-head {
  justify-content: space-between;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}

.goals-panel {
  border-bottom: 1px solid var(--line);
}

.goals-head {
  background: rgba(77, 174, 235, 0.06);
}

.goals-body {
  padding: 22px;
  display: grid;
  gap: 16px;
}

#goals-status {
  min-height: 20px;
}

.history-tools {
  justify-content: flex-end;
}

.publish-control {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.publish-control span {
  min-width: 105px;
  color: var(--yellow);
  font-weight: 900;
}

.publish-control.published span {
  color: var(--mint);
}

.publish-control button {
  min-height: 40px;
}

.history-head select {
  max-width: 220px;
}

.history-table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--sky);
  font-size: 13px;
  text-transform: uppercase;
}

td {
  color: #dbeaf7;
}

.result {
  font-weight: 900;
}

.data-status {
  display: inline-grid;
  place-items: center;
  min-width: 112px;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.data-status.verified {
  background: var(--mint);
}

.data-status.office-updated {
  background: var(--yellow);
}

.data-status.needs-review {
  color: var(--white);
  background: var(--coral);
}

.result.win {
  color: var(--mint);
}

.result.watch {
  color: var(--yellow);
}

.result.behind {
  color: var(--coral);
}

.row-actions {
  display: flex;
  gap: 8px;
}

.row-actions button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.row-actions .delete {
  background: var(--coral);
  color: var(--white);
}

@media (max-width: 980px) {
  .admin-topbar,
  .entry-layout,
  .field-grid,
  .history-tools,
  .publish-control,
  .history-head {
    display: flex;
    align-items: stretch;
    flex-direction: column;
  }
}
