/* ==========================================================================
   KJØKKENMAGI STYLE SYSTEM – CUSTOM STYLING
   ========================================================================== */

:root {
  /* Brand Colors from butikk.kjøkkenmagi.no */
  --bg-sage-light: #B8C9B9;
  --fg-olive-dark: #525C4B;
  --heading-olive: #7A8A6F;
  --accent-terracotta: #BD6B42;
  --accent-gold: #D29F68;
  
  /* Neutral Palette */
  --bg-cream: #FAF6F0;
  --bg-cream-dark: #F3ECE2;
  --text-charcoal: #2C2B2A;
  --text-muted: #6B6864;
  --white: #FFFFFF;
  --border-color: rgba(82, 92, 75, 0.15);
  
  /* UI Shadows & Radius */
  --shadow-sm: 0 2px 8px rgba(44, 43, 42, 0.05);
  --shadow-md: 0 8px 24px rgba(44, 43, 42, 0.08);
  --shadow-lg: 0 16px 40px rgba(44, 43, 42, 0.12);
  --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.03);
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  
  /* Fonts */
  --font-sans: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, Cambria, serif;
  
  /* Animations */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-sans);
  background-color: #E2E8E4; /* Soft backing frame color for simulator */
  color: var(--text-charcoal);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Icons */
.icon {
  width: 18px;
  height: 18px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ==========================================================================
   SIMULATOR FRAMEWORK (APP BRIDGE SIMULATOR BAR)
   ========================================================================== */
.simulator-bar {
  background-color: var(--text-charcoal);
  color: var(--white);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border-bottom: 2px solid var(--accent-terracotta);
}

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

.sim-badge {
  background-color: var(--accent-terracotta);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
}

.sim-shop-url {
  font-size: 0.85rem;
  font-family: var(--font-sans);
  opacity: 0.75;
  font-weight: 500;
}

.sim-nav {
  display: flex;
  gap: 8px;
}

.sim-nav-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.75);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.87rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
  position: relative;
}

.sim-nav-btn:hover {
  color: var(--white);
  background-color: rgba(255, 255, 255, 0.08);
}

.sim-nav-btn.active {
  color: var(--white);
  background-color: rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-sm);
}

.sim-nav-btn.active::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: var(--accent-terracotta) transparent transparent transparent;
}

/* Badges on simulator tabs */
.admin-badge, .library-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background-color: var(--accent-terracotta);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  animation: pulse-badge 2.5s infinite;
}

.library-badge {
  background-color: var(--heading-olive);
}

@keyframes pulse-badge {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); box-shadow: 0 0 10px rgba(189, 107, 66, 0.4); }
  100% { transform: scale(1); }
}

/* Main Workspace Router Wrapper */
.main-workspace {
  flex: 1;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.view-panel {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.view-panel.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   1. CUSTOMER STOREFRONT LAYOUTS
   ========================================================================== */
.storefront-container {
  background-color: var(--bg-cream);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid rgba(82, 92, 75, 0.08);
}

/* Store Header */
.store-header {
  background-color: var(--white);
  padding: 30px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 15px;
}

.store-brand h1 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--fg-olive-dark);
  letter-spacing: -0.01em;
}

.store-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 500;
  margin-top: 4px;
}

.store-meta-nav {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  gap: 10px;
}

.store-meta-nav .separator {
  opacity: 0.4;
}

/* Store Hero */
.store-hero {
  background-image: url('https://images.unsplash.com/photo-1556910103-1c02745aae4d?q=80&w=1200&auto=format&fit=crop');
  background-size: cover;
  background-position: center;
  position: relative;
  padding: 60px 40px;
  color: var(--white);
}

/* If background photo fails, fallback gracefully to gorgeous sage-gradient background */
.store-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--fg-olive-dark) 0%, var(--heading-olive) 100%);
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(44, 43, 42, 0.4);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 650px;
}

.hero-label {
  display: inline-block;
  background-color: var(--accent-terracotta);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 15px;
  letter-spacing: 0.05em;
}

.hero-content h2 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 12px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

