* {
  box-sizing: border-box;
}

/* Final admin UI: Light Heritage Luxury, based on selected concept 4. */
.admin-heritage {
  --page-bg: #fbf7ef;
  --panel-bg: #fffdf8;
  --panel-strong: #fffaf2;
  --sidebar-bg: #f8f1e6;
  --sidebar-text: #2d2119;
  --sidebar-muted: #6f6258;
  --primary: #c43d35;
  --primary-hover: #a8322c;
  --secondary: #c2954e;
  --accent: #c2954e;
  --text: #2b221b;
  --muted: #7c7066;
  --border: #ead9be;
  --input-bg: #fffdf8;
  --success-bg: #edf6e8;
  --success-text: #357147;
  --error-bg: #fbe9e5;
  --error-text: #c43d35;
  --chart-grid: rgba(124, 112, 102, 0.18);
  --chart-visit: #c2954e;
  --chart-draw: #c43d35;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(251, 247, 239, 0.96)),
    #fbf7ef;
  color: var(--text);
}

.admin-heritage a {
  color: var(--primary);
}

.admin-heritage .sidebar {
  width: 236px;
  padding: 24px 12px 18px;
  border-right: 1px solid var(--border);
  background:
    radial-gradient(circle at 50% 80%, rgba(194, 149, 78, 0.18), transparent 36%),
    linear-gradient(180deg, #fff9ef 0%, #fbf1e3 56%, #f5ead8 100%);
  color: var(--sidebar-text);
  box-shadow: none;
}

.admin-heritage .brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 8px 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(194, 149, 78, 0.28);
}

.admin-heritage .brand-seal {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 2px solid var(--primary);
  border-radius: 50%;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.08;
  text-align: center;
}

.admin-heritage .sidebar h1 {
  margin: 0;
  color: #1f1712;
  font-size: 29px;
  font-weight: 900;
  letter-spacing: 0;
}

.admin-heritage .sidebar h1::after {
  display: none;
}

.admin-heritage .brand-lockup p {
  margin: 2px 0 0;
  color: #8a7460;
  font-size: 13px;
  letter-spacing: 2px;
}

.admin-heritage .sidebar-section {
  margin-bottom: 10px;
}

.admin-heritage .sidebar-toggle {
  min-height: 28px;
  padding: 0 10px;
  background: transparent;
  color: #9a826a;
  font-size: 12px;
  font-weight: 800;
}

.admin-heritage .sidebar-toggle::after {
  display: none;
}

.admin-heritage .sidebar-submenu {
  max-height: none;
  opacity: 1;
  transform: none;
}

.admin-heritage .sidebar-submenu a,
.admin-heritage .sidebar a {
  min-height: 54px;
  display: flex;
  align-items: center;
  margin: 4px 0;
  padding: 0 18px;
  border: 1px solid transparent;
  border-left: 0;
  border-radius: 6px;
  color: #4b4038;
  font-size: 15px;
  font-weight: 900;
}

.admin-heritage .sidebar a:hover {
  background: rgba(196, 61, 53, 0.08);
  color: var(--primary);
}

.admin-heritage .sidebar a.active {
  border-color: rgba(196, 61, 53, 0.3);
  background:
    linear-gradient(90deg, var(--primary), #b5322c);
  color: #fffaf2;
  box-shadow: 0 10px 24px rgba(196, 61, 53, 0.18);
}

.admin-heritage .logout-link {
  margin-top: 18px;
  color: #8a7460;
}

.admin-heritage .main {
  margin-left: 236px;
  padding: 24px 28px 38px;
}

.admin-heritage .admin-topbar {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  margin: -24px -28px 24px;
  padding: 0 28px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: none;
  backdrop-filter: blur(16px);
}

.admin-heritage .admin-topbar__title span {
  display: none;
}

.admin-heritage .admin-topbar__title strong {
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
}

.admin-heritage .admin-topbar__meta {
  margin-left: auto;
  color: #4f453d;
  font-size: 14px;
}

.admin-heritage .admin-topbar__meta span {
  border-left: 1px solid var(--border);
}

.admin-heritage h2 {
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
}

.admin-heritage h3 {
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
}

.admin-heritage p,
.admin-heritage label,
.admin-heritage .small-text,
.admin-heritage th,
.admin-heritage .section-help,
.admin-heritage .section-title p {
  color: var(--muted);
}

.admin-heritage .dashboard-heading {
  align-items: center;
  margin-bottom: 22px;
  padding-bottom: 0;
  border-bottom: 0;
}

.admin-heritage .dashboard-heading h2 {
  margin-bottom: 8px;
  font-size: 23px;
}

.admin-heritage .dashboard-date-pill {
  min-height: 38px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel-bg);
  color: #5b5048;
}

.admin-heritage .panel,
.admin-heritage .stats div,
.admin-heritage .login-card,
.admin-heritage .install-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: none;
}

.admin-heritage .panel::before {
  display: none;
}

.admin-heritage .stats {
  gap: 22px;
  margin-bottom: 24px;
}

.admin-heritage .dashboard-gauges {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.admin-heritage .dashboard-gauges .gauge-card {
  min-height: 126px;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  grid-template-areas:
    "icon label"
    "icon value"
    "icon unit";
  align-content: center;
  gap: 5px 16px;
  padding: 22px 20px;
  background: linear-gradient(180deg, #fffdf8, #fffaf2);
}

.admin-heritage .dashboard-gauges .gauge-card::before,
.admin-heritage .dashboard-gauges .gauge-card::after {
  display: none;
}

.admin-heritage .metric-icon {
  grid-area: icon;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(194, 149, 78, 0.32);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.58), transparent 34%),
    linear-gradient(145deg, #d8b66f, #bf8d3d);
  color: #fff;
  font-size: 18px;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.16);
}

.admin-heritage .dashboard-gauges .gauge-card:nth-child(1) .metric-icon,
.admin-heritage .dashboard-gauges .gauge-card:nth-child(4) .metric-icon {
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.48), transparent 34%),
    linear-gradient(145deg, #d45147, #bd342e);
}

.admin-heritage .gauge-label {
  grid-area: label;
  color: #7a6e64;
  font-size: 14px;
  font-weight: 800;
}

.admin-heritage .dashboard-gauges .gauge-card strong {
  grid-area: value;
  color: #211811;
  font-size: 29px;
  font-weight: 500;
  line-height: 1;
}

.admin-heritage .gauge-unit {
  grid-area: unit;
  color: #8a7d70;
  font-size: 13px;
}

.admin-heritage .gauge-unit b {
  color: var(--primary);
}

.admin-heritage .dashboard-main-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.8fr);
  gap: 24px;
  margin-bottom: 24px;
}

.admin-heritage .dashboard-bottom-grid {
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
}

.admin-heritage .section-title {
  margin-bottom: 16px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--border);
}

.admin-heritage .chart-wrap {
  min-height: 300px;
  border: 0;
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(255, 249, 239, 0.86));
}

.admin-heritage .chart-corner-legend {
  border-color: var(--border);
  background: rgba(255, 253, 248, 0.88);
  color: var(--muted);
}

.admin-heritage .chart-dot.visit {
  background: var(--accent);
}

.admin-heritage .chart-dot.draw {
  background: var(--primary);
}

.admin-heritage .config-list a {
  min-height: 48px;
  padding: 0 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.admin-heritage .config-list span {
  color: #665d55;
}

.admin-heritage .config-list strong {
  color: #4b4038;
}

.admin-heritage .quick-action-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.admin-heritage .quick-action-grid a {
  min-height: 80px;
  border-color: var(--border);
  border-radius: 6px;
  background: #fffdf8;
  color: #4b4038;
}

.admin-heritage .quick-action-grid span {
  width: 30px;
  height: 30px;
  border-radius: 5px;
  background: var(--primary);
  color: #fffaf2;
}

.admin-heritage table {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.admin-heritage th,
.admin-heritage td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
}

.admin-heritage th {
  background: #fbf4e9;
  color: #75685e;
  font-size: 13px;
  font-weight: 900;
}

.admin-heritage tbody tr:hover td {
  background: #fff8ee;
}

.admin-heritage .badge,
.admin-heritage .notice.success {
  background: var(--success-bg);
  color: var(--success-text);
}

.admin-heritage .badge.off,
.admin-heritage .notice.error {
  background: var(--error-bg);
  color: var(--error-text);
}

.admin-heritage button,
.admin-heritage .button-link {
  border-radius: 6px;
  background: var(--primary);
  color: #fffaf2;
  box-shadow: none;
}

.admin-heritage button:hover,
.admin-heritage .button-link:hover {
  background: var(--primary-hover);
  transform: none;
}

.admin-heritage .button-link.secondary {
  background: var(--secondary);
}

.admin-heritage input,
.admin-heritage textarea,
.admin-heritage select {
  border-color: var(--border);
  border-radius: 6px;
  background: var(--input-bg);
  color: var(--text);
}

.admin-heritage .config-anchor-nav,
.admin-heritage .config-submit-bar {
  border-color: var(--border);
  background: rgba(255, 253, 248, 0.92);
  box-shadow: none;
}

.admin-heritage .config-anchor-nav a {
  background: #fbf1e3;
  color: #8d342d;
}

.admin-heritage .switch-check,
.admin-heritage .color-picker-trigger,
.admin-heritage .admin-modal__panel {
  border-color: var(--border);
  background: var(--panel-bg);
  color: var(--text);
}

@media (max-width: 800px) {
  .admin-heritage .sidebar {
    width: auto;
  }

  .admin-heritage .main {
    margin-left: 0;
    padding: 20px;
  }

  .admin-heritage .admin-topbar {
    position: static;
    display: block;
    margin: -20px -20px 20px;
    padding: 14px 20px;
  }

  .admin-heritage .dashboard-gauges,
  .admin-heritage .dashboard-main-grid,
  .admin-heritage .dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }
}

body {
  margin: 0;
  background: #f4f1eb;
  color: #251711;
  font-family: SimSun, STSong, "Songti SC", serif;
}

html,
body {
  min-height: 100%;
}

a {
  color: #9d332c;
  text-decoration: none;
  font-weight: 700;
}

input,
textarea,
select,
button {
  font: inherit;
}

.login-body,
.install-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: linear-gradient(180deg, #20130f, #100d0c);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.login-card,
.install-card {
  width: 100%;
  max-width: 760px;
  padding: 34px;
  border-radius: 8px;
  background: #fff7e6;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.login-card {
  max-width: 420px;
  text-align: center;
}

.login-form {
  margin-top: 18px;
}

.login-action {
  display: flex;
  justify-content: center;
}

.login-action button {
  min-width: 128px;
}

h1,
h2,
h3 {
  margin: 0 0 18px;
}

p {
  color: #6b5441;
  line-height: 1.7;
}

form {
  text-align: left;
}

label {
  display: block;
  margin-bottom: 16px;
  color: #6b5441;
  font-weight: 700;
}

input,
textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 11px 12px;
  border: 1px solid #dfc8a6;
  border-radius: 6px;
  background: #fffdf8;
  color: #251711;
}

