/* ============================================================
   EVERGLADES INVESTMENT CLUB — Main Stylesheet
   Design: Clean & Minimal | Navy + White
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --navy:        #1B2A4A;
  --navy-light:  #2E4170;
  --blue:        #2E6DA4;
  --blue-light:  #4A8FC1;
  --accent:      #3B82F6;
  --green:       #16A34A;
  --red:         #DC2626;
  --grey-50:     #F8F9FB;
  --grey-100:    #F1F3F6;
  --grey-200:    #E4E8EF;
  --grey-300:    #CBD2DC;
  --grey-500:    #6B7A99;
  --grey-700:    #3D4C68;
  --white:       #FFFFFF;
  --text:        #1B2A4A;
  --text-muted:  #6B7A99;
  --border:      #E4E8EF;
  --shadow-sm:   0 1px 3px rgba(27,42,74,0.08);
  --shadow-md:   0 4px 12px rgba(27,42,74,0.10);
  --shadow-lg:   0 8px 24px rgba(27,42,74,0.12);
  --radius:      8px;
  --radius-lg:   12px;
  --transition:  0.2s ease;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--grey-50);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--grey-100); }
::-webkit-scrollbar-thumb { background: var(--grey-300); border-radius: 3px; }

/* ============================================================
   LOGIN PAGE
   ============================================================ */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 50%, var(--blue) 100%);
  padding: 24px;
}

.login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 48px 40px 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo .logo-mark {
  width: 56px;
  height: 56px;
  background: var(--navy);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-size: 24px;
}

.login-logo h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.3px;
}

.login-logo p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--grey-700);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-group input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(46,109,164,0.12);
}

.btn-primary {
  width: 100%;
  padding: 11px;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-top: 8px;
  transition: background var(--transition), transform var(--transition);
  letter-spacing: 0.3px;
}

.btn-primary:hover { background: var(--navy-light); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.login-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: var(--red);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-top: 12px;
  display: none;
}

.login-disclaimer {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 24px;
  line-height: 1.5;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ============================================================
   LAYOUT — SIDEBAR + MAIN
   ============================================================ */

.app-layout {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  width: 220px;
  background: var(--navy);
  color: var(--white);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo .logo-mark {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.12);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 8px;
}

.sidebar-logo h2 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.sidebar-logo span {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar-nav {
  padding: 16px 0;
  flex: 1;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.35);
  padding: 12px 20px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: rgba(255,255,255,0.07);
  color: var(--white);
}

.nav-item.active {
  background: rgba(255,255,255,0.10);
  color: var(--white);
  border-left-color: var(--blue-light);
}

.nav-item .icon { font-size: 16px; width: 20px; text-align: center; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.user-avatar {
  width: 32px; height: 32px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}

.user-name { font-size: 13px; font-weight: 500; }
.user-role { font-size: 11px; color: rgba(255,255,255,0.4); }

.btn-logout {
  width: 100%;
  padding: 7px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.6);
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.btn-logout:hover { background: rgba(255,255,255,0.14); color: var(--white); }

/* MAIN CONTENT */
.main-content {
  margin-left: 220px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.top-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.top-bar-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.market-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: var(--grey-100);
}

.market-pill.up { background: #DCFCE7; color: var(--green); }
.market-pill.down { background: #FEE2E2; color: var(--red); }

.page-body {
  padding: 28px;
  flex: 1;
}

/* ============================================================
   COMPONENTS
   ============================================================ */

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

.page-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.4px;
}

.page-header p {
  color: var(--text-muted);
  margin-top: 4px;
  font-size: 13.5px;
}

/* CARDS */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

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

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}

.card-body { padding: 20px; }

/* STAT CARDS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.5px;
}

.stat-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.stat-change {
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
}
.stat-change.up { color: var(--green); }
.stat-change.down { color: var(--red); }

/* TABLES */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

thead th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
  background: var(--grey-50);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--grey-100);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--grey-50); }

