:root {
  --green-900: #062b20;
  --green-800: #0b3d2e;
  --green-700: #13513e;
  --gold: #d8ac5e;
  --gold-light: #f0d49b;
  --cream: #f4ead9;
  --paper: #fff8ea;
  --ink: #17231e;
  --muted: #6f6251;
  --border: rgba(216, 172, 94, .55);
  --shadow: 0 24px 70px rgba(6, 43, 32, .22);
  --font: "Poppins", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 10%, rgba(216,172,94,.18), transparent 30%),
    radial-gradient(circle at 80% 0%, rgba(11,61,46,.18), transparent 28%),
    linear-gradient(135deg, #efe0c8 0%, #fbf4e8 46%, #e7d4b6 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(6,43,32,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(6,43,32,.035) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, black, transparent 78%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
  background: rgba(244, 234, 217, .78);
  border-bottom: 1px solid rgba(11,61,46,.14);
}

.nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--green-900);
  letter-spacing: .05em;
  font-weight: 700;
  text-transform: uppercase;
}

.brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(6,43,32,.22));
}

.links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-family: var(--font);
  font-size: 14px;
}

.links a {
  color: var(--green-900);
  text-decoration: none;
  font-weight: 700;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown > summary {
  list-style: none;
  cursor: pointer;
  color: var(--green-900);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.nav-dropdown > summary::-webkit-details-marker { display: none; }

.nav-dropdown > summary::after {
  content: "▾";
  font-size: 10px;
  line-height: 1;
  transition: transform .15s ease;
}

.nav-dropdown[open] > summary::after { transform: rotate(180deg); }

.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  min-width: 210px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  background: var(--paper);
  border: 1px solid rgba(11,61,46,.14);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(6,43,32,.20);
  z-index: 20;
  animation: nav-in .16s ease-out;
}

.nav-dropdown-panel a {
  padding: 9px 12px;
  border-radius: 8px;
  white-space: nowrap;
  font-weight: 600;
}

.nav-dropdown-panel a:hover { background: rgba(11,61,46,.06); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--green-800);
  background: var(--green-800);
  color: var(--paper);
  text-decoration: none;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.btn:hover { background: var(--green-900); border-color: var(--green-900); }

.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 76px 22px 42px;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,248,234,.72);
  color: var(--green-800);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.eyebrow span { color: var(--gold); font-size: 18px; }

h1 {
  margin: 24px 0 18px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: .95;
  color: var(--green-900);
  letter-spacing: .015em;
  text-transform: uppercase;
  text-shadow: 0 2px 0 rgba(255,255,255,.65);
}

.hero p {
  max-width: 650px;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.7;
  color: #463e34;
}

.hero-actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.seal-card {
  position: relative;
  padding: 28px;
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(255,248,234,.75), rgba(255,248,234,.42)),
    radial-gradient(circle at center, rgba(216,172,94,.32), transparent 58%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.seal-card::before,
.seal-card::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 2px dotted rgba(216,172,94,.72);
  border-radius: 28px;
}

.seal-card::after {
  inset: auto -70px -90px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(11,61,46,.1);
  border: none;
}

.seal-card img {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  animation: float 5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.stats {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 22px 70px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat {
  padding: 23px;
  border-radius: 24px;
  background: rgba(255,248,234,.72);
  border: 1px solid rgba(216,172,94,.42);
  box-shadow: 0 12px 34px rgba(6,43,32,.08);
}

.stat strong {
  display: block;
  color: var(--green-800);
  font-size: 32px;
  line-height: 1;
  margin-bottom: 8px;
}

.stat span {
  font-family: var(--font);
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
}

.section {
  background: linear-gradient(180deg, var(--green-900), #051d16);
  color: var(--cream);
  border-top: 7px solid var(--gold);
  border-bottom: 7px solid var(--gold);
}

.section-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 22px;
}

.section h2 {
  margin: 0 0 14px;
  font-size: clamp(32px, 4vw, 52px);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.section .lead {
  margin: 0 0 34px;
  max-width: 760px;
  color: rgba(244,234,217,.78);
  font-family: var(--font);
  line-height: 1.7;
  font-size: 17px;
}

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

.card {
  padding: 28px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.045));
  border: 1px solid rgba(240,212,155,.35);
  min-height: 220px;
}

.icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 16px;
  background: rgba(216,172,94,.18);
  border: 1px solid rgba(216,172,94,.55);
  font-size: 24px;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.card p {
  margin: 0;
  font-family: var(--font);
  color: rgba(244,234,217,.74);
  line-height: 1.65;
}

.notice-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 22px;
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 24px;
  align-items: stretch;
}

