:root {
  --bg: #0f172a;
  --bg-soft: #111827;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --line: #dbe3ee;
  --primary: #f97316;
  --primary-dark: #ea580c;
  --success: #14532d;
  --success-bg: #dcfce7;
  --error: #991b1b;
  --error-bg: #fee2e2;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f8fafc;
  color: var(--text);
}
a { color: #1d4ed8; }
.wrap { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }
.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.site-header {
  background: var(--bg);
  color: #fff;
  padding: 1rem 0;
}
.site-header a { color: #fff; text-decoration: none; }
.brand { font-size: 1.2rem; font-weight: 700; }
.nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.nav a { opacity: .95; }
.lang-switch { display: flex; gap: .5rem; }
main.wrap { padding: 2rem 0; }
.hero, .card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: 0 8px 28px rgba(15, 23, 42, .06);
}
.hero { margin-bottom: 1.5rem; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.narrow { max-width: 760px; margin: 0 auto; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  border: none;
  border-radius: 12px;
  padding: .9rem 1.15rem;
  cursor: pointer;
  font-weight: 700;
}
.button:hover { background: var(--primary-dark); }
.button-secondary { background: #1e293b; color: #fff; }
.actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.stack { display: grid; gap: 1rem; }
label { display: grid; gap: .35rem; font-weight: 600; color: var(--muted); }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .8rem .9rem;
  font: inherit;
  background: #fff;
  color: var(--text);
}
textarea { resize: vertical; }
.split-2, .split-3 { display: grid; gap: 1rem; }
.split-2 { grid-template-columns: repeat(2, 1fr); }
.split-3 { grid-template-columns: repeat(3, 1fr); }
.checkbox { display: flex; align-items: center; gap: .6rem; }
.checkbox input { width: auto; }
.notice { border-radius: 12px; padding: 1rem; margin-bottom: 1rem; }
.notice.success { background: var(--success-bg); color: var(--success); }
.notice.error { background: var(--error-bg); color: var(--error); }
.mt { margin-top: 1rem; }
.table-wrap {
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
}
table { width: 100%; border-collapse: collapse; }
th, td { padding: .9rem 1rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.badge {
  display: inline-block;
  padding: .3rem .65rem;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 700;
}
.site-footer { padding: 1.5rem 0 2rem; display: flex; gap: 1rem; }
.site-footer a { color: var(--muted); text-decoration: none; }
.muted { color: var(--muted); }
.small { font-size: .92rem; }
.eyebrow { margin: 0 0 .5rem; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
.nested-card { padding: 1rem; border-radius: 14px; }
.stats-grid .stat-card h2 { margin: 0; font-size: 2rem; }
.stats-grid .stat-card p { margin-bottom: 0; color: var(--muted); }
.admin-body { background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%); min-height: 100vh; }
.admin-main { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.admin-header { box-shadow: 0 10px 30px rgba(15, 23, 42, .12); }
.admin-guest .admin-header .wrap { justify-content: center; }
.admin-login-card { max-width: 480px; padding: 2rem; }
.admin-login-intro h1 { margin: 0 0 .5rem; }
.admin-login-intro p { margin-top: 0; }
.admin-login-card .button { width: 100%; }
.admin-columns { align-items: start; }
.meta-list { display: grid; gap: .8rem; margin: 0 0 1.2rem; }
.meta-list div { display: grid; gap: .2rem; }
.meta-list dt { font-size: .9rem; color: var(--muted); }
.meta-list dd { margin: 0; font-weight: 600; }
.compact-table th, .compact-table td { padding: .6rem .8rem; }
@media (max-width: 800px) {
  .flex.between.center { gap: 1rem; flex-direction: column; align-items: flex-start; }
  .split-2, .split-3 { grid-template-columns: 1fr; }
  .nav-admin { width: 100%; }
}


.tabs { display:flex; gap:.75rem; flex-wrap:wrap; margin-bottom:1rem; }
.button-secondary { background:#eef2f7; color:#223; }
.button-secondary.is-active { outline:2px solid #fe7733; }
.status-pane { display:none; }
.status-pane.is-active { display:block; }
.small { font-size:.92rem; }


.project-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:1rem; }
.project-card { border:1px solid #d8dde6; border-radius:16px; padding:1rem; background:#fff; box-shadow:0 6px 20px rgba(0,0,0,0.04); }
.project-top { display:flex; justify-content:space-between; gap:1rem; align-items:flex-start; }
.project-meta { display:flex; flex-wrap:wrap; gap:.5rem; margin:.75rem 0; font-size:.92rem; color:#4b5563; }
.project-meta span, .status-pill { background:#eef2f7; padding:.35rem .6rem; border-radius:999px; }
.actions { display:flex; gap:.75rem; flex-wrap:wrap; }
.button-secondary { background:#eef2f7; color:#1f2937; }
.qso-box, .address-box { border:1px solid #d8dde6; border-radius:14px; padding:1rem; background:#f9fbfd; }
.qso-box-head { display:flex; justify-content:space-between; align-items:center; gap:1rem; margin-bottom:.5rem; }
.qso-row { border-top:1px solid #e5e7eb; padding-top:1rem; margin-top:1rem; }
.qso-row:first-child { border-top:0; padding-top:0; margin-top:0; }
.split-4 { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1rem; }
@media (max-width: 900px) { .split-4 { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width: 640px) { .split-4 { grid-template-columns:1fr; } .qso-box-head { flex-direction:column; align-items:stretch; } }
.notice.info { background:#eef6ff; border-left:4px solid #60a5fa; }

.table-wrap table .button{padding:.45rem .7rem;font-size:.9rem;white-space:nowrap;}


.hero-public {
  background: linear-gradient(135deg, #fff7ed 0%, #ffffff 58%, #eff6ff 100%);
}
.hero-centered { text-align: center; }
.hero-lead {
  max-width: 760px;
  margin: 0 auto 1rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}
.step-strip {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.25rem;
}
.step-chip {
  display: inline-flex;
  align-items: center;
  padding: .55rem .9rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: .92rem;
  font-weight: 700;
}
.step-chip.is-active { background: #f97316; color: #fff; border-color: #f97316; }
.step-chip.is-done { background: #ecfdf5; color: #166534; border-color: #bbf7d0; }
.quick-search-card {
  max-width: 860px;
  margin: 1.25rem auto 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: 0 12px 30px rgba(15,23,42,.08);
}
.search-label { text-align: left; }
.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .75rem;
  align-items: center;
}
.search-input {
  min-height: 56px;
  font-size: 1.05rem;
  border-radius: 14px;
}
.button-large { min-height: 56px; padding-inline: 1.4rem; }
.search-hint { margin: .65rem 0 0; color: var(--muted); font-size: .95rem; }
.actions-center { justify-content: center; }
.button-ghost {
  background: #fff;
  color: #0f172a;
  border: 1px solid var(--line);
}
.card-soft { background: #fffdf8; }
.simple-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 1rem;
}
.section-head { display: flex; justify-content: space-between; gap: 1rem; align-items: end; margin-bottom: 1rem; }
.section-head.compact { align-items: center; }
.section-title { margin: 0; }
.simple-search-form { gap: 1rem; }
.advanced-toggle {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: .85rem 1rem;
  background: #f8fafc;
}
.advanced-toggle summary {
  cursor: pointer;
  font-weight: 700;
  color: #334155;
}
.advanced-grid { margin-top: 1rem; }
.results-count {
  display: inline-flex;
  align-items: center;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 999px;
  padding: .45rem .75rem;
  font-weight: 700;
}
.result-card-list { display: grid; gap: 1rem; }
.result-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 8px 20px rgba(15,23,42,.05);
}
.result-card-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  margin-bottom: .85rem;
}
.result-title {
  margin: 0 0 .2rem;
  font-size: 1.08rem;
  font-weight: 700;
}
.result-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: .8rem;
  margin-bottom: 1rem;
}
.result-meta-grid.two-up { grid-template-columns: repeat(2, minmax(0,1fr)); }
.result-meta-grid div {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: .75rem .85rem;
}
.result-meta-grid span {
  display: block;
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: .2rem;
}
.actions-between {
  justify-content: space-between;
  align-items: center;
}
.selected-result-card {
  border-color: #fdba74;
  background: linear-gradient(180deg, #fffaf3 0%, #ffffff 100%);
}
.public-request-card { max-width: 820px; }
.compact-bottom-gap { margin-bottom: 1rem; }
.simple-tabs { justify-content: center; }
.simple-tabs .button { flex: 1 1 220px; }
.notice.warning { background: #fff7ed; color: #9a3412; border-left: 4px solid #fb923c; }
@media (max-width: 900px) {
  .result-meta-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 800px) {
  .search-row,
  .simple-info-grid,
  .actions-between { grid-template-columns: 1fr; display: grid; }
  .actions-between { gap: .75rem; }
}
@media (max-width: 640px) {
  .hero { padding: 1.15rem; }
  .quick-search-card { padding: .85rem; }
  .result-card-top,
  .section-head { flex-direction: column; align-items: stretch; }
  .result-meta-grid,
  .result-meta-grid.two-up,
  .simple-info-grid { grid-template-columns: 1fr; }
  .button, .button-large { width: 100%; }
  .search-row { grid-template-columns: 1fr; }
}


.legend-row { display:flex; gap:.75rem; flex-wrap:wrap; justify-content:center; margin-top:1rem; }
.legend-chip { display:inline-flex; align-items:center; gap:.45rem; padding:.5rem .75rem; border:1px solid var(--line); border-radius:999px; background:#fff; }
.status-dot { width:.9rem; height:.9rem; border-radius:999px; display:inline-block; border:2px solid rgba(15,23,42,.12); }
.status-active { background:#22c55e; }
.status-planned { background:#f59e0b; }
.status-pending { background:#8b5cf6; }
.status-none { background:#ef4444; }
.status-unknown { background:#d1d5db; }
.service-matrix-wrap { overflow:auto; }
.service-matrix th, .service-matrix td { text-align:center; }
.service-matrix th:first-child, .service-matrix th:nth-child(2), .service-matrix th:last-child,
.service-matrix td:first-child, .service-matrix td:nth-child(2), .service-matrix td:last-child { text-align:left; }
.matrix-center { text-align:center !important; }
.mobile-service-cards { display:none; gap:1rem; margin-top:1rem; }
.service-pill-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.65rem; }
.service-pill-card { display:flex; justify-content:space-between; gap:.75rem; align-items:center; border:1px solid var(--line); border-radius:14px; padding:.7rem .8rem; background:#f8fafc; }
.admin-matrix-wrap select { min-width:140px; }
@media (max-width: 900px) {
  .service-matrix-wrap { display:none; }
  .mobile-service-cards { display:grid; }
}


.service-filter-form {
    margin-bottom: 1rem;
}

.project-summary {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
    padding-top: 0.5rem;
}

.project-summary h2 {
    margin-bottom: 0.35rem;
}

.project-summary-meta {
    display: grid;
    gap: 0.35rem;
    min-width: 240px;
}

.compact-empty {
    padding: 1rem 0.25rem;
}

.translation-compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.translation-table textarea {
    min-width: 260px;
    min-height: 110px;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.badge-success {
    background: rgba(23, 160, 99, 0.12);
    color: #146c43;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.14);
    color: #92400e;
}

.badge-muted {
    background: rgba(100, 116, 139, 0.14);
    color: #475569;
}

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

    .translation-table textarea {
        min-width: 200px;
    }
}
