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

:root {
  /* Bootstrap 5 Color Scheme - Flying V Labs */
  
  /* Background Colors */
  --bg-primary: #ffffff;       /* Bootstrap body background */
  --bg-secondary: #f8f9fa;     /* Bootstrap light */
  --bg-card: #ffffff;
  --bg-hover: #e9ecef;         /* Bootstrap gray-200 */
  --bg-active: #dee2e6;        /* Bootstrap gray-300 */
  
  /* Text Colors - Bootstrap */
  --text-primary: #212529;     /* Bootstrap body color (dark) */
  --text-secondary: #6c757d;   /* Bootstrap secondary */
  --text-muted: #6c757d;       /* Bootstrap muted */
  --text-white: #ffffff;
  
  /* Border Colors - Bootstrap */
  --border-color: #dee2e6;     /* Bootstrap gray-300 */
  --border-light: #e9ecef;     /* Bootstrap gray-200 */
  --border-strong: #adb5bd;    /* Bootstrap gray-500 */
  
  /* Bootstrap Accent Colors */
  --accent-primary: #0d6efd;   /* Bootstrap Primary (Blue) */
  --accent-secondary: #6c757d; /* Bootstrap Secondary (Gray) */
  --accent-success: #198754;   /* Bootstrap Success (Green) */
  --accent-warning: #ffc107;   /* Bootstrap Warning (Yellow) */
  --accent-danger: #dc3545;    /* Bootstrap Danger (Red) */
  --accent-info: #0dcaf0;      /* Bootstrap Info (Cyan) */
  
  /* Brewery-specific Colors - Updated to complement Bootstrap */
  --brewery-copper: #fd7e14;   /* Bootstrap Orange */
  --brewery-steel: #6c757d;    /* Bootstrap Secondary */
  --brewery-grain: #6f42c1;    /* Bootstrap Purple */
  --brewery-foam: #ffffff;
  --brewery-gold: #ffc107;     /* Bootstrap Warning */
  
  /* Shadows - Bootstrap style */
  --shadow-sm: 0 .125rem .25rem rgba(0,0,0,.075);
  --shadow-md: 0 .5rem 1rem rgba(0,0,0,.15);
  --shadow-lg: 0 1rem 3rem rgba(0,0,0,.175);
  
  /* No blur effects */
  --blur-amount: 0px;
  
  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle animated background accents - Canadian & Czech flag colors */

@keyframes gentleGlow {
  0%, 100% { 
    transform: translate(0, 0) scale(1) rotate(0deg); 
  }
  33% { 
    transform: translate(-3%, -4%) scale(1.05) rotate(120deg); 
  }
  66% { 
    transform: translate(-6%, 3%) scale(0.98) rotate(240deg); 
  }
}

/* Left Navigation Sidebar */
.left-sidebar {
  position: fixed;
  left: 0;
  top: 70px;
  width: 220px;
  height: calc(100vh - 70px);
  background: #1a1a1a;
  border-right: 3px solid #dc3545;
  box-shadow: var(--shadow-md);
  overflow-y: auto;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-nav {
  padding: 20px 0;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-divider {
  height: 1px;
  background: #2a2a2a;
  margin: 16px 12px;
}

.nav-section-title {
  padding: 12px 20px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-item {
  margin: 0;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  text-decoration: none;
  color: #ccc;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.2s ease;
  border-left: 4px solid transparent;
}

.nav-link:hover {
  background: #252525;
  border-left-color: #dc3545;
  color: #dc3545;
}

.nav-link.active {
  background: #2a0e0e;
  border-left-color: #dc3545;
  color: #dc3545;
}

.nav-icon {
  font-size: 1.3rem;
  width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-text {
  flex: 1;
  white-space: nowrap;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.4rem;
  color: #ccc;
  text-decoration: none;
  transition: transform 0.2s ease, color 0.2s ease;
}

.nav-brand:hover {
  transform: scale(1.02);
  color: #dc3545;
}

.nav-logo {
  width: 45px;
  height: 45px;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.nav-title {
  display: inline;
  white-space: nowrap;
}

/* Main Content Wrapper */
.main-wrapper {
  margin-left: 220px;
  margin-top: 70px;
  min-height: calc(100vh - 70px);
  display: flex;
  flex-direction: column;
}

/* Top Navigation Bar - Fixed, Always Visible */
.top-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #1a1a1a;
  border-bottom: 3px solid #dc3545;
  box-shadow: var(--shadow-md);
  height: 70px;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 32px;
  height: 100%;
  max-width: 100%;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 40px;
  flex: 1;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #ccc;
  margin: 0;
}

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

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: #252525;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid #2a2a2a;
}

.user-profile:hover {
  background: #2a0e0e;
  box-shadow: var(--shadow-sm);
  border-color: #dc3545;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dc3545 0%, #a71d2a 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #ccc;
}

.user-role {
  font-size: 0.8rem;
  color: #888;
}

/* User Profile Dropdown */
.user-profile-dropdown {
  position: relative;
}

.user-profile-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 2px solid #dc3545;
  border-radius: 50%;
  padding: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 58px;
  height: 58px;
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.user-profile-btn:hover {
  transform: scale(1.08);
  border-color: #c82333;
  box-shadow: 0 4px 16px rgba(220, 53, 69, 0.5);
  background: rgba(220, 53, 69, 0.05);
}

.user-profile-btn:active {
  transform: scale(1.02);
}

.avatar-container {
  width: 48px;
  height: 48px;
  position: relative;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-container svg {
  width: 100%;
  height: 100%;
  display: block;
}

.admin-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: linear-gradient(135deg, #fd7e14 0%, #dc7609 100%);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  z-index: 1;
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  background: white;
  border: 2px solid #dc3545;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(220, 53, 69, 0.25);
  min-width: 240px;
  z-index: 1000;
  animation: dropdownSlideDown 0.25s ease;
  overflow: hidden;
}

.dropdown-header {
  padding: 1rem;
  border-bottom: 2px solid #f8f9fa;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.dropdown-user-name {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  color: #212529;
}

.dropdown-user-email {
  font-size: 0.8rem;
  color: #6c757d;
}

.dropdown-admin-badge {
  margin-top: 0.5rem;
}

.dropdown-admin-badge span {
  background: linear-gradient(135deg, #fd7e14 0%, #dc7609 100%);
  color: white;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(253, 126, 20, 0.3);
  display: inline-block;
}

.dropdown-items {
  padding: 0.5rem 0;
}

@keyframes dropdownSlideDown {
  from {
    opacity: 0;
    transform: translateY(-15px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dropdown-item {
  display: flex;
  align-items: center;
  padding: 0.85rem 1rem;
  color: #212529;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  width: 100%;
  text-align: left;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 500;
}

.dropdown-item:hover {
  background: #f8f9fa;
  padding-left: 1.25rem;
}

.dropdown-item-danger {
  color: #dc3545;
}

.dropdown-item-danger:hover {
  background: rgba(220, 53, 69, 0.1);
}

.dropdown-item svg {
  margin-right: 0.75rem;
  fill: currentColor;
  flex-shrink: 0;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 40px;
  height: 40px;
  margin-right: 16px;
}

.mobile-menu-toggle span {
  display: block;
  width: 28px;
  height: 3px;
  background: #dc3545;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Navigation Styles */
@media (max-width: 968px) {
  .mobile-menu-toggle {
    display: flex;
  }
  
  .left-sidebar {
    transform: translateX(-100%);
  }
  
  .left-sidebar.active {
    transform: translateX(0);
  }
  
  .main-wrapper {
    margin-left: 0;
  }
  
  .header-container {
    padding: 0 16px;
  }
  
  .nav-brand {
    font-size: 1.2rem;
  }
  
  .nav-logo {
    width: 35px;
    height: 35px;
  }
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 15px 15px 15px;
  position: relative;
  z-index: 1;
  flex: 1;
}

header {
  margin-bottom: 40px;
}

.page-header {
  margin-bottom: 30px;
  margin-top: 0;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

header h1 {
  font-size: 3.2rem;
  margin-bottom: 12px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 50%, var(--accent-tertiary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 16px;
  animation: gentleFloat 3s ease-in-out infinite;
}

.page-logo {
  width: 64px;
  height: 64px;
  filter: drop-shadow(0 4px 12px rgba(255, 66, 66, 0.2));
  animation: none;
  flex-shrink: 0;
}

@keyframes gentleFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-4px); }
}

.subtitle {
  font-size: 1.3rem;
  color: var(--text-secondary);
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0.9;
}

/* Brewery Section - Glass Effect */
/* Page Title Bar */
.page-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 4px solid #1a1a1a;
  box-shadow: 0 4px 0 0 #dc3545;
}

.page-title-bar h1 {
  font-size: 2.5rem;
  font-weight: 900;
  color: #1a1a1a;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Brewery Info - Flat 2-Column Layout */
.brewery-info-card {
  background: transparent;
  border: none;
  padding: 0;
  margin-bottom: 60px;
}

.brewery-name-display {
  font-size: 3.5rem;
  font-weight: 900;
  color: #1a1a1a;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 3px solid #1a1a1a;
  letter-spacing: 1px;
}

.brewery-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 60px;
}

.brewery-field {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.brewery-field .detail-label {
  font-size: 1rem;
  color: #6c757d;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.brewery-field .detail-value {
  font-size: 1.8rem;
  color: #1a1a1a;
  font-weight: 700;
  line-height: 1.4;
}
/* Table Section */
.table-section {
  margin-bottom: 50px;
}

.table-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 4px solid #1a1a1a;
  box-shadow: 0 4px 0 0 #dc3545;
}

.table-header-bar h2 {
  font-size: 2rem;
  font-weight: 900;
  color: #1a1a1a;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* Data Table Styling - Bold Black/Red Theme */
.data-table-wrapper {
  background: #ffffff;
  border: 3px solid #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 0 0 #dc3545,
              0 8px 20px rgba(0, 0, 0, 0.15);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.data-table thead {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
}

.data-table thead tr {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
}

.data-table thead th {
  padding: 20px 18px !important;
  font-size: 0.85rem !important;
  font-weight: 900 !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
  color: #ffffff !important;
  text-align: left !important;
  border-right: 2px solid #dc3545 !important;
  border-bottom: 3px solid #dc3545 !important;
  background: transparent !important;
}

.data-table thead th:last-child {
  border-right: none !important;
}

.data-table tbody tr {
  border-bottom: 2px solid #e9ecef;
  transition: all 0.2s ease;
}

.data-table tbody tr:hover {
  background: rgba(220, 53, 69, 0.05);
  transform: scale(1.005);
}

.data-table tbody tr:last-child {
  border-bottom: none;
}

.data-table tbody td {
  padding: 18px;
  color: #212529;
  font-weight: 600;
  border-right: 1px solid #dee2e6;
}

.data-table tbody td:last-child {
  border-right: none;
}

.brewsystems-list {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.brewsystem-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  transition: all 0.3s ease;
}

.brewsystem-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.brewsystem-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.brewsystem-header h3 {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.3rem;
  margin: 0;
}

.brewsystem-actions {
  display: flex;
  gap: 10px;
}

.brewsystem-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.empty-state {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 1rem;
}

/* Form Section */
.form-section {
  background: var(--bg-card);
  padding: 20px;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--border-color);
  transition: all 0.3s ease;
}

.form-section:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-tertiary);
}

.form-section h2 {
  margin-bottom: 16px;
  color: var(--text-primary);
  font-weight: 900;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 6px;
  font-weight: 800;
  color: var(--text-secondary);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 10px 14px;
  border: 2px solid var(--input-border);
  border-radius: 8px;
  font-size: 0.95rem;
  background: var(--input-bg);
  color: var(--text-primary);
  transition: all 0.3s ease;
  font-family: inherit;
  font-weight: 700;
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
  font-weight: 600;
}

.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover {
  border-color: var(--accent-tertiary);
  background: var(--bg-card);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(255, 66, 66, 0.12);
  transform: translateY(-1px);
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white !important;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #c82333 0%, #dc3545 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.btn-secondary {
  background: #6c757d;
  color: #ffffff !important;
  border: 2px solid #6c757d;
  box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
  background: #5c636a;
  border-color: #565e64;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
}

.btn-secondary:active {
  transform: translateY(0) scale(0.98);
}

.btn-danger {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white !important;
  padding: 8px 16px;
  font-size: 0.9rem;
  box-shadow: 0 3px 10px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #c82333 0%, #dc3545 100%);
  transform: translateY(-2px);
  box-shadow: 0 5px 16px rgba(220, 53, 69, 0.4);
}

.btn-danger:active {
  transform: translateY(0) scale(0.98);
}

.btn-edit {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white !important;
  padding: 8px 16px;
  font-size: 0.9rem;
  box-shadow: 0 3px 10px rgba(220, 53, 69, 0.3);
  font-weight: 700;
}

.btn-edit:hover {
  background: linear-gradient(135deg, #c82333 0%, #dc3545 100%);
  transform: translateY(-2px);
  box-shadow: 0 5px 16px rgba(220, 53, 69, 0.4);
}

.btn-edit:active {
  transform: translateY(0) scale(0.98);
}

/* Grains Section */
.grains-section {
  background: var(--bg-card);
  padding: 30px;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.grains-section:hover {
  box-shadow: var(--shadow-lg);
}

.grains-section h2 {
  margin-bottom: 20px;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.5rem;
}

.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.error {
  background: rgba(255, 66, 66, 0.15);
  color: var(--accent-danger);
  padding: 15px;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 66, 66, 0.35);
}

/* Table Controls */
.table-controls {
  margin-bottom: 20px;
}

.table-filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
}

.filter-input,
.filter-select {
  padding: 13px 18px;
  border: 2px solid var(--input-border);
  border-radius: 14px;
  background: var(--input-bg);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 700;
  transition: all 0.3s ease;
}

.filter-input:hover,
.filter-select:hover {
  border-color: var(--accent-tertiary);
  background: var(--bg-card);
}

.filter-input:focus,
.filter-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 4px rgba(255, 66, 66, 0.12);
  transform: translateY(-1px);
}

.filter-input::placeholder {
  color: var(--text-muted);
}

/* Sortable Headers */
.sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: color 0.2s ease;
}

.sortable:hover {
  color: var(--accent-primary);
}

.sortable.sorted {
  color: var(--accent-primary);
}

.sort-icon {
  margin-left: 4px;
  font-size: 0.9em;
  opacity: 0.5;
}

.sortable:hover .sort-icon,
.sortable.sorted .sort-icon {
  opacity: 1;
}

/* Pagination */
.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: 12px;
}

.pagination-info {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.pagination-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.page-numbers {
  display: flex;
  gap: 4px;
}

.page-number {
  min-width: 36px;
  height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.page-number:hover:not(:disabled) {
  border-color: var(--accent-primary);
  background: var(--bg-hover);
}

.page-number.active {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}

.page-number:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-ellipsis {
  display: flex;
  align-items: center;
  padding: 0 8px;
  color: var(--text-muted);
}

/* Catalog Browser Section */
.catalog-section {
  background: var(--bg-card);
  padding: 30px;
  border-radius: 20px;
  margin-bottom: 30px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

.admin-catalog-section {
  margin-bottom: 20px;
}

.admin-catalog-section .section-header {
  cursor: pointer;
}

.admin-catalog-section .section-header h2 {
  font-size: 1.3rem;
}

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

.section-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--text-primary);
}

.catalog-container {
  animation: slideDown 0.3s ease;
}

.catalog-filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
  width: 100%;
}

@media (max-width: 1024px) {
  .catalog-filters {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .catalog-filters {
    grid-template-columns: 1fr;
  }
}

.catalog-table td {
  font-size: 0.9rem;
}

.catalog-table .description-cell {
  max-width: 300px;
  font-size: 0.85rem;
}

.catalog-table .aroma-cell {
  max-width: 200px;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-secondary);
}

.catalog-stats {
  margin-top: 16px;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: 8px;
  text-align: center;
  font-weight: 700;
  color: var(--text-secondary);
}

/* Type Badges */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid transparent;
}

.badge-base {
  background: rgba(37, 207, 242, 0.15);
  color: var(--accent-tertiary);
  border-color: rgba(37, 207, 242, 0.35);
}

.badge-specialty {
  background: rgba(255, 199, 32, 0.18);
  color: var(--accent-secondary);
  border-color: rgba(255, 199, 32, 0.35);
}

.badge-crystal {
  background: rgba(255, 66, 66, 0.18);
  color: var(--accent-primary);
  border-color: rgba(255, 66, 66, 0.35);
}

.badge-roasted {
  background: rgba(28, 31, 35, 0.3);
  color: #fdf5eb;
  border-color: rgba(253, 245, 235, 0.25);
}

.badge-default {
  background: rgba(28, 31, 35, 0.12);
  color: var(--text-muted);
  border: 1px dashed var(--border-color);
}

/* Yeast Type Badges */
.badge-ale {
  background: rgba(255, 66, 66, 0.15);
  color: var(--accent-primary);
  border-color: rgba(255, 66, 66, 0.35);
}

.badge-lager {
  background: rgba(37, 207, 242, 0.15);
  color: var(--accent-tertiary);
  border-color: rgba(37, 207, 242, 0.35);
}

.badge-belgian {
  background: linear-gradient(120deg, rgba(37, 207, 242, 0.12), rgba(255, 199, 32, 0.18));
  color: #0a1b26;
  border-color: rgba(255, 199, 32, 0.35);
}

.badge-wheat {
  background: rgba(255, 199, 32, 0.15);
  color: var(--accent-secondary);
  border-color: rgba(255, 199, 32, 0.3);
}

.badge-kveik {
  background: rgba(255, 66, 66, 0.2);
  color: var(--accent-primary);
  border-color: rgba(255, 66, 66, 0.4);
}

/* Brew System Status Badges */
.badge-new {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.2), rgba(255, 205, 57, 0.15));
  color: #664d03;
  border-color: rgba(255, 193, 7, 0.4);
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(255, 193, 7, 0.15);
}

.badge-active {
  background: linear-gradient(135deg, rgba(25, 135, 84, 0.2), rgba(21, 115, 71, 0.15));
  color: #0f5132;
  border-color: rgba(25, 135, 84, 0.4);
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(25, 135, 84, 0.15);
}

.badge-deactive {
  background: linear-gradient(135deg, rgba(108, 117, 125, 0.18), rgba(173, 181, 189, 0.12));
  color: #6c757d;
  border-color: rgba(108, 117, 125, 0.35);
  font-weight: 700;
  opacity: 0.8;
}

/* Yeast Code Badge */
.code-badge {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Flocculation Badges */
.floc-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
}

.floc-low {
  background: rgba(255, 66, 66, 0.15);
  color: var(--accent-primary);
  border-color: rgba(255, 66, 66, 0.35);
}

.floc-medium {
  background: rgba(255, 199, 32, 0.18);
  color: var(--accent-secondary);
  border-color: rgba(255, 199, 32, 0.35);
}

.floc-high {
  background: rgba(37, 207, 242, 0.15);
  color: var(--accent-tertiary);
  border-color: rgba(37, 207, 242, 0.35);
}

.floc-default {
  background: var(--bg-secondary);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

/* Hop Origin Badges */
.badge-hop-usa {
  background: rgba(255, 66, 66, 0.15);
  color: var(--accent-primary);
  border-color: rgba(255, 66, 66, 0.35);
}

.badge-hop-germany {
  background: rgba(255, 199, 32, 0.18);
  color: var(--accent-secondary);
  border-color: rgba(255, 199, 32, 0.35);
}

.badge-hop-uk {
  background: linear-gradient(120deg, rgba(37, 207, 242, 0.12), rgba(255, 66, 66, 0.15));
  color: #071926;
  border-color: rgba(37, 207, 242, 0.35);
}

.badge-hop-nz {
  background: rgba(37, 207, 242, 0.15);
  color: var(--accent-tertiary);
  border-color: rgba(37, 207, 242, 0.35);
}

.badge-hop-australia {
  background: linear-gradient(135deg, rgba(255, 199, 32, 0.12), rgba(28, 31, 35, 0.12));
  color: var(--accent-secondary);
  border-color: rgba(255, 199, 32, 0.3);
}

.badge-hop-czech {
  background: rgba(37, 207, 242, 0.12);
  color: var(--accent-tertiary);
  border-color: rgba(37, 207, 242, 0.3);
}

.badge-hop-other {
  background: rgba(28, 31, 35, 0.2);
  color: var(--text-secondary);
  border-color: rgba(28, 31, 35, 0.35);
}

/* Hop Usage Type Badges */
.badge-hop-aroma {
  background: rgba(255, 199, 32, 0.18);
  color: var(--accent-secondary);
  border-color: rgba(255, 199, 32, 0.35);
}

.badge-hop-bittering {
  background: rgba(255, 66, 66, 0.18);
  color: var(--accent-primary);
  border-color: rgba(255, 66, 66, 0.35);
}

.badge-hop-dual {
  background: rgba(37, 207, 242, 0.15);
  color: var(--accent-tertiary);
  border-color: rgba(37, 207, 242, 0.35);
}

/* Notification - Friendly & Eye-catching */
.notification {
  position: fixed;
  top: 24px;
  right: 24px;
  padding: 18px 28px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  opacity: 0;
  transform: translateY(-30px) scale(0.9);
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border: 2px solid;
  min-width: 280px;
}

.notification.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.notification-success {
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.95) 0%, rgba(52, 199, 89, 0.95) 100%);
  color: white;
  border-color: rgba(74, 222, 128, 1);
  box-shadow: 0 8px 24px rgba(74, 222, 128, 0.4);
}