.notice, .panel {
  border-radius: 30px;
  border: 1px solid rgba(216,172,94,.5);
  background: rgba(255,248,234,.76);
  box-shadow: 0 18px 46px rgba(6,43,32,.1);
  overflow: hidden;
}

.notice {
  padding: 34px;
  background: linear-gradient(135deg, var(--green-800), var(--green-900));
  color: var(--cream);
}

.notice h2 { margin: 0 0 14px; font-size: 38px; text-transform: uppercase; }
.notice p { font-family: var(--font); line-height: 1.7; color: rgba(244,234,217,.82); }

.panel table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font);
}

.panel th, .panel td {
  padding: 20px 22px;
  text-align: left;
  border-bottom: 1px solid rgba(11,61,46,.12);
}

.panel th {
  background: rgba(216,172,94,.28);
  color: var(--green-900);
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: .08em;
}

.panel tr:last-child td { border-bottom: none; }
.panel td:first-child { font-weight: 800; color: var(--green-800); }



.contacts-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 22px 54px;
}

.contacts-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 26px;
}

.contacts-header h2 {
  margin: 0 0 10px;
  color: var(--green-900);
  font-size: clamp(32px, 4vw, 52px);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.contacts-header p {
  margin: 0;
  max-width: 720px;
  font-family: var(--font);
  color: #51473b;
  line-height: 1.7;
  font-size: 17px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.contact-group {
  margin-top: 22px;
}

.contact-group-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0 14px;
  color: var(--green-900);
  font-size: 24px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.contact-group-title::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, rgba(216,172,94,.72), transparent);
}

.governor-grid {
  grid-template-columns: minmax(280px, 520px);
  justify-content: center;
}

.members-grid,
.departments-grid {
  grid-template-columns: repeat(3, 1fr);
}

.governor-card {
  text-align: center;
  padding: 34px;
  background:
    linear-gradient(180deg, rgba(255,248,234,.92), rgba(255,248,234,.72)),
    radial-gradient(circle at top, rgba(216,172,94,.34), transparent 48%);
}

.governor-card .avatar {
  width: 118px;
  height: 118px;
  margin-inline: auto;
}

.department-card .avatar {
  border-radius: 22px;
}

.contact-card {
  position: relative;
  padding: 26px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255,248,234,.86), rgba(255,248,234,.68)),
    radial-gradient(circle at top right, rgba(216,172,94,.24), transparent 42%);
  border: 1px solid rgba(216,172,94,.55);
  box-shadow: 0 16px 40px rgba(6,43,32,.1);
  overflow: hidden;
}

.contact-card::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(11,61,46,.18);
  border-radius: 22px;
  pointer-events: none;
}

.avatar {
  position: relative;
  z-index: 1;
  width: 92px;
  height: 92px;
  margin-bottom: 18px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--gold);
  box-shadow: 0 10px 24px rgba(6,43,32,.18);
  background: var(--green-800);
}

.contact-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 6px;
  color: var(--green-900);
  font-size: 23px;
}

.contact-role {
  position: relative;
  z-index: 1;
  display: inline-flex;
  margin-bottom: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(11,61,46,.1);
  color: var(--green-800);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.contact-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font);
  color: #4c4438;
  font-size: 14px;
  line-height: 1.45;
}

.contact-list a {
  color: var(--green-800);
  font-weight: 800;
  text-decoration: none;
}


footer {
  padding: 34px 22px;
  text-align: center;
  color: var(--green-900);
  font-family: var(--font);
  font-weight: 700;
}

