/* ========================================

   ADMIN PANEL — МедведьМа

   Mobile-First

   ======================================== */

/* === ADMIN LAYOUT === */

.admin-body {
  background: #f0ebe3;

  padding-bottom: calc(
    var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px)
  );
}

.admin-login {
  min-height: 100vh;

  display: flex;

  align-items: center;

  justify-content: center;

  background: linear-gradient(135deg, var(--color-bg-dark), #5a3828);

  padding: var(--space-lg);
}

.login-card {
  background: var(--color-bg-card);

  border-radius: var(--radius-lg);

  padding: var(--space-xl);

  width: 100%;

  max-width: 380px;

  box-shadow: var(--shadow-xl);

  text-align: center;
}

.login-logo {
  width: 80px;

  height: 80px;

  border-radius: var(--radius-full);

  margin: 0 auto var(--space-md);

  object-fit: cover;
}

.login-title {
  font-family: var(--font-heading);

  font-size: var(--font-size-xl);

  margin-bottom: var(--space-xs);
}

.login-subtitle {
  font-size: var(--font-size-sm);

  color: var(--color-text-muted);

  margin-bottom: var(--space-xl);
}

.login-error {
  color: var(--color-error);

  font-size: var(--font-size-sm);

  margin-bottom: var(--space-md);

  display: none;
}

.login-error.show {
  display: block;
}

/* === ADMIN HEADER === */

.admin-header {
  position: fixed;

  top: 0;

  left: 0;

  right: 0;

  height: 56px;

  background: var(--color-bg-dark);

  color: var(--color-text-on-dark);

  display: flex;

  align-items: center;

  justify-content: space-between;

  padding: 0 var(--space-md);

  z-index: 1000;

  box-shadow: var(--shadow-md);
}

.admin-header-title {
  font-family: var(--font-heading);

  font-size: var(--font-size-lg);

  color: var(--color-accent);

  display: flex;

  align-items: center;

  gap: var(--space-sm);
}

.admin-header-title img {
  width: 32px;

  height: 32px;

  border-radius: var(--radius-full);
}

.admin-header-actions {
  display: flex;

  gap: var(--space-sm);
}

.admin-header-btn {
  width: 40px;

  height: 40px;

  display: flex;

  align-items: center;

  justify-content: center;

  color: var(--color-text-on-dark);

  border-radius: var(--radius-sm);

  font-size: 1.2rem;

  transition: background var(--transition-fast);

  position: relative;
}

.admin-header-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.admin-header-btn .notif-dot {
  position: absolute;

  top: 6px;

  right: 6px;

  width: 8px;

  height: 8px;

  background: var(--color-error);

  border-radius: var(--radius-full);
}

/* === ADMIN BOTTOM TAB BAR === */

.admin-tabs {
  position: fixed;

  bottom: 0;

  left: 0;

  right: 0;

  height: calc(60px + env(safe-area-inset-bottom, 0px));

  padding-bottom: env(safe-area-inset-bottom, 0px);

  background: var(--color-bg-dark);

  display: flex;

  align-items: stretch;

  z-index: 1000;

  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.admin-tab {
  flex: 1;

  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: center;

  gap: 2px;

  color: rgba(245, 230, 211, 0.5);

  font-size: 0.65rem;

  font-weight: 500;

  text-decoration: none;

  transition: color var(--transition-fast);

  position: relative;

  cursor: pointer;

  border: none;

  background: none;
}

.admin-tab.active {
  color: var(--color-accent);
}

.admin-tab:hover {
  color: var(--color-text-on-dark);
}

.admin-tab-icon {
  font-size: 1.3rem;
}

.admin-tab-badge {
  position: absolute;

  top: 4px;

  right: 50%;

  transform: translateX(14px);

  background: var(--color-error);

  color: #fff;

  font-size: 0.55rem;

  font-weight: 700;

  width: 16px;

  height: 16px;

  border-radius: var(--radius-full);

  display: flex;

  align-items: center;

  justify-content: center;
}

/* === ADMIN MAIN CONTENT === */

.admin-main {
  margin-top: 56px;

  padding: var(--space-md);

  padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));

  min-height: calc(100vh - 56px);
}

/* === ADMIN SECTIONS (views) === */

.admin-view {
  display: none;
}

.admin-view.active {
  display: block;

  animation: fadeIn 0.3s ease;
}

/* === DASHBOARD WIDGETS === */

.dash-widgets {
  display: grid;

  grid-template-columns: repeat(2, 1fr);

  gap: var(--space-sm);

  margin-bottom: var(--space-lg);
}

.dash-widget {
  background: var(--color-bg-card);

  border-radius: var(--radius-md);

  padding: var(--space-md);

  box-shadow: var(--shadow-sm);

  text-align: center;
}

.dash-widget-icon {
  font-size: 1.5rem;

  margin-bottom: var(--space-xs);
}

.dash-widget-value {
  font-size: var(--font-size-xl);

  font-weight: 700;

  color: var(--color-primary-dark);
}

.dash-widget-label {
  font-size: var(--font-size-xs);

  color: var(--color-text-muted);

  margin-top: 2px;
}

.dash-section {
  margin-bottom: var(--space-xl);
}

.dash-section-title {
  font-family: var(--font-heading);

  font-size: var(--font-size-lg);

  color: var(--color-primary-dark);

  margin-bottom: var(--space-md);

  display: flex;

  align-items: center;

  gap: var(--space-sm);
}

/* Mini chart placeholder */

.dash-chart {
  background: var(--color-bg-card);

  border-radius: var(--radius-md);

  padding: var(--space-md);

  box-shadow: var(--shadow-sm);

  min-height: 200px;

  display: flex;

  flex-direction: column;
}

.chart-bars {
  display: flex;

  align-items: flex-end;

  gap: 4px;

  flex: 1;

  padding-top: var(--space-md);
}

