:root {
  --bg: #eef5f2;
  --card: #ffffff;
  --ink: #16251f;
  --muted: #64746d;
  --line: #d9e5df;
  --primary: #0b6b4f;
  --primary-dark: #084b39;
  --blue: #0d5d94;
  --danger: #b42318;
  --warning: #936300;
  --shadow: 0 24px 70px rgba(22, 37, 31, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(19, 126, 93, 0.18), transparent 34rem),
    linear-gradient(135deg, #f8fbf7 0%, var(--bg) 100%);
  font-family: "Aptos", "Segoe UI", sans-serif;
  min-height: 100vh;
}

a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 700;
}

.site-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.site-header span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.brand {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  gap: 0.8rem;
  min-width: 0;
}

.brand-logo {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(22, 37, 31, 0.1);
  display: block;
  flex: 0 0 auto;
  height: 52px;
  object-fit: contain;
  padding: 0.25rem;
  width: 52px;
}

.brand-text {
  display: block;
  min-width: 0;
}

.admin-nav {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.page {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(1rem, 4vw, 3rem);
}

.public-card,
.admin-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: clamp(1rem, 4vw, 2.5rem);
}

.public-card {
  max-width: 780px;
  margin: 0 auto;
}

.login-card {
  max-width: 480px;
}

.success-card {
  text-align: center;
}

.eyebrow {
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 0.6rem;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(1.55rem, 4.5vw, 2.65rem);
  line-height: 1.08;
}

h2 {
  font-size: 1.2rem;
}

.card-heading p:not(.eyebrow) {
  color: var(--muted);
}

.form-grid,
.filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.filter-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  align-items: end;
  margin: 1.2rem 0;
}

label {
  display: grid;
  gap: 0.4rem;
  color: var(--ink);
  font-weight: 800;
}

.full {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: #fbfdfc;
  min-height: 52px;
  padding: 0.95rem 1rem;
  font: inherit;
}

input[readonly] {
  color: var(--primary-dark);
  background: #edf7f3;
  font-weight: 900;
}

small {
  color: var(--muted);
  font-weight: 500;
  line-height: 1.35;
}

.unit-picker {
  display: grid;
  gap: 1rem;
}

.unit-picker-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.field-title {
  color: var(--ink);
  font-weight: 800;
}

.field-help {
  color: var(--muted);
  font-weight: 500;
  line-height: 1.35;
  margin: 0;
}

.proof-uploader {
  display: grid;
  gap: 0.65rem;
}

.proof-choice-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.proof-choice {
  background: #fbfdfc;
  border: 1px solid var(--line);
  border-radius: 18px;
  cursor: pointer;
  display: grid;
  gap: 0.35rem;
  min-height: 128px;
  overflow: hidden;
  padding: 1rem;
  position: relative;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.proof-choice:hover,
.proof-choice:focus-within,
.proof-choice.is-selected {
  border-color: var(--primary);
  box-shadow: 0 14px 32px rgba(11, 107, 79, 0.14);
  transform: translateY(-1px);
}

.proof-choice strong {
  line-height: 1.15;
}

.proof-choice input[type="file"] {
  cursor: pointer;
  inset: 0;
  min-height: 100%;
  opacity: 0;
  padding: 0;
  position: absolute;
}

.proof-icon {
  align-items: center;
  background: #e8f2ee;
  border-radius: 999px;
  color: var(--primary-dark);
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 900;
  height: 42px;
  justify-content: center;
  letter-spacing: 0.04em;
  width: 42px;
}

.proof-selected {
  color: var(--primary-dark);
  font-weight: 800;
  margin: 0;
}

button,
.primary-button,
.secondary-button,
.danger-button {
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 0.8rem 1.1rem;
  font: inherit;
  font-weight: 900;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.primary-button.full {
  width: 100%;
}

.secondary-button {
  color: var(--primary-dark);
  background: #e8f2ee;
}

.danger-button {
  color: #fff;
  background: var(--danger);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.small {
  min-height: 34px;
  padding: 0.45rem 0.7rem;
  font-size: 0.85rem;
}

.alert {
  border: 1px solid #b8d8ca;
  background: #eef9f4;
  border-radius: 18px;
  padding: 0.9rem 1rem;
  margin: 1rem 0;
}

.alert p {
  margin: 0.2rem 0;
}

.alert-error {
  border-color: #f2b8b5;
  background: #fff1f0;
  color: var(--danger);
}

.alert-warning {
  border-color: #f5d996;
  background: #fff8e4;
  color: var(--warning);
}

.admin-heading,
.button-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.summary-grid,
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.85rem;
  margin: 1rem 0;
}

.summary-grid article,
.detail-grid article,
.compact-details,
.note-box {
  border: 1px solid var(--line);
  background: #fbfdfc;
  border-radius: 18px;
  padding: 1rem;
}

.summary-grid span,
.detail-grid span {
  color: var(--muted);
  display: block;
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
}

.summary-grid strong {
  font-size: 1.5rem;
}

.split-list,
.admin-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 0.75rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: #edf7f3;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.status {
  border-radius: 999px;
  background: #e8f2ee;
  color: var(--primary-dark);
  display: inline-block;
  font-weight: 900;
  padding: 0.35rem 0.6rem;
}

.inline-form {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 760px) {
  .form-grid,
  .split-list,
  .admin-columns,
  .unit-picker-row,
  .proof-choice-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand-logo {
    height: 44px;
    width: 44px;
  }

  .page {
    padding: 0.85rem;
  }

  .public-card,
  .admin-panel {
    border-radius: 20px;
    padding: 1rem;
  }

  h1 {
    font-size: 1.55rem;
    line-height: 1.12;
  }

  .card-heading p:not(.eyebrow) {
    font-size: 0.95rem;
  }

  input,
  select,
  textarea {
    min-height: 54px;
  }

  button,
  .primary-button,
  .secondary-button,
  .danger-button,
  .proof-choice {
    width: 100%;
  }
}