.notification-success::before {
  content: '✓ ';
  font-size: 1.3em;
  margin-right: 8px;
}

.notification-error {
  background: linear-gradient(135deg, rgba(255, 66, 66, 0.95) 0%, rgba(255, 88, 88, 0.95) 100%);
  color: white;
  border-color: rgba(255, 66, 66, 1);
  box-shadow: 0 8px 24px rgba(255, 66, 66, 0.4);
}

.notification-error::before {
  content: '⚠ ';
  font-size: 1.3em;
  margin-right: 8px;
}

/* Grain Lookup Section */
.lookup-section {
  background: var(--bg-secondary);
  padding: 24px;
  border-radius: 16px;
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
}

.lookup-section h3 {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  color: var(--text-primary);
  font-weight: 700;
}

.lookup-hint {
  margin: 0 0 16px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-style: italic;
}

.form-divider {
  text-align: center;
  margin: 32px 0;
  position: relative;
}

.form-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-color);
}

.form-divider span {
  position: relative;
  background: var(--bg-card);
  padding: 0 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lookup-results {
  margin-top: 16px;
  max-height: 400px;
  overflow-y: auto;
}

.lookup-results-header {
  padding: 12px;
  background: var(--bg-card);
  border-radius: 8px;
  margin-bottom: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-align: center;
  border: 1px solid var(--border-color);
}

.lookup-result-item {
  background: var(--bg-card);
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 8px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s ease;
}

.lookup-result-item:hover {
  border-color: var(--accent-primary);
  background: var(--bg-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.lookup-result-item h4 {
  margin: 0 0 8px 0;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 700;
}

.lookup-result-item .result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.lookup-result-item .result-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.lookup-result-item .result-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  margin-bottom: 8px;
}

.spec-badge {
  padding: 4px 10px;
  background: var(--bg-secondary);
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--text-primary);
  font-weight: 700;
  border: 1px solid var(--border-color);
}

.lookup-result-item .result-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
}

.lookup-empty {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
}

.lookup-error {
  background: rgba(255, 66, 66, 0.15);
  color: var(--accent-danger);
  padding: 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  border: 1px solid rgba(255, 66, 66, 0.35);
}

.lookup-success {
  background: rgba(37, 207, 242, 0.15);
  color: var(--accent-tertiary);
  padding: 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  border: 1px solid rgba(37, 207, 242, 0.35);
  text-align: center;
  animation: slideDown 0.3s ease;
}

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

/* Additional Button Styles for Consistent Visibility */
.btn-small {
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 700;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.1rem;
  font-weight: 700;
}

/* Button Success */
.btn-success {
  background: linear-gradient(135deg, #198754 0%, #157347 100%);
  color: white !important;
  box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3);
  border: none;
}

.btn-success:hover {
  background: linear-gradient(135deg, #157347 0%, #198754 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(25, 135, 84, 0.4);
}

.btn-success:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(25, 135, 84, 0.3);
}

/* Action Button Small - for catalog tables */
.action-btn-small {
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  border: 2px solid #0d6efd;
  background: white;
  color: #0d6efd !important;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn-small:hover {
  background: #0d6efd;
  color: white !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.action-btn-small:active {
  transform: translateY(0) scale(0.98);
}

/* Ensure all button variants have visible text */
.btn,
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-edit,
.btn-success,
.btn-sm,
.btn-small,
.btn-lg {
  font-weight: 700 !important;
}

/* Ensure primary/danger/success buttons always have white text */
.btn-primary,
.btn-danger,
.btn-edit,
.btn-success {
  color: white !important;
}

/* Table Styles */
.table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 16px;
  background: var(--bg-secondary);
  position: relative;
}

.grains-table {
  width: 100%;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  table-layout: auto;
}

.grains-table thead {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.grains-table th {
  padding: 20px 18px;
  text-align: left;
  font-weight: 900;
  color: #ffffff;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
  border-bottom: 3px solid #dc3545;
  border-right: 2px solid #dc3545;
  white-space: nowrap;
}

.grains-table th:last-child {
  border-right: none;
}

.grains-table tbody tr {
  border-bottom: 1px solid #dee2e6;
  transition: all 0.25s ease;
}

.grains-table tbody tr:hover:not(.editing-row) {
  background: #f8f9fa;
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(13, 110, 253, 0.12);
}

.grains-table tbody tr.editing-row {
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(13, 110, 253, 0.25);
  border-left: 4px solid #0d6efd;
}

.grains-table td {
  padding: 16px;
  color: #212529;
  vertical-align: middle;
  font-size: 0.95rem;
  font-weight: 600;
}

.grains-table .id-cell {
  font-weight: 700;
  color: #6c757d;
  font-family: 'Courier New', monospace;
  width: 60px;
}

.grains-table .description-cell {
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grains-table .pkl-cell {
  font-family: 'Courier New', monospace;
  color: #0d6efd;
  font-weight: 700;
}

.grains-table .action-cell {
  white-space: nowrap;
  text-align: right;
}

/* Table Input Styles */
.table-input,
.table-textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.9rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: inherit;
  transition: all 0.2s ease;
}

.table-input:focus,
.table-textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(255, 66, 66, 0.15);
}

.table-textarea {
  resize: vertical;
  min-height: 60px;
}

/* Button Sizes */
.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}

/* Empty state in table */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--text-secondary);
}

