:root {
  color-scheme: light;
  --primary: #1a6a4a;
  --primary-dark: #104c35;
  --primary-soft: rgba(58, 178, 118, 0.14);
  --accent: #d6933c;
  --bg: #06100d;
  --surface: rgba(6, 18, 15, 0.78);
  --surface-solid: #07130f;
  --surface-soft: rgba(255, 255, 255, 0.045);
  --line: rgba(174, 224, 192, 0.14);
  --line-strong: rgba(174, 224, 192, 0.22);
  --text: #f2f7f3;
  --text-soft: #d6e4dc;
  --muted: #90a49a;
  --muted-soft: #6f8379;
  --danger: #b42318;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-family: Arial, sans-serif;
  background:
    radial-gradient(circle at 86% 8%, rgba(255, 214, 148, 0.22) 0%, rgba(69, 193, 120, 0.14) 18%, rgba(4, 18, 14, 0.44) 42%, rgba(2, 12, 9, 0.70) 72%),
    linear-gradient(180deg, rgba(4, 14, 12, 0.66), rgba(3, 18, 13, 0.86)),
    url("../docs/solar-background.jpg") center / cover fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: -18px;
  z-index: -1;
  background: url("../docs/solar-background.jpg") center / cover;
  filter: blur(5px) saturate(1.02);
  opacity: 0.26;
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  background: var(--primary);
  color: #ffffff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: background 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

button:hover {
  background: var(--primary-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

button.secondary {
  background: #eef5f1;
  color: #24392f;
  border: 1px solid var(--line-strong);
  font-weight: 600;
}

button.secondary:hover {
  background: #e3efe8;
}

.landing-screen {
  height: 100vh;
  padding: 0 48px 24px;
  overflow: hidden;
  position: relative;
}

.landing-screen::before {
  content: "";
  position: fixed;
  right: -140px;
  top: -120px;
  width: 760px;
  height: 520px;
  pointer-events: none;
  background:
    repeating-conic-gradient(from 210deg at 88% 12%, rgba(255, 214, 148, 0.14) 0deg, rgba(255, 214, 148, 0.03) 8deg, transparent 16deg, transparent 28deg),
    radial-gradient(circle at 88% 12%, rgba(255, 214, 148, 0.24), rgba(69, 193, 120, 0.11) 36%, transparent 68%);
  filter: blur(10px);
  opacity: 0.78;
}

.landing-screen::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 140px;
  pointer-events: none;
  background: linear-gradient(8deg, rgba(29, 139, 82, 0.34), transparent 56%);
  opacity: 0.72;
}

.hero-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  width: calc(100% + 96px);
  min-height: 58px;
  margin: 0 -48px 24px;
  padding: 10px 48px;
  background: rgba(3, 12, 10, 0.78);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
}

.hero-bar h1,
.preview-header h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
}

.preview-header h1 {
  font-size: 28px;
}

.hero-bar p {
  margin: 4px 0 0;
  color: #758a80;
  font-size: 11px;
  line-height: 1.45;
}

.mode-pill {
  flex: 0 0 auto;
  padding: 9px 16px;
  border-radius: 6px;
  background: rgba(26, 106, 74, 0.22);
  color: #9be2b7;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.input-card {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 34px 50px 34px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(14, 35, 29, 0.78), rgba(9, 28, 22, 0.68)),
    linear-gradient(110deg, rgba(39, 143, 86, 0.08), rgba(214, 147, 60, 0.05), transparent);
  border: 0;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.card-strip {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #45c178 24%, var(--accent) 58%, transparent);
  box-shadow: 0 0 24px rgba(69, 193, 120, 0.62);
}

.form-section {
  padding: 0 0 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(174, 224, 192, 0.10);
}

.form-section h2,
.progress-card h2 {
  margin: 0 0 16px;
  color: #e3eee7;
  font-size: 16px;
  font-weight: 700;
}

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

.template-actions button.secondary {
  color: #a6b7af;
}

.template-actions button {
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.78);
  background: linear-gradient(180deg, rgba(45, 151, 85, 0.88), rgba(24, 100, 65, 0.88));
  box-shadow: 0 10px 22px rgba(30, 133, 75, 0.22);
}