select {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 11px 12px;
  border: 1px solid #dfc8a6;
  border-radius: 6px;
  background: #fffdf8;
  color: #251711;
}

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

button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 6px;
  background: #9d332c;
  color: #fff7e6;
  font-weight: 800;
  cursor: pointer;
}

.danger-button {
  background: #8f2d2a;
}

.button-link.secondary {
  background: #241914;
}

.home-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.notice {
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: 6px;
}

.notice.error {
  background: #ffe8e3;
  color: #9d332c;
}

.notice.success {
  background: #e8f6df;
  color: #2d6b24;
}

.muted-link {
  display: inline-block;
  margin-top: 18px;
  color: #80624b;
  font-size: 14px;
}

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 220px;
  padding: 26px 20px;
  background: #1c120f;
  color: #fff7e6;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.sidebar h1 {
  font-size: 22px;
  margin-bottom: 28px;
}

.sidebar a {
  display: block;
  margin-bottom: 10px;
  padding: 12px;
  border-radius: 6px;
  color: #f7dfb0;
}

.sidebar-section {
  margin-bottom: 10px;
}

.sidebar-toggle {
  min-height: 46px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 13px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff7e6;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  text-align: left;
}

.sidebar-toggle::after {
  content: ">";
  font-size: 14px;
  opacity: 0.86;
  transform: rotate(-90deg);
  transition: transform 160ms ease;
}

.sidebar-section.is-open .sidebar-toggle {
  background: rgba(255, 255, 255, 0.11);
}

.sidebar-section.is-open .sidebar-toggle::after {
  transform: rotate(0deg);
}

.sidebar-submenu {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-4px);
  transition: max-height 220ms ease, opacity 180ms ease, transform 180ms ease;
}

.sidebar-section.is-open .sidebar-submenu {
  max-height: 360px;
  opacity: 1;
  transform: translateY(0);
}

.sidebar-submenu a {
  margin: 8px 0 8px 12px;
  padding: 10px 12px;
  border-left: 2px solid rgba(247, 223, 176, 0.16);
  color: rgba(247, 223, 176, 0.82);
  font-size: 14px;
  font-weight: 700;
}

.sidebar a:hover,
.sidebar a.active {
  background: rgba(255, 255, 255, 0.08);
}

.main {
  margin-left: 220px;
  padding: 34px;
}

.main::after {
  content: "";
  display: block;
  height: calc(96px + env(safe-area-inset-bottom, 0px));
}

.layout-compact .sidebar {
  width: 184px;
  padding: 22px 14px;
}

.layout-compact .sidebar a {
  margin-bottom: 6px;
  padding: 10px;
  font-size: 14px;
}

.layout-compact .main {
  margin-left: 184px;
  padding: 28px;
}

.layout-wide .main {
  max-width: 1480px;
  padding: 40px 46px;
}

.layout-topnav .sidebar {
  position: sticky;
  top: 0;
  z-index: 10;
  width: auto;
  min-height: 0;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  overflow: visible;
}

.layout-topnav .sidebar h1 {
  margin: 0 18px 0 0;
  white-space: nowrap;
}

.layout-topnav .sidebar-section {
  position: relative;
  margin: 0;
}

.layout-topnav .sidebar-toggle {
  min-height: 38px;
  padding: 0 12px;
  font-size: 15px;
}

.layout-topnav .sidebar-section.is-open {
  background: rgba(255, 255, 255, 0.07);
  border-radius: 6px;
}

.layout-topnav .sidebar-submenu {
  width: 100%;
}

.layout-topnav .sidebar-submenu a {
  margin: 0;
  border-left: 0;
}

.layout-topnav .sidebar a {
  margin: 0;
  padding: 9px 11px;
  font-size: 14px;
}

.layout-topnav .main {
  margin-left: 0;
  padding: 30px 34px;
}

.panel {
  margin-bottom: 24px;
  padding: 24px;
  border-radius: 8px;
  background: #fff7e6;
  box-shadow: 0 8px 28px rgba(68, 42, 25, 0.08);
}

.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.page-heading h2 {
  margin-bottom: 8px;
}

.page-heading p {
  max-width: 720px;
  margin: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stats div {
  padding: 22px;
  border-radius: 8px;
  background: #fff7e6;
}

.stats strong {
  display: block;
  color: #9d332c;
  font-size: 32px;
}

.stats span {
  color: #80624b;
}

.dashboard-gauges {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.dashboard-gauges .gauge-card {
  position: relative;
  min-height: 190px;
  display: grid;
  place-items: center;
  align-content: center;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
  border: 1px solid rgba(157, 51, 44, 0.16);
  border-radius: 8px;
  background:
    radial-gradient(circle at center, #fff7e6 0 45%, transparent 46%),
    conic-gradient(from 220deg, #c43d35 0 calc(var(--gauge) * 1%), rgba(223, 200, 166, 0.52) 0 78%, transparent 78% 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 253, 248, 0.68), 0 12px 32px rgba(68, 42, 25, 0.08);
}

.dashboard-gauges .gauge-card::before {
  content: "";
  position: absolute;
  inset: 18px;
  z-index: -1;
  border: 1px solid rgba(157, 51, 44, 0.12);
  border-radius: 999px;
  background:
    repeating-conic-gradient(from 220deg, rgba(37, 23, 17, 0.22) 0deg 2deg, transparent 2deg 12deg);
  mask: radial-gradient(circle, transparent 0 58%, #000 59% 64%, transparent 65%);
}

.dashboard-gauges .gauge-card::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 56px;
  left: calc(50% - 2px);
  top: 50%;
  border-radius: 999px;
  background: #251711;
  transform-origin: 50% 88%;
  transform: rotate(calc(-128deg + (var(--gauge) * 2.56deg)));
  box-shadow: 0 0 0 5px rgba(37, 23, 17, 0.08);
}

.dashboard-gauges .gauge-card strong {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  font-size: 34px;
  line-height: 1;
}

.gauge-label,
.gauge-unit {
  position: relative;
  z-index: 1;
}

.gauge-label {
  color: #6b5441;
  font-size: 14px;
  font-weight: 900;
}

.gauge-unit {
  margin-top: 5px;
  color: #80624b;
  font-size: 12px;
  font-weight: 800;
}

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

.toolbar form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.toolbar input,
.toolbar select {
  width: auto;
  min-width: 180px;
  margin-top: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e8f6df;
  color: #2d6b24;
  font-weight: 800;
  font-size: 13px;
}

.badge.off {
  background: #ffe8e3;
  color: #9d332c;
}

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

.inline-form {
  display: inline;
}

.danger-link {
  color: #9d332c;
}

.small-text {
  color: #80624b;
  font-size: 13px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.code-block {
  white-space: pre-wrap;
  word-break: break-all;
}

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

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid #ead8bd;
  text-align: left;
}

th {
  color: #80624b;
}

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

.grid-form .wide {
  grid-column: 1 / -1;
}

.grid-form .check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.grid-form .check input {
  width: auto;
  margin: 0;
}

.config-form {
  display: block;
  padding-bottom: 132px;
}

.config-anchor-nav {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid rgba(157, 51, 44, 0.12);
  border-radius: 8px;
  background: rgba(255, 247, 230, 0.94);
  box-shadow: 0 10px 30px rgba(68, 42, 25, 0.08);
  backdrop-filter: blur(10px);
}

.layout-topnav .config-anchor-nav {
  top: 72px;
}

.config-anchor-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 6px;
  background: #f6ead3;
  color: #6b382d;
  font-size: 14px;
  font-weight: 900;
}

.config-anchor-nav a:hover {
  background: #ead6b5;
}

.config-section {
  scroll-margin-top: 92px;
}

.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #ead8bd;
}

.section-title h3 {
  margin-bottom: 4px;
  color: #251711;
}

.section-title p,
.section-help {
  margin: 0;
  color: #80624b;
  font-size: 14px;
}

.section-help {
  margin-top: 6px;
}

.switch-check {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin-bottom: 0;
  padding: 12px;
  border: 1px solid #ead8bd;
  border-radius: 8px;
  background: #fffdf8;
  color: #251711;
}

.switch-check input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #9d332c;
}

.switch-check span {
  flex: 0 1 auto;
  line-height: 1.35;
}

.color-field {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 16px;
  color: #6b5441;
  font-weight: 700;
}

.field-label {
  flex: 0 0 100%;
}

.color-native-input {
  flex: 0 0 48px;
  width: 48px;
  height: 40px;
  margin-top: 0;
  padding: 4px;
  cursor: pointer;
}

.color-picker-trigger {
  min-height: 40px;
  width: 132px;
  margin-top: 0;
  padding: 0 10px;
  gap: 8px;
  background: #fffdf8;
  border: 1px solid #dfc8a6;
  color: #251711;
  font-weight: 800;
}

.color-picker-swatch {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--picked-color);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14);
}

.color-picker-text {
  font-size: 13px;
}

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 10, 8, 0.48);
}

.admin-modal[hidden] {
  display: none !important;
}

.admin-modal.is-open {
  display: flex;
}

.admin-modal__panel {
  width: min(420px, 100%);
  padding: 24px;
  border-radius: 8px;
  background: #fff7e6;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.admin-modal__panel h3 {
  margin-bottom: 8px;
}

.admin-modal__panel p {
  margin-top: 0;
}

.admin-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.modal-color-input {
  width: 96px;
  height: 52px;
  padding: 4px;
}

.config-submit-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  margin: 0 -34px -34px;
  padding: 14px 34px;
  border-top: 1px solid rgba(157, 51, 44, 0.14);
  background: rgba(244, 241, 235, 0.92);
  backdrop-filter: blur(10px);
}

.fortunes-panel {
  margin-bottom: 16px;
  padding: 18px;
}

.fortunes-panel h3 {
  margin-bottom: 14px;
}

.fortunes-form {
  gap: 8px 12px;
}

.fortunes-form label {
  margin-bottom: 8px;
}

.fortunes-form input,
.fortunes-form select,
.fortunes-form textarea {
  margin-top: 5px;
  padding: 8px 10px;
}

.fortunes-form textarea {
  min-height: 66px;
}

.fortunes-form button {
  min-height: 38px;
  padding: 0 16px;
}

.fortunes-table th,
.fortunes-table td {
  padding: 8px 8px;
}

.dashboard-chart-panel {
  overflow: hidden;
}

.dashboard-chart-panel .section-title {
  margin-bottom: 12px;
}

.chart-summary {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  color: #6b5441;
  font-size: 14px;
  font-weight: 800;
}

.chart-summary span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.chart-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.chart-dot.visit {
  background: #2f7d68;
}

.chart-dot.draw {
  background: #c43d35;
}

.chart-wrap {
  position: relative;
  width: 100%;
  min-height: 260px;
  border: 1px solid #ead8bd;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.9), rgba(246, 234, 211, 0.35));
  padding: 10px;
  cursor: crosshair;
}

.chart-wrap canvas {
  display: block;
  width: 100%;
}