.chart-bar {
  flex: 1;

  background: var(--color-primary);

  border-radius: 4px 4px 0 0;

  min-height: 10px;

  opacity: 0.8;

  transition: opacity var(--transition-fast);
}

.chart-bar:hover {
  opacity: 1;
}

.chart-labels {
  display: flex;

  gap: 4px;

  margin-top: var(--space-xs);
}

.chart-label {
  flex: 1;

  text-align: center;

  font-size: 0.6rem;

  color: var(--color-text-muted);
}

/* === ADMIN LIST CARDS === */

.admin-list {
  display: flex;

  flex-direction: column;

  gap: var(--space-sm);
}

.admin-card {
  background: var(--color-bg-card);

  border-radius: var(--radius-md);

  padding: var(--space-md);

  box-shadow: var(--shadow-sm);

  transition: box-shadow var(--transition-fast);
}

.admin-card:active {
  box-shadow: var(--shadow-md);
}

.admin-card-header {
  display: flex;

  align-items: center;

  justify-content: space-between;

  margin-bottom: var(--space-sm);
}

.admin-card-id {
  font-size: var(--font-size-xs);

  color: var(--color-text-muted);

  font-weight: 600;
}

.admin-card-date {
  font-size: var(--font-size-xs);

  color: var(--color-text-muted);
}

.admin-card-body {
  margin-bottom: var(--space-sm);
}

.admin-card-title {
  font-weight: 600;

  font-size: var(--font-size-base);

  margin-bottom: 2px;
}

.admin-card-subtitle {
  font-size: var(--font-size-sm);

  color: var(--color-text-light);
}

.admin-card-detail {
  font-size: var(--font-size-sm);

  color: var(--color-text-light);

  margin-top: 4px;
}

.admin-card-footer {
  display: flex;

  align-items: center;

  justify-content: space-between;

  padding-top: var(--space-sm);

  border-top: 1px solid var(--color-border);
}

.admin-card-amount {
  font-weight: 700;

  color: var(--color-primary-dark);
}

.admin-card-actions {
  display: flex;

  gap: var(--space-xs);
}

.admin-action-btn {
  padding: 8px 14px;

  border-radius: var(--radius-sm);

  font-size: var(--font-size-xs);

  font-weight: 600;

  transition: all var(--transition-fast);

  display: flex;

  align-items: center;

  gap: 4px;

  min-height: 36px;
}

.admin-action-btn.approve {
  background: #e8f5e9;

  color: #2e7d32;
}

.admin-action-btn.approve:hover {
  background: #c8e6c9;
}

.admin-action-btn.reject {
  background: #ffebee;

  color: #c62828;
}

.admin-action-btn.reject:hover {
  background: #ffcdd2;
}

.admin-action-btn.edit {
  background: #e3f2fd;

  color: #1565c0;
}

.admin-action-btn.edit:hover {
  background: #bbdefb;
}

.admin-action-btn.delete {
  background: #ffebee;

  color: #c62828;
}

.admin-action-btn.delete:hover {
  background: #ffcdd2;
}

.admin-action-btn.telegram-btn {
  background: #e1f5fe;

  color: #0277bd;
}

/* === STATUS SELECT === */

.status-select {
  padding: 8px 12px;

  border: 2px solid var(--color-border);

  border-radius: var(--radius-sm);

  font-size: var(--font-size-sm);

  font-weight: 600;

  background: var(--color-bg-card);

  min-height: 40px;

  -webkit-appearance: none;

  cursor: pointer;
}

/* === ADMIN FILTERS === */

.admin-filters {
  display: flex;

  gap: var(--space-sm);

  overflow-x: auto;

  padding: var(--space-sm) 0 var(--space-md);

  scrollbar-width: none;
}

.admin-filters::-webkit-scrollbar {
  display: none;
}

.admin-filter-btn {
  padding: 8px 16px;

  border-radius: 20px;

  font-size: var(--font-size-sm);

  font-weight: 500;

  white-space: nowrap;

  background: var(--color-bg-card);

  color: var(--color-text-light);

  border: 1px solid var(--color-border);

  transition: all var(--transition-fast);

  min-height: 36px;

  cursor: pointer;
}

.admin-filter-btn.active {
  background: var(--color-primary);

  color: #fff;

  border-color: var(--color-primary);
}

/* === FAB (Floating Action Button) === */

.fab {
  position: fixed;

  bottom: calc(70px + env(safe-area-inset-bottom, 0px));

  right: var(--space-md);

  width: 56px;

  height: 56px;

  border-radius: var(--radius-full);

  background: var(--color-primary);

  color: #fff;

  font-size: 1.5rem;

  display: flex;

  align-items: center;

  justify-content: center;

  box-shadow: 0 4px 16px rgba(139, 94, 60, 0.4);

  z-index: 900;

  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast);

  cursor: pointer;

  border: none;
}

.fab:hover {
  transform: scale(1.1);

  box-shadow: 0 6px 24px rgba(139, 94, 60, 0.5);
}

.fab:active {
  transform: scale(0.95);
}

/* === ADMIN PRODUCT ITEM === */

.admin-product-item {
  display: flex;

  gap: var(--space-md);

  align-items: center;

  background: var(--color-bg-card);

  border-radius: var(--radius-md);

  padding: var(--space-md);

  box-shadow: var(--shadow-sm);
}

.admin-product-thumb {
  width: 60px;

  height: 60px;

  border-radius: var(--radius-sm);

  background: var(--color-bg-alt);

  display: flex;

  align-items: center;

  justify-content: center;

  font-size: 1.5rem;

  flex-shrink: 0;
}

.admin-product-info {
  flex: 1;

  min-width: 0;
}