@media (max-width: 860px) {
  .links { gap: 14px; font-size: 13px; }
  .nav { flex-wrap: wrap; row-gap: 6px; }
  .hero { grid-template-columns: 1fr; }
  .stats, .cards, .contact-grid, .members-grid, .departments-grid { grid-template-columns: 1fr 1fr; }
  .governor-grid { grid-template-columns: minmax(260px, 520px); }
  .contacts-header { align-items: start; flex-direction: column; }
  .hero { padding-top: 46px; }
}

@media (max-width: 560px) {
  .stats, .cards, .contact-grid, .members-grid, .departments-grid, .governor-grid { grid-template-columns: 1fr; }
  .nav { padding-inline: 16px; }
  .hero, .section-inner, .contacts-section { padding-inline: 16px; }
  .hero-actions .btn { width: 100%; }
}



.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 22px 70px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 10px;
}

.page-header h2 {
  margin: 14px 0 10px;
  color: var(--green-900);
  font-size: clamp(32px, 4vw, 52px);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.page-header p {
  margin: 0;
  max-width: 720px;
  font-family: var(--font);
  color: #51473b;
  line-height: 1.7;
  font-size: 17px;
}

.breadcrumbs {
  margin: 0 0 18px;
  font-family: var(--font);
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--green-800);
  font-weight: 800;
  text-decoration: none;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 26px 0 18px;
  border-bottom: 1px solid rgba(11,61,46,.14);
}

.tab {
  padding: 8px 2px 11px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.tab:hover { color: var(--green-900); }

.tab.active {
  color: var(--green-900);
  border-bottom-color: var(--gold);
}


.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .02em;
}

.badge-ok { background: rgba(11,61,46,.12); color: var(--green-800); }
.badge-archived { background: rgba(111,98,81,.16); color: var(--muted); }
.badge-draft { background: rgba(216,172,94,.32); color: #7a5b22; }


.phone-copy {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 9px;
  border: 1px solid rgba(11,61,46,.18);
  border-radius: 7px;
  background: transparent;
  color: var(--green-800);
  font-family: var(--font);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}

.phone-copy:hover { background: rgba(11,61,46,.06); border-color: rgba(11,61,46,.35); }

.phone-copy-icon { opacity: .55; flex: 0 0 auto; }
.phone-copy:hover .phone-copy-icon { opacity: .9; }

.phone-copy.copied {
  border-color: var(--green-800);
  background: rgba(11,61,46,.1);
  color: var(--green-900);
}

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

.pagination-gap { padding: 6px 4px; color: var(--muted); }


.panel td a:not(.btn) {
  color: var(--green-800);
  font-weight: 500;
  text-decoration: none;
}

.panel td a:not(.btn):hover { text-decoration: underline; }

.panel .empty-row {
  text-align: center;
  color: var(--muted);
  padding: 40px 22px;
}
.rtable-actions {
  white-space: nowrap;
  vertical-align: middle;
}
.rtable-actions > * { vertical-align: middle; }
.rtable-actions > * + * { margin-left: 8px; }

.inline-form { display: inline; }


.btn.small { padding: 6px 12px; font-size: 13px; }

.btn.ghost {
  background: transparent;
  border-color: rgba(11,61,46,.25);
  color: var(--green-800);
}

.btn.ghost:hover { background: rgba(11,61,46,.06); border-color: rgba(11,61,46,.4); }

.btn.danger {
  background: transparent;
  border-color: rgba(163,78,54,.35);
  color: #8a3b28;
}

.btn.danger:hover { background: rgba(163,78,54,.07); border-color: rgba(163,78,54,.55); }


.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  font-family: var(--font);
}

