/* ============================================================
   WINDFALL — CSS
   Organic / natural dark theme. Fraunces display + DM Sans body.
   ============================================================ */

:root {
  --green-deep:   #0f1a0e;
  --green-dark:   #1a2e18;
  --green-mid:    #2d5a27;
  --green-main:   #4a7c3f;
  --green-light:  #7db874;
  --green-pale:   #b8d9b2;
  --apple-red:    #c0392b;
  --apple-warm:   #e74c3c;
  --gold:         #d4a843;
  --cream:        #f5f0e8;
  --white:        #ffffff;
  --text-main:    #e8f0e6;
  --text-sub:     #8aab85;
  --text-muted:   #556b52;
  --border:       rgba(74,124,63,0.25);
  --card-bg:      rgba(26,46,24,0.95);
  --panel-bg:     #111d10;
  --radius:       16px;
  --radius-sm:    10px;
  --shadow:       0 8px 32px rgba(0,0,0,0.5);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  font-family: 'DM Sans', sans-serif;
  background: var(--green-deep);
  color: var(--text-main);
  overflow: hidden;
}

/* ==================== SCREENS ==================== */
.screen { position: fixed; inset: 0; z-index: 10; display: none; }
.screen.active { display: flex; }

/* ==================== AUTH ==================== */
#authScreen {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--green-deep);
  overflow-y: auto;
  padding: 24px 20px 40px;
}

.auth-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
}
.orb1 { width: 320px; height: 320px; background: var(--green-main); top: -80px; right: -60px; animation: drift 8s ease-in-out infinite alternate; }
.orb2 { width: 240px; height: 240px; background: var(--apple-red); bottom: 60px; left: -60px; animation: drift 11s ease-in-out infinite alternate-reverse; }
.orb3 { width: 180px; height: 180px; background: var(--gold); top: 50%; left: 50%; transform: translate(-50%,-50%); animation: drift 14s ease-in-out infinite alternate; }

@keyframes drift { from { transform: translateY(0) scale(1); } to { transform: translateY(30px) scale(1.08); } }

.auth-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  background: rgba(17,29,16,0.85);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 36px 28px 32px;
  box-shadow: var(--shadow);
}

.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-icon { width: 160px; height: 160px; margin-bottom: 4px; object-fit: contain; filter: drop-shadow(0 4px 16px rgba(74,124,63,0.45)); }

.logo-text {
  font-family: 'Fraunces', serif;
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -0.03em;
  line-height: 1;
}
.logo-sub {
  font-size: 0.85rem;
  color: var(--text-sub);
  margin-top: 6px;
  letter-spacing: 0.04em;
}

.auth-tabs {
  display: flex;
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 24px;
}
.auth-tab {
  flex: 1;
  padding: 9px;
  border: none;
  background: transparent;
  color: var(--text-sub);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.auth-tab.active {
  background: var(--green-main);
  color: var(--white);
}

.auth-form { display: none; flex-direction: column; gap: 16px; }
.auth-form.active { display: flex; }

.field-group { display: flex; flex-direction: column; gap: 6px; position: relative; }
.field-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-sub);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.field-group input,
.field-group select,
.field-group textarea {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text-main);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  border-color: var(--green-light);
}
.field-group select { cursor: pointer; }
.field-group textarea { resize: vertical; }
.field-group input[type="file"] {
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.85rem;
}
option { background: var(--green-dark); }

.auth-error {
  background: rgba(192,57,43,0.15);
  border: 1px solid rgba(192,57,43,0.4);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.85rem;
  color: #ff8a7a;
}
.hidden { display: none !important; }

/* ==================== BUTTONS ==================== */
.btn-primary {
  background: var(--green-main);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}