.chart-corner-legend {
  position: absolute;
  right: 14px;
  bottom: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: calc(100% - 28px);
  padding: 5px 8px;
  border: 1px solid rgba(157, 51, 44, 0.12);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.88);
  color: #80624b;
  font-size: 11px;
  font-weight: 800;
  pointer-events: none;
}

.chart-corner-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.chart-corner-legend .chart-dot {
  width: 7px;
  height: 7px;
}

.chart-tooltip {
  position: absolute;
  z-index: 2;
  min-width: 136px;
  display: none;
  padding: 10px 12px;
  border: 1px solid rgba(157, 51, 44, 0.18);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.96);
  color: #251711;
  box-shadow: 0 14px 34px rgba(37, 23, 17, 0.16);
  pointer-events: none;
}

.chart-tooltip.is-open {
  display: grid;
  gap: 6px;
}

.chart-tooltip strong,
.chart-tooltip span {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 900;
}

.compact-form {
  grid-template-columns: minmax(220px, 320px) minmax(220px, 320px) 180px;
  align-items: end;
}

.compact-form label {
  margin-bottom: 0;
}

.form-action {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding-bottom: 0;
}

.form-action.centered {
  justify-content: center;
}

.form-action button {
  width: auto;
  white-space: nowrap;
}

.row-check {
  width: 18px;
  height: 18px;
  margin: 0;
}

.pager {
  display: flex;
  gap: 16px;
  margin-top: 18px;
}

pre {
  overflow: auto;
  padding: 14px;
  border-radius: 6px;
  background: #251711;
  color: #f7dfb0;
}

.theme-classic,
.theme-emerald,
.theme-ocean,
.theme-purple,
.theme-night,
.theme-celadon {
  background: var(--page-bg);
  color: var(--text);
}

.theme-classic {
  --page-bg: #f4f1eb;
  --panel-bg: #fff7e6;
  --sidebar-bg: #1c120f;
  --sidebar-text: #f7dfb0;
  --primary: #9d332c;
  --primary-hover: #852923;
  --secondary: #241914;
  --text: #251711;
  --muted: #80624b;
  --border: #ead8bd;
  --input-bg: #fffdf8;
  --success-bg: #e8f6df;
  --success-text: #2d6b24;
  --error-bg: #ffe8e3;
  --error-text: #9d332c;
}

.theme-emerald {
  --page-bg: #f2f7f4;
  --panel-bg: #ffffff;
  --sidebar-bg: #103b31;
  --sidebar-text: #d8eee5;
  --primary: #2f6f5e;
  --primary-hover: #285f51;
  --secondary: #c14b3a;
  --text: #1e2a25;
  --muted: #66736d;
  --border: #dfe8e3;
  --input-bg: #fbfcfa;
  --success-bg: #e9f7ef;
  --success-text: #246a42;
  --error-bg: #fff0ec;
  --error-text: #a83f31;
}

.theme-ocean {
  --page-bg: #f1f6fb;
  --panel-bg: #ffffff;
  --sidebar-bg: #12324a;
  --sidebar-text: #d7ecff;
  --primary: #2563a5;
  --primary-hover: #1f5288;
  --secondary: #0f766e;
  --text: #172a3a;
  --muted: #5f7182;
  --border: #d9e5ef;
  --input-bg: #fbfdff;
  --success-bg: #e7f6ef;
  --success-text: #20724b;
  --error-bg: #fff0ed;
  --error-text: #b54834;
}

.theme-purple {
  --page-bg: #f7f4f8;
  --panel-bg: #ffffff;
  --sidebar-bg: #35213f;
  --sidebar-text: #eadcf0;
  --primary: #7b4b8f;
  --primary-hover: #663d78;
  --secondary: #b95f45;
  --text: #2b2330;
  --muted: #75637d;
  --border: #e8ddeb;
  --input-bg: #fffafd;
  --success-bg: #edf7ea;
  --success-text: #3e7432;
  --error-bg: #fff0ec;
  --error-text: #a84937;
}

.theme-night {
  --page-bg: #111827;
  --panel-bg: #1f2937;
  --sidebar-bg: #030712;
  --sidebar-text: #d1d5db;
  --primary: #d97706;
  --primary-hover: #b45309;
  --secondary: #2563eb;
  --text: #f3f4f6;
  --muted: #aeb7c4;
  --border: #374151;
  --input-bg: #111827;
  --success-bg: #123524;
  --success-text: #8fe3b1;
  --error-bg: #421a1a;
  --error-text: #ffb4a8;
}

.theme-celadon {
  --page-bg: #f4f8f7;
  --panel-bg: #ffffff;
  --sidebar-bg: #304842;
  --sidebar-text: #e2f1ee;
  --primary: #5d8379;
  --primary-hover: #4c6f66;
  --secondary: #916f4f;
  --text: #23302d;
  --muted: #687a76;
  --border: #dce8e5;
  --input-bg: #fbfdfc;
  --success-bg: #edf7ea;
  --success-text: #3d7136;
  --error-bg: #fff0eb;
  --error-text: #a9573f;
}

.theme-classic a,
.theme-emerald a,
.theme-ocean a,
.theme-purple a,
.theme-night a,
.theme-celadon a {
  color: var(--primary);
}

.theme-classic p,
.theme-emerald p,
.theme-ocean p,
.theme-purple p,
.theme-night p,
.theme-celadon p,
.theme-classic label,
.theme-emerald label,
.theme-ocean label,
.theme-purple label,
.theme-night label,
.theme-celadon label,
.theme-classic .color-field,
.theme-emerald .color-field,
.theme-ocean .color-field,
.theme-purple .color-field,
.theme-night .color-field,
.theme-celadon .color-field,
.theme-classic .field-label,
.theme-emerald .field-label,
.theme-ocean .field-label,
.theme-purple .field-label,
.theme-night .field-label,
.theme-celadon .field-label,
.theme-classic .small-text,
.theme-emerald .small-text,
.theme-ocean .small-text,
.theme-purple .small-text,
.theme-night .small-text,
.theme-celadon .small-text,
.theme-classic .stats span,
.theme-emerald .stats span,
.theme-ocean .stats span,
.theme-purple .stats span,
.theme-night .stats span,
.theme-celadon .stats span,
.theme-classic th,
.theme-emerald th,
.theme-ocean th,
.theme-purple th,
.theme-night th,
.theme-celadon th {
  color: var(--muted);
}

.theme-classic .login-card,
.theme-emerald .login-card,
.theme-ocean .login-card,
.theme-purple .login-card,
.theme-night .login-card,
.theme-celadon .login-card,
.theme-classic .install-card,
.theme-emerald .install-card,
.theme-ocean .install-card,
.theme-purple .install-card,
.theme-night .install-card,
.theme-celadon .install-card,
.theme-classic .panel,
.theme-emerald .panel,
.theme-ocean .panel,
.theme-purple .panel,
.theme-night .panel,
.theme-celadon .panel,
.theme-classic .stats div,
.theme-emerald .stats div,
.theme-ocean .stats div,
.theme-purple .stats div,
.theme-night .stats div,
.theme-celadon .stats div {
  background: var(--panel-bg);
  border-color: var(--border);
}

.theme-classic .sidebar,
.theme-emerald .sidebar,
.theme-ocean .sidebar,
.theme-purple .sidebar,
.theme-night .sidebar,
.theme-celadon .sidebar {
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
}

.theme-classic .sidebar a,
.theme-emerald .sidebar a,
.theme-ocean .sidebar a,
.theme-purple .sidebar a,
.theme-night .sidebar a,
.theme-celadon .sidebar a {
  color: var(--sidebar-text);
}

.theme-classic button,
.theme-emerald button,
.theme-ocean button,
.theme-purple button,
.theme-night button,
.theme-celadon button,
.theme-classic .button-link,
.theme-emerald .button-link,
.theme-ocean .button-link,
.theme-purple .button-link,
.theme-night .button-link,
.theme-celadon .button-link {
  background: var(--primary);
  color: #fff;
}

.theme-classic button:hover,
.theme-emerald button:hover,
.theme-ocean button:hover,
.theme-purple button:hover,
.theme-night button:hover,
.theme-celadon button:hover,
.theme-classic .button-link:hover,
.theme-emerald .button-link:hover,
.theme-ocean .button-link:hover,
.theme-purple .button-link:hover,
.theme-night .button-link:hover,
.theme-celadon .button-link:hover {
  background: var(--primary-hover);
}

.theme-classic .button-link.secondary,
.theme-emerald .button-link.secondary,
.theme-ocean .button-link.secondary,
.theme-purple .button-link.secondary,
.theme-night .button-link.secondary,
.theme-celadon .button-link.secondary {
  background: var(--secondary);
}

.theme-classic input,
.theme-emerald input,
.theme-ocean input,
.theme-purple input,
.theme-night input,
.theme-celadon input,
.theme-classic textarea,
.theme-emerald textarea,
.theme-ocean textarea,
.theme-purple textarea,
.theme-night textarea,
.theme-celadon textarea,
.theme-classic select,
.theme-emerald select,
.theme-ocean select,
.theme-purple select,
.theme-night select,
.theme-celadon select {
  background: var(--input-bg);
  border-color: var(--border);
  color: var(--text);
}

.theme-classic td,
.theme-emerald td,
.theme-ocean td,
.theme-purple td,
.theme-night td,
.theme-celadon td,
.theme-classic th,
.theme-emerald th,
.theme-ocean th,
.theme-purple th,
.theme-night th,
.theme-celadon th {
  border-bottom-color: var(--border);
}

.theme-classic .stats strong,
.theme-emerald .stats strong,
.theme-ocean .stats strong,
.theme-purple .stats strong,
.theme-night .stats strong,
.theme-celadon .stats strong {
  color: var(--primary);
}

.theme-classic .dashboard-gauges .gauge-card,
.theme-emerald .dashboard-gauges .gauge-card,
.theme-ocean .dashboard-gauges .gauge-card,
.theme-purple .dashboard-gauges .gauge-card,
.theme-night .dashboard-gauges .gauge-card,
.theme-celadon .dashboard-gauges .gauge-card {
  border-color: var(--border);
  background:
    radial-gradient(circle at center, var(--panel-bg) 0 45%, transparent 46%),
    conic-gradient(from 220deg, var(--primary) 0 calc(var(--gauge) * 1%), rgba(128, 98, 75, 0.22) 0 78%, transparent 78% 100%);
}

.theme-classic .gauge-label,
.theme-classic .gauge-unit,
.theme-emerald .gauge-label,
.theme-emerald .gauge-unit,
.theme-ocean .gauge-label,
.theme-ocean .gauge-unit,
.theme-purple .gauge-label,
.theme-purple .gauge-unit,
.theme-night .gauge-label,
.theme-night .gauge-unit,
.theme-celadon .gauge-label,
.theme-celadon .gauge-unit {
  color: var(--muted);
}