.pagination a, .pagination .current {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  color: var(--green-800);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.pagination a:hover { border-color: rgba(11,61,46,.25); }

.pagination .current {
  border-color: var(--green-800);
  color: var(--green-900);
}


.notice-banner {
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid;
  margin-bottom: 16px;
  font-family: var(--font);
  font-weight: 500;
  font-size: 14px;
}

.notice-banner.warn { background: rgba(216,172,94,.22); border-color: var(--border); color: #7a5b22; }
.notice-banner.info { background: rgba(11,61,46,.08); border-color: rgba(11,61,46,.25); color: var(--green-800); }
.notice-banner.error { background: rgba(163,78,54,.12); border-color: rgba(163,78,54,.4); color: #8a3b28; }

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}


.doc-panel { padding: 44px; }

.doc-head {
  text-align: center;
  border-bottom: 2px solid rgba(216,172,94,.5);
  padding-bottom: 24px;
  margin-bottom: 28px;
}

.doc-title {
  margin: 16px 0 10px;
  font-size: clamp(28px, 3.5vw, 44px);
  line-height: 1.05;
  color: var(--green-900);
  text-transform: uppercase;
  letter-spacing: .02em;
}

.doc-meta {
  margin: 0;
  font-family: var(--font);
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
}

.doc-body {
  font-size: 17px;
  line-height: 1.8;
  color: #2f2b23;
}

.doc-body h2 {
  margin: 32px 0 12px;
  color: var(--green-900);
  font-size: 26px;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.doc-body h3 {
  margin: 24px 0 10px;
  color: var(--green-800);
  font-size: 20px;
}

.doc-body p { margin: 0 0 16px; }

.doc-body a { color: var(--green-800); font-weight: 700; }

.doc-body ul, .doc-body ol { margin: 0 0 16px; padding-left: 26px; }

.doc-body li { margin-bottom: 6px; }

.doc-body blockquote {
  margin: 16px 0;
  padding: 12px 20px;
  border-left: 4px solid var(--gold);
  border-radius: 0 14px 14px 0;
  background: rgba(216,172,94,.12);
}

.doc-body hr {
  border: none;
  height: 2px;
  margin: 26px 0;
  background: linear-gradient(90deg, rgba(216,172,94,.7), transparent);
}

.doc-center { text-align: center; }


.doc-body img {
  max-width: 100%;
  height: auto;
  display: inline-block;
  vertical-align: middle;
  margin: 4px 6px;
  border-radius: 14px;
}

.preview-panel { margin-bottom: 26px; }


.editor-panel { padding: 30px; }

.field { margin-bottom: 20px; }

.field label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--green-900);
}

.field input[type="text"] {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--paper);
  font-family: var(--font);
  font-size: 16px;
  color: var(--ink);
}

.field textarea {
  width: 100%;
  min-height: 360px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 0 0 10px 10px;
  background: var(--paper);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  resize: vertical;
}

.field input:focus, .field textarea:focus {
  outline: 2px solid rgba(216,172,94,.55);
  outline-offset: 1px;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  background: rgba(255,248,234,.6);
}

.editor-toolbar button {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--green-900);
  cursor: pointer;
}

.editor-toolbar button:hover {
  background: rgba(11,61,46,.06);
  border-color: rgba(11,61,46,.15);
}

.toolbar-sep {
  width: 1px;
  align-self: stretch;
  margin: 4px 6px;
  background: rgba(11,61,46,.14);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

@media (max-width: 700px) {
  .page-header { flex-direction: column; align-items: start; }
  .doc-panel { padding: 26px 18px; }
  .editor-panel { padding: 20px 16px; }
  .panel { overflow-x: auto; }
  .panel table { min-width: 640px; }
}




.field input[type="password"],
.field input[type="date"],
.field select {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--paper);
  font-family: var(--font);
  font-size: 16px;
  color: var(--ink);
}

.field select:focus,
.field input[type="date"]:focus { outline: 2px solid rgba(216,172,94,.55); outline-offset: 1px; }

.field .field-error {
  display: none;
  margin-top: 6px;
  font-family: var(--font);
  font-size: 13px;
  color: #8a3b28;
}

.field.has-error input, .field.has-error select { border-color: rgba(163,78,54,.55); }
.field.has-error .field-error { display: block; }

.field-hint {
  margin-top: 6px;
  font-family: var(--font);
  font-size: 13px;
  color: var(--muted);
}