.hero-content p {
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.95;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Course Toggles */
.course-type-toggles {
  display: flex;
  background-color: var(--bg-cream-dark);
  padding: 8px;
  gap: 8px;
  justify-content: center;
  border-bottom: 1px solid var(--border-color);
}

.toggle-btn {
  background: transparent;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

.toggle-btn:hover {
  color: var(--fg-olive-dark);
}

.toggle-btn.active {
  background-color: var(--white);
  color: var(--fg-olive-dark);
  box-shadow: var(--shadow-sm);
}

/* Course Grid Panels */
.course-tab-content {
  display: none;
  padding: 40px;
  animation: fadeIn var(--transition-normal);
}

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

.course-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 30px;
  align-items: start;
}

@media (max-width: 900px) {
  .course-grid {
    grid-template-columns: 1fr;
  }
}

/* Course Details Card */
.course-details-card {
  background-color: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.course-media {
  position: relative;
  background-color: var(--bg-cream);
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.course-svg-art {
  width: 100%;
  height: 100%;
}

.course-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: var(--accent-terracotta);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.05em;
}

.course-text {
  padding: 30px;
}

.course-text h3 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--fg-olive-dark);
  margin-bottom: 8px;
}

.price-tag {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent-terracotta);
  margin-bottom: 20px;
}

.per-unit {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
  vertical-align: middle;
}

.features-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 25px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.f-icon {
  width: 18px;
  height: 18px;
  color: var(--heading-olive);
  flex-shrink: 0;
  margin-top: 2px;
}

.locked-resource-notice {
  background-color: var(--bg-cream);
  border-radius: var(--radius-sm);
  padding: 15px;
  border-left: 4px solid var(--accent-terracotta);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.lock-icon {
  width: 20px;
  height: 20px;
  color: var(--accent-terracotta);
  flex-shrink: 0;
  margin-top: 1px;
}

.locked-resource-notice span {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-charcoal);
}

/* Booking Widget Card */
.booking-widget-card {
  background-color: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 30px;
  border: 1px solid var(--border-color);
  position: sticky;
  top: 90px;
}

.booking-widget-card h4 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--fg-olive-dark);
  margin-bottom: 5px;
}

.widget-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 20px;
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fg-olive-dark);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.form-group select,
.form-group input[type="number"],
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-charcoal);
  transition: var(--transition-fast);
}

.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-terracotta);
  box-shadow: 0 0 0 3px rgba(189, 107, 66, 0.12);
}

.qty-selector-container {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 140px;
}

.qty-btn {
  background-color: var(--bg-cream-dark);
  border: 1px solid var(--border-color);
  color: var(--fg-olive-dark);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:hover {
  background-color: var(--border-color);
}

.qty-selector-container input {
  text-align: center;
  padding: 8px 0;
  font-weight: 600;
  font-size: 1rem;
}

.qty-helper {
  display: block;
  font-size: 0.8rem;
  color: var(--accent-terracotta);
  margin-top: 6px;
  font-weight: 600;
}

/* Pricing Box */
.pricing-summary-box {
  background-color: var(--bg-cream);
  border-radius: var(--radius-sm);
  padding: 15px;
  margin-bottom: 25px;
  border: 1px dashed var(--border-color);
}

.pricing-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.87rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.pricing-row:last-of-type {
  margin-bottom: 0;
}

.pricing-summary-box hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 10px 0;
}

.pricing-row.total-row {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fg-olive-dark);
}

/* Booking and inquiry buttons */
.submit-booking-btn {
  background-color: var(--accent-terracotta);
  color: var(--white);
  border: none;
  width: 100%;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(189, 107, 66, 0.2);
}

.submit-booking-btn:hover {
  background-color: #A3502A;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(189, 107, 66, 0.3);
}

.btn-arrow {
  width: 18px;
  height: 18px;
  transition: transform var(--transition-fast);
}

.submit-booking-btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* ==========================================================================
   HJEMMEKOKKURS STYLE DETAILS
   ========================================================================== */
.hjemmekok-layout {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.variations-intro {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 10px auto;
}

.variations-intro h3 {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--fg-olive-dark);
  margin-bottom: 10px;
}

.variations-intro p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.hjemmekok-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

@media (max-width: 900px) {
  .hjemmekok-grid {
    grid-template-columns: 1fr;
  }
}

.variations-selector-panel {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.variations-selector-panel h4 {
  font-size: 1rem;
  color: var(--fg-olive-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  margin-bottom: 5px;
}

.variation-card {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  cursor: pointer;
  display: flex;
  gap: 15px;
  align-items: flex-start;
  transition: var(--transition-normal);
  position: relative;
}

.variation-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-terracotta);
  box-shadow: var(--shadow-md);
}

.variation-card.active {
  border: 2px solid var(--fg-olive-dark);
  background-color: #FAFBF9;
  box-shadow: var(--shadow-sm);
}