.admin-product-name {
  font-weight: 600;

  font-size: var(--font-size-sm);

  white-space: nowrap;

  overflow: hidden;

  text-overflow: ellipsis;
}

.admin-product-cat {
  font-size: var(--font-size-xs);

  color: var(--color-text-muted);
}

.admin-product-price {
  font-weight: 700;

  color: var(--color-primary-dark);

  font-size: var(--font-size-sm);
}

.admin-product-toggle {
  width: 48px;

  height: 28px;

  border-radius: 14px;

  background: var(--color-border);

  position: relative;

  transition: background var(--transition-fast);

  cursor: pointer;

  flex-shrink: 0;

  border: none;
}

.admin-product-toggle.active {
  background: var(--color-green);
}

.admin-product-toggle::after {
  content: "";

  position: absolute;

  top: 3px;

  left: 3px;

  width: 22px;

  height: 22px;

  border-radius: var(--radius-full);

  background: #fff;

  transition: transform var(--transition-fast);

  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.admin-product-toggle.active::after {
  transform: translateX(20px);
}

/* === ADMIN FORM MODAL === */

.admin-modal {
  position: fixed;

  inset: 0;

  background: var(--color-bg);

  z-index: 2000;

  transform: translateX(100%);

  transition: transform var(--transition-base);

  overflow-y: auto;

  -webkit-overflow-scrolling: touch;
}

.admin-modal.open {
  transform: translateX(0);
}

.admin-modal-header {
  position: sticky;

  top: 0;

  background: var(--color-bg-dark);

  color: var(--color-text-on-dark);

  padding: var(--space-md);

  display: flex;

  align-items: center;

  gap: var(--space-md);

  z-index: 1;
}

.admin-modal-back {
  width: 40px;

  height: 40px;

  display: flex;

  align-items: center;

  justify-content: center;

  font-size: 1.3rem;

  color: var(--color-text-on-dark);

  border-radius: var(--radius-sm);

  cursor: pointer;

  border: none;

  background: none;
}

.admin-modal-title {
  font-family: var(--font-heading);

  font-size: var(--font-size-lg);

  color: var(--color-accent);

  flex: 1;
}

.admin-modal-save {
  padding: 8px 20px;

  background: var(--color-accent);

  color: var(--color-bg-dark);

  border-radius: var(--radius-sm);

  font-weight: 600;

  font-size: var(--font-size-sm);

  cursor: pointer;

  border: none;

  min-height: 40px;
}

.admin-modal-body {
  padding: var(--space-lg);
}

/* === SETTINGS GROUPS === */

.settings-group {
  background: var(--color-bg-card);

  border-radius: var(--radius-md);

  padding: var(--space-lg);

  margin-bottom: var(--space-md);

  box-shadow: var(--shadow-sm);
}

.settings-group-title {
  font-family: var(--font-heading);

  font-size: var(--font-size-lg);

  color: var(--color-primary-dark);

  margin-bottom: var(--space-md);

  display: flex;

  align-items: center;

  gap: var(--space-sm);
}

.settings-row {
  display: flex;

  align-items: center;

  justify-content: space-between;

  padding: var(--space-sm) 0;

  border-bottom: 1px solid var(--color-border);
}

.settings-row:last-child {
  border-bottom: none;
}

.settings-row-label {
  font-size: var(--font-size-sm);

  font-weight: 500;
}

.settings-row-value {
  font-size: var(--font-size-sm);

  color: var(--color-text-light);
}

/* Toggle switch */

.toggle-switch {
  width: 48px;

  height: 28px;

  border-radius: 14px;

  background: var(--color-border);

  position: relative;

  transition: background var(--transition-fast);

  cursor: pointer;

  border: none;
}

.toggle-switch.on {
  background: var(--color-green);
}

.toggle-switch::after {
  content: "";

  position: absolute;

  top: 3px;

  left: 3px;

  width: 22px;

  height: 22px;

  border-radius: var(--radius-full);

  background: #fff;

  transition: transform var(--transition-fast);

  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-switch.on::after {
  transform: translateX(20px);
}

/* === ADMIN CALENDAR (simple) === */

.calendar-header {
  display: flex;

  align-items: center;

  justify-content: space-between;

  margin-bottom: var(--space-md);
}

.calendar-nav-btn {
  width: 40px;

  height: 40px;

  display: flex;

  align-items: center;

  justify-content: center;

  border-radius: var(--radius-full);

  border: 1px solid var(--color-border);

  font-size: 1rem;

  cursor: pointer;

  background: var(--color-bg-card);
}

.calendar-month {
  font-weight: 600;

  font-size: var(--font-size-base);
}

.calendar-grid {
  display: grid;

  grid-template-columns: repeat(7, 1fr);

  gap: 2px;

  text-align: center;
}

.calendar-day-name {
  font-size: var(--font-size-xs);

  color: var(--color-text-muted);

  padding: var(--space-xs);

  font-weight: 600;
}

.calendar-day {
  aspect-ratio: 1;

  display: flex;

  align-items: center;

  justify-content: center;

  font-size: var(--font-size-sm);

  border-radius: var(--radius-sm);

  cursor: pointer;

  transition: all var(--transition-fast);

  position: relative;
}

.calendar-day:hover {
  background: var(--color-bg-alt);
}

.calendar-day.today {
  font-weight: 700;

  color: var(--color-primary);
}

.calendar-day.has-booking::after {
  content: "";

  position: absolute;

  bottom: 4px;

  width: 6px;

  height: 6px;

  border-radius: var(--radius-full);

  background: var(--color-accent);
}

.calendar-day.other-month {
  color: var(--color-text-muted);

  opacity: 0.4;
}

/* === ADMIN LIST CARD (new) === */

.admin-list-card {
  background: var(--color-bg-card);

  border-radius: var(--radius-md);

  padding: var(--space-md);

  box-shadow: var(--shadow-sm);

  transition: box-shadow var(--transition-fast);
}

.admin-list-card:hover {
  box-shadow: var(--shadow-md);
}

.admin-list-card-header {
  display: flex;

  align-items: center;

  justify-content: space-between;

  margin-bottom: var(--space-xs);
}

.admin-list-card-title {
  font-weight: 600;

  font-size: var(--font-size-base);
}

.admin-list-card-meta {
  font-size: var(--font-size-xs);

  color: var(--color-text-muted);

  margin-top: 2px;
}

/* === ADMIN BADGES === */

.admin-badge {
  display: inline-block;

  padding: 2px 10px;

  border-radius: 12px;

  font-size: 0.7rem;

  font-weight: 600;

  white-space: nowrap;
}

.admin-badge-new,
.admin-badge-pending {
  background: #fff3e0;

  color: #e65100;
}

.admin-badge-processing,
.admin-badge-confirmed {
  background: #e3f2fd;

  color: #1565c0;
}

.admin-badge-shipped {
  background: #e8f5e9;

  color: #2e7d32;
}

.admin-badge-completed {
  background: #e8f5e9;

  color: #1b5e20;
}

.admin-badge-cancelled,
.admin-badge-rejected {
  background: #ffebee;

  color: #c62828;
}

.admin-badge-approved {
  background: #e8f5e9;

  color: #2e7d32;
}

/* === ADMIN WIDGETS (dashboard) === */

.admin-widgets {
  display: grid;

  grid-template-columns: repeat(2, 1fr);

  gap: var(--space-sm);
}

.admin-widget {
  background: var(--color-bg-card);

  border-radius: var(--radius-md);

  padding: var(--space-md);

  box-shadow: var(--shadow-sm);

  text-align: center;
}

.admin-widget-value {
  font-size: var(--font-size-xl);

  font-weight: 700;

  color: var(--color-primary-dark);
}

.admin-widget-label {
  font-size: var(--font-size-xs);

  color: var(--color-text-muted);

  margin-top: 2px;
}

.admin-widget-note {
  font-size: 0.65rem;

  color: var(--color-text-muted);

  margin-top: 2px;
}

/* === ADMIN CHART (simple bars) === */

.admin-chart {
  display: flex;

  align-items: flex-end;

  gap: 6px;

  min-height: 120px;

  padding-top: var(--space-md);
}

.admin-chart-bar {
  flex: 1;

  display: flex;

  flex-direction: column;

  align-items: center;

  gap: 4px;
}

.admin-chart-bar-fill {
  width: 100%;

  min-height: 4px;

  background: var(--color-primary);

  border-radius: 4px 4px 0 0;

  transition: height 0.3s ease;
}

.admin-chart-bar-label {
  font-size: 0.6rem;

  color: var(--color-text-muted);
}

/* === ADMIN SECTION TITLE === */

.admin-section-title {
  font-family: var(--font-heading);

  font-size: var(--font-size-xl);

  color: var(--color-primary-dark);

  margin-bottom: var(--space-md);
}

/* === ADMIN FILTER BAR === */

.admin-filter-bar {
  display: flex;

  gap: var(--space-sm);

  overflow-x: auto;

  padding: var(--space-sm) 0 var(--space-md);

  scrollbar-width: none;

  -ms-overflow-style: none;
}

.admin-filter-bar::-webkit-scrollbar {
  display: none;
}

/* Generic filter button (used in admin + catalog) */

.filter-btn {
  padding: 8px 16px;

  border-radius: 20px;

  font-size: var(--font-size-sm);

  font-weight: 500;

  white-space: nowrap;

  background: var(--color-bg-card);

  color: var(--color-text-light);

  border: 1px solid var(--color-border);

  transition: all var(--transition-fast);

  min-height: 36px;

  cursor: pointer;
}

.filter-btn.active {
  background: var(--color-primary);

  color: #fff;

  border-color: var(--color-primary);
}

/* === ADMIN LOGIN CARD (aliased) === */

.admin-login-card {
  background: var(--color-bg-card);

  border-radius: var(--radius-lg);

  padding: var(--space-xl);

  width: 100%;

  max-width: 380px;

  box-shadow: var(--shadow-xl);

  text-align: center;
}

.admin-login-logo {
  font-size: 4rem;

  margin-bottom: var(--space-md);
}

.admin-login-title {
  font-family: var(--font-heading);

  font-size: var(--font-size-xl);

  margin-bottom: var(--space-xs);
}

.admin-login-subtitle {
  font-size: var(--font-size-sm);

  color: var(--color-text-muted);

  margin-bottom: var(--space-xl);
}

.admin-login-error {
  color: var(--color-error);

  font-size: var(--font-size-sm);

  margin-bottom: var(--space-md);
}

/* === ADMIN HEADER INNER === */

.admin-header-inner {
  display: flex;

  align-items: center;

  justify-content: space-between;

  width: 100%;

  gap: var(--space-md);
}

.admin-header-user {
  font-size: var(--font-size-sm);

  color: rgba(255, 255, 255, 0.6);

  margin-left: auto;
}

.admin-header-logout {
  background: none;

  border: 1px solid rgba(255, 255, 255, 0.2);

  color: rgba(255, 255, 255, 0.7);

  padding: 4px 12px;

  border-radius: var(--radius-sm);

  font-size: var(--font-size-xs);

  cursor: pointer;

  transition: all var(--transition-fast);
}

.admin-header-logout:hover {
  border-color: rgba(255, 255, 255, 0.5);

  color: #fff;
}

/* === ADMIN PANEL LAYOUT === */

.admin-panel {
  padding-top: 56px;
}

.admin-content {
  padding: var(--space-md);

  padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));

  min-height: calc(100vh - 56px);
}

