/* ============================================
   RIBEIRO BREWING - Community Forum
   CSS Variables & Global Styles
   ============================================ */

:root {
  /* Color Palette */
  --bg: #0c0d10;
  --surface: #13151a;
  --surface2: #1a1d25;
  --surface3: #22262f;
  --border: #2a2e3a;
  --border-light: #363b4a;
  --text: #e8eaf0;
  --text2: #9094a6;
  --text3: #5c6070;
  --accent: #f5a623;
  --accent-dim: rgba(245, 166, 35, 0.15);
  --accent-glow: rgba(245, 166, 35, 0.25);
  --green: #34d399;
  --green-dim: rgba(52, 211, 153, 0.15);
  --red: #f87171;
  --red-dim: rgba(248, 113, 113, 0.15);
  --blue: #60a5fa;
  --blue-dim: rgba(96, 165, 250, 0.15);
  --purple: #a78bfa;

  --font-sans: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
}

/* Light Theme */
html.light {
  --bg: #f5f3ef;
  --surface: #ffffff;
  --surface2: #f0ede7;
  --surface3: #e8e4dc;
  --border: #ddd8cf;
  --border-light: #ccc6bb;
  --text: #1a1a1a;
  --text2: #5c5c5c;
  --text3: #999999;
  --accent: #d4891a;
  --accent-dim: rgba(212, 137, 26, 0.12);
  --accent-glow: rgba(212, 137, 26, 0.2);
  --green: #16a34a;
  --green-dim: rgba(22, 163, 74, 0.1);
  --red: #dc2626;
  --red-dim: rgba(220, 38, 38, 0.1);
  --blue: #2563eb;
  --blue-dim: rgba(37, 99, 235, 0.1);
}

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

body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  background: rgba(19, 21, 26, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 56px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.nav-brand img {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 0 6px var(--accent-glow));
}

.nav-brand span {
  background: linear-gradient(135deg, #f5a623, #d4782f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  color: var(--text2);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--duration-fast) var(--ease-out);
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--surface2);
  text-decoration: none;
}

.nav-links a.active {
  color: var(--accent);
  background: var(--accent-dim);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-user .user-info {
  font-size: 13px;
  color: var(--text2);
}

.nav-user .user-info strong {
  color: var(--accent);
}

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface2);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}

.btn:hover {
  background: var(--surface3);
  border-color: var(--border-light);
  transform: translateY(-1px);
  text-decoration: none;
}

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

.btn-primary {
  background: var(--accent);
  color: var(--text);
  border-color: var(--accent);
  font-weight: 600;
  box-shadow: 0 2px 12px var(--accent-glow);
}

.btn-primary:hover {
  background: #f0b03a;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--surface2);
  border-color: var(--border);
}

.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-dim); border-color: var(--red); }

/* ============================================
   FORMS
   ============================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-group label {
  font-size: 12px;
  color: var(--text2);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
select,
textarea {
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

textarea { resize: vertical; min-height: 120px; }

input::placeholder, textarea::placeholder { color: var(--text3); }

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}

.card:hover {
  border-color: var(--border-light);
}

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

.card-header h3 {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body { padding: 20px; }

/* ============================================
   LAYOUT
   ============================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.page { padding: 24px 0; }

.page-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
}

.page-full { grid-column: 1 / -1; }

/* ============================================
   HERO
   ============================================ */
.hero {
  text-align: center;
  padding: 60px 20px 48px;
  background: linear-gradient(180deg, rgba(245, 166, 35, 0.06) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.5;
}

.hero-icon {
  font-size: 56px;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 20px var(--accent-glow));
  position: relative;
}

.hero h1 {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #f5a623 0%, #e8913a 50%, #d4782f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
  position: relative;
}

.hero p {
  color: var(--text2);
  font-size: 16px;
  max-width: 520px;
  margin: 0 auto 24px;
  position: relative;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  position: relative;
}

.hero-stat {
  text-align: center;
}

.hero-stat .num {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  display: block;
}

.hero-stat .label {
  font-size: 12px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  position: relative;
}

/* ============================================
   POST LIST
   ============================================ */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.post-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.post-item:hover {
  background: var(--surface2);
  border-color: var(--border-light);
  transform: translateX(4px);
}

.post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.post-content { flex: 1; min-width: 0; }

.post-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-meta {
  font-size: 12px;
  color: var(--text3);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.post-meta .tag {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  background: var(--accent-dim);
  color: var(--accent);
}

.post-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text3);
  flex-shrink: 0;
}