.template-actions button.secondary {
  font-size: 12px;
  font-weight: 400;
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(174, 224, 192, 0.16);
}

.upload-zone {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 92px;
  padding: 18px 36px;
  border: 0;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(214, 147, 60, 0.13), rgba(214, 147, 60, 0.055)),
    rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 0 0 1px rgba(214, 147, 60, 0.18), 0 16px 34px rgba(0, 0, 0, 0.16);
  cursor: pointer;
}

.upload-zone.has-error {
  border-color: var(--danger);
}

.upload-zone strong,
.upload-zone small {
  display: block;
}

.upload-zone strong {
  color: #c8d6ce;
  font-size: 13px;
  font-weight: 400;
}

.upload-zone small {
  margin-top: 7px;
  color: #7e9188;
  font-size: 12px;
  line-height: 1.45;
}

.upload-zone.has-error small {
  color: var(--danger);
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(214, 147, 60, 0.18);
  color: #e3a558;
  box-shadow: 0 0 24px rgba(214, 147, 60, 0.18);
  font-size: 26px;
  line-height: 1;
}

.uploaded-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 0 0 1px rgba(174, 224, 192, 0.12);
}

.uploaded-file span,
.uploaded-file strong,
.uploaded-file small {
  display: block;
}

.uploaded-file span {
  color: #7e9188;
  font-size: 11px;
}

.uploaded-file strong {
  margin-top: 4px;
  color: #dce8e1;
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.uploaded-file small {
  margin-top: 4px;
  color: #8fb09f;
  font-size: 11px;
}

.uploaded-file button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 14px;
  color: #e8b06a;
  background: rgba(214, 147, 60, 0.10);
  border-color: rgba(214, 147, 60, 0.28);
  font-size: 12px;
  font-weight: 500;
}

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

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: #80968b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.field input,
.field select {
  width: 100%;
  height: 40px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-soft);
  font-size: 14px;
  box-shadow: inset 0 0 0 1px rgba(174, 224, 192, 0.13);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input:focus,
.field select:focus {
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(82, 202, 127, 0.56), 0 0 0 3px rgba(26, 106, 74, 0.18);
}

.field input::placeholder {
  color: #697b72;
}

.tariff-period-note {
  margin: 14px 0 0;
  color: #7e9188;
  font-size: 11px;
  line-height: 1.45;
}

.primary-cta {
  width: 100%;
  height: 52px;
  font-size: 15px;
  letter-spacing: 0.01em;
  background: linear-gradient(180deg, #2e9b5a, #1a6a4a);
  box-shadow: 0 16px 34px rgba(34, 146, 81, 0.32), 0 0 28px rgba(34, 146, 81, 0.16);
}

.preview-screen {
  min-height: 100vh;
  padding-bottom: 56px;
  position: relative;
  overflow: hidden;
}

.preview-screen::before {
  content: "";
  position: fixed;
  left: -8%;
  right: -8%;
  top: 94px;
  height: 240px;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 0%, rgba(31, 167, 90, 0.10) 34%, rgba(214, 147, 60, 0.07) 48%, rgba(31, 167, 90, 0.13) 62%, transparent 100%);
  filter: blur(24px);
  transform: skewY(-6deg);
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 64px;
  background: rgba(3, 12, 10, 0.82);
  border-bottom: 1px solid rgba(174, 224, 192, 0.10);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(14px);
}

.preview-header h1 {
  font-size: 28px;
}

.preview-actions {
  display: flex;
  gap: 16px;
}

.payment-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(6px);
}

.payment-modal {
  position: fixed;
  z-index: 21;
  left: 50%;
  top: 50%;
  width: min(620px, calc(100vw - 40px));
  max-height: calc(100vh - 48px);
  transform: translate(-50%, -50%);
  padding: 38px 34px 30px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(13, 34, 28, 0.98), rgba(7, 20, 16, 0.98)),
    radial-gradient(circle at 80% 0%, rgba(214, 147, 60, 0.13), transparent 36%);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: auto;
}