.theme-classic .dashboard-gauges .gauge-card::after,
.theme-emerald .dashboard-gauges .gauge-card::after,
.theme-ocean .dashboard-gauges .gauge-card::after,
.theme-purple .dashboard-gauges .gauge-card::after,
.theme-night .dashboard-gauges .gauge-card::after,
.theme-celadon .dashboard-gauges .gauge-card::after {
  background: var(--text);
}

.theme-classic .chart-tooltip,
.theme-emerald .chart-tooltip,
.theme-ocean .chart-tooltip,
.theme-purple .chart-tooltip,
.theme-night .chart-tooltip,
.theme-celadon .chart-tooltip {
  border-color: var(--border);
  background: var(--panel-bg);
  color: var(--text);
}

.theme-classic .chart-corner-legend,
.theme-emerald .chart-corner-legend,
.theme-ocean .chart-corner-legend,
.theme-purple .chart-corner-legend,
.theme-night .chart-corner-legend,
.theme-celadon .chart-corner-legend {
  border-color: var(--border);
  background: var(--panel-bg);
  color: var(--muted);
}

.theme-classic .notice.success,
.theme-emerald .notice.success,
.theme-ocean .notice.success,
.theme-purple .notice.success,
.theme-night .notice.success,
.theme-celadon .notice.success,
.theme-classic .badge,
.theme-emerald .badge,
.theme-ocean .badge,
.theme-purple .badge,
.theme-night .badge,
.theme-celadon .badge {
  background: var(--success-bg);
  color: var(--success-text);
}

.theme-classic .notice.error,
.theme-emerald .notice.error,
.theme-ocean .notice.error,
.theme-purple .notice.error,
.theme-night .notice.error,
.theme-celadon .notice.error,
.theme-classic .badge.off,
.theme-emerald .badge.off,
.theme-ocean .badge.off,
.theme-purple .badge.off,
.theme-night .badge.off,
.theme-celadon .badge.off {
  background: var(--error-bg);
  color: var(--error-text);
}

.theme-classic pre,
.theme-emerald pre,
.theme-ocean pre,
.theme-purple pre,
.theme-night pre,
.theme-celadon pre {
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
}

.theme-classic .sidebar-toggle,
.theme-emerald .sidebar-toggle,
.theme-ocean .sidebar-toggle,
.theme-purple .sidebar-toggle,
.theme-night .sidebar-toggle,
.theme-celadon .sidebar-toggle {
  background: rgba(255, 255, 255, 0.04);
  color: var(--sidebar-text);
}

.theme-classic .sidebar-section.is-open .sidebar-toggle,
.theme-emerald .sidebar-section.is-open .sidebar-toggle,
.theme-ocean .sidebar-section.is-open .sidebar-toggle,
.theme-purple .sidebar-section.is-open .sidebar-toggle,
.theme-night .sidebar-section.is-open .sidebar-toggle,
.theme-celadon .sidebar-section.is-open .sidebar-toggle {
  background: rgba(255, 255, 255, 0.11);
}

.theme-classic .sidebar-toggle:hover,
.theme-emerald .sidebar-toggle:hover,
.theme-ocean .sidebar-toggle:hover,
.theme-purple .sidebar-toggle:hover,
.theme-night .sidebar-toggle:hover,
.theme-celadon .sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
}

.theme-classic .color-picker-trigger,
.theme-emerald .color-picker-trigger,
.theme-ocean .color-picker-trigger,
.theme-purple .color-picker-trigger,
.theme-night .color-picker-trigger,
.theme-celadon .color-picker-trigger {
  background: var(--input-bg);
  border: 1px solid var(--border);
  color: var(--text);
}

.theme-classic .color-picker-trigger:hover,
.theme-emerald .color-picker-trigger:hover,
.theme-ocean .color-picker-trigger:hover,
.theme-purple .color-picker-trigger:hover,
.theme-night .color-picker-trigger:hover,
.theme-celadon .color-picker-trigger:hover {
  background: var(--input-bg);
  color: var(--text);
}

.theme-classic .admin-modal__panel,
.theme-emerald .admin-modal__panel,
.theme-ocean .admin-modal__panel,
.theme-purple .admin-modal__panel,
.theme-night .admin-modal__panel,
.theme-celadon .admin-modal__panel {
  background: var(--panel-bg);
  color: var(--text);
}

body[class*="theme-"] {
  --page-bg: #f5f1e8;
  --page-bg-soft: #fbf7ef;
  --panel-bg: #fffaf0;
  --panel-strong: #fffdf8;
  --sidebar-bg: #17100d;
  --sidebar-text: #f8e7bf;
  --sidebar-muted: rgba(248, 231, 191, 0.66);
  --primary: #9d332c;
  --primary-hover: #842822;
  --secondary: #1f1713;
  --accent: #b48a45;
  --text: #241914;
  --muted: #7c6a59;
  --border: #e7d6b8;
  --input-bg: #fffdf8;
  --success-bg: #e8f3e7;
  --success-text: #2c6740;
  --error-bg: #fae7e2;
  --error-text: #9d332c;
  --shadow: 0 18px 48px rgba(42, 31, 23, 0.08);
  --shadow-strong: 0 28px 70px rgba(28, 18, 15, 0.16);
  --topbar-bg: rgba(255, 250, 240, 0.84);
  --surface-tint: rgba(180, 138, 69, 0.1);
  --chart-grid: rgba(124, 106, 89, 0.18);
  --chart-visit: #2f7d68;
  --chart-draw: #b83a31;
  background:
    linear-gradient(135deg, var(--page-bg) 0%, var(--page-bg-soft) 48%, var(--page-bg) 100%);
  color: var(--text);
  letter-spacing: 0;
}

.theme-classic {
  --page-bg: #f1eadc;
  --page-bg-soft: #fbf4e5;
  --panel-bg: #fff7e6;
  --panel-strong: #fffdf6;
  --sidebar-bg: #19110e;
  --sidebar-text: #f7dfb0;
  --sidebar-muted: rgba(247, 223, 176, 0.68);
  --primary: #9d332c;
  --primary-hover: #842822;
  --secondary: #231713;
  --accent: #b88a38;
  --text: #251711;
  --muted: #80624b;
  --border: #e6d0a9;
  --input-bg: #fffdf8;
  --surface-tint: rgba(184, 138, 56, 0.12);
  --chart-visit: #2f7d68;
  --chart-draw: #c43d35;
}

.theme-emerald {
  --page-bg: #eef4ee;
  --page-bg-soft: #fbfcf8;
  --panel-bg: #ffffff;
  --panel-strong: #f8fbf7;
  --sidebar-bg: #102a24;
  --sidebar-text: #dbeee4;
  --sidebar-muted: rgba(219, 238, 228, 0.66);
  --primary: #2f6f5e;
  --primary-hover: #275c4f;
  --secondary: #202725;
  --accent: #b99755;
  --text: #1d2b26;
  --muted: #64736d;
  --border: #d8e4df;
  --input-bg: #fbfdfb;
  --surface-tint: rgba(47, 111, 94, 0.1);
  --chart-visit: #28735f;
  --chart-draw: #bb4b3d;
}

.theme-night {
  --page-bg: #111217;
  --page-bg-soft: #19191f;
  --panel-bg: #1d1d23;
  --panel-strong: #232329;
  --sidebar-bg: #08090d;
  --sidebar-text: #f0dfbd;
  --sidebar-muted: rgba(240, 223, 189, 0.62);
  --primary: #c7933d;
  --primary-hover: #aa7829;
  --secondary: #7f2f2b;
  --accent: #d2aa5d;
  --text: #f4efe6;
  --muted: #b9afa0;
  --border: #363236;
  --input-bg: #15161b;
  --success-bg: #173429;
  --success-text: #9ee2bd;
  --error-bg: #3d1e1d;
  --error-text: #ffb7ab;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  --shadow-strong: 0 28px 80px rgba(0, 0, 0, 0.38);
  --topbar-bg: rgba(29, 29, 35, 0.86);
  --surface-tint: rgba(199, 147, 61, 0.1);
  --chart-grid: rgba(244, 239, 230, 0.12);
  --chart-visit: #62b894;
  --chart-draw: #d35f54;
}

.theme-celadon {
  --page-bg: #f4f0e8;
  --page-bg-soft: #fffcf5;
  --panel-bg: #fffaf0;
  --panel-strong: #ffffff;
  --sidebar-bg: #2b3430;
  --sidebar-text: #f3e7cf;
  --sidebar-muted: rgba(243, 231, 207, 0.66);
  --primary: #8f3930;
  --primary-hover: #762d26;
  --secondary: #33302a;
  --accent: #c5a05a;
  --text: #2b241d;
  --muted: #766b5f;
  --border: #e4d7be;
  --input-bg: #fffdf8;
  --surface-tint: rgba(197, 160, 90, 0.12);
  --chart-visit: #668879;
  --chart-draw: #b84a3f;
}

.theme-ocean {
  --page-bg: #f6f5f1;
  --page-bg-soft: #ffffff;
  --panel-bg: #ffffff;
  --panel-strong: #fbfbf8;
  --sidebar-bg: #101010;
  --sidebar-text: #f4ead6;
  --sidebar-muted: rgba(244, 234, 214, 0.62);
  --primary: #141414;
  --primary-hover: #2c2c2c;
  --secondary: #9a302a;
  --accent: #b39558;
  --text: #181818;
  --muted: #6d6a64;
  --border: #e4e0d6;
  --input-bg: #fcfbf7;
  --surface-tint: rgba(179, 149, 88, 0.08);
  --chart-visit: #3f7063;
  --chart-draw: #a83d35;
}

.theme-purple {
  --page-bg: #f2e9dd;
  --page-bg-soft: #fff7ea;
  --panel-bg: #fff8e9;
  --panel-strong: #fffdf5;
  --sidebar-bg: #271110;
  --sidebar-text: #f6dfb7;
  --sidebar-muted: rgba(246, 223, 183, 0.64);
  --primary: #9b2f2b;
  --primary-hover: #7f2623;
  --secondary: #32201c;
  --accent: #c29849;
  --text: #2c1814;
  --muted: #7b5f4d;
  --border: #e7cfab;
  --input-bg: #fffdf7;
  --surface-tint: rgba(155, 47, 43, 0.1);
  --chart-visit: #637f68;
  --chart-draw: #ad342f;
}

body[class*="theme-"] a {
  color: var(--primary);
}

body[class*="theme-"] h1,
body[class*="theme-"] h2,
body[class*="theme-"] h3 {
  color: var(--text);
  font-weight: 900;
}

body[class*="theme-"] p,
body[class*="theme-"] label,
body[class*="theme-"] .color-field,
body[class*="theme-"] .field-label,
body[class*="theme-"] .small-text,
body[class*="theme-"] .stats span,
body[class*="theme-"] th,
body[class*="theme-"] .section-title p,
body[class*="theme-"] .section-help {
  color: var(--muted);
}

body[class*="theme-"] .sidebar {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 30%),
    var(--sidebar-bg);
  color: var(--sidebar-text);
  box-shadow: 18px 0 46px rgba(0, 0, 0, 0.12);
}

