/* ==========================================================================
   The Buzz on Honey - Skeuomorphic / Web 2.0 Stylesheet
   ========================================================================== */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Lucida Grande", "Lucida Sans Unicode", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #333;
  line-height: 1.6;
  /* Linen texture background */
  background-color: #e8e0d4;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0,0,0,0.015) 2px,
      rgba(0,0,0,0.015) 4px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(0,0,0,0.01) 2px,
      rgba(0,0,0,0.01) 4px
    );
}

a {
  color: #1a5276;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ---------- Glossy Header Bar ---------- */
#main-header {
  background: linear-gradient(to bottom, #5a5a5a 0%, #3a3a3a 45%, #2a2a2a 55%, #1a1a1a 100%);
  border-bottom: 1px solid #000;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.08) inset,
    0 3px 8px rgba(0,0,0,0.5);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

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

.logo-icon {
  font-size: 28px;
}

.logo h1 {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 22px;
  color: #f5e6c8;
  text-shadow:
    0 -1px 0 rgba(0,0,0,0.6),
    0 1px 1px rgba(255,255,255,0.1);
  letter-spacing: 0.5px;
}

nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Glossy Nav Buttons */
.nav-btn {
  display: inline-block;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: bold;
  color: #e8e0d4;
  text-shadow: 0 -1px 0 rgba(0,0,0,0.5);
  text-decoration: none;
  border: 1px solid rgba(0,0,0,0.4);
  border-radius: 5px;
  background: linear-gradient(to bottom, #6a6a6a 0%, #4a4a4a 50%, #3a3a3a 51%, #2a2a2a 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.1) inset,
    0 1px 3px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-btn:hover {
  background: linear-gradient(to bottom, #7a7a7a 0%, #5a5a5a 50%, #4a4a4a 51%, #3a3a3a 100%);
  text-decoration: none;
  color: #fff;
}

.nav-btn:active {
  background: linear-gradient(to bottom, #3a3a3a 0%, #4a4a4a 50%, #5a5a5a 51%, #6a6a6a 100%);
  box-shadow: 0 1px 4px rgba(0,0,0,0.4) inset;
}

/* ---------- Main Content ---------- */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 20px 60px;
}

/* ---------- Panel (Card) Styling ---------- */
.panel {
  background: linear-gradient(to bottom, #ffffff 0%, #f4f0ea 100%);
  border: 1px solid #b5a68c;
  border-radius: 10px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.8) inset,
    0 4px 12px rgba(0,0,0,0.15),
    0 1px 3px rgba(0,0,0,0.1);
  padding: 30px;
  margin-bottom: 30px;
}

/* ---------- Embossed Section Titles ---------- */
.section-title {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 26px;
  color: #4a3728;
  margin-bottom: 6px;
}

.section-title.embossed {
  text-shadow:
    0 1px 0 rgba(255,255,255,0.7),
    0 -1px 0 rgba(0,0,0,0.15);
}

.section-desc {
  font-size: 14px;
  color: #7a6a5a;
  margin-bottom: 24px;
  font-style: italic;
}

/* ---------- Hero Section ---------- */
.hero-panel {
  text-align: center;
  background: linear-gradient(to bottom, #fdf6e3 0%, #f0e6d0 100%);
  border: 1px solid #c8b894;
}

.hero-subtitle {
  font-size: 15px;
  color: #6a5a4a;
  margin-bottom: 28px;
  font-style: italic;
}

/* ---------- Stat Badges ---------- */
.stat-badges {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 28px;
  min-width: 180px;
  border-radius: 12px;
  background: linear-gradient(to bottom, #fff 0%, #eae4da 100%);
  border: 1px solid #b5a68c;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 3px 8px rgba(0,0,0,0.12);
}

.badge-label {
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #8a7a6a;
  margin-bottom: 6px;
}

.badge-value {
  font-family: Georgia, serif;
  font-size: 32px;
  font-weight: bold;
  color: #3a2a1a;
  text-shadow: 0 1px 0 rgba(255,255,255,0.6);
}

.badge-sub {
  font-size: 12px;
  color: #9a8a7a;
  margin-top: 2px;
}

.decline-badge {
  background: linear-gradient(to bottom, #ffe0e0 0%, #f0c4c4 100%);
  border-color: #d4a0a0;
}

.decline-badge .badge-value {
  color: #a03030;
}

/* ---------- Bar Chart ---------- */
.chart-container {
  display: flex;
  align-items: flex-end;
  gap: 0;
  min-height: 260px;
  padding: 10px 0 0 0;
  position: relative;
}

.chart-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 220px;
  padding-right: 8px;
  font-size: 10px;
  color: #8a7a6a;
  text-align: right;
  min-width: 45px;
  flex-shrink: 0;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  flex: 1;
  height: 220px;
  border-bottom: 2px solid #b5a68c;
  border-left: 2px solid #b5a68c;
  padding: 0 4px;
  position: relative;
  /* Subtle grid */
  background-image:
    repeating-linear-gradient(
      to top,
      transparent 0px,
      transparent 43px,
      rgba(0,0,0,0.05) 43px,
      rgba(0,0,0,0.05) 44px
    );
}

.bar-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  min-width: 0;
}

.bar {
  width: 80%;
  max-width: 40px;
  border-radius: 4px 4px 0 0;
  /* Default amber/honey gradient */
  background: linear-gradient(to bottom, #f5c842 0%, #d4a017 50%, #c49012 100%);
  box-shadow:
    1px 0 0 rgba(255,255,255,0.3) inset,
    -1px 0 0 rgba(0,0,0,0.1) inset,
    0 -1px 0 rgba(255,255,255,0.4) inset,
    0 2px 4px rgba(0,0,0,0.15);
  position: relative;
  transition: height 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
}

.bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40%;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}

.bar:hover {
  filter: brightness(1.1);
}

/* Colonies green bars */
.bar.colonies-bar {
  background: linear-gradient(to bottom, #6dbf67 0%, #4a9e44 50%, #3d8837 100%);
}

/* Yield blue bars */
.bar.yield-bar {
  background: linear-gradient(to bottom, #5dade2 0%, #3498db 50%, #2980b9 100%);
}

/* Price purple bars */
.bar.price-bar {
  background: linear-gradient(to bottom, #af7ac5 0%, #8e44ad 50%, #7d3c98 100%);
}

.bar-label {
  font-size: 9px;
  color: #7a6a5a;
  margin-top: 4px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  white-space: nowrap;
}

.bar-value-tip {
  display: none;
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, #4a4a4a, #2a2a2a);
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 5px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  z-index: 10;
  pointer-events: none;
}

.bar-value-tip::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #2a2a2a;
}

.bar:hover .bar-value-tip {
  display: block;
}

/* ---------- Chart Legend ---------- */
.chart-legend {
  margin-top: 14px;
  font-size: 12px;
  color: #7a6a5a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-bar {
  display: inline-block;
  width: 16px;
  height: 12px;
  border-radius: 2px;
  background: linear-gradient(to bottom, #f5c842, #c49012);
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.legend-bar.colonies {
  background: linear-gradient(to bottom, #6dbf67, #3d8837);
}

.legend-bar.yield {
  background: linear-gradient(to bottom, #5dade2, #2980b9);
}

.legend-bar.prices {
  background: linear-gradient(to bottom, #af7ac5, #7d3c98);
}

/* ---------- Data Table ---------- */
.table-wrapper {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #b5a68c;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 2px 6px rgba(0,0,0,0.1);
}

#honey-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

#honey-table thead {
  background: linear-gradient(to bottom, #6a5a4a 0%, #4a3a2a 100%);
}

#honey-table thead th {
  color: #f5e6c8;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  text-align: left;
  text-shadow: 0 -1px 0 rgba(0,0,0,0.4);
  border-right: 1px solid rgba(255,255,255,0.08);
}

#honey-table thead th:last-child {
  border-right: none;
}

#honey-table tbody tr {
  border-bottom: 1px solid #d4c8b4;
  transition: background 0.15s ease;
}

#honey-table tbody tr:nth-child(even) {
  background-color: rgba(0,0,0,0.03);
}

#honey-table tbody tr:hover {
  background-color: #f5eee0;
}

#honey-table tbody td {
  padding: 10px 16px;
  color: #4a3a2a;
}

#honey-table tbody td:first-child {
  font-weight: bold;
}

/* Highlight decline rows */
#honey-table tbody tr.decline-row td:nth-child(2) {
  color: #a03030;
}

/* ---------- Footer ---------- */
#main-footer {
  background: linear-gradient(to bottom, #4a3a2a 0%, #2a1a0a 100%);
  border-top: 1px solid #6a5a4a;
  padding: 24px 20px;
  text-align: center;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

#main-footer p {
  font-size: 13px;
  color: #b5a68c;
}

#main-footer a {
  color: #f5c842;
}

.footer-note {
  margin-top: 6px;
  font-size: 11px;
  color: #8a7a6a;
}

/* ---------- Decorative Divider ---------- */
.panel + .panel::before {
  content: '';
  display: block;
  width: 60%;
  max-width: 300px;
  height: 1px;
  margin: -15px auto 0;
  background: linear-gradient(to right, transparent, #b5a68c, transparent);
}

/* ---------- US Map ---------- */
.map-container {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

#us-map {
  position: relative;
}

.us-map-svg {
  width: 100%;
  height: auto;
}

.state-path {
  stroke: #8a7a6a;
  stroke-width: 1.5;
  cursor: pointer;
  transition: fill 0.2s ease, stroke 0.15s ease;
}

.state-path:hover {
  stroke: #3a2a1a;
  stroke-width: 2.5;
  filter: brightness(1.15);
}

.map-tooltip {
  position: absolute;
  background: linear-gradient(to bottom, #4a4a4a, #2a2a2a);
  color: #fff;
  font-size: 13px;
  font-weight: bold;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(0,0,0,0.35);
  pointer-events: none;
  z-index: 20;
}

.map-legend-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.map-legend-label {
  font-size: 11px;
  color: #7a6a5a;
  font-style: italic;
}

.map-legend-gradient {
  width: 200px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid #b5a68c;
  background: linear-gradient(to right, #fef3c7, #fcd34d, #f5c842, #d4a017, #a07010, #7a4a0a);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.5) inset,
    0 1px 3px rgba(0,0,0,0.1);
}

.map-note {
  text-align: center;
  font-size: 11px;
  color: #9a8a7a;
  margin-top: 8px;
  font-style: italic;
}

/* ---------- Bee Facts ---------- */
.facts-panel {
  text-align: center;
}

.fact-display {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.fact-text {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 20px;
  font-style: italic;
  color: #4a3728;
  line-height: 1.6;
  max-width: 650px;
  transition: opacity 0.3s ease;
  text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}

.fact-btn {
  display: inline-block;
  padding: 10px 28px;
  font-size: 14px;
  font-weight: bold;
  font-family: "Lucida Grande", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0,0,0,0.4);
  border: 1px solid rgba(0,0,0,0.3);
  border-radius: 6px;
  background: linear-gradient(to bottom, #f5c842 0%, #d4a017 50%, #c49012 51%, #b08010 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.3) inset,
    0 2px 4px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: all 0.15s ease;
}

.fact-btn:hover {
  background: linear-gradient(to bottom, #ffd862 0%, #e4b027 50%, #d4a022 51%, #c09018 100%);
}

.fact-btn:active {
  background: linear-gradient(to bottom, #b08010 0%, #c49012 50%, #d4a017 51%, #f5c842 100%);
  box-shadow: 0 2px 4px rgba(0,0,0,0.3) inset;
}

/* ---------- Logout Button ---------- */
.logout-btn {
  background: linear-gradient(to bottom, #a04040 0%, #803030 50%, #702828 51%, #601818 100%) !important;
  border-color: rgba(80,0,0,0.5) !important;
}

.logout-btn:hover {
  background: linear-gradient(to bottom, #b05050 0%, #903838 50%, #803030 51%, #702020 100%) !important;
}

/* ---------- Login Page ---------- */
.login-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  padding: 36px 32px;
  text-align: center;
}

.login-header {
  margin-bottom: 24px;
}

.login-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 8px;
}

.login-header .section-title {
  font-size: 24px;
}

.login-subtitle {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 18px;
  color: #5a4a3a;
  margin-bottom: 20px;
  text-shadow: 0 1px 0 rgba(255,255,255,0.6);
}

.login-error {
  display: none;
  background: linear-gradient(to bottom, #ffe0e0 0%, #f0c4c4 100%);
  border: 1px solid #d4a0a0;
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 18px;
  font-size: 13px;
  color: #803030;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 1px 3px rgba(0,0,0,0.08);
}

.form-group {
  margin-bottom: 16px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6a5a4a;
  margin-bottom: 6px;
  text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}

.form-group input {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  font-family: "Lucida Grande", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #3a2a1a;
  border: 1px solid #a09080;
  border-radius: 6px;
  background: linear-gradient(to bottom, #e8e0d4 0%, #fff 6%);
  box-shadow:
    0 1px 3px rgba(0,0,0,0.12) inset,
    0 1px 0 rgba(255,255,255,0.7);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus {
  border-color: #d4a017;
  box-shadow:
    0 1px 3px rgba(0,0,0,0.12) inset,
    0 0 0 3px rgba(212,160,23,0.2);
}

.login-btn {
  display: block;
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  font-size: 15px;
  font-weight: bold;
  font-family: "Lucida Grande", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0,0,0,0.4);
  border: 1px solid rgba(0,0,0,0.3);
  border-radius: 6px;
  background: linear-gradient(to bottom, #f5c842 0%, #d4a017 50%, #c49012 51%, #b08010 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.3) inset,
    0 2px 4px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: all 0.15s ease;
}

.login-btn:hover {
  background: linear-gradient(to bottom, #ffd862 0%, #e4b027 50%, #d4a022 51%, #c09018 100%);
}

.login-btn:active {
  background: linear-gradient(to bottom, #b08010 0%, #c49012 50%, #d4a017 51%, #f5c842 100%);
  box-shadow: 0 2px 4px rgba(0,0,0,0.3) inset;
}

.login-toggle {
  margin-top: 20px;
  font-size: 13px;
  color: #7a6a5a;
}

.login-toggle a {
  color: #b08010;
  font-weight: bold;
}

.login-toggle a:hover {
  color: #d4a017;
}

.login-footer-note {
  margin-top: 20px;
  font-size: 11px;
  color: #8a7a6a;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    text-align: center;
  }

  nav {
    justify-content: center;
  }

  .stat-badges {
    flex-direction: column;
    align-items: center;
  }

  .badge {
    width: 100%;
    max-width: 280px;
  }

  .bar-label {
    font-size: 8px;
  }

  .bar-chart {
    gap: 2px;
  }

  .bar {
    max-width: 24px;
  }

  .section-title {
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  .panel {
    padding: 20px 14px;
  }

  .bar-label {
    display: none;
  }

  .chart-y-axis {
    min-width: 35px;
    font-size: 9px;
  }
}
