﻿:root {
  --bg: #090909;
  --bg-2: #101010;
  --bg-3: #161616;
  --cream: #fffbef;
  --muted: #9a9a9a;
  --accent: #c4b5fd;
  --accent-hot: #e9d5ff;
  --line: rgba(167, 139, 250, 0.22);
  --ok: #2f9e64;
  --font-d: "Unbounded", sans-serif;
  --font-b: "Manrope", sans-serif;
  --sidebar: 240px;
  --radius: 6px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-b);
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

a { color: inherit; text-decoration: none; }

#app { min-height: 100vh; }

.gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(ellipse 50% 40% at 50% 0%, rgba(167, 139, 250, 0.16), transparent 60%),
    var(--bg);
}

.gate-card {
  width: min(100%, 420px);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.75rem;
}

.gate-logo {
  width: 72px;
  margin: 0 auto 1rem;
  display: block;
}

.gate h1 {
  font-family: var(--font-d);
  font-size: 1.35rem;
  text-align: center;
  margin-bottom: 0.35rem;
}

.gate h1 span { color: var(--accent); }

.gate-sub {
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 1.4rem;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-bottom: 1rem;
  background: #0c0c0c;
  padding: 0.3rem;
  border-radius: var(--radius);
}

.tabs button {
  border: 0;
  background: transparent;
  padding: 0.65rem;
  border-radius: 4px;
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
}

.tabs button.active {
  background: rgba(167, 139, 250, 0.16);
  color: var(--cream);
}

.field { margin-bottom: 0.85rem; }

.row-form .field,
.member-form .field {
  margin-bottom: 0;
  min-width: 0;
}

.field label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
  line-height: 1.2;
}

.field input, .field textarea, .field select {
  width: 100%;
  min-height: 44px;
  background: #0c0c0c;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem 0.85rem;
  outline: none;
}

.field select {
  cursor: pointer;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #9a9a9a 50%), linear-gradient(135deg, #9a9a9a 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2rem;
}

.field input:focus, .field textarea:focus, .field select:focus {
  border-color: rgba(167, 139, 250, 0.55);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--cream);
}

.gate .btn-primary,
#auth-form .btn-primary {
  width: 100%;
}

.btn-primary:hover { background: var(--accent-hot); color: #1a1025; }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--cream);
}

.btn-ghost:hover { border-color: rgba(167, 139, 250, 0.5); }

.btn-danger {
  background: transparent;
  border: 1px solid rgba(167, 139, 250, 0.45);
  color: #ff8d8d;
}

.btn-sm {
  padding: 0.45rem 0.7rem;
  font-size: 0.75rem;
}

.btn-blacklist {
  background: #1a0a0a;
  border: 1px solid rgba(167, 139, 250, 0.7);
  color: #ff8d8d;
}

.btn-blacklist:hover {
  background: rgba(167, 139, 250, 0.2);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.member-form {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.1fr) minmax(0, 1.3fr) auto;
}

.member-submit {
  width: auto;
  min-height: 44px;
  padding: 0.75rem 1.1rem;
  white-space: nowrap;
  align-self: end;
}

.main {
  padding: 1.5rem 1.5rem 2.5rem;
  min-width: 0;
  background:
    radial-gradient(ellipse 40% 30% at 100% 0%, rgba(167, 139, 250, 0.08), transparent 55%),
    var(--bg);
}

.main-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.panel-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.15rem 1.2rem;
  margin-bottom: 1rem;
  overflow: visible;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.row-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 0.75rem;
  align-items: end;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
}

.table th, .table td {
  text-align: left;
  vertical-align: middle;
  padding: 0.85rem 0.65rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.table th:last-child,
.table td:last-child {
  white-space: nowrap;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table-members {
  table-layout: fixed;
}

.table-members th:nth-child(1),
.table-members td:nth-child(1) {
  width: 30%;
}

.table-members th:nth-child(2),
.table-members td:nth-child(2) {
  width: 22%;
}

.table-members th:nth-child(3),
.table-members td:nth-child(3) {
  width: 48%;
}

.table-members td:last-child {
  white-space: normal;
}

.table-members .badge,
.table-members .rank-chip {
  white-space: normal;
  text-align: left;
}

.badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.28rem 0.55rem;
  border-radius: 4px;
  background: rgba(167, 139, 250, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.28);
  color: var(--accent-hot);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.2;
  white-space: nowrap;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: flex-start;
}

.table td.actions {
  display: table-cell;
  white-space: normal;
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.actions .btn,
.actions-row .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.72);
  padding: 1rem;
}