/* === ADMIN TABS (data-tab system) === */

.admin-tab[data-tab] {
  display: none;
}

.admin-tab[data-tab].active {
  display: block;

  animation: fadeIn 0.3s ease;
}

/* === ADMIN BOTTOM TABS (new) === */

.admin-bottom-tabs {
  position: fixed;

  bottom: 0;

  left: 0;

  right: 0;

  height: calc(60px + env(safe-area-inset-bottom, 0px));

  padding-bottom: env(safe-area-inset-bottom, 0px);

  background: var(--color-bg-dark);

  display: flex;

  align-items: stretch;

  z-index: 1000;

  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);

  overflow-x: auto;

  overflow-y: hidden;

  -webkit-overflow-scrolling: touch;

  scrollbar-width: none;
}

.admin-bottom-tabs::-webkit-scrollbar {
  display: none;
}

.admin-tab-btn {
  flex: 0 0 auto;

  min-width: 64px;

  padding: 4px 6px;

  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: center;

  gap: 2px;

  color: rgba(245, 230, 211, 0.5);

  font-size: 0.6rem;

  font-weight: 500;

  cursor: pointer;

  border: none;

  background: none;

  transition: color var(--transition-fast);

  white-space: nowrap;
}

.admin-tab-btn.active {
  color: var(--color-accent);
}

