﻿:root {
  --bg-main: #0b1728;
  --bg-alt: #10233a;
  --panel: rgba(9, 27, 47, 0.72);
  --panel-border: rgba(111, 187, 255, 0.28);
  --text: #e9f4ff;
  --muted: #9bc1e5;
  --accent: #2fc1ff;
  --accent-2: #49dcb1;
  --warn: #ffb347;
  --danger: #ff7a7a;
  --nav-w: 164px;
  --nav-gap: 12px;
  --font-main: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-main);
  background:
    radial-gradient(1000px 500px at 85% -20%, rgba(47, 193, 255, 0.18), transparent 70%),
    radial-gradient(900px 400px at 0% 120%, rgba(73, 220, 177, 0.16), transparent 65%),
    linear-gradient(155deg, var(--bg-main), var(--bg-alt));
}

.screen-body {
  overflow: hidden;
}

.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.bg-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 50% 50%, black 15%, transparent 85%);
  opacity: 0.4;
}

.bg-glow {
  background:
    radial-gradient(420px 220px at 20% 18%, rgba(25, 180, 255, 0.3), transparent 70%),
    radial-gradient(460px 240px at 78% 82%, rgba(73, 220, 177, 0.25), transparent 72%);
  animation: moveGlow 12s ease-in-out infinite alternate;
}

@keyframes moveGlow {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-18px) scale(1.05); }
}

.screen-wrap {
  position: relative;
  z-index: 1;
  height: 100vh;
  padding: clamp(10px, 1.2vw, 20px);
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1vh, 14px);
  padding-left: calc(var(--nav-w) + 28px);
  padding-right: 20px;
  padding-bottom: 20px;
  transition: padding 0.28s ease;
}

.top-nav {
  position: fixed;
  z-index: 10;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: var(--nav-gap);
  align-items: stretch;
  width: var(--nav-w);
  background: linear-gradient(180deg, rgba(5, 25, 45, 0.78), rgba(10, 34, 58, 0.58));
  border: 1px solid rgba(143, 212, 255, 0.24);
  border-radius: 22px;
  padding: 12px;
  backdrop-filter: blur(16px) saturate(1.1);
  box-shadow: 0 24px 46px rgba(1, 10, 22, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.28s ease, opacity 0.24s ease, box-shadow 0.24s ease;
}

.top-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 40%);
  opacity: 0.45;
}

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

.nav-head-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-head-text strong {
  font-size: 14px;
  letter-spacing: 0.4px;
  color: #eff8ff;
}

.nav-head-text span {
  font-size: 11px;
  line-height: 1.35;
  color: rgba(195, 223, 247, 0.78);
}

.nav-toggle-btn,
.nav-reveal-btn {
  border: 1px solid rgba(159, 224, 255, 0.24);
  background: rgba(255, 255, 255, 0.06);
  color: #e6f6ff;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background 0.22s ease, border-color 0.22s ease, transform 0.22s ease, opacity 0.22s ease;
}

.nav-toggle-btn:hover,
.nav-reveal-btn:hover {
  background: rgba(47, 193, 255, 0.16);
  border-color: rgba(170, 231, 255, 0.52);
  transform: translateY(-1px);
}

.nav-btn {
  position: relative;
  border: 1px solid rgba(132, 203, 255, 0.2);
  background: linear-gradient(180deg, rgba(11, 34, 58, 0.5), rgba(9, 28, 47, 0.7));
  color: #d4ebff;
  border-radius: 14px;
  padding: 12px 14px;
  min-width: 100%;
  white-space: nowrap;
  text-align: left;
  letter-spacing: 0.2px;
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.nav-btn::after {
  content: "";
  position: absolute;
  inset: auto auto 0 0;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(73, 220, 177, 0.95), rgba(57, 219, 255, 0.95));
  transition: width 0.22s ease;
}

.nav-btn:hover {
  transform: translateX(3px);
  border-color: rgba(152, 220, 255, 0.36);
  color: #e1f5ff;
  background: linear-gradient(180deg, rgba(19, 48, 77, 0.72), rgba(11, 36, 60, 0.9));
  box-shadow: 0 10px 18px rgba(4, 21, 40, 0.24);
}

