/* ==========================================================================
   ARTOVA STUDIOS - ADMIN DASHBOARD STYLES
   ========================================================================== */

:root {
  --bg-primary: #08090f;
  --bg-secondary: #0e111a;
  --bg-card: rgba(18, 22, 34, 0.85);
  --bg-card-hover: rgba(28, 33, 50, 0.95);
  --bg-glass: rgba(14, 18, 28, 0.75);
  
  --primary-neon: #a855f7;
  --primary-gradient: linear-gradient(135deg, #a855f7 0%, #ec4899 50%, #3b82f6 100%);
  --cyan-neon: #06b6d4;
  --cyan-glow: rgba(6, 182, 212, 0.35);
  --pink-neon: #f43f5e;
  --pink-glow: rgba(244, 63, 94, 0.35);
  --purple-glow: rgba(168, 85, 247, 0.35);
  --amber-neon: #f59e0b;
  --amber-glow: rgba(245, 158, 11, 0.35);
  --green-neon: #10b981;
  --green-glow: rgba(16, 185, 129, 0.35);
  
  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #c084fc;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(168, 85, 247, 0.3);
  --border-cyan: rgba(6, 182, 212, 0.3);

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-full: 9999px;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-neon: 0 0 25px rgba(168, 85, 247, 0.45);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
}

/* Background Grids & Orbs */
.admin-bg-grid {
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(168, 85, 247, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(6, 182, 212, 0.12) 0%, transparent 40%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
  z-index: 0;
  pointer-events: none;
}

/* Interactive Cursor Spotlight (Ultra-Light & Subtle) */
.cursor-spotlight {
  position: fixed;
  top: 0;
  left: 0;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    rgba(168, 85, 247, 0.045) 0%,
    rgba(6, 182, 212, 0.025) 45%,
    rgba(236, 72, 153, 0.01) 70%,
    transparent 85%
  );
  filter: blur(100px);
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  mix-blend-mode: screen;
  will-change: transform, opacity;
}

.cursor-spotlight.active {
  opacity: 0.65;
}

/* Card Surface Illumination */
.panel-card, .login-card, .stat-card, .sketch-card {
  position: relative;
  overflow: hidden;
}

.panel-card::before, .login-card::before, .stat-card::before, .sketch-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(168, 85, 247, 0.035),
    rgba(6, 182, 212, 0.015) 40%,
    transparent 70%
  );
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 1;
}

.panel-card:hover::before, .login-card:hover::before, .stat-card:hover::before, .sketch-card:hover::before {
  opacity: 0.75;
}

/* ==========================================================================
   LOGIN SCREEN
   ========================================================================== */
.login-wrapper {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-neon);
  animation: cardFadeIn 0.5s ease-out forwards;
}

@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--primary-gradient);
  border-radius: 14px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 26px;
  color: #fff;
  margin-bottom: 14px;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.6);
}

.login-title {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}

.login-badge {
  display: inline-block;
  background: rgba(168, 85, 247, 0.15);
  color: var(--text-accent);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-top: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: rgba(10, 13, 22, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
  outline: none;
}

.form-control:focus {
  border-color: var(--primary-neon);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.25);
  background: rgba(15, 20, 32, 0.95);
}

.form-control::placeholder {
  color: var(--text-muted);
}

select.form-control {
  cursor: pointer;
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--primary-gradient);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.6);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger-outline {
  padding: 6px 12px;
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.3);
  border-radius: var(--radius-xs);
  color: var(--pink-neon);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-danger-outline:hover {
  background: rgba(244, 63, 94, 0.25);
  border-color: var(--pink-neon);
}

.alert-box {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

.alert-error {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fda4af;
}

.alert-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

/* Quick hint info */
.login-hint {
  margin-top: 18px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
  border-radius: var(--radius-xs);
  border: 1px dashed var(--border-subtle);
}

.login-hint strong {
  color: var(--cyan-neon);
}

/* ==========================================================================
   DASHBOARD LAYOUT
   ========================================================================== */
.dashboard-layout {
  position: relative;
  z-index: 10;
  display: none; /* hidden until logged in */
  min-height: 100vh;
  flex-direction: column;
}

/* Header / Navbar */
.admin-navbar {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 14px 28px;
}

.navbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-logo-small {
  width: 38px;
  height: 38px;
  background: var(--primary-gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: #fff;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.5);
}

.brand-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.nav-user-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--green-neon);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.status-dot {
  width: 7px;
  height: 7px;
  background: var(--green-neon);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--green-neon);
}

