:root {
  --bg: #f4f8fc;
  --panel: #ffffff;
  --panel-soft: #eef4fb;
  --ink: #16202a;
  --muted: #4f6376;
  --line: #d3dce7;
  --brand: #0a7f78;
  --brand-strong: #096b65;
  --accent: #c95a1f;
  --accent-soft: #ffe8d9;
  --info: #255f9e;
  --ok: #1f7f47;
  --warn: #c16a0d;
  --danger: #b73b38;
  --focus: #103e7f;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-soft: 0 12px 30px rgba(18, 43, 75, 0.08);
  --shadow-card: 0 10px 24px rgba(19, 41, 61, 0.12);
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, #d8f3ef 0, transparent 40%),
    radial-gradient(circle at 92% 4%, #ffe7d8 0, transparent 45%),
    linear-gradient(180deg, #f8fbff 0%, #eef5fc 100%);
  min-height: 100vh;
  line-height: 1.55;
}

a {
  color: var(--info);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

img {
  max-width: 100%;
}

.shell {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(248, 251, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(18, 43, 75, 0.09);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  min-height: 94px;
  gap: 0.55rem 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  order: 1;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  width: 124px;
  height: 32px;
  border-radius: 0;
  background-color: transparent;
  background-image: url("../img/iskon-logo.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  border: none;
  color: transparent;
  font-size: 0;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-weight: 700;
  flex-shrink: 0;
}

.brand-copy {
  display: grid;
  gap: 0.05rem;
}

.brand-copy strong {
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: 1.5rem;
  line-height: 1.05;
  white-space: nowrap;
  color: var(--ink);
}

.brand-copy small {
  color: var(--muted);
  font-size: 0.88rem;
}

.menu-toggle {
  display: none;
  order: 2;
  margin-left: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  padding: 0.5rem 0.75rem;
  font: inherit;
}

.top-nav {
  display: flex;
  align-items: center;
  order: 3;
  flex: 1 0 100%;
  width: 100%;
  gap: 0.2rem;
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow-x: auto;
}

.top-nav a {
  border-radius: 999px;
  padding: 0.33rem 0.56rem;
  color: #2b3f53;
  font-size: 0.82rem;
  text-decoration: none;
}

.top-nav a:hover,
.top-nav a.active {
  background: #d8eaee;
  color: #11343d;
}

.page {
  padding: 2rem 0 3rem;
}

.hero {
  border: 1px solid #d7e4f2;
  border-radius: var(--radius-lg);
  background: linear-gradient(130deg, #ffffff 0%, #f0f7ff 45%, #e7f8f4 100%);
  padding: clamp(1.3rem, 3vw, 2.2rem);
  box-shadow: var(--shadow-soft);
}

.hero h1 {
  margin: 0;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: clamp(1.5rem, 3.2vw, 2.45rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.hero p {
  margin: 0.8rem 0 0;
  max-width: 68ch;
  color: #2c4357;
}

.hero-actions {
  margin-top: 1.2rem;
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.68rem 1.1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn.primary {
  background: linear-gradient(145deg, var(--brand), var(--brand-strong));
  color: #fff;
}

.btn.secondary {
  border-color: #b7cbdf;
  background: #fff;
  color: #1f3c5c;
}

.btn.warning {
  background: #fff5ec;
  border-color: #f1c6a8;
  color: #8a3c16;
}

.section {
  margin-top: 1.5rem;
}

.section h2,
.section h3 {
  margin: 0 0 0.65rem;
  font-family: "Sora", "Segoe UI", sans-serif;
  line-height: 1.2;
}

.muted {
  color: var(--muted);
}

.card-grid {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0.8rem;
}

.card {
  grid-column: span 4;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 1rem;
  box-shadow: var(--shadow-soft);
}

.card h3,
.card h4 {
  margin-top: 0;
  margin-bottom: 0.45rem;
}

.quick-link-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.quick-link-list a {
  display: block;
  border: 1px solid #c8d9eb;
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 0.7rem 0.8rem;
  color: #14365f;
  text-decoration: none;
}

.quick-link-list a:hover {
  background: #edf5fe;
}

.kpi-strip {
  margin-top: 1rem;
  border: 1px solid #d5e3f0;
  border-radius: var(--radius-md);
  background: #fff;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.kpi {
  padding: 1rem;
  border-right: 1px solid #e0e9f2;
}

.kpi:last-child {
  border-right: 0;
}

.kpi strong {
  display: block;
  font-size: 1.3rem;
  font-family: "Sora", "Segoe UI", sans-serif;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid #d5dfe9;
  background: #f9fcff;
}

.badge.open {
  background: #fff2ef;
  border-color: #f3c0b8;
  color: #8f2d21;
}

.badge.progress {
  background: #fff7e8;
  border-color: #efdaac;
  color: #825504;
}

.badge.fixed {
  background: #ecfbf1;
  border-color: #badfc7;
  color: #155a2f;
}

.filters {
  margin-top: 1rem;
  display: grid;
  gap: 0.75rem;
}

.search-line {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.search-line input,
.search-line select,
.field input,
.field select,
.field textarea {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid #becddf;
  padding: 0.65rem 0.7rem;
  font: inherit;
  background: #fff;
}

.search-line input {
  flex: 1 1 240px;
}

.pill-row {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.pill {
  border-radius: 999px;
  border: 1px solid #bfd1e3;
  background: #fff;
  color: #304d67;
  padding: 0.35rem 0.75rem;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}

.pill.active {
  background: #d6ece8;
  border-color: #8ec8bc;
  color: #134541;
}

.list-stack {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.75rem;
}

.article-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 0.95rem;
  box-shadow: var(--shadow-soft);
}

.article-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.article-card h3 {
  margin: 0;
  font-size: 1.04rem;
}

.article-card p {
  margin: 0.5rem 0;
}

.meta-line {
  color: #567089;
  font-size: 0.86rem;
}

.table-wrap {
  margin-top: 1rem;
  border: 1px solid #ccd9e7;
  border-radius: var(--radius-md);
  overflow: auto;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid #e4edf6;
  text-align: left;
  vertical-align: top;
  padding: 0.8rem;
  font-size: 0.92rem;
}

th {
  background: #f1f7fe;
  color: #27425b;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: 0.83rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

tbody tr:hover {
  background: #f8fbff;
}

.form-shell {
  margin-top: 1rem;
  border: 1px solid #d2dfed;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-soft);
  padding: clamp(1rem, 2vw, 1.5rem);
}

.admin-shell {
  margin-top: 1rem;
  border: 1px solid #d2dfed;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-soft);
  padding: clamp(1rem, 2vw, 1.4rem);
}

.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) auto;
  gap: 0.8rem;
  align-items: end;
}

.admin-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.admin-json {
  width: 100%;
  min-height: 520px;
  margin-top: 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid #becddf;
  padding: 0.75rem;
  font: 500 0.92rem/1.45 "IBM Plex Mono", Consolas, "Courier New", monospace;
  color: #1e3850;
  background: #f9fcff;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-weight: 600;
  color: #274157;
}

.required::after {
  content: " *";
  color: var(--danger);
}

.help-text {
  color: #597289;
  font-size: 0.84rem;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.honeypot {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.alert {
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  margin-top: 0.8rem;
  border: 1px solid #c7d7ea;
  background: #f3f8ff;
  color: #20486f;
}

.alert.error {
  border-color: #efc3bd;
  background: #fff2ef;
  color: #7d271f;
}

.alert.success {
  border-color: #b9dfc6;
  background: #ecfbf1;
  color: #17502c;
}

.breadcrumb {
  margin-bottom: 0.8rem;
  color: #4f677f;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: #2f5d87;
}

.article-detail {
  border: 1px solid #d2deeb;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-soft);
  padding: clamp(1rem, 2vw, 1.8rem);
}

.article-detail h1 {
  margin-top: 0;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: clamp(1.3rem, 2.2vw, 2rem);
}

.article-detail h2 {
  margin-top: 1.2rem;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: 1.1rem;
}

.article-detail ol,
.article-detail ul {
  padding-left: 1.2rem;
}

.split {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0.85rem;
}

.policy-table td:first-child,
.policy-table th:first-child {
  white-space: nowrap;
}

.site-footer {
  margin-top: 2.2rem;
  padding: 1.3rem 0 2rem;
  border-top: 1px solid #d5e3f0;
  color: #5a7287;
  font-size: 0.9rem;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.empty-state {
  border: 1px dashed #c6d5e5;
  border-radius: var(--radius-sm);
  padding: 1rem;
  color: #5f768d;
  background: #fbfdff;
}

@media (max-width: 980px) {
  .card {
    grid-column: span 6;
  }

  .split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .menu-toggle {
    display: inline-flex;
  }

  .top-nav {
    display: none;
    width: 100%;
    padding-bottom: 0.8rem;
  }

  .top-nav.open {
    display: flex;
  }

  .nav-wrap {
    flex-wrap: wrap;
  }

  .card {
    grid-column: span 12;
  }

  .kpi-strip {
    grid-template-columns: 1fr;
  }

  .kpi {
    border-right: 0;
    border-bottom: 1px solid #e0e9f2;
  }

  .kpi:last-child {
    border-bottom: 0;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .quick-link-list {
    grid-template-columns: 1fr;
  }

  .admin-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .admin-actions {
    width: 100%;
  }

  .admin-actions .btn {
    flex: 1 1 140px;
    justify-content: center;
  }

  .admin-json {
    min-height: 420px;
  }
}
