/* ==========================================================================
   Aken Tech Solution — Admin Panel Stylesheet
   Theme: Navy Blue & White Design System
   ========================================================================== */

:root {
  --navy: #0a1f44;
  --navy-dark: #061633;
  --navy-light: #162f5f;
  --blue: #126fe8;
  --blue-hover: #0b5ecb;
  --blue-light: #eaf3ff;
  --blue-pale: #f0f6ff;
  --sky: #38bdf8;
  --text: #172033;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-focus: #93c5fd;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --success: #10b981;
  --success-bg: #ecfdf5;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px 0 rgba(10, 31, 68, 0.05);
  --shadow-md: 0 4px 12px -1px rgba(10, 31, 68, 0.08), 0 2px 6px -1px rgba(10, 31, 68, 0.04);
  --shadow-lg: 0 12px 24px -4px rgba(10, 31, 68, 0.12), 0 6px 12px -4px rgba(10, 31, 68, 0.06);
  --shadow-xl: 0 20px 35px -5px rgba(10, 31, 68, 0.18);
  --sidebar-width: 260px;
  --header-height: 68px;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background-color: var(--bg-main);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   App Layout
   -------------------------------------------------------------------------- */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
  width: var(--sidebar-width);
  background-color: var(--navy);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 4px 0 20px rgba(6, 22, 51, 0.15);
}

.sidebar-brand {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #ffffff;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #126fe8 0%, #38bdf8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.2rem;
  box-shadow: 0 4px 10px rgba(18, 111, 232, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-title {
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.brand-subtitle {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--sky);
  font-weight: 700;
}

.sidebar-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  display: none;
}
.sidebar-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-nav {
  flex: 1;
  padding: 1.25rem 0.85rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-section-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
  font-weight: 700;
  padding: 0.75rem 0.75rem 0.25rem 0.75rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-md);
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(18, 111, 232, 0.3) 0%, rgba(18, 111, 232, 0.15) 100%);
  color: #ffffff;
  border-color: rgba(56, 189, 248, 0.3);
  font-weight: 600;
}

.nav-item.active .nav-icon {
  color: var(--sky);
}

.nav-icon {
  width: 20px;
  height: 20px;
  color: #94a3b8;
  flex-shrink: 0;
  transition: color 0.2s;
}

.nav-badge {
  margin-left: auto;
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.15);
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  font-weight: 700;
  color: #e2e8f0;
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(6, 22, 51, 0.5);
}

.admin-user-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.user-meta {
  flex: 1;
  line-height: 1.2;
}
.user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #ffffff;
}
.user-role {
  font-size: 0.7rem;
  color: var(--sky);
}

.btn-sidebar-logout {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-sidebar-logout:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

/* Main Content Area */
.admin-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Header */
.admin-header {
  height: var(--header-height);
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sidebar-toggle-btn {
  background: #f1f5f9;
  border: 1px solid var(--border);
  color: var(--navy);
  padding: 0.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: none;
}
.sidebar-toggle-btn:hover {
  background: #e2e8f0;
}

.page-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.page-breadcrumb-current {
  font-weight: 700;
  color: var(--navy);
  font-size: 1.05rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-search {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search input {
  padding: 0.45rem 0.85rem 0.45rem 2.2rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  font-size: 0.82rem;
  width: 220px;
  background-color: #f8fafc;
  transition: all 0.2s ease;
  outline: none;
}

.header-search input:focus {
  width: 280px;
  background-color: #ffffff;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(18, 111, 232, 0.12);
}

.header-search-icon {
  position: absolute;
  left: 0.75rem;
  width: 15px;
  height: 15px;
  color: var(--muted);
  pointer-events: none;
}

.header-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-visit-site {
  background: var(--blue-light);
  color: var(--blue);
  border: 1px solid #bfdbfe;
}
.btn-visit-site:hover {
  background: #dbeafe;
  color: var(--blue-hover);
}

.status-indicator-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

/* Page Container */
.admin-content {
  flex: 1;
  padding: 2rem 1.75rem 4rem 1.75rem;
  max-width: 1500px;
  width: 100%;
  margin: 0 auto;
}

/* Views Container */
.view-panel {
  display: none;
  animation: fadeIn 0.25s ease-out;
}
.view-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   UI Components & Cards
   -------------------------------------------------------------------------- */
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.panel-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
}

.panel-subtitle {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, border-color 0.2s;
  overflow: hidden;
}

.admin-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

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

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
}

.card-body {
  padding: 1.5rem;
}

/* Stat Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.5rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  transition: background 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.stat-card:hover::after {
  background: var(--blue);
}

.stat-info-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.stat-info-count {
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy);
  margin-top: 0.35rem;
  line-height: 1;
}

.stat-info-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.stat-badge-trend {
  color: var(--success);
  font-weight: 600;
}

.stat-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-blue {
  background: var(--blue-light);
  color: var(--blue);
}
.stat-icon-emerald {
  background: var(--success-bg);
  color: var(--success);
}
.stat-icon-amber {
  background: var(--warning-bg);
  color: var(--warning);
}
.stat-icon-purple {
  background: #f3e8ff;
  color: #9333ea;
}

/* Disclaimer & System Alert */
.disclaimer-banner {
  background: linear-gradient(135deg, #0a1f44 0%, #0d295b 100%);
  border: 1px solid rgba(18, 111, 232, 0.4);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  color: #ffffff;
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  box-shadow: var(--shadow-md);
}

.disclaimer-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: rgba(56, 189, 248, 0.2);
  color: var(--sky);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.disclaimer-content h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.25rem;
}

.disclaimer-content p {
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.45;
}

.disclaimer-tags {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}

.disclaimer-pill {
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.12);
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  color: #e2e8f0;
}

/* Quick Actions Strip */
.quick-actions-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--blue);
  color: #ffffff;
}
.btn-primary:hover {
  background: var(--blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(18, 111, 232, 0.3);
}

.btn-secondary {
  background: #ffffff;
  border-color: var(--border);
  color: var(--navy);
}
.btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: var(--blue);
}

