/* Copyright (c) 2026 Eko Wahyudi - esaDigitalPRO. All rights reserved. */

/**
 * ADMIN CONTROL CENTER STYLING (esaDigitalPRO - Jarvis AI Studio)
 * Clean, High-Contrast, Professional Dark Theme (#070d1e), Responsive 375px-1440px
 */

:root {
  --bg-main: #070d1e;
  --bg-sidebar: #0a1329;
  --bg-card: rgba(13, 23, 48, 0.9);
  --bg-card-hover: rgba(19, 34, 71, 0.95);
  --bg-input: rgba(255, 255, 255, 0.05);
  --bg-table-stripe: rgba(255, 255, 255, 0.02);

  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(245, 158, 11, 0.5);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --gold: #f59e0b;
  --cyan: #06b6d4;
  --emerald: #10b981;
  --rose: #f43f5e;
  --amber: #f59e0b;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.6);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  color-scheme: dark;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-main);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }

/* Top Header */
.admin-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(10, 19, 41, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--gold) 0%, #ea580c 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}

.brand-badge {
  font-size: 0.7rem;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Save State Indicator (Truthful Save State) */
.save-status-bar {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.save-status-bar.saved {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.save-status-bar.unsaved {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fde047;
}

.save-status-bar.saving {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.4);
  color: #67e8f9;
}

.save-status-bar.error {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.4);
  color: #fda4af;
}

/* Sheet Sync Badge */
.sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.sync-badge:hover {
  background: rgba(16, 185, 129, 0.2);
}

/* Header Right Actions */
.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
}

/* Admin Layout (Sidebar + Main Content) */
.admin-layout {
  display: flex;
  flex: 1;
  min-height: calc(100vh - 60px);
}

/* Sidebar (ONLY NAVIGATION - NO TOGGLES) */
.admin-sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  padding: 1.25rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex-shrink: 0;
  overflow-y: auto;
}

.nav-group-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.75px;
  padding: 0 0.75rem;
  margin-bottom: 0.5rem;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-item-btn {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.625rem 0.75rem;
  min-height: 44px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition-fast);
  text-align: left;
}

.nav-item-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.nav-item-btn.active {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.05) 100%);
  color: #fbbf24;
  border-left: 3px solid var(--gold);
  font-weight: 600;
}

.nav-item-icon {
  font-size: 1.1rem;
  width: 22px;
  display: flex;
  justify-content: center;
}

/* Main Content Area */
.admin-content {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  max-width: 100%;
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
}

/* Page Headers */
.page-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .page-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
  }
}

.page-title {
  font-size: 1.375rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.page-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Stat Cards (Overview Grid) */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: rgba(255, 255, 255, 0.05);
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.stat-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.25rem;
}

/* Card Containers */
.card-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.card-box.compact, .card-box-compact {
  max-width: 860px;
}

.card-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
}

