/* ============================================================
 *  LAB DIP TRACKER — PREMIUM DESIGN SYSTEM (v1.0)
 *  Glassmorphic, Deep Space Theme with Fluid Animations
 * ============================================================ */

/* ── CUSTOM PROPERTIES / DESIGN TOKENS ───────────────────── */
:root {
  --font-display: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  
  /* Color Palette */
  --bg-deep: #080d19;
  --bg-card: rgba(13, 21, 39, 0.65);
  --bg-card-hover: rgba(22, 34, 61, 0.85);
  --border-light: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(99, 102, 241, 0.25);
  
  --accent: #6366f1; /* Indigo */
  --accent-glow: rgba(99, 102, 241, 0.4);
  --accent-violet: #8b5cf6; /* Violet */
  --accent-sky: #0ea5e9; /* Sky Blue */
  --accent-emerald: #10b981; /* Emerald Green */
  --accent-rose: #f43f5e; /* Rose Red */
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --shadow-premium: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);
  
  --transition-smooth: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --blur-glass: blur(16px);
}

/* ── BASE & RESET RULES ──────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ── APP LAYOUT ──────────────────────────────────────────── */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
}

/* Top Navigation Bar */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 40px;
  background: rgba(8, 13, 25, 0.7);
  backdrop-filter: var(--blur-glass);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: var(--transition-smooth);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  font-size: 32px;
  filter: drop-shadow(0 0 10px var(--accent-glow));
  animation: logoPulse 4s infinite ease-in-out;
}

.logo-text h1 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-sky);
  letter-spacing: 1px;
  display: block;
  margin-top: -2px;
}

.app-nav {
  display: flex;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px;
  border-radius: 30px;
  border: 1px solid var(--border-light);
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

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

.nav-btn.active {
  color: var(--text-primary);
  background: var(--accent);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.nav-icon {
  width: 18px;
  height: 18px;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 16px;
  border-radius: 30px;
  border: 1px solid var(--border-light);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  display: inline-block;
}

.connection-status.connected .status-indicator {
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: glowPulse 2s infinite alternate;
}

.connection-status.error .status-indicator {
  background: var(--accent-rose);
  box-shadow: 0 0 10px var(--accent-rose);
}

/* Main Workspace */
.app-main {
  flex: 1;
  padding: 40px;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ── STATS METRICS PANEL ─────────────────────────────────── */
.metrics-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  width: 100%;
}

.metric-card {
  background: var(--bg-card);
  backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-premium);
  transition: var(--transition-smooth);
  cursor: pointer; /* Makes metric cards feel clickable */
}

.metric-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  background: var(--bg-card-hover);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(99, 102, 241, 0.1);
}

.metric-icon {
  font-size: 32px;
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  transition: var(--transition-smooth);
}

.metric-card:hover .metric-icon {
  background: rgba(255, 255, 255, 0.08);
}

.active-glow {
  text-shadow: 0 0 10px var(--accent-glow);
  box-shadow: inset 0 0 15px rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3) !important;
}

.dyeing-glow {
  text-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
  box-shadow: inset 0 0 15px rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.3) !important;
}

.matching-glow {
  text-shadow: 0 0 10px rgba(14, 165, 233, 0.4);
  box-shadow: inset 0 0 15px rgba(14, 165, 233, 0.15);
  border-color: rgba(14, 165, 233, 0.3) !important;
}

.approval-glow {
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
  box-shadow: inset 0 0 15px rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3) !important;
}

.metric-info {
  flex: 1;
}

.metric-value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 2px;
}

.metric-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.metric-progress-track {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
}

.metric-progress-bar {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 1s ease-out;
}

#card-metric-active .metric-progress-bar { background: var(--accent); }
#card-metric-dyeing .metric-progress-bar { background: var(--accent-violet); }
#card-metric-matching .metric-progress-bar { background: var(--accent-sky); }
#card-metric-approval .metric-progress-bar { background: var(--accent-emerald); }

/* ── SECTIONS ────────────────────────────────────────────── */
.content-section {
  display: none;
  animation: fadeIn 0.4s ease-out forwards;
}

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

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 24px;
}

