:root {
  color-scheme: dark;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  --brand-color: #fcffc7;
  --brand-color-light: #ffffdc;
  --brand-color-dark: #dce6a6;
  --accent-color: #f2fac5;
  --border-color: rgba(252, 255, 199, 0.2);
  --background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  --panel-bg: rgba(15, 23, 42, 0.95);
  --text-color: #f1f5f9;
  --muted: #94a3b8;
  --shadow: 0 20px 45px rgba(2, 6, 23, 0.45);
  --brand-text-color: #262730;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--text-color);
}

body.helper-mode {
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.app-header {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 8px 32px rgba(2, 6, 23, 0.65);
}

.header-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 0;
}

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

.logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(252, 255, 199, 0.3);
}

.brand-title {
  margin: 0;
  font-size: 1.6rem;
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: 0.5px;
}

.brand-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.primary-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nav-btn {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.85);
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.25s ease;
  letter-spacing: 0.02em;
}

.nav-btn.active {
  background: var(--brand-color);
  color: var(--brand-text-color);
  border-color: transparent;
}

.nav-btn:hover:not(.disabled):not(.active) {
  color: var(--text-color);
  border-color: rgba(255, 255, 255, 0.2);
}

.nav-btn.disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* Removed session badge styles */

main {
  flex: 1;
  padding: 3rem 0 4rem;
  width: 100%;
}

.view {
  display: none;
  animation: fadeIn 0.25s ease-in-out;
}

.view.active {
  display: block;
}

.requires-auth {
  display: none;
}

body.auth-complete .requires-auth {
  display: block;
}

body.auth-complete .nav-btn {
  opacity: 1;
  cursor: pointer;
}

body.auth-complete .nav-btn.disabled {
  cursor: pointer;
}

body.auth-complete .nav-btn.disabled {
  opacity: 1;
}

body.auth-complete .nav-btn {
  border-color: rgba(255, 255, 255, 0.12);
}

.hero {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(252, 255, 199, 0.12);
  padding: 2.2rem;
  border-radius: 20px;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow);
}

.hero h2 {
  margin-top: 0;
  font-size: 2rem;
  letter-spacing: 0.01em;
}

.hero p {
  color: var(--muted);
  max-width: 560px;
}

.quick-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.cta,
button,
.secondary,
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  padding: 0.75rem 1.6rem;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn-primary,
.cta {
  background: var(--brand-color);
  color: var(--brand-text-color);
  box-shadow: 0 10px 25px rgba(252, 255, 199, 0.35);
}

.cta:hover,
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(252, 255, 199, 0.45);
}

.secondary {
  background: rgba(252, 255, 199, 0.12);
  color: var(--brand-color);
  border: 1px solid rgba(252, 255, 199, 0.3);
}

.steps-grid,
.setup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.step-card,
.setup-card,
.panel,
.info-panel {
  background: var(--panel-bg);
  border-radius: 18px;
  padding: 1.6rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(148, 163, 184, 0.08);
}

.panel {
  margin-bottom: 2rem;
}

.panel h2 {
  margin-top: 0;
}

.form-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.form-field input[type='email'],
.form-field input[type='password'],
#smart-import-form input[type='file'] {
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 12px;
  font-size: 1rem;
  background: rgba(15, 23, 42, 0.75);
  color: var(--text-color);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-field input:focus,
#smart-import-form input[type='file']:focus {
  outline: none;
  border-color: rgba(252, 255, 199, 0.6);
  box-shadow: 0 0 0 3px rgba(252, 255, 199, 0.15);
}

.form-hint {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.form-hint.success {
  color: #86efac;
}

.form-hint.error {
  color: #fca5a5;
}

.info-panel ul {
  padding-left: 1.2rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

.checklist {
  display: grid;
  gap: 1rem;
}

.check-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  padding: 1.1rem 1.5rem;
  background: rgba(15, 23, 42, 0.85);
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease;
}

.check-item h3 {
  margin: 0 0 0.25rem 0;
}

.check-item input[type='checkbox'] {
  width: 22px;
  height: 22px;
  accent-color: var(--brand-color);
  cursor: not-allowed;
}

.check-item.completed {
  border-color: rgba(252, 255, 199, 0.4);
  background: rgba(252, 255, 199, 0.05);
}

.check-item.completed h3 {
  color: var(--brand-color);
}

.checklist-link,
.checklist-link-btn {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--brand-color);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.checklist-link:hover {
  text-decoration: underline;
  opacity: 0.8;
}

.checklist-link-btn {
  background: rgba(252, 255, 199, 0.12);
  border: 1px solid rgba(252, 255, 199, 0.3);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.checklist-link-btn:hover {
  background: rgba(252, 255, 199, 0.2);
  border-color: var(--brand-color);
}

.check-item.completed h3 {
  color: var(--brand-color);
}

.checklist-link,
.checklist-link-btn {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--brand-color);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.checklist-link:hover {
  text-decoration: underline;
}

.checklist-link-btn {
  background: rgba(252, 255, 199, 0.12);
  border: 1px solid rgba(252, 255, 199, 0.3);
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  border: none;
}

.checklist-link-btn:hover {
  background: rgba(252, 255, 199, 0.2);
  text-decoration: none;
}

.table-controls {
  display: flex;
  gap: 0.75rem;
  margin: 1rem 0;
}

.sheet-wrapper {
  overflow-x: auto;
}

#manual-sheet {
  width: 100%;
  border-collapse: collapse;
}

#manual-sheet th,
#manual-sheet td {
  border: 1px solid rgba(148, 163, 184, 0.15);
  padding: 0.65rem;
  min-width: 140px;
  background: rgba(15, 23, 42, 0.65);
  color: var(--text-color);
}