.card-box-title {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Tab Bar inside Views (e.g. Member tabs) */
.sub-tabs-bar {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
}

.sub-tab-btn {
  padding: 0.5rem 1rem;
  min-height: 40px;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  white-space: nowrap;
  transition: var(--transition-fast);
}

.sub-tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.sub-tab-btn.active {
  background: var(--gold);
  color: #070d1e;
  border-color: var(--gold);
}

/* High Contrast Responsive Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.admin-table th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.admin-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.admin-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.badge-active { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-pending { background: rgba(245, 158, 11, 0.15); color: #fde047; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-expired { background: rgba(244, 63, 94, 0.15); color: #fda4af; border: 1px solid rgba(244, 63, 94, 0.3); }
.badge-locked { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.4); }
.badge-platform-youtube { background: rgba(239, 68, 68, 0.15); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-platform-tiktok { background: rgba(6, 182, 212, 0.15); color: #67e8f9; border: 1px solid rgba(6, 182, 212, 0.3); }

/* Forms & Compact Space-Saving Controls */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.form-grid.two-cols, .form-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

.form-grid.three-cols, .form-grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

@media (min-width: 640px) {
  .form-grid.two-cols, .form-grid-2 { grid-template-columns: repeat(2, 1fr); }
  .form-grid.three-cols, .form-grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.form-group {
  margin-bottom: 0.75rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-size: 0.785rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 0.25rem;
  letter-spacing: 0.01em;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  min-height: 38px;
  padding: 0.45rem 0.75rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.85rem;
  line-height: 1.4;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-textarea {
  min-height: 68px;
  resize: vertical;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
}

/* Explicit Dropdown & Option Styling (Fix White-on-White Dropdowns) */
select, .form-select {
  color-scheme: dark;
  background-color: #0d1730;
  color: #f8fafc;
  cursor: pointer;
}

select option, .form-select option {
  background-color: #0b1426;
  color: #f8fafc;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
}

select optgroup, .form-select optgroup {
  background-color: #070d1e;
  color: var(--gold);
  font-weight: 600;
}

/* Action Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 42px;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, var(--gold) 0%, #ea580c 100%);
  color: #070d1e;
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
  transition: transform var(--transition-fast);
}

.btn-primary:hover {
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 42px;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 42px;
  padding: 0.5rem 1rem;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fda4af;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--radius-md);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

.btn-sm {
  min-height: 34px;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-dialog, .modal-card {
  background: #0a1329;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-dialog.wide, .modal-card.wide { max-width: 720px; }
.modal-dialog.narrow, .modal-card.narrow { max-width: 440px; }

.modal-header {
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
}

.modal-body {
  padding: 1rem 1.15rem;
}

.modal-footer {
  padding: 0.75rem 1.15rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-dim);
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.empty-state-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.empty-state-desc {
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(10, 19, 41, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-color);
  padding: 0.4rem 0.5rem;
}

@media (max-width: 768px) {
  .admin-sidebar {
    display: none; /* Hide sidebar on mobile */
  }
  .mobile-bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
  }
  .admin-content {
    padding: 1rem;
    padding-bottom: 5rem; /* space for bottom nav */
  }
  .save-status-bar {
    display: none; /* Hemat ruang vertikal header pada layar sempit */
  }
  .header-right {
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .btn-portal-sso {
    font-size: 0.68rem !important;
    padding: 0.25rem 0.5rem !important;
  }
  .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .data-table th, .data-table td {
    white-space: nowrap;
  }
}

.mob-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  min-height: 44px;
}

.mob-nav-btn.active {
  color: var(--gold);
}

.mob-nav-icon {
  font-size: 1.2rem;
}

/* Video Preview Containers (16:9 & 9:16) */
.video-preview-wrap-16-9 {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.video-preview-wrap-9-16 {
  position: relative;
  width: 280px;
  max-width: 100%;
  margin: 0 auto;
  padding-top: 497.77px; /* 280 * 16 / 9 */
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.video-preview-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ============================================================ */
/* LANDING PAGE MANAGEMENT & PREVIEW MODAL                      */
/* ============================================================ */
.publish-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.publish-status-banner.status-published {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.4);
}

.publish-status-banner.status-draft {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.4);
}

.publish-status-banner.status-uncertain {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
}

.status-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-badge-pill.published {
  background: rgba(16, 185, 129, 0.2);
  color: #86efac;
  border: 1px solid rgba(16, 185, 129, 0.5);
}

.status-badge-pill.draft {
  background: rgba(245, 158, 11, 0.2);
  color: #fde047;
  border: 1px solid rgba(245, 158, 11, 0.5);
}

.status-badge-pill.uncertain {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.5);
}

.landing-action-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-publish-action {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-weight: 700;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  transition: var(--transition-fast);
}

