:root {
  --blue-900: #082f96;
  --blue-800: #0a3daf;
  --blue-700: #0c4ec9;
  --cyan-500: #20bce9;
  --cyan-100: #e9f9ff;
  --ink: #111827;
  --muted: #667085;
  --line: #d9e2ef;
  --soft-line: #edf2f8;
  --surface: #ffffff;
  --surface-soft: #f6f9fd;
  --page-bg: #ffffff;
  --heading: #071d57;
  --panel-bg: rgba(255, 255, 255, 0.94);
  --header-bg: rgba(255, 255, 255, 0.9);
  --input-bg: #ffffff;
  --graphic-line: rgba(8, 47, 150, 0.075);
  --shadow: 0 18px 50px rgba(8, 47, 150, 0.12);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --blue-900: #8fb8ff;
  --blue-800: #a7c9ff;
  --blue-700: #6ea2ff;
  --cyan-500: #42d6f5;
  --cyan-100: #102a3a;
  --ink: #edf5ff;
  --muted: #a8b7cf;
  --line: rgba(139, 169, 215, 0.32);
  --soft-line: rgba(139, 169, 215, 0.18);
  --surface: #111d33;
  --surface-soft: #16243d;
  --page-bg: #071120;
  --heading: #f3f8ff;
  --panel-bg: rgba(15, 27, 48, 0.92);
  --header-bg: rgba(7, 17, 32, 0.9);
  --input-bg: #0b1729;
  --graphic-line: rgba(102, 201, 238, 0.16);
  --shadow: 0 20px 54px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  line-height: 1.5;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  opacity: 0.65;
  background:
    linear-gradient(90deg, transparent 0 23px, var(--graphic-line) 24px, transparent 25px),
    linear-gradient(180deg, transparent 0 23px, var(--graphic-line) 24px, transparent 25px);
  background-size: 96px 96px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 70%);
}

.site-header,
main,
.site-footer,
.admin-sidebar,
.admin-main {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  min-height: 76px;
  padding: 14px clamp(20px, 5vw, 72px);
  background: var(--header-bg);
  border-bottom: 1px solid rgba(217, 226, 239, 0.8);
  backdrop-filter: blur(18px);
}

.site-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.language-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--input-bg);
  color: var(--ink);
  font-weight: 750;
}

.language-picker span {
  font-size: 1.05rem;
  line-height: 1;
}

.language-picker select {
  width: 168px;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font-size: 0.9rem;
  font-weight: 750;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

:root[data-theme="dark"] .brand {
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.brand-logo {
  display: block;
  width: clamp(138px, 15vw, 188px);
  height: auto;
  object-fit: contain;
  filter: none !important;
  mix-blend-mode: normal;
}

.admin-logo {
  width: min(190px, 100%);
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: var(--blue-900);
}

.brand-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-icon path:last-child {
  fill: currentColor;
  stroke: none;
}

.brand-word {
  color: var(--blue-900);
  font-size: 1.42rem;
  font-weight: 850;
  line-height: 1;
}

.brand-word span {
  color: var(--cyan-500);
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 650;
}

.nav-links a {
  padding: 8px 0;
}

.header-action,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.94rem;
  font-weight: 750;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--input-bg);
  color: var(--blue-900);
  font-size: 0.9rem;
  font-weight: 850;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(32, 188, 233, 0.58);
}

.header-action,
.button.primary {
  background: linear-gradient(135deg, var(--blue-900), var(--blue-700));
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(8, 47, 150, 0.22);
}

.button.secondary {
  background: var(--input-bg);
  border-color: var(--line);
  color: var(--blue-900);
}

.button:hover,
.header-action:hover {
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--input-bg);
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--blue-900);
}

main {
  overflow: hidden;
}

.section-band {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-soft) 92%, transparent), color-mix(in srgb, var(--page-bg) 96%, transparent)),
    linear-gradient(90deg, var(--graphic-line) 1px, transparent 1px),
    linear-gradient(var(--graphic-line) 1px, transparent 1px);
  background-size: auto, 52px 52px, 52px 52px;
}

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.8fr);
  gap: clamp(28px, 5vw, 76px);
  align-items: center;
  min-height: clamp(640px, calc(100vh - 180px), 820px);
  padding: clamp(42px, 6vw, 86px) clamp(20px, 5vw, 72px) 58px;
}

.hero::after {
  position: absolute;
  right: clamp(18px, 5vw, 72px);
  bottom: 34px;
  z-index: -1;
  width: min(420px, 42vw);
  height: 240px;
  content: "";
  opacity: 0.45;
  background:
    linear-gradient(90deg, transparent 0 48%, var(--graphic-line) 48% 52%, transparent 52%),
    linear-gradient(180deg, transparent 0 48%, var(--graphic-line) 48% 52%, transparent 52%),
    repeating-linear-gradient(135deg, transparent 0 18px, var(--graphic-line) 19px 20px);
  clip-path: polygon(0 20%, 62% 0, 100% 28%, 82% 100%, 24% 86%);
}

.hero h1 {
  max-width: 860px;
  margin: 0;
  color: var(--heading);
  font-size: clamp(2.5rem, 5.4vw, 4.9rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero p {
  max-width: 690px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.7vw, 1.28rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.hero-panel,
.analytics-panel,
.comment-form,
.comment-card,
.project-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-bg);
  box-shadow: var(--shadow);
}

.hero-signal-map {
  display: grid;
  grid-template-columns: repeat(5, minmax(24px, 1fr));
  gap: 10px;
  width: min(420px, 100%);
  margin-top: 34px;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, transparent 0 49%, var(--graphic-line) 49% 51%, transparent 51%),
    var(--panel-bg);
}

.hero-signal-map span {
  display: block;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--blue-900), var(--cyan-500));
}

.hero-signal-map span:nth-child(2),
.hero-signal-map span:nth-child(4) {
  opacity: 0.58;
}

.hero-panel {
  min-width: 0;
  padding: clamp(22px, 3vw, 34px);
}

