/* Nestive Dynamic UI & Assets Control Center Stylesheet */
:root {
  --bg-main: #070a13;
  --bg-card: rgba(16, 24, 44, 0.75);
  --bg-card-hover: rgba(24, 34, 62, 0.9);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(124, 58, 237, 0.4);
  --primary: #7c3aed;
  --primary-hover: #6d28d9;
  --primary-glow: rgba(124, 58, 237, 0.5);
  --accent-cyan: #38bdf8;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --sidebar-width: 280px;
  --header-height: 76px;
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Ambient Background Glows */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.25;
}
.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #7c3aed, transparent 70%);
  top: -100px;
  left: 10%;
}
.orb-2 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #38bdf8, transparent 70%);
  bottom: 0;
  right: 5%;
}
.orb-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #ec4899, transparent 70%);
  top: 40%;
  left: 45%;
}

/* Glassmorphism Panel */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Common Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  outline: none;
  text-decoration: none;
}
.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}
.btn-glow {
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  color: #ffffff;
  box-shadow: 0 4px 20px var(--primary-glow);
}
.btn-glow:hover {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  box-shadow: 0 6px 25px rgba(124, 58, 237, 0.7);
  transform: translateY(-1px);
}
.btn-primary {
  background: rgba(124, 58, 237, 0.2);
  color: #c4b5fd;
  border: 1px solid rgba(124, 58, 237, 0.4);
}
.btn-primary:hover {
  background: rgba(124, 58, 237, 0.35);
  color: #ffffff;
  border-color: #a78bfa;
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-glass);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}
.btn-block {
  width: 100%;
}
.hidden {
  display: none !important;
}

/* ==========================================================================
   1. ADMIN LOGIN VIEW
   ========================================================================== */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 10;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 440px;
  padding: 40px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(124, 58, 237, 0.3);
  position: relative;
  overflow: hidden;
}
.login-brand {
  text-align: center;
  margin-bottom: 32px;
}
.brand-icon-box {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  background: linear-gradient(135deg, #7c3aed, #38bdf8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
  margin-bottom: 16px;
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.5);
}
.login-brand h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.login-brand p {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
}

.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.form-group label i {
  color: #a78bfa;
  margin-right: 4px;
}
.label-with-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.label-with-badge label {
  margin-bottom: 0;
}
.auto-id-pill {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.input-container {
  position: relative;
  display: flex;
  align-items: center;
}
.input-container input, .form-input, .form-select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(10, 15, 29, 0.85);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 14px;
  transition: all 0.2s;
  outline: none;
}
.input-container input:focus, .form-input:focus, .form-select:focus {
  border-color: #a78bfa;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.25);
}
.eye-toggle {
  position: absolute;
  right: 14px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 15px;
}
.eye-toggle:hover {
  color: var(--text-main);
}
.login-alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 20px;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fecdd3;
}
.login-footer {
  margin-top: 28px;
  text-align: center;
}
.safe-badge {
  font-size: 12px;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.safe-badge i {
  color: var(--accent-emerald);
}

/* ==========================================================================
   2. DASHBOARD APP SHELL
   ========================================================================== */
.dashboard-wrapper {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 10;
}

/* Left Sidebar */
.app-sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-glass);
  border-top: none;
  border-bottom: none;
  border-left: none;
  border-radius: 0;
  z-index: 50;
  padding: 20px 16px;
}
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-glass);
  margin-bottom: 20px;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-icon-mini {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #7c3aed, #38bdf8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  box-shadow: 0 4px 14px var(--primary-glow);
}
.brand-title-wrap h3 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}
.version-tag {
  font-size: 11px;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}
.btn-sidebar-add {
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: #c4b5fd;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-sidebar-add:hover {
  background: #7c3aed;
  color: #fff;
}

.sidebar-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  padding: 0 8px;
  margin-bottom: 12px;
}
.btn-text-action {
  background: none;
  border: none;
  color: #a78bfa;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.btn-text-action:hover {
  color: #fff;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}
.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
  font-weight: 500;
  position: relative;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}
.nav-item.active {
  background: rgba(124, 58, 237, 0.18);
  color: #ffffff;
  font-weight: 600;
  border: 1px solid rgba(124, 58, 237, 0.3);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: #a78bfa;
}
.nav-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-item-left i {
  width: 16px;
  color: #a78bfa;
}
.nav-count-badge {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-dim);
}
.nav-item.active .nav-count-badge {
  background: rgba(124, 58, 237, 0.4);
  color: #ddd6fe;
}

/* Sidebar Footer */
.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.server-status-card {
  background: rgba(10, 15, 29, 0.6);
  border: 1px solid var(--border-glass);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.live-pulse {
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
}
.status-indicator .label {
  font-size: 11px;
  color: var(--text-main);
  font-weight: 600;
}
.endpoint-text {
  font-size: 10px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.admin-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
}
.admin-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
}
.admin-info {
  flex: 1;
  line-height: 1.2;
}
.admin-name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}
.admin-role {
  font-size: 11px;
  color: var(--accent-cyan);
}
.logout-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.2s;
}
.logout-btn:hover {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
}