.post-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============================================
   FORUM CATEGORIES
   ============================================ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.category-card {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.category-card:hover {
  border-color: var(--accent);
  background: var(--surface2);
  transform: translateY(-2px);
}

.category-card.active {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.category-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.category-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.category-count {
  font-size: 12px;
  color: var(--text3);
}

/* ============================================
   POST DETAIL
   ============================================ */
.post-detail {
  padding: 24px;
}

.post-detail-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.post-detail-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
}

.post-detail-meta {
  font-size: 13px;
  color: var(--text3);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.post-detail-body {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.post-detail-body .recipe-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 12px 0;
}

/* Replies */
.reply-list {
  margin-top: 24px;
}

.reply-item {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.reply-item:last-child { border-bottom: none; }

.reply-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
}

.reply-author { font-weight: 600; color: var(--accent); }
.reply-time { color: var(--text3); font-size: 12px; }
.reply-body { font-size: 14px; line-height: 1.7; }

.reply-form {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 520px;
  max-width: 92vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

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

.modal-header h3 { font-size: 16px; font-weight: 600; }

.modal-body { padding: 20px; }

.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ============================================
   PROFILE
   ============================================ */
.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  margin-bottom: 24px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  border: 2px solid var(--accent);
  flex-shrink: 0;
}

.profile-info h2 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.profile-info p { font-size: 13px; color: var(--text3); }

.profile-stats {
  display: flex;
  gap: 24px;
  margin-top: 8px;
}

.profile-stat {
  text-align: center;
}

.profile-stat .num {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  display: block;
}

.profile-stat .label {
  font-size: 11px;
  color: var(--text3);
}

.profile-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.profile-tab {
  padding: 10px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text2);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all var(--duration-fast) var(--ease-out);
}

.profile-tab:hover { color: var(--text); }

.profile-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ============================================
   BREW LAB IFRAME
   ============================================ */
.brew-lab-wrapper {
  height: calc(100vh - 56px);
  overflow: hidden;
}

.brew-lab-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ============================================
   TOAST
   ============================================ */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 10px 20px;
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text);
  z-index: 9999;
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out),
              transform var(--duration-normal) var(--ease-out);
  pointer-events: none;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar-section {
  margin-bottom: 16px;
}

.sidebar-section .card-header h3 {
  font-size: 13px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text2);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.sidebar-item:hover {
  background: var(--surface2);
  color: var(--text);
}

.sidebar-item .count {
  margin-left: auto;
  font-size: 11px;
  color: var(--text3);
  background: var(--surface3);
  padding: 1px 6px;
  border-radius: 10px;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text2);
}

.empty-state .icon {
  font-size: 48px;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 16px var(--accent-glow));
}

.empty-state h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeInUp var(--duration-slow) var(--ease-out) backwards;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .page-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 { font-size: 28px; }
  .hero-stats { gap: 24px; }
  .hero-stat .num { font-size: 22px; }

  .category-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

@media (max-width: 640px) {
  .nav { padding: 0 12px; }

  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 8px;
  }

  .nav-links.open { display: flex; }

  .nav-hamburger { display: block; }

  .hero { padding: 40px 16px 32px; }
  .hero h1 { font-size: 24px; }
  .hero p { font-size: 14px; }
  .hero-stats { gap: 16px; }
  .hero-stat .num { font-size: 20px; }

  .post-item { padding: 12px; gap: 12px; }
  .post-avatar { width: 36px; height: 36px; font-size: 16px; }

  .container { padding: 0 12px; }

  .profile-header { flex-direction: column; text-align: center; }
  .profile-stats { justify-content: center; }

  .modal { margin: 12px; }
}

/* Light Theme Overrides */
html.light .modal-overlay {
  background: rgba(0, 0, 0, 0.4);
}