.empty-state p {
  color: var(--text-muted);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .sidebar {
    width: 70px;
  }

  .nav-brand .nav-title {
    display: none;
  }

  .nav-logo {
    width: 32px;
    height: 32px;
  }

  .nav-text {
    display: none;
  }

  .nav-links {
    padding: 0 12px;
  }

  .nav-link {
    justify-content: center;
    padding: 12px;
  }

  .nav-icon {
    margin: 0;
  }

  .main-wrapper {
    margin-left: 70px;
  }

  .header-container {
    padding: 16px 24px;
  }

  .page-title {
    font-size: 1.5rem;
  }

  .user-info {
    display: none;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .main-wrapper {
    margin-left: 0;
  }

  .main-wrapper::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
  }

  .sidebar.open ~ .main-wrapper::before {
    opacity: 1;
    visibility: visible;
  }

  header h1 {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .header-content {
    justify-content: center;
    text-align: center;
  }

  .header-container {
    padding: 12px 20px;
  }

  .page-title {
    font-size: 1.3rem;
  }

  .container {
    padding: 20px;
  }

  .form-section,
  .grains-section {
    padding: 20px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .table-filters {
    grid-template-columns: 1fr;
  }
  
  .catalog-filters {
    grid-template-columns: 1fr;
  }
  
  .section-header {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  
  .pagination-container {
    flex-direction: column;
    gap: 16px;
  }
  
  .pagination-controls {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .lookup-section .form-row {
    grid-template-columns: 1fr;
  }
  
  .nav-container {
    padding: 10px 15px;
  }
  
  .nav-links {
    gap: 4px;
  }
  
  .nav-link {
    padding: 6px 12px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 10px;
  }

  header h1 {
    font-size: 1.8rem;
  }

  .form-section,
  .grains-section {
    padding: 15px;
    border-radius: 16px;
  }

  .page-numbers {
    flex-wrap: wrap;
  }
  
  .pagination-info {
    text-align: center;
    width: 100%;
  }
}

/* Footer */
.page-footer {
  margin-top: 60px;
  padding: 20px 0;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  border-top: 1px solid var(--border-color);
}

.page-footer p {
  margin: 0;
}

/* Smooth transitions */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Recipe-specific Styles */
.recipe-card {
  background: var(--gradient-card); border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

/* Searchable ingredient selects */
.grain-select-group,
.hop-select-group {
  position: relative;
}

.grain-search,
.hop-search {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  background: var(--input-bg); color: var(--text-primary);
  font-size: 0.95rem;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.grain-search:focus,
.hop-search:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: var(--bg-hover);
  box-shadow: 0 0 0 3px rgba(255, 66, 66, 0.1);
}

.grain-search::placeholder,
.hop-search::placeholder {
  color: var(--text-muted);
  font-style: italic;
}

.field-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  font-style: italic;
}

.recipe-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.recipe-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.recipe-card-header h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 700;
}

.recipe-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.recipe-card-body {
  color: var(--text-secondary);
}

.recipe-description {
  margin-bottom: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Recipes List Grid Layout */
#recipes-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

@media (max-width: 1400px) {
  #recipes-list {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  }
}

@media (max-width: 768px) {
  #recipes-list {
    grid-template-columns: 1fr;
  }
}

.recipe-card-modern {
  margin-bottom: 0 !important;
}

.recipe-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  font-size: 0.95rem;
}

.recipe-stats span {
  color: var(--text-secondary);
}

.recipe-stats strong {
  color: var(--text-primary);
}

.form-section {
  margin-bottom: 32px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.form-section h4 {
  margin: 0 0 16px 0;
  color: var(--text-primary);
  font-size: 1.2rem;
  font-weight: 700;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.recipe-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  padding: 16px;
  background: var(--glass-light);
  border-radius: 8px;
  margin-bottom: 16px;
}

.recipe-info-item {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.recipe-info-item strong {
  color: var(--text-secondary);
  display: block;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

/* Recipe Volume Banner */
.recipe-volume-banner {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.recipe-volume-banner.modal-banner {
  background: linear-gradient(135deg, var(--accent-tertiary), var(--accent-secondary));
  margin-bottom: 32px;
}

.volume-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.9;
  margin-bottom: 8px;
  font-weight: 700;
}

.volume-value {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 8px;
}

.volume-calculation {
  font-size: 0.8rem;
  opacity: 0.85;
  font-style: italic;
}

/* Modal Banner Layout */
.modal-banner .volume-main {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.volume-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  text-align: left;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-label {
  font-size: 0.75rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-value {
  font-size: 1rem;
  font-weight: 700;
}

.form-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.form-section-header h4 {
  margin: 0;
}

.ingredient-row {
  margin-bottom: 16px;
  padding: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.ingredient-row-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.ingredient-row .form-group {
  margin-bottom: 0;
}

.ingredient-row .form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ingredient-row .btn-danger {
  height: 44px;
  min-width: 44px;
  padding: 0 12px;
  font-size: 1.8rem;
  line-height: 1;
  border-radius: 8px;
  align-self: flex-end;
  flex-shrink: 0;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 1.1rem;
  background: var(--bg-card);
  border: 2px dashed var(--border-color);
  border-radius: 12px;
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7); display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.modal.show {
  display: flex;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7); display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  background: var(--bg-secondary);
  z-index: 10;
}

.modal-header h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.8rem;
  font-weight: 700;
}

.modal-header .btn {
  font-size: 1.5rem;
  line-height: 1;
  padding: 8px 16px;
}

.modal-body {
  padding: 32px;
}

.modal-body h3 {
  margin: 32px 0 16px 0;
  color: var(--text-primary);
  font-size: 1.3rem;
  font-weight: 700;
  border-bottom: 2px solid var(--accent-primary);
  padding-bottom: 8px;
}

.modal-body h3:first-child {
  margin-top: 0;
}

.modal-body .table {
  margin-bottom: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 24px;
  border-top: 2px solid #dc3545;
  background: #1a1a1a;
  position: sticky;
  bottom: 0;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--bg-hover);
  color: var(--accent-danger);
}

.badge-boil {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
}

.badge-flameout {
  background: linear-gradient(135deg, var(--accent-tertiary), var(--accent-secondary));
  color: white;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Add ingredient form styles */
.add-ingredient-form {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: 16px;
  align-items: end;
  padding: 20px;
  background: var(--glass-light);
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid var(--glass-border);
}

.add-ingredient-form .form-group {
  margin-bottom: 0;
}

.add-ingredient-form .grain-select-group,
.add-ingredient-form .hop-select-group {
  grid-column: span 1;
}

/* Table wrapper styles */
#malts-table-wrapper,
#hops-table-wrapper,
#mash-schedule-table-wrapper {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
}

.table {
  width: 100%;
  min-width: 100%;
  border-collapse: collapse;
  background: var(--glass-light);
  table-layout: auto;
}

.table thead {
  background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
  border-bottom: 3px solid #0d6efd;
  box-shadow: 0 2px 8px rgba(13, 110, 253, 0.15);
}

.table th {
  padding: 16px;
  text-align: left;
  font-weight: 700;
  color: #ffffff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 3px solid #0d6efd;
}

.table td {
  padding: 14px 16px;
  border-bottom: 1px solid #dee2e6;
  color: #212529;
  font-weight: 500;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover {
  background: #f8f9fa;
  transition: background-color 0.2s ease;
}

.table .empty-row td {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-secondary);
  font-style: italic;
}

.table .text-center {
  text-align: center;
}

.table .btn-danger {
  padding: 6px 12px;
  font-size: 1.2rem;
  line-height: 1;
}

/* Responsive adjustments for recipes */
@media (max-width: 1024px) {
  .add-ingredient-form {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  
  .add-ingredient-form .grain-select-group,
  .add-ingredient-form .hop-select-group {
    grid-column: span 2;
  }
  
  .add-ingredient-form button {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .recipe-card-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .recipe-card-actions {
    width: 100%;
  }
  
  .recipe-card-actions .btn {
    flex: 1;
  }
  
  .add-ingredient-form {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .add-ingredient-form .grain-select-group,
  .add-ingredient-form .hop-select-group,
  .add-ingredient-form button {
    grid-column: span 1;
  }
  
  .ingredient-row-content {
    grid-template-columns: 1fr;
  }
  
  .ingredient-row .btn-danger {
    width: 100%;
  }
  
  .modal-content {
    max-height: 100vh;
    border-radius: 0;
  }
  
  .modal-header,
  .modal-body {
    padding: 20px;
  }
  
  .table {
    font-size: 0.85rem;
  }
  
  .table th,
  .table td {
    padding: 8px;
  }
  
  .volume-value {
    font-size: 2rem;
  }
  
  .volume-details {
    grid-template-columns: 1fr 1fr;
  }
}

/* ===================================
   BREW BATCHES STYLES
   =================================== */

/* Action Bar */
.action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.view-toggle {
  display: flex;
  gap: 8px;
  background: var(--bg-card);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.view-btn {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.view-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.view-btn.active {
  background: var(--accent-primary);
  color: white;
}

.filter-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

.filter-btn.active {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}

/* Kanban Board */
.kanban-board {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 20px;
  min-height: 600px;
}

.kanban-column {
  flex: 0 0 280px;
  min-width: 280px;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 250px);
}

.kanban-header {
  padding: 16px;
  border-bottom: 3px solid #dc3545;
  background: #1a1a1a;
  border-radius: 16px 16px 0 0;
}

.kanban-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-icon {
  font-size: 1.4rem;
}

.kanban-title h3 {
  margin: 0;
  font-size: 1rem;
  color: #ccc;
  flex: 1;
}

.batch-count {
  background: #dc3545;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  min-width: 24px;
  text-align: center;
}

.kanban-cards {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100px;
}

.kanban-cards.drag-over {
  background: rgba(255, 66, 66, 0.05);
  border: 2px dashed var(--accent-primary);
  border-radius: 8px;
}

.kanban-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.kanban-card {
  background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
  border: 2px solid #dc3545;
  border-radius: 12px;
  padding: 16px;
  cursor: grab;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
  position: relative;
  overflow: hidden;
}

.kanban-card:hover {
  box-shadow: 0 8px 20px rgba(220, 53, 69, 0.4);
  transform: translateY(-4px) scale(1.02);
  border-color: #ff4d5a;
}

.kanban-card.dragging {
  opacity: 0.6;
  cursor: grabbing;
  transform: rotate(3deg) scale(1.05);
  box-shadow: 0 12px 30px rgba(220, 53, 69, 0.5);
}

.kanban-card-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 12px;
  gap: 8px;
}

.kanban-card-header h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  flex: 1;
  line-height: 1.3;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.card-menu-btn {
  background: rgba(220, 53, 69, 0.2);
  border: 1px solid rgba(220, 53, 69, 0.4);
  color: #dc3545;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 4px 8px;
  line-height: 1;
  transition: all 0.2s ease;
  border-radius: 6px;
  font-weight: 700;
}

.card-menu-btn:hover {
  background: #dc3545;
  color: #fff;
  border-color: #dc3545;
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4);
}

.kanban-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
  padding-left: 12px;
}

.card-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  gap: 12px;
  padding: 6px 10px;
  background: rgba(220, 53, 69, 0.1);
  border-radius: 6px;
  border-left: 3px solid #dc3545;
}

.card-label {
  color: #999;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.card-value {
  color: #fff;
  font-weight: 800;
  text-align: right;
  font-size: 0.95rem;
}

.kanban-card-footer {
  padding-top: 10px;
  padding-left: 12px;
  border-top: 2px solid rgba(220, 53, 69, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.card-brewer {
  font-size: 0.85rem;
  color: #ccc;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.card-date {
  font-size: 0.8rem;
  color: #888;
  font-weight: 600;
}

/* Card Status Badges */
.card-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.card-status.status-planning {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  border: 1px solid #1d4ed8;
}

.card-status.status-brewing {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
  border: 1px solid #b45309;
}

.card-status.status-fermenting {
  background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
  color: #fff;
  border: 1px solid #be185d;
}

.card-status.status-ready {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border: 1px solid #047857;
}

/* Configurable Card Component Fields */
.card-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  border-left: 3px solid #dc3545;
  transition: all 0.2s ease;
}

.card-field:hover {
  background: rgba(255, 255, 255, 0.08);
  border-left-color: #ff4d5a;
}

.card-field-icon {
  font-size: 1.1rem;
  color: #dc3545;
  flex-shrink: 0;
}

.card-field-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: 1;
  gap: 8px;
}

.card-field-label {
  color: #999;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-field-value {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  text-align: right;
}

/* Card Metrics */
.card-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 10px 0;
  padding-left: 12px;
}

.card-metric {
  background: rgba(220, 53, 69, 0.15);
  padding: 8px;
  border-radius: 6px;
  text-align: center;
  border: 1px solid rgba(220, 53, 69, 0.3);
}

.card-metric-label {
  font-size: 0.7rem;
  color: #999;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.card-metric-value {
  font-size: 1rem;
  color: #dc3545;
  font-weight: 800;
}

/* Batches Grid */
.batches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.batch-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.batch-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.batch-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 16px;
}

.batch-header h3 {
  font-size: 1.2rem;
  color: var(--text-primary);
  margin: 0;
  flex: 1;
}

.batch-status {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

.batch-status.status-planning {
  background: #dbeafe;
  color: #1e40af;
}

.batch-status.status-brewing {
  background: #fef3c7;
  color: #92400e;
}

.batch-status.status-fermenting {
  background: #fce7f3;
  color: #9f1239;
}

.batch-status.status-ready {
  background: #dcfce7;
  color: #166534;
}

.batch-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.batch-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

.batch-info .label {
  color: var(--text-secondary);
  font-weight: 700;
}

.batch-info .value {
  color: var(--text-primary);
  font-weight: 700;
}

.batch-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.batch-actions .btn {
  flex: 1;
}

/* Batches Table */
.table-container {
  width: 100%;
  background: var(--bg-card);
  border-radius: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.batches-table {
  width: 100%;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.batches-table thead {
  background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
  border-bottom: 3px solid #0d6efd;
  box-shadow: 0 2px 8px rgba(13, 110, 253, 0.15);
}

.batches-table th {
  padding: 16px;
  text-align: left;
  font-weight: 700;
  color: #ffffff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 3px solid #0d6efd;
}

.batches-table tbody tr {
  border-bottom: 1px solid #dee2e6;
  transition: background-color 0.2s ease;
}

.batches-table tbody tr:hover {
  background: #f8f9fa;
}

.batches-table tbody tr:last-child {
  border-bottom: none;
}

.batches-table td {
  padding: 16px;
  color: #212529;
  font-size: 0.95rem;
  font-weight: 500;
}

.batches-table td.batch-name {
  font-weight: 700;
  color: #212529;
}

.batches-table .status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

.batches-table .status-badge.status-planning {
  background: #dbeafe;
  color: #1e40af;
}

.batches-table .status-badge.status-brewing {
  background: #fef3c7;
  color: #92400e;
}

.batches-table .status-badge.status-fermenting {
  background: #fce7f3;
  color: #9f1239;
}

.batches-table .status-badge.status-ready {
  background: #dcfce7;
  color: #166534;
}

.batches-table .actions-cell {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
}

.batches-table .actions-cell .btn {
  padding: 6px 12px;
  min-width: auto;
}

/* Responsive Table */
@media (max-width: 1024px) {
  .batches-table {
    font-size: 0.9rem;
  }

  .batches-table th,
  .batches-table td {
    padding: 12px 8px;
  }
}

@media (max-width: 768px) {
  .table-container {
    overflow-x: auto;
  }

  .batches-table {
    min-width: 800px;
  }
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Wizard Modal */
.modal-large {
  max-width: 900px;
  width: 90%;
}

/* Wizard Progress - BOLD & PROMINENT */
.wizard-progress {
  display: flex;
  justify-content: space-between;
  padding: 30px 35px;
  background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
  border-bottom: 4px solid #dc3545;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5),
              0 4px 12px rgba(220, 53, 69, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
  border-radius: 15px 15px 0 0;
}

.wizard-progress::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 8%;
  right: 8%;
  height: 4px;
  background: linear-gradient(90deg, #444444 0%, #dc3545 100%);
  z-index: 0;
  border-radius: 2px;
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4);
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
  flex: 1;
  cursor: pointer;
  transition: all 0.3s ease;
}

.wizard-step:hover .step-number {
  transform: scale(1.1);
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #2d2d2d;
  border: 3px solid #555555;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.3rem;
  color: #999999;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.wizard-step.active .step-number {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  border-color: #dc3545;
  color: #FFFFFF;
  box-shadow: 0 6px 20px rgba(220, 53, 69, 0.6),
              0 3px 10px rgba(0, 0, 0, 0.4),
              0 0 0 4px rgba(220, 53, 69, 0.3);
  transform: scale(1.15);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.wizard-step.completed .step-number {
  background: linear-gradient(135deg, #FFFFFF 0%, #f0f0f0 100%);
  border-color: #FFFFFF;
  color: #dc3545;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.4),
              0 2px 8px rgba(0, 0, 0, 0.3);
  text-shadow: none;
}

.step-label {
  font-size: 0.95rem;
  color: #888888;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.wizard-step.active .step-label {
  color: #dc3545;
  font-weight: 900;
  font-size: 1rem;
  text-shadow: 0 2px 4px rgba(220, 53, 69, 0.4);
}

.wizard-step.completed .step-label {
  color: #FFFFFF;
  font-weight: 800;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Wizard Content */
.wizard-content {
  display: none;
  padding: 24px;
}

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

.wizard-content h3 {
  margin-bottom: 20px;
  color: var(--text-primary);
}

/* Recipe Selection */
.search-box {
  margin-bottom: 16px;
  position: relative;
}

.search-box .form-input {
  padding-left: 40px;
  font-size: 1rem;
  border: 2px solid var(--border-color);
  transition: border-color 0.2s ease;
}

.search-box .form-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

/* Form Sections */
.form-section {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--border-color);
}

.form-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.batch-details-section {
  background: rgba(220, 53, 69, 0.05);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid rgba(220, 53, 69, 0.2);
}

.recipe-selection-section {
  padding-top: 4px;
}

.section-title {
  margin: 0 0 20px 0;
  color: var(--text-primary);
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Form Row for side-by-side fields */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Field Labels - More Visible */
.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-primary) !important;
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.field-label .required,
.required {
  color: var(--accent-primary);
  font-weight: 700;
  margin-left: 4px;
}

/* Recipe Book - Compact List */
.recipes-book {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 350px;
  overflow-y: auto;
  padding: 8px;
  margin-top: 12px;
  background: var(--bg-primary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.recipes-book::-webkit-scrollbar {
  width: 8px;
}

.recipes-book::-webkit-scrollbar-track {
  background: var(--bg-primary);
  border-radius: 4px;
}

.recipes-book::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.recipes-book::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* Recipe Book Card - Compact */
.recipe-book-card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.recipe-book-card:hover {
  border-color: var(--accent-primary);
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

.recipe-book-card.selected {
  border-color: var(--accent-primary);
  border-width: 3px;
  background: var(--bg-card-hover);
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2);
}

.recipe-book-header {
  flex: 1;
  min-width: 0;
}

.recipe-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.check-icon {
  color: var(--accent-success);
  font-size: 1.2rem;
  font-weight: 700;
}

.recipe-name {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recipe-type {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: rgba(220, 53, 69, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

.recipe-book-stats {
  display: flex;
  gap: 12px;
  flex-wrap: nowrap;
}

.recipe-book-stats .stat {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .recipe-book-card {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .recipe-book-stats {
    flex-wrap: wrap;
  }
}

/* Recipe Selection Card */
.recipe-selection-card {
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--bg-card);
  position: relative;
}

.recipe-selection-card:hover {
  border-color: var(--accent-primary);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.recipe-selection-card.selected {
  border-color: var(--accent-primary);
  border-width: 3px;
  background: var(--bg-card-hover);
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2);
}

.recipe-sel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 12px;
}

.recipe-sel-header h4 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 700;
}

.recipe-style {
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: var(--brewery-foam);
  padding: 4px 12px;
  border-radius: 8px;
  white-space: nowrap;
}

.recipe-sel-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.detail-icon {
  font-size: 1.1rem;
}

.detail-text {
  font-weight: 500;
}

.selected-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--accent-success);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-secondary);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.empty-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-hint {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* Recipe Summary Box */
.recipe-summary-box {
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.summary-header h4 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.2rem;
}

.summary-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-item .label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 700;
}

.summary-item .value {
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: 700;
}

/* Checklist Styles */
.checklist-section {
  margin-bottom: 24px;
}

.checklist-section h4:not(.checklist-section-title) {
  margin-bottom: 16px;
  color: var(--text-primary);
  font-size: 1.1rem;
  text-align: left;
}

.checklist-grid {
  display: grid;
  gap: 16px;
}

.checklist-category {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
}

.checklist-category h5 {
  margin: 0 0 12px 0;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 700;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
}

.checklist-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.checklist-item:hover {
  background: var(--bg-hover);
}

.checklist-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--accent-success);
}

.checklist-item span {
  flex: 1;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 500;
}

.checklist-item input[type="checkbox"]:checked + span {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Batch Detail Modal */
.batch-detail-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.batch-detail-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
}

.batch-detail-section h3 {
  margin: 0 0 20px 0;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 700;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-row:last-child {
  margin-bottom: 0;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.ingredient-category {
  margin-bottom: 24px;
}

.ingredient-category:last-child {
  margin-bottom: 0;
}

.ingredient-category h4 {
  margin: 0 0 12px 0;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ingredient-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ingredient-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.ingredient-item:hover {
  background: var(--bg-hover);
  border-color: var(--accent-primary);
}

.ingredient-name-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.ingredient-name {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.95rem;
}

.ingredient-meta {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.ingredient-amount {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  margin-left: 16px;
}

.kanban-card {
  cursor: pointer;
}

/* Recipe Collapsible Section */
.recipe-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
}

.recipe-header:hover h3 {
  color: var(--accent-primary);
}

.recipe-header h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 700;
  transition: color 0.2s ease;
}

.toggle-icon {
  font-size: 1.2rem;
  color: var(--text-secondary);
  transition: transform 0.3s ease;
}

.toggle-icon.rotated {
  transform: rotate(-180deg);
}

.recipe-content {
  max-height: 2000px;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  opacity: 1;
}

.recipe-content.collapsed {
  max-height: 0;
  opacity: 0;
}

/* Mash Schedule */
.mash-schedule-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mash-step {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.mash-step:hover {
  background: var(--bg-hover);
  border-color: var(--accent-primary);
}

.mash-step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--accent-primary);
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.9rem;
}

.mash-step-name {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mash-step-name .step-title {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.95rem;
}

.mash-step-name .step-description {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.mash-step-temp {
  color: var(--accent-warning);
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
}

.mash-step-time {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
}

/* Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
}

/* Button Sizes */
.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}

.btn-icon {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.btn-icon:hover {
  background: var(--bg-hover);
}

/* Batch Detail Page - Standard Layout with Sidebar */
.main-wrapper > .page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0;
  gap: 24px;
}

.page-header .header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.page-header .header-left h1 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--text-primary);
  font-weight: 700;
}

.page-header .header-center {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
  justify-content: center;
}

.header-info-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.info-value {
  color: var(--text-primary);
  font-weight: 700;
}

.page-header .header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
}

.phase-badge {
  padding: 8px 24px;
  border-radius: 24px;
  font-weight: 700;
  font-size: 1rem;
}

.phase-badge.phase-planning {
  background: #dbeafe;
  color: #1e40af;
}

.phase-badge.phase-brewing {
  background: #fef3c7;
  color: #92400e;
}

.phase-badge.phase-fermenting {
  background: #fce7f3;
  color: #9f1239;
}

.phase-badge.phase-ready {
  background: #dcfce7;
  color: #166534;
}

.batch-detail-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.batch-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
}

.batch-section h2 {
  margin: 0 0 24px 0;
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 700;
  text-align: left;
}

.batch-section h3 {
  margin: 0 0 16px 0;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 700;
  text-align: left;
}

.batch-section h4,
.batch-section h5 {
  text-align: left;
}

/* Recipe Section */
.recipe-section h2 {
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 16px;
  text-align: left;
}

.recipe-section .collapsible-header {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 0.2s;
  padding: 8px;
  margin: -8px;
  border-radius: 8px;
}

.recipe-section .collapsible-header:hover {
  background-color: var(--bg-hover);
}

.recipe-section .collapse-icon {
  font-size: 0.9rem;
  transition: transform 0.2s;
  display: inline-block;
  margin-left: auto;
}

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

.recipe-column h3 {
  margin: 0 0 16px 0;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
}

.ingredient-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ingredient-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.ingredient-name {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.95rem;
}

.ingredient-meta {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.ingredient-amount {
  color: var(--accent-primary);
  font-weight: 700;
  font-size: 0.9rem;
}

/* Checklist Section */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.section-header h2 {
  margin: 0;
  text-align: left;
}

.checklist-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.checklist-category h4 {
  margin: 0 0 16px 0;
  color: var(--text-primary);
  font-size: 1.1rem;
  text-align: left;
  font-weight: 700;
}

.checklist-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.checklist-item:hover {
  background: var(--bg-hover);
  border-color: var(--accent-primary);
}

.checklist-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.checklist-item input[type="checkbox"]:checked + span {
  text-decoration: line-through;
  color: var(--text-muted);
}

.checklist-item span {
  flex: 1;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 500;
}

/* Mash Wizard */
.mash-wizard {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mash-step-card {
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 16px;
  transition: all 0.2s ease;
}

.mash-step-card:hover {
  border-color: var(--accent-primary);
}

.mash-step-card.expanded {
  border-color: var(--accent-secondary);
}

.mash-step-card.step-locked {
  background: rgba(245, 245, 245, 0.3);
  border-color: #d0d0d0;
  position: relative;
}

.mash-step-card.step-locked:hover {
  border-color: #b0b0b0;
  cursor: pointer;
}

.mash-step-card.step-locked .step-header {
  cursor: pointer;
}

.mash-step-card.step-locked .step-header > *:not(.preview-badge) {
  opacity: 0.85;
}

.mash-step-card.step-locked button:disabled,
.mash-step-card.step-locked input:disabled,
.mash-step-card.step-locked textarea:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.preview-icon {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 16px;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.4);
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
}

.mash-step-card.step-locked .step-header:hover .preview-icon {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  box-shadow: 0 4px 10px rgba(102, 126, 234, 0.6);
}

/* Preview Modal */
.preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.preview-modal.show {
  opacity: 1;
}

.preview-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7); }

.preview-modal-content {
  position: relative;
  background: var(--bg-card);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 90vw;
  max-height: 85vh;
  width: 800px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalSlideIn 0.3s ease;
}

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

.preview-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.preview-modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--text-primary);
}

.preview-modal-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.preview-modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.preview-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.preview-notice {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
  border-left: 4px solid #667eea;
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.preview-modal-body input,
.preview-modal-body textarea,
.preview-modal-body button {
  opacity: 0.6;
  pointer-events: none;
}

@media (max-width: 768px) {
  .preview-modal-content {
    max-width: 95vw;
    max-height: 90vh;
    width: 100%;
  }
  
  .preview-modal-header {
    padding: 16px;
  }
  
  .preview-modal-header h3 {
    font-size: 1.2rem;
  }
  
  .preview-modal-body {
    padding: 16px;
  }
}

@media (max-width: 768px) {
  .preview-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
  }
}

.mash-step-card.step-locked:not(.expanded) .step-content::before {
  content: "🔒 Complete previous step first • Click to preview";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.95rem;
  color: #555;
  background: rgba(255, 255, 255, 0.98);
  padding: 16px 28px;
  border-radius: 12px;
  border: 2px solid #e0e0e0;
  z-index: 5;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  pointer-events: none;
  text-align: center;
  line-height: 1.5;
  width: max-content;
}

@media (max-width: 768px) {
  .mash-step-card.step-locked:not(.expanded) .step-content::before {
    font-size: 0.85rem;
    padding: 12px 20px;
    max-width: 80%;
  }
}

.step-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  cursor: pointer;
  user-select: none;
  position: relative;
  flex-wrap: nowrap;
  overflow: visible;
}

.step-header:hover {
  background: var(--bg-hover);
  border-radius: 10px;
}

.step-number-group {
  flex-shrink: 0;
}

.step-timer-header {
  flex-shrink: 0;
}

.step-info {
  flex: 1;
  min-width: 0;
}

.step-header .step-complete {
  display: none !important;
}

.step-header .preview-badge {
  flex-shrink: 0;
  margin-left: 12px;
  order: 999;
}

@media (max-width: 1400px) {
  .step-header {
    grid-template-columns: 50px 1fr auto;
    gap: 15px;
  }
  
  .step-timer-header {
    grid-column: 1 / -1;
    justify-self: start;
    margin: 15px 0 10px 0;
  }
  
  .step-status {
    grid-column: 1 / 3;
    justify-self: center;
  }
  
  .preview-badge {
    grid-column: 3;
    grid-row: 1;
  }
}

.step-number-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.step-number {
  width: 48px;
  height: 48px;
  background: var(--accent-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  flex-shrink: 0;
}

.step-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  white-space: nowrap;
}

.step-info {
  flex: 1;
}

.step-info h4 {
  margin: 0 0 4px 0;
  color: var(--text-primary);
  font-size: 1.1rem;
  text-align: left;
}

.step-info p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.step-meta {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 4px;
}

.step-target-temp {
  margin-top: 8px;
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(237, 137, 54, 0.15), rgba(221, 107, 32, 0.15));
  border-radius: 8px;
  border-left: 4px solid #ed8936;
  display: inline-block;
}

.step-target-temp strong {
  font-size: 1.4rem;
  font-weight: 900;
  color: #dd6b20;
  margin: 0 6px;
  text-shadow: 0 1px 2px rgba(221, 107, 32, 0.2);
}

.step-target-temp .temp-fahrenheit {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 700;
  margin-left: 4px;
}

.collapse-icon {
  color: var(--accent-primary);
  font-size: 1.2rem;
  transition: transform 0.2s ease;
  margin-left: auto;
}

.step-timer-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-right: 20px;
  padding: 10px 20px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
  border-radius: 12px;
  border: 2px solid rgba(102, 126, 234, 0.2);
}