.nav-btn:hover::after,
.nav-btn.active::after {
  width: 100%;
}

.nav-btn.active {
  background: linear-gradient(135deg, rgba(16, 106, 151, 0.92), rgba(43, 183, 214, 0.88));
  color: #f4fdff;
  border-color: rgba(198, 244, 255, 0.4);
  box-shadow: 0 14px 26px rgba(47, 193, 255, 0.22);
  transform: translateX(3px);
}


.build-tag {
  font-size: 12px;
  text-align: center;
  color: #d7eeff;
  border: 1px solid rgba(132, 203, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 8px 10px;
  line-height: 1.2;
}

.nav-dock {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 3px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.nav-dock-btn {
  border: 1px solid rgba(132, 203, 255, 0.2);
  background: rgba(10, 30, 52, 0.42);
  color: #c9e5fb;
  border-radius: 10px;
  padding: 7px 0;
  font-size: 12px;
  transition: border-color 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.nav-dock-btn:hover {
  border-color: rgba(161, 225, 255, 0.62);
  color: #e7f7ff;
}

.nav-dock-btn.active {
  background: linear-gradient(120deg, rgba(73, 220, 177, 0.94), rgba(57, 219, 255, 0.94));
  color: #093245;
  border-color: transparent;
}

.screen-wrap.nav-hidden {
  padding-left: 20px;
  padding-right: 20px;
  padding-bottom: 20px;
}

.screen-wrap.nav-right.nav-hidden,
.screen-wrap.nav-bottom.nav-hidden {
  padding-left: 20px;
  padding-right: 20px;
  padding-bottom: 20px;
}

.top-nav.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.screen-wrap.nav-left .top-nav.is-hidden {
  transform: translate(calc(-100% - 28px), -50%);
}

.screen-wrap.nav-right .top-nav.is-hidden {
  transform: translate(calc(100% + 28px), -50%);
}

.screen-wrap.nav-bottom .top-nav.is-hidden {
  transform: translate(-50%, calc(100% + 28px));
}

.nav-reveal-btn {
  position: fixed;
  z-index: 11;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  box-shadow: 0 16px 30px rgba(0, 10, 22, 0.22);
}

.screen-wrap.nav-right .nav-reveal-btn {
  left: auto;
  right: 14px;
}

.screen-wrap.nav-bottom .nav-reveal-btn {
  left: 50%;
  right: auto;
  top: auto;
  bottom: 18px;
  transform: translateX(-50%);
}

.screen-wrap.nav-right {
  padding-left: 20px;
  padding-right: calc(var(--nav-w) + 28px);
}

.screen-wrap.nav-right .top-nav {
  left: auto;
  right: 14px;
}

.screen-wrap.nav-bottom {
  padding-left: 20px;
  padding-right: 20px;
  padding-bottom: 108px;
}

.screen-wrap.nav-bottom .top-nav {
  top: auto;
  left: 50%;
  right: auto;
  bottom: 12px;
  transform: translateX(-50%);
  flex-direction: row;
  align-items: center;
  width: auto;
  min-width: min(760px, calc(100vw - 28px));
  gap: 10px;
  padding: 10px;
}

.screen-wrap.nav-bottom .nav-dock {
  min-width: 98px;
}

.screen-wrap.nav-bottom .nav-btn {
  min-width: 116px;
  text-align: center;
}

.screen-wrap.nav-bottom .nav-btn:hover,
.screen-wrap.nav-bottom .nav-btn.active {
  transform: translateY(-1px);
}

.screen-wrap.nav-bottom .build-tag {
  white-space: nowrap;
  min-width: 80px;
}

.main-view {
  display: none;
  flex: 1;
  min-height: 0;
}

.main-view.active {
  display: flex;
  flex-direction: column;
}

.screen-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding: 4px 6px;
  flex: 0 0 auto;
}

.title-block h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: 1px;
}

.title-block p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.title-block {
  display: flex;
  align-items: baseline;
  gap: 12px;
  white-space: nowrap;
}

.server-time {
  color: var(--muted);
  font-size: 15px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(300px, 1fr));
  gap: clamp(8px, 1vw, 14px);
  flex: 1;
  min-height: 0;
}