.section-title h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.section-title p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Control and Search Bar */
.control-bar {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  min-width: 320px;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 12px 16px 12px 46px;
  border-radius: 30px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: var(--transition-smooth);
}

.search-box input:focus {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
  background: var(--bg-card-hover);
}

.filter-group {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.02);
  padding: 4px;
  border-radius: 30px;
  border: 1px solid var(--border-light);
}

.filter-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-btn:hover {
  color: var(--text-primary);
}

.filter-btn.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

/* ── GLASS CARD COMPONENT ────────────────────────────────── */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  box-shadow: var(--shadow-premium);
  overflow: hidden;
  transition: var(--transition-smooth);
}

/* ── TRACKER CARD GRID & CARD DESIGN ────────────────────── */
.tracker-container {
  min-height: 400px;
}

.dips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
  width: 100%;
}

.dip-card {
  position: relative;
  overflow: visible;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.dip-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-glow);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55), 0 0 30px rgba(99, 102, 241, 0.1);
}

/* Card Completed Slide-Out Animation */
.dip-card.completed-animation {
  animation: completedCard 0.8s cubic-bezier(0.68, -0.6, 0.32, 1.6) forwards;
  pointer-events: none;
}

@keyframes completedCard {
  0% { transform: scale(1); opacity: 1; filter: blur(0); }
  30% { transform: scale(1.05); opacity: 0.9; box-shadow: 0 0 40px var(--accent-emerald); }
  100% { transform: translateY(-100px) scale(0.6); opacity: 0; filter: blur(10px); height: 0; margin-bottom: -100px; }
}

.dip-card-header {
  padding: 24px 24px 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.dip-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.dip-client {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-sky);
  background: rgba(14, 165, 233, 0.1);
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid rgba(14, 165, 233, 0.2);
}

.dip-time {
  font-size: 11px;
  color: var(--text-muted);
}

.dip-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.dip-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
  display: inline-block;
  box-shadow: 0 0 5px rgba(255,255,255,0.2);
}

/* Card Body Steps Timeline */
.dip-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.step-container {
  display: flex;
  gap: 16px;
  position: relative;
}

/* Connective step line */
.step-container:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 14px;
  top: 32px;
  bottom: -22px;
  width: 2px;
  background: rgba(255, 255, 255, 0.05);
}

.step-container.done:not(:last-child)::after {
  background: linear-gradient(to bottom, var(--accent-emerald), rgba(255, 255, 255, 0.05));
}

.step-indicator {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  z-index: 1;
  transition: var(--transition-smooth);
}

.step-container.active .step-indicator {
  background: var(--bg-deep);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

.step-container.done .step-indicator {
  background: var(--accent-emerald);
  border-color: var(--accent-emerald);
  color: var(--bg-deep);
}

.step-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.step-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.step-content h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.step-container.active h4 {
  color: var(--text-primary);
}

.step-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
}

.step-container.active .step-badge {
  background: var(--accent-glow);
  color: var(--accent-sky);
}

.step-container.done .step-badge {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

.step-container.failed .step-badge {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
}

.step-dates {
  display: flex;
  gap: 16px;
  font-size: 11px;
  color: var(--text-muted);
}

.date-planned strong, .date-actual strong {
  color: var(--text-secondary);
}

/* Step Interactions */
.step-actions {
  margin-top: 4px;
}

.btn-step {
  width: 100%;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-step:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--text-secondary);
}

.step-container.active .btn-step {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.08);
  color: var(--accent-sky);
  box-shadow: inset 0 0 10px rgba(99, 102, 241, 0.1);
}