.admin-tab-btn:hover {
  color: var(--color-text-on-dark);
}

.admin-tab-btn span:first-child {
  font-size: 1.2rem;
}

/* === ADMIN SIDEBAR (new) === */

.admin-sidebar {
  display: none;
}

.admin-sidebar-item {
  display: flex;

  align-items: center;

  gap: var(--space-sm);

  padding: var(--space-sm) var(--space-md);

  color: rgba(245, 230, 211, 0.7);

  border-radius: var(--radius-sm);

  font-size: var(--font-size-sm);

  cursor: pointer;

  border: none;

  background: none;

  width: 100%;

  text-align: left;

  transition: all var(--transition-fast);
}

.admin-sidebar-item:hover {
  color: var(--color-text-on-dark);

  background: rgba(255, 255, 255, 0.05);
}

.admin-sidebar-item.active {
  color: var(--color-accent);

  background: rgba(212, 168, 71, 0.1);
}

/* === MODAL OVERLAY === */

.modal-overlay {
  position: fixed;

  inset: 0;

  background: rgba(0, 0, 0, 0.5);

  z-index: 2000;

  display: flex;

  align-items: center;

  justify-content: center;

  padding: var(--space-md);

  overflow-y: auto;
}

.modal-content {
  background: var(--color-bg-card);

  border-radius: var(--radius-lg);

  max-width: 560px;

  width: 100%;

  max-height: 90vh;

  overflow-y: auto;

  box-shadow: var(--shadow-xl);
}

/* === TOGGLE SWITCH (generic) === */

.toggle {
  position: relative;

  display: inline-block;

  width: 44px;

  height: 24px;
}

.toggle input {
  opacity: 0;

  width: 0;

  height: 0;
}

.toggle-slider {
  position: absolute;

  inset: 0;

  background: var(--color-border);

  border-radius: 12px;

  cursor: pointer;

  transition: background var(--transition-fast);
}