.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 6px 5px 14px;
  border-radius: 999px;
  border: 1px solid rgba(11,61,46,.18);
  background: rgba(255,248,234,.6);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  color: var(--green-900);
}

.user-chip .btn.small { padding: 4px 10px; font-size: 12px; }


.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 8vh 18px 40px;
  background: rgba(6,43,32,.5);
  backdrop-filter: blur(4px);
  overflow-y: auto;
  opacity: 0;
  transition: opacity .22s ease, display .22s allow-discrete;
}

.modal-backdrop.open {
  display: flex;
  opacity: 1;
}

@starting-style {
  .modal-backdrop.open { opacity: 0; }
}

.modal {
  width: 100%;
  max-width: 560px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: 28px 30px;
  opacity: 0;
  transform: scale(.94);
  transition: opacity .2s ease, transform .24s cubic-bezier(.22,1,.36,1);
}

.modal-backdrop.open .modal {
  opacity: 1;
  transform: scale(1);
}

@starting-style {
  .modal-backdrop.open .modal {
    opacity: 0;
    transform: scale(.94);
  }
}

@media (prefers-reduced-motion: reduce) {
  .modal-backdrop,
  .modal { transition: none; }
}

.modal.wide { max-width: 720px; }

.modal h3 {
  margin: 0 0 20px;
  color: var(--green-900);
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.modal .form-actions { justify-content: flex-end; margin-top: 20px; }


.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px 18px;
}

.check-grid label {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 6px 8px;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
}

.check-grid label:hover { background: rgba(11,61,46,.05); }

.check-grid input[type="checkbox"] { accent-color: var(--green-800); }

.check-grid .perm-code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  color: var(--muted);
}

.check-group-title {
  grid-column: 1 / -1;
  margin: 12px 0 2px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #7a5b22;
}

.check-group-title:first-child { margin-top: 0; }


.toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  min-width: 240px;
  max-width: 380px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 12px 34px rgba(6,43,32,.24);
  animation: toast-in .22s ease-out;
}