#manual-sheet th {
  background: rgba(15, 23, 42, 0.9);
  font-weight: 600;
  color: var(--brand-color);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.8rem;
}

#manual-sheet tbody tr:nth-child(even) {
  background: rgba(252, 255, 199, 0.05);
}

#manual-sheet td {
  background: rgba(15, 23, 42, 0.7);
}

#manual-sheet td:focus {
  outline: 2px solid var(--brand-color);
  outline-offset: -2px;
  color: var(--brand-text-color);
}

#wine-editor-table {
  width: 100%;
  border-collapse: collapse;
}

#wine-editor-table th,
#wine-editor-table td {
  border: 1px solid rgba(148, 163, 184, 0.15);
  padding: 0.65rem;
  min-width: 100px;
  background: rgba(15, 23, 42, 0.65);
  color: var(--text-color);
}

#wine-editor-table th {
  background: rgba(15, 23, 42, 0.9);
  font-weight: 600;
  color: var(--brand-color);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.8rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

#wine-editor-table tbody tr:nth-child(even) {
  background: rgba(252, 255, 199, 0.05);
}

#wine-editor-table tbody tr.changed {
  background: rgba(252, 255, 199, 0.1);
  border-left: 3px solid var(--brand-color);
}

#wine-editor-table td[contenteditable="true"]:focus {
  outline: 2px solid var(--brand-color);
  outline-offset: -2px;
  background: rgba(15, 23, 42, 0.9);
}

.editor-status {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-weight: 500;
}

.editor-status.info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #3b82f6;
}

.editor-status.success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.editor-status.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.app-footer {
  text-align: center;
  padding: 1.2rem 0 1.6rem;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  main {
    padding: 2rem 0 3rem;
  }

  .header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .primary-nav {
    width: 100%;
  }

  .nav-btn {
    flex: 1;
    justify-content: center;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

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

  .hero {
    padding: 1.6rem;
  }
}

/* Login Page Styles */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--background);
}

.auth-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 400px;
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header .logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  display: block;
  object-fit: contain;
}

.auth-header .brand-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 8px;
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.form-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 500;
  color: var(--text-color);
  margin-bottom: 24px;
  text-align: center;
}

.form-field {
  margin-bottom: 20px;
}

.form-field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--muted);
  font-size: 14px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-color);
  font-size: 16px;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--brand-color);
  box-shadow: 0 0 0 3px rgba(252, 255, 199, 0.1);
}

.form-input.invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-color-dark), var(--brand-color));
  color: var(--brand-text-color);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(252, 255, 199, 0.3);
}

.btn-full {
  width: 100%;
  margin-bottom: 24px;
}

.btn-link {
  background: none;
  border: none;
  color: var(--brand-color);
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  font-size: 14px;
  padding: 0;
}

.btn-link:hover {
  color: var(--brand-color-light);
}

.auth-switch {
  text-align: center;
  font-size: 14px;
  margin-top: 16px;
}

.auth-message {
  margin-top: 16px;
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  display: none;
}

.auth-message.success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.auth-message.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.auth-message.info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #3b82f6;
}

.text-muted {
  color: var(--muted);
  font-size: 14px;
}

.remember-field {
  margin: 15px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.remember-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 0.9rem;
}

.remember-checkbox {
  margin-right: 8px;
  transform: scale(1.1);
}

.remember-text {
  color: rgba(255, 255, 255, 0.8);
  user-select: none;
}

.remember-label:hover .remember-text {
  color: rgba(255, 255, 255, 1);
}

/* Removed logout button styles */

.helper-app {
  display: none;
}

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

/* Wine Editor Styles */
#wine-editor-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

#wine-editor-table th,
#wine-editor-table td {
  border: 1px solid rgba(148, 163, 184, 0.15);
  padding: 0.65rem;
  min-width: 100px;
  background: rgba(15, 23, 42, 0.65);
  color: var(--text-color);
}

#wine-editor-table th {
  background: rgba(15, 23, 42, 0.9);
  font-weight: 600;
  color: var(--brand-color);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.8rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

#wine-editor-table tbody tr:nth-child(even) {
  background: rgba(252, 255, 199, 0.05);
}

#wine-editor-table tbody tr.modified {
  background: rgba(252, 255, 199, 0.1);
  border-left: 3px solid var(--brand-color);
}