.modal.hidden {
  display: none;
}

.modal-card {
  width: min(100%, 440px);
  background: var(--bg-2);
  border: 1px solid rgba(167, 139, 250, 0.35);
  border-radius: 10px;
  padding: 1.25rem;
}

.modal-card h3 {
  font-family: var(--font-d);
  margin-bottom: 0.35rem;
}

.remember-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.15rem 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
}

.remember-row input {
  accent-color: #c4b5fd;
  width: 16px;
  height: 16px;
}

.error-box {
  margin-top: 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius);
  background: rgba(167, 139, 250, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.35);
  color: #ffb4b4;
  font-size: 0.9rem;
  text-align: center;
}

.denied {
  text-align: center;
}

.denied h2 {
  font-family: var(--font-d);
  font-size: 1.1rem;
  color: var(--accent);
  margin: 0.75rem 0 0.5rem;
}

.denied p {
  color: var(--muted);
  margin-bottom: 1.2rem;
}

.shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  padding: 1.25rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.4rem 0.85rem;
  border-bottom: 1px solid var(--line);
}

.side-brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.side-brand strong {
  font-family: var(--font-d);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}

.side-brand span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}

.side-nav button {
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0.75rem 0.8rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
}

.side-nav button:hover {
  background: rgba(255, 251, 239, 0.04);
  color: var(--cream);
}

.side-nav button.active {
  background: rgba(167, 139, 250, 0.14);
  color: var(--cream);
  box-shadow: inset 3px 0 0 var(--accent);
}

.side-user {
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.side-user .who {
  font-size: 0.85rem;
  color: var(--muted);
}

.side-user .who b {
  color: var(--cream);
}

.main-head h2 {
  font-family: var(--font-d);
  font-size: 1.35rem;
}

.main-head p {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 0.25rem;
}

.panel-card h3 {
  font-family: var(--font-d);
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
}

.table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge.ok {
  background: rgba(47, 158, 100, 0.12);
  border-color: rgba(47, 158, 100, 0.35);
  color: #8fe0b3;
}

.badge.bad {
  background: rgba(214, 69, 69, 0.12);
  border-color: rgba(214, 69, 69, 0.35);
  color: #ff8d8d;
}

.badge.wait {
  background: rgba(201, 162, 39, 0.12);
  border-color: rgba(201, 162, 39, 0.35);
  color: #f0d48a;
}

.checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0.5rem 0 0.9rem;
}

.checks label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: #0c0c0c;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.55rem 0.65rem;
  font-size: 0.88rem;
  cursor: pointer;
}

.checks input {
  accent-color: #c4b5fd;
}

.muted {
  color: var(--muted);
}

.empty {
  color: var(--muted);
  padding: 1rem 0;
  font-size: 0.92rem;
}

.fine-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

.fine-form .member-submit {
  grid-column: 1 / -1;
  width: auto;
  justify-self: start;
}

.farm-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.farm-contract-form,
.farm-payout-form {
  grid-template-columns: 1fr;
}

.farm-reports {
  display: grid;
  gap: 0.85rem;
}

.farm-report {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.farm-report:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.farm-shot-link {
  display: block;
}

.farm-shot {
  width: 140px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #0c0c0c;
}

.farm-shot-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.75rem;
}

.farm-report-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin-bottom: 0.35rem;
}

.farm-report-body p {
  margin: 0.15rem 0;
  font-size: 0.9rem;
}

.farm-report-actions {
  margin-top: 0.65rem;
}

.farm-part-list {
  list-style: none;
  margin: 0.45rem 0 0.35rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.farm-part {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.65rem;
  font-size: 0.88rem;
}

.farm-add-part {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-top: 0.55rem;
}

.farm-add-part select {
  min-width: 180px;
  flex: 1;
}

.recruit-admin {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1rem;
}

.recruit-admin .stat-recruit {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-d);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.recruit-admin .stat-recruit-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: #6b6b6b;
}

.recruit-admin .stat-recruit.is-open {
  color: #7dffa8;
}

.recruit-admin .stat-recruit.is-open .stat-recruit-dot {
  background: #2f9e64;
  box-shadow: 0 0 0 3px rgba(47, 158, 100, 0.28);
}