.var-check-indicator {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  flex-shrink: 0;
  margin-top: 3px;
  position: relative;
  transition: var(--transition-fast);
}

.variation-card.active .var-check-indicator {
  border-color: var(--fg-olive-dark);
}

.variation-card.active .var-check-indicator::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background-color: var(--fg-olive-dark);
  border-radius: 50%;
}

.var-details {
  display: flex;
  flex-direction: column;
}

.var-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.65rem;
  font-weight: 700;
  background-color: var(--bg-cream-dark);
  color: var(--fg-olive-dark);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}

.variation-card.active .var-badge {
  background-color: var(--bg-sage-light);
}

.var-details h5 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--fg-olive-dark);
  margin-bottom: 5px;
}

.var-details p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 8px;
}

.var-price {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-terracotta);
}

/* Inquiry form card specific */
.inquiry-form-card {
  background-color: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.form-header-bar {
  background-color: var(--bg-sage-light);
  color: var(--fg-olive-dark);
  padding: 20px 30px;
  border-bottom: 1px solid var(--border-color);
}

.form-header-bar h4 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
}

.form-header-bar p {
  font-size: 0.8rem;
  opacity: 0.85;
  margin-top: 4px;
}

.inquiry-form-card form {
  padding: 30px;
}

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

@media (max-width: 480px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.input-helper {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Validation Alert styles */
.validation-warning {
  background-color: rgba(189, 107, 66, 0.08);
  border: 1px solid var(--accent-terracotta);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  margin: 20px 30px 0 30px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  animation: shake 0.5s ease-in-out;
}

.validation-warning.shake {
  animation: shake 0.5s ease-in-out;
}

.warn-icon {
  width: 18px;
  height: 18px;
  color: var(--accent-terracotta);
  flex-shrink: 0;
  margin-top: 1px;
}

.validation-warning span {
  font-size: 0.8rem;
  color: var(--accent-terracotta);
  line-height: 1.4;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

/* ==========================================================================
   2. SHOPIFY ADMIN PANEL DESIGN
   ========================================================================== */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  background-color: #F6F6F7; /* Real Shopify Admin base background */
  min-height: 700px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid #D1D2D4;
}

@media (max-width: 800px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    display: none;
  }
}

/* Sidebar styling */
.admin-sidebar {
  background-color: #1A1C1D; /* Dark Shopify Admin sidebar */
  color: #D1D2D4;
  padding: 20px 10px;
  display: flex;
  flex-direction: column;
}

.admin-sidebar-header {
  padding: 10px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 25px;
}

.shopify-bag-logo {
  background-color: #96BF48;
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-shop-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--white);
}

.admin-badge-live {
  font-size: 0.65rem;
  background-color: rgba(150, 191, 72, 0.2);
  color: #96BF48;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 700;
}

.admin-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #A6A7A9;
  text-decoration: none;
  padding: 8px 16px;
  font-size: 0.87rem;
  font-weight: 500;
  border-radius: 6px;
  transition: var(--transition-fast);
}

.sidebar-item:hover {
  color: var(--white);
  background-color: rgba(255, 255, 255, 0.05);
}

.sidebar-item.active {
  color: var(--white);
  background-color: rgba(255, 255, 255, 0.1);
  font-weight: 600;
}

/* Content Area */
.admin-content {
  padding: 30px;
  overflow-y: auto;
}

.admin-content-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 25px;
  flex-wrap: wrap;
  gap: 20px;
}

.admin-content-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #202223;
}

.admin-subtext {
  font-size: 0.82rem;
  color: #6D7175;
  margin-top: 4px;
}

.admin-quick-stats {
  display: flex;
  gap: 12px;
}

.stat-bubble {
  background-color: var(--white);
  border: 1px solid #E1E3E5;
  border-radius: 8px;
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.stat-label {
  font-size: 0.72rem;
  color: #6D7175;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.stat-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: #202223;
}

.stat-value.warning {
  color: var(--accent-terracotta);
}

/* Polaris tabs navigation */
.admin-tabs {
  display: flex;
  border-bottom: 1px solid #E1E3E5;
  margin-bottom: 20px;
}

.admin-tab-btn {
  background: transparent;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.87rem;
  font-weight: 500;
  color: #6D7175;
  padding: 12px 20px;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: var(--transition-fast);
}

.admin-tab-btn:hover {
  color: #202223;
}

.admin-tab-btn.active {
  color: #008060; /* Shopify Green */
  font-weight: 600;
  border-bottom-color: #008060;
}

/* Tab contents */
.admin-tab-content {
  display: none;
  animation: fadeIn var(--transition-normal);
}

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

/* Polaris-like Cards */
.admin-card {
  background-color: var(--white);
  border-radius: 8px;
  border: 1px solid #E1E3E5;
  box-shadow: var(--shadow-sm);
  padding: 20px;
  margin-bottom: 20px;
}

.card-header {
  border-bottom: 1px solid #F1F2F4;
  padding-bottom: 15px;
  margin-bottom: 15px;
}

.card-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #202223;
}