.panel-topline {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.mini-label {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: uppercase;
}

.panel-topline strong {
  display: block;
  margin-top: 4px;
  color: var(--heading);
  font-size: 1.5rem;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #087443;
  font-size: 0.85rem;
  font-weight: 750;
}

.status-dot::before {
  width: 9px;
  height: 9px;
  content: "";
  border-radius: 50%;
  background: #18b26b;
  box-shadow: 0 0 0 5px rgba(24, 178, 107, 0.13);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 28px 0;
}

.metric-grid article,
.analytics-metrics article {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.metric-grid span,
.analytics-metrics span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.metric-grid strong,
.analytics-metrics strong {
  display: block;
  margin-top: 6px;
  color: var(--blue-900);
  font-size: 1.25rem;
}

.terminal-card {
  overflow: hidden;
  border: 1px solid #122e6d;
  border-radius: var(--radius);
  background: #06163d;
  color: #d8f5ff;
}

.terminal-dots {
  display: flex;
  gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.terminal-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cyan-500);
  opacity: 0.82;
}

pre {
  margin: 0;
  padding: 18px;
  overflow: auto;
  font-size: 0.85rem;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.projects-section,
.versions-section,
.visitors-section,
.comments-section,
.platform-section {
  padding: clamp(64px, 8vw, 108px) clamp(20px, 5vw, 72px);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: end;
  margin-bottom: 28px;
}

.section-heading.narrow {
  display: block;
  max-width: 760px;
}

.section-heading h2,
.analytics-copy h2 {
  margin: 0;
  color: #071d57;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.02;
}

.section-heading p,
.analytics-copy p {
  max-width: 610px;
  margin: 0;
  color: #53647f;
  font-size: 1rem;
}

.project-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 24px;
}

.search-field {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 520px;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.search-field svg {
  width: 19px;
  height: 19px;
  margin-right: 10px;
  fill: var(--blue-900);
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
}

.filter-buttons {
  display: flex;
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.filter {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #42516b;
  font-size: 0.88rem;
  font-weight: 750;
  cursor: pointer;
}

.filter.active {
  background: #ffffff;
  color: var(--blue-900);
  box-shadow: 0 6px 16px rgba(8, 47, 150, 0.12);
}

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

.project-card {
  display: flex;
  flex-direction: column;
  min-height: 280px;
  padding: 22px;
}

.project-card.active {
  border-color: rgba(29, 191, 232, 0.75);
  box-shadow: 0 18px 44px rgba(29, 191, 232, 0.18);
}

.project-card header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.project-card h3 {
  margin: 0;
  color: #071d57;
  font-size: 1.3rem;
}

.project-card p {
  margin: 16px 0 0;
  color: #53647f;
}

.version-chip {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 6px;
  background: var(--cyan-100);
  color: var(--blue-900);
  font-size: 0.78rem;
  font-weight: 800;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag-row span {
  padding: 6px 8px;
  border: 1px solid var(--soft-line);
  border-radius: 6px;
  color: #47566f;
  font-size: 0.78rem;
  font-weight: 700;
}

.repository-meta {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  color: #667085;
  font-size: 0.82rem;
}

.repository-meta span {
  overflow-wrap: anywhere;
}

.project-card footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 22px;
}

.project-card footer a,
.project-open {
  color: var(--blue-800);
  font-weight: 800;
}

.project-open {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.timeline {
  display: grid;
  gap: 14px;
  max-width: 1120px;
  margin-top: 30px;
}

.project-detail {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.project-detail header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.project-detail h3 {
  margin: 0;
  color: #071d57;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.project-detail p {
  max-width: 860px;
  color: #53647f;
}

.timeline-item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.timeline-date {
  color: var(--blue-900);
  font-weight: 850;
}

.timeline-item h3 {
  margin: 0;
  color: #071d57;
}

.timeline-item p {
  margin: 8px 0 0;
  color: #53647f;
}

.timeline-item ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #53647f;
}

.release-actions {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7fbff;
}

.download-actions {
  border-color: #73d8ee;
  background: #eafaff;
}

.docker-actions {
  border-color: #bad1ff;
  background: #f4f7ff;
}

.release-actions h4 {
  margin: 0;
  color: #071d57;
}

.release-actions pre {
  margin: 0;
  overflow: auto;
  border-radius: var(--radius);
  background: #071d57;
  color: #e8f2ff;
  padding: 14px;
}

.release-actions code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.85rem;
  line-height: 1.6;
}

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

.download-list.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.download-list a {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #52cce7;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff 0%, #effcff 100%);
  color: #071d57;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(29, 191, 232, 0.12);
}

.download-list a:hover {
  border-color: #00319f;
  transform: translateY(-1px);
}

.release-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #dbf8eb;
  color: #0f7a4d;
  font-size: 0.72rem;
  font-weight: 800;
  vertical-align: middle;
}

.release-archive-note {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px dashed #c8d4ea;
  border-radius: var(--radius);
  background: #f8fafc;
  color: #53647f;
  font-size: 0.9rem;
}

.download-list a span {
  overflow-wrap: anywhere;
  color: #667085;
  font-size: 0.8rem;
}

.visitors-section {
  display: grid;
  grid-template-columns: minmax(520px, 0.9fr) minmax(360px, 1fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
}

.analytics-copy h2 {
  white-space: nowrap;
}

.privacy-note {
  margin-top: 24px;
  padding: 16px;
  border-left: 4px solid var(--cyan-500);
  background: var(--surface-soft);
  color: #41516d;
}

.analytics-panel {
  padding: 22px;
}

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

.geo-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.geo-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #ffffff;
}

.geo-row span {
  color: var(--muted);
  font-size: 0.86rem;
}

.geo-bar {
  grid-column: 1 / -1;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eef6;
}

.geo-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-900), var(--cyan-500));
}

.comments-layout {
  display: grid;
  grid-template-columns: minmax(300px, 410px) 1fr;
  gap: 24px;
}

.comment-form {
  align-self: start;
  display: grid;
  gap: 14px;
  padding: 22px;
}

.comment-form label {
  display: grid;
  gap: 8px;
  color: #34445f;
  font-size: 0.9rem;
  font-weight: 760;
}

.comment-form input,
.comment-form select,
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  padding: 12px;
  outline: 0;
}