.timer-display-header {
  font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--accent-primary);
  min-width: 140px;
  text-align: center;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  border: 3px solid var(--accent-primary);
}

.timer-display-header.timer-running {
  color: #48bb78;
  border-color: #48bb78;
  animation: pulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(72, 187, 120, 0.3);
}

.timer-display-header.timer-complete {
  color: #f56565;
  border-color: #f56565;
  animation: blink 0.5s ease-in-out 3;
}

@keyframes pulse {
  0%, 100% { 
    opacity: 1;
    transform: scale(1);
  }
  50% { 
    opacity: 0.85;
    transform: scale(1.02);
  }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.start-timer-btn,
.pause-timer-btn {
  font-size: 1.1rem;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 140px;
}

.start-timer-btn {
  background: linear-gradient(135deg, #48bb78, #38a169);
  color: white;
}

.start-timer-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #38a169, #2f855a);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(72, 187, 120, 0.4);
}

.start-timer-btn:active:not(:disabled) {
  transform: translateY(0);
}

.start-timer-btn:disabled {
  background: linear-gradient(135deg, #cbd5e0, #a0aec0);
  color: #718096;
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.6;
}

.pause-timer-btn {
  background: linear-gradient(135deg, #ed8936, #dd6b20);
  color: white;
}

.pause-timer-btn:hover {
  background: linear-gradient(135deg, #dd6b20, #c05621);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(237, 137, 54, 0.4);
}

.pause-timer-btn:active {
  transform: translateY(0);
}

.step-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-status input[type="checkbox"] {
  width: 24px;
  height: 24px;
}

.step-content {
  padding: 20px;
  position: relative;
}

.step-locked.expanded .step-content::after {
  content: "PREVIEW MODE";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  font-size: 3rem;
  font-weight: 900;
  color: rgba(102, 126, 234, 0.08);
  pointer-events: none;
  white-space: nowrap;
  letter-spacing: 0.3em;
  z-index: 1;
}

@media (max-width: 768px) {
  .step-locked.expanded .step-content::after {
    font-size: 2rem;
    letter-spacing: 0.2em;
  }
}

.step-checks-grid {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Timer Controls at Top */
.step-timer-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 16px;
}

.btn-timer-start,
.btn-timer-pause,
.btn-timer-reset {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-timer-start {
  background: linear-gradient(135deg, #28a745 0%, #218838 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-timer-pause {
  background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
  color: #000;
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.btn-timer-reset {
  background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.btn-timer-start:hover,
.btn-timer-pause:hover,
.btn-timer-reset:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.step-notes-section {
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  padding: 40px 50px;
  border-radius: 25px;
  border: 4px solid #dc3545;
  box-shadow: 0 10px 40px rgba(220, 53, 69, 0.4),
              0 5px 20px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  animation: pulse-glow 2s ease-in-out infinite;
  max-width: 1200px;
  margin: 0 auto 20px auto;
}

.step-notes-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
  animation: rotate-glow 10s linear infinite;
  pointer-events: none;
}

.step-notes-section h5 {
  margin: 0 0 20px 0;
  font-size: 1.8rem;
  color: #FFFFFF;
  font-weight: 900;
  text-align: left;
  position: relative;
  z-index: 1;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.step-notes-section button {
  display: inline-block !important;
  visibility: visible !important;
  margin-top: 12px;
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
  color: white !important;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  opacity: 1;
}

.step-notes-section button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.step-notes-section button:active {
  transform: translateY(0);
}

.step-notes-section button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.step-complete-button-container {
  display: flex;
  justify-content: flex-end;
  padding: 24px 0 12px 0;
  margin-top: 20px;
  border-top: 2px solid var(--border-color);
}

.step-complete-btn {
  padding: 16px 48px;
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(72, 187, 120, 0.3);
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
}

.step-complete-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
  box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
  transform: translateY(-2px);
}

.step-complete-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(72, 187, 120, 0.3);
}

.step-complete-btn:disabled {
  background: #cbd5e0;
  color: #a0aec0;
  cursor: not-allowed;
  box-shadow: none;
}

.step-complete-btn.completed {
  background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
  box-shadow: 0 4px 16px rgba(66, 153, 225, 0.3);
}

.step-complete-btn.completed:hover:not(:disabled) {
  background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
  box-shadow: 0 6px 20px rgba(66, 153, 225, 0.4);
}

.step-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.step-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.detail-value {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1rem;
}

.detail-value.temp {
  color: var(--accent-warning);
  font-size: 1.2rem;
}

.step-timer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: 8px;
}

.timer-display {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: monospace;
  min-width: 80px;
}

.timer-display.timer-complete {
  color: var(--accent-success);
}

/* Step Notes Section */
.step-notes {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-notes h5 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 700;
}

.step-notes-input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color 0.2s ease;
  min-height: 120px;
}

.step-notes-input:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.step-notes-input::placeholder {
  color: var(--text-muted);
}

/* Notes Section */
.notes-input-container {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.notes-input-container textarea {
  flex: 1;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
}

.notes-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.note-item {
  background: var(--bg-primary);
  border-left: 4px solid var(--accent-primary);
  padding: 16px;
  border-radius: 8px;
}

.note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.note-timestamp {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.note-body p {
  margin: 0;
  color: var(--text-primary);
  line-height: 1.6;
}

.info-box {
  background: var(--bg-primary);
  border: 2px solid var(--accent-success);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}

.info-box h4 {
  margin: 0 0 8px 0;
  color: var(--accent-success);
  font-size: 1.3rem;
}

.info-box p {
  margin: 0;
  color: var(--text-secondary);
}

.loading-spinner {
  color: var(--text-muted);
  text-align: center;
  padding: 20px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .recipe-grid {
    grid-template-columns: 1fr;
  }
  
  .page-header .header-center {
    display: none;
  }
}

@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    gap: 12px;
  }
  
  .page-header .header-left,
  .page-header .header-right {
    width: 100%;
    justify-content: space-between;
  }
  
  .batch-section {
    padding: 16px;
  }
  
  .recipe-grid {
    grid-template-columns: 1fr;
  }
  
  .step-details {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .step-timer {
    margin-left: 0;
    width: 100%;
  }
  
  .step-content-grid {
    grid-template-columns: 1fr;
  }
  
  .step-checks-grid {
    grid-template-columns: 1fr;
  }
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
  .kanban-board {
    gap: 16px;
  }

  .kanban-column {
    flex: 0 0 260px;
    min-width: 260px;
  }
}

@media (max-width: 768px) {
  .action-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .view-toggle {
    justify-content: center;
  }

  .filter-group {
    justify-content: center;
  }

  .kanban-board {
    flex-direction: column;
    overflow-x: visible;
    gap: 16px;
  }

  .kanban-column {
    flex: 1;
    min-width: 100%;
    max-height: none;
  }

  .kanban-cards {
    max-height: 400px;
  }

  .batches-grid {
    grid-template-columns: 1fr;
  }

  .wizard-progress {
    padding: 16px 8px;
  }

  .wizard-progress::before {
    display: none;
  }

  .wizard-step {
    flex-direction: row;
    justify-content: flex-start;
  }

  .step-number {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  .step-label {
    text-align: left;
    font-size: 0.8rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .summary-details {
    grid-template-columns: 1fr 1fr;
  }

  .modal-large {
    width: 95%;
    max-width: none;
  }

  .batch-actions {
    flex-direction: column;
  }

  .batch-actions .btn {
    width: 100%;
  }
}

/* Inline edit input styling for recipe ingredient tables */
.inline-edit-input {
  width: 80px;
  padding: 4px 8px;
  border: 1px solid #cbd5e0;
  border-radius: 4px;
  background-color: #ffffff;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  text-align: right;
}

.inline-edit-input:hover {
  border-color: #4299e1;
  background-color: #f7fafc;
}

.inline-edit-input:focus {
  outline: none;
  border-color: #3182ce;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
  background-color: #ffffff;
}

/* pH Reading Section Styles */
.step-ph-section {
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  padding: 40px 50px;
  border-radius: 25px;
  border: 4px solid #dc3545;
  box-shadow: 0 10px 40px rgba(220, 53, 69, 0.4),
              0 5px 20px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  animation: pulse-glow 2s ease-in-out infinite;
  max-width: 1200px;
  margin: 0 auto 20px auto;
}

.step-ph-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
  animation: rotate-glow 10s linear infinite;
  pointer-events: none;
}

.step-ph-section h5 {
  margin: 0 0 20px 0;
  font-size: 1.3rem;
  color: #FFFFFF;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  z-index: 1;
}

.ph-input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.ph-input {
  flex: 1;
  padding: 14px 18px;
  border: 3px solid #555555;
  border-radius: 12px;
  font-size: 1.1rem;
  background: #2d2d2d;
  color: #FFFFFF;
  font-weight: 700;
  transition: all 0.3s ease;
}

.ph-input:focus {
  outline: none;
  border-color: #dc3545;
  box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.3);
  transform: translateY(-2px);
}

.ph-readings-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.ph-reading-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background-color: rgba(220, 53, 69, 0.15);
  border-radius: 10px;
  border-left: 5px solid #dc3545;
  transition: all 0.2s ease;
}

.ph-reading-item:hover {
  background-color: rgba(220, 53, 69, 0.25);
  transform: translateX(5px);
}

.ph-value {
  font-weight: 700;
  font-size: 1.2rem;
  color: #FFFFFF;
}

.ph-time {
  font-size: 0.9rem;
  color: #cccccc;
  font-weight: 500;
}

/* Temperature Check Section Styles */
.step-temp-section {
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  padding: 40px 50px;
  border-radius: 25px;
  border: 4px solid #dc3545;
  box-shadow: 0 10px 40px rgba(220, 53, 69, 0.4),
              0 5px 20px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  animation: pulse-glow 2s ease-in-out infinite;
  max-width: 1200px;
  margin: 0 auto 20px auto;
}

.step-temp-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
  animation: rotate-glow 10s linear infinite;
  pointer-events: none;
}

.step-temp-section h5 {
  margin: 0 0 20px 0;
  font-size: 1.3rem;
  color: #FFFFFF;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  z-index: 1;
}

.temp-input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.temp-input {
  flex: 1;
  padding: 14px 18px;
  border: 3px solid #555555;
  border-radius: 12px;
  font-size: 1.1rem;
  background: #2d2d2d;
  color: #FFFFFF;
  font-weight: 700;
  transition: all 0.3s ease;
}

.temp-input:focus {
  outline: none;
  border-color: #dc3545;
  box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.3);
  transform: translateY(-2px);
}

.temp-readings-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.temp-reading-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background-color: rgba(220, 53, 69, 0.15);
  border-radius: 10px;
  border-left: 5px solid #dc3545;
  transition: all 0.2s ease;
}

.temp-reading-item:hover {
  background-color: rgba(220, 53, 69, 0.25);
  transform: translateX(5px);
}

.temp-value {
  font-weight: 700;
  font-size: 1.2rem;
  color: #FFFFFF;
}

.temp-time {
  font-size: 0.9rem;
  color: #cccccc;
  font-weight: 500;
}

.timer-events-log {
  font-size: 0.85rem;
  color: #666;
  margin-top: 8px;
  line-height: 1.6;
}

.timer-start-time {
  font-size: 0.8rem;
  color: #666;
  margin-top: 4px;
}

/* Sparge Section Styles */
.step-sparge-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-sparge-section h5 {
  margin: 0 0 12px 0;
  font-size: 1.1rem;
  color: var(--text-primary);
  font-weight: 700;
}

.sparge-input-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sparge-input-group label {
  min-width: 140px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #4a5568;
}

.sparge-input-group .time-input,
.sparge-input-group .amount-input,
.sparge-input-group .temp-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #cbd5e0;
  border-radius: 4px;
  font-size: 0.9rem;
}

/* Boil Section Styles */
.step-boil-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-boil-section h5 {
  margin: 0 0 12px 0;
  font-size: 1.1rem;
  color: var(--text-primary);
  font-weight: 700;
}

.boil-input-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.boil-input-group label {
  min-width: 100px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #4a5568;
}

.boil-input-group .time-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #cbd5e0;
  border-radius: 4px;
  font-size: 0.9rem;
}

/* Hop Additions Section */
.hop-additions-section {
  margin-top: 16px;
  padding: 16px;
  background: #f7fafc;
  border-radius: 8px;
}

.hop-additions-section h5 {
  margin: 0 0 12px 0;
  font-size: 1.1rem;
  color: var(--text-primary);
  font-weight: 700;
}

.hop-additions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hop-addition-item {
  display: grid;
  grid-template-columns: 40px 60px 1fr 80px 150px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: white;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.hop-addition-item:hover {
  border-color: #cbd5e0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.hop-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.hop-time {
  font-weight: 700;
  color: #0d6efd;
  font-size: 0.9rem;
}

.hop-name {
  font-weight: 700;
  color: #2d3748;
}

.hop-amount {
  font-size: 0.9rem;
  color: #718096;
  text-align: right;
}

.hop-countdown {
  font-size: 0.85rem;
  color: #666;
  text-align: right;
  font-weight: 700;
}

.irish-moss-item {
  display: grid;
  grid-template-columns: 40px 1fr 150px;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #fffaf0;
  border-radius: 6px;
  border: 1px solid #fbd38d;
}

.irish-moss-item .hop-name {
  color: #744210;
}

/* Breweries Grid */
.breweries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

/* Brewery Card */
.brewery-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.brewery-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.brewery-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.brewery-card-header h3 {
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  flex: 1;
}

.brewery-card-actions {
  display: flex;
  gap: 8px;
}

.btn-icon {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: var(--bg-card-hover);
  transform: scale(1.05);
}

.btn-icon.btn-danger:hover {
  background: var(--accent-danger);
  color: white;
  border-color: var(--accent-danger);
}

.brewery-card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.brewery-info-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.info-label {
  font-weight: 700;
  color: var(--text-secondary);
  min-width: 100px;
  flex-shrink: 0;
}

.info-value {
  color: var(--text-primary);
  flex: 1;
}

.brewery-card-footer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.brewery-card-footer small {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Notification Styles */
.notification {
  position: fixed;
  top: 20px;
  right: -400px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px 24px;
  box-shadow: var(--shadow-lg);
  z-index: 10000;
  min-width: 300px;
  max-width: 400px;
  transition: right 0.3s ease;
  font-weight: 700;
}

.notification.show {
  right: 20px;
}

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

.notification-error {
  border-left: 4px solid var(--accent-danger);
  color: var(--accent-danger);
}

.notification-info {
  border-left: 4px solid var(--accent-tertiary);
  color: var(--accent-tertiary);
}

/* Breweries Table Styles */
.table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
}

#breweries-table {
  min-width: 800px;
}