.panel {
  position: relative;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  min-height: 0;
  padding: clamp(12px, 1.1vw, 18px);
  backdrop-filter: blur(8px);
  box-shadow: 0 16px 35px rgba(2, 10, 19, 0.35);
  animation: panelIn 0.8s ease both;
  display: flex;
  flex-direction: column;
}

.panel:nth-child(1) { animation-delay: 0.06s; }
.panel:nth-child(2) { animation-delay: 0.12s; }
.panel:nth-child(3) { animation-delay: 0.18s; }
.panel:nth-child(4) { animation-delay: 0.24s; }

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.panel h2 {
  margin: 0 0 clamp(8px, 0.8vh, 12px);
  font-size: clamp(16px, 1.2vw, 22px);
}

.kpis {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(6px, 0.8vw, 10px);
  margin-bottom: clamp(6px, 0.8vh, 10px);
}

.kpi {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: clamp(8px, 0.8vw, 12px);
}

.kpi label {
  display: block;
  color: var(--muted);
  font-size: clamp(11px, 0.8vw, 13px);
}

.kpi strong {
  font-size: clamp(20px, 2vw, 34px);
  letter-spacing: 1px;
  text-shadow: 0 0 18px rgba(47, 193, 255, 0.35);
}

.data-list {
  margin: 6px 0 0;
  padding-left: 18px;
}

.data-list li {
  margin-bottom: clamp(4px, 0.5vh, 8px);
  line-height: 1.35;
  font-size: clamp(12px, 0.9vw, 15px);
}

.scroll-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.02);
}

.scroll-strip {
  padding: 10px 16px 10px 26px;
  margin: 0;
}

.scroll-strip.looping {
  animation: autoScroll 14s linear infinite;
}

.scroll-wrap:hover .scroll-strip {
  animation-play-state: paused;
}

@keyframes autoScroll {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

.countdown-main {
  margin: clamp(4px, 0.6vh, 10px) 0;
  font-size: clamp(16px, 1.2vw, 22px);
  line-height: 1.5;
}

.badge {
  color: var(--warn);
  font-weight: 700;
}

.timer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(6px, 0.7vw, 10px);
  margin-top: auto;
}

.time-item {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
  padding: clamp(8px, 0.8vw, 12px) 6px;
}

.time-item strong {
  display: block;
  font-size: clamp(30px, 3vw, 44px);
  color: var(--accent);
  text-shadow: 0 0 16px rgba(47, 193, 255, 0.38);
}

.time-item span {
  color: var(--muted);
  font-size: clamp(11px, 0.8vw, 13px);
}

.empty {
  color: var(--muted);
}

.warn {
  color: var(--danger);
}

.pulse {
  animation: panelPulse 1.2s ease-in-out infinite;
}

@keyframes panelPulse {
  0% { box-shadow: 0 10px 25px rgba(255, 179, 71, 0.15); }
  50% { box-shadow: 0 16px 40px rgba(255, 179, 71, 0.5); }
  100% { box-shadow: 0 10px 25px rgba(255, 179, 71, 0.15); }
}

.forest-view {
  min-height: 0;
}

.forest-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 14px;
  height: 100%;
  min-height: 0;
}

.forest-layout.pos-right {
  grid-template-columns: 1fr 340px;
}

.forest-layout.pos-right .control-panel {
  order: 2;
}

.forest-layout.pos-right .forest-stage {
  order: 1;
}

.forest-layout.pos-bottom {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr minmax(230px, 38%);
}

.forest-layout.pos-bottom .control-panel {
  order: 2;
}

.forest-layout.pos-bottom .forest-stage {
  order: 1;
}

.control-panel {
  background: rgba(11, 30, 49, 0.72);
  border: 1px solid rgba(108, 182, 247, 0.35);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}

.dock-switch {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px;
}

.dock-switch > span {
  display: block;
  font-size: 12px;
  color: #a7c9e6;
  margin-bottom: 6px;
}

