/* Winter/Summer Storage page styles */
:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --border: #e6eaf2;
  --text: #0f172a;
  --text-muted: #6b7280;
  --blue: #2563eb;
  --blue-600: #1d4ed8;
  --blue-50: #eef2ff;
  --winter-bg: #fee2e2;
  --winter-hover: #fecaca;
  --summer-bg: #dcfce7;
  --summer-hover: #bbf7d0;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; 
  background: var(--bg); 
  color: var(--text);
  font: 16px/1.5 Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

input, select, textarea, button { 
  font: inherit; 
  -webkit-text-size-adjust: 100%;
}

/* Back button row */
.back-row { 
  padding: 12px 20px; 
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.back-btn { 
  display: inline-block; 
  color: var(--blue); 
  text-decoration: none; 
  font-weight: 600; 
  background: transparent; 
  border: 1px solid var(--border); 
  padding: 8px 12px; 
  border-radius: 10px; 
  cursor: pointer;
  transition: all 0.2s;
}
.back-btn:hover { 
  color: var(--blue-600); 
  border-color: var(--blue-600); 
}

/* Main container */
.storage-main { 
  padding: 16px 20px; 
  max-width: 1400px; 
  margin: 0 auto; 
}

/* Logo container */
.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
}
.logo-img {
  max-width: 200px;
  width: 100%;
  height: auto;
  display: block;
}

/* Page title */
.page-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
}

/* Navigation container */
.nav-container {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.nav-to-lageret-btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--blue);
  color: white;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  transition: background 0.2s;
}
.nav-to-lageret-btn:hover {
  background: var(--blue-600);
}

/* Search container */
.search-container {
  display: flex;
  gap: 12px;
  margin-bottom: 2rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  align-items: center;
}
.search-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 10px;
  outline: none;
  font-size: 1rem;
  transition: border-color 0.2s;
}
.search-input:focus {
  border-color: var(--blue);
}
.clear-search-btn {
  padding: 12px 16px;
  background: var(--text-muted);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  transition: background 0.2s;
  min-width: 48px;
}
.clear-search-btn:hover {
  background: #4b5563;
}

/* Search highlight */
.search-highlight {
  background-color: #fef08a;
  padding: 2px 0;
  font-weight: 600;
}

/* Matched row styling */
.storage-row.matched {
  border: 2px solid var(--blue);
  background: var(--blue-50);
}

.storage-input.has-match,
.season-select.has-match {
  border-color: var(--blue);
  border-width: 2px;
}

/* Storage grid wrapper - centers the grid */
.storage-grid-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 3rem;
  transform: scale(0.65);
  transform-origin: top center;
}

/* Storage grid - 4x3 layout */
.storage-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* Storage section */
.storage-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  min-height: 200px;
}

/* Section header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}
.section-label {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

/* Add row button */
.add-row-btn {
  padding: 6px 12px;
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.add-row-btn:hover {
  background: var(--blue-600);
}

/* Section rows container */
.section-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 40px;
}

/* Entry row */
.storage-row {
  display: grid;
  grid-template-columns: 120px 1fr 1fr auto;
  gap: 8px;
  padding: 8px;
  background: var(--bg);
  border-radius: 8px;
  align-items: center;
}

/* Season dropdown */
.season-select {
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
}
.season-select.winter {
  background: var(--winter-bg);
  color: #991b1b;
}
.season-select.winter:hover {
  background: var(--winter-hover);
}
.season-select.summer {
  background: var(--summer-bg);
  color: #166534;
}
.season-select.summer:hover {
  background: var(--summer-hover);
}

/* Text inputs */
.storage-input {
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s;
  font-size: 0.875rem;
}
.storage-input:focus {
  border-color: var(--blue);
}

/* Delete button */
.delete-btn {
  padding: 8px;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  transition: background 0.2s;
  min-width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.delete-btn:hover {
  background: #dc2626;
}

/* Empty state */
.empty-section {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 20px;
}

/* Responsive design */
@media (max-width: 1200px) {
  .storage-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .storage-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .storage-grid {
    grid-template-columns: 1fr;
  }
  
  .storage-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .add-row-btn {
    width: 100%;
  }
}