.recruit-admin .stat-recruit.is-closed {
  color: #ff8d8d;
}

.recruit-admin .stat-recruit.is-closed .stat-recruit-dot {
  background: #d64545;
  box-shadow: 0 0 0 3px rgba(214, 69, 69, 0.28);
}

.main-capt {
  padding: 0.75rem;
}

.capt-war {
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  height: calc(100vh - 1.5rem);
  background: #111111;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.capt-side {
  padding: 1rem 1.05rem 1.15rem;
  background: #161616;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
  overflow: auto;
}

.capt-side-head {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 0.7rem;
  align-items: start;
}

.capt-back {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: #1f1f1f;
  color: #fff;
  display: grid;
  place-items: center;
  cursor: default;
}

.capt-back svg {
  width: 18px;
  height: 18px;
}

.capt-side-head h2 {
  font-family: var(--font-d);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.capt-side-head p {
  margin-top: 0.4rem;
  color: #8d8d8d;
  font-size: 0.78rem;
  line-height: 1.45;
}

.capt-org {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.capt-org img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  background: #1a1224;
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.28);
}

.capt-org strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
}

.capt-org-stats {
  display: flex;
  gap: 0.85rem;
  margin-top: 0.3rem;
  color: #cfcfcf;
  font-size: 0.82rem;
  font-weight: 600;
}

.capt-org-stats span {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.capt-org-stats svg {
  width: 14px;
  height: 14px;
  color: #c4b5fd;
}

.capt-block h3 {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a8a8a;
  font-weight: 700;
  margin-bottom: 0.55rem;
}

.capt-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.86rem;
  color: #d7d7d7;
}

.capt-control b {
  font-weight: 700;
  color: #fff;
}

.capt-hex {
  width: 18px;
  height: 16px;
  background: #7c5cbf;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  flex: 0 0 auto;
}

.capt-hist-table {
  display: grid;
  gap: 0.15rem;
}

.capt-hist-row {
  display: grid;
  grid-template-columns: 36px 1fr 88px;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.15rem;
  font-size: 0.8rem;
  color: #d0d0d0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.capt-hist-head {
  color: #8a8a8a;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  padding-top: 0;
}

.capt-mark {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 800;
}

.capt-mark-no {
  background: #d64545;
  color: #fff;
}

.capt-mark-ok {
  background: #2f9e64;
  color: #fff;
}

.capt-hist-org {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.capt-hist-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #c4b5fd, #6d4aa8);
  flex: 0 0 auto;
}

.capt-hist-ok {
  color: #8fe0b3;
  font-size: 0.75rem;
}

.capt-map-stage {
  position: relative;
  background: #0a0a0a;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.capt-map-viewport {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #070707;
}

.capt-map-world {
  position: relative;
  flex: 0 0 auto;
  container-type: inline-size;
}

.capt-map-bg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}

.capt-pin {
  position: absolute;
  width: 3.8%;
  height: 4.3%;
  transform: translate(-50%, -50%);
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  z-index: 1;
}

.capt-pin:hover,
.capt-pin:focus-visible {
  z-index: 3;
  transform: translate(-50%, -50%) scale(1.12);
  outline: none;
}

.capt-pin-hex {
  width: 88%;
  height: 90%;
  display: grid;
  place-items: center;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
}

.capt-pin-hex svg {
  width: 46%;
  height: 46%;
}