body[class*="theme-"] .sidebar h1 {
  color: var(--sidebar-text);
  letter-spacing: 0;
}

body[class*="theme-"] .sidebar h1::after {
  content: "";
  display: block;
  width: 42px;
  height: 2px;
  margin-top: 14px;
  border-radius: 999px;
  background: var(--accent);
}

body[class*="theme-"] .sidebar a {
  color: var(--sidebar-muted);
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

body[class*="theme-"] .sidebar a:hover,
body[class*="theme-"] .sidebar a.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--sidebar-text);
}

body[class*="theme-"] .sidebar a.active {
  box-shadow: inset 3px 0 0 var(--accent);
}

body[class*="theme-"] .sidebar-toggle {
  background: rgba(255, 255, 255, 0.055);
  color: var(--sidebar-text);
}

body[class*="theme-"] .sidebar-section.is-open .sidebar-toggle,
body[class*="theme-"] .sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
}

body[class*="theme-"] .sidebar-submenu a {
  border-left-color: rgba(255, 255, 255, 0.12);
}

body[class*="theme-"] .sidebar-section {
  margin-bottom: 14px;
}

body[class*="theme-"] .sidebar-submenu {
  max-height: none;
  opacity: 1;
  transform: none;
}

body[class*="theme-"] .sidebar-toggle {
  min-height: 30px;
  padding: 0 8px;
  background: transparent;
  color: var(--sidebar-muted);
  font-size: 12px;
  letter-spacing: 0;
}

body[class*="theme-"] .sidebar-toggle::after {
  display: none;
}

body[class*="theme-"] .sidebar-section.is-open .sidebar-toggle,
body[class*="theme-"] .sidebar-toggle:hover {
  background: transparent;
}

body[class*="theme-"] .sidebar-submenu a {
  margin: 5px 0;
  padding: 10px 12px;
  border-left: 0;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: -10px 0 24px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--topbar-bg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.layout-topnav .admin-topbar {
  top: 76px;
}

.admin-topbar__title {
  min-width: 0;
}

.admin-topbar__title span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-topbar__title strong {
  display: block;
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
}

.admin-topbar__meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-topbar__meta span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-left: 1px solid var(--border);
}

body[class*="theme-"] .panel,
body[class*="theme-"] .login-card,
body[class*="theme-"] .install-card,
body[class*="theme-"] .stats div {
  border: 1px solid var(--border);
  background: var(--panel-bg);
  box-shadow: var(--shadow);
}

body[class*="theme-"] .panel {
  position: relative;
}

body[class*="theme-"] .panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, var(--accent), transparent 42%, var(--primary));
  opacity: 0.36;
}

body[class*="theme-"] .section-title {
  border-bottom-color: var(--border);
}

body[class*="theme-"] .stats strong,
body[class*="theme-"] .dashboard-gauges .gauge-card strong {
  color: var(--primary);
}

body[class*="theme-"] .dashboard-gauges .gauge-card {
  border-color: var(--border);
  background:
    radial-gradient(circle at center, var(--panel-bg) 0 45%, transparent 46%),
    conic-gradient(from 220deg, var(--primary) 0 calc(var(--gauge) * 1%), color-mix(in srgb, var(--accent) 28%, transparent) 0 78%, transparent 78% 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24), var(--shadow);
}

body[class*="theme-"] .dashboard-gauges .gauge-card::before {
  border-color: color-mix(in srgb, var(--primary) 20%, transparent);
}

body[class*="theme-"] .dashboard-gauges .gauge-card::after {
  background: var(--text);
}

body[class*="theme-"] input,
body[class*="theme-"] textarea,
body[class*="theme-"] select {
  border-color: var(--border);
  background: var(--input-bg);
  color: var(--text);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

body[class*="theme-"] input:focus,
body[class*="theme-"] textarea:focus,
body[class*="theme-"] select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent);
}

body[class*="theme-"] button,
body[class*="theme-"] .button-link {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--primary) 18%, transparent);
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

body[class*="theme-"] button:hover,
body[class*="theme-"] .button-link:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

body[class*="theme-"] .button-link.secondary {
  background: var(--secondary);
}

body[class*="theme-"] table {
  overflow: hidden;
  border-radius: 8px;
}

body[class*="theme-"] th,
body[class*="theme-"] td {
  border-bottom-color: var(--border);
}

body[class*="theme-"] th {
  background: var(--surface-tint);
  font-size: 13px;
  font-weight: 900;
}

body[class*="theme-"] tbody tr:hover td {
  background: color-mix(in srgb, var(--primary) 5%, transparent);
}

body[class*="theme-"] .badge,
body[class*="theme-"] .notice.success {
  background: var(--success-bg);
  color: var(--success-text);
}

body[class*="theme-"] .badge.off,
body[class*="theme-"] .notice.error {
  background: var(--error-bg);
  color: var(--error-text);
}

body[class*="theme-"] .config-anchor-nav {
  border-color: var(--border);
  background: var(--topbar-bg);
  box-shadow: var(--shadow);
}

body[class*="theme-"] .config-anchor-nav a {
  background: var(--surface-tint);
  color: var(--primary);
}

body[class*="theme-"] .config-anchor-nav a:hover {
  background: color-mix(in srgb, var(--primary) 12%, var(--surface-tint));
}

body[class*="theme-"] .switch-check,
body[class*="theme-"] .color-picker-trigger,
body[class*="theme-"] .chart-wrap {
  border-color: var(--border);
  background: var(--panel-strong);
  color: var(--text);
}

body[class*="theme-"] .switch-check input {
  accent-color: var(--primary);
}

body[class*="theme-"] .chart-wrap {
  background:
    linear-gradient(180deg, var(--panel-strong), color-mix(in srgb, var(--surface-tint) 68%, transparent));
}

body[class*="theme-"] .chart-dot.visit {
  background: var(--chart-visit);
}

body[class*="theme-"] .chart-dot.draw {
  background: var(--chart-draw);
}

body[class*="theme-"] .chart-corner-legend,
body[class*="theme-"] .chart-tooltip,
body[class*="theme-"] .admin-modal__panel {
  border-color: var(--border);
  background: var(--panel-bg);
  color: var(--text);
}

body[class*="theme-"] .config-submit-bar {
  border-top-color: var(--border);
  background: var(--topbar-bg);
}

body[class*="theme-"] pre {
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
}

body[class*="theme-"] .danger-button {
  background: var(--error-text);
}

body[class*="theme-"] .danger-link {
  color: var(--error-text);
}

.dashboard-heading {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.dashboard-date-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-bg);
  color: var(--muted);
  font-weight: 800;
}

.dashboard-gauges {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 18px;
}

body[class*="theme-"] .dashboard-gauges .gauge-card {
  min-height: 120px;
  display: grid;
  grid-template-columns: 56px 1fr;
  grid-template-areas:
    "icon label"
    "icon value"
    "icon unit";
  place-items: initial;
  align-content: center;
  gap: 4px 14px;
  padding: 22px;
  overflow: hidden;
  text-align: left;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--panel-bg), var(--panel-strong));
  box-shadow: var(--shadow);
}

body[class*="theme-"] .dashboard-gauges .gauge-card::before,
body[class*="theme-"] .dashboard-gauges .gauge-card::after {
  display: none;
}

.metric-icon {
  grid-area: icon;
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.45), transparent 34%),
    var(--primary);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2), 0 10px 24px color-mix(in srgb, var(--primary) 22%, transparent);
}

.gauge-label {
  grid-area: label;
}

body[class*="theme-"] .dashboard-gauges .gauge-card strong {
  grid-area: value;
  margin: 0;
  color: var(--text);
  font-size: 28px;
  letter-spacing: 0;
}

.gauge-unit {
  grid-area: unit;
}

.gauge-unit b {
  color: var(--primary);
}

.dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.75fr);
  gap: 24px;
  margin-bottom: 22px;
}

.dashboard-bottom-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 22px;
}

.dashboard-side-stack {
  display: grid;
  gap: 18px;
  align-content: start;
}

.dashboard-chart-panel,
.dashboard-config-panel,
.dashboard-records-panel,
.dashboard-actions-panel,
.dashboard-notice-panel {
  margin-bottom: 0;
}

.dashboard-chart-panel .section-title,
.dashboard-config-panel .section-title,
.dashboard-records-panel .section-title,
.dashboard-notice-panel .section-title {
  align-items: center;
}

.dashboard-chart-panel .section-title a,
.dashboard-config-panel .section-title a,
.dashboard-records-panel .section-title a,
.dashboard-notice-panel .section-title a {
  font-size: 13px;
  font-weight: 900;
}

.config-list {
  display: grid;
}

.config-list a {
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 0 4px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.config-list a:last-child {
  border-bottom: 0;
}

.config-list span {
  color: var(--muted);
  font-weight: 800;
}

.config-list strong {
  color: var(--text);
  font-weight: 900;
}

.quick-action-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.quick-action-grid a {
  min-height: 82px;
  display: grid;
  place-items: center;
  gap: 7px;
  padding: 12px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--text);
  text-align: center;
}

.quick-action-grid span {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
}

.quick-action-grid strong {
  font-size: 13px;
}

.dashboard-notice-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dashboard-notice-panel li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 9px 0;
  color: var(--muted);
  font-size: 13px;
}

.dashboard-notice-panel li::before {
  content: "";
  width: 5px;
  height: 5px;
  align-self: center;
  border-radius: 50%;
  background: var(--primary);
}

.dashboard-notice-panel li {
  grid-template-columns: 8px minmax(0, 1fr) auto;
}

.dashboard-notice-panel li span {
  color: var(--text);
}

.dashboard-notice-panel time {
  color: var(--muted);
}

.dashboard-records-panel table {
  font-size: 13px;
}

.dashboard-records-panel td,
.dashboard-records-panel th {
  padding: 11px 10px;
}

.theme-classic .dashboard-gauges .gauge-card,
.theme-celadon .dashboard-gauges .gauge-card,
.theme-purple .dashboard-gauges .gauge-card {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.68), transparent 42%),
    var(--panel-bg);
}

.theme-classic .sidebar,
.theme-night .sidebar,
.theme-ocean .sidebar,
.theme-purple .sidebar {
  background:
    linear-gradient(180deg, rgba(180, 138, 69, 0.12), transparent 26%),
    radial-gradient(circle at 50% 88%, rgba(180, 138, 69, 0.16), transparent 34%),
    var(--sidebar-bg);
}

.theme-classic .sidebar h1,
.theme-celadon .sidebar h1,
.theme-purple .sidebar h1 {
  font-size: 28px;
}

.theme-emerald .admin-topbar {
  margin-top: -18px;
}

.theme-emerald .dashboard-gauges .gauge-card {
  border-color: rgba(47, 111, 94, 0.14);
}

