/* ==========================================================================
   Serioplast Quality Defect Book — Main Design System & Glassmorphism Theme
   ========================================================================== */

:root {
  --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;

  /* Serioplast Brand & Category Colors */
  --serioplast-green: #277737;
  --serioplast-green-light: #34a849;
  --serioplast-green-dark: #1b5325;
  
  /* Pill Button Color Tokens */
  --pill-ebm-bg: linear-gradient(135deg, #1e5628, #2e7d32);
  --pill-ebm-glow: rgba(46, 125, 50, 0.4);

  --pill-im-bg: linear-gradient(135deg, #2b78b5, #3182ce);
  --pill-im-glow: rgba(49, 130, 206, 0.4);

  --pill-sbm-bg: linear-gradient(135deg, #e67300, #ed8936);
  --pill-sbm-glow: rgba(237, 137, 54, 0.4);

  --pill-ibm-bg: linear-gradient(135deg, #d9534f, #e53e3e);
  --pill-ibm-glow: rgba(229, 62, 62, 0.4);

  /* Glassmorphism Tokens */
  --glass-card-bg: rgba(246, 248, 250, 0.72);
  --glass-card-border: rgba(255, 255, 255, 0.85);
  --glass-card-shadow: 0 25px 60px rgba(0, 0, 0, 0.28), inset 0 0 20px rgba(255, 255, 255, 0.5);

  --text-dark: #1e293b;
  --text-muted: #475569;
  --text-light: #64748b;
  
  --bg-dark-overlay: rgba(15, 23, 42, 0.35);
  --border-radius-lg: 24px;
  --border-radius-pill: 50px;

  --transition-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font-primary);
  color: var(--text-dark);
  background-color: #0f172a;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Fullscreen Factory Background */
.app-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
}

.bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.95) contrast(1.05);
}

.bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.15) 0%, rgba(15, 23, 42, 0.45) 100%);
}

/* Top Navigation Bar */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2.5rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.serioplast-hero-brand, .brand-logo-fallback {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.8rem;
  color: var(--serioplast-green);
  letter-spacing: 0.5px;
}

.brand-sub {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 500;
  padding-left: 0.75rem;
  border-left: 2px solid #cbd5e1;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

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

.search-box i {
  position: absolute;
  left: 1rem;
  color: #94a3b8;
  font-size: 0.95rem;
}

.search-box input {
  padding: 0.6rem 2.5rem 0.6rem 2.5rem;
  border-radius: 40px;
  border: 1px solid #cbd5e1;
  background: rgba(255, 255, 255, 0.9);
  width: 280px;
  font-size: 0.9rem;
  transition: all 0.25s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--serioplast-green);
  box-shadow: 0 0 0 3px rgba(39, 119, 55, 0.15);
  width: 320px;
}

.search-kbd {
  position: absolute;
  right: 0.85rem;
  font-size: 0.75rem;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  color: #64748b;
}

.btn-nav {
  padding: 0.6rem 1.25rem;
  border-radius: 30px;
  border: 1px solid #cbd5e1;
  background: white;
  color: var(--text-dark);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.25s ease;
}

.btn-nav:hover {
  background: #f8fafc;
  transform: translateY(-1px);
}

.btn-primary-nav {
  background: var(--serioplast-green);
  color: white;
  border-color: var(--serioplast-green);
}

.btn-primary-nav:hover {
  background: var(--serioplast-green-dark);
  color: white;
  box-shadow: 0 4px 12px rgba(39, 119, 55, 0.3);
}

.btn-outline-nav {
  border-color: var(--serioplast-green);
  color: var(--serioplast-green);
}

.btn-outline-nav:hover {
  background: rgba(39, 119, 55, 0.08);
}

/* Main Layout Container */
.main-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

/* ==========================================================================
   HERO SECTION: Exact match to user reference screenshot design
   ========================================================================== */

.hero-section {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 0;
}

.hero-glass-card {
  position: relative;
  width: 100%;
  max-width: 820px;
  background: var(--glass-card-bg);
  backdrop-filter: blur(20px) saturate(170%);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  border: 1px solid var(--glass-card-border);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--glass-card-shadow);
  padding: 2.75rem 3.5rem 3.5rem 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

/* Technical Overlay Graphics */
.tech-blueprint-left {
  position: absolute;
  left: 20px;
  top: 65px;
  width: 125px;
  height: 160px;
  pointer-events: none;
  opacity: 0.45;
}

.tech-chart-right {
  position: absolute;
  right: 25px;
  top: 50px;
  width: 120px;
  height: 120px;
  pointer-events: none;
  opacity: 0.45;
}

.tech-stamps-bottom {
  position: absolute;
  right: 30px;
  bottom: 25px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  opacity: 0.55;
  pointer-events: none;
}

.qc-stamp-box {
  border: 1px solid rgba(0,0,0,0.35);
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(0,0,0,0.65);
  background: rgba(255,255,255,0.4);
}

.qc-stamp-box.quality-100 {
  flex-direction: column;
  align-items: center;
  padding: 0.3rem 0.5rem;
  line-height: 1.1;
}