.toggle-slider::after {
  content: "";

  position: absolute;

  top: 2px;

  left: 2px;

  width: 20px;

  height: 20px;

  border-radius: var(--radius-full);

  background: #fff;

  transition: transform var(--transition-fast);

  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle input:checked + .toggle-slider {
  background: var(--color-green, #4caf50);
}

.toggle input:checked + .toggle-slider::after {
  transform: translateX(20px);
}

.toggle-sm {
  width: 36px;

  height: 20px;
}

.toggle-sm .toggle-slider::after {
  width: 16px;

  height: 16px;
}

.toggle-sm input:checked + .toggle-slider::after {
  transform: translateX(16px);
}

/* === RESPONSIVE ADMIN === */

@media (min-width: 600px) {
  .admin-widgets {
    grid-template-columns: repeat(4, 1fr);
  }

  .admin-content {
    padding: var(--space-lg);
  }
}

@media (min-width: 1025px) {
  .admin-body {
    padding-bottom: 0;
  }

  .admin-tabs,
  .admin-bottom-tabs {
    display: none;
  }

  .admin-sidebar {
    display: flex;

    flex-direction: column;

    position: fixed;

    top: 56px;

    left: 0;

    bottom: 0;

    width: 240px;

    background: var(--color-bg-dark);

    padding: var(--space-md);

    z-index: 999;

    overflow-y: auto;
  }

  .admin-sidebar-nav {
    display: flex;

    flex-direction: column;

    gap: var(--space-xs);
  }

  .admin-content {
    margin-left: 240px;

    padding: var(--space-xl);
  }
}

@media (max-width: 1024px) {
  .admin-sidebar {
    display: none;
  }
}

/* ============================================================

   ADMIN вЂ” MEDIA EDITOR

   ============================================================ */

.media-upload-zone {
  border: 2px dashed var(--color-border);

  border-radius: var(--radius-md);

  padding: 1.25rem 1rem;

  text-align: center;

  cursor: pointer;

  display: flex;

  flex-direction: column;

  align-items: center;

  gap: 0.2rem;

  transition:
    border-color 0.2s,
    background 0.2s;

  user-select: none;
}

.media-upload-zone:hover,
.media-upload-zone.dragging {
  border-color: var(--color-primary);

  background: rgba(123, 94, 70, 0.05);
}

.media-upload-zone-icon {
  font-size: 1.75rem;

  line-height: 1;

  margin-bottom: 0.2rem;
}

/* Thumbnails grid */

.media-thumbs {
  display: flex;

  flex-wrap: wrap;

  gap: 0.5rem;

  margin-top: 0.75rem;
}

.media-thumb {
  position: relative;

  width: 76px;

  height: 76px;

  border-radius: var(--radius-sm);

  overflow: hidden;

  border: 2px solid var(--color-border);

  flex-shrink: 0;

  transition: border-color 0.2s;
}

.media-thumb img {
  width: 100%;

  height: 100%;

  object-fit: cover;

  display: block;
}

.media-thumb-cover {
  border-color: var(--color-primary);

  box-shadow: 0 0 0 2px rgba(123, 94, 70, 0.25);
}

.media-thumb-actions {
  position: absolute;

  top: 2px;

  right: 2px;

  display: none;

  flex-direction: column;

  gap: 2px;
}

.media-thumb:hover .media-thumb-actions {
  display: flex;
}

.media-thumb-btn {
  width: 22px;

  height: 22px;

  border: none;

  border-radius: 3px;

  cursor: pointer;

  font-size: 0.68rem;

  display: flex;

  align-items: center;

  justify-content: center;

  line-height: 1;

  padding: 0;
}

.media-cover-btn {
  background: #e6ac00;

  color: #fff;
}

.media-remove-btn {
  background: #c0392b;

  color: #fff;
}

.media-cover-label {
  position: absolute;

  bottom: 0;

  left: 0;

  right: 0;

  background: var(--color-primary);

  color: #fff;

  font-size: 0.58rem;

  text-align: center;

  padding: 2px 0;

  text-transform: uppercase;

  letter-spacing: 0.06em;
}

.media-video-preview video {
  border-radius: var(--radius-md);
}

/* ========================================

   DESIGN MANAGEMENT PANEL

   ======================================== */

/* Top actions bar */

.design-actions-top {
  display: flex;

  justify-content: space-between;

  align-items: center;

  flex-wrap: wrap;

  gap: 0.75rem;

  margin-bottom: 1rem;

  padding: 0.75rem 1rem;

  background: var(--color-bg-card);

  border-radius: var(--radius-md);

  box-shadow: var(--shadow-sm);
}

.design-status {
  font-size: 0.9rem;

  font-weight: 600;

  color: var(--color-primary);
}

.design-actions-btns {
  display: flex;

  gap: 0.5rem;
}

/* Design cards */

.design-card {
  margin-bottom: 1rem;
}

.design-hint {
  font-size: 0.82rem;

  color: var(--color-text-muted);

  margin-bottom: 1rem;

  line-height: 1.4;
}

.design-section-subtitle {
  font-family: var(--font-heading);

  font-size: 1rem;

  font-weight: 600;

  color: var(--color-primary-dark);

  margin: 1.25rem 0 0.75rem;

  padding-bottom: 0.35rem;

  border-bottom: 1px solid var(--color-border-light);
}

/* === Theme Presets === */
.design-theme-presets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}
.design-theme-preset-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.5rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  cursor: pointer;
  transition: all 0.2s;
}
.design-theme-preset-btn:hover {
  border-color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.design-theme-preset-colors {
  display: flex;
  gap: 2px;
  width: 100%;
}
.design-theme-preset-colors span {
  flex: 1;
  height: 22px;
  border-radius: 3px;
}
.design-theme-preset-colors span:first-child {
  border-radius: 3px 0 0 3px;
}
.design-theme-preset-colors span:last-child {
  border-radius: 0 3px 3px 0;
}
.design-theme-preset-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
}

/* === Color Groups (Accordion) === */
.design-color-groups {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.design-color-group {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-bg);
}
.design-color-group-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  background: var(--color-bg-alt);
  transition: background 0.2s;
  user-select: none;
}
.design-color-group-header:hover {
  background: var(--color-bg-warm);
}
.design-color-group-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.88rem;
  flex: 1;
}
.design-color-group-icon {
  font-size: 1rem;
}
.design-color-group-swatches {
  display: flex;
  gap: 3px;
}
.mini-swatch {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}
.design-color-group-arrow {
  font-size: 0.7rem;
  transition: transform 0.3s;
  color: var(--color-text-muted);
}
.design-color-group.open .design-color-group-arrow {
  transform: rotate(180deg);
}
.design-color-group-body {
  display: none;
  padding: 0.85rem;
  border-top: 1px solid var(--color-border-light);
}
.design-color-group.open .design-color-group-body {
  display: block;
}
.design-color-group-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 0.6rem 0.75rem;
  background: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

/* Compact color grid inside groups */
.design-color-grid-compact {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.5rem;
}
.design-color-item-compact {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.design-color-item-compact:hover {
  background: var(--color-bg-alt);
}
.design-color-info-compact {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

/* === Color Picker Grid (legacy) === */

.design-color-grid {
  display: grid;

  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));

  gap: 0.75rem;
}

.design-color-item {
  display: flex;

  align-items: center;

  gap: 0.75rem;

  padding: 0.5rem;

  border-radius: var(--radius-sm);

  transition: background var(--transition-fast);
}

.design-color-item:hover {
  background: var(--color-bg-alt);
}

.design-color-picker-wrap {
  position: relative;

  flex-shrink: 0;
}

.design-color-input {
  position: absolute;

  inset: 0;

  width: 100%;

  height: 100%;

  opacity: 0;

  cursor: pointer;

  z-index: 2;
}

.design-color-swatch {
  width: 40px;

  height: 40px;

  border-radius: var(--radius-sm);

  border: 2px solid var(--color-border);

  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);

  transition: transform var(--transition-fast);
}

.design-color-item:hover .design-color-swatch {
  transform: scale(1.1);
}

.design-color-info {
  display: flex;

  flex-direction: column;

  gap: 1px;

  min-width: 0;
}

.design-color-label {
  font-size: 0.82rem;

  font-weight: 600;

  color: var(--color-text);

  white-space: nowrap;
}

.design-color-hint {
  font-size: 0.7rem;

  color: var(--color-text-muted);
}