#wine-editor-table td[contenteditable="true"] {
  cursor: text;
}

#wine-editor-table td[contenteditable="true"]:focus {
  outline: 2px solid var(--brand-color);
  outline-offset: -2px;
  background: rgba(15, 23, 42, 0.85);
}

#wine-editor-table td.cell-modified {
  background: rgba(251, 191, 36, 0.2) !important;
  border: 1px solid rgba(251, 191, 36, 0.5);
  position: relative;
}

#wine-editor-table td.cell-modified::before {
  content: '●';
  position: absolute;
  top: 2px;
  right: 4px;
  color: rgba(251, 191, 36, 0.8);
  font-size: 0.7rem;
}

#wine-editor-table tbody tr.modified td.cell-modified {
  background: rgba(252, 255, 199, 0.15) !important;
  border: 1px solid rgba(252, 255, 199, 0.4);
}

#wine-editor-table tbody tr.modified td.cell-modified::before {
  color: rgba(252, 255, 199, 0.9);
}

.ai-helper-cell {
  text-align: center;
  padding: 0.25rem !important;
  width: 40px;
}

.ai-helper-btn-small {
  background: rgba(252, 255, 199, 0.2);
  border: 1px solid rgba(252, 255, 199, 0.4);
  color: var(--brand-color);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.ai-helper-btn-small:hover {
  background: rgba(252, 255, 199, 0.3);
  border-color: var(--brand-color);
  transform: scale(1.1);
}

.ai-helper-btn-small:active {
  transform: scale(0.95);
}

.editor-status {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-weight: 500;
}

.editor-status.info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

.editor-status.success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.editor-status.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

/* Storage Setup Styles */
.storage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.storage-item {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
}

.storage-item h4 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--brand-color);
}

/* Custom Fields Setup Styles */
.fields-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.field-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.field-card:hover {
  border-color: var(--brand-color);
  transform: translateY(-2px);
}

.field-card.field-empty {
  border-style: dashed;
  opacity: 0.7;
}

.field-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.field-icon {
  font-size: 1.5rem;
  color: var(--brand-color);
  width: 40px;
  text-align: center;
}

.field-info {
  flex: 1;
}

.field-info h4 {
  margin: 0 0 0.25rem 0;
  color: var(--text-color);
}

.field-info .field-type {
  color: var(--muted);
  font-size: 0.875rem;
}

.field-actions {
  display: flex;
  gap: 0.5rem;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-radius: 4px;
  font-size: 0.75rem;
  margin-top: 0.5rem;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-content h3 {
  margin-top: 0;
  color: var(--brand-color);
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

/* Setup Message Styles */
.setup-message {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-weight: 500;
}

.setup-message.info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

.setup-message.success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.setup-message.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

/* Inline messages (next to buttons) */
.inline-message {
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  white-space: nowrap;
  transition: opacity 0.3s ease;
}

.inline-message.success {
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.inline-message.error {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Form Styles */
.form-field {
  margin-bottom: 1.5rem;
}

.form-field label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-color);
  font-weight: 500;
}

.form-field input[type="text"],
.form-field input[type="password"],
.form-field input[type="number"],
.form-field select {
  width: 100%;
  padding: 0.75rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-color);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-field input:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--brand-color);
  box-shadow: 0 0 0 3px rgba(252, 255, 199, 0.1);
}

.form-field input[type="checkbox"] {
  margin-right: 0.5rem;
}

/* Missing Fields Panel */
#missing-fields-panel {
  animation: slideDown 0.3s ease-out;
}

#missing-fields-panel h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--brand-color);
  font-size: 1.1rem;
}

#missing-fields-panel .btn-primary {
  margin-top: 0.5rem;
}

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

/* Filter Styles */
#wine-editor-table thead {
  position: relative;
}

.filterable-header {
  position: relative;
  user-select: none;
  padding: 0.5rem;
}

.filterable-header:hover {
  background: rgba(252, 255, 199, 0.05);
}

.filter-btn {
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.filter-btn:hover {
  opacity: 1 !important;
  transform: scale(1.1);
}

.filter-menu {
  animation: slideDown 0.2s ease-out;
}

.filter-menu select,
.filter-menu input {
  background: rgba(15, 23, 42, 0.9) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-color) !important;
}

.filter-menu select:focus,
.filter-menu input:focus {
  outline: none;
  border-color: var(--brand-color) !important;
  box-shadow: 0 0 0 3px rgba(252, 255, 199, 0.1) !important;
}

.header-content {
  min-height: 24px;
  width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
  .storage-grid {
    grid-template-columns: 1fr;
  }
  
  .fields-list {
    grid-template-columns: 1fr;
  }
  
  .modal-content {
    width: 95%;
    padding: 1.5rem;
  }
  
  #missing-fields-panel {
    padding: 1rem;
  }
  
  #missing-fields-panel > div {
    flex-direction: column;
    align-items: flex-start !important;
  }
}

