/* =========================
   Base / Reset
========================= */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f6f7f9;
  color: #222;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Ensures the form doesn't take up extra space */
form {
    display: inline-block;
    margin-bottom: 0;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  padding-top: 20px;
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
  padding-top: 10px;
}

/* h6 {
  margin-bottom: 0px;
} */


/* =========================
   Header / Branding
========================= */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #ddd;
  padding: 16px 0;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 40px;
  height: 40px;
  background: #2e7d32;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
}

.title .main-title {
  font-size: 24px;
  font-weight: 600;
}

.title .subtitle {
  font-size: 18px;
  color: #666;
}

/* =========================
   Navigation
========================= */
#nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
}

.nav {
  display: flex;
  gap: 16px;
}

.nav a {
  text-decoration: none;
  color: #2563eb;
  font-weight: 500;
}

.nav a:hover {
  text-decoration: underline;
}

/* =========================
   Content
========================= */
.content {
  padding: 24px;
  padding-top: 0px;
}

/* =========================
   Tables
========================= */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

th,
td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

table tbody tr:nth-child(even) {
  background-color: #f4f8ff;
}

table tbody tr:nth-child(odd) {
  background-color: #ffffff;
}

table thead th {
  background-color: #f0f0f0;
  font-weight: 600;
}

/* =========================
   Cards and Metrics
========================= */

.stock-card {
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  /* padding: 0.75rem 1rem; */
  height: 100%;
}

.stock-card-header {
  padding: 0.5rem 1rem;
  border-top-left-radius: 0.75rem;
  border-top-right-radius: 0.75rem;
  background: #f5f7fa; /* default fallback */
}

.stock-card .card-body {
  padding: 0.75rem 1rem 1rem;
}




/* .header-valuation {
  background: linear-gradient(135deg, #b9c6d6, #e3e9f1);
}

.header-technical {
  background: linear-gradient(135deg, #b9d6c6, #e3f1ea);
}

.header-balance {
  background: linear-gradient(135deg, #c1b6d6, #e9e5f2);
}


.header-growth {
  background: linear-gradient(135deg, #d0c0a3, #efe8da);
} */

/* Header colors - Solid and Muted */
.header-valuation { background-color: #e0f2fe; color: #0369a1; border-left: 4px solid #0ea5e9; }
.header-technical { background-color: #f0fdf4; color: #15803d; border-left: 4px solid #22c55e; }
.header-balance   { background-color: #faf5ff; color: #7e22ce; border-left: 4px solid #a855f7; }
.header-growth    { background-color: #fffbeb; color: #b45309; border-left: 4px solid #f59e0b; }


.card-section-title {
  font-size: 1.1rem;
  /* letter-spacing: 0.08em; */
  color: #6c757d;
  margin-bottom: 1px;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
  font-size: 0.9rem;
}

.metric-label {
  color: #555;
}

.metric-value {
  font-weight: 600;
}

.metric-row + .metric-row {
  border-top: 1px dashed #eee;
}


/* Trash can icon button */

.icon-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  line-height: 1;
  color: inherit;
}
.icon-btn:hover {
  opacity: 0.7;
}
.icon-btn:focus {
  outline: none;
  box-shadow: none;
}


/* =========================
   Charts
========================= */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  /* margin-top: 1rem; */
}

.chart-card {
  width: 100%;
  max-width: 100%;
  /* aspect-ratio: 4 / 3; */
  margin: 0 auto;
  background-color: #ffffff;  /* white background */
  border-radius: 12px;        /* rounded corners */
  padding: 0 1rem;              /* inner spacing */
  box-shadow: 0 2px 6px rgba(0,0,0,0.1); /* optional soft shadow */

}




/* =========================
   Footer
========================= */
.site-footer {
  background: #ffffff;
  border-top: 1px solid #ddd;
  padding: 12px 0;
  font-size: 13px;
  color: #666;
  text-align: center;
}

/* =========================
   Mobile Navigation
========================= */
@media (max-width: 768px) {
  #nav-toggle {
    display: block;
  }

  .nav {
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.2s ease;
    margin-top: 12px;
  }

  .nav.active {
    max-height: 500px; /* big enough to show all links */
    opacity: 1;
  }

  .nav a {
    margin: 8px 0;
  }

  .brand {
    width: 100%;
    justify-content: space-between;
  }
}


/* Home page formatting */
.signals-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .signals-grid {
        grid-template-columns: 1fr;
    }
}

.signals h2 {
    margin-bottom: 0.5rem;
}

.table-card {
    background-color: #ffffff;  /* white background */
    border-radius: 12px;        /* rounded corners */
    padding: 0.5rem 1rem 1rem 1rem;              /* inner spacing */
    box-shadow: 0 2px 6px rgba(0,0,0,0.1); /* optional soft shadow */
}

/* .table-card h2 {
  margin-top: 0;
} */


table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th, td {
    padding: 0.4rem 0.5rem;
    border-bottom: 1px solid #ddd;
}

th {
    text-align: left;
    font-weight: 600;
}

th.num,
td.num {
    text-align: right;
    white-space: nowrap;
}

td.wl {
  font-size: 0.75rem;
}


/* Signal strength */
.signal-strong-buy {
    color: #1a7f37;
    font-weight: 600;
}

.signal-agree-buy {
    color: #a8e6a1;
    font-weight: 600;
}

.signal-strong-sell {
    color: #b42318;
    font-weight: 600;
}

.signal-agree-sell {
    color: #f5a6a6;
    font-weight: 600;
}

.signal-not-agree {
    color: #FFB84D;
    font-weight: 600;
}


/* Links */
td a {
    color: #0366d6;
    text-decoration: none;
}

td a:hover {
    text-decoration: underline;
}