/* ==========================================================================
   3. MAIN CONTENT AREA
   ========================================================================== */
.app-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  padding: 28px 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Top Navbar */
.top-navbar {
  padding: 18px 24px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.screen-title-wrap h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
}
.screen-title-wrap p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}
.navbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.search-bar {
  position: relative;
  width: 320px;
}
.search-bar i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 14px;
}
.search-bar input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  background: rgba(10, 15, 29, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  transition: all 0.2s;
}
.search-bar input:focus {
  border-color: #a78bfa;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

/* App Logo & Branding Banner */
.branding-banner {
  padding: 20px 24px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(124, 58, 237, 0.3);
  background: linear-gradient(135deg, rgba(20, 24, 50, 0.85), rgba(16, 24, 44, 0.7));
}
.branding-left {
  display: flex;
  align-items: center;
  gap: 20px;
}
.app-logo-preview-box {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  border: 2px solid rgba(124, 58, 237, 0.5);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
  cursor: pointer;
}
.app-logo-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.logo-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(124, 58, 237, 0.9);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  text-align: center;
  padding: 1px 0;
  text-transform: uppercase;
}
.branding-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 4px;
}
.branding-info h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
}
.branding-info h3 code {
  color: #c4b5fd;
  background: rgba(124, 58, 237, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 14px;
}
.branding-info p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}
.branding-actions {
  display: flex;
  gap: 10px;
}

/* Filter & Stats Row */
.filter-and-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.type-filter-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.filter-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}
.filter-chip.active {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.4), rgba(99, 102, 241, 0.3));
  border-color: #a78bfa;
  color: #ffffff;
}
.stats-counter-badge {
  font-size: 13px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--border-glass);
}
.stats-counter-badge .count-num {
  font-weight: 700;
  color: var(--accent-cyan);
}

/* ==========================================================================
   4. ASSETS GRID & CARDS
   ========================================================================== */
.assets-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}
.asset-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.asset-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 58, 237, 0.5);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 20px rgba(124, 58, 237, 0.2);
}

/* Media Preview Container on Card */
.media-preview-box {
  width: 100%;
  height: 190px;
  background: #000;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.media-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.asset-card:hover .media-preview-box img {
  transform: scale(1.04);
}
.media-preview-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Hover View Overlay on Card Thumbnail */
.media-view-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(7, 10, 19, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 5;
}
.media-preview-box:hover .media-view-overlay {
  opacity: 1;
}
.view-overlay-btn {
  background: rgba(124, 58, 237, 0.85);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  transform: translateY(6px);
  transition: transform 0.25s ease;
}
.media-preview-box:hover .view-overlay-btn {
  transform: translateY(0);
}

.format-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: var(--font-mono);
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  z-index: 6;
}
.format-badge.image { background: rgba(56, 189, 248, 0.9); color: #000; }
.format-badge.video { background: rgba(236, 72, 153, 0.9); color: #fff; }
.format-badge.svga { background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff; }
.format-badge.svg { background: rgba(16, 185, 129, 0.9); color: #000; }
.format-badge.json { background: rgba(168, 85, 247, 0.9); color: #fff; }

.screen-tag-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #e2e8f0;
  z-index: 6;
}

/* Card Body */
.card-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

/* Numeric Dynamic ID Bar (Prominent!) */
.dynamic-id-bar {
  background: rgba(10, 15, 29, 0.85);
  border: 1px solid rgba(124, 58, 237, 0.35);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s;
}
.dynamic-id-bar:hover {
  border-color: #a78bfa;
  background: rgba(124, 58, 237, 0.15);
}
.id-label-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}
.numeric-id-tag {
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  color: #ffffff;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.4);
}
.dynamic-id-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btn-copy-id {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #c4b5fd;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.btn-copy-id:hover {
  background: #7c3aed;
  color: #fff;
}

/* URL Bar */
.url-preview-bar {
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(255, 255, 255, 0.02);
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
}

/* Card Actions */
.card-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border-glass);
}
.date-tag {
  font-size: 11px;
  color: var(--text-dim);
}
.btn-group-actions {
  display: flex;
  gap: 8px;
}
.btn-icon-sm {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-icon-sm:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}
.btn-icon-sm.view:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.4);
  color: var(--accent-cyan);
}
.btn-icon-sm.delete:hover {
  background: rgba(244, 63, 94, 0.2);
  border-color: rgba(244, 63, 94, 0.4);
  color: var(--accent-rose);
}

/* Empty State */
.empty-state-card {
  padding: 60px 20px;
  text-align: center;
  border-radius: var(--radius-md);
  margin-top: 20px;
}
.empty-icon {
  font-size: 48px;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.empty-state-card h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  margin-bottom: 6px;
}
.empty-state-card p {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 400px;
  margin: 0 auto 20px;
}