.card-header p {
  font-size: 0.8rem;
  color: #6D7175;
  margin-top: 4px;
}

/* Tables styling (Shopify look) */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th {
  background-color: #F9FAFB;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6D7175;
  text-transform: uppercase;
  padding: 10px 15px;
  border-bottom: 1px solid #E1E3E5;
  letter-spacing: 0.02em;
}

.admin-table td {
  padding: 12px 15px;
  font-size: 0.85rem;
  color: #202223;
  border-bottom: 1px solid #E1E3E5;
  vertical-align: middle;
}

.admin-table tbody tr:hover {
  background-color: #F9FAFB;
}

/* Status Badges */
.status-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.status-badge.pending {
  background-color: #FFEFC6;
  color: #7A5300;
}

.status-badge.approved {
  background-color: #E3F1DF;
  color: #2A6A2C;
}

.status-badge.completed {
  background-color: #E2E8F0;
  color: #475569;
}

/* Action Buttons in Admin */
.action-btn {
  background-color: var(--white);
  border: 1px solid #BABFC3;
  color: #202223;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.action-btn:hover {
  background-color: #F6F6F7;
  border-color: #8C9196;
}

.action-btn.primary-action {
  background-color: #008060;
  border-color: #008060;
  color: var(--white);
}

.action-btn.primary-action:hover {
  background-color: #006E52;
}

.action-btn.danger-action {
  color: #D32F2F;
}

.action-btn.danger-action:hover {
  background-color: #FFEBEE;
  border-color: #D32F2F;
}

/* Admin double card layout */
.admin-double-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 900px) {
  .admin-double-layout {
    grid-template-columns: 1fr;
  }
}

.admin-submit-btn {
  background-color: #008060;
  color: var(--white);
  border: none;
  padding: 10px 16px;
  font-size: 0.87rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
  width: 100%;
}

.admin-submit-btn:hover {
  background-color: #006E52;
}

/* ==========================================================================
   3. CUSTOMER KURS-PORTAL (LIBRARY) LAYOUT
   ========================================================================== */
.library-container {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  min-height: 600px;
}

.library-header {
  background-color: var(--fg-olive-dark);
  color: var(--white);
  padding: 30px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--accent-gold);
  flex-wrap: wrap;
  gap: 15px;
}

.lib-brand h2 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.lib-brand p {
  font-size: 0.85rem;
  opacity: 0.85;
  margin-top: 4px;
}

.user-status-widget {
  background-color: rgba(255, 255, 255, 0.12);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-email-display {
  font-size: 0.8rem;
  font-weight: 500;
}

/* Library workspace */
.library-workspace {
  padding: 40px;
}

.lib-section-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--fg-olive-dark);
  margin-bottom: 20px;
  border-bottom: 2px solid var(--bg-cream-dark);
  padding-bottom: 8px;
}

/* Unlocked notifications alert banner */
.library-alert-banner {
  background-color: #E3F1DF;
  border: 1px solid #A4D199;
  border-radius: var(--radius-md);
  color: #2A6A2C;
  padding: 15px 20px;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  animation: slideInDown var(--transition-normal);
}

.alert-icon {
  width: 20px;
  height: 20px;
  color: #2A6A2C;
  flex-shrink: 0;
}

.library-alert-banner span {
  font-size: 0.87rem;
  line-height: 1.4;
}

.close-alert-btn {
  background: transparent;
  border: none;
  color: #2A6A2C;
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  opacity: 0.7;
  transition: var(--transition-fast);
}

.close-alert-btn:hover {
  opacity: 1;
}

/* Library Empty State */
.library-empty-state {
  text-align: center;
  padding: 60px 40px;
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.empty-icon {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  opacity: 0.4;
  margin-bottom: 15px;
}

.library-empty-state h4 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--fg-olive-dark);
  margin-bottom: 8px;
}