.toast.ok { background: var(--paper); border-color: rgba(11,61,46,.35); color: var(--green-800); }
.toast.error { background: var(--paper); border-color: rgba(163,78,54,.5); color: #8a3b28; }

@keyframes toast-in {
  from { transform: translateY(8px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .toast { animation: none; }
}


.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  padding: 18px 20px;
  margin-bottom: 18px;
}

.filter-bar .field { margin-bottom: 0; flex: 1 1 150px; }

.filter-bar .field input,
.filter-bar .field select {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--paper);
  font-family: var(--font);
  font-size: 14px;
  color: var(--ink);
}


.audit-row { cursor: pointer; }
.audit-row:hover td { background: rgba(11,61,46,.03); }

.audit-detail-row > td {
  background: rgba(11,61,46,.04);
  padding: 18px 22px;
}

.diff-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.diff-table th, .diff-table td {
  padding: 6px 10px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(11,61,46,.08);
  font-family: ui-monospace, Consolas, monospace;
  word-break: break-word;
}

.diff-table th {
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.diff-table td.diff-key { font-family: var(--font); font-weight: 500; color: var(--green-900); white-space: nowrap; }

.diff-table td.diff-changed { background: rgba(216,172,94,.32); border-radius: 4px; }


.badge-danger { background: rgba(163,78,54,.14); color: #8a3b28; }
.badge-info { background: rgba(19,81,62,.1); color: var(--green-700); }


.login-wrap {
  max-width: 440px;
  margin: 0 auto;
  padding: 72px 22px 90px;
}

.login-wrap .panel { padding: 34px 32px; }

.login-head {
  text-align: center;
  margin-bottom: 24px;
}

.login-head h2 {
  margin: 12px 0 4px;
  color: var(--green-900);
  font-size: 28px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.login-head p {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  color: var(--muted);
}

.login-wrap .btn { width: 100%; padding: 12px 18px; }

@media (max-width: 700px) {
  .modal { padding: 22px 18px; }
  .filter-bar { flex-direction: column; align-items: stretch; }
}




.panel { overflow-x: auto; }

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

  .page { padding: 36px 18px 54px; }
  .page-header h2 { font-size: clamp(28px, 7vw, 40px); }
}

@media (max-width: 700px) {
  .nav { padding: 10px 14px; }
  .brand img { width: 38px; height: 38px; }
  .brand span { font-size: 14px; }

  .doc-title { font-size: clamp(22px, 6.5vw, 32px); }
  .doc-body { font-size: 16px; }
  .field input, .field select { font-size: 16px; } 
  .login-wrap { padding: 40px 16px 60px; }
  .login-wrap .panel { padding: 26px 20px; }

  .panel th, .panel td { padding: 14px 14px; }

  .toast-stack { left: 16px; right: 16px; bottom: 16px; }
  .toast { min-width: 0; max-width: none; }

  .modal-backdrop { padding: 4vh 12px 24px; }
  .check-grid { grid-template-columns: 1fr; }

  .diff-table { font-size: 12px; }
  .diff-table th, .diff-table td { padding: 5px 6px; }
}

@media (max-width: 480px) {
  .page { padding: 28px 14px 44px; }
  .page-header .btn { width: 100%; justify-content: center; }
  .admin-toolbar .btn { flex: 1 1 auto; justify-content: center; }
  .tabs { gap: 16px; }
  .form-actions { flex-direction: column; }
  .form-actions .btn { width: 100%; }
  .pagination { justify-content: center; }
  .filter-bar .btn { width: 100%; }
}



.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid rgba(11,61,46,.2);
  border-radius: 10px;
  background: rgba(255,248,234,.6);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--green-900);
  transition: transform .2s ease, opacity .15s ease;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1000px) {
  .nav { flex-wrap: wrap; }
  .nav-toggle { display: flex; }

  .links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 0 8px;
    font-size: 15px;
  }

  .links.open {
    display: flex;
    animation: nav-in .18s ease-out;
  }

  .links a {
    padding: 11px 10px;
    border-radius: 10px;
  }

  .links a:hover { background: rgba(11,61,46,.06); }

  .nav-dropdown { width: 100%; }

  .nav-dropdown > summary {
    padding: 11px 10px;
    border-radius: 10px;
    justify-content: space-between;
  }

  .nav-dropdown > summary:hover { background: rgba(11,61,46,.06); }

  .nav-dropdown-panel {
    position: static;
    min-width: 0;
    padding: 2px 0 4px 12px;
    border: none;
    border-left: 2px solid rgba(11,61,46,.14);
    margin: 2px 0 2px 10px;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    animation: none;
  }

  .user-chip {
    margin-top: 8px;
    width: 100%;
    justify-content: space-between;
  }
}

@keyframes nav-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

.menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(11,61,46,.25);
  border-radius: 9px;
  background: transparent;
  color: var(--green-800);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.menu-btn:hover { background: rgba(11,61,46,.06); border-color: rgba(11,61,46,.4); }

.menu-list {
  position: fixed;
  z-index: 50;
  min-width: 190px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 16px 44px rgba(6,43,32,.22);
  transform-origin: top right;
  animation: menu-in .14s ease-out;
}