/* ==========================================================================
   5. MODAL STYLING & LIVE PREVIEW BOX
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(3, 5, 12, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-card {
  width: 100%;
  max-width: 620px;
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid rgba(124, 58, 237, 0.4);
}
.modal-card.modal-sm {
  max-width: 440px;
}
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-glass);
}
.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}
.modal-icon {
  font-size: 24px;
  color: #a78bfa;
}
.modal-title-wrap h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
}
.modal-title-wrap p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover {
  color: var(--text-main);
}

.form-row {
  display: flex;
  gap: 16px;
}
.flex-1 { flex: 1; }
.req { color: var(--accent-rose); }
.mt-2 { margin-top: 8px; }

.preset-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.preset-chip {
  font-size: 11px;
  font-family: var(--font-mono);
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: #c4b5fd;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}
.preset-chip:hover {
  background: #7c3aed;
  color: #fff;
}

/* Dropzone Box */
.dropzone-box {
  border: 2px dashed rgba(124, 58, 237, 0.4);
  background: rgba(10, 15, 29, 0.5);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
}
.dropzone-box:hover, .dropzone-box.dragover {
  border-color: #a78bfa;
  background: rgba(124, 58, 237, 0.1);
}
.drop-icon-pulse {
  font-size: 32px;
  color: #a78bfa;
  margin-bottom: 10px;
}
.dropzone-content h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}
.browse-link {
  color: var(--accent-cyan);
  text-decoration: underline;
}
.dropzone-formats {
  font-size: 11px;
  color: var(--text-dim);
}

.selected-file-bar {
  margin-top: 10px;
  padding: 10px 14px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.file-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}
.file-check-icon {
  color: var(--accent-emerald);
  font-size: 16px;
}
.file-title {
  font-size: 13px;
  font-weight: 600;
  color: #d1fae5;
}
.file-size-tag {
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  margin-left: 6px;
}
.btn-clear-file {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
}
.btn-clear-file:hover {
  color: var(--accent-rose);
}

/* Modal Live Preview Card */
.modal-preview-card {
  margin-top: 14px;
  background: rgba(10, 15, 29, 0.85);
  border: 1px solid rgba(124, 58, 237, 0.4);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.preview-card-header {
  padding: 8px 14px;
  background: rgba(124, 58, 237, 0.15);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: #c4b5fd;
}
.btn-preview-expand {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-preview-expand:hover {
  background: #7c3aed;
}
.modal-preview-stage {
  min-height: 160px;
  max-height: 220px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  position: relative;
}
.modal-preview-stage img {
  max-width: 100%;
  max-height: 190px;
  object-fit: contain;
  border-radius: 6px;
}
.modal-preview-stage video {
  max-width: 100%;
  max-height: 190px;
  border-radius: 6px;
}

.url-input-wrap {
  display: flex;
  gap: 8px;
}
.url-input-wrap input {
  flex: 1;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-glass);
}

/* ==========================================================================
   6. FULL-SCREEN LIGHTBOX VIEW MODAL
   ========================================================================== */
.lightbox-card {
  width: 90vw;
  max-width: 960px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(124, 58, 237, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(124, 58, 237, 0.3);
  max-height: 90vh;
}
.lightbox-header {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-glass);
  background: rgba(10, 15, 29, 0.6);
}
.lightbox-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lightbox-badge {
  background: rgba(124, 58, 237, 0.3);
  border: 1px solid rgba(124, 58, 237, 0.5);
  color: #ddd6fe;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}
.lightbox-title-wrap h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
}
.lightbox-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lightbox-media-stage {
  flex: 1;
  min-height: 360px;
  max-height: 60vh;
  background: #02040a;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.lightbox-media-stage img {
  max-width: 100%;
  max-height: 55vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}
.lightbox-media-stage video {
  max-width: 100%;
  max-height: 55vh;
  border-radius: 8px;
}

.lightbox-footer {
  padding: 16px 24px;
  background: rgba(10, 15, 29, 0.85);
  border-top: 1px solid var(--border-glass);
}
.lightbox-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.lightbox-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.meta-label {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 600;
}
.meta-val {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  background: rgba(124, 58, 237, 0.2);
  padding: 2px 8px;
  border-radius: 4px;
}
.meta-url-val {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  max-width: 380px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btn-copy-mini {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: #c4b5fd;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-copy-mini:hover {
  background: rgba(124, 58, 237, 0.4);
  color: #fff;
}

/* ==========================================================================
   7. TOAST NOTIFICATIONS
   ========================================================================== */
.toast-stack {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}
.toast {
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(16px);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  animation: slideInToast 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.toast.success { border-color: rgba(16, 185, 129, 0.5); }
.toast.success i { color: var(--accent-emerald); }
.toast.error { border-color: rgba(244, 63, 94, 0.5); }
.toast.error i { color: var(--accent-rose); }
.toast.info { border-color: rgba(56, 189, 248, 0.5); }
.toast.info i { color: var(--accent-cyan); }

@keyframes slideInToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@media (max-width: 900px) {
  .app-sidebar {
    display: none;
  }
  .app-main {
    margin-left: 0;
    padding: 16px;
  }
  .branding-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .branding-actions {
    width: 100%;
    justify-content: flex-end;
  }
}
