:root {
  --bg: #0b0f0f;
  --panel: #121819;
  --panel-2: #0f1414;
  --text: #f5f5f0;
  --muted: #b7c0c0;
  --accent-green: #0f6f4a;
  --accent-white: #d7d7cf;
  --accent-red: #a1171a;
  --glow: rgba(191, 16, 26, 0.35);
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Vazirmatn", "Tahoma", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(15, 111, 74, 0.25), transparent 60%),
    radial-gradient(900px 500px at 85% 0%, rgba(161, 23, 26, 0.25), transparent 60%),
    linear-gradient(135deg, #0b0f0f 0%, #111616 45%, #0b0f0f 100%);
  min-height: 100vh;
}

.memory-wave-layer {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.memory-wave-layer.active {
  opacity: 1;
}

.memory-wave-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
  background:
    linear-gradient(180deg, rgba(183, 243, 199, 0.03), rgba(183, 243, 199, 0.08)),
    linear-gradient(90deg, rgba(15, 111, 74, 0.12), rgba(161, 23, 26, 0.12));
  transition: height 0.2s linear;
  filter: blur(0.2px);
}

.memory-wave-name {
  position: absolute;
  color: rgba(214, 66, 66, 0.55);
  font-size: clamp(13px, 1.6vw, 24px);
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.45),
    0 0 10px rgba(0, 0, 0, 0.35),
    0 0 20px rgba(161, 23, 26, 0.25);
  transform: translate3d(0, 0, 0);
  animation-name: memory-wave-float;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

.memory-wave-rose {
  position: absolute;
  font-size: clamp(18px, 2.2vw, 30px);
  line-height: 1;
  transform: scale(0.35);
  opacity: 0;
  filter: drop-shadow(0 0 8px rgba(161, 23, 26, 0.35));
  pointer-events: none;
  animation: memory-rose-bloom 1.1s ease-out forwards;
}

.memory-wave-photo {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(245, 245, 240, 0.22);
  background: rgba(12, 17, 17, 0.62);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  opacity: 0;
  transform: scale(0.92);
  z-index: 2;
  animation: memory-photo-fade 6.4s ease-in-out forwards;
}

.memory-wave-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(0.95) contrast(1.06);
}

@keyframes memory-wave-float {
  0% {
    transform: translate3d(0, 0, 0);
    opacity: 0;
  }
  12% {
    opacity: 0.5;
  }
  70% {
    opacity: 0.34;
  }
  100% {
    transform: translate3d(var(--wave-drift, 0px), calc(var(--wave-rise, 40px) * -1), 0);
    opacity: 0;
  }
}

@keyframes memory-rose-bloom {
  0% {
    transform: scale(0.35) rotate(-8deg);
    opacity: 0;
  }
  35% {
    transform: scale(1.06) rotate(0deg);
    opacity: 0.85;
  }
  65% {
    transform: scale(0.95) rotate(3deg);
    opacity: 0.58;
  }
  100% {
    transform: scale(0.78) rotate(6deg);
    opacity: 0;
  }
}

@keyframes memory-photo-fade {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  14% {
    opacity: 0.86;
    transform: scale(1);
  }
  72% {
    opacity: 0.6;
    transform: scale(1.02);
  }
  100% {
    opacity: 0;
    transform: scale(1.04);
  }
}

input,
textarea,
select,
button {
  font-family: "Vazirmatn", "Tahoma", sans-serif;
}

[hidden] {
  display: none !important;
}

.flag-band {
  background: linear-gradient(90deg, var(--accent-green), var(--accent-white), var(--accent-red));
  height: 6px;
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: 32px 0 64px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  position: relative;
  z-index: 3;
}

.sidebar {
  background: #0f1313;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.brand-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.brand-domain {
  font-family: "Cinzel", "Times New Roman", serif;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.nav {
  display: grid;
  gap: 10px;
}

.nav-link {
  text-decoration: none;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: transform 0.2s ease, background 0.2s ease;
}

.nav-link:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.06);
}

.nav-link-highlight {
  background: #0b1d4a;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
}