.comment-form textarea {
  resize: vertical;
}

.form-status {
  min-height: 22px;
  margin: 0;
  color: var(--blue-900);
  font-size: 0.9rem;
  font-weight: 700;
}

.comment-list {
  display: grid;
  gap: 14px;
}

.comment-card {
  padding: 18px;
}

.comment-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #071d57;
  font-weight: 800;
}

.comment-card time {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 650;
}

.comment-card p {
  margin: 12px 0 0;
  color: #4b5d78;
}

.comment-project {
  display: inline-flex;
  margin-top: 12px;
  color: var(--blue-800);
  font-size: 0.82rem;
  font-weight: 800;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 28px clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: #4b5d78;
}

.site-footer div {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #071d57;
}

.footer-mark {
  width: 34px;
  height: 34px;
}

.footer-logo {
  display: block;
  width: 142px;
  height: auto;
  object-fit: contain;
}

.empty-state,
.error-state {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--muted);
}

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

.layer-card {
  min-height: 250px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(8, 47, 150, 0.08);
}

.layer-card > span {
  color: var(--cyan-500);
  font-size: 0.86rem;
  font-weight: 850;
}

.layer-card h3 {
  margin: 18px 0 10px;
  color: #071d57;
  font-size: 1.45rem;
}

.layer-card p {
  margin: 0;
  color: #53647f;
}

.layer-card.locked {
  background: #06163d;
  color: #ffffff;
}

.layer-card.locked h3,
.layer-card.locked > span {
  color: #ffffff;
}

.layer-card.locked p {
  color: #c8d5ef;
}

.layer-card.locked a {
  display: inline-flex;
  margin-top: 20px;
  color: #6ee0ff;
  font-weight: 850;
}

.admin-body {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  min-height: 100vh;
  background: #f5f8fc;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: #ffffff;
}

.admin-brand {
  flex: 0 0 auto;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--soft-line);
}

.admin-brand .brand-logo {
  max-height: 70px;
}

.admin-nav {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  display: grid;
  gap: 6px;
}

.admin-nav::-webkit-scrollbar {
  width: 8px;
}

.admin-nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(83, 100, 127, 0.35);
}

.admin-nav::-webkit-scrollbar-track {
  background: transparent;
}

.admin-nav a,
.nav-folder > button,
.nav-folder-items button {
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: #42516b;
  font-size: 0.94rem;
  font-weight: 760;
  text-align: left;
  cursor: pointer;
}

.admin-nav a.active,
.admin-nav a:hover,
.nav-folder > button:hover,
.nav-folder-items button:hover,
.nav-folder-items button.active {
  background: var(--surface-soft);
  color: var(--blue-900);
}

.nav-folder {
  display: grid;
  gap: 4px;
}

.nav-folder > button {
  position: relative;
  color: #071d57;
}

.nav-folder > button::after {
  position: absolute;
  right: 12px;
  content: "+";
  color: var(--muted);
  font-weight: 900;
}

.nav-folder.open > button {
  background: var(--surface-soft);
}

.nav-folder.open > button::after {
  content: "-";
}

.nav-folder-items {
  display: none;
  gap: 3px;
  padding-left: 10px;
  border-left: 2px solid var(--soft-line);
}

.nav-folder.open .nav-folder-items {
  display: grid;
}

.nav-folder-items button {
  min-height: 34px;
  padding: 8px 10px;
  color: #53647f;
  font-size: 0.86rem;
}

.auth-card {
  flex: 0 0 auto;
  margin-top: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #06163d;
  color: #ffffff;
}

.auth-card span,
.identity-card span {
  display: block;
  color: #8aa4d6;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-card strong {
  display: block;
  margin-top: 6px;
}

.auth-card p {
  margin: 10px 0 0;
  color: #c8d5ef;
  font-size: 0.9rem;
}

.admin-main {
  min-width: 0;
  padding: 28px clamp(22px, 4vw, 52px) 56px;
}

.runtime-warning {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #f0c36d;
  border-left: 4px solid #c88700;
  border-radius: var(--radius);
  background: #fff8e5;
  color: #694b00;
  font-weight: 700;
}

.runtime-warning code {
  color: #071d57;
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 28px;
}

.admin-topbar h1 {
  margin: 5px 0 0;
  color: #071d57;
  font-size: clamp(2.1rem, 4vw, 4rem);
  line-height: 1;
}

.identity-card {
  min-width: 260px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.identity-card strong {
  display: block;
  margin-top: 4px;
  color: #071d57;
}

.admin-section {
  scroll-margin-top: 24px;
  margin-top: 30px;
}

.admin-section[hidden] {
  display: none;
}

.admin-heading {
  display: flex;
  justify-content: space-between;
  gap: 26px;
  align-items: end;
  margin-bottom: 16px;
}

.admin-heading h2,
.admin-panel h2,
.admin-panel h3 {
  margin: 0;
  color: #071d57;
}

.admin-heading p {
  max-width: 720px;
  margin: 0;
  color: #53647f;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.admin-metrics article,
.admin-panel,
.server-card,
.proxy-card,
.release-review article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(8, 47, 150, 0.07);
}

.admin-metrics article {
  padding: 18px;
}

.admin-metrics span,
.admin-metrics em {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 750;
}

.admin-metrics strong {
  display: block;
  margin: 8px 0 2px;
  color: var(--blue-900);
  font-size: 2rem;
  line-height: 1;
}

.admin-grid.two,
.security-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

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

.admin-panel {
  padding: 20px;
}

.admin-panel header,
.server-card header,
.proxy-card header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.panel-actions,
.map-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.panel-actions button,
.segmented-actions button,
.icon-button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--blue-900);
  font-weight: 800;
  cursor: pointer;
}

.segmented-actions {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #eef4ff;
}

.segmented-actions button {
  border: 0;
  background: transparent;
}

.segmented-actions button.active {
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(8, 47, 150, 0.12);
}

.icon-button {
  width: 36px;
  padding: 0;
  font-size: 1.4rem;
  line-height: 1;
}

.admin-panel p {
  color: #53647f;
}

