body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: #f4f6f8;
}

header {
    background: #111;
    color: white;
    padding: 10px;
    text-align: center;
}
.login-container {
  max-width: 600px;
  margin: 120px auto;
  
}
h7 {
  font-size: 14px;
}
h8 {
  font-size: 10px;
}

.login-container input {
  display: block;
  width: 100%;
  padding: 10px;
  margin: 10px 0;
}

.login-error {
  color: red;
  margin-top: 10px;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px;
    background: #fff;
}

.filters input,
.filters select {
    padding: 8px;
    font-size: 14px;
}

.table-container {
    overflow-x: auto;
    padding: 15px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th, td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

th.sortable {
    cursor: pointer;
}

tr.positive {
    background: #e6f9e6;
}

tr.moderate {
    background: #fff8e1;
}

tr.negative {
    background: #ffe6e6;
}

tr.nocomps {
    background: #f0f0f0;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    align-items: center;
    justify-content: center;
    overflow-y: auto; /* 👈 allows scrolling */
    padding: 20px;    /* 👈 prevents content from touching edges */
}

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 20px;
    width: 90%;
    max-width: 700px;
    overflow-y: auto;
}

#closeModal {
    float: right;
    font-size: 22px;
    cursor: pointer;
}
.sort-arrow {
    margin-left: 4px;
    font-size: 12px;
}

.sort-asc {
    color: green;
}

.sort-desc {
    color: red;
}
.filter-group {
  display: flex;
  flex-direction: column;
}

.filter-group label {
  font-size: 12px;
  margin-top: 4px;
  color: #555;
}


.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px;
}

.page-header {
  text-align: center;
  margin: 40px 0 20px;
}

.subtitle {
  opacity: 0.7;
}

.card {
  background: #111;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.4);
}

.input-card {
  max-width: 900px;
  margin: 0 auto 40px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.full-width {
  grid-column: 1 / -1;
}

label {
  font-size: 13px;
  margin-bottom: 6px;
  opacity: 0.7;
}

input, select {
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #333;
  background: #ffffff;
  color: #111;
}

.primary-btn {
  margin-top: 20px;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  background: #1db954;
  color: black;
  font-weight: bold;
  cursor: pointer;
}

.primary-btn:disabled {
  opacity: 0.5;
}

.summary-card h2 {
  font-size: 32px;
}

.summary-metrics {
  display: flex;
  gap: 30px;
  margin-top: 15px;
}

.metric {
  font-size: 18px;
}

.green {
  color: #1db954;
}

.red {
  color: #ff4d4d;
}

.loading {
  margin-top: 15px;
  text-align: center;
}
.loading-overlay {
  text-align: center;
  padding: 40px;
  font-size: 20px;
  font-weight: bold;
}
.error-card {
  text-align: center;
  background: #2a0f0f;
  color: #ff8080;
}

.hidden {
  display: none;
}

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #333;
}
/* ======================================
   ANALYSIS PAGE - MATCH DEALS STYLING
====================================== */

.analysis-page input,
.analysis-page select {
  max-width: 100%;
  height: 28px;
  padding: 3px 6px;
  font-size: 13px;
  background: #ffffff;
  color: #222;
  border: 1px solid #ddd;
}

.analysis-page input:focus,
.analysis-page select:focus {
  border-color: #1db954;
  box-shadow: none;
}

.analysis-page .card {
  background: #ffffff;
  border: 1px solid #e6e6e6;
}

.analysis-page .summary-metrics {
  display: flex;
  gap: 20px;
  margin-top: 10px;
}

.analysis-page .metric {
  font-weight: 500;
}

.analysis-page .green {
  color: #1db954;
}

.analysis-page .red {
  color: #d64545;
}
/* ===== INLINE FORM ROWS ===== */

.analysis-page .form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 10px;
}

.analysis-page .form-field {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 280px;
}

/* label inline */
.analysis-page .form-field label {
  min-width: 110px;
  font-size: 13px;
  font-weight: 600;
}

/* tighter inputs */
.analysis-page .form-field input,
.analysis-page .form-field select {
  flex: 1;
  height: 28px;
}
/* =====================================
   HEADER NAVIGATION
===================================== */

.header-menu {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
}

.menu-left {
  display: flex;
  gap: 12px;
}

.menu-right {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px; 
}
.menu-right label {
  font-size: 12px;
  margin-bottom: 4px;
  color: #555;
}

.menu-btn {
  background: #ffffff;
  color: #000000;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: 0.2s ease;
}

.menu-btn:hover {
  background: #f2f2f2;
}

.logout-btn {
  margin-left: 0;
}
.menu-btn.active {
  background: #000;
  color: #fff;
}
/* ======================================
   ANALYZER DASHBOARD LAYOUT (SCOPED)
====================================== */



/* INPUT GROUP */
.analysis-page .input-group {
  display: flex;
  flex-direction: column;
}