.theme-emerald .metric-icon {
  border-radius: 10px;
  background: color-mix(in srgb, var(--primary) 16%, #fff);
  color: var(--primary);
  box-shadow: none;
}

.theme-night .main {
  background:
    radial-gradient(circle at 48% 42%, rgba(199, 147, 61, 0.06), transparent 34%),
    var(--page-bg);
}

.theme-night .dashboard-heading,
.theme-night .admin-topbar {
  border-color: rgba(210, 170, 93, 0.22);
}

.theme-night .dashboard-gauges .gauge-card,
.theme-night .panel {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 36%),
    var(--panel-bg);
}

.theme-night .metric-icon,
.theme-purple .metric-icon {
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.32), transparent 34%),
    linear-gradient(145deg, var(--primary), var(--accent));
  color: #fff8dc;
}

.theme-celadon .sidebar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 250, 240, 0.86)),
    var(--page-bg);
  color: var(--text);
}

.theme-celadon .sidebar h1,
.theme-celadon .sidebar a,
.theme-celadon .sidebar-toggle {
  color: var(--text);
}

.theme-celadon .sidebar a:hover,
.theme-celadon .sidebar a.active,
.theme-celadon .sidebar-section.is-open .sidebar-toggle,
.theme-celadon .sidebar-toggle:hover {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
}

.theme-ocean .dashboard-gauges .gauge-card,
.theme-ocean .panel {
  box-shadow: none;
}

.theme-ocean .metric-icon {
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  box-shadow: none;
}

.theme-purple .sidebar {
  border-right-color: rgba(194, 152, 73, 0.26);
  background:
    radial-gradient(circle at 50% 8%, rgba(155, 47, 43, 0.42), transparent 38%),
    linear-gradient(180deg, #4a160f, #11110f 32%, #141412);
}

.theme-purple .sidebar a.active,
.theme-purple .sidebar-section.is-open .sidebar-toggle {
  background: linear-gradient(135deg, var(--primary), #671d19);
  color: #fff2cf;
  box-shadow: inset 0 0 0 1px rgba(194, 152, 73, 0.38);
}

@media (max-width: 800px) {
  .sidebar {
    position: static;
    width: auto;
    max-height: 48vh;
  }

  .main {
    margin-left: 0;
    padding: 20px;
  }

  .admin-topbar {
    position: static;
    display: block;
    margin-top: 0;
  }

  .admin-topbar__meta {
    margin: 12px 0 0;
  }

  .stats,
  .grid-form,
  .compact-form,
  .two-col,
  .dashboard-gauges,
  .dashboard-main-grid,
  .dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }

  body[class*="theme-"] .dashboard-gauges .gauge-card {
    grid-template-columns: 52px 1fr;
  }

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

  .form-action {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .page-heading,
  .section-title {
    display: block;
  }

  .config-anchor-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    top: 0;
  }

  .config-anchor-nav a {
    flex: 0 0 auto;
  }

  .config-submit-bar {
    margin: 0 -20px -20px;
    padding: 12px 20px;
  }

  .config-submit-bar button {
    width: 100%;
  }
}

/* Final precedence: selected concept 4 is the only active backend UI. */
.admin-heritage {
  --page-bg: #fbf7ef;
  --panel-bg: #fffdf8;
  --panel-strong: #fffaf2;
  --sidebar-bg: #f8f1e6;
  --primary: #c43d35;
  --primary-hover: #a8322c;
  --accent: #c2954e;
  --secondary: #c2954e;
  --text: #2b221b;
  --muted: #7c7066;
  --border: #ead9be;
  --input-bg: #fffdf8;
  --success-bg: #edf6e8;
  --success-text: #357147;
  --error-bg: #fbe9e5;
  --error-text: #c43d35;
  --chart-grid: rgba(124, 112, 102, 0.18);
  --chart-visit: #c2954e;
  --chart-draw: #c43d35;
  background: #fbf7ef;
  color: var(--text);
}

.admin-heritage .sidebar {
  width: 220px;
  padding: 22px 12px 18px;
  border-right: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255, 249, 239, 0.88) 0%, rgba(251, 241, 227, 0.78) 58%, rgba(245, 234, 216, 0.62) 100%),
    linear-gradient(180deg, #fff9ef 0%, #fbf1e3 56%, #f5ead8 100%);
  color: var(--text);
  box-shadow: none;
  overflow: hidden;
}

.admin-heritage .brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 8px 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(194, 149, 78, 0.28);
}

.admin-heritage .brand-seal {
  width: 52px;
  height: 52px;
  display: block;
  flex: 0 0 auto;
  border: 1px solid rgba(196, 61, 53, 0.22);
  border-radius: 50%;
  object-fit: cover;
  background: #fffdf8;
  box-shadow: 0 8px 18px rgba(142, 47, 39, 0.12);
}

.admin-heritage .sidebar h1 {
  margin: 0;
  color: #1f1712;
  font-size: 29px;
  font-weight: 900;
}

.admin-heritage .sidebar h1::after {
  display: none;
}

.admin-heritage .brand-lockup p {
  margin: 2px 0 0;
  color: #8a7460;
  font-size: 13px;
  letter-spacing: 2px;
}

.admin-heritage .sidebar-section {
  margin-bottom: 10px;
}

.admin-heritage .sidebar-toggle,
.admin-heritage .sidebar-section.is-open .sidebar-toggle,
.admin-heritage .sidebar-toggle:hover {
  min-height: 28px;
  padding: 0 10px;
  background: transparent;
  color: #9a826a;
  font-size: 12px;
  font-weight: 800;
  box-shadow: none;
}

.admin-heritage .sidebar-toggle::after {
  display: none;
}

.admin-heritage .sidebar-submenu {
  max-height: none;
  opacity: 1;
  transform: none;
}

.admin-heritage .sidebar-submenu a,
.admin-heritage .sidebar a {
  min-height: 48px;
  display: flex;
  align-items: center;
  margin: 4px 0;
  padding: 0 18px;
  border: 1px solid transparent;
  border-left: 0;
  border-radius: 6px;
  color: #4b4038;
  font-size: 15px;
  font-weight: 900;
}

.admin-heritage .sidebar a:hover {
  background: rgba(196, 61, 53, 0.08);
  color: var(--primary);
}

.admin-heritage .sidebar a.active {
  border-color: rgba(196, 61, 53, 0.3);
  background: linear-gradient(90deg, var(--primary), #b5322c);
  color: #fffaf2;
  box-shadow: 0 10px 24px rgba(196, 61, 53, 0.18);
}

.admin-heritage .sidebar-nav {
  display: grid;
  gap: 4px;
}

.admin-heritage .sidebar-landscape-bg {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 72px;
  z-index: 0;
  width: 100%;
  height: 270px;
  object-fit: cover;
  object-position: center bottom;
  opacity: 0.86;
  pointer-events: none;
}

.admin-heritage .sidebar-user {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  min-height: 46px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid rgba(128, 98, 75, 0.28);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.96);
  color: #24170f;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(72, 45, 26, 0.08);
}

.admin-heritage .user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(194, 149, 78, 0.45);
  background:
    radial-gradient(circle at 50% 35%, #8e7a63 0 22%, transparent 23%),
    radial-gradient(circle at 50% 82%, #8e7a63 0 34%, transparent 35%),
    #e9dcc7;
}

.admin-heritage .sidebar-user strong {
  display: block;
  color: #1f120c;
  font-size: 13px;
  line-height: 1.1;
}

.admin-heritage .sidebar-user p {
  margin: 2px 0 0;
  color: #5d4637;
  font-size: 11px;
  line-height: 1.1;
}

.admin-heritage .sidebar-user:hover strong {
  color: var(--primary);
}

.admin-heritage .user-caret {
  color: #3d2c22;
  font-size: 14px;
}

.admin-heritage .main {
  margin-left: 220px;
  padding: 22px 28px 38px;
}

.admin-heritage .admin-topbar {
  position: sticky;
  top: 0;
  z-index: 6;
  min-height: 58px;
  margin: -22px -28px 24px;
  padding: 0 28px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: none;
}

.admin-heritage .admin-topbar__title strong {
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
}

.admin-heritage .admin-topbar__title span {
  display: none;
}

.admin-heritage .admin-topbar__meta {
  margin-left: auto;
  color: #4f453d;
  font-size: 14px;
}

.admin-heritage .admin-topbar__meta span {
  border-left: 1px solid var(--border);
}

.admin-heritage .admin-account-menu {
  position: relative;
  margin-left: 2px;
}

.admin-heritage .admin-account-button {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border: 1px solid rgba(128, 98, 75, 0.34);
  border-radius: 6px;
  background: #ffffff;
  color: #2b1d15;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: none;
}

.admin-heritage .admin-account-button b {
  color: #8a7460;
  font-size: 15px;
  line-height: 1;
}

.admin-heritage .admin-account-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  width: 132px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fffdf8;
  box-shadow: 0 18px 36px rgba(72, 45, 26, 0.14);
}

.admin-heritage .admin-account-dropdown a {
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 5px;
  color: #4f453d;
  font-size: 13px;
  font-weight: 800;
}

.admin-heritage .admin-account-dropdown a:hover {
  background: rgba(196, 61, 53, 0.08);
  color: var(--primary);
}

.admin-heritage .panel,
.admin-heritage .stats div,
.admin-heritage .login-card,
.admin-heritage .install-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: none;
}

.admin-heritage .panel::before {
  display: none;
}

.admin-heritage h2 {
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
}

.admin-heritage h3 {
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
}

.admin-heritage p,
.admin-heritage label,
.admin-heritage .small-text,
.admin-heritage th,
.admin-heritage .section-help,
.admin-heritage .section-title p {
  color: var(--muted);
}

.admin-heritage .dashboard-heading {
  align-items: center;
  margin-bottom: 22px;
  padding-bottom: 0;
  border-bottom: 0;
}

.admin-heritage .dashboard-heading h2 {
  margin-bottom: 8px;
  font-size: 23px;
}

.admin-heritage .dashboard-date-pill {
  min-height: 38px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel-bg);
  color: #5b5048;
}

.admin-heritage .dashboard-gauges {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 22px;
  margin-bottom: 24px;
}