.library-empty-state p {
  font-size: 0.87rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.goto-shop-btn {
  background-color: var(--fg-olive-dark);
  color: var(--white);
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.87rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.goto-shop-btn:hover {
  background-color: var(--heading-olive);
}

/* Grid of unlocked resources */
.library-guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}

.lib-guide-card {
  background-color: var(--bg-cream);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-normal);
}

.lib-guide-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-terracotta);
}

.guide-card-header {
  background-color: var(--bg-sage-light);
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.guide-card-header .recipe-icon-bg {
  position: absolute;
  bottom: -15px;
  right: 15px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--accent-terracotta);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.guide-course-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--fg-olive-dark);
  opacity: 0.8;
}

.guide-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--fg-olive-dark);
  margin-top: 4px;
  line-height: 1.25;
}

.guide-card-body {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.guide-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 20px;
}

.view-guide-btn {
  background-color: var(--white);
  border: 1px solid var(--accent-terracotta);
  color: var(--accent-terracotta);
  padding: 10px 15px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.view-guide-btn:hover {
  background-color: var(--accent-terracotta);
  color: var(--white);
}

/* ==========================================================================
   RECIPE READER MODAL SYSTEM
   ========================================================================== */
.recipe-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(44, 43, 42, 0.7);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
  padding: 20px;
}

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

.recipe-modal-container {
  background-color: var(--bg-cream); /* Paper like cream background */
  width: 100%;
  max-width: 900px;
  max-height: 85dvh;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(82, 92, 75, 0.15);
  transform: scale(0.95);
  transition: transform var(--transition-normal);
}

.recipe-modal-backdrop.active .recipe-modal-container {
  transform: scale(1);
}

.modal-header {
  background-color: var(--white);
  padding: 20px 30px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header-brand {
  display: flex;
  flex-direction: column;
}

.modal-badge {
  align-self: flex-start;
  font-size: 0.65rem;
  font-weight: 700;
  background-color: var(--bg-sage-light);
  color: var(--fg-olive-dark);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  margin-bottom: 5px;
  letter-spacing: 0.05em;
}

.modal-header h2 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--fg-olive-dark);
}

.close-modal-btn {
  background: transparent;
  border: none;
  font-size: 1.8rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}

.close-modal-btn:hover {
  color: var(--text-charcoal);
}

.modal-body-content {
  padding: 30px;
  overflow-y: auto;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Beautiful recipe formatting inside modal */
.recipe-doc {
  color: var(--text-charcoal);
}

.recipe-doc h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--fg-olive-dark);
  margin: 25px 0 12px 0;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 6px;
}

.recipe-doc h3:first-of-type {
  margin-top: 0;
}

.recipe-doc p {
  margin-bottom: 15px;
  color: var(--text-charcoal);
}

.recipe-intro-box {
  background-color: var(--white);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 25px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.recipe-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 15px;
}

.meta-box {
  background-color: var(--bg-cream-dark);
  padding: 10px;
  border-radius: var(--radius-sm);
  text-align: center;
  display: flex;
  flex-direction: column;
}

.meta-box-lbl {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.meta-box-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--fg-olive-dark);
  margin-top: 2px;
}

.ingredients-list {
  background-color: #FFFDF9;
  border: 1px solid #ECE3D4;
  border-radius: var(--radius-md);
  padding: 25px;
  margin: 20px 0;
  box-shadow: var(--shadow-sm);
}

.ingredients-list h4 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--fg-olive-dark);
  margin-bottom: 15px;
}

.ingredients-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
}

@media (max-width: 480px) {
  .ingredients-grid {
    grid-template-columns: 1fr;
  }
}

.ing-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  border-bottom: 1px dotted rgba(82, 92, 75, 0.2);
  padding-bottom: 4px;
}

.ing-row span:last-of-type {
  font-weight: 600;
  color: var(--fg-olive-dark);
}

/* Steps list with premium checkboxes */
.steps-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 15px;
}

.step-row {
  display: flex;
  gap: 15px;
  background-color: var(--white);
  padding: 15px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition-fast);
}

.step-row:hover {
  border-color: var(--heading-olive);
}

.step-checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid var(--heading-olive);
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  transition: var(--transition-fast);
}

.step-checkbox::after {
  content: '✓';
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0;
  transition: var(--transition-fast);
}

.step-row.completed {
  opacity: 0.65;
  background-color: var(--bg-cream-dark);
}

.step-row.completed .step-checkbox {
  background-color: var(--heading-olive);
  border-color: var(--heading-olive);
}