.design-color-hex {
  font-size: 0.7rem;

  font-family: monospace;

  color: var(--color-text-light);

  background: var(--color-bg-alt);

  padding: 1px 4px;

  border-radius: 3px;

  width: fit-content;
}

/* === Font Section === */

.design-font-row {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 1.5rem;
}

@media (max-width: 640px) {
  .design-font-row {
    grid-template-columns: 1fr;
  }
}

.design-font-group {
  display: flex;

  flex-direction: column;

  gap: 0.5rem;
}

.design-font-select {
  font-size: 0.9rem;
}

.design-font-preview {
  padding: 0.75rem;

  background: var(--color-bg-alt);

  border-radius: var(--radius-sm);

  font-size: 1.15rem;

  line-height: 1.5;

  min-height: 60px;

  display: flex;

  align-items: center;

  border: 1px dashed var(--color-border);
}

/* === Radius Section === */

.design-radius-presets {
  display: flex;

  gap: 0.75rem;

  margin-bottom: 1.5rem;

  flex-wrap: wrap;
}

.design-radius-preset {
  flex: 1;

  min-width: 80px;

  display: flex;

  flex-direction: column;

  align-items: center;

  gap: 0.5rem;

  padding: 0.75rem;

  border: 2px solid var(--color-border);

  border-radius: var(--radius-md);

  background: var(--color-bg-card);

  cursor: pointer;

  transition: all var(--transition-fast);

  font-size: 0.8rem;

  color: var(--color-text-light);

  font-weight: 500;
}

.design-radius-preset:hover {
  border-color: var(--color-accent);

  background: var(--color-bg-alt);
}

.design-radius-preset.active {
  border-color: var(--color-primary);

  background: var(--color-cream);

  color: var(--color-primary);

  font-weight: 700;
}

.design-radius-demo {
  width: 48px;

  height: 48px;

  background: var(--color-primary);

  opacity: 0.6;
}

.design-radius-preset.active .design-radius-demo {
  opacity: 1;
}

.design-radius-sliders {
  display: flex;

  flex-direction: column;

  gap: 1rem;
}

.design-radius-slider-row {
  display: grid;

  grid-template-columns: 160px 1fr 40px;

  gap: 0.75rem;

  align-items: center;
}

@media (max-width: 480px) {
  .design-radius-slider-row {
    grid-template-columns: 1fr 40px;
  }

  .design-radius-slider-row .form-label {
    grid-column: 1 / -1;
  }
}

.design-radius-sample {
  width: 36px;

  height: 36px;

  border: 2px solid var(--color-primary);

  flex-shrink: 0;
}

/* === Range Slider === */

.design-range {
  -webkit-appearance: none;

  appearance: none;

  width: 100%;

  height: 6px;

  background: var(--color-border);

  border-radius: 3px;

  outline: none;

  cursor: pointer;
}

.design-range::-webkit-slider-thumb {
  -webkit-appearance: none;

  appearance: none;

  width: 20px;

  height: 20px;

  background: var(--color-primary);

  border-radius: var(--radius-full);

  cursor: pointer;

  border: 2px solid #fff;

  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.design-range::-moz-range-thumb {
  width: 20px;

  height: 20px;

  background: var(--color-primary);

  border-radius: var(--radius-full);

  cursor: pointer;

  border: 2px solid #fff;

  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* === Shadow Section === */

.design-shadow-control {
  display: flex;

  flex-direction: column;

  gap: 0.75rem;
}

.design-shadow-demos {
  display: flex;

  gap: 1rem;

  margin-top: 0.5rem;
}

.design-shadow-demo {
  flex: 1;

  padding: 1rem;

  text-align: center;

  background: var(--color-bg-card);

  border-radius: var(--radius-md);

  font-size: 0.8rem;

  font-weight: 600;

  color: var(--color-text-muted);

  border: 1px solid var(--color-border-light);
}

/* === Live Preview Box === */

.design-preview-box {
  border-radius: var(--radius-md);

  overflow: hidden;

  border: 1px solid var(--color-border);
}

.design-preview-header {
  padding: 0.75rem 1rem;

  display: flex;

  align-items: center;

  gap: 0.5rem;

  font-family: var(--font-heading);

  font-size: 1.1rem;

  font-weight: 600;
}

.design-preview-logo {
  font-size: 1.4rem;
}

.design-preview-body {
  padding: 1.25rem;
}

.design-preview-body h4 {
  font-family: var(--font-heading);

  font-size: 1.3rem;

  margin-bottom: 0.5rem;
}

.design-preview-body p {
  margin-bottom: 1rem;

  font-size: 0.9rem;

  line-height: 1.5;
}

.design-preview-card {
  margin: 0 1.25rem 1.25rem;

  padding: 1rem;

  display: flex;

  flex-direction: column;

  gap: 0.25rem;
}

/* === Bottom Actions === */

.design-bottom-actions {
  margin-top: 1.5rem;

  padding: 1.5rem;

  background: var(--color-bg-card);

  border-radius: var(--radius-md);

  box-shadow: var(--shadow-sm);
}

/* === Background Image Section === */
.design-bg-preview {
  width: 100%;
  height: 200px;
  border-radius: var(--radius-md);
  border: 2px dashed var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: border-color 0.3s;
}
.design-bg-preview:hover {
  border-color: var(--color-primary);
}
.design-bg-preview.has-image {
  border-style: solid;
}
.design-bg-placeholder {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}
.design-bg-placeholder .icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.5rem;
}
.design-bg-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.design-bg-controls .form-group {
  flex: 1;
  min-width: 140px;
}
.design-bg-overlay-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
}
.design-bg-overlay-row label {
  white-space: nowrap;
}
.design-bg-remove {
  background: #e74c3c;
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}
.design-bg-remove:hover {
  background: #c0392b;
}