.nav-link-highlight .nav-label {
  display: inline-block;
  transition: opacity 0.2s ease;
}

.nav-link-highlight::after {
  content: attr(data-hover);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  color: #ffffff;
  padding: 0 8px;
}

.nav-link-highlight:hover {
  background: #0a1740;
}

.nav-link-highlight:hover .nav-label {
  opacity: 0;
}

.nav-link-highlight:hover::after {
  opacity: 1;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 12px;
  color: var(--muted);
  font-size: 0.85rem;
}

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

.main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(10, 12, 12, 0.75);
  backdrop-filter: blur(16px);
}

.topbar-title {
  font-size: 1rem;
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  gap: 12px;
}

.content {
  width: min(1200px, 92vw);
  margin: 0 auto;
  padding: 28px 0 48px;
}

header {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.brand-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.brand-divider-image {
  width: 50px;
  height: auto;
  display: block;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand {
  justify-self: end;
}

.header-stats {
  justify-self: start;
}

.map-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.header-stats {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--muted);
}

.header-stats strong {
  color: var(--accent-red);
  font-size: clamp(2.2rem, 4vw, 3rem);
  display: inline-block;
  animation: heartbeat 1.6s ease-in-out infinite;
  position: relative;
}

.header-stats strong::before {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 999px;
  background: rgba(161, 23, 26, 0.2);
  filter: blur(6px);
  z-index: -1;
  animation: pulse-glow 1.6s ease-in-out infinite;
}

@keyframes heartbeat {
  0% {
    transform: scale(1);
  }
  20% {
    transform: scale(1.08);
  }
  40% {
    transform: scale(1);
  }
  60% {
    transform: scale(1.1);
  }
  80% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes pulse-glow {
  0% {
    transform: scale(0.9);
    opacity: 0.4;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.75;
  }
  100% {
    transform: scale(0.9);
    opacity: 0.4;
  }
}

.brand h1 {
  font-size: clamp(2.2rem, 4vw, 3rem);
  margin: 0;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-white), var(--accent-red));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand span {
  color: var(--muted);
  font-size: 1rem;
  font-family: "Cinzel", "Times New Roman", serif;
  letter-spacing: 1px;
}

.brand-row-single {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.brand-row-single .brand {
  justify-self: auto;
  text-align: right;
}

.records-brand-row {
  justify-content: flex-start;
}

.graph-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}


.hero {
  background: linear-gradient(135deg, rgba(15, 111, 74, 0.12), rgba(161, 23, 26, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 22px 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

.support-note {
  margin-top: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 16px 18px;
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
}

.support-note .note {
  margin: 0;
}

.section {
  margin-top: 28px;
  background: var(--panel);
  border-radius: 18px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.not-found {
  text-align: center;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.section h2 {
  margin: 0 0 16px;
  font-size: 1.4rem;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

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

.view-toggle {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.toggle-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  border-radius: 12px;
  padding: 8px 14px;
  font-weight: 600;
}

.toggle-btn.active {
  background: linear-gradient(90deg, var(--accent-green), var(--accent-red));
}

.cta {
  text-decoration: none;
  color: var(--text);
  background: linear-gradient(90deg, var(--accent-green), var(--accent-red));
  padding: 10px 16px;
  border-radius: 14px;
  font-weight: 600;
  font-family: inherit;
}

.cta.alt {
  background: linear-gradient(90deg, var(--accent-green), var(--accent-red));
  border: none;
}

.name {
  font-weight: 600;
}

.name.image-link,
.name.source-link {
  color: var(--accent-white);
  text-decoration: none;
}

.desc-name-link {
  color: #b7f3c7;
  text-decoration: none;
}

.desc-name-link:hover {
  text-decoration: underline;
}

.name.image-link:hover,
.name.source-link:hover {
  text-decoration: underline;
}

.image-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 220px));
  justify-content: start;
}

.image-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 14px;
  text-align: center;
  display: grid;
  gap: 10px;
  max-width: 220px;
}

.image-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
}

.image-placeholder {
  height: 180px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(15, 111, 74, 0.2), rgba(161, 23, 26, 0.2));
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.record-meta,
.record-desc,
.record-source {
  color: var(--muted);
  line-height: 1.8;
  text-align: right;
}

.map-wrap {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: start;
  position: relative;
}

.iran-map svg {
  width: 100%;
  height: auto;
}

.province-labels text {
  fill: rgba(245, 245, 240, 0.9);
  font-size: 13.5px;
  pointer-events: none;
}

.province-labels tspan:last-child {
  fill: rgba(245, 245, 240, 0.7);
  font-size: 15px;
}

.province {
  fill: #1f2324;
  stroke: rgba(255, 255, 255, 0.4);
  stroke-width: 1;
  transition: fill 0.2s ease;
}

.province.level-0 {
  fill: #2a2f30;
}

.province.level-1 {
  fill: #c56a5c;
}

.province.level-2 {
  fill: #c13d2a;
}

.province.level-3 {
  fill: #8d1d1a;
}

.province.level-4 {
  fill: #5e0e12;
}

.map-legend {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.map-tooltip {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-9999px, -9999px);
  background: rgba(10, 12, 12, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 10px 14px;
  display: grid;
  gap: 4px;
  color: var(--text);
  min-width: 140px;
  pointer-events: none;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 10;
}

.map-tooltip.show {
  opacity: 1;
}

.map-tooltip strong {
  font-size: 0.95rem;
}

.map-tooltip span {
  color: var(--muted);
  font-size: 0.85rem;
}

.legend-title {
  color: var(--text);
  font-weight: 600;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legend-swatch {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  display: inline-block;
}

.legend-swatch.level-1 {
  background: #c56a5c;
}

.legend-swatch.level-2 {
  background: #c13d2a;
}

.legend-swatch.level-3 {
  background: #8d1d1a;
}

.legend-swatch.level-4 {
  background: #5e0e12;
}

.upload-progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-top: 10px;
}

.upload-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-red));
  transition: width 0.2s ease;
}

