:root {
  font-family:
    Inter,
    Segoe UI,
    Arial,
    sans-serif;
  color: #29382f;
  background: #f2f5f0;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --green: #326343;
  --green-deep: #254d35;
  --green-soft: #e8f1e8;
  --line: #dce4dc;
  --muted: #78867c;
  --gold: #b08b3e;
  --surface: #fff;
  --ink: #29382f;
  --subtle: #f7f9f6;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background: #f4f6f2;
  font-size: 14px;
}
button {
  cursor: pointer;
  font:
    600 12px Segoe UI,
    Arial,
    sans-serif;
  color: #435849;
  border: 1px solid #cbd8cb;
  background: #fff;
  border-radius: 6px;
  padding: 8px 12px;
  transition:
    background 0.14s,
    border-color 0.14s,
    box-shadow 0.14s;
}
button:hover:not(:disabled) {
  background: #f0f6ef;
  border-color: #9fb89f;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #9bc99d;
  outline-offset: 2px;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
.topbar {
  height: 68px;
  padding: 0 30px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 4;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}
.brand-mark {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--green);
  color: #fff;
  font: bold 12px Georgia;
  border: 2px solid #d3e2ce;
  box-shadow: 0 0 0 1px var(--green);
}
.brand strong,
.brand small {
  display: block;
}
.brand strong {
  font: 700 15px Georgia;
  color: #34553c;
}
.brand small {
  margin-top: 3px;
  font-size: 10px;
  color: var(--muted);
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #5f7064;
  font-size: 12px;
}
.top-actions a {
  color: #416e4d;
  text-decoration: none;
  font-weight: 600;
}
.top-actions a:hover {
  text-decoration: underline;
}
.quiet-button {
  padding: 7px 11px;
  color: #64736a;
}
main {
  max-width: 1760px;
  margin: 0 auto;
  padding: 24px 28px;
}
#adminAccess {
  margin: 40px auto;
  max-width: 560px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
  color: #53665a;
}
#adminAccess a {
  color: var(--green);
}
#adminArea {
  display: grid;
  grid-template-columns: 226px minmax(0, 1fr);
  gap: 25px;
  align-items: start;
}
.sidebar {
  position: sticky;
  top: 88px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 9px;
  min-height: calc(100vh - 108px);
  display: flex;
  flex-direction: column;
}
.nav-label {
  padding: 4px 10px 10px;
  margin: 0;
  color: #98a39b;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
}
.admin-tabs {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.admin-tabs button {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 5px;
  padding: 10px;
  color: #617066;
  font:
    600 12px Segoe UI,
    Arial,
    sans-serif;
}
.admin-tabs button > span:first-child {
  width: 20px;
  height: 20px;
  flex: none;
  display: grid;
  place-items: center;
  color: #77897b;
  font-size: 15px;
}
.admin-tabs button.selected {
  background: var(--green-soft);
  color: var(--green-deep);
  box-shadow: inset 3px 0 var(--green);
}
.admin-tabs button.selected > span:first-child {
  color: var(--green);
}
.sidebar-note {
  margin: auto 5px 3px;
  padding: 11px 9px;
  border-top: 1px solid #edf0eb;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #829087;
  font-size: 10px;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #70aa71;
  box-shadow: 0 0 0 3px #eaf3e9;
}
.workspace {
  min-width: 0;
}
.page-heading {
  min-height: 77px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 2px 14px;
  border-bottom: 1px solid var(--line);
}
.page-heading .eyebrow {
  margin: 0 0 6px;
  color: #849287;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
}
.page-heading h1 {
  margin: 0;
  color: #304839;
  font: 600 23px Georgia;
}
.page-heading p:not(.eyebrow) {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.revision-chip {
  flex: none;
  padding: 6px 9px;
  border: 1px solid #e0e7df;
  border-radius: 5px;
  background: #fafcf9;
  color: #738176;
  font-size: 10px;
}
#adminMessage {
  min-height: 0;
  margin: 0;
  color: #41704c;
  font-size: 11px;
}
#adminMessage:not(:empty) {
  margin: 10px 0 12px;
  padding: 9px 11px;
  border: 1px solid #d7e8d5;
  border-radius: 5px;
  background: #edf6eb;
}
h2 {
  margin: 18px 0 8px;
  color: #344e3b;
  font: 600 18px Georgia;
}
h3 {
  margin: 0;
  color: #42584a;
  font:
    600 14px Segoe UI,
    Arial,
    sans-serif;
}
.muted {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}
.section-intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 16px 0 14px;
}
.section-intro h2 {
  margin: 0 0 6px;
}
.section-intro p {
  margin: 0;
  max-width: 780px;
}
.columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(250px, 1fr));
  gap: 14px;
}
.panel {
  padding: 16px 18px;
  margin: 12px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
}
.panel > p:first-of-type {
  margin-top: 7px;
}
.panel-heading {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding-bottom: 12px;
  margin-bottom: 9px;
  border-bottom: 1px solid #edf0ec;
}
.panel-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}
.settings-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 6px;
  background: #f1f4e9;
  color: #7c8c4d;
  font-size: 16px;
}
.setting-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  align-items: center;
  gap: 15px;
  min-height: 43px;
  margin: 0;
  border-bottom: 1px solid #eef1ed;
  font-size: 11px;
  font-weight: 500;
  color: #596a5e;
}
.setting-field:last-of-type {
  border: 0;
}
.note-box {
  margin-top: 12px;
  padding: 10px 11px;
  border-left: 3px solid #d1b365;
  background: #fbf8ee;
  color: #81764f;
  font-size: 10px;
  line-height: 1.5;
}
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 15px 0 24px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.form-actions .muted {
  max-width: 600px;
}
.primary {
  border: 1px solid #2e6041;
  background: var(--green);
  color: #fff;
  border-radius: 5px;
  padding: 9px 14px;
  font:
    600 11px Segoe UI,
    Arial,
    sans-serif;
  box-shadow: 0 1px 2px #17382222;
}
.primary:hover:not(:disabled) {
  background: #285538;
  border-color: #285538;
  color: #fff;
}
input,
select,
textarea {
  font:
    12px Segoe UI,
    Arial,
    sans-serif;
  color: #34493a;
  background: #fff;
  border: 1px solid #cfd9cf;
  border-radius: 5px;
  padding: 8px 9px;
  max-width: 100%;
  outline: none;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #7da483;
  box-shadow: 0 0 0 3px #e5f0e5;
}
input[type="number"] {
  width: 100%;
  font-variant-numeric: tabular-nums;
}
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}
label {
  display: block;
  margin: 11px 0 5px;
  font-size: 11px;
  font-weight: 600;
  color: #526458;
}
label > input,
label > select {
  display: block;
  margin-top: 5px;
  width: 100%;
}
.setting-field input {
  height: 29px;
  padding: 5px 8px;
  text-align: right;
}
.level-list {
  min-height: 250px;
  resize: vertical;
  font:
    11px/1.6 ui-monospace,
    Consolas,
    monospace;
  white-space: pre;
}
.table-wrap {
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin: 13px 0;
  max-width: 100%;
  overscroll-behavior-inline: contain;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 11px;
}
th,
td {
  padding: 10px 10px;
  border-bottom: 1px solid #e9eee9;
  text-align: left;
  white-space: nowrap;
}
th {
  position: sticky;
  top: 0;
  background: #f3f6f2;
  color: #637368;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #f8fbf7;
}
td small {
  display: block;
  color: #89968c;
  margin-top: 4px;
  font-size: 9px;
}
td strong {
  font-size: 11px;
  font-weight: 650;
  color: #34493a;
}
.admin-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 17px 0 4px;
}
.admin-summary > div {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 3px 8px;
  padding: 11px 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.admin-summary span {
  font-size: 10px;
  font-weight: 600;
  color: #68776d;
}
.admin-summary strong {
  grid-column: 2;
  grid-row: 1/3;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  color: #335d40;
}
.admin-summary small {
  font-size: 9px;
  color: #98a39b;
}
.search-form {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 14px 0 11px;
}
.search-input {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(430px, 55vw);
  margin: 0;
  padding: 0 10px;
  border: 1px solid #cfd9cf;
  border-radius: 5px;
  background: #fff;
  color: #85948a;
}
.search-input:focus-within {
  border-color: #7da483;
  box-shadow: 0 0 0 3px #e5f0e5;
}
.search-input > span {
  font-size: 18px;
  line-height: 1;
}
.search-input input {
  width: 100%;
  border: 0;
  box-shadow: none !important;
  padding: 9px 0;
}
.search-form > span {
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
}
.status-badge {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
}
.status-badge.is-active {
  background: #e8f3e8;
  color: #3b7449;
}
.status-badge.is-suspended {
  background: #f8e9e6;
  color: #a45447;
}
.row-action {
  padding: 6px 9px;
  font-size: 10px;
}
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin: 13px 0;
  color: #77867b;
  font-size: 10px;
}
.pager > div {
  display: flex;
  gap: 6px;
}
.pager button {
  font-size: 10px;
}
.admin-crop-thumb {
  display: block;
  width: 48px;
  height: 38px;
  object-fit: contain;
}
.vip-admin-plan {
  max-width: 360px;
}
.catalog-table input[type="number"] {
  width: 85px;
  padding: 6px;
}
.catalog-table input[type="text"] {
  width: 135px;
}
.catalog-table th {
  font-size: 9px;
}
.catalog-table td {
  padding: 6px 5px;
}
.catalog-table input[type="checkbox"] {
  display: block;
  margin: auto;
}
.add-crop {
  display: flex;
  gap: 9px;
  align-items: end;
  flex-wrap: wrap;
}
.add-crop label {
  min-width: 130px;
  flex: 1;
}
.add-crop input {
  max-width: none;
}
.plans-table input {
  width: 170px;
}
.plans-table input[type="number"] {
  width: 100px;
}
.player-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 14px;
}
.player-grid input[type="number"] {
  width: 100%;
}
details {
  margin: 16px 0;
}
summary {
  cursor: pointer;
  font-weight: 600;
  color: #5c7062;
  font-size: 11px;
  margin-bottom: 10px;
}
textarea {
  display: block;
  width: 100%;
  min-height: 170px;
  line-height: 1.5;
}
#playerError {
  min-height: 16px;
  color: #ad5849;
  font-size: 11px;
}
dialog {
  width: min(850px, 95vw);
  max-height: 90vh;
  overflow: auto;
  padding: 22px 26px;
  border: 1px solid #ccd9cc;
  border-radius: 8px;
  background: #fff;
  color: #34483a;
  box-shadow: 0 18px 60px #1c332344;
}
dialog::backdrop {
  background: #20362866;
  backdrop-filter: none;
}
.dialog-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
.dialog-title h2 {
  margin: 0;
}
.dialog-title button {
  border: 0;
  background: transparent;
  font-size: 22px;
  padding: 2px 7px;
}
.denied {
  padding: 40px;
  text-align: center;
  font: 18px Georgia;
  color: #576b5b;
}
code {
  font:
    11px ui-monospace,
    Consolas,
    monospace;
  background: #eef2eb;
  padding: 3px 5px;
  border-radius: 4px;
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 15px;
}
legend {
  padding: 0 6px;
  color: #526458;
  font-size: 11px;
  font-weight: 700;
}
[hidden] {
  display: none !important;
}
@media (max-width: 1050px) {
  main {
    padding: 18px 16px;
  }
  #adminArea {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 17px;
  }
  .sidebar {
    top: 84px;
  }
  .columns {
    grid-template-columns: 1fr;
  }
  .admin-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .page-heading h1 {
    font-size: 21px;
  }
}
@media (max-width: 680px) {
  .topbar {
    height: auto;
    min-height: 62px;
    padding: 9px 12px;
  }
  .brand-mark {
    width: 32px;
    height: 32px;
  }
  .brand strong {
    font-size: 13px;
  }
  .brand small {
    font-size: 9px;
  }
  .top-actions {
    gap: 8px;
    font-size: 10px;
  }
  .top-actions #adminName {
    display: none;
  }
  .top-actions button,
  .top-actions a {
    padding: 6px 8px;
  }
  main {
    padding: 12px 10px;
  }
  #adminArea {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .sidebar {
    position: sticky;
    top: 62px;
    z-index: 3;
    min-height: 0;
    width: 100%;
    padding: 6px;
    border-radius: 6px;
  }
  .nav-label,
  .sidebar-note {
    display: none;
  }
  .admin-tabs {
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: thin;
    gap: 3px;
  }
  .admin-tabs button {
    flex: none;
    gap: 5px;
    padding: 8px 9px;
    font-size: 10px;
  }
  .admin-tabs button > span:first-child {
    width: 16px;
  }
  .workspace {
    width: 100%;
  }
  .page-heading {
    min-height: 68px;
    padding-bottom: 10px;
  }
  .page-heading h1 {
    font-size: 19px;
  }
  .page-heading p:not(.eyebrow) {
    font-size: 10px;
  }
  .revision-chip {
    font-size: 9px;
  }
  .section-intro {
    align-items: flex-start;
  }
  .columns {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .panel {
    padding: 13px;
    margin: 8px 0;
  }
  .setting-field {
    grid-template-columns: minmax(0, 1fr) 100px;
    font-size: 10px;
  }
  .form-actions {
    align-items: flex-start;
    flex-direction: column;
  }
  .form-actions button {
    width: 100%;
  }
  .search-form {
    flex-wrap: wrap;
  }
  .search-input {
    width: 100%;
    flex: 1;
  }
  .search-form > button {
    flex: 0 0 auto;
  }
  .search-form > span {
    width: 100%;
    margin: 0;
  }
  .admin-summary {
    gap: 6px;
  }
  .admin-summary > div {
    padding: 9px;
  }
  .admin-summary span {
    font-size: 9px;
  }
  .admin-summary strong {
    font-size: 18px;
  }
  .player-grid {
    grid-template-columns: 1fr;
  }
  .table-wrap {
    margin: 10px -1px;
    width: calc(100% + 2px);
  }
  .catalog-table input[type="number"] {
    width: 68px;
  }
  .level-list {
    min-height: 180px;
  }
  .add-crop {
    align-items: stretch;
    flex-direction: column;
  }
  .add-crop label {
    min-width: 0;
  }
  .dialog-title h2 {
    font-size: 17px;
  }
  dialog {
    padding: 16px;
  }
}