#breweries-table th:nth-child(1) { width: 16%; } /* Brewery Name */
#breweries-table th:nth-child(2) { width: 20%; } /* Address */
#breweries-table th:nth-child(3) { width: 11%; } /* Brewing Since */
#breweries-table th:nth-child(4) { width: 11%; } /* Member Since */
#breweries-table th:nth-child(5) { width: 10%; } /* Status */
#breweries-table th:nth-child(6) { width: 24%; } /* Description */
#breweries-table th:nth-child(7) { width: 8%; }  /* Actions */

.description-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: help;
}

/* Status Badge Styles */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.status-new {
  background: linear-gradient(135deg, rgba(33, 150, 243, 0.2), rgba(33, 150, 243, 0.3));
  color: var(--accent-tertiary);
  border: 1px solid var(--accent-tertiary);
}

.status-active {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(76, 175, 80, 0.3));
  color: var(--accent-success);
  border: 1px solid var(--accent-success);
}

.status-inactive {
  background: linear-gradient(135deg, rgba(158, 158, 158, 0.2), rgba(158, 158, 158, 0.3));
  color: var(--text-secondary);
  border: 1px solid var(--text-secondary);
}

/* Responsive adjustments for breweries */
@media (max-width: 768px) {
  .table-wrapper {
    border-radius: 8px;
  }
  
  #breweries-table {
    font-size: 0.85rem;
  }
  
  #breweries-table th,
  #breweries-table td {
    padding: 8px 12px;
  }
}

/* ========================================
   BREW WIZARD LAYOUT STYLES
   ======================================== */

/* Wizard Layout Container */
.brew-wizard-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 25px;
  min-height: calc(100vh - 200px);
  margin-top: 20px;
}

/* Main Wizard Content Area */
.wizard-main-content {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 4px 20px var(--shadow-color);
  display: flex;
  flex-direction: column;
  gap: 25px;
}

/* Wizard Progress Bar */
.wizard-progress-bar {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.wizard-progress-bar::-webkit-scrollbar {
  height: 6px;
}

.wizard-progress-bar::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
  border-radius: 3px;
}

.wizard-progress-bar::-webkit-scrollbar-thumb {
  background: var(--accent-primary);
  border-radius: 3px;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 80px;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 10px;
  border-radius: 8px;
  position: relative;
}

.progress-step:hover {
  background: var(--bg-tertiary);
  transform: translateY(-2px);
}

.progress-step.active {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
}

.progress-step.completed {
  opacity: 0.7;
}

.progress-step.locked {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.step-circle {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 3px solid var(--bg-tertiary);
  transition: all 0.3s ease;
}

.progress-step.active .step-circle {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  border-color: var(--accent-primary);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.progress-step.completed .step-circle {
  background: var(--accent-success);
  color: white;
  border-color: var(--accent-success);
}

.progress-step.completed .step-circle::after {
  content: "✓";
  font-size: 1.3rem;
}

.step-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.2;
}

.progress-step.active .step-label {
  color: var(--accent-primary);
}

.progress-step.completed .step-label {
  color: var(--accent-success);
}

/* Step connector line */
.progress-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 32px;
  right: -15px;
  width: 20px;
  height: 3px;
  background: var(--bg-tertiary);
  z-index: -1;
}

.progress-step.completed:not(:last-child)::after {
  background: var(--accent-success);
}

/* Wizard Step Content */
.wizard-step-content {
  flex: 1;
  min-height: 400px;
}

.wizard-phase-content {
  animation: fadeIn 0.4s ease;
}

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

.phase-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--bg-secondary);
}

.phase-header h2 {
  margin: 0 0 10px 0;
  color: var(--text-primary);
  font-size: 1.8rem;
}

.phase-description {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1rem;
}

.phase-actions {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 2px solid var(--bg-secondary);
  display: flex;
  justify-content: center;
}

/* Individual Brew Step Panel */
.brew-step-panel {
  background: var(--bg-card);
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 2px 10px var(--shadow-color);
}

.brew-step-panel .phase-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.step-timer-display {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-primary);
  font-family: 'Courier New', monospace;
}

.step-timer-controls {
  display: flex;
  gap: 10px;
}

/* Wizard Navigation */
.wizard-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 2px solid var(--bg-secondary);
  gap: 20px;
}

.wizard-step-info {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 700;
}

/* Right Sidebar Styles */
.wizard-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: fit-content;
  position: sticky;
  top: 100px;
}

.sidebar-section {
  background: var(--bg-card);
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 2px 10px var(--shadow-color);
}

.section-header-compact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--bg-secondary);
}

.section-header-compact h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-primary);
  font-weight: 700;
}

.btn-icon-sm {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
  font-size: 1rem;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.btn-icon-sm:hover {
  color: var(--accent-primary);
  transform: scale(1.1);
}

.sidebar-content {
  max-height: 600px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.sidebar-content::-webkit-scrollbar {
  width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
  border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb {
  background: var(--accent-primary);
  border-radius: 3px;
}

.sidebar-content.collapsed {
  display: none;
}

/* Recipe Sidebar Styles */
.recipe-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 15px 0;
}

.recipe-stats-compact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
  padding: 15px;
  background: var(--bg-secondary);
  border-radius: 10px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: 700;
}

.ingredients-compact {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.ingredient-group {
  border-bottom: 1px solid var(--bg-secondary);
  padding-bottom: 12px;
}

.ingredient-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.ingredient-group h5 {
  margin: 0 0 10px 0;
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 700;
}

.ingredient-items-compact {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ingredient-item-compact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: var(--bg-secondary);
  border-radius: 6px;
  font-size: 0.85rem;
}

.ingredient-name-compact {
  color: var(--text-primary);
  font-weight: 700;
  flex: 1;
}

.ingredient-amount-compact {
  color: var(--text-secondary);
  font-weight: 700;
  margin-left: 10px;
}

/* Notes Sidebar Styles */
.notes-input-container-compact {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 15px;
}

.notes-input-container-compact textarea {
  padding: 10px;
  border: 1px solid var(--bg-tertiary);
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.9rem;
  resize: vertical;
  transition: all 0.2s ease;
}

.notes-input-container-compact textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.notes-timeline-compact {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
}

.note-item-compact {
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: 8px;
  border-left: 3px solid var(--accent-primary);
}

.note-header-compact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.note-time-compact {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 700;
}

.note-content-compact {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.4;
}

/* Responsive Design */
@media (max-width: 1400px) {
  .brew-wizard-layout {
    grid-template-columns: 1fr 350px;
  }
}

@media (max-width: 1200px) {
  .brew-wizard-layout {
    grid-template-columns: 1fr;
  }
  
  .wizard-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .wizard-sidebar {
    grid-template-columns: 1fr;
  }
  
  .wizard-main-content {
    padding: 20px;
  }
  
  .wizard-progress-bar {
    padding: 15px 10px;
  }
  
  .progress-step {
    min-width: 60px;
    padding: 8px;
  }
  
  .step-circle {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }
  
  .step-label {
    font-size: 0.7rem;
  }
  
  .wizard-navigation {
    flex-direction: column;
    gap: 15px;
  }
  
  .wizard-navigation button {
    width: 100%;
  }
}

/* ========================================
   RESPONSIVE DESIGN - GLOBAL IMPROVEMENTS
   ======================================== */

/* Ensure all table containers have horizontal scroll */
.table-container,
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 20px;
}

/* Ensure tables don't break layout */
.grains-table,
.batches-table,
.table,
.catalog-table {
  min-width: 100%;
  table-layout: auto;
}

/* Universal table header styling - Bold & Sharp Bootstrap Blue */
.catalog-table thead,
table thead:not(.custom-thead) {
  background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%) !important;
  border-bottom: 3px solid #0d6efd !important;
  box-shadow: 0 2px 8px rgba(13, 110, 253, 0.15) !important;
}

.catalog-table th,
table th:not(.custom-th) {
  padding: 16px !important;
  text-align: left !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  font-size: 0.85rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.8px !important;
  border-bottom: 3px solid #0d6efd !important;
  background: transparent !important;
}

/* Catalog-specific table header colors */
/* Grain/Malt tables - Brown */
.grain-table thead,
.malt-table thead,
table.grain-catalog thead,
table.malt-catalog thead,
#grain-catalog-table thead,
#grains-table thead,
#malts-table thead {
  background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%) !important;
  border-bottom: 3px solid #8B4513 !important;
  box-shadow: 0 2px 8px rgba(139, 69, 19, 0.15) !important;
}

.grain-table th,
.malt-table th,
table.grain-catalog th,
table.malt-catalog th,
#grain-catalog-table th,
#grains-table th,
#malts-table th {
  border-bottom: 3px solid #8B4513 !important;
}

/* Hop tables - Green */
.hop-table thead,
table.hop-catalog thead,
#hop-catalog-table thead,
#hops-table thead,
#hop-selection thead {
  background: linear-gradient(135deg, #2E7D32 0%, #388E3C 100%) !important;
  border-bottom: 3px solid #2E7D32 !important;
  box-shadow: 0 2px 8px rgba(46, 125, 50, 0.15) !important;
}

.hop-table th,
table.hop-catalog th,
#hop-catalog-table th,
#hops-table th,
#hop-selection th {
  border-bottom: 3px solid #2E7D32 !important;
}

/* Yeast tables - Orange */
.yeast-table thead,
table.yeast-catalog thead,
#yeast-catalog-table thead,
#yeasts-table thead,
#yeast-table thead,
#yeast-selection thead {
  background: linear-gradient(135deg, #F57C00 0%, #FB8C00 100%) !important;
  border-bottom: 3px solid #F57C00 !important;
  box-shadow: 0 2px 8px rgba(245, 124, 0, 0.15) !important;
}

.yeast-table th,
table.yeast-catalog th,
#yeast-catalog-table th,
#yeasts-table th,
#yeast-table th,
#yeast-selection th {
  border-bottom: 3px solid #F57C00 !important;
}

/* Content section max width consistency */
.content-section,
.main-content {
  max-width: 100%;
  width: 100%;
  padding: 20px;
}

/* Container max-width adjustments */
.container {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

/* Large Desktop - 1400px and up */
@media (min-width: 1400px) {
  .main-wrapper {
    max-width: calc(100vw - 260px);
  }
  
  .content-section,
  .main-content {
    max-width: 1400px;
    margin: 0 auto;
  }
}

/* Desktop - 1024px to 1399px */
@media (max-width: 1399px) {
  .main-wrapper {
    max-width: calc(100vw - 260px);
  }
  
  .content-section,
  .main-content {
    padding: 20px 24px;
  }
  
  .header-container {
    padding: 16px 24px;
  }
}

/* Tablet Landscape - 768px to 1023px */
@media (max-width: 1023px) {
  .main-wrapper {
    margin-left: 0;
    max-width: 100vw;
  }
  
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .content-section,
  .main-content {
    padding: 16px 20px;
  }
  
  .header-container {
    padding: 12px 20px;
  }
  
  .page-title {
    font-size: 1.5rem;
  }
  
  /* Make tables scrollable on tablet */
  .table-container {
    border-radius: 12px;
  }
  
  .grains-table th,
  .grains-table td {
    padding: 12px 14px;
    font-size: 0.9rem;
  }
}

/* Tablet Portrait - 600px to 767px */
@media (max-width: 767px) {
  .content-section,
  .main-content {
    padding: 12px 16px;
  }
  
  .header-container {
    padding: 10px 16px;
  }
  
  .page-title {
    font-size: 1.3rem;
  }
  
  /* Smaller table cells */
  .grains-table th,
  .grains-table td {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
  
  /* Stack form rows */
  .form-row {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  
  /* Filters stack vertically */
  .catalog-filters {
    flex-direction: column;
    gap: 12px;
  }
  
  .filter-input,
  .filter-select {
    width: 100%;
  }
  
  /* Summary cards stack */
  .summary-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  
  .detail-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Mobile - 480px to 599px */
@media (max-width: 599px) {
  .content-section,
  .main-content {
    padding: 10px 12px;
  }
  
  .header-container {
    padding: 8px 12px;
  }
  
  .page-title {
    font-size: 1.1rem;
  }
  
  /* Even smaller table cells */
  .grains-table th {
    padding: 10px 8px;
    font-size: 0.75rem;
  }
  
  .grains-table td {
    padding: 8px;
    font-size: 0.8rem;
  }
  
  /* Make buttons full width */
  .btn,
  button {
    width: 100%;
    justify-content: center;
  }
  
  .action-buttons {
    flex-direction: column;
    gap: 8px;
  }
  
  /* Section headers */
  .section-header h2,
  .section-header h3 {
    font-size: 1.1rem;
  }
}

/* Small Mobile - below 480px */
@media (max-width: 479px) {
  .content-section,
  .main-content {
    padding: 8px 10px;
  }
  
  .page-title {
    font-size: 1rem;
  }
  
  /* Very compact tables */
  .grains-table th,
  .grains-table td {
    padding: 6px;
    font-size: 0.75rem;
  }
  
  /* Hide less important columns on very small screens */
  .grains-table th:nth-child(n+6),
  .grains-table td:nth-child(n+6) {
    display: none;
  }
}

/* Ensure proper scrolling behavior */
html {
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  max-width: 100vw;
}

.app-container {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Prevent horizontal scroll on all pages */
* {
  max-width: 100%;
}

/* Allow tables to overflow */
table {
  max-width: none !important;
}

/* Responsive table wrapper enhancement */
.table-wrapper,
.table-container {
  position: relative;
  box-shadow: var(--shadow-sm);
  border-radius: 12px;
  background: var(--bg-card);
}

/* Add scroll indicator for tables */
.table-container::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 30px;
  background: linear-gradient(to left, var(--bg-card) 0%, transparent 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.table-container::-webkit-scrollbar {
  height: 8px;
}

.table-container::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
  background: var(--accent-primary);
  border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
  background: var(--accent-hover);
}

/* Touch-friendly button sizing for mobile */
@media (max-width: 767px) {
  .btn,
  button,
  .nav-link {
    min-height: 44px;
    min-width: 44px;
  }
  
  .mobile-menu-toggle {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Increase tap target size for table actions */
  .action-buttons .btn {
    padding: 10px 16px;
    min-height: 44px;
  }
  
  /* Better spacing for mobile forms */
  .form-group {
    margin-bottom: 16px;
  }
  
  input,
  select,
  textarea {
    font-size: 16px; /* Prevents zoom on iOS */
    min-height: 44px;
  }
}

/* Smooth scrolling for better UX */
html {
  scroll-behavior: smooth;
}

/* Better focus states for keyboard navigation */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Catalog Table Component Styles */
.catalog-table-wrapper {
  position: relative;
}

.sortable-column {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s;
}

.sortable-column:hover {
  background-color: rgba(0, 0, 0, 0.1) !important;
}

.sort-indicator {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.8em;
  opacity: 0.3;
  transition: opacity 0.2s;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background: #f0f0f0 !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.catalog-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 0 0 12px 12px;
  flex-wrap: wrap;
  gap: 16px;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-buttons {
  display: flex;
  gap: 4px;
  align-items: center;
}

.pagination-btn {
  padding: 8px 12px;
  border: 1px solid #ddd;
  background: white;
  color: #333;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  transition: all 0.2s;
  min-width: 36px;
  text-align: center;
}

.pagination-btn:hover:not([disabled]) {
  background: #f0f0f0;
  border-color: #999;
  transform: translateY(-1px);
}

.pagination-btn.active {
  background: var(--accent-primary, #8B4513);
  color: white;
  border-color: var(--accent-primary, #8B4513);
  font-weight: 700;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-ellipsis {
  padding: 0 8px;
  color: #999;
}

.items-per-page {
  display: flex;
  align-items: center;
  gap: 8px;
}

.items-per-page label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #666;
}

.items-per-page select {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  background: white;
}

.catalog-stats {
  font-size: 0.95rem;
  color: #666;
  font-weight: 700;
}

/* Responsive adjustments for catalog component */
@media (max-width: 768px) {
  .catalog-footer {
    flex-direction: column;
    align-items: stretch;
  }
  
  .pagination-controls {
    justify-content: center;
    order: 2;
  }
  
  .catalog-stats {
    order: 1;
    text-align: center;
  }
  
  .items-per-page {
    order: 3;
    justify-content: center;
  }
  
  .pagination-btn {
    padding: 6px 10px;
    font-size: 0.85rem;
    min-width: 32px;
  }
}

@media (max-width: 480px) {
  .pagination-btn {
    padding: 6px 8px;
    font-size: 0.8rem;
    min-width: 28px;
  }
  
  .catalog-footer {
    padding: 12px;
  }
}

/* Stat Cards */
.stat-card {
  background: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

.stat-card h4 {
  margin: 0 0 10px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card .stat-value {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1.2;
}

/* ===================================
   RECIPE DETAIL PAGE STYLES
   =================================== */

/* Recipe Header - Unified for View and Edit */
/* Recipe Header - Unified for view and edit */
.recipe-header,
#view-mode .recipe-header,
.edit-mode-header {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border-radius: 12px 12px 0 0;
  padding: 24px;
  margin-bottom: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  border: 4px solid #1a1a1a;
  border-bottom: 2px solid #dc2626;
}

.recipe-header-info,
#view-mode .recipe-header-info,
.edit-mode-header-info {
  flex: 1;
  min-width: 300px;
}

.recipe-header h2,
#view-mode .recipe-header h2,
.edit-mode-header h2 {
  margin: 0 0 8px 0;
  color: white;
  font-size: 2rem;
  font-weight: 900;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.5px;
}

.recipe-header p,
#view-mode .recipe-header p {
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 500;
}

/* Button styling in header */
.recipe-header .btn,
#view-mode .recipe-header .btn,
.edit-mode-actions .btn {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%) !important;
  color: white !important;
  border: none !important;
  font-weight: 800;
  padding: 12px 24px;
  font-size: 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  display: inline-block;
  text-decoration: none;
  z-index: 10;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.recipe-header .btn:hover,
#view-mode .recipe-header .btn:hover,
.edit-mode-actions .btn:hover,
.edit-mode-actions .btn-primary:hover {
  background: linear-gradient(135deg, #b91c1c 0%, #7f1d1d 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.5);
}

.edit-mode-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  z-index: 10;
  position: relative;
}

.edit-mode-actions .btn-secondary {
  background: rgba(255, 255, 255, 0.15) !important;
  color: white !important;
  border: 2px solid rgba(255, 255, 255, 0.4) !important;
  font-weight: 700;
}

.edit-mode-actions .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  border-color: white !important;
}

/* Stat Cards - Modern Design */
#view-mode .stat-card {
  background: var(--card-background);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#view-mode .stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  border-color: var(--primary-color);
}

#view-mode .stat-card h4 {
  margin: 0 0 10px 0;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

#view-mode .stat-card .stat-value {
  margin: 0;
  color: var(--primary-color);
  font-size: 1.75rem;
  font-weight: 900;
}

/* Section Headers - Consistent Style */
#view-mode .form-section h3,
#edit-mode .form-section h3 {
  margin-bottom: 14px;
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--primary-color);
  border-bottom: 3px solid var(--primary-color);
  padding-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Form Sections */
.form-section {
  background: var(--card-background);
  border: 3px solid #1a1a1a;
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.form-section:hover {
  border-color: #dc2626;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
}

/* Recipe Summary Section - Special Styling */
.form-section:first-of-type {
  border: 4px solid #1a1a1a;
  border-radius: 10px 10px 0 0;
  margin-bottom: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  background: linear-gradient(to bottom, #ffffff 0%, #f9fafb 100%);
}

/* Calculated Fields Display */
.calc-field {
  background: var(--table-row-hover);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.calc-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.calc-value {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--primary-color);
}

/* Recipe Badges (ABV, IBU) - Apple Glass Style */
.recipe-badge {
  background: linear-gradient(135deg, 
    rgba(220, 38, 38, 0.85) 0%, 
    rgba(153, 27, 27, 0.85) 100%);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  width: 110px;
  height: 90px;
  box-shadow: 
    0 8px 32px rgba(220, 38, 38, 0.35),
    0 2px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 1px rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.recipe-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.2) 0%, 
    rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

.recipe-badge:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 
    0 12px 48px rgba(220, 38, 38, 0.45),
    0 4px 12px rgba(0, 0, 0, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.25);
}

.recipe-badge .badge-label {
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 6px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.recipe-badge .badge-value {
  font-size: 1.6rem;
  font-weight: 900;
  color: white;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  z-index: 1;
}

/* SRM Badge - Special Glass Effect */
#srm-badge {
  background: linear-gradient(135deg, 
    rgba(26, 26, 26, 0.85) 0%, 
    rgba(45, 45, 45, 0.85) 100%);
  width: 110px;
  min-width: 110px;
  height: 90px;
  padding: 16px 20px;
}

/* SRM Color Display */
.srm-color-display {
  width: 70px;
  height: 42px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.3),
    inset 0 2px 4px rgba(0, 0, 0, 0.2),
    inset 0 -1px 2px rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.srm-color-display::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.25) 0%, 
    rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
  z-index: 1;
}

.srm-color-display::after {
  content: attr(data-srm);
  position: absolute;
  bottom: 4px;
  right: 6px;
  font-size: 0.75rem;
  font-weight: 900;
  color: white;
  text-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.9),
    0 0 8px rgba(0, 0, 0, 0.5);
  z-index: 2;
  padding: 2px 4px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Recipe Detail Tabs */
.recipe-tabs {
  display: flex;
  gap: 0;
  margin: 0;
  border: 4px solid #1a1a1a;
  border-top: none;
  border-bottom: 4px solid #1a1a1a;
  padding: 0;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border-radius: 0 0 10px 10px;
  overflow: hidden;
}

.recipe-tab {
  flex: 1;
  padding: 14px 24px;
  background: transparent;
  border: none;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.6);
  transition: all 0.3s ease;
  position: relative;
}

.recipe-tab:last-child {
  border-right: none;
}

.recipe-tab:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(220, 38, 38, 0.1);
}

.recipe-tab.active {
  color: white;
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  font-weight: 900;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.3);
  transform: scale(1.02);
  z-index: 1;
}

.recipe-tab.active::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #fca5a5;
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
  border: 4px solid #1a1a1a;
  border-top: none;
  border-radius: 0 0 10px 10px;
  margin-top: -4px;
}

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

.tab-content .form-section {
  border-radius: 0 0 6px 6px;
  border-top: none;
  margin-bottom: 0;
}

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

/* Calculations Table */
.calculations-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 0.95rem;
}

