/* ==========================================================================
   Soupah Soup Global Variable Layout & Reset (Wine, White, Green Palette)
   ========================================================================== */
:root {
  --primary-wine: #a70a0a;
  --primary-wine-hover: #541624;
  --primary-green: #006b3c;
  --primary-green-hover: #143016;
  --accent-amber: #db8e11;
  --accent-amber-light: #fff8e1;
  --accent-light-green: #d4edda;
  --clean-white: #ffffff;
  --soft-background: #f8f9fa;
  --dark-text: #212529;
  --muted-text: #6c757d;
  --grey-border: #e0e0e0;
  --grey-border-light: #f0f0f0;
  --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --font-stack: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-stack);
  background-color: var(--soft-background);
  color: var(--dark-text);
  line-height: 1.6;
}

/* Base structural layout wrapper components */
.container {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

main.container {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* ==========================================================================
   Typography & Headers
   ========================================================================== */
h1,
h2,
h3,
h4 {
  color: var(--primary-wine);
  margin-bottom: 1rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--grey-border-light);
  padding-bottom: 0.5rem;
  color: var(--primary-wine);
}

.section-title-spaced {
  margin-top: 2.5rem;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Buttons & Interactive Elements
   ========================================================================== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    transform 0.1s ease,
    box-shadow 0.2s ease;
  border: none;
  width: 100%;
}

.btn:active {
  transform: translateY(1px);
}

.btn-wine {
  background-color: var(--primary-wine);
  color: var(--clean-white);
}

.btn-wine:hover {
  background-color: var(--primary-wine-hover);
}

.btn-green {
  background-color: var(--primary-green);
  color: var(--clean-white);
}

.btn-green:hover {
  background-color: var(--primary-green-hover);
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.navbar {
  background-color: var(--primary-wine);
  border-bottom: 3px solid var(--primary-green);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.navbar-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--clean-white);
  letter-spacing: 0.5px;
}

.navbar-link {
  color: var(--clean-white);
  font-weight: 600;
  font-size: 0.95rem;
  transition: opacity 0.2s ease;
}

.navbar-link:hover {
  opacity: 0.85;
}

.navbar-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==========================================================================
   Analytics & Dashboard Layout
   ========================================================================== */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--clean-white);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--grey-border);
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card-wine {
  border-left-color: var(--primary-wine);
}
.stat-card-green {
  border-left-color: var(--primary-green);
}
.stat-card-amber {
  border-left-color: var(--accent-amber);
}

.stat-title {
  color: var(--muted-text);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.4rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
}

.stat-value-wine {
  color: var(--primary-wine);
}
.stat-value-green {
  color: var(--primary-green);
}
.stat-value-amber {
  color: #b78103;
}

/* Dashboard Two-Column Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
  align-items: start;
}

.panel-card {
  background: var(--clean-white);
  padding: 1.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--grey-border);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Form Controls
   ========================================================================== */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.form-divider {
  margin-bottom: 2rem;
  padding-bottom: 1.75rem;
  border-bottom: 2px dashed var(--grey-border-light);
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--dark-text);
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-sm);
  background-color: var(--clean-white);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-wine);
  box-shadow: 0 0 0 3px rgba(107, 29, 47, 0.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

/* Image Preview Block */
.preview-container {
  margin-top: 1rem;
  padding: 0.75rem;
  background-color: var(--soft-background);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--grey-border);
}

.preview-label {
  font-size: 0.8rem;
  color: var(--muted-text);
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.preview-image {
  max-width: 100%;
  max-height: 180px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--grey-border);
  object-fit: cover;
}

/* Dynamic Content Containers */
.data-list {
  margin-bottom: 2rem;
  display: grid;
  gap: 0.75rem;
}

.badge-list {
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.text-muted {
  color: var(--muted-text);
  font-size: 0.9rem;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 575.98px) {
  .container {
    max-width: 100%;
  }
  h1 {
    font-size: 1.8rem;
  }
  .form-group-row {
    grid-template-columns: 1fr;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 576px) {
  .container {
    max-width: 540px;
  }
}
@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
}
@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }
}
@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}