.dock-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.dock-btn {
  border: 1px solid rgba(132, 203, 255, 0.3);
  background: rgba(10, 30, 52, 0.45);
  color: #b8d7f5;
  border-radius: 8px;
  padding: 6px 0;
  font-size: 12px;
}

.dock-btn.active {
  background: linear-gradient(90deg, #00a8ef, #39dbff);
  color: #03293e;
  border-color: transparent;
}

.forest-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.forest-title h2 {
  margin: 0;
  font-size: 17px;
}

#forestStatus {
  color: #9ed0f5;
  font-size: 12px;
}

.session-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.session-box > div {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 10px;
}

.session-box span {
  display: block;
  font-size: 12px;
  color: #9fc3e1;
}

.session-box strong {
  display: block;
  margin-top: 2px;
  font-size: 20px;
  color: #e6f6ff;
  letter-spacing: 1px;
}

.mode-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 4px;
}

.mode-selector .mode-btn {
  border: 0;
  padding: 8px 6px;
  border-radius: 8px;
  background: transparent;
  color: #b5cde3;
  font-weight: 700;
}

.mode-selector .mode-btn.active.quiet {
  background: rgba(54, 139, 255, 0.24);
  color: #b9d8ff;
}

.mode-selector .mode-btn.active.read {
  background: rgba(255, 179, 71, 0.24);
  color: #ffd7a1;
}

.forest-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.forest-stats .stat-item {
  border-radius: 12px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.forest-stats .stat-item.flash {
  transform: translateY(-2px) scale(1.02);
}

.good-card {
  box-shadow: inset 0 0 0 1px rgba(107, 203, 119, 0.25);
}

.bad-card {
  box-shadow: inset 0 0 0 1px rgba(255, 122, 122, 0.25);
}

.stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #a9c8e3;
}

.stat-head i {
  font-style: normal;
  font-size: 16px;
}

.forest-stats .stat-val {
  font-size: 30px;
  font-weight: 800;
  margin-top: 4px;
  line-height: 1;
}

.good-card .stat-val {
  color: #a7f0b1;
  text-shadow: 0 0 14px rgba(107, 203, 119, 0.5);
}

.bad-card .stat-val {
  color: #ffc3c3;
  text-shadow: 0 0 14px rgba(255, 122, 122, 0.45);
}

.forest-health {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 10px;
}

.health-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #a9c8e3;
  margin-bottom: 6px;
}

.health-row strong {
  color: #d8f4ff;
  font-size: 16px;
}

.health-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.health-bar {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #ff7979, #ffb347, #6bcb77);
  transition: width 0.25s ease;
}

.vol-box {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px;
}

.vol-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #a8c8e4;
  margin-bottom: 6px;
}

.vol-row strong {
  font-size: 18px;
  color: #d7efff;
}

.vol-track {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  overflow: hidden;
}

.vol-bar {
  height: 100%;
  width: 0%;
  background: #6bcb77;
  transition: width 0.15s linear;
}

.vol-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 107, 107, 0.9);
}

.slider-box {
  display: grid;
  gap: 6px;
}

.slider-box label {
  margin: 0;
  font-size: 12px;
}

.slider-box input[type=range] {
  accent-color: #4db7ff;
}

.forest-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}

.forest-stage {
  position: relative;
  min-height: 0;
  border-radius: 16px;
  border: 1px solid rgba(108, 182, 247, 0.35);
  background:
    linear-gradient(180deg, rgba(115, 202, 255, 0.9) 0%, rgba(177, 231, 255, 0.95) 42%, rgba(88, 171, 96, 0.95) 42%, rgba(63, 139, 73, 0.95) 100%);
  overflow: hidden;
}

.land-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.85);
  color: #1f4c27;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
}

.forest-legend {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 8px;
  z-index: 2;
}

.forest-legend span {
  font-size: 12px;
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.82);
  color: #294a2d;
}

.forest-legend i {
  font-style: normal;
}

.forest-land {
  height: 100%;
  padding: 56px 16px 16px;
  display: flex;
  align-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  overflow: auto;
}

.tree-item {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.16));
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 27px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  animation: popTree 0.3s ease-out;
}