.calculations-table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.calculations-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.85rem;
}

.calculations-table tbody tr {
  border-bottom: 1px solid #e5e7eb;
  transition: background-color 0.2s ease;
}

.calculations-table tbody tr:hover {
  background-color: rgba(102, 126, 234, 0.05);
}

.calculations-table tbody tr:last-child {
  border-bottom: 2px solid #667eea;
}

.calculations-table td {
  padding: 12px 16px;
  vertical-align: top;
}

.calculations-table td:first-child {
  font-weight: 700;
  color: #667eea;
  width: 180px;
}

.calculations-table td:nth-child(2) {
  color: #6b7280;
  font-size: 0.9rem;
  width: 220px;
}

.calculations-table .result-value {
  font-weight: 800;
  font-size: 1.1rem;
  color: #1f2937;
  white-space: nowrap;
  width: 120px;
}

.calculations-table .formula-cell {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  color: #4b5563;
  background-color: #f9fafb;
  padding: 8px 12px !important;
  border-radius: 4px;
  line-height: 1.6;
  word-break: break-word;
}

@media print {
  .sidebar,
  .top-bar,
  .mobile-menu-toggle,
  .theme-toggle,
  .action-buttons,
  .btn {
    display: none !important;
  }
  
  .main-wrapper {
    margin-left: 0;
  }
  
  .table-container {
    overflow: visible;
  }
  
  .grains-table {
    page-break-inside: auto;
  }
  
  .grains-table tr {
    page-break-inside: avoid;
    page-break-after: auto;
  }
}

/* ===================================
   BREW BATCH DETAIL - CRISP VERTICAL LAYOUT
   =================================== */

/* Override wizard layout to be single column */
.brew-wizard-layout.vertical-focus {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 1200px;
  margin: 20px auto;
  border: 4px solid #dc3545;
  border-radius: 20px;
  box-shadow: 0 0 30px rgba(220, 53, 69, 0.3),
              0 0 60px rgba(220, 53, 69, 0.2);
}

/* Topbar with batch info and recipe link */
.batch-topbar {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  padding: 20px 30px;
  border-radius: 20px 20px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 20px rgba(220, 53, 69, 0.4);
}

.batch-topbar-left h1 {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0 0 5px 0;
  color: white;
}

.batch-topbar-left .batch-meta {
  font-size: 0.95rem;
  opacity: 0.9;
  display: flex;
  gap: 20px;
  align-items: center;
}

.batch-topbar-right {
  display: flex;
  gap: 15px;
  align-items: center;
}

.btn-view-recipe {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-view-recipe:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

/* Main step content - BOLD and CENTERED */
.wizard-main-content.vertical-focus {
  background: var(--bg-card);
  border-radius: 0 0 20px 20px;
  padding: 0;
  box-shadow: 0 4px 20px var(--shadow-color);
}

.step-container-vertical {
  padding: 55px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 40px;
  border: 5px solid #dc3545;
  border-radius: 35px;
  box-shadow: 0 15px 50px rgba(220, 53, 69, 0.45),
              0 8px 25px rgba(0, 0, 0, 0.2),
              inset 0 3px 0 rgba(255, 255, 255, 0.2),
              0 0 0 12px rgba(220, 53, 69, 0.15),
              0 0 60px rgba(220, 53, 69, 0.2);
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 50%, var(--bg-card) 100%);
  position: relative;
  transition: all 0.3s ease;
}

.step-container-vertical::after {
  content: '';
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border-radius: 35px;
  background: linear-gradient(135deg, #dc3545 0%, #c82333 50%, #dc3545 100%);
  z-index: -1;
  opacity: 0.7;
  filter: blur(15px);
  animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.5; filter: blur(15px); }
  50% { opacity: 0.9; filter: blur(20px); }
}

/* Step Header - Simple Title */
.step-header-vertical {
  width: 100%;
  max-width: 700px;
  text-align: center;
  margin-bottom: 5px;
}

.step-header-vertical h2 {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--text-primary);
  margin: 0 0 5px 0;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.step-header-vertical .step-description {
  font-size: 1.2rem;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.5px;
  margin: 0;
  line-height: 1.3;
}

/* TIMER DISPLAY - HIGH CONTRAST FOR BREWERY */
.timer-display-hero {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: #FFFFFF;
  padding: 50px 60px;
  border-radius: 25px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4),
              0 5px 20px rgba(0, 0, 0, 0.3),
              0 0 0 4px #dc3545;
  min-width: 400px;
  position: relative;
  overflow: hidden;
  animation: pulse-glow 2s ease-in-out infinite;
  border: 4px solid #dc3545;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 10px 40px rgba(220, 53, 69, 0.4),
                0 5px 20px rgba(0, 0, 0, 0.3),
                0 0 0 4px #dc3545;
  }
  50% {
    box-shadow: 0 10px 60px rgba(220, 53, 69, 0.6),
                0 5px 20px rgba(0, 0, 0, 0.3),
                0 0 0 4px #e84a5f;
  }
}

.timer-display-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: rotate-glow 10s linear infinite;
}

@keyframes rotate-glow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* MASH STEP: Combined Timer + Temperature Display - HIGH CONTRAST */
.mash-timer-temp-display {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: #FFFFFF;
  padding: 40px 50px;
  border-radius: 25px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4),
              0 5px 20px rgba(0, 0, 0, 0.3),
              0 0 0 4px #dc3545;
  min-width: 400px;
  position: relative;
  overflow: hidden;
  animation: pulse-glow 2s ease-in-out infinite;
  border: 4px solid #dc3545;
}

.mash-timer-temp-display::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: rotate-glow 10s linear infinite;
}

.mash-display-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.mash-timer-section,
.mash-temp-section {
  text-align: center;
}

.mash-temp-section {
  border-left: 3px solid rgba(255, 255, 255, 0.3);
  padding-left: 30px;
}

.temp-value-hero {
  font-size: 4.5rem;
  font-weight: 900;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  line-height: 1;
  margin-bottom: 10px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  color: white;
}

.timer-label {
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.95;
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
}

