:root {
  color-scheme: light;
  font-family: Inter, Arial, sans-serif;
  background: #f2f5ef;
  color: #172018;
}

* {
  box-sizing: border-box;
}

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

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 1.1fr) minmax(320px, 0.9fr);
}

.visual {
  min-height: 100vh;
}

.visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 28px;
  background: #f2f5ef;
}

.admin-page {
  min-height: 100vh;
  padding: 28px;
  background: #f2f5ef;
}

.panel-inner {
  width: min(480px, 100%);
}

.kicker {
  margin: 0 0 12px;
  font-size: 14px;
  text-transform: uppercase;
  color: #5a6b57;
}

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

h1 {
  font-size: 42px;
}

h2 {
  font-size: 30px;
}

h3 {
  font-size: 24px;
}

.intro {
  margin: 16px 0 0;
  font-size: 18px;
  line-height: 1.5;
  color: #455341;
}

.form,
.dashboard {
  padding: 28px;
  background: #ffffff;
  border: 1px solid #d6ded0;
  border-radius: 8px;
}

.form {
  margin-top: 32px;
}

.dashboard {
  width: min(980px, 100%);
  margin: 0 auto;
}

.tabs {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.tab-button {
  width: auto;
  margin-top: 0;
  background: #dfe9d9;
  color: #172018;
}

.tab-button.active {
  background: #166534;
  color: #ffffff;
}

.field {
  display: block;
}

.field + .field {
  margin-top: 18px;
}

.field span,
dt {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: #5a6b57;
}

input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #b8c7b2;
  border-radius: 8px;
  font: inherit;
  color: inherit;
  background: #fbfcfa;
}

button {
  margin-top: 20px;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  background: #166534;
  color: #ffffff;
}

button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.secondary {
  width: auto;
  margin-top: 0;
  background: #dfe9d9;
  color: #172018;
}

.danger {
  background: #b42318;
  color: #ffffff;
}

.message {
  min-height: 24px;
  margin: 16px 0 0;
  font-size: 14px;
  line-height: 1.5;
}

.message[data-tone="error"] {
  color: #b42318;
}

.message[data-tone="success"] {
  color: #166534;
}

.dashboard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.meta {
  display: grid;
  gap: 16px;
  margin: 24px 0 0;
}

.meta div {
  padding: 16px;
  border: 1px solid #d6ded0;
  border-radius: 8px;
  background: #f8faf6;
}

dd {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
}

.notice {
  margin-top: 24px;
  padding: 18px;
  border-radius: 8px;
  background: #eef6ea;
  color: #28412c;
  line-height: 1.6;
}

.upload-block {
  margin-top: 24px;
  padding-top: 8px;
}

.tab-panel {
  margin-top: 24px;
}

.section-head {
  margin-bottom: 16px;
}

.history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.upload-form {
  margin-top: 0;
}

input[type="file"] {
  height: auto;
  padding: 12px 14px;
  background: #fbfcfa;
}

.table-wrap {
  margin-top: 20px;
  overflow-x: auto;
  border: 1px solid #d6ded0;
  border-radius: 8px;
  background: #ffffff;
}

.data-table {
  width: 100%;
  min-width: 1280px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e3eadf;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
  line-height: 1.5;
}

.data-table th {
  background: #f8faf6;
  color: #4e5f4b;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

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

.row-actions button {
  width: auto;
  min-height: 36px;
  margin-top: 0;
  padding: 8px 12px;
  font-size: 13px;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 20;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 32, 24, 0.46);
}

.modal-card {
  position: relative;
  width: min(860px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 24px;
  border: 1px solid #d6ded0;
  border-radius: 8px;
  background: #ffffff;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.modal-form {
  margin-top: 20px;
}

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

.field-wide {
  grid-column: 1 / -1;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

.modal-actions button {
  width: auto;
  margin-top: 0;
}

.hidden {
  display: none;
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .visual {
    min-height: 28vh;
  }

  .panel,
  .visual {
    min-height: auto;
  }

  h1 {
    font-size: 36px;
  }

  .dashboard-head {
    flex-direction: column;
  }

  .modal-grid {
    grid-template-columns: 1fr;
  }
}