.capt-pin-office .capt-pin-hex,
.capt-pin-war .capt-pin-hex { background: #c0392b; }
.capt-pin-factory .capt-pin-hex { background: #2e86c1; }
.capt-pin-farm .capt-pin-hex { background: #d68910; }
.capt-pin-power .capt-pin-hex { background: #f4d03f; }
.capt-pin-green .capt-pin-hex { background: #1e8449; }
.capt-pin-crate .capt-pin-hex { background: #7d3c98; }

.capt-pin.is-big {
  width: 5%;
  height: 5.6%;
}

.capt-pin-status {
  position: absolute;
  top: -4%;
  right: -6%;
  width: 36%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #141414;
  border: 2px solid #6a6a6a;
  color: #1a1224;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.capt-pin-status svg {
  width: 62%;
  height: 62%;
}

.capt-pin.is-ours .capt-pin-status {
  background: #c4b5fd;
  border-color: #f3e8ff;
  box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.28), 0 0 10px rgba(167, 139, 250, 0.75);
}

.capt-legend {
  display: flex;
  gap: 0.85rem;
  margin-top: 0.65rem;
  font-size: 0.75rem;
  color: #b8b8b8;
}

.capt-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.capt-leg {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.capt-leg-ours {
  background: #c4b5fd;
  box-shadow: 0 0 8px rgba(167, 139, 250, 0.7);
}

.capt-leg-free {
  background: #141414;
  border: 2px solid #6a6a6a;
  box-sizing: border-box;
}

.capt-pin-x {
  position: absolute;
  left: -8%;
  bottom: 4%;
  width: 38%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #e74c3c;
  color: #fff;
  font-size: 1.7cqw;
  font-weight: 800;
  display: grid;
  place-items: center;
  line-height: 1;
}

.capt-map-tabs {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 2;
  display: flex;
  gap: 0.4rem;
}

.capt-map-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 0;
  background: transparent;
  color: #f2f2f2;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

.capt-map-tabs button.active {
  background: #2a2a2a;
}

.capt-map-tabs svg {
  width: 16px;
  height: 16px;
}

.capt-map-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #0a0a0a;
}

.capt-rating-soon {
  flex: 1;
  display: grid;
  place-items: center;
  color: #8a8a8a;
  font-size: 0.95rem;
}

@media (min-width: 981px) {
  .fine-form {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(120px, 0.7fr) minmax(0, 1fr) auto;
  }

  .fine-form .member-submit {
    grid-column: auto;
    justify-self: end;
  }

  .farm-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1rem;
  }

  .farm-contract-form,
  .farm-payout-form {
    grid-template-columns: minmax(0, 1.2fr) minmax(90px, 0.7fr) minmax(0, 1fr) auto;
  }
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .side-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .row-form,
  .member-form,
  .fine-form,
  .farm-contract-form,
  .farm-payout-form {
    grid-template-columns: 1fr;
  }

  .member-submit {
    width: 100%;
  }

  .farm-report {
    grid-template-columns: 1fr;
  }

  .farm-shot {
    width: 100%;
    height: 160px;
  }

  .news-swatches,
  .news-text-tools,
  .news-admin-card {
    grid-template-columns: 1fr;
  }

  .table {
    table-layout: auto;
  }

  .capt-war {
    grid-template-columns: 1fr;
    height: auto;
    min-height: calc(100vh - 8rem);
  }

  .capt-map-stage {
    min-height: 70vh;
  }

  .capt-map-viewport {
    min-height: 70vh;
  }
}

.side-nav button.nav-owner {
  position: relative;
  overflow: hidden;
  color: #f5d0fe;
  border: 1px solid rgba(244, 114, 182, 0.45);
  background: linear-gradient(
    110deg,
    rgba(124, 58, 237, 0.28),
    rgba(244, 114, 182, 0.22),
    rgba(56, 189, 248, 0.22),
    rgba(124, 58, 237, 0.28)
  );
  background-size: 220% 100%;
  animation: owner-shift 4.5s linear infinite;
}

.side-nav button.nav-owner.active {
  box-shadow: inset 3px 0 0 #f0abfc;
  color: #fff;
}

.owner-wrap {
  position: relative;
}

.owner-title {
  background: linear-gradient(90deg, #e9d5ff, #f9a8d4, #67e8f9, #e9d5ff);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: owner-shift 5s linear infinite;
}

.owner-card {
  border-color: rgba(244, 114, 182, 0.35);
  box-shadow: 0 0 24px rgba(168, 85, 247, 0.12);
}

.logs-filter {
  align-items: end;
}

.news-form {
  max-width: 720px;
}

.news-kind {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.news-kind button {
  border: 1px solid var(--line);
  background: #0c0c0c;
  color: var(--muted);
  border-radius: var(--radius);
  padding: 0.55rem 0.8rem;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.news-kind button.is-on {
  border-color: rgba(167, 139, 250, 0.7);
  background: rgba(167, 139, 250, 0.16);
  color: var(--cream);
}

.news-swatches {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.news-swatch {
  position: relative;
  isolation: isolate;
  border: 1px solid transparent;
  background: #0c0c0c;
  border-radius: 8px;
  padding: 0.35rem;
  cursor: pointer;
  min-height: 58px;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.news-swatch.is-on {
  border-color: #fffbef;
}

.news-swatch-shine {
  display: block;
  height: 22px;
  border-radius: 5px;
  background: var(--news-shine);
  background-size: 220% 220%;
  animation: news-shine 4s linear infinite;
}

.news-swatch-name {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.news-border-violet { --news-shine: linear-gradient(120deg, #c4b5fd, #7c3aed, #e9d5ff, #a78bfa, #c4b5fd); }
.news-border-pink { --news-shine: linear-gradient(120deg, #f9a8d4, #db2777, #fbcfe8, #f472b6, #f9a8d4); }
.news-border-azure { --news-shine: linear-gradient(120deg, #7dd3fc, #2563eb, #c4b5fd, #38bdf8, #7dd3fc); }
.news-border-gold { --news-shine: linear-gradient(120deg, #fde68a, #f59e0b, #fff7ed, #fbbf24, #fde68a); }
.news-border-emerald { --news-shine: linear-gradient(120deg, #6ee7b7, #059669, #a7f3d0, #34d399, #6ee7b7); }
.news-border-crimson { --news-shine: linear-gradient(120deg, #fca5a5, #dc2626, #fecaca, #fb7185, #fca5a5); }
.news-border-ice { --news-shine: linear-gradient(120deg, #e0f2fe, #67e8f9, #c4b5fd, #a5f3fc, #e0f2fe); }
.news-border-sunset { --news-shine: linear-gradient(120deg, #fdba74, #f472b6, #c4b5fd, #fb7185, #fdba74); }

.news-form-preview {
  margin-top: 0.7rem;
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #0a0a0a;
}

.news-text-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.news-admin-list {
  display: grid;
  gap: 0.85rem;
}

.news-admin-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.9rem;
  align-items: center;
}

.news-admin-thumb {
  --neon: #c4b5fd;
  --neon-pad: 14px;
  --neon-radius: 10px;
  position: relative;
  isolation: isolate;
  border-radius: 10px;
  padding: 0;
  overflow: visible;
  box-shadow:
    0 0 16px color-mix(in srgb, var(--neon) 32%, transparent),
    0 0 36px color-mix(in srgb, var(--neon) 14%, transparent);
}

.news-admin-thumb .neon-clip {
  position: absolute;
  inset: calc(var(--neon-pad) * -1);
  border-radius: calc(var(--neon-radius) + var(--neon-pad));
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.news-admin-thumb .neon-clip::before,
.news-admin-thumb .neon-clip::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 90px;
  height: 18px;
  border-radius: 40px;
  pointer-events: none;
  offset-path: inset(var(--neon-pad) round var(--neon-radius));
  offset-anchor: center;
  offset-rotate: auto;
  animation: neon-travel 3.4s linear infinite;
  background: radial-gradient(ellipse 80% 70% at 50% 50%, #fff 0%, var(--neon) 40%, transparent 78%);
  filter: blur(5px);
}

.news-admin-thumb .neon-clip::after {
  width: 120px;
  height: 28px;
  background: radial-gradient(ellipse 80% 70% at 50% 50%, var(--neon) 0%, transparent 74%);
  filter: blur(10px);
  opacity: 0.6;
}

.news-admin-thumb[data-border="violet"] { --neon: #c4b5fd; }
.news-admin-thumb[data-border="pink"] { --neon: #f472b6; }
.news-admin-thumb[data-border="azure"] { --neon: #38bdf8; }
.news-admin-thumb[data-border="gold"] { --neon: #fbbf24; }
.news-admin-thumb[data-border="emerald"] { --neon: #34d399; }
.news-admin-thumb[data-border="crimson"] { --neon: #fb7185; }
.news-admin-thumb[data-border="ice"] { --neon: #67e8f9; }
.news-admin-thumb[data-border="sunset"] { --neon: #fdba74; }

.news-admin-thumb .news-card-inner {
  position: relative;
  z-index: 1;
  background: #101010;
  border-radius: 8px;
  overflow: hidden;
}

.news-admin-thumb img {
  width: 100%;
  height: auto;
  max-height: 110px;
  object-fit: contain;
  display: block;
  background: #0a0a0a;
}

.news-admin-meta p {
  margin: 0.25rem 0 0.55rem;
}

@keyframes neon-travel {
  to { offset-distance: 100%; }
}

@keyframes news-shine {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

@keyframes owner-shift {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .side-nav button.nav-owner,
  .owner-title,
  .news-swatch-shine,
  .news-admin-thumb .neon-clip::before,
  .news-admin-thumb .neon-clip::after {
    animation: none;
  }
}