.timer-value {
  font-size: 5rem;
  font-weight: 900;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  line-height: 1;
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.timer-controls {
  display: flex;
  gap: 15px;
  justify-content: center;
  position: relative;
  z-index: 1;
  margin-top: 10px;
}

.timer-controls button {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.5);
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.timer-controls button:hover {
  background: rgba(255, 255, 255, 0.45);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.timer-controls button:active {
  transform: translateY(-1px);
}

/* Complete Button Inside Timer */
.btn-complete-step-in-timer {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  color: white;
  border: 3px solid rgba(255, 255, 255, 0.5);
  padding: 22px 50px;
  border-radius: 18px;
  font-size: 1.5rem;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 30px rgba(76, 175, 80, 0.6),
              0 4px 15px rgba(0, 0, 0, 0.3),
              inset 0 2px 0 rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 25px;
  position: relative;
  z-index: 1;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 450px;
}

.btn-complete-step-in-timer:hover:not(:disabled) {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 40px rgba(76, 175, 80, 0.7),
              0 6px 20px rgba(0, 0, 0, 0.35);
}

.btn-complete-step-in-timer:active {
  transform: translateY(-2px) scale(1.01);
}

.btn-complete-step-in-timer:disabled {
  background: linear-gradient(135deg, #ccc 0%, #aaa 100%);
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none;
}

/* Instructions Toggle Button */
.btn-show-instructions {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 15px;
  position: relative;
  z-index: 1;
}

.btn-show-instructions:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.btn-show-instructions.active {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Collapsible Instructions Container */
.step-instructions-collapsible {
  width: 100%;
  max-width: 600px;
  margin-top: 20px;
  animation: slideDown 0.3s ease;
}

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

/* Step Instructions - CLEAR and BOLD */
.step-instructions-vertical {
  background: var(--bg-secondary);
  padding: 30px;
  border-radius: 20px;
  max-width: 600px;
  width: 100%;
}

.step-instructions-vertical h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 20px 0;
  color: var(--text-primary);
}

.step-instructions-vertical ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.step-instructions-vertical li {
  padding: 15px 20px;
  background: var(--bg-card);
  border-radius: 12px;
  margin-bottom: 12px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: 0 2px 8px var(--shadow-color);
}

.step-instructions-vertical li::before {
  content: '▸';
  color: var(--primary-color);
  font-size: 1.3rem;
  font-weight: 900;
  flex-shrink: 0;
}

/* NAVIGATION BUTTONS - VERTICAL ARRANGEMENT */
.step-navigation-vertical {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  max-width: 500px;
  margin-top: 20px;
}

.btn-complete-step {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 20px 40px;
  border-radius: 15px;
  font-size: 1.3rem;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 30px rgba(76, 175, 80, 0.5),
              0 4px 15px rgba(0, 0, 0, 0.2),
              0 0 0 3px rgba(76, 175, 80, 0.2);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-complete-step:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 10px 40px rgba(76, 175, 80, 0.6),
              0 5px 20px rgba(0, 0, 0, 0.25),
              0 0 0 3px rgba(76, 175, 80, 0.3);
}

.btn-complete-step:disabled {
  background: linear-gradient(135deg, #ccc 0%, #aaa 100%);
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

.btn-nav-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.btn-prev-step,
.btn-next-step {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
  color: var(--text-primary);
  border: 3px solid var(--primary-color);
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 1.15rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15),
              0 2px 10px rgba(102, 126, 234, 0.1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-prev-step:hover:not(:disabled),
.btn-next-step:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary-color) 0%, #8B7FE8 100%);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3),
              0 4px 15px rgba(0, 0, 0, 0.2);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-prev-step:disabled,
.btn-next-step:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

/* Notes Section - BELOW NAVIGATION */
.notes-section-vertical {
  background: var(--bg-secondary);
  padding: 30px;
  border-radius: 20px;
  margin-top: 40px;
  max-width: 700px;
  width: 100%;
}

.notes-section-vertical h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0 0 20px 0;
  color: var(--text-primary);
}

.notes-input-vertical {
  display: flex;
  gap: 12px;
  margin-bottom: 25px;
}

.notes-input-vertical textarea {
  flex: 1;
  padding: 15px;
  border-radius: 12px;
  border: 2px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 1rem;
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

.notes-input-vertical button {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 15px 25px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.notes-input-vertical button:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

.notes-timeline-vertical {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.note-item-vertical {
  background: var(--bg-card);
  padding: 15px 20px;
  border-radius: 12px;
  border-left: 4px solid var(--primary-color);
  box-shadow: 0 2px 8px var(--shadow-color);
}

.note-item-vertical .note-timestamp {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 8px;
}

.note-item-vertical .note-text {
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.5;
}

/* Recipe Modal */
.recipe-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
}

.recipe-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.recipe-modal-content {
  background: var(--bg-card);
  border-radius: 20px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.recipe-modal-header {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  padding: 25px 30px;
  border-radius: 20px 20px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.recipe-modal-header h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0;
  color: white;
}

.btn-close-modal {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.btn-close-modal:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.recipe-modal-body {
  padding: 30px;
}

/* Process Modal Styles */
.btn-view-process {
  background: linear-gradient(135deg, #FFFFFF 0%, #f0f0f0 100%);
  color: #dc3545;
  border: 2px solid rgba(220, 53, 69, 0.3);
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.2);
  margin-left: 10px;
}

.btn-view-process:hover {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 53, 69, 0.5);
}

.process-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 35px;
  padding: 25px;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.process-stat {
  text-align: center;
  padding: 15px;
  background: var(--bg-card);
  border-radius: 12px;
  border: 2px solid var(--border-color);
}

.process-stat-label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.process-stat-value {
  display: block;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--primary-color);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.process-steps-timeline {
  position: relative;
}

.process-step-item {
  position: relative;
  display: flex;
  gap: 25px;
  margin-bottom: 30px;
}

.process-step-number {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  border: 3px solid rgba(255, 255, 255, 0.3);
}

.process-step-content {
  flex: 1;
  background: var(--bg-card);
  padding: 20px 25px;
  border-radius: 15px;
  border: 2px solid var(--border-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.process-step-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.process-step-header h3 {
  font-size: 1.4rem;
  font-weight: 900;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.process-step-meta {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.process-meta-item {
  background: var(--bg-secondary);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.process-step-description {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.process-connector {
  position: absolute;
  left: 35px;
  top: 70px;
  width: 4px;
  height: 50px;
  background: linear-gradient(180deg, var(--primary-color) 0%, var(--border-color) 100%);
  border-radius: 2px;
}

/* Responsive */
@media (max-width: 768px) {
  .batch-topbar {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .batch-topbar-left .batch-meta {
    flex-direction: column;
    gap: 8px;
  }
  
  .timer-display-hero {
    min-width: auto;
    width: 100%;
    padding: 40px 30px;
  }
  
  .timer-value {
    font-size: 3.5rem;
  }
  
  .btn-nav-row {
    grid-template-columns: 1fr;
  }
  
  .step-container-vertical {
    padding: 25px 20px;
  }
  
  .measurement-input-row {
    flex-direction: column;
  }
  
  .measurement-input-group {
    width: 100%;
  }
  
  /* Mash display responsive */
  .mash-timer-temp-display {
    min-width: auto;
    width: 100%;
    padding: 30px 25px;
  }
  
  .mash-display-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .mash-temp-section {
    border-left: none;
    border-top: 3px solid rgba(255, 255, 255, 0.3);
    padding-left: 0;
    padding-top: 20px;
  }
  
  .temp-value-hero {
    font-size: 3.5rem;
  }
}

/* ===================================
   MEASUREMENT CHECKS (TEMP & PH)
   =================================== */

.measurement-checks-container {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
  padding: 30px;
  border-radius: 20px;
  max-width: 700px;
  width: 100%;
  margin-top: 20px;
  border: 2px solid rgba(102, 126, 234, 0.2);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15),
              0 2px 10px rgba(102, 126, 234, 0.1);
}

.measurement-input-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.measurement-input-group {
  flex: 1;
  min-width: 250px;
}

.measurement-input-group label {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.input-with-button {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-wrap: nowrap;
}

.measurement-input {
  flex: 1;
  min-width: 0;
  padding: 12px 15px;
  border-radius: 10px;
  border: 2px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.measurement-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-add-measurement {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%) !important;
  color: white !important;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  width: auto !important;
  min-width: 80px;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.btn-add-measurement:hover {
  background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.btn-add-measurement:active {
  transform: translateY(0);
}

/* Measurements Log */
.measurements-log {
  margin-top: 20px;
  min-height: 60px;
}

.measurements-timeline {
  background: var(--bg-card);
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 2px 10px var(--shadow-color);
}

.measurements-timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border-color);
}

.measurements-timeline-header h4 {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-toggle-view {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-toggle-view:hover {
  background: var(--bg-tertiary);
  border-color: var(--primary-color);
}

.measurements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.measurement-group-log h4 {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0 0 12px 0;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.measurement-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: 8px;
}

.measurement-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.measurement-item {
  background: var(--bg-card);
  padding: 12px 15px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 8px var(--shadow-color);
  border-left: 4px solid var(--primary-color);
  transition: all 0.3s ease;
}

.measurement-item.temp-item {
  border-left-color: #ff6b6b;
  background: linear-gradient(90deg, rgba(255, 107, 107, 0.05) 0%, var(--bg-card) 30%);
}

.measurement-item.ph-item {
  border-left-color: #667eea;
  background: linear-gradient(90deg, rgba(102, 126, 234, 0.05) 0%, var(--bg-card) 30%);
}

.measurement-item:hover {
  transform: translateX(3px);
  box-shadow: 0 4px 12px var(--shadow-color);
}

.measurement-type-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.measurement-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.measurement-value-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.measurement-value {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--text-primary);
}

.measurement-elapsed {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-color);
  background: rgba(102, 126, 234, 0.1);
  padding: 2px 8px;
  border-radius: 6px;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

.measurement-time {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  background: var(--bg-secondary);
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  cursor: help;
}

.btn-delete-measurement {
  background: rgba(255, 107, 107, 0.1);
  color: #ff6b6b;
  border: 2px solid rgba(255, 107, 107, 0.3);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  padding: 0;
  line-height: 1;
}

.btn-delete-measurement:hover {
  background: rgba(255, 107, 107, 0.2);
  border-color: #ff6b6b;
  transform: scale(1.1);
}

/* Measurement Feedback Toast */
.measurement-feedback {
  position: fixed;
  top: 100px;
  right: 20px;
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  color: white;
  padding: 15px 25px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
  z-index: 10001;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.4s ease;
}

.measurement-feedback.show {
  opacity: 1;
  transform: translateX(0);
}

/* ===================================
   Brew Batch Detail Wizard Styles
   =================================== */

/* Quick View Panels */
.quick-view-panel {
  background: #2d2d2d;
  border: 2px solid #dc3545;
  border-radius: 8px;
  margin-bottom: 20px;
  overflow: hidden;
}

.quick-view-panel .panel-header {
  background: #1a1a1a;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #dc3545;
}

.quick-view-panel .panel-header h2 {
  color: #ffffff;
  font-size: 1.4rem;
  margin: 0;
}

.quick-view-panel .btn-close {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.quick-view-panel .btn-close:hover {
  background: #dc3545;
  color: #ffffff;
}

.quick-view-panel .panel-content {
  padding: 20px;
  max-height: 500px;
  overflow-y: auto;
}

/* Process Overview */
.process-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.process-step-item {
  background: #1a1a1a;
  border: 2px solid #444;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  transition: all 0.3s ease;
}

.process-step-item.active {
  border-color: #dc3545;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d0a0e 100%);
}

.process-step-item.completed {
  border-color: #28a745;
  background: linear-gradient(135deg, #1a1a1a 0%, #0d2818 100%);
}

.process-step-item .step-number {
  background: #444;
  color: #ffffff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
}

.process-step-item.active .step-number {
  background: #dc3545;
}

.process-step-item.completed .step-number {
  background: #28a745;
}

.process-step-item .step-info h4 {
  color: #ffffff;
  margin: 0 0 4px 0;
  font-size: 1rem;
}

.process-step-item .step-status {
  color: #999;
  font-size: 0.85rem;
  margin: 0;
}

.process-step-item.active .step-status {
  color: #dc3545;
}

.process-step-item.completed .step-status {
  color: #28a745;
}

/* Wizard Container */
.wizard-container {
  background: #2d2d2d;
  border: none;
  border-bottom: 1px solid #444;
  border-radius: 0;
  overflow: hidden;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

/* Wizard Progress Bar */
.wizard-progress {
  display: flex;
  justify-content: space-between;
  background: #1a1a1a;
  padding: 20px;
  border-bottom: 2px solid #dc3545;
  overflow-x: auto;
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
  position: relative;
  flex: 1;
}

.wizard-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 60%;
  width: calc(100% - 40px);
  height: 2px;
  background: #444;
  z-index: 0;
}

.wizard-step.completed:not(:last-child)::after {
  background: #28a745;
}

.wizard-step .step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #444;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  border: 2px solid #444;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

.wizard-step.active .step-circle {
  background: #dc3545;
  border-color: #dc3545;
  transform: scale(1.2);
}

.wizard-step.completed .step-circle {
  background: #28a745;
  border-color: #28a745;
}

.wizard-step.completed .step-circle::after {
  content: '✓';
  position: absolute;
}

.wizard-step .step-label {
  color: #999;
  font-size: 0.85rem;
  margin-top: 8px;
  text-align: center;
}

.wizard-step.active .step-label {
  color: #dc3545;
  font-weight: bold;
}

.wizard-step.completed .step-label {
  color: #28a745;
}

/* Wizard Content */
.wizard-content {
  padding: 30px;
  min-height: 500px;
}

.step-container h2 {
  color: #ffffff;
  font-size: 2rem;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid #dc3545;
}

.recipe-reference {
  background: #1a1a1a;
  border-left: 4px solid #dc3545;
  padding: 16px;
  margin-bottom: 24px;
  border-radius: 4px;
}

.recipe-reference h3 {
  color: #dc3545;
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.mash-step-ref,
.hop-addition,
.yeast-info {
  color: #ffffff;
  padding: 8px 0;
  border-bottom: 1px solid #444;
}

.mash-step-ref:last-child,
.hop-addition:last-child,
.yeast-info:last-child {
  border-bottom: none;
}

.step-section {
  background: #1a1a1a;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.step-section h3 {
  color: #dc3545;
  font-size: 1.3rem;
  margin-bottom: 16px;
}

/* Mash Step Cards */
.mash-step-card {
  background: #2d2d2d;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
}

.mash-step-card:last-child {
  margin-bottom: 0;
}

.mash-step-card h4 {
  color: #8B4513;
  font-size: 1.2rem;
  margin-bottom: 8px;
  margin-top: 0;
}

.mash-step-target {
  color: #ffffff;
  background: rgba(139, 69, 19, 0.2);
  padding: 10px 16px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 1rem;
  border-left: 3px solid #8B4513;
}

.mash-step-target strong {
  color: #A0522D;
}

/* Strike Water Section */
.strike-water-section {
  border: 2px solid #8B4513;
  background: rgba(139, 69, 19, 0.1);
}

.strike-water-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.info-card {
  background: #2d2d2d;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.info-label {
  color: #A0522D;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.info-value {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: bold;
}

/* Mash Timer */
.mash-timer-container {
  background: #000000;
  border: 3px solid #8B4513;
  border-radius: 12px;
  padding: 30px;
  margin: 20px 0;
  text-align: center;
}

.timer-large {
  font-size: 5rem;
  font-weight: bold;
  color: #8B4513;
  font-family: 'Courier New', monospace;
  text-shadow: 0 0 20px rgba(139, 69, 19, 0.5);
  margin-bottom: 10px;
}

.timer-target {
  color: #A0522D;
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.timer-controls-large {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-xl {
  padding: 16px 32px;
  font-size: 1.2rem;
  font-weight: bold;
  min-width: 250px;
}

/* Mash Step Header */
.mash-step-header {
  background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
}

.step-progress {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.mash-step-header h3 {
  color: #ffffff;
  font-size: 1.8rem;
  margin: 0 0 12px 0;
}

.target-params {
  display: flex;
  gap: 24px;
  justify-content: center;
  font-size: 1.1rem;
  color: #ffffff;
}

/* Reading Entry */
.reading-entry-section {
  background: #1a1a1a;
  border: 2px solid #444;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
}

.reading-entry-section h4 {
  color: #8B4513;
  margin-top: 0;
  margin-bottom: 16px;
}

.reading-entry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr auto;
  gap: 12px;
  align-items: end;
}

/* Readings History */
.readings-history {
  background: #1a1a1a;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
}

.readings-history h4 {
  color: #8B4513;
  margin-top: 0;
  margin-bottom: 16px;
}

.reading-row {
  display: flex;
  gap: 16px;
  padding: 10px;
  background: #2d2d2d;
  border-radius: 4px;
  margin-bottom: 8px;
  align-items: center;
}

.reading-time {
  color: #A0522D;
  font-weight: bold;
  min-width: 100px;
}

.reading-temp {
  color: #ffffff;
  font-weight: bold;
  min-width: 60px;
}

.reading-ph {
  color: #66BB6A;
  min-width: 80px;
}

.reading-notes {
  color: #cccccc;
  flex: 1;
}

.no-readings {
  color: #888;
  text-align: center;
  padding: 20px;
}

/* Mash Steps Overview */
.mash-steps-overview {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mash-step-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #2d2d2d;
  border-radius: 4px;
  border-left: 4px solid #444;
}

.mash-step-summary.current {
  background: rgba(139, 69, 19, 0.2);
  border-left-color: #8B4513;
}

.mash-step-summary.completed {
  opacity: 0.6;
  border-left-color: #2E7D32;
}

.mash-step-summary.active {
  border-left-color: #F57C00;
}

.step-status-icon {
  font-size: 1.2rem;
  min-width: 30px;
}

.step-name {
  color: #ffffff;
  font-weight: bold;
  flex: 1;
}

.step-params {
  color: #A0522D;
}

.step-readings {
  color: #888;
  font-size: 0.9rem;
}

/* Alert styles */
.alert {
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.alert-warning {
  background: rgba(251, 140, 0, 0.2);
  border: 1px solid #FB8C00;
  color: #FFB74D;
}

/* Responsive Mash Step */
@media (max-width: 768px) {
  .timer-large {
    font-size: 3rem;
  }
  
  .reading-entry-grid {
    grid-template-columns: 1fr;
  }
  
  .btn-xl {
    min-width: 100%;
    padding: 14px 20px;
  }
  
  .target-params {
    flex-direction: column;
    gap: 8px;
  }
  
  .reading-row {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
}

/* Timer Section */
.timer-controls {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.timer-controls input {
  flex: 1;
  padding: 12px;
  background: #2d2d2d;
  border: 1px solid #444;
  border-radius: 4px;
  color: #ffffff;
  font-size: 1rem;
}

.timer-display {
  font-size: 3rem;
  font-weight: bold;
  color: #ffffff;
  text-align: center;
  font-family: 'Courier New', monospace;
  padding: 20px;
  background: #000000;
  border-radius: 8px;
  border: 2px solid #dc3545;
}

/* Measurements Grid */
.measurements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.measurement-item {
  display: flex;
  flex-direction: column;
}

.measurement-item label {
  color: #ffffff;
  font-size: 0.9rem;
  margin-bottom: 6px;
  font-weight: 500;
}

.measurement-item input,
.measurement-item select {
  padding: 10px;
  background: #2d2d2d;
  border: 1px solid #444;
  border-radius: 4px;
  color: #ffffff;
  font-size: 1rem;
}

.measurement-item input:focus,
.measurement-item select:focus {
  outline: none;
  border-color: #dc3545;
}

/* Notes Textarea */
.step-section textarea {
  width: 100%;
  padding: 12px;
  background: #2d2d2d;
  border: 1px solid #444;
  border-radius: 4px;
  color: #ffffff;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
}

.step-section textarea:focus {
  outline: none;
  border-color: #dc3545;
}

/* Wizard Navigation */
.wizard-navigation {
  background: #1a1a1a;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  border-top: 2px solid #dc3545;
}

.wizard-navigation .btn {
  padding: 12px 24px;
  font-size: 1rem;
}

/* Recipe Display */
.recipe-display h3 {
  color: #ffffff;
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.recipe-display p {
  color: #999;
  margin-bottom: 20px;
}

.recipe-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.recipe-stats .stat-item {
  background: #1a1a1a;
  padding: 12px;
  border-radius: 4px;
  border-left: 3px solid #dc3545;
}

.recipe-stats .stat-item strong {
  color: #dc3545;
  display: block;
  margin-bottom: 4px;
  font-size: 0.85rem;
}

.recipe-section {
  margin-bottom: 24px;
}

.recipe-section h4 {
  color: #dc3545;
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.recipe-table {
  width: 100%;
  border-collapse: collapse;
}

.recipe-table thead th {
  background: #1a1a1a;
  color: #dc3545;
  padding: 10px;
  text-align: left;
  border-bottom: 2px solid #dc3545;
}

.recipe-table tbody td {
  color: #ffffff;
  padding: 10px;
  border-bottom: 1px solid #444;
}

.recipe-table tbody tr:last-child td {
  border-bottom: none;
}

/* Responsive */
@media (max-width: 768px) {
  .wizard-progress {
    justify-content: flex-start;
  }
  
  .wizard-step {
    min-width: 60px;
  }
  
  .wizard-step .step-label {
    font-size: 0.7rem;
  }
  
  .measurements-grid {
    grid-template-columns: 1fr;
  }
  
  .wizard-content {
    padding: 20px;
  }
  
  .timer-display {
    font-size: 2rem;
  }
}

/* Brew Batch Wizard Wrapper - Contains header, wizard, and notes as one component */
.brew-batch-wizard-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  background: #2d2d2d;
  border: 2px solid #dc3545;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
}

/* Recipe Info Header */
.recipe-info-header {
  background: #2d2d2d;
  border: none;
  border-bottom: 2px solid #dc3545;
  border-radius: 0;
  padding: 24px;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.recipe-info-main {
  flex: 1;
}

.recipe-info-main h2 {
  color: #ffffff;
  font-size: 1.8rem;
  margin: 0 0 16px 0;
  font-weight: bold;
}

.recipe-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-box {
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 12px;
  text-align: center;
}

.stat-label {
  display: block;
  color: #999;
  font-size: 0.85rem;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  display: block;
  color: #dc3545;
  font-size: 1.4rem;
  font-weight: bold;
}

.recipe-info-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recipe-info-actions .btn {
  white-space: nowrap;
  min-width: 180px;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  margin: 0;
  padding: 0;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: #2d2d2d;
  border: 2px solid #dc3545;
  border-radius: 8px;
  width: 90%;
  max-width: 1000px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
  animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 2px solid #dc3545;
  background: #1a1a1a;
}

.modal-header h2 {
  color: #ffffff;
  font-size: 1.5rem;
  margin: 0;
  font-weight: bold;
}

.modal-close {
  background: transparent;
  border: none;
  color: #dc3545;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.modal-close:hover {
  background: #dc3545;
  color: #ffffff;
  transform: rotate(90deg);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  color: #ffffff;
  background: #2d2d2d;
}

.modal-body .process-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

/* Batch Name Label - Make it stand out */
label[for="batch-name"] {
  color: #ffffff !important;
  font-weight: 900 !important;
  font-size: 1.1rem !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Recipe Display in Modal */
.recipe-display h3 {
  color: #dc3545;
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.recipe-display p {
  color: #ccc;
  line-height: 1.6;
  margin-bottom: 20px;
}

.recipe-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.stat-item {
  background: #1a1a1a;
  border: 1px solid #444;
  padding: 12px;
  border-radius: 6px;
}

.stat-item strong {
  color: #dc3545;
}

.recipe-section {
  margin-bottom: 24px;
}

.recipe-section h4 {
  color: #dc3545;
  font-size: 1.2rem;
  margin-bottom: 12px;
  border-bottom: 2px solid #444;
  padding-bottom: 8px;
}

.recipe-table {
  width: 100%;
  border-collapse: collapse;
  background: #1a1a1a;
  border-radius: 6px;
  overflow: hidden;
}

.recipe-table thead {
  background: #dc3545;
}

.recipe-table th {
  padding: 16px !important;
  text-align: left !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.8px !important;
}

.recipe-table td {
  padding: 12px 16px;
  border-top: 1px solid #444;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 500;
}

.recipe-table tbody tr:hover {
  background: #2d2d2d;
}

/* Grain/Malt recipe tables - Brown */
.recipe-table.grain-table thead {
  background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%) !important;
  border-bottom: 3px solid #8B4513 !important;
  box-shadow: 0 2px 8px rgba(139, 69, 19, 0.15) !important;
}

.recipe-table.grain-table th {
  border-bottom: 3px solid #8B4513 !important;
}

/* Hop recipe tables - Green */
.recipe-table.hop-table thead {
  background: linear-gradient(135deg, #2E7D32 0%, #388E3C 100%) !important;
  border-bottom: 3px solid #2E7D32 !important;
  box-shadow: 0 2px 8px rgba(46, 125, 50, 0.15) !important;
}

.recipe-table.hop-table th {
  border-bottom: 3px solid #2E7D32 !important;
}

/* Yeast recipe tables - Orange */
.recipe-table.yeast-table thead {
  background: linear-gradient(135deg, #F57C00 0%, #FB8C00 100%) !important;
  border-bottom: 3px solid #F57C00 !important;
  box-shadow: 0 2px 8px rgba(245, 124, 0, 0.15) !important;
}

.recipe-table.yeast-table th {
  border-bottom: 3px solid #F57C00 !important;
}

/* Responsive adjustments */
@media (max-width: 968px) {
  .recipe-info-header {
    flex-direction: column;
    align-items: stretch;
  }

  .recipe-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .recipe-info-actions {
    flex-direction: row;
    justify-content: center;
  }

  .recipe-info-actions .btn {
    min-width: auto;
    flex: 1;
  }

  .modal-content {
    width: 95%;
    max-height: 90vh;
  }

  .recipe-display h3 {
    font-size: 1.3rem;
  }
}

@media (max-width: 600px) {
  .recipe-stats-row {
    grid-template-columns: 1fr;
  }

  .recipe-info-main h2 {
    font-size: 1.4rem;
  }

  .stat-value {
    font-size: 1.2rem;
  }

  .modal-body .process-overview {
    grid-template-columns: 1fr;
  }
}

/* Pre-Brew Checklist */
.pre-brew-checklist {
  background: #2d2d2d;
  border: none;
  padding: 32px;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

.checklist-header {
  text-align: center;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 2px solid #dc3545;
}

.checklist-header h3 {
  color: #ffffff;
  font-size: 2rem;
  margin: 0 0 8px 0;
  font-weight: 700;
}

.checklist-subtitle {
  color: #888;
  font-size: 1rem;
  margin: 0;
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.checklist-section {
  margin-bottom: 0;
  background: #1a1a1a;
  border: 2px solid #3a3a3a;
  border-radius: 12px;
  padding: 20px;
}

.checklist-section-title {
  color: #ffffff;
  font-size: 1.3rem;
  margin: 0 0 16px 0;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding-bottom: 10px;
  border-bottom: 2px solid #dc3545;
}

/* Catalog-specific checklist section styling */
.grain-section {
  border-color: #8B4513 !important;
}

.grain-title {
  color: #A0522D !important;
  border-bottom-color: #8B4513 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hop-section {
  border-color: #2E7D32 !important;
}

.hop-title {
  color: #66BB6A !important;
  border-bottom-color: #2E7D32 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.yeast-section {
  border-color: #F57C00 !important;
}

.yeast-title {
  color: #FFB74D !important;
  border-bottom-color: #F57C00 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.checklist-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: #2d2d2d;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.checklist-item:hover {
  background: #353535;
  border-color: #dc3545;
}

.checklist-checkbox {
  width: 20px;
  height: 20px;
  min-width: 20px;
  cursor: pointer;
  accent-color: #28a745;
  margin-top: 2px;
}

.checklist-text {
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.5;
  flex: 1;
}

.checklist-text strong {
  color: #dc3545;
  font-weight: 700;
}

.ingredient-quantity {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 600;
}

.ingredient-quantity strong {
  color: #ffffff;
  font-weight: 700;
  font-size: 1.15rem;
}

.ingredient-detail {
  color: #e0e0e0;
  font-size: 0.95rem;
  margin-left: 8px;
  font-weight: 500;
}

/* Process Overview */
.process-overview {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.process-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px;
  background: #2d2d2d;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
}

.process-number {
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: #dc3545;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.process-details {
  flex: 1;
}

.process-details strong {
  color: #dc3545;
  font-size: 1.1rem;
  display: block;
  margin-bottom: 4px;
}

.process-details p {
  color: #cccccc;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.process-details span {
  color: #dc3545;
  font-weight: 700;
}

/* Recipe Overview Section */
.recipe-overview-section {
  background: #1a1a1a;
  border: 2px solid #3a3a3a;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 32px;
}

.overview-title {
  color: #ffffff;
  font-size: 1.3rem;
  margin: 0 0 16px 0;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding-bottom: 10px;
  border-bottom: 2px solid #dc3545;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.overview-card {
  background: #2d2d2d;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.overview-card-wide {
  grid-column: span 4;
}

.overview-label {
  color: #888;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  font-weight: 600;
}

.overview-value {
  color: #ffffff;
  font-size: 1.3rem;
  font-weight: 700;
}

.checklist-actions {
  text-align: center;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 2px solid #3a3a3a;
}

.checklist-actions .btn-lg {
  font-size: 1.2rem;
  padding: 16px 48px;
  min-width: 300px;
}

@media (max-width: 768px) {
  .pre-brew-checklist {
    padding: 20px;
  }
  
  .checklist-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .checklist-section {
    padding: 16px;
  }
  
  .overview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .overview-card-wide {
    grid-column: span 2;
  }
  
  .checklist-actions .btn-lg {
    min-width: 100%;
  }
}

/* Brewing Notes Section */
.brewing-notes-section {
  background: #2d2d2d;
  border: none;
  border-radius: 0;
  padding: 24px;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

.brewing-notes-section h3 {
  color: #ffffff;
  font-size: 1.5rem;
  margin: 0 0 20px 0;
  font-weight: bold;
}

.add-note-container {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.add-note-container textarea {
  flex: 1;
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 12px;
  color: #ffffff;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
}

.add-note-container textarea:focus {
  outline: none;
  border-color: #dc3545;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2);
}

.add-note-container textarea::placeholder {
  color: #666;
}

.add-note-container .btn {
  align-self: flex-start;
  white-space: nowrap;
}

.notes-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.note-item {
  background: #1a1a1a;
  border: 1px solid #444;
  border-left: 4px solid #dc3545;
  border-radius: 6px;
  padding: 16px;
  transition: all 0.2s;
}

.note-item:hover {
  border-left-color: #ff4d5f;
  transform: translateX(4px);
}

.note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #333;
}

.note-timestamp {
  color: #dc3545;
  font-size: 0.9rem;
  font-weight: bold;
}

.note-step {
  color: #999;
  font-size: 0.85rem;
  background: #2d2d2d;
  padding: 4px 8px;
  border-radius: 4px;
}

.note-content {
  color: #fff;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin-top: 8px;
  font-size: 0.95rem;
}

.notes-empty {
  text-align: center;
  color: #666;
  padding: 32px;
  font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .add-note-container {
    flex-direction: column;
  }

  .add-note-container .btn {
    align-self: stretch;
  }

  .note-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* ============================================
   BREWING WIZARD STYLES
   ============================================ */

.brewing-wizard {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.wizard-progress-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
  position: relative;
  padding: 0 20px;
}

.wizard-progress-bar::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 60px;
  right: 60px;
  height: 3px;
  background: #e0e0e0;
  z-index: 0;
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
  flex: 1;
}

.step-indicator {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e0e0e0;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  transition: all 0.3s ease;
  border: 3px solid white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.wizard-step.active .step-indicator {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  color: white;
  transform: scale(1.15);
  box-shadow: 0 4px 16px rgba(76, 175, 80, 0.5);
}

.wizard-step.completed .step-indicator {
  background: #4CAF50;
  color: white;
}

.wizard-step.completed .step-indicator::after {
  content: '✓';
}

.step-label {
  font-size: 11px;
  font-weight: 700;
  color: #666;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wizard-step.active .step-label {
  color: #4CAF50;
  font-weight: 800;
}

.wizard-content {
  min-height: 300px;
  margin-bottom: 20px;
}

.wizard-step-content {
  max-width: 900px;
  margin: 0 auto;
}

.step-header {
  text-align: center;
  margin-bottom: 32px;
  padding: 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: 3px solid #000000;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.step-header h2 {
  font-size: 42px;
  font-weight: 900;
  margin-bottom: 8px;
  color: #ffffff;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
  letter-spacing: -0.5px;
}

.step-subtitle {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.15);
}

/* Combined Timer and Targets Section */
.timer-targets-combined {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  border: 3px solid #1a252f;
}

.targets-row {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.target-box {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  color: white;
  padding: 16px 28px;
  border-radius: 12px;
  text-align: center;
  min-width: 160px;
  border: 2px solid rgba(255,255,255,0.2);
}

.target-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
  margin-bottom: 8px;
}

.target-value {
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.timer-display {
  font-size: 96px;
  font-weight: 900;
  font-family: 'Courier New', monospace;
  color: #fff;
  margin-bottom: 20px;
  text-shadow: 0 4px 12px rgba(0,0,0,0.4);
  letter-spacing: 4px;
  text-align: center;
}

.timer-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.timer-controls .btn {
  font-weight: 700;
  padding: 12px 28px;
  font-size: 16px;
  border: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.readings-section {
  margin-bottom: 24px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
  border: 2px solid #e9ecef;
}

.readings-section h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 16px;
  color: #2c3e50;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.readings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.reading-group {
  background: white;
  padding: 20px;
  border-radius: 8px;
  border: 2px solid #e0e0e0;
}

.reading-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 12px;
}

.reading-input {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  font-weight: 600;
  border: 2px solid #ddd;
  border-radius: 6px;
  margin-bottom: 8px;
}

.reading-input:focus {
  outline: none;
  border-color: #4CAF50;
}

.readings-list {
  margin-top: 16px;
  max-height: 200px;
  overflow-y: auto;
}

.reading-item {
  padding: 8px 12px;
  background: #f0f0f0;
  border-radius: 4px;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
}

.no-readings {
  padding: 12px;
  text-align: center;
  color: #999;
  font-style: italic;
}

.notes-section-inline {
  margin-bottom: 24px;
}

.notes-label {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 12px;
}

.notes-textarea {
  width: 100%;
  padding: 16px;
  font-size: 14px;
  border: 2px solid #ddd;
  border-radius: 6px;
  resize: vertical;
  font-family: inherit;
}

.notes-textarea:focus {
  outline: none;
  border-color: #4CAF50;
}

.hop-additions-section {
  margin-bottom: 32px;
  padding: 24px;
  background: #f8f9fa;
  border-radius: 8px;
}

.hop-additions-section h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #2c3e50;
}

.hop-schedule-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.hop-addition-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.hop-addition-item.added {
  border-color: #4CAF50;
  background: #f0f8f0;
}

.hop-info {
  flex: 1;
}

.hop-info strong {
  font-size: 16px;
  color: #2c3e50;
}

.hop-time {
  color: #666;
  font-size: 14px;
  font-weight: 600;
}

.hop-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #4CAF50;
  cursor: pointer;
}

.hop-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.irish-moss-reminder {
  padding: 16px;
  background: #fff3cd;
  border: 2px solid #ffc107;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.irish-moss-reminder.added {
  background: #d4edda;
  border-color: #28a745;
}

.wizard-navigation {
  display: flex;
  gap: 12px;
  justify-content: center;
  padding-top: 24px;
  border-top: 2px solid #e0e0e0;
}

.btn-lg {
  font-size: 18px !important;
  padding: 16px 32px !important;
  font-weight: 700 !important;
}

/* Responsive design for wizard */
@media (max-width: 768px) {
  .wizard-progress-bar {
    flex-wrap: wrap;
    gap: 16px;
  }
  
  .wizard-progress-bar::before {
    display: none;
  }
  
  .step-target-display {
    flex-direction: column;
  }
  
  .timer-display {
    font-size: 48px;
  }
  
  .readings-grid {
    grid-template-columns: 1fr;
  }
  
  .hop-addition-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .wizard-navigation {
    flex-direction: column;
  }
  
  .wizard-navigation .btn {
    width: 100%;
  }
}


/* ================================
   Authentication UI Styles
   ================================ */

#auth-container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
}

.user-profile .btn {
  margin-left: 8px;
  padding: 6px 16px;
  font-size: 0.875rem;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #0d6efd;
}

.user-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #0d6efd;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 18px;
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-name {
  font-weight: 600;
  color: #212529;
  font-size: 14px;
}

.user-role {
  font-size: 12px;
  color: #6c757d;
}

/* Admin-only menu items - hidden by default */
.admin-only {
  display: none;
}

/* Login failed page */
.login-failed-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  text-align: center;
  padding: 20px;
}

.login-failed-container h1 {
  color: #dc3545;
  margin-bottom: 20px;
}

.login-failed-container p {
  color: #6c757d;
  margin-bottom: 30px;
  max-width: 500px;
}

@media (max-width: 768px) {
  #auth-container {
    padding: 8px 15px;
  }
  
  .user-profile {
    gap: 8px;
  }
  
  .user-avatar,
  .user-avatar-placeholder {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  
  .user-name {
    font-size: 13px;
  }
  
  .user-role {
    font-size: 11px;
  }
}

/* Card Components for Profile Page */
.card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.card-header {
  padding: 1.5rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-bottom: 1px solid #dee2e6;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-body {
  padding: 1.5rem;
}

@media (max-width: 968px) {
  .card-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .card-header button {
    width: 100%;
  }
}

/* ==========================================
   REUSABLE UTILITY COMPONENTS
   ========================================== */

/* Badge Components */
.badge {
  display: inline-block;
  padding: 0.35em 0.65em;
  font-size: 0.85em;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success {
  background: linear-gradient(135deg, #198754 0%, #146c43 100%);
  color: white;
}

.badge-danger {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
}

.badge-warning {
  background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
  color: #1a1a1a;
}

.badge-info {
  background: linear-gradient(135deg, #0dcaf0 0%, #0aa2c0 100%);
  color: white;
}

.badge-secondary {
  background: linear-gradient(135deg, #6c757d 0%, #545b62 100%);
  color: white;
}

/* Loading State */
.loading {
  text-align: center;
  padding: 3rem 2rem;
  color: #6c757d;
  font-size: 1.1rem;
  font-weight: 500;
}

.loading::before {
  content: "⏳ ";
  font-size: 1.5rem;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Error State */
.error {
  background: rgba(220, 53, 69, 0.1);
  border: 2px solid #dc3545;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1rem 0;
  color: #dc3545;
  font-weight: 600;
}

.error::before {
  content: "⚠️ ";
  font-size: 1.2rem;
}

/* Success State */
.success {
  background: rgba(25, 135, 84, 0.1);
  border: 2px solid #198754;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1rem 0;
  color: #198754;
  font-weight: 600;
}

.success::before {
  content: "✓ ";
  font-size: 1.2rem;
}

/* Modal Dialog */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-dialog {
  background: white;
  border: 3px solid #1a1a1a;
  border-radius: 12px;
  box-shadow: 0 4px 0 0 #dc3545, 0 8px 40px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow: auto;
  animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  padding: 1.5rem 2rem;
  border-bottom: 3px solid #1a1a1a;
  box-shadow: 0 2px 0 0 #dc3545;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 900;
  color: #1a1a1a;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.modal-header .close-btn {
  background: #dc3545;
  color: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-header .close-btn:hover {
  background: #c82333;
  transform: rotate(90deg) scale(1.1);
}

.modal-body {
  padding: 2rem;
}

.modal-footer {
  padding: 1.5rem 2rem;
  border-top: 2px solid #e9ecef;
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  background: #f8f9fa;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

.fw-bold { font-weight: 700; }
.fw-normal { font-weight: 400; }

.text-muted { color: #6c757d; }
.text-danger { color: #dc3545; }
.text-success { color: #198754; }
.text-warning { color: #ffc107; }

/* Modern Dashboard Widget Styles (Red/Black Edition) */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1.5rem 0;
}

.metrics-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    grid-column: 1 / -1;
    margin-bottom: 1rem;
}

.metric-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-top: 4px solid #1a1a1a; /* Bold Black Top Border default */
    border-radius: 4px; /* Crisper corners */
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
    border-top-color: #dc3545; /* Red top border on hover */
}

/* Metric Icons - Bold and High Contrast */
.metric-icon {
    width: 72px;
    height: 72px;
    border-radius: 8px; /* Square with slight radius */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.recipe-icon {
    background: linear-gradient(135deg, #1a1a1a, #000000);
    border-bottom: 3px solid #dc3545; /* Red accent */
}

.batch-icon {
    background: linear-gradient(135deg, #b71c1c, #d32f2f); /* Deep Red */
    border-bottom: 3px solid #1a1a1a;
}

.active-icon {
    background: linear-gradient(135deg, #424242, #616161); /* Dark Grey */
    border-bottom: 3px solid #ffc107; /* Warning accent */
}

.metric-info h3 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 800;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.metric-value {
    margin: 0.5rem 0 0 0;
    font-size: 3rem;
    font-weight: 900;
    color: #1a1a1a;
    line-height: 1;
    letter-spacing: -1px;
}

/* Dashboard Secondary Section & Lists */
.dashboard-secondary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 2rem;
    grid-column: 1 / -1;
}

.card.recent-batches, 
.card.popular-recipes {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden;
}

.card-header {
    background: #1a1a1a; /* Black Header */
    padding: 1.5rem 2rem;
    border-bottom: 4px solid #dc3545; /* Red Divider */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff; /* White Text */
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.view-all {
    font-size: 0.8rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.view-all:hover {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

.list-group {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.list-item {
    background: #f8f9fa;
    border-left: 4px solid #ccc;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.list-item:hover {
    background: #ffffff;
    border-left-color: #dc3545; /* Red highlight on hover */
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateX(5px);
}

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

.item-title {
    font-weight: 700;
    color: #1a1a1a;
    font-size: 1.1rem;
}

.item-subtitle {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
}

.status-badge {
    padding: 0.4rem 1rem;
    border-radius: 4px; /* More squared */
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: white; /* White text for contrast */
}

/* Bold Status Colors */
.status-active { background-color: #0d6efd; }
.status-fermenting { background-color: #fd7e14; }
.status-conditioning { background-color: #6f42c1; }
.status-completed { background-color: #198754; }
.status-unknown { background-color: #6c757d; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .dashboard-secondary {
        grid-template-columns: 1fr;
    }
}