.btn-danger {
  background: var(--danger);
  color: #ffffff;
}
.btn-danger:hover {
  background: #dc2626;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}

/* Filter and Search Bar */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.filter-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrap input {
  padding: 0.5rem 0.85rem 0.5rem 2.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  outline: none;
  background: #ffffff;
  min-width: 240px;
}
.search-input-wrap input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(18, 111, 232, 0.12);
}

.search-input-icon {
  position: absolute;
  left: 0.75rem;
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.select-filter {
  padding: 0.5rem 2rem 0.5rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  background-color: #ffffff;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  background-size: 14px;
}
.select-filter:focus {
  border-color: var(--blue);
}

/* Data Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

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

.data-table th {
  background-color: #f8fafc;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr {
  transition: background-color 0.15s ease;
}

.data-table tbody tr:hover {
  background-color: #f8fafc;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-blue {
  background: var(--blue-light);
  color: var(--blue);
}
.badge-emerald {
  background: var(--success-bg);
  color: var(--success);
}
.badge-amber {
  background: var(--warning-bg);
  color: var(--warning);
}
.badge-slate {
  background: #f1f5f9;
  color: #475569;
}
.badge-purple {
  background: #f3e8ff;
  color: #7e22ce;
}

/* Table Item Card Elements */
.table-item-cell {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.item-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  object-fit: cover;
  flex-shrink: 0;
  background: #e2e8f0;
}

.item-details h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.15rem;
}

.item-details p {
  font-size: 0.76rem;
  color: var(--muted);
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.action-btn {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.action-btn:hover {
  background: var(--blue-light);
  color: var(--blue);
  border-color: #bfdbfe;
}

.action-btn.btn-delete:hover {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: #fecaca;
}

/* Grid Cards for Items (Alternative / Grid View) */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.25rem;
}

.item-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.item-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.item-card-media {
  position: relative;
  height: 160px;
  background: #0f172a;
  overflow: hidden;
}

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

.item-card-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
}

.item-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.item-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.35rem;
}

.item-card-desc {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1rem;
  flex: 1;
  line-height: 1.45;
}

.item-card-footer {
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border);
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-lg);
}

.empty-state-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

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

.empty-state p {
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 420px;
  margin: 0 auto 1.5rem auto;
}

/* --------------------------------------------------------------------------
   Website Preview View
   -------------------------------------------------------------------------- */
.preview-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.preview-toolbar {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.preview-page-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.preview-page-btn {
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  background: #f1f5f9;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
}

.preview-page-btn:hover {
  background: var(--blue-light);
  color: var(--blue);
}

.preview-page-btn.active {
  background: var(--blue);
  color: #ffffff;
  border-color: var(--blue);
}

.device-switcher {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border-radius: var(--radius-md);
  padding: 0.2rem;
  border: 1px solid var(--border);
}

.device-btn {
  background: transparent;
  border: none;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-sm);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
}

.device-btn.active {
  background: #ffffff;
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}

.iframe-wrapper {
  background: #0a1f44;
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  justify-content: center;
  box-shadow: var(--shadow-md);
  min-height: 650px;
  overflow: hidden;
}