.admin-heritage .dashboard-gauges .gauge-card {
  min-height: 128px;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  grid-template-areas:
    "icon label"
    "icon value"
    "icon unit";
  align-content: center;
  gap: 5px 16px;
  padding: 22px 20px;
  background: linear-gradient(180deg, #fffdf8, #fffaf2);
}

.admin-heritage .dashboard-gauges .gauge-card::before,
.admin-heritage .dashboard-gauges .gauge-card::after {
  display: none;
}

.admin-heritage .metric-icon {
  grid-area: icon;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(194, 149, 78, 0.32);
  border-radius: 50%;
  background: linear-gradient(145deg, #d8b66f, #bf8d3d);
  color: #fff;
  font-size: 18px;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.16);
}

.admin-heritage .dashboard-gauges .gauge-card:nth-child(1) .metric-icon,
.admin-heritage .dashboard-gauges .gauge-card:nth-child(4) .metric-icon {
  background: linear-gradient(145deg, #d45147, #bd342e);
}

.admin-heritage .gauge-label {
  grid-area: label;
  color: #7a6e64;
  font-size: 14px;
}

.admin-heritage .dashboard-gauges .gauge-card strong {
  grid-area: value;
  color: #211811;
  font-size: 29px;
  font-weight: 500;
  line-height: 1;
}

.admin-heritage .gauge-unit {
  grid-area: unit;
  color: #8a7d70;
  font-size: 13px;
}

.admin-heritage .gauge-unit b {
  color: var(--primary);
}

.admin-heritage .dashboard-main-grid {
  grid-template-columns: minmax(0, 1.18fr) minmax(380px, 0.82fr);
  gap: 24px;
  margin-bottom: 24px;
}

.admin-heritage .dashboard-bottom-grid {
  grid-template-columns: 274px minmax(0, 1fr);
  gap: 24px;
}

.admin-heritage .section-title {
  margin-bottom: 16px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--border);
}

.admin-heritage .chart-wrap {
  min-height: 302px;
  border: 0;
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(255, 249, 239, 0.86));
}

.admin-heritage .period-select {
  width: 112px;
  margin-top: 0;
  padding: 8px 12px;
  border-color: var(--border);
  color: #5b5048;
}

.admin-heritage .chart-summary {
  justify-content: center;
  margin: -4px 0 8px;
  color: #4f453d;
}

.admin-heritage .chart-corner-legend {
  border-color: var(--border);
  background: rgba(255, 253, 248, 0.88);
  color: var(--muted);
}

.admin-heritage .chart-dot.visit {
  background: var(--accent);
}

.admin-heritage .chart-dot.draw {
  background: var(--primary);
}

.admin-heritage .config-list a {
  min-height: 48px;
  padding: 0 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.admin-heritage .quick-action-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.admin-heritage .quick-action-grid a {
  min-height: 82px;
  border-color: var(--border);
  border-radius: 6px;
  background: #fffdf8;
  color: #4b4038;
}

.admin-heritage .quick-action-grid span {
  width: 30px;
  height: 30px;
  border-radius: 5px;
  background: var(--primary);
  color: #fffaf2;
}

.admin-heritage .quick-action-grid a:nth-child(2) span,
.admin-heritage .quick-action-grid a:nth-child(6) span,
.admin-heritage .quick-action-grid a:nth-child(8) span,
.admin-heritage .quick-action-grid a:nth-child(9) span {
  background: var(--accent);
}

.admin-heritage table {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.admin-heritage th,
.admin-heritage td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
}

.admin-heritage th {
  background: #fbf4e9;
  color: #75685e;
  font-size: 13px;
  font-weight: 900;
}

.admin-heritage tbody tr:hover td {
  background: #fff8ee;
}

.admin-heritage .fortune-badge {
  min-width: 42px;
  justify-content: center;
}

.admin-heritage .dashboard-records-panel .section-title {
  margin-bottom: 0;
}

.admin-heritage .table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 6px 6px;
  color: #6f6258;
  font-size: 13px;
}

.admin-heritage .table-footer a {
  color: var(--accent);
  font-weight: 900;
}

.admin-heritage .sidebar::after {
  display: none;
}

.admin-heritage .brand-lockup,
.admin-heritage .sidebar-nav {
  position: relative;
  z-index: 1;
}

.admin-heritage .period-static {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel-bg);
  color: #5b5048;
  font-size: 13px;
  font-weight: 800;
}

.admin-heritage .empty-cell {
  height: 120px;
  color: #8a7460;
  text-align: center;
}

.admin-heritage button,
.admin-heritage .button-link {
  border-radius: 6px;
  background: var(--primary);
  color: #fffaf2;
  box-shadow: none;
}

.admin-heritage .button-link.secondary {
  background: var(--secondary);
}

.admin-heritage input,
.admin-heritage textarea,
.admin-heritage select {
  border-color: var(--border);
  border-radius: 6px;
  background: var(--input-bg);
  color: var(--text);
}

.admin-heritage .config-anchor-nav,
.admin-heritage .config-submit-bar {
  border-color: var(--border);
  background: rgba(255, 253, 248, 0.92);
  box-shadow: none;
}

.admin-heritage .config-anchor-nav a {
  background: #fbf1e3;
  color: #8d342d;
}

.admin-heritage .switch-check,
.admin-heritage .color-picker-trigger,
.admin-heritage .admin-modal__panel {
  border-color: var(--border);
  background: var(--panel-bg);
  color: var(--text);
}

@media (max-width: 800px) {
  .admin-heritage .sidebar {
    width: auto;
  }

  .admin-heritage .main {
    margin-left: 0;
    padding: 20px;
  }

  .admin-heritage .admin-topbar {
    position: static;
    display: block;
    margin: -20px -20px 20px;
    padding: 14px 20px;
  }

  .admin-heritage .dashboard-gauges,
  .admin-heritage .dashboard-main-grid,
  .admin-heritage .dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }

  .admin-heritage .period-static {
    margin-top: 10px;
  }
}

/* Final sidebar fixes: keep the landscape behind menu buttons and the admin chip compact. */
.admin-heritage .sidebar {
  position: fixed;
  overflow: hidden;
}

.admin-heritage .sidebar-landscape-bg {
  position: absolute;
  left: 0;
  right: 0;
  top: 238px !important;
  bottom: auto !important;
  z-index: 0;
  width: 100% !important;
  height: calc(100% - 292px) !important;
  object-fit: cover !important;
  object-position: center bottom !important;
  opacity: 0.82 !important;
  pointer-events: none;
}

.admin-heritage .brand-lockup,
.admin-heritage .sidebar-nav {
  position: relative;
  z-index: 2;
}

.admin-heritage .sidebar-nav a:not(.active) {
  background: rgba(255, 253, 248, 0.54);
  backdrop-filter: blur(1px);
}

.admin-heritage .sidebar-user {
  position: absolute !important;
  left: 36px !important;
  right: 36px !important;
  bottom: 18px !important;
  z-index: 3 !important;
  min-height: 34px !important;
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 5px 8px !important;
  border: 1px solid rgba(80, 56, 41, 0.34) !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  color: #1b100a !important;
  text-align: left !important;
  box-shadow: 0 8px 18px rgba(72, 45, 26, 0.12) !important;
}

.admin-heritage .sidebar-user .user-avatar {
  width: 22px !important;
  height: 22px !important;
}

.admin-heritage .sidebar-user strong {
  color: #1b100a !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

.admin-heritage .sidebar-user p {
  display: none !important;
}

.admin-heritage .sidebar-user .user-caret {
  color: #2b1a10 !important;
  font-size: 11px !important;
}

.admin-heritage .brand-lockup {
  gap: 8px !important;
  margin-left: 6px !important;
  margin-right: 6px !important;
}

.admin-heritage .brand-seal {
  width: 40px !important;
  height: 40px !important;
}

.admin-heritage .brand-lockup > div {
  min-width: 0 !important;
}

.admin-heritage .sidebar h1 {
  white-space: nowrap !important;
  font-size: 24px !important;
  line-height: 1.05 !important;
  letter-spacing: 0 !important;
}

.admin-heritage .brand-lockup p {
  white-space: nowrap !important;
  font-size: 12px !important;
  letter-spacing: 1px !important;
}

/* Login dynamic background and grouped navigation. */
.admin-heritage.login-body {
  --login-custom-bg: none;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.88), rgba(246, 235, 216, 0.94)),
    var(--login-custom-bg),
    #fbf3e6;
  isolation: isolate;
}

.admin-heritage.login-body::before {
  content: "";
  position: fixed;
  inset: -10% -8%;
  z-index: -3;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.34), rgba(248, 238, 220, 0.76)),
    url("../images/sidebar-landscape.png") center bottom / min(980px, 82vw) auto no-repeat;
  opacity: 0.9;
  animation: loginMountainDrift 22s ease-in-out infinite alternate;
}

.admin-heritage.login-body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 18% 20%, rgba(196, 61, 53, 0.13), transparent 9%),
    radial-gradient(circle at 78% 24%, rgba(194, 149, 78, 0.14), transparent 13%),
    radial-gradient(circle at 52% 70%, rgba(194, 149, 78, 0.12), transparent 24%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.44), transparent 42%, rgba(194, 149, 78, 0.1));
  mix-blend-mode: multiply;
  pointer-events: none;
}

.login-dynamic-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.login-mist,
.login-astrolabe,
.login-seal-dust {
  position: absolute;
  display: block;
  pointer-events: none;
}

.login-mist {
  left: -12%;
  right: -12%;
  height: 34%;
  border-radius: 999px;
  filter: blur(22px);
  opacity: 0.64;
  background:
    radial-gradient(ellipse at 22% 50%, rgba(255, 255, 255, 0.9), transparent 52%),
    radial-gradient(ellipse at 54% 45%, rgba(233, 219, 197, 0.52), transparent 54%),
    radial-gradient(ellipse at 86% 52%, rgba(255, 255, 255, 0.82), transparent 50%);
}

.login-mist-a {
  bottom: 24%;
  animation: loginMistFlowA 18s ease-in-out infinite alternate;
}

.login-mist-b {
  bottom: 6%;
  opacity: 0.5;
  animation: loginMistFlowB 26s ease-in-out infinite alternate;
}

.login-astrolabe {
  width: 520px;
  height: 520px;
  right: 7vw;
  top: 10vh;
  border: 1px solid rgba(194, 149, 78, 0.3);
  border-radius: 50%;
  opacity: 0.56;
  background:
    radial-gradient(circle, transparent 0 35%, rgba(194, 149, 78, 0.22) 35.2% 35.8%, transparent 36% 52%, rgba(194, 149, 78, 0.18) 52.2% 52.8%, transparent 53%),
    conic-gradient(from 0deg, rgba(194, 149, 78, 0.42) 0 1deg, transparent 1deg 18deg, rgba(196, 61, 53, 0.24) 18deg 19deg, transparent 19deg 36deg);
  animation: loginAstrolabeSpin 42s linear infinite;
}

.login-astrolabe::before,
.login-astrolabe::after {
  content: "";
  position: absolute;
  inset: 16%;
  border: 1px solid rgba(194, 149, 78, 0.24);
  border-radius: 50%;
}

.login-astrolabe::after {
  inset: 36%;
  border-color: rgba(196, 61, 53, 0.18);
}

.login-seal-dust {
  inset: 0;
  background:
    radial-gradient(circle at 18% 32%, rgba(196, 61, 53, 0.24) 0 2px, transparent 3px),
    radial-gradient(circle at 26% 62%, rgba(194, 149, 78, 0.28) 0 2px, transparent 3px),
    radial-gradient(circle at 68% 34%, rgba(196, 61, 53, 0.2) 0 2px, transparent 3px),
    radial-gradient(circle at 82% 72%, rgba(194, 149, 78, 0.3) 0 2px, transparent 3px),
    radial-gradient(circle at 56% 18%, rgba(196, 61, 53, 0.18) 0 1px, transparent 2px);
  animation: loginDustFloat 12s ease-in-out infinite alternate;
}