.btn-publish-action:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.btn-preview-action {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: var(--cyan);
  font-weight: 600;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.btn-preview-action:hover {
  background: rgba(6, 182, 212, 0.25);
  border-color: var(--cyan);
}

.landing-grid-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
  .landing-grid-layout {
    grid-template-columns: 1fr;
  }
}

.banner-preview-box {
  width: 100%;
  height: 180px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: 0.5rem;
  position: relative;
}

.banner-preview-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  display: block;
}

.banner-preview-empty {
  color: var(--text-dim);
  font-size: 0.8rem;
  text-align: center;
  padding: 1rem;
}

/* Product Image Preview Styles */
.prod-image-preview-box {
  width: 100%;
  height: 140px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: 0.35rem;
  position: relative;
  transition: border-color 0.2s ease;
}

.prod-image-preview-box:hover {
  border-color: rgba(56, 189, 248, 0.5);
}

.prod-image-preview-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-sm);
}

.prod-image-preview-empty {
  color: var(--text-dim);
  font-size: 0.78rem;
  text-align: center;
  padding: 1rem;
  line-height: 1.4;
}

.sections-config-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
}

.sections-config-table th,
.sections-config-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.88rem;
  text-align: left;
}

.sections-config-table th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-weight: 600;
}

.locked-badge {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-style: italic;
  margin-left: 0.5rem;
}

/* In-Admin Scoped Preview Modal */
.landing-preview-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.landing-preview-modal-backdrop.active {
  display: flex;
}

.landing-preview-dialog {
  background: #0a1329;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  width: 95vw;
  max-width: 1300px;
  height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.preview-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: rgba(13, 23, 48, 0.95);
  border-bottom: 1px solid var(--border-color);
  gap: 1rem;
  flex-wrap: wrap;
}

.preview-device-switcher {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  gap: 0.25rem;
}

.preview-device-btn {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  background: transparent;
  transition: var(--transition-fast);
}

.preview-device-btn:hover {
  color: var(--text-main);
}

.preview-device-btn.active {
  background: var(--cyan);
  color: #070d1e;
}

.preview-viewport-scroll {
  flex: 1;
  overflow-y: auto;
  background: #030712;
  padding: 1.5rem 1rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.preview-stage-frame {
  background: #060c1d;
  color: #f8fafc;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  transition: width 0.3s ease, max-width 0.3s ease;
  border: 1px solid var(--border-color);
  width: 100%;
  display: flex;
  flex-direction: column;
}

.preview-stage-frame iframe {
  width: 100%;
  height: 100%;
  min-height: 72vh;
  border: none;
  display: block;
}

.preview-stage-frame.device-mobile {
  width: 375px;
  max-width: 375px;
  border: 2px solid rgba(245, 158, 11, 0.6);
  border-radius: 24px;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.preview-stage-frame.device-tablet {
  width: 768px;
  max-width: 768px;
  border: 2px solid rgba(6, 182, 212, 0.6);
  border-radius: 18px;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.8);
}

.preview-stage-frame.device-desktop {
  width: 100%;
  max-width: 1200px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.preview-notice-bar {
  background: rgba(6, 182, 212, 0.1);
  color: var(--cyan);
  font-size: 0.75rem;
  padding: 0.4rem 1rem;
  text-align: center;
  border-bottom: 1px solid rgba(6, 182, 212, 0.2);
}

/* ======================================================== */
/* IMGBB UPLOADER WIDGET & MEDIA PREVIEWS (SS MATCHING UI)   */
/* ======================================================== */
.imgbb-uploader-card {
  background: #0b1329;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1rem 1.15rem;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: all var(--transition-fast);
}

.imgbb-uploader-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
}

.imgbb-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.imgbb-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #f1f5f9;
}

.imgbb-card-badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #38bdf8;
  text-transform: uppercase;
}

.imgbb-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #94a3b8;
  text-transform: uppercase;
  margin-top: 0.15rem;
}

.imgbb-file-pill {
  background: #060b17;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  padding: 0.35rem 0.65rem;
  display: flex;
  align-items: center;
  transition: border-color var(--transition-fast);
}