.ops-list,
.task-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.ops-list div {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--soft-line);
}

.ops-list span,
.task-list p {
  margin: 0;
  color: #53647f;
}

.task-list div {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 10px;
  align-items: start;
}

.task-list span {
  width: 9px;
  height: 9px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--cyan-500);
}

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

.server-card,
.proxy-card {
  padding: 18px;
}

.server-card-action {
  cursor: pointer;
}

.server-card-action:focus-within,
.server-card-action:hover {
  border-color: rgba(0, 177, 226, 0.48);
  box-shadow: 0 18px 44px rgba(0, 49, 159, 0.12);
}

.server-card h3,
.proxy-card h3 {
  margin: 4px 0 0;
  color: #071d57;
}

.server-card p,
.proxy-card p {
  min-height: 48px;
  color: #53647f;
}

.state-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.state-pill.ok {
  background: #e8f8ef;
  color: #087443;
}

.state-pill.warn {
  background: #fff6df;
  color: #8a5c00;
}

.state-pill.muted {
  background: #eef2f7;
  color: #53647f;
}

.resource-bars {
  display: grid;
  gap: 10px;
}

.resource-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  color: #53647f;
  font-size: 0.84rem;
  font-weight: 700;
}

.resource-row div {
  grid-column: 1 / -1;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eef6;
}

.resource-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-900), var(--cyan-500));
}

.server-plugins {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.server-plugins article {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #dbe6f7;
  border-radius: 8px;
  background: #f8fbff;
}

.server-plugins strong {
  color: #071d57;
  font-size: 0.86rem;
}

.server-plugins span {
  color: #00319f;
  font-size: 0.78rem;
  font-weight: 800;
}

.server-plugins em {
  color: #667085;
  font-size: 0.76rem;
  font-style: normal;
  line-height: 1.35;
}

.server-card footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--soft-line);
}

.server-card button,
.control-cell button,
.release-review button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f3f6fb;
  color: #6b768a;
  font-size: 0.82rem;
  font-weight: 800;
}

.service-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.service-toolbar select {
  min-height: 46px;
  min-width: 180px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: #34445f;
  font-weight: 760;
}

.service-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(8, 47, 150, 0.07);
}

.dashboard-widgets {
  margin-top: 0;
}

.weather-main {
  display: flex;
  gap: 18px;
  align-items: center;
  margin: 18px 0;
}

.weather-main > strong,
.time-card > strong {
  color: var(--blue-900);
  font-size: clamp(2.4rem, 5vw, 4.3rem);
  line-height: 1;
  white-space: nowrap;
}

.weather-main span {
  display: block;
  color: #071d57;
  font-weight: 850;
}

.weather-main p,
.time-card p {
  margin: 5px 0 0;
  color: #53647f;
}

.forecast-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.forecast-row div {
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.forecast-row span,
.forecast-row em {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 750;
}

.forecast-row strong {
  display: block;
  margin: 5px 0;
  color: var(--blue-900);
}

.ops-list.compact div {
  grid-template-columns: 150px 1fr;
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 16px;
}

.calendar-panel header {
  align-items: center;
}

.calendar-panel h3,
.appointment-form h3 {
  margin: 0;
  color: #071d57;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--blue-900);
  font-size: 1.1rem;
  font-weight: 900;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.calendar-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-align: center;
}

.calendar-day {
  position: relative;
  min-height: 72px;
  padding: 9px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #ffffff;
  color: #071d57;
  text-align: left;
  cursor: pointer;
}

.calendar-day strong {
  font-size: 0.92rem;
}

.calendar-day span {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--blue-900);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 850;
}

.calendar-day em {
  display: block;
  max-width: 100%;
  margin-top: 8px;
  overflow: hidden;
  color: #087443;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 850;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-day.weekend {
  background: #f5f8fc;
}

.calendar-day.free-day {
  border-color: rgba(24, 178, 107, 0.45);
  background: #e8f8ef;
}

.calendar-day.today {
  box-shadow: inset 0 0 0 2px var(--cyan-500);
}

.calendar-day.selected {
  border-color: var(--blue-900);
  box-shadow: inset 0 0 0 2px var(--blue-900);
}

.calendar-day.outside {
  color: #a7b2c3;
}

.appointment-form {
  display: grid;
  gap: 13px;
}

.appointment-form label {
  display: grid;
  gap: 7px;
  color: #34445f;
  font-size: 0.9rem;
  font-weight: 760;
}

.appointment-form input,
.appointment-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  padding: 11px;
  outline: 0;
}

.form-actions {
  display: flex;
  gap: 10px;
}

.appointment-list {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.appointment-list article {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: stretch;
}

.appointment-list button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: #34445f;
  text-align: left;
  font-weight: 760;
}

.appointment-list button:first-child {
  padding: 10px;
}

.appointment-list button:last-child {
  padding: 0 10px;
  color: #9b1c1c;
}

.appointment-list span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

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

.service-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
}

.service-table th,
.service-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--soft-line);
  text-align: left;
  color: #42516b;
  font-size: 0.9rem;
}

.service-table th {
  background: #f6f9fd;
  color: #071d57;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

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

.control-cell {
  display: flex;
  gap: 8px;
}

.table-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 320px;
}

.table-metrics span {
  display: inline-flex;
  gap: 4px;
  align-items: baseline;
  padding: 4px 7px;
  border-radius: 6px;
  background: var(--surface-soft);
  color: #53647f;
  font-size: 0.76rem;
  font-weight: 760;
  white-space: nowrap;
}

.table-metrics strong {
  color: var(--blue-900);
  font-size: 0.82rem;
}

.visitor-metrics {
  margin-bottom: 16px;
}

.visitor-admin-grid {
  margin-top: 0;
}

.admin-geo-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.visitor-log-panel {
  margin-top: 16px;
}

.visitor-table-wrap {
  overflow: auto;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.visitor-table {
  min-width: 960px;
  box-shadow: none;
}

.visitor-table td:last-child {
  max-width: 420px;
  overflow-wrap: anywhere;
  color: #53647f;
  font-size: 0.82rem;
}

.visitor-table code {
  color: var(--blue-900);
  font-weight: 800;
}

.admin-modal[hidden] {
  display: none;
}

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 40px);
}