.admin-heritage.login-body .login-card {
  position: relative;
  z-index: 1;
  max-width: 430px;
  padding: 38px 36px 34px;
  border: 1px solid rgba(194, 149, 78, 0.46);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.9), rgba(255, 248, 236, 0.82));
  backdrop-filter: blur(14px);
  box-shadow: 0 28px 72px rgba(79, 51, 29, 0.18);
}

.admin-heritage.login-body .login-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(194, 149, 78, 0.18);
  border-radius: 6px;
  pointer-events: none;
}

.login-brand-mark {
  width: 58px;
  height: 58px;
  display: block;
  margin: 0 auto 16px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 20px rgba(142, 47, 39, 0.14);
}

.admin-heritage.login-body .login-card h1 {
  margin-bottom: 10px;
  font-size: 30px;
  letter-spacing: 0;
}

.admin-heritage.login-body .login-card p {
  margin-top: 0;
  color: #77634f;
}

.admin-heritage.login-body .login-form label {
  text-align: left;
}

.admin-heritage.login-body .login-action button {
  min-width: 150px;
  min-height: 40px;
}

.admin-heritage .sidebar-nav {
  max-height: calc(100vh - 166px);
  overflow-y: auto;
  padding-right: 2px;
  padding-bottom: 74px;
  scrollbar-width: none;
}

.admin-heritage .sidebar-nav::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.admin-heritage .sidebar-group {
  display: grid;
  gap: 3px;
  margin: 0 0 8px;
}

.admin-heritage .sidebar-group-title {
  display: block;
  padding: 8px 10px 2px;
  color: #9a826a;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 2px;
}

.admin-heritage .sidebar-group a {
  min-height: 40px !important;
  margin: 0 !important;
  padding: 0 14px !important;
  font-size: 14px !important;
}

/* Sidebar menu buttons: first level is one size larger, all menu rows have borders and hover feedback. */
.admin-heritage .sidebar-group {
  gap: 6px !important;
  margin: 0 0 10px !important;
}

.admin-heritage .sidebar-group-title {
  min-height: 36px !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 14px !important;
  border: 1px solid rgba(194, 149, 78, 0.42) !important;
  border-radius: 6px !important;
  background: rgba(255, 249, 238, 0.72) !important;
  color: #6f4b2f !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease !important;
}

.admin-heritage .sidebar-group-title:hover {
  border-color: rgba(196, 61, 53, 0.42) !important;
  background: rgba(255, 253, 248, 0.92) !important;
  color: #9d332c !important;
  transform: translateX(2px) !important;
  box-shadow: 0 8px 18px rgba(102, 66, 36, 0.1) !important;
}

.admin-heritage .sidebar-group a {
  min-height: 38px !important;
  display: flex !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 14px !important;
  border: 1px solid rgba(194, 149, 78, 0.3) !important;
  border-radius: 6px !important;
  background: rgba(255, 253, 248, 0.62) !important;
  color: #4b4038 !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  backdrop-filter: blur(1px) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58) !important;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease !important;
}

.admin-heritage .sidebar-group a:hover,
.admin-heritage .sidebar-group a:focus {
  border-color: rgba(196, 61, 53, 0.46) !important;
  background: rgba(255, 248, 238, 0.94) !important;
  color: var(--primary) !important;
  transform: translateX(3px) !important;
  box-shadow: 0 8px 18px rgba(102, 66, 36, 0.12) !important;
}

.admin-heritage .sidebar-group a.active {
  border-color: rgba(196, 61, 53, 0.62) !important;
  background: linear-gradient(90deg, var(--primary), #b5322c) !important;
  color: #fffaf2 !important;
  box-shadow: 0 10px 22px rgba(196, 61, 53, 0.2) !important;
}

@keyframes loginMountainDrift {
  from {
    transform: translate3d(-14px, 0, 0) scale(1.03);
  }
  to {
    transform: translate3d(18px, -8px, 0) scale(1.06);
  }
}

@keyframes loginMistFlowA {
  from {
    transform: translate3d(-8%, 0, 0);
  }
  to {
    transform: translate3d(7%, -10px, 0);
  }
}

@keyframes loginMistFlowB {
  from {
    transform: translate3d(6%, 0, 0);
  }
  to {
    transform: translate3d(-7%, 8px, 0);
  }
}

@keyframes loginAstrolabeSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes loginDustFloat {
  from {
    transform: translate3d(0, 0, 0);
    opacity: 0.8;
  }
  to {
    transform: translate3d(0, -18px, 0);
    opacity: 0.55;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-heritage.login-body::before,
  .login-mist-a,
  .login-mist-b,
  .login-astrolabe,
  .login-seal-dust {
    animation: none !important;
  }
}

/* Exact login concept: use the approved panorama as the visual source. */
.admin-heritage.login-effect-exact {
  min-height: 100vh;
  padding: 0 !important;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.1), rgba(246, 235, 216, 0.08)),
    url("../images/login-panorama-bg.png") center center / cover no-repeat,
    #fbf3e6 !important;
}

.admin-heritage.login-effect-exact::before,
.admin-heritage.login-effect-exact::after {
  display: none !important;
}

.login-effect-exact .login-dynamic-bg {
  z-index: 4;
}

.login-effect-exact .login-card {
  position: relative !important;
  z-index: 6;
  width: 430px !important;
  max-width: calc(100vw - 48px) !important;
  min-height: 482px;
  padding: 42px 40px 36px !important;
  border: 1px solid rgba(194, 149, 78, 0.48) !important;
  border-radius: 8px !important;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.92), rgba(255, 248, 236, 0.84)) !important;
  box-shadow: 0 24px 60px rgba(84, 54, 32, 0.16) !important;
  backdrop-filter: blur(12px) !important;
  text-align: center !important;
}

.login-effect-exact .login-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(194, 149, 78, 0.18);
  border-radius: 6px;
  pointer-events: none;
}

.login-effect-exact .login-brand-mark {
  display: block !important;
  width: 62px;
  height: 62px;
  margin: 0 auto 18px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 20px rgba(142, 47, 39, 0.16);
}

.login-effect-exact .login-card h1 {
  display: block !important;
  margin: 0 0 10px;
  color: #211811;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0;
}

.login-effect-exact .login-card p {
  display: block !important;
  margin: 0 0 30px;
  color: #8a7460;
  font-size: 14px;
}

.login-effect-exact .login-form,
.login-effect-exact .login-action {
  display: flex !important;
  margin: 0 !important;
}

.login-effect-exact .login-form {
  flex-direction: column;
  gap: 16px;
}

.login-effect-exact .login-field {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  width: 100% !important;
  height: auto !important;
  display: block !important;
  margin: 0 !important;
  color: #6f6258 !important;
  font-size: 13px !important;
  text-align: left;
}

.login-effect-exact .login-field span {
  display: block;
  margin-bottom: 7px;
}

.login-effect-exact .login-field input {
  width: 100% !important;
  height: 48px !important;
  padding: 0 15px !important;
  border: 1px solid rgba(194, 149, 78, 0.34) !important;
  border-radius: 7px !important;
  background: rgba(255, 253, 248, 0.7) !important;
  color: #38271f !important;
  font-size: 15px !important;
  line-height: 1 !important;
  outline: none !important;
  box-shadow: none !important;
}

.login-effect-exact .login-field input:focus {
  background: rgba(255, 253, 248, 0.94) !important;
  box-shadow: 0 0 0 2px rgba(194, 149, 78, 0.2) !important;
}

.login-effect-exact .login-action {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  width: 100% !important;
  height: auto !important;
  justify-content: center;
  padding-top: 8px;
}

.login-effect-exact .login-action button {
  width: 100% !important;
  height: 54px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: linear-gradient(180deg, #c9362f, #a71f1a) !important;
  color: #fffaf2 !important;
  font-size: 19px !important;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(164, 38, 31, 0.18) !important;
  cursor: pointer;
}

.login-effect-exact .login-action button:hover,
.login-effect-exact .login-action button:focus {
  background: linear-gradient(180deg, #d23d35, #a9231d) !important;
  box-shadow: 0 0 0 2px rgba(194, 149, 78, 0.18) !important;
}

.login-effect-exact .notice.error {
  position: relative;
  left: auto;
  right: auto;
  top: auto;
  z-index: 6;
  margin: 0 0 16px;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 12px;
  text-align: center;
}

.login-effect-exact .muted-link {
  display: none !important;
}

.login-leaf {
  position: fixed;
  z-index: 5;
  width: 28px;
  height: 28px;
  display: block;
  background: url("../images/login-leaf.png") center / contain no-repeat;
  opacity: 0.72;
  filter: drop-shadow(0 4px 8px rgba(117, 64, 34, 0.08));
  animation: loginLeafWind 12s linear infinite;
}

.login-leaf:nth-child(1) {
  top: -8vh;
  left: 18vw;
  width: 20px;
  height: 20px;
  animation-duration: 13s;
  animation-delay: -2s;
}

.login-leaf:nth-child(2) {
  top: -10vh;
  left: 42vw;
  width: 18px;
  height: 18px;
  animation-duration: 15s;
  animation-delay: -7s;
}

.login-leaf:nth-child(3) {
  top: -6vh;
  left: 64vw;
  width: 24px;
  height: 24px;
  animation-duration: 11s;
  animation-delay: -4s;
}

.login-leaf:nth-child(4) {
  top: -12vh;
  left: 82vw;
  width: 16px;
  height: 16px;
  animation-duration: 16s;
  animation-delay: -9s;
}

.login-leaf:nth-child(5) {
  top: 8vh;
  left: 104vw;
  width: 22px;
  height: 22px;
  animation-duration: 14s;
  animation-delay: -5s;
}

.login-leaf:nth-child(6) {
  top: 24vh;
  left: 108vw;
  width: 15px;
  height: 15px;
  animation-duration: 18s;
  animation-delay: -12s;
}

.login-leaf:nth-child(7) {
  top: -9vh;
  left: 92vw;
  width: 26px;
  height: 26px;
  animation-duration: 12s;
  animation-delay: -1s;
}

.login-leaf:nth-child(8) {
  top: 38vh;
  left: 106vw;
  width: 17px;
  height: 17px;
  animation-duration: 17s;
  animation-delay: -8s;
}

@keyframes loginLeafWind {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
    opacity: 0;
  }
  8% {
    opacity: 0.7;
  }
  44% {
    transform: translate3d(-34vw, 38vh, 0) rotate(220deg);
  }
  72% {
    transform: translate3d(-62vw, 64vh, 0) rotate(430deg);
    opacity: 0.62;
  }
  100% {
    transform: translate3d(-96vw, 104vh, 0) rotate(680deg);
    opacity: 0;
  }
}

@media (max-width: 900px) {
  .login-effect-exact .login-card {
    width: min(430px, calc(100vw - 32px)) !important;
    min-height: auto;
    padding: 34px 28px 30px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-effect-exact .login-leaf {
    animation: none !important;
    display: none !important;
  }
}