.step-container.active .btn-step:hover {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Split Match Controls */
.match-controls {
  display: flex;
  gap: 10px;
  width: 100%;
}

.btn-match {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-match-pass:hover, .btn-match-pass.active {
  background: var(--accent-emerald);
  border-color: var(--accent-emerald);
  color: var(--bg-deep);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.btn-match-fail:hover, .btn-match-fail.active {
  background: var(--accent-rose);
  border-color: var(--accent-rose);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.3);
}

/* Image Upload Area in Card */
.card-uploader-container {
  border: 2px dashed rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.15);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.card-uploader-container:hover, .card-uploader-container.drag-over {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.03);
}

.uploader-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.uploader-prompt span.icon {
  font-size: 24px;
}

.uploader-prompt span.text {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.uploader-prompt span.sub {
  font-size: 10px;
  color: var(--text-muted);
}

.card-image-preview {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  height: 120px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.card-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.card-image-preview:hover img {
  transform: scale(1.08);
}

.preview-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-fast);
}

.card-image-preview:hover .preview-overlay {
  opacity: 1;
}

.btn-preview-zoom {
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  cursor: pointer;
  font-size: 16px;
  transition: var(--transition-fast);
}

.btn-preview-zoom:hover {
  background: #ffffff;
  color: var(--bg-deep);
  transform: scale(1.1);
}

/* Image Uploading Loader */
.uploader-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.1s linear;
}

.uploader-progress span {
  font-size: 11px;
  color: var(--text-muted);
}

/* card footer poolees */
.dip-card-footer {
  padding: 16px 24px 24px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.08);
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
}

.poi-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-weight: 600;
}

.poi-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  box-shadow: 0 0 5px var(--accent-glow);
}

.dyeing-badge {
  font-weight: 700;
  color: var(--text-secondary);
}

/* ── DATA ENTRY FORMS ────────────────────────────────────── */
.entry-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: start;
}

.entry-card {
  padding: 0;
}

.card-header-gradient {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.05));
  padding: 32px;
  border-bottom: 1px solid var(--border-light);
}

.card-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-sky);
  letter-spacing: 1.5px;
  display: inline-block;
  margin-bottom: 8px;
  background: rgba(14, 165, 233, 0.1);
  padding: 4px 10px;
  border-radius: 30px;
  border: 1px solid rgba(14, 165, 233, 0.15);
}

.card-header-gradient h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
}

.card-header-gradient p {
  font-size: 13px;
  color: var(--text-secondary);
}

.entry-form {
  padding: 32px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.form-group.full-width {
  grid-column: span 2;
}

.form-group label {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

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

.input-icon {
  position: absolute;
  left: 16px;
  font-size: 16px;
  pointer-events: none;
}

.input-wrapper input, .input-wrapper select {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-light);
  padding: 14px 16px 14px 46px;
  border-radius: 12px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: var(--transition-smooth);
}

.input-wrapper input:focus, .input-wrapper select:focus {
  border-color: var(--accent);
  background: rgba(0,0,0,0.3);
  box-shadow: var(--shadow-glow);
}

/* Custom styled selects */
.input-wrapper select {
  appearance: none;
  cursor: pointer;
}

.input-wrapper::after {
  content: '▼';
  font-size: 10px;
  color: var(--text-muted);
  position: absolute;
  right: 18px;
  pointer-events: none;
}

.input-wrapper select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Suggestions dropdown autocomplete */
.suggestions-container {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-deep);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  margin-top: 6px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 10;
  box-shadow: var(--shadow-premium);
  display: none;
}

.suggestion-item {
  padding: 12px 16px;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.suggestion-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent-sky);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  outline: none;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.btn-glowing {
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

/* Button Loaders */
.btn-loader {
  width: 18px;
  height: 18px;
  animation: rotate 1s linear infinite;
}

.btn-loader.hide {
  display: none;
}

@keyframes rotate {
  100% { transform: rotate(360deg); }
}

/* workflow details card */
.info-card {
  padding: 32px;
}

.info-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}

.workflow-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.workflow-step {
  display: flex;
  gap: 16px;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid var(--border-glow);
  color: var(--accent-sky);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-detail h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.step-detail p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── TOAST NOTIFICATIONS ──────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 32px;
  right: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1000;
  pointer-events: none;
}

.toast {
  background: rgba(13, 21, 39, 0.9);
  backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
  transform: translateY(-20px);
  opacity: 0;
  animation: toastIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  transition: all 0.4s ease;
}