.stamp-bold {
  font-weight: 700;
  font-size: 0.85rem;
}

.stamp-sub {
  font-size: 0.68rem;
  letter-spacing: 0.5px;
}

/* Ruler Markers */
.tech-ruler-left {
  position: absolute;
  left: 12px;
  top: 150px;
  bottom: 40px;
  width: 6px;
  border-left: 1px stroke rgba(0,0,0,0.25);
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0.3) 0px, rgba(0,0,0,0.3) 1px, transparent 1px, transparent 8px);
  opacity: 0.3;
}

.tech-ruler-bottom {
  position: absolute;
  left: 140px;
  bottom: 12px;
  width: 180px;
  height: 6px;
  background: repeating-linear-gradient(to right, rgba(0,0,0,0.3) 0px, rgba(0,0,0,0.3) 1px, transparent 1px, transparent 8px);
  opacity: 0.3;
}

/* Header inside Card */
.hero-card-header {
  text-align: center;
  margin-bottom: 2.5rem;
  z-index: 2;
  position: relative;
  width: 100%;
}

.card-logo-container {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  margin-bottom: 0.75rem;
}

.header-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(0,0,0,0.12), transparent);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-primary);
  font-size: 1.68rem;
  font-weight: 700;
  color: #2d3748;
  letter-spacing: -0.2px;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.hero-subtitle {
  font-size: 0.98rem;
  color: #4a5568;
  font-weight: 400;
}

/* Category Pill Buttons Grid */
.category-pills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem 2rem;
  width: 100%;
  max-width: 680px;
  z-index: 2;
  margin-top: 0.5rem;
}

.category-pill {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 2rem;
  border-radius: var(--border-radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: white;
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 1.22rem;
  cursor: pointer;
  transition: all 0.3s var(--transition-smooth);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  outline: none;
}

.category-pill:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.25);
}

.category-pill:active {
  transform: translateY(-2px) scale(0.99);
}

/* Individual Pill Color Schemes */
.pill-ebm {
  background: var(--pill-ebm-bg);
}
.pill-ebm:hover {
  box-shadow: 0 12px 30px var(--pill-ebm-glow);
}

.pill-im {
  background: var(--pill-im-bg);
}
.pill-im:hover {
  box-shadow: 0 12px 30px var(--pill-im-glow);
}

.pill-sbm {
  background: var(--pill-sbm-bg);
}
.pill-sbm:hover {
  box-shadow: 0 12px 30px var(--pill-sbm-glow);
}

.pill-ibm {
  background: var(--pill-ibm-bg);
}
.pill-ibm:hover {
  box-shadow: 0 12px 30px var(--pill-ibm-glow);
}

.pill-text {
  letter-spacing: 0.3px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

.pill-badge {
  position: absolute;
  right: 1.25rem;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  border-radius: 20px;
  padding: 0.15rem 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
}

/* ==========================================================================
   DEFECT CATALOG & GRID SECTION
   ========================================================================== */

.catalog-section {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-radius: var(--border-radius-lg);
  padding: 2rem 2.5rem;
  border: 1px solid rgba(255,255,255,0.8);
  box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.catalog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #e2e8f0;
  flex-wrap: wrap;
  gap: 1rem;
}

.catalog-title-group h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--text-dark);
}

