.admin-body { min-height: 100dvh; overflow: auto; background: #0b0d0c; }

.login-gate { display: grid; min-height: 100dvh; place-items: center; padding: 24px; background-color: #0b0d0c; background-image: linear-gradient(90deg, rgba(121, 214, 125, .04) 1px, transparent 1px), linear-gradient(rgba(101, 201, 215, .035) 1px, transparent 1px); background-size: 28px 28px; }
.login-form { width: min(460px, 100%); padding: 30px; border: 1px solid var(--line-bright); border-top: 3px solid var(--green); border-radius: 5px; background: #121613; box-shadow: 0 24px 80px rgba(0, 0, 0, .45); }
.login-form h1 { margin-bottom: 30px; }
.login-form label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; }
.password-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.password-row input { min-width: 0; height: 43px; padding: 0 12px; border: 1px solid var(--line-bright); border-radius: 3px; outline: 0; background: #090b0a; color: var(--text); }
.password-row input:focus { border-color: var(--green); box-shadow: 0 0 0 2px rgba(121, 214, 125, .1); }
.password-row button, .player-form button, .command-form button { min-height: 40px; cursor: pointer; border: 1px solid #4b7250; border-radius: 3px; background: #1d3822; color: var(--green); font-weight: 700; }
.login-form a { color: var(--cyan); font-size: 11px; text-decoration: none; }
.login-status { min-height: 20px; margin: 8px 0 12px; color: var(--red); font-size: 11px; }

.admin-shell { min-height: 100dvh; }
.admin-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 92px; padding: 20px 28px; border-bottom: 1px solid var(--line-bright); background: #111512; }
.admin-header h1 { font-size: 25px; }
.admin-header-actions { display: flex; align-items: center; gap: 10px; }
.map-link, .quiet-button { min-height: 34px; padding: 8px 11px; border: 1px solid var(--line-bright); border-radius: 3px; background: #171d18; color: var(--text); font-size: 11px; text-decoration: none; }
.quiet-button { cursor: pointer; color: var(--muted); }

.service-ribbon { display: grid; grid-template-columns: auto auto minmax(400px, 1fr); min-height: 88px; align-items: stretch; border-bottom: 1px solid var(--line-bright); background: #151a16; }
.service-summary { display: flex; min-width: 170px; align-items: center; gap: 12px; padding: 16px 28px; border-right: 1px solid var(--line); }
.service-summary .state-light { flex: 0 0 auto; }
.service-summary small, .ribbon-metrics small { display: block; margin-bottom: 3px; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.service-summary strong, .ribbon-metrics strong { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.ribbon-metrics { display: flex; align-items: stretch; border-right: 1px solid var(--line); }
.ribbon-metrics > span { display: flex; min-width: 110px; flex-direction: column; justify-content: center; padding: 14px 18px; border-right: 1px solid var(--line); }
.service-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; padding: 14px 28px; }
.service-actions button, .quick-groups button, .property-actions button, .icon-button { min-height: 34px; cursor: pointer; border: 1px solid var(--line-bright); border-radius: 3px; background: #1b211c; color: #dce4de; font-size: 11px; }
.service-actions button { padding: 7px 10px; }
.service-actions button span { margin-right: 5px; color: var(--green); }
button.warning { border-color: rgba(231, 185, 92, .45); color: var(--amber); background: #2a2417; }
button.danger { border-color: rgba(237, 114, 107, .48); color: #ffaaa5; background: #301a18; }
button:disabled { cursor: wait; opacity: .45; }

.admin-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(290px, .7fr); background: var(--line); gap: 1px; }
.admin-panel { min-width: 0; padding: 22px 24px; background: var(--panel); }
.console-panel { min-height: 540px; }
.player-panel { min-height: 330px; }
.quick-panel { min-height: 260px; }
.backup-panel { min-height: 260px; }
.properties-panel { grid-column: 1 / -1; min-height: 520px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.panel-heading h2 { font-size: 16px; }
.icon-button { width: 34px; padding: 0; font-size: 17px; }

.console-output { width: 100%; height: 390px; margin: 0; overflow: auto; padding: 14px; color: #bcc8be; border: 1px solid #29332c; border-radius: 3px; outline: 0; background: #080a09; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; scrollbar-color: var(--line-bright) #080a09; }
.console-output:focus { border-color: #3a4a3f; }
.command-form { display: grid; grid-template-columns: 20px minmax(0, 1fr) 70px; align-items: center; gap: 4px; margin-top: 9px; border: 1px solid var(--line-bright); border-radius: 3px; background: #0b0e0c; }
.command-form > span { color: var(--green); text-align: right; }
.command-form input { width: 100%; height: 39px; padding: 0 7px; border: 0; outline: 0; background: transparent; color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.command-form button { min-height: 32px; margin-right: 4px; }
.command-result, .panel-status { min-height: 16px; margin: 7px 0 0; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; overflow-wrap: anywhere; }
.command-result.error, .panel-status.error { color: var(--red); }

.online-players { display: flex; min-height: 42px; flex-wrap: wrap; gap: 6px; align-content: flex-start; margin-bottom: 14px; }
.online-players span { height: 28px; padding: 6px 8px; color: var(--cyan); border: 1px solid rgba(101, 201, 215, .32); border-radius: 3px; background: #142125; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; }
.online-players span:only-child { color: var(--muted); border-color: var(--line); background: transparent; }
.player-form { display: grid; gap: 10px; }
.player-form label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; }
.player-form input, .player-form select, .search-field input { width: 100%; height: 36px; padding: 0 9px; border: 1px solid var(--line-bright); border-radius: 3px; outline: 0; background: #0b0e0c; color: var(--text); font: inherit; font-size: 11px; }
.player-form input:focus, .player-form select:focus, .search-field input:focus { border-color: var(--cyan); }

.quick-groups { display: grid; gap: 12px; }
.quick-groups > div { display: grid; grid-template-columns: 80px minmax(0, 1fr); align-items: center; gap: 10px; }
.quick-groups > div > span { color: var(--muted); font-size: 10px; }
.quick-groups > div > div { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.quick-groups button { height: 32px; }
.quick-groups button:hover { border-color: var(--cyan); color: var(--cyan); }

.job-message { margin-bottom: 14px; color: var(--amber); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; }
.backup-list { display: grid; gap: 7px; }
.backup-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; }
.backup-item span:last-child { color: var(--muted); }

.properties-heading { align-items: center; }
.property-tools { display: flex; align-items: center; gap: 7px; }
.search-field { width: min(300px, 38vw); }
.property-note { margin: -4px 0 14px; color: var(--muted); font-size: 10px; }
.properties-list { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.property-row { display: grid; grid-template-columns: minmax(140px, .8fr) minmax(150px, 1.2fr); min-width: 0; align-items: center; gap: 12px; min-height: 49px; padding: 6px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.property-row:nth-child(2n) { border-right: 0; }
.property-key { min-width: 0; overflow: hidden; color: #a9b4ac; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.property-input { width: 100%; min-width: 0; height: 34px; padding: 0 8px; border: 1px solid #344037; border-radius: 2px; outline: 0; background: #0a0c0b; color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; }
.property-input:focus { border-color: var(--green); }
.boolean-field { display: flex; align-items: center; gap: 8px; min-height: 34px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; }
.boolean-field input { width: 17px; height: 17px; accent-color: var(--green); }
.property-actions { position: sticky; z-index: 2; bottom: 0; display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-height: 60px; padding: 10px 0; background: rgba(17, 21, 18, .96); backdrop-filter: blur(8px); }
.property-actions span { margin-right: auto; color: var(--muted); font-size: 10px; }
.property-actions button { min-width: 86px; padding: 0 12px; }

@media (max-width: 1080px) {
  .service-ribbon { grid-template-columns: auto 1fr; }
  .service-actions { grid-column: 1 / -1; justify-content: flex-start; border-top: 1px solid var(--line); }
  .admin-grid { grid-template-columns: minmax(0, 1fr) 320px; }
  .properties-list { grid-template-columns: 1fr; }
  .property-row, .property-row:nth-child(2n) { border-right: 0; }
}

@media (max-width: 760px) {
  .admin-header { min-height: 82px; padding: 16px; }
  .admin-header h1 { font-size: 20px; }
  .map-link { display: none; }
  .service-ribbon { display: block; }
  .service-summary { border-bottom: 1px solid var(--line); border-right: 0; }
  .ribbon-metrics { overflow-x: auto; border-right: 0; }
  .ribbon-metrics > span { min-width: 33.333%; }
  .service-actions { display: grid; grid-template-columns: repeat(3, 1fr); padding: 10px 16px; }
  .service-actions button { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .admin-grid { display: block; }
  .admin-panel { min-height: 0; padding: 20px 16px; border-bottom: 1px solid var(--line-bright); }
  .console-output { height: 52dvh; }
  .properties-panel { padding-bottom: 80px; }
  .properties-heading { align-items: flex-start; }
  .property-tools { align-items: stretch; }
  .search-field { width: min(210px, 48vw); }
  .property-row { grid-template-columns: 1fr; gap: 5px; padding: 9px 4px; }
  .property-key { overflow-wrap: anywhere; white-space: normal; }
  .property-actions { flex-wrap: wrap; }
  .property-actions span { width: 100%; margin: 0; }
  .property-actions button { flex: 1; }
}