.tree-item.healthy {
  box-shadow: 0 4px 12px rgba(38, 117, 46, 0.35);
}

.tree-withered {
  filter: grayscale(0.95);
  background: radial-gradient(circle at 30% 25%, rgba(255, 227, 227, 0.3), rgba(90, 40, 40, 0.2));
  border-color: rgba(255, 190, 190, 0.4);
  box-shadow: 0 4px 12px rgba(120, 36, 36, 0.3);
}

@keyframes popTree {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.admin-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 16px 42px;
}

.top-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
}

.card h3 {
  margin: 0 0 14px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(145, 193, 236, 0.35);
  background: rgba(2, 18, 34, 0.45);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 10px;
  font-family: inherit;
  font-size: 14px;
}

textarea {
  resize: vertical;
  min-height: 84px;
}

.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

button {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
}

.primary {
  background: linear-gradient(90deg, #00a9f1, #33d5ff);
  color: #03293e;
}

.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.danger {
  background: rgba(255, 122, 122, 0.2);
  color: #ffd2d2;
  border: 1px solid rgba(255, 140, 140, 0.35);
}

.login-panel {
  max-width: 420px;
  margin: 12vh auto 0;
}

.status {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}

.hidden {
  display: none !important;
}

@media (max-width: 920px) {
  .forest-layout,
  .forest-layout.pos-right,
  .forest-layout.pos-bottom {
    grid-template-columns: 1fr;
    grid-template-rows: unset;
  }

  .control-panel {
    order: 2;
  }

  .forest-stage {
    min-height: 300px;
  }

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

  .timer {
    grid-template-columns: repeat(2, 1fr);
  }

  .screen-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .title-block h1 {
    font-size: clamp(22px, 5vw, 30px);
  }

  .title-block p,
  .server-time {
    font-size: 12px;
  }

  .title-block {
    white-space: normal;
    flex-wrap: wrap;
    gap: 4px 10px;
  }

  .screen-wrap,
  .screen-wrap.nav-right,
  .screen-wrap.nav-bottom,
  .screen-wrap.nav-hidden,
  .screen-wrap.nav-right.nav-hidden,
  .screen-wrap.nav-bottom.nav-hidden {
    padding-left: 10px;
    padding-right: 10px;
    padding-bottom: 92px;
  }

  .top-nav,
  .screen-wrap.nav-right .top-nav,
  .screen-wrap.nav-bottom .top-nav {
    left: 50%;
    right: auto;
    top: auto;
    bottom: 8px;
    transform: translateX(-50%);
    flex-direction: row;
    width: auto;
    max-width: calc(100vw - 20px);
    overflow-x: auto;
    gap: 8px;
    padding: 8px;
  }

  .nav-head-text span,
  .build-tag {
    display: none;
  }

  .nav-head {
    align-items: center;
  }

  .nav-reveal-btn {
    left: 50%;
    right: auto;
    top: auto;
    bottom: 8px;
    transform: translateX(-50%);
  }

  .screen-wrap.nav-left .top-nav.is-hidden,
  .screen-wrap.nav-right .top-nav.is-hidden,
  .screen-wrap.nav-bottom .top-nav.is-hidden {
    transform: translate(-50%, calc(100% + 24px));
  }

  .top-nav::-webkit-scrollbar {
    height: 5px;
  }

  .top-nav::-webkit-scrollbar-thumb {
    background: rgba(150, 211, 250, 0.42);
    border-radius: 999px;
  }

  .nav-btn {
    min-width: 98px;
    text-align: center;
  }

  .nav-btn:hover,
  .nav-btn.active {
    transform: translateY(-1px);
  }
}

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

  .forest-actions {
    grid-template-columns: 1fr;
  }

  .screen-wrap {
    height: auto;
    min-height: 100vh;
  }

  .screen-body {
    overflow: auto;
  }
}

.attendance-meta {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: 12px;
  margin-top: 12px;
}