.payment-strip {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, #45c178, var(--accent));
}

.payment-close {
  position: absolute;
  right: 18px;
  top: 16px;
  width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #dce8e1;
  font-size: 22px;
  line-height: 1;
}

.payment-modal h2 {
  margin: 0;
  color: #f2f7f3;
  font-size: 24px;
}

.payment-subtitle {
  margin: 8px 0 22px;
  color: #8fa49a;
  font-size: 13px;
}

.payment-summary {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.payment-summary span,
.payment-order span {
  color: #8fa49a;
  font-size: 12px;
}

.payment-summary strong,
.payment-order strong {
  color: #eef7f1;
  font-size: 17px;
  overflow-wrap: anywhere;
}

.payment-summary small {
  color: #d9a868;
  font-size: 13px;
  font-weight: 700;
}

.payment-channel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.payment-channel {
  display: grid;
  height: 76px;
  align-content: center;
  gap: 5px;
  padding: 0 14px;
  background: rgba(26, 106, 74, 0.32);
  border: 1px solid rgba(174, 224, 192, 0.16);
}

.payment-channel span {
  font-size: 13px;
}

.payment-channel small {
  color: #b7c9bf;
  font-size: 11px;
  font-weight: 500;
}

.payment-message,
.payment-success,
.payment-error {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13px;
}

.payment-message {
  background: rgba(255, 255, 255, 0.055);
  color: #cfe0d7;
}

.payment-success {
  background: rgba(69, 193, 120, 0.14);
  color: #9be2b7;
}

.payment-error {
  background: rgba(214, 147, 60, 0.13);
  color: #f2c58b;
}

.payment-order {
  display: grid;
  justify-items: center;
  gap: 16px;
  margin-top: 18px;
  padding: 20px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.payment-order div {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.payment-order img {
  width: 210px;
  height: 210px;
  padding: 10px;
  border-radius: 8px;
  background: #ffffff;
}

.payment-order a {
  color: #9be2b7;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.contact-modal {
  width: min(520px, calc(100vw - 40px));
}

.contact-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.contact-list div {
  display: grid;
  gap: 7px;
  padding: 16px 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.contact-list span {
  color: #8fa49a;
  font-size: 12px;
}

.contact-list a,
.contact-list strong {
  color: #f2f7f3;
  font-size: 16px;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.progress-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 760px;
  align-items: center;
  gap: 40px;
  max-width: 1120px;
  min-height: 104px;
  margin: 32px auto;
  padding: 24px 40px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(8, 24, 20, 0.86), rgba(5, 16, 13, 0.78)),
    linear-gradient(110deg, rgba(39, 143, 86, 0.08), rgba(214, 147, 60, 0.04), transparent);
  border: 0;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
}

.progress-card h2 {
  margin-bottom: 10px;
}

.progress-card p {
  margin: 0;
  color: #7e9188;
  font-size: 12px;
}

.progress-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px;
  gap: 14px 20px;
  align-items: center;
}

.progress-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(174, 224, 192, 0.08);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2e9b5a, #45c178 72%, var(--accent));
  box-shadow: 0 0 22px rgba(69, 193, 120, 0.42);
  transition: width 240ms ease;
}

.progress-area strong {
  color: #9be2b7;
  font-size: 12px;
}

.progress-area small {
  grid-column: 1 / -1;
  color: #80968b;
  font-size: 12px;
  font-weight: 600;
}

.pdf-viewer {
  max-width: 1120px;
  height: calc(100vh - 260px);
  min-height: 520px;
  margin: 0 auto;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(8, 24, 20, 0.88), rgba(5, 16, 13, 0.80)),
    radial-gradient(circle at 78% 0%, rgba(214, 147, 60, 0.09), transparent 32%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.viewer-title {
  height: 48px;
  padding: 14px 40px;
  background: rgba(255, 255, 255, 0.035);
  color: #e3eee7;
  border-bottom: 1px solid rgba(174, 224, 192, 0.10);
  font-size: 18px;
  font-weight: 700;
}

.pdf-viewer .pdf-page {
  max-height: calc(100% - 88px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(69, 193, 120, 0.72) rgba(255, 255, 255, 0.08);
}

.pdf-viewer .pdf-page::-webkit-scrollbar {
  width: 8px;
}

.pdf-viewer .pdf-page::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.pdf-viewer .pdf-page::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #45c178, #1a6a4a);
  border-radius: 999px;
}

.pdf-page {
  width: min(760px, calc(100% - 80px));
  min-height: 492px;
  margin: 30px auto 34px;
  padding: 0 48px 40px;
  border: 0;
  border-radius: 3px;
  background: #ffffff;
  color: #17251d;
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(174, 224, 192, 0.08);
}

.pdf-page h2,
.pdf-page h3,
.pdf-page h4,
.pdf-page p,
.pdf-page span,
.pdf-page strong,
.pdf-page table,
.pdf-page th,
.pdf-page td {
  color: #17251d;
}

.pdf-cover {
  margin: 0 -48px 34px;
  padding: 26px 48px;
  background: var(--primary);
  color: #ffffff;
}

.pdf-cover h2,
.pdf-cover h3,
.pdf-cover p,
.pdf-cover span,
.pdf-cover strong {
  color: #ffffff;
}

.pdf-cover h2 {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.2;
}

.pdf-cover p {
  margin: 0;
  font-size: 12px;
}

.pdf-summary h3,
.pdf-section h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.pdf-summary p,
.pdf-section p {
  margin: 0 0 10px;
  color: #2f4338;
  font-size: 13px;
  line-height: 1.6;
}

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

.pdf-metrics div {
  min-height: 68px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.pdf-metrics span {
  display: block;
  margin-bottom: 10px;
  color: #65756c;
  font-size: 11px;
}

.pdf-metrics strong {
  display: block;
  color: #17251d;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.pdf-section {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.loading-page {
  padding-top: 0;
}

.pdf-cover-bar {
  height: 76px;
  margin: 0 -48px 38px;
  background: var(--primary);
}

.skeleton,
.metric-skeletons div,
.chart-skeleton {
  border-radius: 4px;
  background: #e4ece7;
}

.title-line {
  width: 260px;
  height: 20px;
  margin-bottom: 34px;
  background: #eef5f1;
}

.line {
  height: 10px;
  margin-bottom: 18px;
}

.line.long {
  width: 78%;
}

.line.medium {
  width: 64%;
}

.metric-skeletons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 46px 0;
}

.metric-skeletons div {
  height: 68px;
  background: #f7faf8;
  border: 1px solid var(--line);
}

.chart-skeleton {
  height: 86px;
  background: linear-gradient(135deg, #e4ece7, #f7faf8);
}

@media (max-width: 900px) {
  .landing-screen {
    padding: 0 18px 18px;
    overflow: auto;
  }

  .hero-bar,
  .preview-header,
  .progress-card {
    display: grid;
    height: auto;
  }

  .preview-header {
    gap: 16px;
    padding: 18px;
  }

  .hero-bar {
    width: calc(100% + 36px);
    margin: 0 -18px 18px;
    padding: 12px 18px;
  }

  .input-card {
    padding: 38px 22px 28px;
  }

  .field-grid,
  .progress-card {
    grid-template-columns: 1fr;
  }

  .progress-card,
  .pdf-viewer {
    width: calc(100% - 36px);
  }

  .progress-area {
    grid-template-columns: minmax(0, 1fr) 48px;
  }

  .pdf-page {
    width: calc(100% - 32px);
    padding-left: 24px;
    padding-right: 24px;
  }

  .pdf-cover,
  .pdf-cover-bar {
    margin-left: -24px;
    margin-right: -24px;
    padding-left: 24px;
    padding-right: 24px;
  }

  .pdf-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

.admin-screen {
  height: 100vh;
  background:
    radial-gradient(circle at 86% 12%, #e7f4ed 0%, transparent 26%),
    radial-gradient(circle at 8% 88%, #fff2df 0%, transparent 24%),
    #f3f8f5;
  color: #163427;
  overflow: auto;
}

.admin-login-screen {
  display: grid;
  place-items: center;
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% 12%, #e7f4ed 0%, transparent 28%),
    radial-gradient(circle at 10% 86%, #fff2df 0%, transparent 24%),
    #f3f8f5;
  color: #163427;
}

.admin-login-card {
  width: min(420px, calc(100vw - 40px));
  padding: 38px 40px 42px;
  border: 1px solid #d7e8de;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(26, 79, 56, 0.14);
}

.admin-login-mark {
  width: 48px;
  height: 6px;
  margin-bottom: 24px;
  border-radius: 999px;
  background: linear-gradient(90deg, #1a6a4a, #d8892f);
}

.admin-login-card h1 {
  margin: 0;
  color: #163427;
  font-size: 24px;
  line-height: 1.2;
}

.admin-login-card p {
  margin: 10px 0 28px;
  color: #7a8e84;
  font-size: 13px;
}

.admin-login-field {
  display: grid;
  gap: 9px;
  margin-bottom: 18px;
}

.admin-login-field span {
  color: #62766c;
  font-size: 12px;
  font-weight: 700;
}

.admin-login-field input {
  height: 42px;
  border: 1px solid #cfe1d7;
  border-radius: 8px;
  padding: 0 14px;
  color: #163427;
  background: #fbfdfb;
}

.admin-login-field input:focus {
  outline: none;
  border-color: #1a6a4a;
  box-shadow: 0 0 0 3px rgba(26, 106, 74, 0.12);
}

.admin-login-error {
  margin: 4px 0 16px;
  color: #b42318;
  font-size: 13px;
}

.admin-login-submit {
  width: 100%;
  height: 44px;
  margin-top: 4px;
  background: linear-gradient(180deg, #2e9b5a, #1a6a4a);
}

.admin-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(15, 31, 24, 0.26);
}

.admin-modal-backdrop.top {
  z-index: 30;
  background: rgba(15, 31, 24, 0.34);
}

.admin-config-modal {
  position: fixed;
  z-index: 21;
  left: 50%;
  top: 50%;
  width: min(840px, calc(100vw - 48px));
  max-height: calc(100vh - 72px);
  transform: translate(-50%, -50%);
  padding: 50px 44px 24px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(26, 79, 56, 0.18);
  overflow: auto;
}

.admin-config-strip {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 6px;
  background: #1a6a4a;
}

.admin-config-close {
  position: absolute;
  right: 44px;
  top: 30px;
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 50%;
  background: #eef5f1;
  color: #1a6a4a;
  font-size: 22px;
  line-height: 1;
}

.admin-config-modal h2 {
  margin: 0;
  color: #163427;
  font-size: 24px;
}

.admin-config-subtitle {
  margin: 10px 0 34px;
  color: #7a8e84;
  font-size: 12px;
}

.admin-config-section {
  padding: 30px 32px 24px;
  border: 1px solid #d7e8de;
  border-radius: 14px;
  background: #f8fbf9;
}

.admin-config-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}

.admin-config-heading h3,
.admin-model-section h3 {
  margin: 0;
  color: #18372a;
  font-size: 18px;
}

.admin-config-heading span {
  padding: 7px 22px;
  border-radius: 999px;
  background: #e7f4ed;
  color: #1a6a4a;
  font-size: 12px;
  font-weight: 700;
}

.admin-prompt-list {
  display: grid;
  gap: 16px;
}

.admin-prompt-item {
  padding: 15px 22px;
  border-radius: 8px;
  background: #ffffff;
}

.admin-prompt-item.editable {
  display: grid;
  gap: 10px;
}

.admin-prompt-item strong,
.admin-model-section span {
  display: block;
  margin-bottom: 8px;
  color: #667c71;
  font-size: 12px;
  font-weight: 700;
}

.admin-prompt-item p {
  margin: 0;
  color: #344b40;
  font-size: 14px;
  line-height: 1.45;
}

.admin-prompt-item textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  border: 1px solid #d7e8de;
  border-radius: 10px;
  padding: 13px 14px;
  background: #fbfdfb;
  color: #163427;
  font: 13px/1.55 Consolas, "Courier New", monospace;
}

.admin-prompt-item textarea:focus,
.admin-model-row select:focus {
  outline: none;
  border-color: #1a6a4a;
  box-shadow: 0 0 0 3px rgba(26, 106, 74, 0.12);
}

.admin-model-section {
  margin-top: 28px;
  padding: 30px 32px;
  border: 1px solid #efd8b5;
  border-radius: 14px;
  background: #fff7ec;
}

.admin-model-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 180px;
  align-items: center;
  gap: 18px;
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 8px;
  background: #ffffff;
}

.admin-model-section span {
  margin: 0;
}

.admin-model-row select {
  width: 100%;
  min-width: 0;
  height: 40px;
  border: 1px solid #d7e8de;
  border-radius: 10px;
  padding: 0 12px;
  background: #fbfdfb;
  color: #163427;
  font-size: 13px;
}

.admin-model-section strong {
  color: #344b40;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.admin-model-section small {
  color: #7a8e84;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.admin-config-actions {
  display: flex;
  gap: 16px;
  margin-top: 28px;
}

.admin-config-actions button {
  min-width: 176px;
  height: 44px;
  background: #1a6a4a;
}

.admin-config-actions .admin-config-secondary {
  min-width: 196px;
  border: 1px solid #c6d8cf;
  background: #eef5f1;
  color: #1a6a4a;
}

.admin-config-loading {
  margin: -18px 0 18px;
  color: #7a8e84;
  font-size: 13px;
}

.admin-ai-modal {
  position: fixed;
  z-index: 30;
  left: 50%;
  top: 50%;
  width: min(760px, calc(100vw - 48px));
  max-height: calc(100vh - 72px);
  transform: translate(-50%, -50%);
  padding: 50px 44px 30px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 22px 52px rgba(26, 79, 56, 0.22);
  overflow: auto;
}

.admin-ai-modal h2 {
  margin: 0;
  color: #163427;
  font-size: 24px;
}

.admin-ai-grid {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

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

.admin-ai-field {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.admin-ai-field span {
  color: #667c71;
  font-size: 12px;
  font-weight: 700;
}

.admin-ai-field input,
.admin-ai-field select {
  width: 100%;
  height: 42px;
  border: 1px solid #d7e8de;
  border-radius: 10px;
  padding: 0 13px;
  background: #fbfdfb;
  color: #163427;
  font-size: 13px;
}

.admin-ai-field input:focus,
.admin-ai-field select:focus {
  outline: none;
  border-color: #1a6a4a;
  box-shadow: 0 0 0 3px rgba(26, 106, 74, 0.12);
}

.admin-ai-status {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #eaf4ee;
  color: #1a6a4a;
  font-size: 13px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  padding: 0 48px;
  background: linear-gradient(90deg, #1a6a4a, #207a55 72%, #2c8d60);
}

.admin-header h1 {
  margin: 0;
  color: #ffffff;
  font-size: 26px;
  font-weight: 700;
}

.admin-actions {
  display: flex;
  gap: 16px;
}

.admin-icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.admin-ai-button {
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.admin-contact-button {
  width: 64px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.admin-gear,
.admin-account {
  position: relative;
  display: block;
  width: 20px;
  height: 20px;
}

.admin-gear::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 2px solid #ffffff;
  border-radius: 50%;
}

.admin-gear::after {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  top: 9px;
  height: 2px;
  background: #ffffff;
  box-shadow: 0 -8px 0 #ffffff, 0 8px 0 #ffffff;
  transform: rotate(45deg);
}

.admin-account::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 10px;
  height: 10px;
  border: 2px solid #ffffff;
  border-radius: 50%;
}

.admin-account::after {
  content: "";
  position: absolute;
  left: 2px;
  bottom: 1px;
  width: 16px;
  height: 9px;
  border: 2px solid #ffffff;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
  border-bottom: 0;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(320px, 3fr);
  gap: 32px;
  width: min(1344px, calc(100vw - 96px));
  max-width: 1344px;
  margin: 0 auto;
  padding: 36px 0 56px;
}

.admin-panel {
  position: relative;
  min-height: 700px;
  border: 1.5px solid #d7e8de;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(26, 79, 56, 0.12);
  overflow: hidden;
}

.admin-panel-strip {
  height: 6px;
  background: #1a6a4a;
}

.admin-panel-strip.orange {
  background: #d8892f;
}

.admin-panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 24px;
  padding: 34px 36px 0;
}

.admin-panel-heading h2 {
  margin: 0;
  color: #163427;
  font-size: 20px;
}

.admin-panel-heading p {
  margin: 8px 0 0;
  color: #7a8e84;
  font-size: 12px;
}

.admin-refresh {
  min-height: 32px;
  border-radius: 6px;
  background: #eaf4ee;
  color: #1a6a4a;
  font-size: 12px;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding: 32px 36px 0;
}

.admin-metric {
  min-height: 92px;
  padding: 22px 24px;
  border-radius: 10px;
  background: #f6faf7;
}

.admin-metric.orange {
  background: #fff7ec;
}

.admin-metric span {
  display: block;
  color: #7a8e84;
  font-size: 12px;
}

.admin-metric strong {
  display: block;
  margin-top: 12px;
  color: #18372a;
  font-size: 28px;
}

.admin-chart-wrap {
  margin: 42px 36px 0;
  padding: 22px 22px 12px;
  border-radius: 10px;
  background: #fbfdfb;
}

.admin-chart {
  width: 100%;
  height: 360px;
  display: block;
}

.chart-axis {
  fill: #8a9b92;
  font: 500 12px Arial, sans-serif;
}

.admin-legend {
  display: flex;
  justify-content: flex-end;
  gap: 28px;
  color: #53685e;
  font-size: 13px;
  font-weight: 600;
}

.admin-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.admin-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-green {
  background: #1a6a4a;
}

.legend-orange {
  background: #d8892f;
}

.admin-error {
  margin: 18px 36px 0;
  color: #b42318;
  font-size: 13px;
}

.recent-users {
  padding: 32px 36px;
}

.recent-user {
  display: grid;
  gap: 4px;
  min-height: 48px;
  margin-bottom: 12px;
  padding: 10px 18px;
  border-radius: 8px;
  background: #f6faf7;
}

.recent-user.warm {
  background: #fffaf2;
}

.recent-user span {
  color: #344b40;
  font-size: 14px;
  font-weight: 500;
}

.recent-user small {
  color: #7a8e84;
  font-size: 11px;
}

.recent-empty {
  display: grid;
  place-items: center;
  min-height: 548px;
  border-radius: 12px;
  background: #f8fbf9;
  text-align: center;
}

.recent-empty-icon {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: #e8f4ee;
  position: relative;
}

.recent-empty-icon::before,
.recent-empty-icon::after {
  content: "";
  position: absolute;
  left: 22px;
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: #1a6a4a;
}

.recent-empty-icon::before {
  top: 32px;
  box-shadow: 0 16px 0 #1a6a4a;
}

.recent-empty-icon::after {
  top: 48px;
  width: 28px;
}

.recent-empty strong {
  margin-top: 18px;
  color: #233a30;
  font-size: 16px;
}

.recent-empty span {
  max-width: 260px;
  color: #7a8e84;
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 960px) {
  .admin-screen {
    overflow: auto;
  }

  .admin-layout {
    grid-template-columns: 1fr;
    padding: 24px 18px;
  }

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