.preview-frame {
  background: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  width: 100%;
  height: 650px;
  transition: width 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.preview-frame.device-tablet {
  width: 768px;
}

.preview-frame.device-mobile {
  width: 375px;
}

/* --------------------------------------------------------------------------
   Export & Deployment Hub
   -------------------------------------------------------------------------- */
.export-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.export-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.export-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--blue-light);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.export-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.35rem;
}

.export-card p {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  flex: 1;
  line-height: 1.45;
}

.guide-step-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.guide-step-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--navy);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guide-step-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
}

.code-block {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  overflow-x: auto;
  position: relative;
  margin: 0.75rem 0;
  line-height: 1.5;
}

.code-copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #e2e8f0;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  cursor: pointer;
}
.code-copy-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* --------------------------------------------------------------------------
   Modals
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 31, 68, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
}

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

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 620px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

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

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close-btn:hover {
  color: var(--navy);
  background: #f1f5f9;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

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

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.35rem;
}

.form-label .required {
  color: var(--danger);
}

.form-control {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--text);
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}

.form-control:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(18, 111, 232, 0.12);
}

.form-control.is-invalid {
  border-color: var(--danger);
}

.form-error-msg {
  font-size: 0.75rem;
  color: var(--danger);
  margin-top: 0.25rem;
  display: none;
}
.form-control.is-invalid + .form-error-msg {
  display: block;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

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

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
}

.toast {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--navy);
  pointer-events: auto;
  animation: toastSlideIn 0.25s ease-out;
  min-width: 280px;
  max-width: 380px;
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.toast-success {
  border-left: 4px solid var(--success);
}
.toast-error {
  border-left: 4px solid var(--danger);
}
.toast-info {
  border-left: 4px solid var(--blue);
}

/* Card Preview in Modal */
.preview-card-render {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 5px 18px rgba(10, 31, 68, 0.06);
  padding: 1.5rem;
  max-width: 420px;
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   File Upload & Media Management Styles
   -------------------------------------------------------------------------- */
.file-upload-box {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.file-upload-box:hover {
  border-color: var(--blue);
  background: #f0f7ff;
}

.file-preview-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.file-preview-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.file-preview-meta {
  flex: 1;
  min-width: 0;
}

.file-preview-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-remove-btn {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid #fecaca;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.15s;
}

.file-remove-btn:hover {
  background: var(--danger);
  color: #ffffff;
}

/* Bulk Actions Bar */
.bulk-actions-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: #0a1f44;
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  box-shadow: var(--shadow-md);
  animation: slideDown 0.2s ease-out;
}

.bulk-actions-bar.active {
  display: flex;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.bulk-actions-info {
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bulk-actions-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Custom Checkbox */
.admin-checkbox {
  width: 17px;
  height: 17px;
  border-radius: 4px;
  cursor: pointer;
  accent-color: var(--blue);
}

/* Status Switch Toggle */
.status-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  user-select: none;
}

.status-pill-toggle {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
}

.status-pill-active {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.status-pill-draft {
  background: #f1f5f9;
  color: #64748b;
  border-color: #cbd5e1;
}

/* Media Gallery Cards */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

.media-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all 0.2s;
  position: relative;
}

.media-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.media-card-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: #0f172a;
}

.media-card-body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.media-card-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25rem;
}

.media-card-meta {
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.media-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

/* Inquiries Message Box */
.inquiry-message-card {
  background: #f8fafc;
  border-left: 3px solid var(--blue);
  padding: 0.85rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 0.5rem 0;
  font-size: 0.82rem;
  color: #334155;
  line-height: 1.5;
}

/* Settings Form Sections */
.settings-section-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.settings-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.35rem;
}

.settings-section-desc {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }

  .admin-sidebar.open {
    transform: translateX(0);
  }

  .sidebar-close-btn {
    display: block;
  }

  .admin-main {
    margin-left: 0;
  }

  .sidebar-toggle-btn {
    display: inline-flex;
  }

  .header-search input {
    width: 180px;
  }
}

@media (max-width: 640px) {
  .admin-header {
    padding: 0 1rem;
  }

  .admin-content {
    padding: 1.25rem 1rem 3rem 1rem;
  }

  .header-search {
    display: none;
  }

  .form-row-2 {
    grid-template-columns: 1fr;
  }

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

  .panel-actions {
    width: 100%;
  }

  .panel-actions .btn {
    flex: 1;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input-wrap input {
    width: 100%;
    min-width: 0;
  }

  .preview-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}