.btn-primary:hover { background: var(--green-light); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: rgba(74,124,63,0.15);
  color: var(--green-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}
.btn-secondary:hover { background: rgba(74,124,63,0.25); }

.btn-danger {
  background: rgba(192,57,43,0.15);
  color: #ff8a7a;
  border: 1px solid rgba(192,57,43,0.3);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  margin-top: 12px;
}
.btn-danger:hover { background: rgba(192,57,43,0.3); }

.btn-sm {
  padding: 8px 14px;
  font-size: 0.85rem;
  border-radius: 8px;
}

/* ==================== MAP ==================== */
#appScreen { flex-direction: column; }
#map { flex: 1; width: 100%; z-index: 1; }
/* Keep Leaflet's zoom buttons clear of the bottom nav + FAB */
#map .leaflet-bottom.leaflet-right { bottom: 76px; right: 74px; }

/* ==================== TOP BAR ==================== */
.top-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(15,26,14,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.top-bar-left { display: flex; align-items: center; gap: 10px; }
.top-icon { width: 28px; height: 28px; }
.top-title {
  font-family: 'Fraunces', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
}
.top-bar-right { display: flex; gap: 8px; }
.icon-btn {
  position: relative;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 38px; height: 38px;
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.icon-btn:hover { background: rgba(255,255,255,0.14); }

/* Red count badge on the notification bell */
.icon-badge {
  position: absolute;
  top: -3px; right: -3px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 100px;
  background: var(--apple-warm);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--panel-bg);
  box-shadow: 0 0 6px rgba(231,76,60,0.7);
}

/* Gold unread dot on the updates megaphone */
.icon-dot {
  position: absolute;
  top: 2px; right: 3px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--gold);
  border: 1.5px solid var(--panel-bg);
  box-shadow: 0 0 6px rgba(212,168,67,0.8);
}

/* Community impact counter on the sign-in screen */
.community-impact {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-sub);
  background: rgba(74,124,63,0.14);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 9px 18px;
  margin: 0 auto 18px;
  max-width: fit-content;
  line-height: 1.4;
}
.community-impact strong { color: var(--green-light); }

/* Unread notification highlight */
.notif-unread { border-left: 3px solid var(--gold); }

/* Harvest calendar month strips */
.season-strip {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 3px;
}
.season-cell {
  text-align: center;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255,255,255,0.05);
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 6px 0;
}
.season-cell.season-on {
  background: rgba(74,124,63,0.4);
  color: var(--green-pale);
}
.season-cell.season-now {
  border-color: var(--gold);
  box-shadow: 0 0 6px rgba(212,168,67,0.5);
  color: var(--gold);
}
.season-cell.season-on.season-now {
  background: rgba(212,168,67,0.3);
  font-weight: 800;
}