@keyframes menu-in {
  from { opacity: 0; transform: translateY(-4px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

.menu-item {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--green-900);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.menu-item:hover { background: rgba(11,61,46,.07); }
.menu-item.danger { color: #8a3b28; }
.menu-item.danger:hover { background: rgba(163,78,54,.09); }

.toast.hide { animation: toast-out .35s ease-in forwards; }

@keyframes toast-out {
  to { opacity: 0; transform: translateY(10px); }
}

@media (prefers-reduced-motion: reduce) {
  .links.open, .menu-list, .toast, .toast.hide, .nav-toggle span { animation: none; transition: none; }
}

body { display: flex; flex-direction: column; }

footer { margin-top: auto; }

body > main { width: 100%; }



.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.soft-sep { border: none; border-top: 1px solid rgba(11,61,46,.12); margin: 20px 0; }
.row-muted td { opacity: .5; }

.field input[type="number"],
.field input[type="url"] {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--paper);
  font-family: var(--font);
  font-size: 16px;
  color: var(--ink);
}

.field textarea.ta-short {
  min-height: 84px;
  padding: 11px 14px;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
}

.field-row { display: flex; flex-wrap: wrap; gap: 18px; }
.field-row > .field { flex: 1 1 150px; }

.req { color: #a3502e; font-weight: 700; }

.switch-label {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font); font-size: 14px; font-weight: 600;
  color: var(--green-900); cursor: pointer;
}
.switch-label input { width: 17px; height: 17px; accent-color: var(--green-800); }

.shop-panel { padding: 24px 26px; }
.shop-panel-title {
  margin: 0 0 16px; font-size: 17px; color: var(--green-800);
  text-transform: uppercase; letter-spacing: .04em;
}
.shop-subtitle {
  margin: 0 0 12px; font-size: 13px; color: var(--green-800);
  text-transform: uppercase; letter-spacing: .06em;
}
.shop-section-title {
  margin: 0 0 12px; font-size: 15px; color: var(--green-800);
  text-transform: uppercase; letter-spacing: .05em;
}

.shop-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.shop-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--paper);
  font-family: var(--font); font-weight: 600; font-size: 14px;
  color: var(--green-800); cursor: pointer;
}
.shop-chip:hover { background: rgba(11,61,46,.06); }
.shop-chip.active { background: var(--green-800); border-color: var(--green-800); color: var(--paper); }
.shop-chip .badge { font-weight: 600; }

.shop-cat { margin-bottom: 24px; }
.shop-cat-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; margin: 0 4px 12px;
}
.shop-cat-title { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; color: var(--green-800); }
.shop-cat-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.order-cell { display: inline-flex; gap: 4px; }
.order-btn { padding: 5px 9px; font-size: 12px; line-height: 1; }
.order-btn:disabled { opacity: .3; cursor: default; }

.shop-delivery-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.shop-delivery-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--paper);
}
.shop-delivery-label { flex: 1 1 auto; font-family: var(--font); font-weight: 600; }

.shop-selection-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.shop-selection-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 26px; border-radius: 22px; border: 1px solid var(--border);
  background: rgba(255,248,234,.76); box-shadow: 0 12px 34px rgba(6,43,32,.08);
  text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.shop-selection-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.shop-selection-card h3 { font-size: 21px; color: var(--green-800); text-transform: uppercase; letter-spacing: .02em; }
.shop-selection-card p { color: #51473b; font-family: var(--font); font-size: 14px; line-height: 1.6; }
.shop-selection-meta { margin-top: auto; font-family: var(--font); font-weight: 700; color: var(--green-800); font-size: 13px; }

.shop-layout { display: grid; grid-template-columns: 1fr 350px; gap: 22px; align-items: start; }
.shop-menu { display: flex; flex-direction: column; gap: 20px; }
.shop-basket-wrap { position: sticky; top: 18px; }

.shop-cat-heading { margin: 0 0 16px; font-size: 20px; color: var(--green-800); text-transform: uppercase; letter-spacing: .03em; }
.shop-item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }

.shop-item-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  background: var(--paper);
}
.shop-item-card.sold-out { opacity: .6; }
.shop-item-img { width: 100%; height: 118px; object-fit: contain; padding: 8px; background: rgba(11,61,46,.05); }
.shop-item-img.placeholder {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font); font-size: 13px; font-weight: 600; color: var(--muted);
}
.shop-item-body { display: flex; flex-direction: column; gap: 5px; padding: 14px 16px 16px; flex: 1 1 auto; }
.shop-item-body h4 { font-size: 15px; font-weight: 600; color: var(--green-900); line-height: 1.35; letter-spacing: 0; }
.shop-item-desc { font-family: var(--font); font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.shop-item-price { display: flex; flex-direction: column; gap: 1px; margin-top: 4px; }
.shop-item-price strong { font-size: 19px; font-weight: 700; color: var(--green-800); letter-spacing: -.01em; }
.shop-item-price .muted { font-family: var(--font); font-size: 12px; line-height: 1.3; }
.shop-item-stock { font-family: var(--font); font-size: 12px; color: var(--muted); margin-top: 2px; }
.shop-item-control { margin-top: auto; padding-top: 10px; }
.shop-item-control > .btn { width: 100%; }
.shop-stepper { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.shop-stepper .btn { flex: 0 0 auto; min-width: 40px; }
.shop-stepper .qty { flex: 1 1 auto; text-align: center; font-weight: 700; color: var(--green-800); font-variant-numeric: tabular-nums; }

.basket-line { padding: 10px 0; border-bottom: 1px dashed rgba(11,61,46,.15); }
.basket-line:last-of-type { border-bottom: none; }
.basket-line-main { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.basket-line-name { font-family: var(--font); font-weight: 600; font-size: 14px; color: var(--ink); }
.basket-remove { border: none; background: transparent; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 2px 4px; }
.basket-remove:hover { color: #8a3b28; }
.basket-line-sub { display: flex; justify-content: space-between; font-family: var(--font); font-size: 13px; color: var(--muted); margin-top: 3px; }

.shop-summary { display: flex; flex-direction: column; gap: 7px; margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(11,61,46,.12); }
.sum-row { display: flex; justify-content: space-between; gap: 12px; font-family: var(--font); font-size: 14px; color: var(--ink); }
.sum-row.muted { color: var(--muted); font-size: 13px; }
.sum-row.grand {
  margin-top: 5px; padding-top: 11px; border-top: 1px solid rgba(11,61,46,.14);
  font-size: 17px; font-weight: 800; color: var(--green-800);
}

.shop-delivery-choices { display: flex; flex-direction: column; gap: 8px; }
.shop-delivery-choice {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px;
  padding: 11px 13px; border: 1px solid var(--border); border-radius: 12px;
  font-family: var(--font); cursor: pointer;
}
.shop-delivery-choice:hover { background: rgba(11,61,46,.04); }
.shop-delivery-choice:has(input:checked) { border-color: var(--green-800); background: rgba(11,61,46,.05); }
.shop-delivery-choice-text { display: contents; }
.shop-delivery-choice input { flex: 0 0 auto; accent-color: var(--green-800); margin: 0; }
.shop-delivery-choice-label { flex: 1 1 auto; min-width: 0; font-size: 13.5px; line-height: 1.3; color: var(--ink); }
.shop-delivery-choice-fee { flex: 0 0 100%; font-size: 13px; font-weight: 700; color: var(--green-800); text-align: left; }

.btn-block { width: 100%; }
.shop-login-cta .shop-cta-text {
  margin: 0 0 16px; font-family: var(--font); font-size: 14px;
  line-height: 1.6; color: var(--muted);
}

.shop-summary[hidden] { display: none; }
#extra-fee-rows { display: contents; }

.shop-fee-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.shop-fee-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--paper);
}
.shop-fee-label { flex: 1 1 auto; min-width: 0; font-family: var(--font); font-size: 13.5px; overflow-wrap: anywhere; }
.shop-fee-amount { flex: 0 0 auto; font-weight: 700; color: var(--green-800); }
.shop-fee-del {
  flex: 0 0 auto; width: 26px; height: 26px; padding: 0; border: none; border-radius: 6px;
  background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; line-height: 1;
}
.shop-fee-del:hover { background: rgba(163,78,54,.1); color: #8a3b28; }
.shop-fee-form .field { margin-bottom: 14px; }

.shop-order-grid { display: grid; grid-template-columns: 1fr 330px; gap: 22px; align-items: start; }
.shop-order-main { display: flex; flex-direction: column; gap: 18px; }
.shop-order-side { display: flex; flex-direction: column; gap: 20px; }
.shop-dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-family: var(--font); font-size: 14px; }
.shop-dl dt { font-weight: 700; color: var(--muted); }
.shop-dl dd { margin: 0; color: var(--ink); }
.shop-summary-panel .shop-summary { margin-top: 0; padding-top: 0; border-top: none; }

@media (max-width: 900px) {
  .shop-layout, .shop-order-grid { grid-template-columns: 1fr; }
  .shop-basket-wrap { position: static; }
}