/* Dashboard Container */
.dashboard-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 24px;
  width: 100%;
  flex: 1;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.25s ease;
}

.stat-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
}

.stat-info h4 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.stat-info .stat-number {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--text-main);
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
}

/* Tabs */
.tabs-nav {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 24px;
  overflow-x: auto;
}

.tab-btn {
  padding: 12px 20px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  color: var(--primary-neon);
  border-bottom-color: var(--primary-neon);
}

.tab-content {
  display: none;
  animation: tabFade 0.3s ease-out forwards;
}

.tab-content.active {
  display: block;
}

@keyframes tabFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   UPLOAD FORM PANEL
   ========================================================================== */
.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 900px) {
  .grid-2col {
    grid-template-columns: 1fr;
  }
}

.panel-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 28px;
}

.panel-header {
  margin-bottom: 22px;
}

.panel-title {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-subtitle {
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 4px;
}

/* File Drop Zone */
.dropzone {
  border: 2px dashed var(--border-glow);
  border-radius: var(--radius-sm);
  padding: 28px 20px;
  text-align: center;
  background: rgba(168, 85, 247, 0.03);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--cyan-neon);
  background: rgba(6, 182, 212, 0.08);
}

.dropzone-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.dropzone-title {
  font-weight: 700;
  font-size: 14px;
}

.dropzone-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

#sketchFileInput {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

/* Image Preview Box */
.preview-box {
  margin-top: 14px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #000;
  display: none;
  position: relative;
  text-align: center;
}

.preview-box img {
  max-width: 100%;
  max-height: 260px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.preview-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.7);
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 600;
  color: var(--cyan-neon);
  border: 1px solid var(--border-cyan);
}

/* Switch & Checkbox styling */
.switches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 18px 0;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.switch-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.switch-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-neon);
  cursor: pointer;
}

/* Progress bar */
.upload-progress-container {
  display: none;
  margin-top: 14px;
}

.upload-progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.upload-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--primary-gradient);
  transition: width 0.2s ease;
}

.progress-text {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  text-align: right;
}

/* ==========================================================================
   SKETCHES MANAGER / TABLE
   ========================================================================== */
.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.search-box {
  position: relative;
  min-width: 260px;
}

.search-box input {
  padding-left: 36px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* Sketches Grid View */
.sketches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.sketch-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.sketch-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
}

.sketch-thumb-wrapper {
  position: relative;
  height: 180px;
  background: #05060a;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sketch-thumb-wrapper img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.sketch-card:hover .sketch-thumb-wrapper img {
  transform: scale(1.05);
}

.badge-tag-container {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}

.badge-chip {
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-premium {
  background: linear-gradient(135deg, #f59e0b, #ec4899);
  color: #fff;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.badge-featured {
  background: rgba(168, 85, 247, 0.9);
  color: #fff;
}

.badge-new {
  background: var(--cyan-neon);
  color: #000;
}

.badge-active {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid var(--green-neon);
  color: var(--green-neon);
  z-index: 2;
}

.badge-inactive {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 600;
  background: rgba(244, 63, 94, 0.2);
  border: 1px solid var(--pink-neon);
  color: var(--pink-neon);
  z-index: 2;
}

.sketch-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sketch-card-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sketch-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.sketch-meta-chip {
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.sketch-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  gap: 8px;
}

.btn-icon-action {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon-action:hover {
  background: rgba(168, 85, 247, 0.2);
  border-color: var(--primary-neon);
  color: var(--primary-neon);
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #1e293b;
  border: 1px solid var(--border-glow);
  color: #fff;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-neon);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  animation: toastSlide 0.3s ease-out forwards;
}

@keyframes toastSlide {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.6;
}

/* ==========================================================================
   BULK JSON & THUMBNAIL STYLING
   ========================================================================== */
.btn-mock {
  padding: 8px 14px;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid var(--border-glow);
  color: var(--text-accent);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-mock:hover {
  background: rgba(168, 85, 247, 0.3);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
}

.json-editor-area {
  width: 100%;
  min-height: 220px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  background: rgba(5, 7, 12, 0.9);
  color: #a5f3fc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 16px;
  line-height: 1.5;
  tab-size: 2;
  white-space: pre;
}

.json-preview-table-wrapper {
  max-height: 380px;
  overflow-y: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: rgba(10, 13, 20, 0.6);
  margin-top: 16px;
}

.json-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.json-preview-table th {
  position: sticky;
  top: 0;
  background: #121724;
  padding: 12px 14px;
  color: var(--text-secondary);
  font-weight: 600;
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1;
}

.json-preview-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.json-preview-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.table-thumb {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  background: #000;
  display: block;
}

.badge-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-neon);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-left: 6px;
}

.btn-cyan {
  background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  color: #fff;
  border: none;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4);
}

.btn-cyan:hover {
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.6);
}