.catalog-title-group p {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Filter Tabs */
.filter-tabs {
  display: flex;
  gap: 0.5rem;
  background: #f1f5f9;
  padding: 0.35rem;
  border-radius: 30px;
}

.filter-tab {
  padding: 0.5rem 1.1rem;
  border-radius: 20px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.filter-tab.active {
  background: white;
  color: var(--serioplast-green);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.filter-tab:hover:not(.active) {
  color: var(--text-dark);
}

/* Defects Card Grid */
.defects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.defect-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s var(--transition-smooth);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.defect-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.1);
  border-color: #cbd5e1;
}

.defect-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.badge-category {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 12px;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-ebm { background: #277737; }
.badge-im { background: #3182ce; }
.badge-sbm { background: #ed8936; }
.badge-ibm { background: #e53e3e; }

.badge-severity {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
}

.badge-severity.High {
  background: #fee2e2;
  color: #991b1b;
}

.defect-card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.defect-card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.defect-card-preview-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 1rem;
  border: 1px solid #f1f5f9;
}

.defect-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.85rem;
  border-top: 1px solid #f1f5f9;
  font-size: 0.8rem;
  color: var(--text-light);
}

.meta-stats {
  display: flex;
  gap: 0.85rem;
}

.meta-stats span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-view-card {
  color: var(--serioplast-green);
  font-weight: 600;
  font-size: 0.85rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

.empty-icon {
  font-size: 3rem;
  color: #cbd5e1;
  margin-bottom: 1rem;
}

/* ==========================================================================
   ANALYTICS SECTION
   ========================================================================== */

.analytics-section {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  border-radius: var(--border-radius-lg);
  padding: 2rem 2.5rem;
  box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.analytics-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.analytics-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.icon-green { background: #e6f4ea; color: #277737; }
.icon-blue { background: #ebf8ff; color: #3182ce; }
.icon-orange { background: #fffaf0; color: #ed8936; }
.icon-coral { background: #fff5f5; color: #e53e3e; }

.stat-number {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-dark);
  display: block;
}

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

.analytics-charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.chart-box {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.5rem;
}

.chart-box h3 {
  font-size: 1.05rem;
  color: var(--text-dark);
  margin-bottom: 1.25rem;
}

.bar-chart-container {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.bar-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.bar-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
}

.bar-track {
  height: 10px;
  background: #f1f5f9;
  border-radius: 5px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.8s ease;
}

/* ==========================================================================
   MODAL WINDOWS (DETAIL & EDIT)
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: white;
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
  width: 90%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.97);
  transition: all 0.3s var(--transition-smooth);
}

.modal-backdrop.active .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-lg { max-width: 850px; }
.modal-md { max-width: 600px; }

.modal-header {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
}

.modal-title-box {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.modal-title-box h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--text-dark);
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: #e2e8f0;
  color: var(--text-dark);
}

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

.modal-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 1.5rem;
}

.modal-tab {
  padding: 0.65rem 1.1rem;
  border: none;
  background: transparent;
  border-bottom: 2px solid transparent;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;

}

.modal-tab.active {
  color: var(--serioplast-green);
  border-bottom-color: var(--serioplast-green);
}

.tab-content {
  display: none;
}

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

.section-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.defect-description-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #334155;
}

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

.media-thumb {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.media-thumb:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 18px rgba(0,0,0,0.15);
}

/* Data Tables */
.table-responsive {
  overflow-x: auto;
}

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

.data-table th, .data-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.9rem;
}

.data-table th {
  background: #f1f5f9;
  font-weight: 700;
  color: var(--text-dark);
}

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

/* CAPA Lists */
.capa-dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.capa-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.capa-list li {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  line-height: 1.45;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

/* OPL Cards */
.opl-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.opl-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem;
  background: white;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--text-dark);
  transition: all 0.2s ease;
}

.opl-card:hover {
  border-color: var(--serioplast-green);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.opl-icon {
  font-size: 1.75rem;
  color: #ef4444;
}

.modal-footer {
  padding: 1rem 1.75rem;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  justify-content: flex-end;
  gap: 0.85rem;
}

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

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-dark);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  font-family: var(--font-primary);
  font-size: 0.9rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--serioplast-green);
  box-shadow: 0 0 0 3px rgba(39, 119, 55, 0.15);
}

/* Buttons */
.btn-primary {
  background: var(--serioplast-green);
  color: white;
  border: none;
  padding: 0.65rem 1.35rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: var(--serioplast-green-dark);
}

.btn-secondary {
  background: #f1f5f9;
  color: var(--text-dark);
  border: 1px solid #cbd5e1;
  padding: 0.65rem 1.35rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.btn-close-section {
  background: #f1f5f9;
  border: none;
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
}

/* Lightbox Modal */
.lightbox-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lightbox-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: transparent;
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
}

.lightbox-caption {
  text-align: center;
  color: white;
  margin-top: 0.75rem;
  font-size: 0.95rem;
}

/* Footer */
.app-footer {
  margin-top: 3rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-top: 1px solid #e2e8f0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-light);
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
}

/* Section Header Rows with Action Buttons */
.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.btn-sm-action {
  background: white;
  border: 1px solid #cbd5e1;
  color: var(--text-dark);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}

.btn-sm-action:hover {
  border-color: var(--serioplast-green);
  color: var(--serioplast-green);
  background: rgba(39, 119, 55, 0.05);
}

.btn-sm-warning:hover {
  border-color: #d97706;
  color: #d97706;
  background: rgba(217, 119, 6, 0.05);
}

.btn-sm-success:hover {
  border-color: #16a34a;
  color: #16a34a;
  background: rgba(22, 163, 74, 0.05);
}

.tab-highlight-add {
  color: var(--serioplast-green) !important;
  font-weight: 700 !important;
  background: rgba(39, 119, 55, 0.06);
  border-radius: 8px 8px 0 0;
}

.tab-highlight-add.active {
  background: rgba(39, 119, 55, 0.12);
}

/* Quick Add Form Container */
.quick-add-container {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.5rem;
}

.text-muted-sm {
  font-size: 0.85rem;
  color: #64748b;
  margin-top: -0.3rem;
  margin-bottom: 1rem;
}

.quick-add-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
}

.quick-add-feedback {
  font-size: 0.88rem;
  font-weight: 600;
  color: #16a34a;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-delete-item {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.btn-delete-item:hover {
  color: #ef4444;
  background: #fee2e2;
}

/* Utilities */
.mt-4 { margin-top: 1.5rem; }
.text-warning { color: #d97706; }
.text-success { color: #16a34a; }

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-glass-card {
    padding: 2rem 1.5rem;
  }
  .category-pills-grid {
    grid-template-columns: 1fr;
  }
  .analytics-charts-row, .capa-dual-grid {
    grid-template-columns: 1fr;
  }
  .tech-blueprint-left, .tech-chart-right, .tech-stamps-bottom {
    display: none;
  }
  .top-nav {
    flex-direction: column;
    gap: 1rem;
  }
}