.analysis-page label {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}


/* SECTION HEADERS */
.analysis-page .section-title {
  display: block;
  width: 100%;
  background: #000;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  padding: 6px 10px;
  margin: 15px 0 10px;
  border-radius: 4px;
}

/* RESULTS PANEL */

/* RESULT ITEMS */
.analysis-page .results-panel div {
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 600;
}

/* PROFIT POP */
.analysis-page #profit {
  font-size: 26px;
}

/* ROI COLORS */
.analysis-page .roi-good {
  color: #22c55e;
  font-weight: bold;
}

.analysis-page .roi-bad {
  color: #ef4444;
  font-weight: bold;
}
.analysis-page .result-item {
  margin-bottom: 14px;
}

.analysis-page .result-item span {
  font-size: 12px;
  opacity: 0.7;
}

.analysis-page .result-item div {
  font-size: 20px;
  font-weight: 600;
}

/* Make profit pop */
.analysis-page #profit {
  font-size: 28px;
  color: #22c55e;
}
/* ===== ANALYSIS LAYOUT ===== */

.analysis-page .analysis-layout {
  display: flex;
  gap: 20px;
  padding: 20px;
}

/* LEFT SIDE */
.analysis-page .analysis-left {
  flex: 0 0 500px;
}

/* RIGHT SIDE */
.analysis-page .analysis-right {
  flex: 0 0 300px;
}

.analysis-page .analysis-extra {
  flex: 0 0 300px;  
}

/* RESULTS CARD */
.analysis-page .results-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 18px;
  border: 1px solid #ddd;
}

/* HEADER */
.analysis-page .results-card h3 {
  margin-bottom: 12px;
  font-size: 18px;
}

/* RESULT ROW */
.analysis-page .result-row {
  width: 280px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px; /* 🔥 tighter */
}

/* LABEL */
.analysis-page .result-row span {
  font-size: 14px;
  color: #555;
}

/* VALUE */
.analysis-page .result-row div {
  font-size: 14px;
  font-weight: 600;
}

/* PROFIT */
.analysis-page #profit {
  font-size: 20px;
  color: #16a34a;
}

/* ROI COLORS */
.analysis-page .roi-good {
  color: #16a34a;
}

.analysis-page .roi-bad {
  color: #dc2626;
}

.analysis-page .form-grid {
  grid-template-columns: repeat(2, 320px);
  justify-content: start;
}

.analyzeFlipBtn,
.analyzeRentBtn {
  font-size: 12px;
  padding: 4px 8px;
  margin-right: 4px;
  border-radius: 4px;
  cursor: pointer;
}

.analyzeFlipBtn {
  background: black;
  color: white;
}

.analyzeRentBtn {
  background: white;
  border: 1px solid black;
  color: black;
}
/* =========================================
   Modal Tab Buttons (Sales / Rental Comps)
   ========================================= */

.modal-tabs {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.modal-tabs .tabBtn {
  padding: 0.5rem 1rem;
  font-weight: bold;
  font-size: 0.9rem;
  cursor: pointer;
  border: 2px solid #333;
  border-radius: 4px;
  background-color: #fff; /* inactive background */
  color: #333;            /* inactive text */
  transition: background-color 0.15s ease, color 0.15s ease;
}

/* Active tab style — highlighted */
.modal-tabs .tabBtn.active {
  background-color: #333; /* dark background like header menu */
  color: #fff;            /* white text */
  border-color: #333;
}

/* Hover state (optional) */
.modal-tabs .tabBtn:hover:not(.active) {
  background-color: #f0f0f0;
}

/* Highlight ARV / Rental flag comps */
.highlight-comp {
  font-weight: bold;
  background-color: #f8f8f8;
}
/* ======================================
   MOBILE OPTIMIZATION (ANALYZER)
====================================== */

@media (max-width: 768px) {

  .analysis-page .analysis-layout {
    flex-direction: column;
  }

  .analysis-page .analysis-right {
    order: -1; /* results move to top */
  }

  .analysis-page .results-card {
    margin-bottom: 15px;
  }
  .analysis-page .form-grid {
    grid-template-columns: 1fr;
  }
    
.result-row.clickable {
  cursor: pointer;
  transition: all 0.2s ease;
}

.result-row.clickable:hover {
  background: #f3f4f6;
  transform: translateY(-1px);
}

.result-row.clickable:hover span {
  text-decoration: underline;
  color: #2563eb;
}
    
.info-icon {
  font-size: 12px;
  margin-left: 6px;
  color: #6b7280;
}
}
    /* ===============================
   FOOTER
================================ */

.site-footer {
  background: #000;
  color: #fff;
  text-align: center;
  padding: 8px 15px;
  font-size: 12px;
  margin-top: 30px;
}

.site-footer a {
  color: #fff;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}