.imgbb-file-pill:focus-within,
.imgbb-file-pill:hover {
  border-color: #38bdf8;
}

.imgbb-file-pill input[type="file"] {
  width: 100%;
  font-size: 0.78rem;
  color: #cbd5e1;
  background: transparent;
  border: none;
  cursor: pointer;
  outline: none;
}

.imgbb-file-pill input[type="file"]::file-selector-button {
  background: #334155;
  color: #f8fafc;
  border: none;
  padding: 0.28rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  margin-right: 0.75rem;
  transition: background 0.2s;
}

.imgbb-file-pill input[type="file"]::file-selector-button:hover {
  background: #0284c7;
  color: #ffffff;
}

.imgbb-help-text {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-bottom: 0.15rem;
}

.imgbb-url-field {
  background: #060b17 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 9999px !important;
  padding: 0.45rem 1rem !important;
  font-size: 0.8rem !important;
  color: #f1f5f9 !important;
  width: 100% !important;
  transition: border-color var(--transition-fast) !important;
}

.imgbb-url-field:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2) !important;
}

.imgbb-meta-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.35rem;
}

.imgbb-meta-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #94a3b8;
  text-transform: uppercase;
}

.imgbb-meta-info {
  font-size: 0.72rem;
  color: #64748b;
}

.media-upload-wrapper {
  margin-top: 0.5rem;
  padding: 0.65rem 0.85rem;
  border: 1px dashed rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all var(--transition-fast);
}

.media-upload-wrapper:hover {
  border-color: rgba(56, 189, 248, 0.6);
  background: rgba(15, 23, 42, 0.7);
}

.media-upload-action {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-upload-imgbb {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-upload-imgbb:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
  color: #fff;
  transform: translateY(-1px);
}

.upload-status-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  display: none;
}

.upload-status-badge.loading {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.upload-status-badge.success {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.upload-status-badge.error {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.media-preview-box {
  margin-top: 0.5rem;
  max-width: 100%;
  max-height: 200px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #030816;
  display: none;
}

.media-preview-box.has-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-preview-box img {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
}

/* ======================================================== */
/* SHOWCASE CAROUSEL / SLIDER MANAGER IN ADMIN             */
/* ======================================================== */
.slides-manager-container {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.slides-manager-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.slides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.slide-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  transition: all var(--transition-fast);
}

.slide-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.slide-card-thumb {
  width: 100%;
  height: 140px;
  border-radius: var(--radius-sm);
  background: #030816;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.slide-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-type-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #38bdf8;
}

.slide-type-badge.video {
  color: #ec4899;
}

/* FITUR COPY LINK URL DI TABEL MODUL & ADMIN */
.btn-copy-sm {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e2e8f0;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.2;
}

.btn-copy-sm:hover {
  background: rgba(0, 210, 255, 0.2);
  border-color: var(--cyan, #00d2ff);
  color: var(--cyan, #00d2ff);
}

.btn-copy-sm.copied {
  background: rgba(16, 185, 129, 0.25);
  border-color: #10b981;
  color: #34d399;
}



/* ======================================================== */
/* LANDING PAGE MONITOR & EMBEDDED SIMULATOR STYLES        */
/* ======================================================== */
.sim-frame-desktop {
  width: 100% !important;
  max-width: 1200px !important;
  height: 78vh !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px !important;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.7) !important;
}

.sim-frame-tablet {
  width: 768px !important;
  max-width: 768px !important;
  height: 78vh !important;
  border: 3px solid rgba(6, 182, 212, 0.6) !important;
  border-radius: 18px !important;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.8) !important;
}

.sim-frame-mobile {
  width: 375px !important;
  max-width: 375px !important;
  height: 78vh !important;
  border: 3px solid rgba(245, 158, 11, 0.6) !important;
  border-radius: 26px !important;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
}