.step-row.completed .step-checkbox::after {
  opacity: 1;
}

.step-row.completed .step-desc {
  text-decoration: line-through;
  color: var(--text-muted);
}

.step-num {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-terracotta);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.step-desc {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-charcoal);
}

.step-note-box {
  margin-top: 8px;
  background-color: rgba(210, 159, 104, 0.08);
  border-left: 3px solid var(--accent-gold);
  padding: 8px 12px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.8rem;
  color: #7D5C35;
}

.modal-footer {
  background-color: var(--white);
  padding: 15px 30px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
}

.close-modal-footer-btn {
  background-color: var(--fg-olive-dark);
  color: var(--white);
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.close-modal-footer-btn:hover {
  background-color: var(--heading-olive);
}

/* ==========================================================================
   GLOBAL UTILITIES & KEYFRAMES
   ========================================================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-cream);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-sage-light);
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--heading-olive);
}

/* ==========================================================================
   ADMIN DOUBLE HORIZONTAL LAYOUT
   ========================================================================== */
.admin-double-layout-horizontal {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 900px) {
  .admin-double-layout-horizontal {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   @MEDIA PRINT SYSTEM - ZERO DEPENDENCY PDF DOWNLOAD & CRISP PRINT SHEETS
   ========================================================================== */
@media print {
  /* Hide all simulator UI elements and modal chrome */
  body {
    background: #FAF6F0 !important;
    color: #2C2B2A !important;
    font-size: 11pt !important;
  }
  
  .simulator-bar,
  .main-workspace,
  .recipe-modal-backdrop::before,
  .modal-header .close-modal-btn,
  .modal-footer,
  #modal-print-btn,
  .step-checkbox {
    display: none !important;
  }
  
  /* Reset backdrop and container for static printing */
  .recipe-modal-backdrop {
    position: static !important;
    background: transparent !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    padding: 0 !important;
    display: block !important;
    overflow: visible !important;
    height: auto !important;
    width: auto !important;
  }
  
  .recipe-modal-container {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    max-width: 100% !important;
    max-height: none !important;
    transform: none !important;
    overflow: visible !important;
    display: block !important;
  }
  
  .modal-header {
    border-bottom: 2px solid #525C4B !important;
    padding: 0 0 10px 0 !important;
    margin-bottom: 20px !important;
    background: transparent !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-end !important;
  }
  
  .modal-badge {
    border: 1px solid #7A8A6F !important;
    background: transparent !important;
    color: #525C4B !important;
  }
  
  .modal-header h2 {
    font-size: 22pt !important;
    color: #525C4B !important;
    margin-top: 5px !important;
  }
  
  .modal-body-content {
    padding: 0 !important;
    overflow: visible !important;
  }
  
  .recipe-doc h3 {
    font-size: 15pt !important;
    color: #525C4B !important;
    border-bottom: 1px solid #7A8A6F !important;
    margin-top: 20pt !important;
    padding-bottom: 3pt !important;
  }
  
  .recipe-intro-box {
    background: transparent !important;
    border: 1px solid rgba(82, 92, 75, 0.2) !important;
    box-shadow: none !important;
    padding: 12pt !important;
    margin-bottom: 15pt !important;
  }
  
  .recipe-meta-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10pt !important;
  }
  
  .meta-box {
    background: #FAF6F0 !important;
    border: 1px solid rgba(82, 92, 75, 0.15) !important;
  }
  
  .ingredients-list {
    background: transparent !important;
    border: 1px solid rgba(82, 92, 75, 0.2) !important;
    box-shadow: none !important;
    padding: 15pt !important;
    page-break-inside: avoid;
  }
  
  .ingredients-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 5pt 20pt !important;
  }
  
  .step-row {
    background: transparent !important;
    border: 1px solid rgba(82, 92, 75, 0.15) !important;
    padding: 10pt 15pt !important;
    page-break-inside: avoid;
    margin-bottom: 8pt !important;
  }
  
  .step-row.completed {
    opacity: 1 !important;
    background: transparent !important;
  }
  
  .step-row.completed .step-desc {
    text-decoration: none !important;
    color: #2C2B2A !important;
  }
  
  .step-num {
    font-size: 10pt !important;
    color: #BD6B42 !important;
  }
  
  .step-note-box {
    background: #FAF6F0 !important;
    border-left: 2px solid #D29F68 !important;
    color: #7D5C35 !important;
  }
  
  .steps-list {
    page-break-inside: auto;
  }
}