.hidden-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.pic-indicator {
  margin-right: 6px;
  font-size: 0.95rem;
  opacity: 0.85;
}

.gallery-modal {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 6, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}

.gallery-modal.open {
  display: flex;
}

.gallery-content {
  max-width: 720px;
  width: min(90vw, 720px);
  background: var(--panel);
  border-radius: 18px;
  padding: 20px 16px 16px 64px;
  display: grid;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

.gallery-content img {
  width: 100%;
  max-width: 600px;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 12px;
}

.gallery-caption {
  color: var(--muted);
  text-align: center;
}

.gallery-close {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 12px;
  border-radius: 10px;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}

.gallery-nav.prev {
  right: 12px;
}

.gallery-nav.next {
  left: 12px;
}

.desc-link {
  color: var(--accent-white);
  text-decoration: none;
  margin-right: 6px;
}

.desc-link:hover {
  text-decoration: underline;
}

form {
  display: grid;
  gap: 16px;
}

.search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 16px;
}

.search-form input {
  direction: rtl;
}

.grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.date-selects {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

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

input, textarea, select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--panel-2);
  color: var(--text);
  font-family: "Vazirmatn", "Tahoma", sans-serif;
}

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

button {
  background: linear-gradient(90deg, var(--accent-green), var(--accent-red));
  color: var(--text);
  border: none;
  border-radius: 14px;
  padding: 12px 20px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-family: "Vazirmatn", "Tahoma", sans-serif;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: right;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

th {
  color: var(--muted);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.02);
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.note {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.8;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 10px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.admin-card a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-actions button {
  padding: 8px 14px;
}

.decision-note {
  color: var(--muted);
  line-height: 1.7;
}

.inline-form {
  display: grid;
  gap: 8px;
}

.admin-actions .reject {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-photo {
  width: 100%;
  max-width: 200px;
  max-height: 220px;
  object-fit: cover;
  border-radius: 12px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-red));
  color: var(--text);
  border-radius: 12px;
  padding: 8px 14px;
  font-weight: 600;
  font-family: inherit;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.checkbox-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
}

.footer {
  margin: 40px auto 0;
  width: min(100%, 980px);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  line-height: 1.95;
  padding: 24px 20px 32px;
  text-wrap: pretty;
}

.footer-button {
  margin-top: 10px;
}

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

.admin-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
}

