/* ============================================================
   Beta Ideas Portal — Styling (Port 8900)
   ============================================================ */
:root {
  --bg-main: #0b0f19;
  --bg-card: rgba(17, 24, 39, 0.85);
  --bg-glass: rgba(31, 41, 55, 0.65);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(56, 189, 248, 0.35);
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-purple: #8b5cf6;
  --accent-blue: #3b82f6;
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Glassmorphism Panel */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
}

/* Top Navbar */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border-glass);
  background: rgba(11, 15, 25, 0.95);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 50;
}

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

.brand-icon {
  font-size: 1.6rem;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 10px;
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Navigation Tabs */
.tabs-nav {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  background: rgba(17, 24, 39, 0.6);
  border-bottom: 1px solid var(--border-glass);
  overflow-x: auto;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 0.55rem 1.15rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(59, 130, 246, 0.2));
  border-color: var(--accent-cyan);
  color: #38bdf8;
  font-weight: 700;
}

.btn-primary {
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  border: none;
  color: #ffffff;
  padding: 0.55rem 1.15rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: opacity 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-primary:hover {
  opacity: 0.9;
}

/* Main Container & Tab Content */
main {
  flex: 1;
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Modals — FIXED OVERLAY STYLING */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 1rem;
}

.modal-card {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 1.5rem;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.chat-input {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 0.6rem 0.8rem;
  font-size: 0.9rem;
  outline: none;
}

.chat-input:focus {
  border-color: var(--accent-cyan);
}

/* Badges */
.badge-winner {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--accent-emerald);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-unchosen {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--accent-amber);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

/* ============================================================
   Smart Calendar & Dropdown Selector Component
   ============================================================ */
.smart-date-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.date-dropdown {
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 0.55rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  min-width: 260px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.date-dropdown:hover, .date-dropdown:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.25);
}

.date-dropdown option {
  background: #111827;
  color: #f3f4f6;
  padding: 0.6rem;
}

.cal-popover-btn {
  padding: 0.55rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  white-space: nowrap;
}

.calendar-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 330px;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.85), 0 0 15px rgba(6, 182, 212, 0.15);
  border-radius: 12px;
  padding: 1rem;
  z-index: 9999;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: calFadeIn 0.18s ease-out;
}

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

.cal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-glass);
}

.cal-month-title {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.cal-nav-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.15s ease;
}

.cal-nav-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--accent-cyan);
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.cal-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.cal-day-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.82rem;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
  user-select: none;
}

/* Dates with Compiles -> Glowing highlighted! */
.cal-day-compiled {
  background: rgba(16, 185, 129, 0.22) !important;
  border: 1.5px solid #10b981 !important;
  color: #34d399 !important;
  font-weight: 800 !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
}

.cal-day-compiled::after {
  content: "";
  position: absolute;
  bottom: 3px;
  width: 5px;
  height: 5px;
  background: #34d399;
  border-radius: 50%;
  box-shadow: 0 0 6px #10b981;
}

.cal-day-compiled:hover {
  background: rgba(16, 185, 129, 0.38) !important;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.75);
  transform: scale(1.08);
}

/* Dates without compiles -> NOT highlighted */
.cal-day-empty {
  color: var(--text-muted);
  opacity: 0.4;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
}

.cal-day-empty:hover {
  opacity: 0.85;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Selected Day ring */
.cal-day-selected {
  outline: 2px solid #38bdf8 !important;
  outline-offset: 1px;
}

/* Other month days */
.cal-day-other-month {
  visibility: hidden;
  pointer-events: none;
}

/* Popover Legend */
.cal-legend {
  margin-top: 0.75rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--text-muted);
}