.admin-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 29, 87, 0.48);
  backdrop-filter: blur(6px);
}

.admin-map-dialog {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  max-height: min(820px, 92vh);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(7, 29, 87, 0.28);
  padding: clamp(16px, 2vw, 24px);
}

.admin-map-dialog header,
.admin-map-dialog footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.unas-details-dialog {
  width: min(1180px, 100%);
}

.unas-details-dialog h3,
.unas-details-dialog h4 {
  color: #071d57;
}

.unas-detail-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.unas-detail-summary article,
.unas-detail-grid section,
.unas-detail-card,
.unas-empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbff;
}

.unas-detail-summary article {
  display: grid;
  gap: 4px;
  padding: 14px;
}

.unas-detail-summary span,
.unas-detail-list span {
  color: #53647f;
  font-size: 0.78rem;
  font-weight: 800;
}

.unas-detail-summary strong {
  color: #002d91;
  font-size: 1.18rem;
}

.unas-detail-summary em {
  color: #667085;
  font-size: 0.76rem;
  font-style: normal;
}

.unas-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.unas-detail-grid section {
  padding: 14px;
}

.unas-detail-grid .wide {
  grid-column: 1 / -1;
}

.synology-detail-stack {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.synology-detail-stack .wide {
  grid-column: 1 / -1;
}

.synology-detail-stack .synology-system-section,
.synology-detail-stack .synology-volume-section {
  grid-column: span 3;
}

.synology-detail-stack .synology-package-section {
  grid-column: span 2;
}

.synology-detail-stack .synology-container-section {
  grid-column: span 4;
}

.unas-detail-grid h4 {
  margin: 0 0 12px;
  font-size: 0.96rem;
}

.unas-detail-list {
  display: grid;
  gap: 8px;
}

.unas-detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(210, 223, 242, 0.72);
  padding-bottom: 8px;
}

.unas-detail-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.unas-detail-list strong {
  color: #071d57;
  font-size: 0.86rem;
  text-align: right;
}

.unas-detail-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  margin-bottom: 10px;
}

.unas-detail-card header,
.unas-detail-card.compact {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.unas-detail-card strong {
  color: #071d57;
}

.unas-detail-card span {
  color: #00319f;
  font-weight: 900;
}

.unas-detail-card p,
.unas-detail-card em,
.unas-empty {
  color: #53647f;
  font-size: 0.82rem;
  font-style: normal;
}

.unas-detail-card .meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7eef7;
}

.unas-detail-card .meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #00319f, #22c3e6);
}

.unas-detail-table-wrap {
  overflow-x: auto;
}

.unas-detail-table th,
.unas-detail-table td {
  white-space: nowrap;
}

.unas-empty {
  padding: 14px;
}

.synology-card-list {
  display: grid;
  gap: 10px;
}

.synology-action-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbff;
  padding: 12px;
}

.synology-action-card div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.synology-action-card strong {
  color: #071d57;
}

.synology-action-card span,
.synology-action-card em {
  color: #53647f;
  font-size: 0.82rem;
  font-style: normal;
  overflow-wrap: anywhere;
}

.synology-action-card .update-available {
  color: #0b7f4c;
  font-weight: 800;
}

.synology-action-card button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #eef4fb;
  color: #53647f;
  font-weight: 800;
}

.container-status-summary,
.synology-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.container-status-summary {
  margin-bottom: 12px;
  color: #53647f;
  font-size: 0.9rem;
}

.container-status-summary strong {
  color: #00875a;
}

.container-status-summary .update-available {
  color: #0b7f4c;
  font-weight: 900;
}

.container-state {
  border-radius: 999px;
  background: #e8f7ef;
  color: #00875a;
  padding: 5px 9px;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.container-state.exited,
.container-state.stopped,
.container-state.dead {
  background: #fff4e5;
  color: #a15c00;
}

.container-state.restarting,
.container-state.paused {
  background: #eef4ff;
  color: #00319f;
}

.admin-map-dialog footer {
  margin-top: 14px;
  color: #53647f;
  font-weight: 700;
}

.visitor-map-stage {
  position: relative;
  min-height: clamp(320px, 52vw, 560px);
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #e8f2ff;
}

.map-empty {
  position: absolute;
  inset: auto 24px 24px;
  background: rgba(255, 255, 255, 0.88);
  z-index: 500;
}

.leaflet-container {
  font: inherit;
}

.leaflet-popup-content {
  color: #071d57;
  line-height: 1.5;
}

.translation-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.translation-panel button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--blue-900);
  font-weight: 800;
  cursor: pointer;
}

.translation-panel button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.translation-status,
.translation-log {
  margin-top: 14px;
}

.translation-log p {
  margin: 8px 0 0;
  color: #53647f;
}

.proxy-card strong {
  display: inline-flex;
  margin-top: 10px;
  color: var(--blue-900);
  font-size: 0.86rem;
}

.service-widget-grid,
.management-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-menu-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.menu-map-card {
  display: grid;
  gap: 14px;
}

.menu-map-card header span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.menu-map-card > div {
  display: grid;
  gap: 8px;
}

.menu-map-card button {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  text-align: left;
  cursor: pointer;
}

.menu-map-card button:hover {
  border-color: rgba(32, 188, 233, 0.8);
  background: #ffffff;
}

.menu-map-card strong {
  color: #071d57;
}

.menu-map-card span {
  color: var(--muted);
  font-size: 0.82rem;
}

.section-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.section-switcher button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: #42516b;
  font-size: 0.88rem;
  font-weight: 820;
  cursor: pointer;
}

.section-switcher button.active,
.section-switcher button:hover {
  border-color: rgba(32, 188, 233, 0.8);
  background: var(--cyan-100);
  color: var(--blue-900);
}

.service-section-stack {
  display: grid;
  gap: 16px;
}

.service-section-group {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(8, 47, 150, 0.07);
}

.service-section-group > header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
}

.service-section-group h3 {
  margin: 4px 0 0;
  color: #071d57;
}

.service-section-group > header strong {
  color: var(--blue-900);
  font-size: 0.9rem;
}