.choice-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.choice-btn,
.select-input {
  border: 1px solid rgba(145, 193, 236, 0.35);
  background: rgba(2, 18, 34, 0.45);
  color: var(--text);
  border-radius: 12px;
  min-height: 42px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.choice-btn {
  padding: 10px 12px;
}

.choice-btn:hover,
.choice-btn.active,
.select-input:focus,
.select-input:hover {
  border-color: rgba(133, 216, 255, 0.72);
  background: rgba(14, 47, 78, 0.75);
  box-shadow: 0 10px 24px rgba(8, 28, 49, 0.2);
}

.choice-btn.active {
  color: #f3fbff;
  background: linear-gradient(135deg, rgba(18, 117, 167, 0.92), rgba(43, 183, 214, 0.82));
}

.select-input {
  width: 100%;
  padding: 0 12px;
  font-family: inherit;
  font-size: 14px;
  appearance: none;
}

.permission-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(132, 203, 255, 0.2);
  background: linear-gradient(135deg, rgba(9, 34, 57, 0.72), rgba(12, 46, 66, 0.52));
}

.permission-card strong {
  display: block;
  font-size: 14px;
  color: #eff8ff;
}

.permission-card p {
  margin: 6px 0 0;
  color: #a9cae5;
  font-size: 12px;
  line-height: 1.5;
}

.permission-card.granted {
  border-color: rgba(107, 203, 119, 0.45);
  background: linear-gradient(135deg, rgba(24, 70, 46, 0.82), rgba(13, 45, 41, 0.68));
}

.kpi-week {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.kpi-week-main {
  min-width: 0;
}

.kpi-week-side {
  display: grid;
  gap: 8px;
  min-width: 86px;
}

.kpi-side-row {
  display: grid;
  gap: 2px;
  justify-items: end;
  color: var(--muted);
  font-size: 12px;
}

.kpi-side-row b {
  color: #f4fbff;
  font-size: 16px;
}

.compact-session > div,
.compact-sliders,
.forest-actions button,
.permission-card button {
  min-width: 0;
}

@media (max-width: 920px) {
  .attendance-meta {
    grid-template-columns: 1fr;
  }

  .permission-card {
    grid-template-columns: 1fr;
  }

  .permission-card button,
  .forest-actions button,
  .btn-row button {
    width: 100%;
  }

  .top-row .btn-row {
    width: 100%;
  }

  .admin-wrap {
    padding: 18px 12px 34px;
  }

  .card {
    padding: 14px;
  }

  .forest-stage {
    min-height: 360px;
  }

  .forest-land {
    padding: 58px 12px 12px;
    gap: 6px;
  }

  .tree-item {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }
}

@media (max-width: 640px) {
  .screen-wrap,
  .screen-wrap.nav-right,
  .screen-wrap.nav-bottom,
  .screen-wrap.nav-hidden,
  .screen-wrap.nav-right.nav-hidden,
  .screen-wrap.nav-bottom.nav-hidden {
    padding: 10px 10px 84px;
    gap: 10px;
  }

  .panel {
    padding: 12px;
    border-radius: 16px;
  }

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

  .kpi strong {
    font-size: 26px;
  }

  .kpi-week {
    grid-template-columns: 1fr;
  }

  .kpi-week-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
  }

  .kpi-side-row {
    justify-items: start;
    padding-top: 6px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
  }

  .scroll-wrap {
    min-height: 180px;
  }

  .timer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .time-item strong {
    font-size: 28px;
  }

  .top-nav,
  .screen-wrap.nav-right .top-nav,
  .screen-wrap.nav-bottom .top-nav {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    justify-content: flex-start;
    padding: 8px 10px;
  }

  .nav-btn {
    min-width: 88px;
    padding: 10px 12px;
    font-size: 13px;
  }

  .control-panel {
    padding: 12px;
  }

  .forest-layout,
  .forest-layout.pos-right,
  .forest-layout.pos-bottom {
    gap: 10px;
  }

  .session-box,
  .forest-stats,
  .dock-buttons {
    grid-template-columns: 1fr 1fr;
  }

  .mode-selector {
    grid-template-columns: 1fr 1fr;
  }

  .forest-stage {
    min-height: 320px;
  }

  .title-block h1 {
    font-size: 24px;
  }

  input,
  textarea,
  .select-input {
    font-size: 16px;
  }
}