/* === Glass Mode === */
.design-glass-toggle {
  margin-bottom: 1rem;
}
.design-toggle-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
}
.design-toggle-label input[type="checkbox"] {
  display: none;
}
.design-toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--color-border);
  border-radius: 12px;
  transition: background 0.3s;
  flex-shrink: 0;
}
.design-toggle-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.design-toggle-label input:checked + .design-toggle-switch {
  background: var(--color-primary);
}
.design-toggle-label input:checked + .design-toggle-switch::after {
  transform: translateX(20px);
}
.design-glass-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.design-glass-preview {
  position: relative;
  height: 120px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 0.5rem;
}
.design-glass-preview-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  background-size: cover;
}
.design-glass-preview-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--glass-bg, rgba(255, 255, 255, 0.8));
  backdrop-filter: blur(var(--glass-blur, 10px));
  -webkit-backdrop-filter: blur(var(--glass-blur, 10px));
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: #333;
}
.design-glass-preview-card strong {
  font-size: 1rem;
}
.design-glass-preview-card span {
  font-size: 0.8rem;
  opacity: 0.8;
}

/* === Image Upload Field === */
.design-img-upload {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-alt);
}
.design-img-preview {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-full);
  background: var(--color-bg-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--color-border);
}
.design-img-preview .img-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-full);
}
.design-img-preview .img-preview-emoji {
  font-size: 3rem;
  line-height: 1;
}
.design-img-controls {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.design-img-tabs {
  display: flex;
  gap: 0.25rem;
}
.design-img-tab {
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s;
}
.design-img-tab.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.design-img-tab:hover:not(.active) {
  background: var(--color-bg-warm);
}
.design-img-tab-content {
  min-height: 32px;
}
.design-img-file-btn {
  width: 100%;
}

/* === Text Formatting === */
.design-tf-selector {
  margin-bottom: 1rem;
}
.design-tf-selector select {
  width: 100%;
  margin-top: 0.35rem;
}
.design-tf-preview-box {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  margin-bottom: 1rem;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.design-tf-preview-box #design-tf-preview-text {
  font-size: 1.2rem;
  font-family: var(--font-heading);
  color: var(--color-text);
  transition: all 0.2s;
}
.design-tf-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.design-tf-toggles {
  display: flex;
  gap: 0.5rem;
}
.design-tf-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  cursor: pointer;
  font-size: 1rem;
  color: var(--color-text);
  transition: all 0.2s;
}
.design-tf-btn:hover {
  border-color: var(--color-primary);
  background: var(--color-bg-alt);
}
.design-tf-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.design-tf-sliders {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.design-tf-slider-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.design-tf-slider-row label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-text-light);
}
.design-tf-slider-row label strong {
  color: var(--color-text);
}
.design-tf-stroke-row,
.design-tf-shadow-row {
  padding-top: 0.5rem;
  border-top: 1px solid var(--color-border-light);
}

/* === Per-page Background Tabs === */
.design-bg-page-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.design-bg-page-tab {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-bg);
  cursor: pointer;
  font-size: 0.78rem;
  transition: all 0.2s;
  position: relative;
  white-space: nowrap;
}
.design-bg-page-tab:hover {
  border-color: var(--color-primary);
  background: var(--color-bg-alt);
}
.design-bg-page-tab.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.design-bg-page-tab .tab-icon {
  font-size: 0.9rem;
}
.design-bg-page-tab .tab-label {
  font-weight: 500;
}
.design-bg-page-tab .tab-dot {
  color: #27ae60;
  font-size: 0.6rem;
  margin-left: 0.15rem;
}
.design-bg-page-tab.active .tab-dot {
  color: #fff;
}
.design-bg-page-tab.has-bg {
  border-color: var(--color-green);
}
.design-bg-page-tab.has-bg.active {
  border-color: var(--color-primary);
}

/* === Nav Icon Editor === */
.design-icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.design-icon-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  transition: box-shadow 0.2s;
}
.design-icon-item:hover {
  box-shadow: var(--shadow-sm);
}
.design-icon-current {
  font-size: 1.8rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.design-icon-info {
  flex: 1;
  min-width: 0;
}
.design-icon-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-text);
  display: block;
  margin-bottom: 0.25rem;
}
.design-icon-input {
  width: 100%;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  text-align: center;
}

/* === Content Section Editor === */
.design-sections-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.design-section-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-bg);
}
.design-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  cursor: pointer;
  background: var(--color-bg-alt);
  transition: background 0.2s;
  user-select: none;
}
.design-section-header:hover {
  background: var(--color-bg-warm);
}
.design-section-header .arrow {
  transition: transform 0.3s;
  font-size: 0.8rem;
}
.design-section-item.open .design-section-header .arrow {
  transform: rotate(180deg);
}
.design-section-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.design-section-title-row .icon {
  font-size: 1.2rem;
}
.design-section-title-row .title {
  font-weight: 600;
  font-size: 0.9rem;
}
.design-section-title-row .page-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  background: var(--color-primary);
  color: #fff;
  border-radius: 999px;
  font-weight: 500;
}
.design-section-body {
  display: none;
  padding: 1rem;
  border-top: 1px solid var(--color-border);
}
.design-section-item.open .design-section-body {
  display: block;
}
.design-section-field {
  margin-bottom: 0.75rem;
}
.design-section-field:last-child {
  margin-bottom: 0;
}
.design-section-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-light);
  margin-bottom: 0.25rem;
}
.design-section-field input,
.design-section-field textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
}
.design-section-field textarea {
  min-height: 60px;
}
.design-section-search {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.design-section-search input {
  flex: 1;
  padding: 0.6rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
}
.design-section-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.design-section-filter-btn {
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-bg);
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
}
.design-section-filter-btn.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
