:root {
  color: #17202a;
  background: #f4f7f6;
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

.app-shell {
  min-height: 100vh;
  padding: 32px;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 24px;
}

.status-panel,
.admin-panel,
.voter-panel,
.results-panel {
  width: min(920px, 100%);
  padding: 28px;
  border: 1px solid #d8dfdd;
  border-radius: 8px;
  background: #ffffff;
  display: grid;
  gap: 24px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #1d766f;
  border-radius: 6px;
  background: #1d766f;
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: #155b55;
}

button:disabled,
button:disabled:hover,
input:disabled,
textarea:disabled {
  border-color: #c9d1cf;
  background: #eef2f1;
  color: #6b777b;
  cursor: not-allowed;
}

.eyebrow {
  margin: 0 0 8px;
  color: #1d766f;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.2;
}

h2,
h3 {
  margin: 0;
  line-height: 1.25;
}

h2 {
  font-size: 24px;
}

h3 {
  font-size: 18px;
}

.summary {
  max-width: 560px;
  margin: 12px 0 0;
  color: #4d5b60;
  line-height: 1.5;
}

.status-list {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.status-list div {
  min-height: 96px;
  padding: 16px;
  border: 1px solid #e4e9e7;
  border-radius: 6px;
  background: #fbfcfc;
}

.contract-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.deployment-list,
.vote-id-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-status {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.vote-status {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.result-status {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

dt {
  margin-bottom: 8px;
  color: #526266;
  font-size: 13px;
  font-weight: 700;
}

dd {
  margin: 0;
  color: #18242a;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.message {
  min-height: 22px;
  margin: 0;
  color: #4d5b60;
  line-height: 1.45;
}

.notice,
.empty-state,
.validation-list {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid #d8dfdd;
  border-radius: 8px;
  background: #fbfcfc;
  color: #34464d;
  line-height: 1.45;
}

.notice {
  border-color: #d8ca8a;
  background: #fff9df;
}

.validation-list {
  padding-left: 32px;
  color: #6b3d21;
}

.validation-list li + li {
  margin-top: 6px;
}

.vote-form {
  display: grid;
  gap: 18px;
}

label {
  display: grid;
  gap: 7px;
  color: #526266;
  font-size: 13px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid #cfd8d5;
  border-radius: 6px;
  background: #ffffff;
  color: #17202a;
  font: inherit;
  font-weight: 400;
}

textarea {
  resize: vertical;
}

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

.candidate-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.candidate-list {
  display: grid;
  gap: 12px;
}

.candidate-row {
  margin: 0;
  padding: 16px;
  border: 1px solid #e1e8e6;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.candidate-row legend {
  padding: 0 6px;
  color: #253238;
  font-weight: 700;
}

.candidate-photo-status {
  min-height: 20px;
  margin: 0;
  color: #4d5b60;
  font-size: 13px;
}

.candidate-preview {
  width: 54px;
  height: 54px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #d8dfdd;
}

.candidate-preview-empty {
  display: inline-block;
  background: #eef2f1;
}

.candidate-vote-form,
.voter-candidate-list,
.result-list {
  display: grid;
  gap: 12px;
}

.voter-candidate,
.result-row {
  min-height: 78px;
  padding: 12px;
  border: 1px solid #e1e8e6;
  border-radius: 8px;
  display: grid;
  grid-template-columns: auto 54px 1fr;
  align-items: center;
  gap: 12px;
}

.voter-candidate input {
  width: 18px;
  min-height: 18px;
}

.candidate-meta {
  display: grid;
  gap: 6px;
  color: #4d5b60;
  font-weight: 400;
}

.candidate-meta strong {
  color: #17202a;
}

.vote-percent-bar {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eeec;
}

.vote-percent-bar span {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: #1d766f;
}

.winner-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f5c542;
  color: #17202a;
  font-size: 12px;
  font-weight: 700;
}

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

  .status-panel,
  .admin-panel,
  .voter-panel,
  .results-panel {
    padding: 20px;
  }

  .status-list,
  .time-grid,
  .candidate-row,
  .voter-candidate,
  .result-row {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 26px;
  }

  h2 {
    font-size: 21px;
  }

  button {
    width: 100%;
  }
}