@keyframes toastIn {
  to { transform: translateY(0); opacity: 1; }
}

.toast.success {
  border-left: 4px solid var(--accent-emerald);
}

.toast.error {
  border-left: 4px solid var(--accent-rose);
}

.toast.info {
  border-left: 4px solid var(--accent-sky);
}

.toast-icon {
  font-size: 18px;
}

/* ── IMAGE LIGHTBOX MODAL ────────────────────────────────── */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(8, 13, 25, 0.95);
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: var(--transition-smooth);
}

.lightbox-modal.hide {
  opacity: 0;
  pointer-events: none;
}

.lightbox-close {
  position: absolute;
  top: 32px;
  right: 32px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-light);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.lightbox-close:hover {
  background: #ffffff;
  color: var(--bg-deep);
  transform: scale(1.1);
}

.lightbox-close svg {
  width: 24px;
  height: 24px;
}

.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 90%;
  max-height: 80vh;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: scale(0.9);
  animation: lightboxZoom 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes lightboxZoom {
  to { transform: scale(1); }
}

.lightbox-caption {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* ── EMPTY STATE DESIGN ──────────────────────────────────── */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 40px;
  background: var(--bg-card);
  backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: var(--shadow-premium);
  min-height: 280px;
}

.empty-icon {
  font-size: 48px;
  filter: drop-shadow(0 0 10px rgba(255,255,255,0.05));
  margin-bottom: 8px;
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
}

.empty-state p {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 320px;
  line-height: 1.5;
}

/* ── LOADER RING ─────────────────────────────────────────── */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-deep);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}

#loading-screen.hide {
  opacity: 0;
  pointer-events: none;
}

.loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.loader-logo {
  font-size: 48px;
  animation: logoPulse 2s infinite ease-in-out;
}

.loader-ring {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(99, 102, 241, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: rotate 1s linear infinite;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.1);
}

.loader-text {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

/* ── ANIMATIONS ──────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1) rotate(0); filter: drop-shadow(0 0 5px var(--accent-glow)); }
  50% { transform: scale(1.08) rotate(5deg); filter: drop-shadow(0 0 15px var(--accent-glow)); }
}

@keyframes glowPulse {
  from { box-shadow: 0 0 5px var(--accent-emerald); }
  to { box-shadow: 0 0 15px var(--accent-emerald); }
}

/* ── RESPONSIVE DESIGN MEDIA QUERIES ──────────────────────── */
@media (max-width: 1024px) {
  .entry-layout {
    grid-template-columns: 1fr;
  }
  
  .app-header {
    padding: 16px 24px;
  }
  
  .app-main {
    padding: 24px;
  }
}

@media (max-width: 768px) {
  .app-header {
    flex-direction: column;
    gap: 16px;
    padding: 20px;
  }
  
  .header-meta {
    width: 100%;
    justify-content: center;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .control-bar {
    width: 100%;
  }
  
  .search-box {
    width: 100%;
    min-width: 100%;
  }
  
  .filter-group {
    width: 100%;
    justify-content: space-around;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .form-group.full-width {
    grid-column: span 1;
  }
  
  .form-actions {
    flex-direction: column-reverse;
  }
  
  .form-actions button {
    width: 100%;
  }
  
  .dips-grid {
    grid-template-columns: 1fr;
  }
}

/* ── ENTRY MULTI-IMAGE UPLOADER STYLES ──────────────────── */
.form-uploader-zone {
  min-height: 120px;
  padding: 20px;
  border: 2px dashed rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.15);
  border-radius: 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.form-uploader-zone:hover, .form-uploader-zone.drag-over {
  border-color: var(--accent) !important;
  background: rgba(99, 102, 241, 0.03) !important;
}

.uploader-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 12px;
  margin-top: 16px;
  width: 100%;
}

.uploader-preview-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #000;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

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

.uploader-preview-delete {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(244, 63, 94, 0.85);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  z-index: 10;
}

.uploader-preview-delete:hover {
  background: var(--accent-rose);
  transform: scale(1.1);
}