.service-widget {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  min-height: 154px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(8, 47, 150, 0.06);
}

.service-widget:hover,
.service-widget:focus-within {
  border-color: rgba(32, 188, 233, 0.8);
}

.service-launcher {
  cursor: pointer;
}

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--blue-900), var(--cyan-500));
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
}

.service-widget strong,
.service-widget small {
  display: block;
}

.service-widget strong {
  color: #071d57;
}

.service-widget small {
  color: var(--muted);
  font-size: 0.8rem;
}

.service-widget em {
  grid-column: 1 / -1;
  color: var(--blue-800);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 850;
  text-transform: uppercase;
}

.service-metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.service-metrics div {
  min-width: 0;
  padding: 9px 8px;
  border: 1px solid var(--soft-line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.service-metrics span,
.service-metrics strong {
  display: block;
  overflow-wrap: anywhere;
}

.service-metrics span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.15;
}

.service-metrics strong {
  margin-top: 4px;
  color: var(--blue-900);
  font-size: 0.98rem;
  line-height: 1.1;
}

.service-widget .state-pill {
  grid-column: 1 / 2;
  justify-self: start;
}

.service-widget a {
  grid-column: 2 / 3;
  justify-self: start;
  color: var(--blue-800);
  font-size: 0.82rem;
  font-weight: 850;
}

.service-widget.missing {
  opacity: 0.72;
}

.dashboard-frame-panel {
  margin-top: 18px;
}

.dashboard-frame-panel iframe {
  display: block;
  width: 100%;
  min-height: 620px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

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

.management-card p {
  min-height: 72px;
}

.management-card button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f3f6fb;
  color: #6b768a;
  font-weight: 800;
}

.release-review {
  display: grid;
  gap: 12px;
}

.release-review article {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
}

.release-review h3 {
  margin: 0;
  color: #071d57;
}

.release-review p {
  margin: 5px 0 0;
  color: #53647f;
}

:root[data-theme="dark"] .site-header {
  border-bottom-color: var(--line);
}

:root[data-theme="dark"] .site-footer,
:root[data-theme="dark"] .admin-body {
  background: var(--page-bg);
  color: var(--ink);
}

:root[data-theme="dark"] .admin-sidebar {
  background:
    linear-gradient(180deg, rgba(12, 25, 46, 0.98), rgba(7, 17, 32, 0.98)),
    linear-gradient(90deg, var(--graphic-line) 1px, transparent 1px);
  border-right-color: var(--line);
}

:root[data-theme="dark"] .admin-main::before {
  position: absolute;
  top: 18px;
  right: clamp(18px, 4vw, 58px);
  z-index: 0;
  width: min(520px, 42vw);
  height: 180px;
  content: "";
  opacity: 0.38;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 22%, var(--graphic-line) 22% 24%, transparent 24% 48%, var(--graphic-line) 48% 50%, transparent 50%),
    repeating-linear-gradient(135deg, transparent 0 15px, var(--graphic-line) 16px 17px);
  clip-path: polygon(8% 0, 100% 0, 86% 100%, 0 74%);
}

:root[data-theme="dark"] .admin-topbar {
  position: relative;
  z-index: 2;
  padding: 12px;
  margin: -12px -12px 28px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: rgba(7, 17, 32, 0.94);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.22);
}

:root[data-theme="dark"] .admin-section {
  position: relative;
  z-index: auto;
}

:root[data-theme="dark"] .admin-section:has(.admin-modal:not([hidden])) {
  z-index: 1001;
}

:root[data-theme="dark"] .hero h1,
:root[data-theme="dark"] .section-heading h2,
:root[data-theme="dark"] .project-card h3,
:root[data-theme="dark"] .layer-card h3,
:root[data-theme="dark"] .panel-topline strong,
:root[data-theme="dark"] .admin-topbar h1,
:root[data-theme="dark"] .admin-heading h2,
:root[data-theme="dark"] .admin-panel h2,
:root[data-theme="dark"] .admin-panel h3,
:root[data-theme="dark"] .server-card h3,
:root[data-theme="dark"] .proxy-card h3,
:root[data-theme="dark"] .service-widget strong,
:root[data-theme="dark"] .unas-details-dialog h3,
:root[data-theme="dark"] .unas-details-dialog h4,
:root[data-theme="dark"] .unas-detail-list strong,
:root[data-theme="dark"] .unas-detail-card strong {
  color: var(--heading);
}

:root[data-theme="dark"] main h1,
:root[data-theme="dark"] main h2,
:root[data-theme="dark"] main h3,
:root[data-theme="dark"] main h4,
:root[data-theme="dark"] .admin-main h1,
:root[data-theme="dark"] .admin-main h2,
:root[data-theme="dark"] .admin-main h3,
:root[data-theme="dark"] .admin-main h4,
:root[data-theme="dark"] .calendar-panel h3,
:root[data-theme="dark"] .appointment-form h3,
:root[data-theme="dark"] .calendar-day strong {
  color: #f7fbff;
}

:root[data-theme="dark"] .hero p,
:root[data-theme="dark"] .section-heading p,
:root[data-theme="dark"] .project-card p,
:root[data-theme="dark"] .layer-card p,
:root[data-theme="dark"] .admin-heading p,
:root[data-theme="dark"] .admin-panel p,
:root[data-theme="dark"] .server-card p,
:root[data-theme="dark"] .proxy-card p,
:root[data-theme="dark"] .comment-form label,
:root[data-theme="dark"] .unas-detail-card p,
:root[data-theme="dark"] .unas-detail-card em,
:root[data-theme="dark"] .unas-empty {
  color: var(--muted);
}