html.light .nav {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

html.light .hero {
  background: linear-gradient(135deg, #fef9f0 0%, #f5f0e6 100%);
}

html.light .stat-card,
html.light .category-card {
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

html.light .post-item:hover {
  background: #f8f6f2;
}

/* ============================================
   RECIPE CARDS
   ============================================ */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.recipe-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.recipe-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.recipe-card-header {
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border);
}

.recipe-style-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  background: var(--accent-dim);
  color: var(--accent);
  margin-bottom: 8px;
}

.recipe-name {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.recipe-card-body {
  padding: 12px 16px;
}

.recipe-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.recipe-stat {
  text-align: center;
}

.recipe-stat-label {
  display: block;
  font-size: 10px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.recipe-stat-value {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

.recipe-desc {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recipe-card-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text3);
}

.recipe-author { font-weight: 500; color: var(--text2); }

/* Recipe filter active state */
.recipe-filter.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent);
}

/* Responsive */
@media (max-width: 640px) {
  .recipe-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Beer Menu ── */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.beer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.beer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.beer-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.beer-card-img {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.beer-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tap-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.6);
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}

.beer-card-body {
  padding: 14px;
}

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

.beer-card-header h3 {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  flex: 1;
}

.status-badge {
  flex-shrink: 0;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.status-available { background: rgba(74,222,128,0.15); color: #4ade80; }
.status-soldout { background: rgba(239,68,68,0.15); color: #ef4444; }
.status-seasonal { background: rgba(245,158,11,0.15); color: #f59e0b; }
.status-fermenting { background: rgba(168,85,247,0.15); color: #a855f7; }

.beer-meta-row {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: var(--text3);
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.beer-flavors {
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.beer-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
}

.beer-grid-compact {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.beer-card-compact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.beer-srm {
  width: 8px;
  height: 40px;
  border-radius: 4px;
  flex-shrink: 0;
}

.modal-lg {
  max-width: 600px;
}

.beer-detail-hero {
  border-radius: var(--radius) var(--radius) 0 0;
}

.beer-detail {
  max-height: 70vh;
  overflow-y: auto;
}

/* ── Events ── */
.events-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.event-card {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
}

.event-past { opacity: 0.6; border-left-color: var(--text3); }

.event-date-badge {
  flex-shrink: 0;
  text-align: center;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  min-width: 52px;
}

.event-date-month {
  font-size: 11px;
  font-weight: 600;
}

.event-date-day {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.event-content { flex: 1; min-width: 0; }
.event-content h4 { margin-bottom: 4px; font-size: 15px; }
.event-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text3);
  flex-wrap: wrap;
}

.event-item-compact {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.event-item-compact:last-child { border-bottom: none; }

/* ── Notifications ── */
.nav-notif-wrap { position: relative; }

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: white;
  font-size: 10px;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  max-height: 400px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  z-index: 1000;
}

.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: 13px;
}

.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: var(--accent-dim); }
.notif-item:hover { background: var(--hover); }

/* ── Search ── */
.nav-search-wrap { position: relative; display: inline-block; vertical-align: middle; }

.nav-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: flex;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  z-index: 1000;
}

.nav-search-dropdown input {
  width: 240px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
}

/* ── Achievements ── */
.achievements-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
}

.achievement-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  min-width: 60px;
  text-align: center;
  font-size: 12px;
}

.achievement-item.earned {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}

.achievement-item.locked {
  opacity: 0.35;
  filter: grayscale(1);
}

/* ── Admin Stats ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.stat-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  color: var(--text3);
}

/* ── Profile Tabs ── */
.profile-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.profile-tab {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text2);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.profile-tab:hover { background: var(--hover); }
.profile-tab.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent);
}

/* Responsive */
@media (max-width: 640px) {
  .beer-grid { grid-template-columns: 1fr 1fr; }
  .beer-grid-compact { grid-template-columns: 1fr; }
  .notif-dropdown { width: 280px; }
  .nav-search-dropdown input { width: 160px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Light Theme Enhancements ── */
html.light input,
html.light textarea,
html.light select {
  background: #fff;
  color: #1a1a1a;
  border-color: #d1d5db;
}

html.light input:focus,
html.light textarea:focus,
html.light select:focus {
  border-color: #f5a623;
  outline: none;
  box-shadow: 0 0 0 2px rgba(245, 166, 35, 0.15);
}

html.light .form-group label {
  color: #374151;
}

html.light .toast {
  background: #1f2937;
  color: #f9fafb;
}

html.light .tag {
  background: rgba(245, 166, 35, 0.1);
  color: #b45309;
  border: 1px solid rgba(245, 166, 35, 0.2);
}

html.light .modal {
  background: #ffffff;
  border: 1px solid #e5e7eb;
}

html.light .modal-header {
  border-bottom-color: #e5e7eb;
}

html.light .modal-footer {
  border-top-color: #e5e7eb;
}

html.light .sidebar-item:hover {
  background: #f3f4f6;
}

html.light .profile-tab {
  color: #6b7280;
  border-bottom: 2px solid transparent;
}

html.light .profile-tab.active {
  color: #f5a623;
  border-bottom-color: #f5a623;
}

html.light .reply-item {
  border-bottom-color: #f3f4f6;
}

html.light .beer-card-compact:hover {
  background: #f9fafb;
}

html.light .event-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
}

html.light .recipe-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
}

html.light .recipe-card:hover {
  border-color: #f5a623;
  box-shadow: 0 4px 12px rgba(245, 166, 35, 0.1);
}

html.light .achievement-item.locked {
  background: #f3f4f6;
  color: #9ca3af;
}

html.light ::-webkit-scrollbar-thumb {
  background: #d1d5db;
}

html.light ::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}