/* ==================== LEGEND ==================== */
.legend {
  position: fixed;
  top: 100px; left: 12px;
  z-index: 100;
  background: rgba(15,26,14,0.88);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.legend-item { display: flex; align-items: center; gap: 7px; font-size: 0.75rem; color: var(--text-sub); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-green { background: #4CAF50; box-shadow: 0 0 6px #4CAF50; }
.dot-red { background: #e74c3c; box-shadow: 0 0 6px #e74c3c; }
.dot-blue { background: #3498db; box-shadow: 0 0 6px #3498db; }

/* ==================== FAB ==================== */
.fab {
  position: fixed;
  bottom: 90px; right: 20px;
  z-index: 200;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--green-main);
  color: var(--white);
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(74,124,63,0.5);
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.fab:hover { background: var(--green-light); transform: scale(1.08); }
.fab:active { transform: scale(0.95); }

/* ==================== BOTTOM NAV ==================== */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  background: rgba(15,26,14,0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  /* always keep at least 8px under the labels; add the phone safe-area on top */
  padding: 6px 0 calc(env(safe-area-inset-bottom, 0px) + 8px);
}
.nav-btn {
  flex: 1;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.nav-btn.active::before {
  content: "";
  position: absolute;
  top: -6px; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--green-light), var(--gold));
  box-shadow: 0 0 8px rgba(125,184,116,0.6);
}
.nav-icon { font-size: 1.3rem; transition: transform 0.2s; position: relative; }
.nav-badge {
  position: absolute;
  top: -4px; right: -10px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 100px;
  background: var(--apple-warm);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--panel-bg);
  box-shadow: 0 0 6px rgba(231,76,60,0.7);
}
.nav-label { font-size: 0.68rem; line-height: 1.25; color: var(--text-muted); font-weight: 500; white-space: nowrap; overflow: hidden; max-width: 100%; }
.nav-btn.active .nav-label { color: var(--green-light); }
.nav-btn.active .nav-icon { transform: scale(1.15); }

/* ==================== PANELS ==================== */
.panel {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 300;
  max-height: 88vh;
  background: var(--panel-bg);
  border-top: 1px solid var(--border);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}
.panel.open { transform: translateY(0); }

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.panel-header h2 {
  font-family: 'Fraunces', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
}
.panel-close {
  background: rgba(255,255,255,0.07);
  border: none;
  border-radius: 50%;
  width: 32px; height: 32px;
  color: var(--text-sub);
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.panel-close:hover { background: rgba(255,255,255,0.14); }

.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 100px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.panel-hint {
  font-size: 0.85rem;
  color: var(--text-sub);
  background: rgba(74,124,63,0.1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

/* ==================== LOC ROW ==================== */
.loc-row { display: flex; gap: 12px; }
.flex-1 { flex: 1; }

/* ==================== OVERLAY ==================== */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}

/* ==================== TOAST ==================== */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  z-index: 999;
  background: var(--green-main);
  color: var(--white);
  padding: 12px 24px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: all 0.3s;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==================== PROFILE ==================== */
.profile-card {
  text-align: center;
  padding: 20px;
  background: rgba(74,124,63,0.1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.profile-avatar {
  font-size: 3rem;
  margin-bottom: 12px;
}
.profile-name {
  font-family: 'Fraunces', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
}
.profile-email {
  font-size: 0.85rem;
  color: var(--text-sub);
  margin-top: 4px;
}

.stats-row {
  display: flex;
  gap: 12px;
}
.stat-box {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 8px;
  text-align: center;
}
.stat-num {
  font-family: 'Fraunces', serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--green-light);
  line-height: 1;
}
.stat-lbl {
  font-size: 0.72rem;
  color: var(--text-sub);
  margin-top: 4px;
}

.badges-section h3 {
  font-family: 'Fraunces', serif;
  font-size: 1rem;
  color: var(--text-sub);
  margin-bottom: 12px;
}
.badges-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.badge {
  background: rgba(212,168,67,0.15);
  border: 1px solid rgba(212,168,67,0.35);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 0.8rem;
  color: var(--gold);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}
.no-badges {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ==================== LEADERBOARD ==================== */
.leaderboard-list { display: flex; flex-direction: column; gap: 10px; }
.leader-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.leader-rank {
  font-family: 'Fraunces', serif;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--text-muted);
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}
.leader-rank.gold { color: #FFD700; }
.leader-rank.silver { color: #C0C0C0; }
.leader-rank.bronze { color: #CD7F32; }
.leader-info { flex: 1; }
.leader-name { font-weight: 600; font-size: 0.95rem; color: var(--white); }
.leader-sub { font-size: 0.78rem; color: var(--text-sub); margin-top: 2px; }
.leader-kg {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green-light);
}

/* ==================== TREE DETAIL ==================== */
.tree-detail-photo {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.tree-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tree-chip {
  background: rgba(74,124,63,0.15);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 5px 12px;
  font-size: 0.8rem;
  color: var(--text-sub);
}
.tree-status-chip {
  border-radius: 100px;
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 600;
}
.status-active { background: rgba(76,175,80,0.2); color: #81c784; border: 1px solid rgba(76,175,80,0.35); }
.status-picked { background: rgba(52,152,219,0.2); color: #64b5f6; border: 1px solid rgba(52,152,219,0.35); }
.status-rotten { background: rgba(231,76,60,0.2); color: #ef9a9a; border: 1px solid rgba(231,76,60,0.35); }

.tree-notes {
  font-size: 0.9rem;
  color: var(--text-sub);
  line-height: 1.5;
  font-style: italic;
}
.tree-pickup-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tree-pickup-form input,
.tree-pickup-form select {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--text-main);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  outline: none;
}
.tree-pickup-form select { cursor: pointer; }
.tree-pickup-form select option { background: var(--panel-bg); color: var(--text-main); }
.tree-pickup-form input:focus,
.tree-pickup-form select:focus { border-color: var(--green-light); }
.pickup-history { display: flex; flex-direction: column; gap: 6px; }
.pickup-row {
  font-size: 0.82rem;
  color: var(--text-sub);
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* ==================== MY TREES ==================== */
.my-trees-list { display: flex; flex-direction: column; gap: 12px; }
.my-tree-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  cursor: pointer;
  transition: background 0.2s;
}
.my-tree-card:hover { background: rgba(255,255,255,0.07); }
.my-tree-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.my-tree-type { font-weight: 600; font-size: 0.95rem; }
.my-tree-date { font-size: 0.78rem; color: var(--text-muted); }
.my-tree-notes { font-size: 0.82rem; color: var(--text-sub); }

/* ==================== LEAFLET OVERRIDES ==================== */
.leaflet-popup-content-wrapper {
  background: var(--card-bg) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow) !important;
  color: var(--text-main) !important;
}
.leaflet-popup-tip { background: var(--card-bg) !important; }
.leaflet-popup-content { margin: 12px 16px !important; font-family: 'DM Sans', sans-serif !important; }
.popup-title { font-family: 'Fraunces', serif; font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.popup-sub { font-size: 0.8rem; color: var(--text-sub); margin-bottom: 10px; }
.popup-btn {
  background: var(--green-main);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  width: 100%;
}
.popup-btn:hover { background: var(--green-light); }

/* ==================== TEMP PIN MARKER ==================== */
.temp-pin { background: none; border: none; }

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--green-mid); border-radius: 2px; }

/* ==================== AI CHECKER ==================== */
.ai-result {
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 0.88rem;
  line-height: 1.6;
  border: 1px solid var(--border);
}
.ai-result.grade-good {
  background: rgba(76,175,80,0.12);
  border-color: rgba(76,175,80,0.4);
  color: #81c784;
}
.ai-result.grade-ok {
  background: rgba(212,168,67,0.12);
  border-color: rgba(212,168,67,0.4);
  color: #ffd54f;
}
.ai-result.grade-bad {
  background: rgba(231,76,60,0.12);
  border-color: rgba(231,76,60,0.4);
  color: #ef9a9a;
}
.ai-result-header {
  font-family: 'Fraunces', serif;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ai-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-sub);
  font-size: 0.88rem;
  padding: 12px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.ai-spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--green-light);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==================== ANNOUNCEMENT BANNER ==================== */
.announcement-banner {
  position: fixed;
  top: 56px; left: 0; right: 0;
  z-index: 150;
  background: linear-gradient(135deg, var(--gold), #c8960a);
  color: #1a1000;
  padding: 10px 40px 10px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: 0 2px 12px rgba(212,168,67,0.4);
}
.announcement-banner button {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  color: #1a1000;
  opacity: 0.7;
  padding: 4px 8px;
}
.announcement-banner button:hover { opacity: 1; }

/* ==================== ADMIN TABS ==================== */
.admin-tab-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ==================== FILTER BAR ==================== */
.filter-bar {
  position: fixed;
  top: 56px; left: 0; right: 0;
  z-index: 98;
  padding: 5px 8px;
  background: rgba(15,26,14,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.filter-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  align-items: center;
}
.filter-scroll::-webkit-scrollbar { display: none; }
.filter-pill {
  flex-shrink: 0;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 5px 12px;
  font-size: 0.78rem;
  color: var(--text-sub);
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
  font-family: 'DM Sans', sans-serif;
}
.filter-pill.active {
  background: var(--green-main);
  color: var(--white);
  border-color: transparent;
}
.filter-pill:hover:not(.active) { background: rgba(74,124,63,0.2); }
.filter-sep {
  width: 1px;
  height: 18px;
  background: var(--border);
  flex-shrink: 0;
  margin: 0 2px;
}

/* ==================== STATUS BUTTONS ==================== */
.status-btn-row {
  display: flex;
  gap: 8px;
}
.status-btn {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
  color: var(--text-sub);
  font-size: 0.8rem;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.2s;
}
.status-btn:hover { background: rgba(255,255,255,0.1); }
.status-btn.active {
  background: var(--green-main);
  border-color: var(--green-main);
  color: var(--white);
  font-weight: 600;
}

/* ==================== COMMENTS ==================== */
.comment-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.comment-row {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.comment-name {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--green-light);
}
.comment-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 8px;
}
.comment-text {
  font-size: 0.85rem;
  color: var(--text-sub);
  margin-top: 4px;
  line-height: 1.5;
}
.comment-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.comment-form textarea {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-main);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  outline: none;
  resize: none;
  width: 100%;
}
.comment-form textarea:focus { border-color: var(--green-light); }

/* ==================== UIVERSE — ANIMATED TEXT INPUTS ==================== */
/* Animated underline on focus for all field-group inputs */
.field-group:before,
.field-group:after {
  content: "";
  left: 0; right: 0;
  position: absolute;
  pointer-events: none;
  bottom: 0;
  width: 100%;
}
.field-group:before {
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: border-bottom-color 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
  z-index: 3;
}
.field-group:after {
  border-bottom: 2px solid var(--green-light);
  transform: scaleX(0);
  transition: transform 250ms cubic-bezier(0, 0, 0.2, 1) 0ms;
  will-change: transform;
  z-index: 4;
}
.field-group:focus-within:before {
  border-bottom-color: rgba(125,184,116,0.35);
}
.field-group:focus-within:after {
  transform: scaleX(1);
}

/* Flat-bottom style for text/email/password/number/textarea (not file, not select) */
.field-group input:not([type="file"]),
.field-group textarea {
  border-radius: 5px 5px 0 0 !important;
  border-bottom: none !important;
  transition: background-color 200ms cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.2s !important;
}
.field-group select {
  border-radius: 5px 5px 0 0 !important;
  border-bottom: none !important;
}
.field-group:focus-within input:not([type="file"]),
.field-group:focus-within textarea,
.field-group:focus-within select {
  background-color: rgba(255,255,255,0.09) !important;
}

/* ==================== UIVERSE — LIQUID LOADER (sign-in only) ==================== */
.liquid-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 4px 0;
}
.loader-track {
  position: relative;
  width: 100%;
  height: 30px;
  background: linear-gradient(135deg, #1a2e18, #0f1a0e);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.6), 0 1px 3px rgba(255,255,255,0.05);
}
.liquid-fill {
  position: absolute;
  top: 2px; left: 2px;
  height: calc(100% - 4px);
  background: linear-gradient(90deg, #2d5a27, #4a7c3f, #7db874, #a3e583);
  border-radius: 13px;
  animation: wfFill 1.8s ease-in-out infinite alternate, wfColorShift 4s linear infinite;
  box-shadow: 0 0 10px rgba(74,124,63,0.5), inset 0 1px 2px rgba(255,255,255,0.15);
}
.liquid-loader .loading-text {
  color: var(--text-sub);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  animation: wfTextGlow 1s ease-in-out infinite;
}
.loader-dot {
  animation: wfBlink 1.5s infinite;
  margin-left: 1px;
}
.loader-dot:nth-child(1) { animation-delay: 0s; }
.loader-dot:nth-child(2) { animation-delay: 0.3s; }
.loader-dot:nth-child(3) { animation-delay: 0.6s; }

@keyframes wfFill {
  0%   { width: 4px; }
  100% { width: calc(100% - 4px); }
}
@keyframes wfColorShift {
  0%   { filter: hue-rotate(0deg) brightness(1); }
  50%  { filter: hue-rotate(20deg) brightness(1.12); }
  100% { filter: hue-rotate(0deg) brightness(1); }
}
@keyframes wfTextGlow {
  0%, 100% { opacity: 0.65; text-shadow: 0 0 8px rgba(74,124,63,0.3); }
  50%       { opacity: 1;    text-shadow: 0 0 14px rgba(74,124,63,0.6); }
}
@keyframes wfBlink {
  0%, 50%  { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* ==================== UIVERSE — BUTTON SWEEP HOVER ==================== */
/* Replaces the flat colour-swap hover with a smooth left-to-right sweep */
.btn-primary {
  background: linear-gradient(90deg, var(--green-light) 0%, var(--green-main) 50%, var(--green-main) 100%);
  background-size: 200% 100%;
  background-position: right center;
  transition: background-position 0.4s ease-in-out, transform 0.2s;
}
.btn-primary:hover { background-position: left center; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: linear-gradient(90deg, rgba(74,124,63,0.32) 0%, rgba(74,124,63,0.15) 50%, rgba(74,124,63,0.15) 100%);
  background-size: 200% 100%;
  background-position: right center;
  transition: background-position 0.4s ease-in-out;
}
.btn-secondary:hover { background-position: left center; }

.btn-danger {
  background: linear-gradient(90deg, rgba(192,57,43,0.38) 0%, rgba(192,57,43,0.15) 50%, rgba(192,57,43,0.15) 100%);
  background-size: 200% 100%;
  background-position: right center;
  transition: background-position 0.4s ease-in-out;
}
.btn-danger:hover { background-position: left center; }

/* ==================== UIVERSE — GLOW CARD (contact / about) ==================== */
/* Spinning gold-to-green animated border — applied to .glow-card class only */
.glow-card {
  position: relative !important;
  background: var(--panel-bg) !important;
  border: none !important;
  overflow: hidden;
  border-radius: 20px !important;
}
.glow-card::before {
  content: '';
  position: absolute;
  width: 100px;
  height: 130%;
  top: 50%;
  left: 50%;
  background-image: linear-gradient(180deg, var(--gold), var(--green-main));
  animation: wfRotate 3s linear infinite;
}
.glow-card::after {
  content: '';
  position: absolute;
  background: var(--panel-bg);
  inset: 4px;
  border-radius: 17px;
  z-index: 0;
}
.glow-card > * {
  position: relative;
  z-index: 1;
}
@keyframes wfRotate {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ==================== CONFIRM DIALOG ==================== */
.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: wfFadeIn 0.15s ease;
}
.confirm-box {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  max-width: 340px;
  width: 100%;
}
.confirm-msg {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.5;
  margin-bottom: 18px;
}
.confirm-actions {
  display: flex;
  gap: 10px;
}
.confirm-actions button { flex: 1; }
@keyframes wfFadeIn { from { opacity: 0; } to { opacity: 1; } }