/* BADGES */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.badge-buy    { background: #DCFCE7; color: #15803D; }
.badge-hold   { background: #FEF9C3; color: #A16207; }
.badge-sell   { background: #FEE2E2; color: #B91C1C; }
.badge-watch  { background: #EFF6FF; color: #1D4ED8; }
.badge-new    { background: #F3E8FF; color: #7E22CE; }
/* Everglades rating system */
.badge-ow     { background: #DCFCE7; color: #15803D; }       /* Overweight */
.badge-acc    { background: #DBEAFE; color: #1D4ED8; }       /* Accumulate */
.badge-spec   { background: #FEF3C7; color: #B45309; }       /* Speculative */
.badge-hspec  { background: #FEE2E2; color: #B91C1C; }       /* Highly Speculative */

/* SCORE PILL */
.score-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  background: var(--navy);
  color: var(--white);
  letter-spacing: 0.2px;
}

/* RANK BADGE */
.rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  background: var(--grey-100);
  color: var(--text-muted);
}

.rank.top { background: var(--navy); color: var(--white); }

/* TICKER */
.ticker-cell { display: flex; align-items: center; gap: 8px; }
.ticker-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--grey-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--navy);
}
.ticker-name { font-weight: 600; font-size: 13px; color: var(--navy); }
.ticker-full { font-size: 11px; color: var(--text-muted); }

/* CHANGE VALUES */
.change-up   { color: var(--green); font-weight: 600; }
.change-down { color: var(--red);   font-weight: 600; }

/* GRID LAYOUTS */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }

/* CALENDAR */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-header {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  padding: 8px 4px;
}

.cal-day {
  min-height: 80px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px;
  position: relative;
}

.cal-day.other-month { background: var(--grey-50); opacity: 0.5; }
.cal-day.today { border-color: var(--blue); border-width: 2px; }

.cal-day-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.cal-day.today .cal-day-num {
  color: var(--white);
  background: var(--navy);
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cal-event {
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 3px;
  margin-bottom: 2px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-event.earnings    { background: #DCFCE7; color: #15803D; }
.cal-event.macro       { background: #EFF6FF; color: #1D4ED8; }
.cal-event.central     { background: #FEF9C3; color: #A16207; }
.cal-event.ipo         { background: #F3E8FF; color: #7E22CE; }
.cal-event.regulatory  { background: #F3E8FF; color: #7E22CE; }
.cal-event.operational { background: #DBEAFE; color: #1E40AF; }
.cal-event.launch      { background: #FEF3C7; color: #B45309; }
.cal-event.governance  { background: #F1F5F9; color: #475569; }
.cal-event.ma          { background: #FCE7F3; color: #9D174D; }
/* Impact modifiers */
.cal-event.impact-critical { outline: 2px solid #DC2626; font-weight: 700; }
.cal-event.impact-high     { border-left: 3px solid currentColor; }

/* REPORT PAGE */
.report-hero {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 24px;
}

.report-hero .stock-name { font-size: 26px; font-weight: 700; letter-spacing: -0.5px; }
.report-hero .stock-sub  { font-size: 14px; color: rgba(255,255,255,0.6); margin-top: 2px; }
.report-meta { display: flex; gap: 24px; margin-top: 20px; flex-wrap: wrap; }
.report-meta-item label { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,0.45); display: block; margin-bottom: 3px; }
.report-meta-item span  { font-size: 15px; font-weight: 600; }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  text-decoration: none;
  transition: all var(--transition);
}
.btn:hover { background: var(--grey-50); border-color: var(--grey-300); }
.btn-navy  { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn-navy:hover { background: var(--navy-light); }

/* TABS */
.tabs {
  display: flex;
  gap: 2px;
  background: var(--grey-100);
  padding: 3px;
  border-radius: 8px;
  margin-bottom: 20px;
  width: fit-content;
}

.tab {
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  background: none;
  font-family: inherit;
}

.tab.active {
  background: var(--white);
  color: var(--navy);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* DISCLAIMER BOX */
.disclaimer {
  background: var(--grey-100);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 24px;
}

.disclaimer strong { color: var(--grey-700); }

/* ============================================================
   NEWS
   ============================================================ */

.news-item {
  display: block;
  padding: 13px 20px;
  border-bottom: 1px solid var(--grey-100);
  text-decoration: none;
  color: inherit;
  transition: background var(--transition);
}
.news-item:last-child { border-bottom: none; }
.news-item:hover { background: var(--grey-50); }

.news-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.news-ticker {
  display: inline-block;
  padding: 1px 7px;
  background: var(--navy);
  color: var(--white);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.news-source {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.news-date {
  font-size: 11px;
  color: var(--grey-300);
  margin-left: auto;
}

.news-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}
.news-item:hover .news-title { color: var(--blue); }

/* Filter buttons on news page */
.filter-btn {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-muted);
  transition: all var(--transition);
}
.filter-btn:hover {
  border-color: var(--grey-300);
  color: var(--text);
}
.filter-btn.active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .sidebar { width: 60px; }
  .sidebar-logo h2, .sidebar-logo span,
  .nav-item span, .nav-section-label,
  .sidebar-footer .user-name, .sidebar-footer .user-role,
  .btn-logout { display: none; }
  .nav-item { justify-content: center; padding: 12px; border-left: none; border-bottom: 3px solid transparent; }
  .nav-item.active { border-bottom-color: var(--blue-light); }
  .main-content { margin-left: 60px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .page-body { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