/* ==========================================================================
   CATEGORIES SHOWCASE & MANAGER STYLES
   ========================================================================== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.category-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.category-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}

.category-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid var(--border-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  overflow: hidden;
  flex-shrink: 0;
}

.category-icon-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: var(--text-main);
  margin-bottom: 2px;
}

.category-card-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--cyan-neon);
}

.category-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 16px;
  flex: 1;
}

.category-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  gap: 8px;
}

.category-count-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.category-count-badge strong {
  color: var(--primary-neon);
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
}

/* ==========================================================================
   LEARN TO DRAW (STEP-BY-STEP) MANAGER
   ========================================================================== */
.learning-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}

.learning-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.learning-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -8px rgba(168, 85, 247, 0.25);
}

/* 2x2 Quadrant Image Preview (matches Android app's LearningDrawingCard) */
.learning-quad-preview {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 3px;
  background: rgba(10, 12, 20, 0.9);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

.quad-cell {
  position: relative;
  width: 100%;
  height: 100%;
  background: rgba(22, 27, 44, 0.7);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quad-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.learning-card:hover .quad-cell img {
  transform: scale(1.05);
}

.quad-num {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.quad-empty {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  padding: 8px;
}

/* Difficulty Badges */
.badge-diff {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.badge-diff-easy {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-diff-medium {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-diff-high {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Learning Card Info */
.learning-card-info {
  margin-top: 14px;
  flex: 1;
}

.learning-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.learning-card-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.learning-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 12px;
}

.learning-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  gap: 8px;
}

/* Step URL Dynamic Input Row */
.step-url-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.step-url-badge {
  flex-shrink: 0;
  width: 64px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-accent);
  background: rgba(168, 85, 247, 0.1);
  padding: 6px 8px;
  border-radius: var(--radius-xs);
  text-align: center;
  border: 1px solid var(--border-glow);
}

/* Modal Step Preview Backdrop & Card */
.learning-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.learning-modal-card {
  width: 100%;
  max-width: 620px;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleUp {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.learning-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(14, 18, 28, 0.6);
}

.learning-modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.modal-image-stage {
  width: 100%;
  max-height: 380px;
  aspect-ratio: 1;
  background: #090a10;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.modal-image-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.modal-steps-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  max-width: 100%;
  padding: 4px;
}

.modal-step-thumb {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  overflow: hidden;
  background: #111422;
  position: relative;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.modal-step-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-step-thumb.active {
  border-color: var(--primary-neon);
  box-shadow: 0 0 12px var(--purple-glow);
  transform: scale(1.05);
}

.modal-step-thumb span {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: rgba(0, 0, 0, 0.7);
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  padding: 1px 4px;
  border-radius: 4px;
}

.learning-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(14, 18, 28, 0.6);
}




/* ==========================================================================
   SKETCHES LIBRARY - IMAGE URL MANAGEMENT & MODALS
   ========================================================================== */

.sketch-thumb-edit-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(8, 9, 15, 0.88);
  border: 1px solid var(--cyan-neon);
  color: var(--cyan-neon);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.sketch-card:hover .sketch-thumb-edit-btn {
  opacity: 1;
  transform: translateY(0);
}

.sketch-thumb-edit-btn:hover {
  background: var(--cyan-neon);
  color: #05060a;
  box-shadow: 0 0 12px var(--cyan-glow);
}

.sketch-url-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 4px 8px;
  margin-bottom: 10px;
  font-size: 11px;
  gap: 6px;
}

.sketch-url-truncate {
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10.5px;
  flex: 1;
}

.sketch-url-edit-link {
  color: var(--cyan-neon);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
  transition: color 0.2s;
  padding: 0 2px;
}

.sketch-url-edit-link:hover {
  text-decoration: underline;
  color: #38bdf8;
}

.btn-icon-action.btn-action-edit:hover {
  background: rgba(6, 182, 212, 0.2);
  border-color: var(--cyan-neon);
  color: var(--cyan-neon);
}

.batch-diff-item {
  border-bottom: 1px solid var(--border-subtle);
  padding: 8px 10px;
  font-size: 12px;
  transition: background 0.15s ease;
}

.batch-diff-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.batch-diff-item:last-child {
  border-bottom: none;
}