:root[data-theme="dark"] .hero-panel,
:root[data-theme="dark"] .analytics-panel,
:root[data-theme="dark"] .comment-form,
:root[data-theme="dark"] .comment-card,
:root[data-theme="dark"] .project-card,
:root[data-theme="dark"] .project-detail,
:root[data-theme="dark"] .timeline-item,
:root[data-theme="dark"] .layer-card,
:root[data-theme="dark"] .admin-panel,
:root[data-theme="dark"] .server-card,
:root[data-theme="dark"] .proxy-card,
:root[data-theme="dark"] .release-review article,
:root[data-theme="dark"] .service-section-group,
:root[data-theme="dark"] .service-widget,
:root[data-theme="dark"] .dashboard-frame-panel,
:root[data-theme="dark"] .admin-map-dialog,
:root[data-theme="dark"] .unas-detail-summary article,
:root[data-theme="dark"] .unas-detail-grid section,
:root[data-theme="dark"] .unas-detail-card,
:root[data-theme="dark"] .unas-empty,
:root[data-theme="dark"] .synology-action-card {
  border-color: var(--line);
  background: var(--panel-bg);
  box-shadow: var(--shadow);
}

:root[data-theme="dark"] .metric-grid article,
:root[data-theme="dark"] .analytics-metrics article,
:root[data-theme="dark"] .filter-buttons,
:root[data-theme="dark"] .filter.active,
:root[data-theme="dark"] .tag-row span,
:root[data-theme="dark"] .release-actions,
:root[data-theme="dark"] .download-list a,
:root[data-theme="dark"] .release-archive-note,
:root[data-theme="dark"] .empty-state,
:root[data-theme="dark"] .error-state,
:root[data-theme="dark"] .ops-list div,
:root[data-theme="dark"] .task-list div,
:root[data-theme="dark"] .admin-metrics article,
:root[data-theme="dark"] .identity-card,
:root[data-theme="dark"] .auth-card,
:root[data-theme="dark"] .management-card,
:root[data-theme="dark"] .calendar-day,
:root[data-theme="dark"] .geo-list div,
:root[data-theme="dark"] .geo-row,
:root[data-theme="dark"] .admin-geo-list div,
:root[data-theme="dark"] .admin-geo-list article,
:root[data-theme="dark"] .service-table-wrap,
:root[data-theme="dark"] .visitor-table-wrap,
:root[data-theme="dark"] .server-plugins article,
:root[data-theme="dark"] .forecast-row div,
:root[data-theme="dark"] .appointment-list button,
:root[data-theme="dark"] .segmented-actions,
:root[data-theme="dark"] .segmented-actions button.active,
:root[data-theme="dark"] .section-switcher button,
:root[data-theme="dark"] .menu-map-card button {
  border-color: var(--soft-line);
  background: var(--surface-soft);
}

:root[data-theme="dark"] .download-actions {
  border-color: rgba(66, 214, 245, 0.45);
  background: rgba(66, 214, 245, 0.1);
}

:root[data-theme="dark"] .docker-actions {
  border-color: rgba(110, 162, 255, 0.45);
  background: rgba(110, 162, 255, 0.1);
}