.stat-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 14px;
  display: grid;
  gap: 8px;
}

.stat-label {
  color: var(--muted);
  font-size: 0.85rem;
}

.stat-value {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text);
}

.admin-toolbar {
  display: grid;
  gap: 12px;
}

.admin-toolbar input {
  max-width: 540px;
}

.admin-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-import-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.admin-import-form label {
  grid-column: 1 / -1;
}

.admin-record-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.admin-record {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.admin-record-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.admin-record-name {
  margin: 0;
  font-size: 1.02rem;
}

.admin-id {
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-meta-grid {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.86rem;
}

.admin-desc {
  color: var(--text);
  line-height: 1.7;
  font-size: 0.92rem;
}

.admin-source {
  color: var(--muted);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.panel-count {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.95rem;
}

.chart-wrap {
  height: 460px;
  position: relative;
}

.screensaver-page {
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
}

.screensaver-viki {
  position: fixed;
  left: 50%;
  top: 56%;
  transform: translate(-50%, -50%);
  width: min(46vw, 700px);
  height: min(46vw, 700px);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.09;
  pointer-events: none;
  z-index: 0;
}

.screensaver-stage {
  min-height: 100vh;
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: clamp(20px, 4vh, 38px) 20px 16px;
  pointer-events: auto;
}

.screensaver-title {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.screensaver-title-fa {
  font-size: clamp(2.1rem, 5vw, 4.4rem);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.4px;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-white), var(--accent-red));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 24px rgba(0, 0, 0, 0.4);
}

.screensaver-title-en {
  font-family: "Cinzel", "Times New Roman", serif;
  color: rgba(215, 215, 207, 0.88);
  letter-spacing: 1.8px;
  font-size: clamp(0.85rem, 1.4vw, 1.25rem);
}

.screensaver-home-link {
  text-decoration: none;
  color: rgba(215, 215, 207, 0.9);
}

.screensaver-home-link:visited,
.screensaver-home-link:hover,
.screensaver-home-link:active,
.screensaver-home-link:focus-visible {
  color: rgba(215, 215, 207, 0.9);
  text-decoration: none;
}

.screensaver-f11-hint {
  margin: 10px 0 0;
  color: rgba(183, 192, 192, 0.92);
  font-size: clamp(0.82rem, 1.2vw, 1rem);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  transition: opacity 0.2s ease;
}

.screensaver-f11-hint.is-hidden {
  opacity: 0;
}

.screensaver-splash {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(6, 10, 10, 0.72);
  backdrop-filter: blur(6px);
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.screensaver-splash.is-done {
  opacity: 0;
  visibility: hidden;
}

.screensaver-splash-card {
  width: min(540px, 86vw);
  background: rgba(10, 16, 16, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  padding: 22px 20px;
  display: grid;
  gap: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

.screensaver-splash-title {
  margin: 0;
  font-size: clamp(1.1rem, 2.1vw, 1.5rem);
  color: var(--text);
}

.screensaver-splash-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.screensaver-splash-progress {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.screensaver-splash-bar {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-white), var(--accent-red));
  transition: width 0.2s linear;
}

.audio-toggle-btn {
  position: fixed;
  left: 16px;
  bottom: 16px;
  top: auto;
  transform: none;
  z-index: 90;
  width: 46px;
  height: 46px;
  min-width: 46px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 700;
  background: rgba(7, 12, 12, 0.82);
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-align: center;
}

.audio-toggle-btn.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.audio-toggle-btn::before {
  content: attr(data-icon);
  display: block;
  transform: translateX(1px);
}

.audio-toggle-btn.is-playing {
  background: linear-gradient(90deg, rgba(161, 23, 26, 0.84), rgba(15, 111, 74, 0.84));
}

.audio-toggle-btn.is-paused {
  background: linear-gradient(90deg, rgba(15, 111, 74, 0.84), rgba(18, 24, 25, 0.92));
}

.audio-toggle-hint {
  position: fixed;
  left: 76px;
  bottom: 24px;
  top: auto;
  z-index: 89;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(7, 12, 12, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  font-size: 0.8rem;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.audio-toggle-hint.show {
  opacity: 1;
  transform: translateX(0);
}

.audio-toggle-hint .hint-arrow {
  color: #b7f3c7;
  font-size: 1rem;
  animation: hint-bounce 0.9s ease-in-out infinite;
}

@keyframes hint-bounce {
  0% { transform: translateX(0); }
  50% { transform: translateX(-5px); }
  100% { transform: translateX(0); }
}

@media (max-width: 600px) {
  .brand {
    flex-direction: column;
    align-items: flex-start;
  }

  .map-wrap {
    grid-template-columns: 1fr;
  }

  .audio-toggle-btn {
    left: 12px;
    bottom: 12px;
    top: auto;
    width: 42px;
    height: 42px;
    min-width: 42px;
    padding: 0;
    font-size: 1rem;
    transform: none;
  }

  .audio-toggle-hint {
    left: 62px;
    bottom: 18px;
    top: auto;
    font-size: 0.74rem;
    max-width: calc(100vw - 74px);
  }

  .audio-toggle-btn,
  .audio-toggle-hint {
    display: none !important;
  }
}

@media (max-width: 960px) {
  .brand-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .map-page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-divider-image {
    align-self: center;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-left: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .topbar {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .content {
    padding: 20px 0 40px;
  }

  .admin-summary {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

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

@media (max-width: 800px) {
  .footer {
    width: min(100%, 680px);
    padding: 18px 14px 26px;
    font-size: 0.8rem;
    line-height: 2;
    text-align: right;
    overflow-wrap: anywhere;
    word-break: normal;
  }
}

/* ========================================
   Visual Refresh (Modernized UI Layer)
   ======================================== */

:root {
  --ui-surface: rgba(14, 22, 24, 0.78);
  --ui-surface-strong: rgba(10, 16, 18, 0.92);
  --ui-border: rgba(183, 243, 199, 0.16);
  --ui-border-soft: rgba(255, 255, 255, 0.08);
  --ui-glow: 0 18px 54px rgba(0, 0, 0, 0.42);
  --ui-radius-xl: 26px;
  --ui-radius-lg: 18px;
  --ui-radius-md: 14px;
}

body {
  background:
    radial-gradient(1100px 700px at 8% 2%, rgba(12, 115, 76, 0.33), transparent 58%),
    radial-gradient(900px 600px at 92% 6%, rgba(161, 23, 26, 0.28), transparent 60%),
    linear-gradient(140deg, #050a0c 0%, #0b1214 45%, #070d10 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: 0.5;
}

.app-shell {
  width: min(1600px, 98vw);
  margin: 16px auto;
  min-height: calc(100vh - 32px);
  height: calc(100vh - 32px);
  grid-template-columns: 288px minmax(0, 1fr);
  gap: 18px;
  overflow: hidden;
}

.sidebar {
  position: sticky;
  top: 12px;
  align-self: start;
  height: auto;
  max-height: none;
  overflow: visible;
  will-change: transform;
  transition: transform 0.2s ease;
  padding: 22px 16px;
  border: 1px solid var(--ui-border-soft);
  border-radius: var(--ui-radius-xl);
  background:
    linear-gradient(165deg, rgba(11, 20, 24, 0.94), rgba(8, 14, 16, 0.92));
  box-shadow: var(--ui-glow);
  backdrop-filter: blur(12px);
}

.sidebar-brand {
  padding: 8px 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
}

.brand-title {
  font-size: 1.22rem;
}

.brand-domain {
  font-size: 0.8rem;
  letter-spacing: 1.2px;
}

.nav {
  gap: 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  border-radius: 13px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.nav-link:hover {
  transform: translateX(-2px);
  border-color: rgba(183, 243, 199, 0.3);
  background: rgba(183, 243, 199, 0.05);
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.88rem;
  flex: 0 0 25px;
}

.nav-link-highlight {
  background: linear-gradient(90deg, rgba(15, 111, 74, 0.28), rgba(161, 23, 26, 0.28));
  border-color: rgba(183, 243, 199, 0.26);
}

.sidebar-footer {
  margin-top: 12px;
  padding: 10px 8px 2px;
}

.main {
  min-width: 0;
  direction: ltr;
  height: calc(100vh - 32px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.main::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.topbar {
  margin-top: 2px;
  border: 1px solid var(--ui-border-soft);
  border-radius: var(--ui-radius-lg);
  padding: 14px 20px;
  background:
    linear-gradient(90deg, rgba(15, 111, 74, 0.12), rgba(14, 20, 24, 0.75), rgba(161, 23, 26, 0.12));
  box-shadow: var(--ui-glow);
}

.topbar-title {
  color: #d8e2e2;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.content {
  width: min(1240px, 92vw);
  direction: rtl;
  padding: 20px 0 52px;
}

header {
  gap: 18px;
  margin-top: 10px;
}

.brand-row {
  border: 1px solid var(--ui-border-soft);
  border-radius: var(--ui-radius-lg);
  padding: 14px 18px;
  background: var(--ui-surface);
  backdrop-filter: blur(10px);
}

.brand h1 {
  letter-spacing: -0.8px;
  text-shadow: 0 10px 35px rgba(0, 0, 0, 0.42);
}

.header-stats {
  gap: 12px;
}

.header-stats strong {
  filter: drop-shadow(0 0 16px rgba(161, 23, 26, 0.4));
}

.hero {
  border-radius: var(--ui-radius-xl);
  border-color: var(--ui-border);
  background:
    linear-gradient(120deg, rgba(14, 28, 31, 0.86), rgba(16, 23, 27, 0.8)),
    linear-gradient(145deg, rgba(15, 111, 74, 0.16), rgba(161, 23, 26, 0.18));
  padding: 24px 26px;
  box-shadow: var(--ui-glow);
}

.hero p {
  color: #d2d9d9;
  font-size: 1.02rem;
}

.section {
  margin-top: 22px;
  border-radius: var(--ui-radius-xl);
  border: 1px solid var(--ui-border-soft);
  padding: 22px;
  background:
    linear-gradient(170deg, rgba(11, 19, 22, 0.88), rgba(8, 14, 17, 0.84));
  box-shadow: var(--ui-glow);
  backdrop-filter: blur(10px);
}

.section h2 {
  margin-bottom: 14px;
}

.cta,
button,
.button-link {
  border-radius: 12px;
}

.table-wrap {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.15);
}

table {
  overflow: hidden;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  backdrop-filter: blur(6px);
}

.map-wrap {
  grid-template-columns: minmax(0, 1fr) 228px;
  gap: 16px;
}

.map-legend {
  position: sticky;
  top: 12px;
  border-radius: 14px;
  background: rgba(9, 16, 19, 0.84);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.iran-map {
  border-radius: 16px;
  padding: 8px;
  background: rgba(6, 11, 13, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.image-card,
.admin-card,
.admin-record,
.stat-card {
  border-radius: 16px;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(12, 20, 23, 0.82);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.25);
}

input,
textarea,
select {
  background: rgba(9, 16, 19, 0.86);
  border-color: rgba(183, 243, 199, 0.12);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(183, 243, 199, 0.35);
  box-shadow: 0 0 0 3px rgba(183, 243, 199, 0.12);
}

.footer {
  margin-top: 28px;
  max-width: 860px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 18px;
  text-align: center;
  color: #b9c3c3;
}

@media (max-width: 1140px) {
  .app-shell {
    width: min(1300px, 99vw);
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 10px auto;
    height: auto;
    overflow: visible;
  }

  .sidebar {
    position: sticky;
    top: 8px;
    z-index: 40;
    max-height: calc(100vh - 16px);
    border-radius: 18px;
  }

  .map-wrap {
    grid-template-columns: 1fr;
  }

  .main {
    height: auto;
    overflow: visible;
  }
}