:root[data-theme="dark"] .download-list a {
  color: var(--heading);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

:root[data-theme="dark"] .download-list a:hover {
  border-color: var(--cyan-500);
  background: rgba(66, 214, 245, 0.14);
}

:root[data-theme="dark"] .release-actions pre {
  border: 1px solid var(--soft-line);
  background: #050b16;
  color: #d8f5ff;
}

:root[data-theme="dark"] .privacy-note {
  background: rgba(66, 214, 245, 0.1);
  color: var(--muted);
}

:root[data-theme="dark"] .service-table,
:root[data-theme="dark"] .visitor-table {
  background: var(--panel-bg);
}

:root[data-theme="dark"] .service-table tbody tr,
:root[data-theme="dark"] .visitor-table tbody tr {
  background: var(--panel-bg);
}

:root[data-theme="dark"] .service-table tbody tr:hover,
:root[data-theme="dark"] .visitor-table tbody tr:hover {
  background: rgba(66, 214, 245, 0.07);
}

:root[data-theme="dark"] .server-plugins strong,
:root[data-theme="dark"] .project-detail h3,
:root[data-theme="dark"] .timeline-item h3,
:root[data-theme="dark"] .release-actions h4,
:root[data-theme="dark"] .comment-card header,
:root[data-theme="dark"] .download-list a strong,
:root[data-theme="dark"] .weather-main span,
:root[data-theme="dark"] .identity-card strong,
:root[data-theme="dark"] .geo-row strong,
:root[data-theme="dark"] .table-metrics strong,
:root[data-theme="dark"] .visitor-table code,
:root[data-theme="dark"] .service-section-group h3,
:root[data-theme="dark"] .service-section-group > header strong,
:root[data-theme="dark"] .service-widget strong,
:root[data-theme="dark"] .menu-map-card strong {
  color: var(--heading);
}

:root[data-theme="dark"] .resource-row,
:root[data-theme="dark"] .timeline-item p,
:root[data-theme="dark"] .timeline-item ul,
:root[data-theme="dark"] .project-detail p,
:root[data-theme="dark"] .repository-meta,
:root[data-theme="dark"] .tag-row span,
:root[data-theme="dark"] .download-list a span,
:root[data-theme="dark"] .release-archive-note,
:root[data-theme="dark"] .comment-card p,
:root[data-theme="dark"] .comment-card time,
:root[data-theme="dark"] .site-footer,
:root[data-theme="dark"] .server-plugins em,
:root[data-theme="dark"] .server-plugins span,
:root[data-theme="dark"] .table-metrics span,
:root[data-theme="dark"] .ops-list span,
:root[data-theme="dark"] .task-list p,
:root[data-theme="dark"] .visitor-table td:last-child,
:root[data-theme="dark"] .appointment-list span,
:root[data-theme="dark"] .service-widget small,
:root[data-theme="dark"] .menu-map-card span {
  color: var(--muted);
}

:root[data-theme="dark"] .timeline-date,
:root[data-theme="dark"] .project-card footer a,
:root[data-theme="dark"] .project-open,
:root[data-theme="dark"] .comment-project,
:root[data-theme="dark"] .form-status {
  color: var(--cyan-500);
}

:root[data-theme="dark"] .release-badge {
  background: rgba(141, 240, 191, 0.16);
  color: #8df0bf;
}

:root[data-theme="dark"] .layer-card.locked {
  background: linear-gradient(180deg, #071120 0%, #0b1b35 100%);
}

:root[data-theme="dark"] .service-widget em {
  color: var(--cyan-500);
}

:root[data-theme="dark"] .section-switcher button.active,
:root[data-theme="dark"] .section-switcher button:hover,
:root[data-theme="dark"] .menu-map-card button:hover {
  border-color: rgba(66, 214, 245, 0.58);
  background: rgba(66, 214, 245, 0.12);
  color: var(--heading);
}

:root[data-theme="dark"] .service-icon {
  color: #ffffff;
}

:root[data-theme="dark"] .admin-nav::-webkit-scrollbar-thumb {
  background: rgba(168, 183, 207, 0.35);
}

:root[data-theme="dark"] .resource-row div,
:root[data-theme="dark"] .geo-bar {
  background: rgba(232, 242, 255, 0.12);
}

:root[data-theme="dark"] .calendar-label {
  color: #c8d8f3;
}

:root[data-theme="dark"] .calendar-day {
  color: #f7fbff;
}

:root[data-theme="dark"] .calendar-day.weekend {
  background: #1a2a47;
}

:root[data-theme="dark"] .calendar-day.free-day {
  border-color: rgba(66, 214, 245, 0.55);
  background: #14344a;
}

:root[data-theme="dark"] .calendar-day.outside,
:root[data-theme="dark"] .calendar-day.outside strong {
  color: #7485a3;
}

:root[data-theme="dark"] .calendar-day em {
  color: #8df0bf;
}

:root[data-theme="dark"] .calendar-day span {
  background: var(--cyan-500);
  color: #06163d;
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] .comment-form input,
:root[data-theme="dark"] .comment-form select,
:root[data-theme="dark"] .comment-form textarea,
:root[data-theme="dark"] .search-field,
:root[data-theme="dark"] .language-picker,
:root[data-theme="dark"] .theme-toggle,
:root[data-theme="dark"] .menu-button {
  border-color: var(--line);
  background: var(--input-bg);
  color: var(--ink);
}

:root[data-theme="dark"] .panel-actions button,
:root[data-theme="dark"] .icon-button,
:root[data-theme="dark"] .server-card button,
:root[data-theme="dark"] .control-cell button,
:root[data-theme="dark"] .release-review button,
:root[data-theme="dark"] .service-toolbar select {
  border-color: var(--line);
  background: var(--input-bg);
  color: var(--ink);
}

:root[data-theme="dark"] .service-table th,
:root[data-theme="dark"] .visitor-table th {
  background: var(--surface-soft);
  color: var(--heading);
}

:root[data-theme="dark"] .service-table td,
:root[data-theme="dark"] .visitor-table td,
:root[data-theme="dark"] .unas-detail-list div {
  border-color: var(--soft-line);
  color: var(--ink);
}

:root[data-theme="dark"] .admin-nav a,
:root[data-theme="dark"] .nav-folder > button,
:root[data-theme="dark"] .nav-folder-items button {
  color: var(--muted);
}

:root[data-theme="dark"] .admin-nav a.active,
:root[data-theme="dark"] .admin-nav a:hover,
:root[data-theme="dark"] .nav-folder > button:hover,
:root[data-theme="dark"] .nav-folder-items button:hover,
:root[data-theme="dark"] .nav-folder-items button.active {
  background: var(--surface-soft);
  color: var(--heading);
}

:root[data-theme="dark"] .footer-logo {
  filter: none !important;
  mix-blend-mode: normal;
  padding: 6px 10px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .nav-links,
  .site-actions,
  .header-action {
    display: none;
  }

  .menu-button {
    display: block;
  }

  .site-header.open .nav-links {
    display: grid;
    grid-column: 1 / -1;
    justify-content: stretch;
    gap: 4px;
  }

  .site-header.open .nav-links a {
    padding: 12px 0;
    border-top: 1px solid var(--soft-line);
  }

  .site-header.open .site-actions {
    display: flex;
    grid-column: 1 / -1;
    width: 100%;
  }

  .site-header.open .language-picker select {
    width: 100%;
  }

  .hero,
  .visitors-section,
  .comments-layout,
  .layer-grid,
  .admin-grid.two,
  .calendar-layout,
  .security-grid,
  .synology-detail-stack {
    grid-template-columns: 1fr;
  }

  .synology-detail-stack .wide,
  .synology-detail-stack .synology-system-section,
  .synology-detail-stack .synology-volume-section,
  .synology-detail-stack .synology-package-section,
  .synology-detail-stack .synology-container-section {
    grid-column: 1 / -1;
  }

  .analytics-copy h2 {
    white-space: normal;
  }

  .project-grid,
  .server-grid,
  .proxy-grid,
  .service-widget-grid,
  .dashboard-menu-map,
  .management-grid,
  .admin-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-heading,
  .project-toolbar,
  .admin-heading {
    display: grid;
    align-items: start;
  }

  .admin-body {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
  }

  .admin-topbar {
    display: grid;
  }
}

@media (max-width: 680px) {
  .hero {
    min-height: auto;
    padding-top: 46px;
  }

  .hero h1 {
    font-size: clamp(2.05rem, 9.5vw, 2.55rem);
  }

  .hero-panel,
  .analytics-panel,
  .comment-form,
  .comment-card,
  .project-card {
    width: 100%;
    min-width: 0;
  }

  .metric-grid,
  .analytics-metrics,
    .project-grid,
    .server-grid,
    .proxy-grid,
    .service-widget-grid,
    .dashboard-menu-map,
    .management-grid,
    .admin-metrics {
    grid-template-columns: 1fr;
  }

  .forecast-row,
  .calendar-grid {
    gap: 6px;
  }

  .calendar-day {
    min-height: 54px;
    padding: 7px;
  }

  .calendar-day em {
    font-size: 0.62rem;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .filter-buttons {
    width: 100%;
    overflow-x: auto;
  }

  .site-footer {
    display: grid;
  }

  .service-toolbar,
  .release-review article {
    display: grid;
  }

  .service-toolbar select,
  .identity-card {
    width: 100%;
    min-width: 0;
  }

  .ops-list div {
    grid-template-columns: 1fr;
  }

  .admin-main {
    padding-inline: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
