/* DESIGN SYSTEM */

body {
  background: #f7f8fa;
  font-family: Arial, sans-serif;
  margin: 0;
  color: #1a1a1a;
}

/* ===== DASHBOARD CORE SYSTEM ===== */

.btn-primary {
  display: block;
  width: 100%;

  padding: 10px;
  border-radius: 6px;

  text-align: center;
  text-decoration: none;
  font-weight: 500;

  border: 1px solid #ccc;
  background: transparent;
  color: #111;
}

.btn-primary:hover {
  background: #333;
}





/* =========================
   RESET / BASE
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: #f4f6f8;
  color: #111;
  line-height: 1.5;
}


/* =========================
   HEADER
========================= */
.main-header {
  background: #1e3a8a;
  color: white;
  padding: 25px;
  text-align: center;
}

.main-header nav {
  margin-top: 10px;
}

.main-header nav a {
  color: #c7d2fe;
  text-decoration: none;
  margin: 0 10px;
  font-size: 14px;
}


/* =========================
   GLOBAL BUTTON SYSTEM
========================= */
.btn {
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  color: white;
  font-weight: 600;
  display: inline-block;
  border: none;
  cursor: pointer;
  transition: 0.2s ease;

}

/* =========================
   PAGE CONTAINER
========================= */
.contractor-profile,
.contractors-page,
.dashboard-page {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 20px;
}


/* =========================
   HERO SECTION
========================= */
.hero {
  display: flex;
  gap: 30px;
  background: white;
  padding: 25px;
  border-radius: 12px;
  align-items: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.profile-img {
  width: 260px;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
}

.hero-info h2 {
  font-size: 26px;
  margin-bottom: 10px;
}

.specialty {
  color: #6b7280;
  margin-bottom: 12px;
}

.hero-info p {
  margin-bottom: 6px;
}


/* =========================
   PROFILE DETAILS
========================= */
.profile-details {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 20px;
  margin-top: 25px;
}

.about,
.services,
.portfolio {
  background: white;
  padding: 20px;
  border-radius: 12px;
}

.services ul {
  padding-left: 18px;
}

.portfolio-grid {
  display: grid;
  gap: 10px;
}

.portfolio-grid img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
}

/* =========================
   DASHBOARD
========================= */
.dashboard-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.estimate-btn {
  background: #2563eb;
  color: white;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
}



.secondary-btn {
  background: #eef2ff; /* soft blue tint */
  color: #3b82f6;
  border: none;
  padding: 14px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

.primary-btn:hover {
  background: #2f49d1;
}

.secondary-btn:hover {
  background: #e0e7ff;
}
/* =========================
   PROGRESS SYSTEM
========================= */
.stage-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
}


.progress-list li.completed .stage-icon {
  background: #16a34a;
  border-color: #16a34a;
  color: white;
}

.progress-list li.active .stage-icon {
  border-color: #1a73e8;
  background: #eef4ff;
}


/* =========================
   COST / BUDGET
========================= */
.cost-breakdown {
  margin-top: 20px;
}

#costList li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.total-cost {
  margin-top: 12px;
  color: #1a73e8;
}

.budget-bar {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 6px;
  margin-top: 6px;
}

.budget-fill {
  height: 100%;
  width: 0%;
  border-radius: 6px;
  background: #16a34a;
}

#insightsList li {
  margin-bottom: 6px;
}


/* =========================
   FOOTER
========================= */
footer {
  text-align: center;
  margin: 40px 0;
  color: #555;
}


/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    text-align: center;
  }

  .profile-details {
    grid-template-columns: 1fr;
  }
}

/* =========================
   PAGE CENTERING + CARD
========================= */

.home-page,
.form-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
}

.home-card,
.form-card {
  background: white;
  padding: 30px;
  width: 420px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  text-align: center;
}


/* =========================
   BUTTON SYSTEM (UNIFIED)
========================= */

.home-btn,
.form-btn {
  display: inline-block;
  margin-top: 15px;
  padding: 12px 18px;
  background: #2563eb;
  color: white;
  border-radius: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  transition: 0.2s ease;
}

.home-btn:hover,
.form-btn:hover {
  background: #1d4ed8;
}


/* =========================
   FORM STRUCTURE
========================= */

.form-card form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-card input {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 14px;
}

/* =========================
   CONTRACTOR LIST LAYOUT (FINAL)
========================= */
#contractorList {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}



/* =========================
   CARD LAYOUT (IMAGE + INFO)
========================= */
.card-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

/* =========================
   IMAGE (PASSPORT STYLE)
========================= */
.card-img {
  width: 70px;
  height: 70px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

/* =========================
   CONTENT AREA
========================= */
.card-info {
  flex: 1;
}

/* =========================
   TEXT STYLES
========================= */
.card-info h3 {
  font-size: 17px;
  margin-bottom: 4px;
}

.card-info span {
  font-size: 12px;
  font-weight: 600;
  color: #3b82f6;
  display: inline-block;
  margin-bottom: 6px;
}

/* =========================
   BADGE
========================= */
.badge {
  display: inline-block;
  margin: 4px 0;
  padding: 3px 10px;
  font-size: 11px;
  border-radius: 20px;
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 600;
}

/* =========================
   PRICE
========================= */
.price {
  font-size: 16px;
  font-weight: bold;
  color: #16a34a;
  margin: 6px 0;
}

/* =========================
   LOCATION
========================= */
.location {
  font-size: 13px;
  color: #6b7280;
  margin: 2px 0;
}

/* =========================
   EXPERIENCE
========================= */
.meta {
  font-size: 12px;
  color: #6b7280;
  margin-top: 3px;
}



/* =========================
   RECOMMENDED TOOLTIP
========================= */
.badge {
  position: relative;
  cursor: pointer;
}

.badge .tooltip {
  position: absolute;
  top: 130%;
  left: 0;

  width: 190px;
  background: #111827;
  color: white;
  font-size: 11px;
  padding: 8px;
  border-radius: 6px;
  line-height: 1.4;

  box-shadow: 0 6px 14px rgba(0,0,0,0.2);

  /* 🔥 animation fix */
  opacity: 0;
  pointer-events: none;
  transform: translateY(5px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.badge:hover .tooltip {
  opacity: 1;
  transform: translateY(0);
}

.badge.cheap .tooltip {
  background: #064e3b; /* dark green */
}

/* =========================
   BUDGET BADGES
========================= */

.badge.cheap {
  background: #fef3c7;
  color: #92400e;
}

.badge.within {
  background: #ecfdf5;
  color: #166534;
  font-weight: 500;
  font-size: 11px;
  padding: 3px 8px;
  opacity: 0.85;
}

.badge.over {
  background: #fee2e2;
  color: #991b1b;
}

.badge {
  position: relative; /* REQUIRED for tooltip positioning */
  display: inline-block;
}

/* Tooltip hidden by default */
.badge .tooltip {
  display: none;
  position: absolute;
  top: 120%;
  left: 0;

  width: 180px;
  background: #111827;
  color: white;
  font-size: 11px;
  padding: 8px;
  border-radius: 6px;

  z-index: 10;
}

/* Show ONLY on hover */
.badge:hover .tooltip {
  display: block;
}

.badge .tooltip {
  opacity: 0;
  transform: translateY(5px);
  transition: all 0.2s ease;
}

.badge:hover .tooltip {
  opacity: 1;
  transform: translateY(0);
  display: block;
}

/* =========================
 ELITE PAINTERS CONTRACTORS PROFILE
========================= */
.contractor-profile {
  padding: 30px;
}

.hero {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.profile-img {
  width: 150px;
  height: 150px;
  border-radius: 16px;
  object-fit: cover;
}

.hero-info h2 {
  margin-bottom: 6px;
}

.specialty {
  color: #3b82f6;
  font-weight: bold;
}

.buttons {
  margin: 10px 0;
}

.btn {
  display: inline-block;
  padding: 10px 14px;
  margin-right: 8px;
  border-radius: 8px;
  text-decoration: none;
  color: white;
}

.call {
  background: #16a34a;
}

.whatsapp {
  background: #25D366;
}

.profile-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.portfolio-grid img {
  width: 100%;
  border-radius: 10px;
}


/* =========================
 ELITE PAINTERS CONTRACTORS PROFILE
========================= */
.contractor-profile {
  padding: 40px;
  max-width: 1100px;
  margin: auto;
}

/* HERO CARD */
.hero {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 30px;
  align-items: center;

  background: #ffffff;
  padding: 25px;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

/* IMAGE */
.profile-img {
  width: 180px;
  height: 180px;
  border-radius: 16px;
  object-fit: cover;
}

/* TEXT SIDE */
.hero-info h2 {
  margin-bottom: 6px;
}

.specialty {
  color: #3b82f6;
  font-weight: 600;
  margin-bottom: 10px;
}

/* SPACE OUT INFO */
.hero-info p {
  margin: 6px 0;
}

/* BUTTONS ROW */
.buttons {
  margin-top: 12px;
  display: flex;
  gap: 10px;
}

/* =========================
   CONTRACTOR PROFILE PAGE
========================= */

.contractor-profile {
  max-width: 1000px;
  margin: 40px auto;
  padding: 20px;
}

.hero {
  display: flex;
  gap: 25px;
  align-items: flex-start;
  background: #fff;
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.profile-img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 20px;
}

.hero-info {
  flex: 1;
}

.buttons {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.profile-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 25px;
}

.profile-details div {
  background: #fff;
  padding: 15px;
  border-radius: 12px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.portfolio-grid img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
}

.hero {
  display: flex;
  gap: 25px;
  align-items: center;
  background: #fff;
  padding: 25px;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.profile-img {
  width: 120px;
  height: 120px;
  border-radius: 16px;
  object-fit: cover;
}

.hero-middle {
  flex: 1;
}

.hero-middle h2 {
  margin-bottom: 4px;
}

.specialty {
  color: #2563eb;
  margin-bottom: 10px;
}

.hero-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 10px 16px;
  min-height: 42px;

  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;

  text-decoration: none;
  border: none;
  cursor: pointer;

  white-space: nowrap;
}

.view-btn {
  opacity: 1 !important;
  pointer-events: auto !important;
   background: #2563eb;
  cursor: pointer;
}


/* ===== MAIN CONTAINER ===== */

.contractor-list {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
}

/* ===== CONTRACTOR CARD ===== */

.contractor-card {
  display: flex;
  gap: 14px;
  background: #fff;
  padding: 14px 16px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin-bottom: 16px;
  align-items: center;
}

.contractor-card img {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
}

.contractor-hero {
  background: #1f3b64;
  color: white;
  padding: 30px 20px;
}

.contractor-hero h1 {
  margin-bottom: 5px;
}

.search-box input {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: none;
  margin-top: 15px;
}

input[type="search"],
.search-bar 

.search-bar {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  display: block;

  padding: 12px 16px;
  border-radius: 10px;
  border: none;
  outline: none;
}

.specialty-filter {
  display: flex;
  gap: 10px;
  padding: 15px;
  overflow-x: auto;
}

.specialty-filter button {
  padding: 8px 14px;
  border-radius: 20px;
  border: none;
  background: #eee;
}

.specialty-filter .active {
  background: #1f3b64;
  color: white;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin-bottom: 10px;
}

.verified {
  color: green;
  font-size: 14px;
  margin-left: 5px;
}

.role {
  color: #666;
  margin-bottom: 5px;
}

.rating {
  margin-bottom: 15px;
}

.profile-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
}

.profile-stats div {
  background: #f5f5f5;
  padding: 10px;
  border-radius: 10px;
  width: 30%;
  text-align: center;
}

.profile-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.profile-actions a {
  flex: 1;
  text-align: center;
  padding: 12px;
  border-radius: 10px;
  text-decoration: none;
}

.secondary-btn {
  border: 1px solid #ccc;
  color: #333;
}

/* ===== TEXT HIERARCHY ===== */

.info h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.info .role {
  margin: 2px 0;
  color: #6b7280;
  font-size: 13px;
}

.info p {
  margin: 2px 0;
  font-size: 13px;
  color: #444;
}
/* ===== ACTION BUTTONS ===== */

.actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.actions a {
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  background: #eef2ff;
  color: #1e3a8a;
  font-weight: 500;
  transition: 0.2s;
}

.actions a:hover {
  background: #dbe3ff;
}

/* ===== CARD WIDTH CONTROL ===== */

.contractor-card {
  width: 100%;
}

/* ===== RESPONSIVE GRID ===== */

@media (min-width: 768px) {
  .contractor-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}

.contractor-list {
  margin-top: 30px;
  padding: 0 16px;
}

@media (max-width: 768px) {
  .contractor-list {
    grid-template-columns: 1fr;
  }
}

/* ===== ESTIMATE HEADER ===== */
.estimate-header + * {
  margin-top: 30px;
}

.estimate-header h1 {
  margin-bottom: 10px;
}

/* ===== FORM ===== */
.estimate-header {
  background: #2f4a6d;
  color: white;
  padding: 40px 20px;
  text-align: center;
}

.estimate-header p {
  opacity: 0.9;
  margin-bottom: 20px;
}

.form-section {
  background: #fff;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 16px;
}

/* ===== OPTIONS ===== */
.options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.options button {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #ddd;
  background: #f9f9f9;
}

/* ===== CTA ===== */
.submit-btn {
  width: 100%;
  padding: 14px;
  background: #f59e0b;
  border: none;
  border-radius: 10px;
  color: white;
  font-weight: bold;
}

/* ===== SUBTEXT (LIGHT GREY TEXT) ===== */
.subtext {
  color: #6b7280;   /* soft grey */
  font-size: 14px;
  margin-top: 4px;
}

/* ===== DASHBOARD ===== */

.dashboard-container {
  max-width: 800px;
  margin: auto;
  padding: 20px;
}

/* HEADER */
.dashboard-header h2 {
  margin: 0;
}

.dashboard-header p {
  color: #888;
}

/* UPDATES */
.update-item {
  background: white;
  padding: 12px;
  border-radius: 10px;
  margin-top: 10px;
}

.contractor-list {
  max-width: 700px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contractor-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* BEDROOM FLOOR HIGHLIGHT */
button.active {
  background-color: #2d4ef5;
  color: white;
  border: none;
}

/* ===== ESTIMATE RESULT ===== */

.estimate-result {
  padding: 20px;
}

/* RESULT CARD */
.result-card {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  margin-top: -40px; /* 👈 pulls it upward */
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  position: relative;
  z-index: 2;
}

.result-card h1 {
  font-size: 32px;
  margin: 10px 0;
}

.section-spacing {
  margin-top: 20px;
}

.secondary-btn {
  background: #eee;
  border: none;
  padding: 12px;
  border-radius: 10px;
}

.secondary-btn.full {
  width: 100%;
}

.result-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

/* STAGES */
.stage-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  margin: 20px auto;              /* spacing between cards */
  max-width: 720px;              /* controls width (IMPORTANT) */
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);  /* floating effect */
  border: 1px solid #eee;
}
.stage-wrapper {
  max-width: 760px;
  margin: 0 auto;
}

.section-spacing {
  margin-top: 20px;
}

.materials-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.material-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.material-item:last-child {
  border-bottom: none;
}

.chart-container {
  max-width: 260px;
  margin: 20px auto;
}

.chart-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.amount {
  float: right;
}

/* MATERIALS */
.material-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

/* CTA */
.estimate-actions {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px; /* 👈 THIS CREATES CLEAN SPACE */
}

/* ===== STAGE HEADER ===== */
.stage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stage-header-main {
  font-weight: 600;
  font-size: 16px;
}

.stage-header-sub {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}

.stage-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stage-financial {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
}

.stage-sub {
  color: #6b7280;
  font-weight: 400;
  margin-left: 4px;
}

.stage-variance {
  margin-left: 10px;
  font-weight: 600;
}

.stage-variance.over {
  color: #dc2626;
}

.stage-variance.under {
  color: #16a34a;
}

/* ===== QUICK TIPS ===== */
.quick-tips {
  margin-top: 12px;
  background: #f9fafb;
  padding: 12px;
  border-radius: 10px;
}

.tips-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.quick-tips ul {
  padding-left: 18px;
  margin: 0;
}

.quick-tips li {
  margin-bottom: 4px;
  font-size: 14px;
}


/* ===== LAYOUT CONTAINER ===== */

.estimate-result {
  max-width: 720px;   /* controls card width */
  margin: 0 auto;     /* centers everything */
  padding: 20px;
}

.estimate-card {
  position: relative;
  z-index: 2;
  margin-top: -40px;   /* pulls it upward slightly */
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* ===== STAGE COLORS ===== */

.stage-card.foundation .progress-fill {
  background: #2b4c7e; /* blue */
}

.stage-card.walls .progress-fill {
  background: #f97316; /* orange */
}

.stage-card.roofing .progress-fill {
  background: #10b981; /* green */
}

.stage-card.windows .progress-fill {
  background: #facc15; /* yellow */
}

.stage-card.finishing .progress-fill {
  background: #ef4444; /* red */
}

.stage-card {
  position: relative;
  overflow: hidden;
}

.stage-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  width: 100%;
}

.stage-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.materials-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

body {
  background: #f5f7fb;
}

/* Match colors */
.stage-card.foundation::before { background: #2b4c7e; }
.stage-card.walls::before { background: #f97316; }
.stage-card.roofing::before { background: #10b981; }
.stage-card.windows::before { background: #facc15; }
.stage-card.finishing::before { background: #ef4444; }

/* ===== CONTRACTOR PROFILE ===== */

.profile-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.profile-image {
  width: 100%;
  max-width: 300px;
  border-radius: 12px;
  margin-bottom: 15px;
}

.profile-meta {
  color: #777;
  margin-bottom: 10px;
}

.price {
  color: #3b5bfd;
  margin: 10px 0;
}

.profile-description {
  font-size: 14px;
  color: #555;
  margin-bottom: 20px;
}

.contractor-hero {
  background: #2f4a6d;
  padding: 50px 20px 60px;
}

.hero-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  color: white;
}

.hero-content h1 {
  margin-bottom: 10px;
}

.hero-content p {
  margin-bottom: 20px;
  opacity: 0.9;
}

/* HERO */
.contractor-hero {
  background: #2f4a6d;
  padding: 20px 16px; /* MUCH tighter */
}

.hero-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  color: white;
}

/* CONTENT */
.contractor-content {
  padding: 30px 16px;
}

/* FILTER */
.specialty-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin-bottom: 20px;
}

.specialty-tabs span {
  padding: 10px 16px;
  background: #eee;
  border-radius: 20px;
  white-space: nowrap;
  cursor: pointer;
}

.specialty-tabs .active {
  background: #2f4a6d;
  color: white;
}

/* CARD SPACING */
.contractor-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ===== CLEAN CONTRACTOR PAGE STYLES ===== */

/* HERO */
.contractor-hero {
  background: #2f4a6d;
  padding: 50px 20px 60px;
}

.hero-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  color: white;
}

.hero-content h1 {
  margin-bottom: 6px;
  font-size: 28px;
}

.hero-content p {
  margin-bottom: 15px;
  font-size: 14px;
  opacity: 0.9;
}

.search-bar {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  display: block;
  padding: 14px;
  border-radius: 10px;
  border: none;
  font-size: 14px;
}

/* MAIN CONTENT */
.contractor-content {
  padding: 30px 16px;
}

/* FILTER TABS */
.specialty-tabs {
  display: flex;
  justify-content: center;   /* CENTER THEM */
  gap: 10px;
  flex-wrap: wrap;           /* allow wrapping */
  margin-bottom: 20px;
}

.specialty-tabs span {
  padding: 8px 14px;
  background: #eee;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
}

.specialty-tabs .active {
  background: #2f4a6d;
  color: white;
}

/* CONTRACTOR LIST */
.contractor-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* CONTRACTOR CARD (CONTROLLED VERSION) */
.contractor-card {
  display: flex;
  gap: 15px;
  padding: 16px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  align-items: center;
}

/* IMAGE */
.contractor-card .avatar {
  width: 70px;
  height: 70px;
  border-radius: 10px;
  object-fit: cover;
}

/* INFO */
.contractor-card .info {
  flex: 1;
}

.contractor-card h3 {
  margin: 0;
}

.contractor-card .role {
  color: gray;
  font-size: 14px;
  margin-bottom: 5px;
}

/* ACTION BUTTONS */
.contractor-card .actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.contractor-card .actions a {
  padding: 6px 10px;
  background: #f0f2f5;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
}

/* PROFILE PAGE */
.profile-page {
  padding: 20px 16px 80px;
}

/* HERO */
.profile-card {
  text-align: center;
  background: white;
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 10px;
}

.verified {
  color: green;
  font-size: 14px;
}

.role {
  color: gray;
  margin-bottom: 5px;
}

.rating {
  font-size: 14px;
}

/* STATS */
.profile-stats {
  display: flex;
  justify-content: space-between;
  margin: 20px 0;
  gap: 10px;
}

.stat {
  flex: 1;
  background: #f5f6f8;
  padding: 15px;
  border-radius: 10px;
  text-align: center;
}

/* TABS */
.profile-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  background: #f0f2f5;
  padding: 6px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.profile-tabs span {
  padding: 8px 14px;
  border-radius: 20px;
}

.profile-tabs .active {
  background: white;
}

/* SECTIONS */
.profile-section {
  background: white;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 15px;
}

/* SKILLS */
.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skills span {
  background: orange;
  color: white;
  padding: 6px 10px;
  border-radius: 20px;
  font-size: 13px;
}

/* CERTS */
.certs li {
  margin-bottom: 8px;
}

.contractor-card {
  position: relative;
}

.save-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #fff;
  border: none;
  border-radius: 50%;
  font-size: 18px;
  padding: 6px 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: transform 0.2s ease;
}

.save-btn:hover {
  transform: scale(1.1);
}

/* ACCOUNT PAGE */

.account-profile {
  text-align: center;
  padding: 20px;
}

.account-profile .avatar {
  width: 80px;
  height: 80px;
  background: #ddd;
  border-radius: 50%;
  margin: 0 auto 10px;
}

.account-menu {
  padding: 10px 20px;
}

.menu-item {
  display: flex;
  justify-content: space-between;
  padding: 15px 0;
  border-bottom: 1px solid #eee;
  text-decoration: none;
  color: #333;
  font-size: 16px;
}

.account-actions {
  padding: 20px;
}

.danger-btn {
  width: 100%;
  padding: 15px;
  background: red;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
}

/* History */
.history-card {
  cursor: pointer;
}

.history-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

/* ===== CLEAN BOTTOM NAV (NO OVERLAP BUGS) ===== */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;

  display: flex;
  justify-content: center;
  gap: 10px;

  padding: 10px 0;
  background: #ffffff;
  border-top: 1px solid #eee;

  z-index: 10;
}

/* NAV BUTTON STYLE */
.bottom-nav a {
  text-decoration: none;
  color: #555;
  font-size: 13px;
  font-weight: 500;

  padding: 8px 14px;
  border-radius: 20px;

  transition: all 0.2s ease;
}

/* HOVER */
.bottom-nav a:hover {
  background: #f1f5f9;
  color: #1d4ed8;
}

/* ACTIVE PAGE */
.bottom-nav a.active {
  background: #1d4ed8;
  color: #ffffff;
}

/* TAP FEEDBACK */
.bottom-nav a:active {
  transform: scale(0.95);
}

/* SAFE CONTENT SPACE */
body {
  padding-bottom: 80px;
}

/* ESTIMATE BUTTON */
.submit-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  opacity: 0.7;
}

.task-insights {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.insight {
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 6px;
}

.insight.warning {
  background: #ffe5e5;
  color: #b30000;
}

.insight.tip {
  background: #e6f0ff;
  color: #0047b3;
}

.insight.positive {
  background: #e6ffed;
  color: #0a7f3f;
}

.estimator {
  padding: 20px;
  max-width: 800px;
  margin: auto;
}

.estimator-hero {
  text-align: center;
  margin-bottom: 30px;
}

.estimator-hero h1 {
  font-size: 28px;
  margin-bottom: 10px;
}

.estimator-card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.input-group {
  margin-top: 15px;
}

.input-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

.option-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.option-grid button {
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #f9f9f9;
  cursor: pointer;
}

.option-grid button.active {
  background: #2d6cdf;
  color: #fff;
  border: none;
}

input {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #ddd;
}

small {
  display: block;
  margin-top: 5px;
  color: #777;
}

.estimate-preview {
  text-align: center;
  margin: 30px 0;
}

#liveEstimate {
  font-size: 32px;
  font-weight: bold;
}

.estimator-action {
  text-align: center;
}

#calculateBtn {
  padding: 14px 24px;
  background: #2d6cdf;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
}

/* ===============================
   SMART INSIGHTS UI
=============================== */

.insight-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* BASE INSIGHT ITEM */
.insight-item {
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 12px;
  margin-bottom: 10px;

  border-radius: 8px;
  font-size: 14px;
}

/* WARNING */
.insight-item.warning {
  background-color: #fdecc8;
  color: #8a5a00;
}

/* SUGGESTION (NEXT TASK) */
.insight-item.suggestion {
  background-color: #dce8ff;
  color: #1f4ed8;
  font-weight: 500;
}

/* INFO (THIS IS YOUR ISSUE) */
.insight-item.info {
  background-color: #f3f6fb;
  color: #334155;
}

/* ICON */
.insight-item .icon {
  font-size: 16px;
  flex-shrink: 0;
}

/* MESSAGE */
.insight-item .message {
  flex: 1;
}

.insight-group {
  margin-top: 10px;
}

.insight-heading {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}

.insight-heading.critical {
  color: #b30000;
}

.insight-heading.warning {
  color: #cc7a00;
}

.insight-heading.info {
  color: #0047b3;
}

.insight.critical { background: #ffe5e5; color: #b30000; }
.insight.warning { background: #fff4e5; color: #cc7a00; }
.insight.info { background: #e6f0ff; color: #0047b3; }
.insight.positive { background: #e6ffed; color: #0a7f3f; }

.rec-btn {
  padding: 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

.rec-btn.primary {
  background: #007bff;
  color: white;
}

.rec-btn.critical {
  background: #dc3545;
  color: white;
}

.rec-btn.warning {
  background: #ffc107;
}

.task-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 20px;
}

.task-list li {
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 8px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  gap: 10px;
}

.task-list li.completed {
  background: #e6f7ec;
  text-decoration: line-through;
  color: #2e7d32;
}

.task-list li.active {
  border: 2px solid #2f80ed;
  background: #eef4ff;
  font-weight: 600;
}

button.action-btn {
  appearance: none;
  border: none;
  outline: none;
}

a.action-btn {
  text-decoration: none;
}

.action-btn {
  display: flex;                /* 🔥 critical */
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 52px;                 /* 🔥 force equal height */

  padding: 0 16px;
  border-radius: 10px;

  font-weight: 600;
  font-size: 14px;

  text-decoration: none;        /* for <a> */
  box-sizing: border-box;
}

.action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;

  align-items: stretch;   /* 🔥 ensures full height */
}

.action-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.action-btn {
  height: 52px;
  border-radius: 10px;
  border: none;

  display: flex;
  align-items: center;
  justify-content: center;

  font-weight: 600;
  font-size: 14px;

  cursor: pointer;
}

.call-btn {
  background: #f2994a;
  color: white;
}

.message-btn {
  background: #f2f2f2;
  color: #333;
}

.hire-btn {
  background: #2f80ed;
  color: white;
}

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

/* ===============================
   PROGRESS ACTIONS (Next + Reset)
================================= */
.progress-actions {
  display: flex;
  justify-content: space-between;
  align-items: stretch; /* ✅ IMPORTANT */
  margin-top: 16px;
  gap: 12px;
}

/* BOTH buttons share structure */
.progress-actions button {
  flex: 1;
  padding: 14px 16px;
  border-radius: 10px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

/* ✅ PRIMARY — NEXT */
.progress-actions .action-btn {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
}

.progress-actions .action-btn:hover {
  background: linear-gradient(135deg, #16a34a, #15803d);
}

/* ✅ SECONDARY — RESET */
.progress-actions .reset-btn {
  background: #ffffff;
  color: #ef4444;
  border: 2px solid #ef4444;
}

.progress-actions .reset-btn:hover {
  background: #ef4444;
  color: #fff;
}

/* ===== ACTION CARD (FIGMA STYLE) ===== */

.action-card {
  background: #ffffff;
  padding: 18px;
  border-radius: 16px;

  /* 🔥 KEY PART (Figma border) */
  border: 1px solid #e5e7eb;

  /* 🔥 subtle elevation */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);

  cursor: pointer;
  transition: all 0.2s ease;
}

/* TEXT */

.action-card h4 {
  margin: 10px 0 4px;
  font-size: 15px;
  font-weight: 600;
}

.action-card p {
  font-size: 13px;
  color: #6b7280;
}

/* 🔥 HOVER (very subtle like Figma) */

.action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  border-color: #d1d5db;
}

/* 🔥 ACTIVE (press feedback) */

.action-card:active {
  transform: scale(0.98);
}


.actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

/* ===== ICON STYLES ===== */

.action-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 18px;
  margin-bottom: 10px;
}

/* COLORS */

.action-icon.blue {
  background: #e7f0ff;
}

.action-icon.orange {
  background: #ffe9db;
}

.action-icon.green {
  background: #e6f7ed;
}

.action-icon.yellow {
  background: #fff4d6;
}

/* ===============================
   PROJECT DETAILS UI
================================= */

.details-container {
  padding: 16px;
}

/* CARD (same system as action-card but slightly stronger) */
.details-card {
  background: #ffffff;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  margin-bottom: 16px;
}

/* HEADER */
.details-header {
  padding: 16px;
  border-bottom: 1px solid #eee;
}

.back-btn {
  background: none;
  border: none;
  font-size: 14px;
  margin-bottom: 8px;
  cursor: pointer;
}

/* STAGE HEADER */
.stage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.stage-header h4 {
  font-size: 15px;
  font-weight: 600;
}

/* STATUS BADGES */
.stage-status {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 500;
}

/* COMPLETED */
.stage-status.completed {
  background: #e6f7ed;
  color: #16a34a;
}

/* IN PROGRESS */
.stage-status.in-progress {
  background: #fff4d6;
  color: #d97706;
}

/* PENDING */
.stage-status.pending {
  background: #f1f5f9;
  color: #64748b;
}

/* PROGRESS BAR */
.progress-bar {
  height: 8px;
  background: #f1f5f9;
  border-radius: 6px;
  overflow: hidden;
  margin: 6px 0 12px;
}

.progress-bar div {
  height: 100%;
  background: #22c55e;
  transition: width 0.3s ease;
}

/* BUDGET ROW */
.budget-row {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.budget-row p {
  font-size: 12px;
  color: #777;
}

.budget-row h4 {
  font-size: 14px;
}

/* OVER-BUDGET WARNING */
.over-budget {
  color: #ef4444;
}

/* ===============================
   EMPTY STATE (NO CONTRACTOR)
================================ */
.empty-state {
  display: none;
  margin-top: 20px;
  padding: 20px;
  background: #fff3f3;
  border: 1px solid #ffcccc;
  border-radius: 8px;
  color: #cc0000;
  font-weight: 500;
  white-space: pre-line;
}

/* ===============================
   CONTRACTOR FILTER STATES
================================ */

/* Hidden cards */
.contractor-card.hidden {
  display: none;
}

/* Perfect match */
.contractor-card.match {
  border: 2px solid #16a34a; /* green */
  opacity: 1;
}

.trust-score {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #2e7d32;
}

.task-item {
  padding: 16px;
  background: #f5f5f5;
  border-radius: 10px;
}

.task-title {
  font-weight: 600;
  margin-bottom: 10px;
}

.task-progress-bar {
  height: 24px;
  background: #ddd;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 12px;
}

.task-progress-fill {
  height: 100%;
  background: #28a745;
  color: white;
  text-align: center;
  font-size: 12px;
  line-height: 24px;
  transition: width 0.3s ease;
}

.task-btn.primary {
  background: #2563eb;
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700; /* 🔥 make bold */
  border: none;
  cursor: pointer;
}

.task-btn:disabled {
  background: #999;
}

/* ===============================
   STAGE PROGRESS BAR
=============================== */

.stage-progress-container {
  margin: 10px 0 20px;
}

#stageProgressBar {
  width: 100%;
  height: 24px;
  background: #ddd;
  border-radius: 6px;
  overflow: hidden;
}

#stageProgressFill {
  height: 100%;
  width: 0%;
  background: #007bff;
  color: white;
  text-align: center;
  line-height: 24px;
  font-size: 12px;
  transition: width 0.3s ease;
}

.stage-complete-msg {
  margin-top: 12px;
  padding: 10px;
  background: #e6f9f0;
  border: 1px solid #b2f0d1;
  border-radius: 8px;
  font-weight: 600;
}

.stage-section {
  margin-bottom: 20px;
}

.task-item {
  padding: 8px;
  margin: 5px 0;
}

.task-item.completed {
  color: green;
}

.task-item.locked {
  opacity: 0.4;
}

.stage-complete-msg {
  margin-top: 10px;
  font-weight: bold;
  color: green;
}

.completed-toggle {
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 8px;
}

.task-item.locked {
  opacity: 0.5;
  font-style: italic;
}

.project-complete-msg {
  margin-top: 20px;
  padding: 15px;
  background: #d4edda;
  border-radius: 10px;
  text-align: center;
  font-weight: bold;
}

/* =========================
   STAGE TRACKER
========================= */
.stage-tracker {
  display: flex;
  justify-content: space-between;
  margin: 20px 0 30px;
  gap: 10px;
}

.stage-step {
  flex: 1;
  text-align: center;
  padding: 10px 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  background: #e5e7eb;
  color: #6b7280;
  position: relative;
}

/* ACTIVE */
.stage-step.active {
  background: #2563eb;
  color: white;
}

/* COMPLETED */
.stage-step.completed {
  background: #16a34a;
  color: white;
}

/* LOCKED */
.stage-step.locked {
  opacity: 0.5;
}

/* CONNECTOR LINE */
.stage-step::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -5px;
  width: 10px;
  height: 2px;
  background: #d1d5db;
  transform: translateY(-50%);
}

.stage-step:last-child::after {
  display: none;
}

/* =========================
   LEFT SIDE (TEXT BLOCK)
========================= */

/* COST = FULL WIDTH */
#estimateValue {
  font-size: 26px;
  font-weight: 200;
  color: #f1f5f9; /* soft white, not pure */
}

/* PROJECT NAME */
#projectNameDisplay {
  font-size: 20px;
  font-weight: 600;
}

#projectSpent {
  font-size: 28px;
  font-weight: 700;
  color: #22c55e; /* ✅ GREEN (success / real money) */
}

/* =========================
   CONTRACTOR BLOCK
========================= */
.contractor-summary {
  display: flex;
  align-items: center;
  gap: 10px;

  grid-column: span 2;
}

.contractor-summary img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 2px solid white;
}

/* =========================
   CONTRACTOR TOP (CENTERED)
========================= */
.contractor-top {
  text-align: center;
  margin-bottom: 20px;
}

.contractor-top img {
  width: 70px; /* 🔥 bigger */
  height: 70px;
  border-radius: 50%;
  border: 3px solid white;
  display: block;
  margin: 0 auto;
}

.contractor-top a {
  display: block;
  margin-top: 8px;
  color: white;
  text-decoration: none;
  font-weight: 600;
}

.contractor-top a:hover {
  text-decoration: underline;
}

/* =========================
   MAIN 2-COLUMN LAYOUT
========================= */
#estimateValue {
  font-size: 26px;
  font-weight: 200;
  margin-bottom: 10px;
}

/* =========================
   ACTION BUTTONS
========================= */
.result-actions {
  display: flex;
  justify-content: center; /* ✅ centered */
  gap: 15px;
  margin-top: 25px;
}

.result-actions button {
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}

.result-actions button:first-child {
  background: white;
  color: #2f4f7f;
  font-weight: 600;
}

.secondary-btn {
  background: rgba(255,255,255,0.2);
  color: white;
}

/* =========================
   WRAPPER
========================= */
.summary-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

/* =========================
   CARD
========================= */
.summary-card {
  width: 100%;
  max-width: 950px;

  background: linear-gradient(135deg, #2f4f7f, #3d6cb9);
  color: white;

  border-radius: 16px;
  padding: 30px;

  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

/* =========================
   CONTRACTOR (TOP CENTER)
========================= */
.contractor-top {
  text-align: center;
  margin-bottom: 25px;
}

.contractor-top img {
  width: 75px;
  height: 75px;
  border-radius: 50%;
  border: 3px solid white;
}

.contractor-top a {
  display: block;
  margin-top: 10px;
  color: white;
  font-weight: 600;
  text-decoration: none;
}

.contractor-top a:hover {
  text-decoration: underline;
}

/* =========================
   MAIN GRID (KEY FIX)
========================= */
.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  margin-top: 10px;
}

/* LEFT */
.summary-left {
  text-align: center;
}

/* RIGHT */
.summary-right {
  text-align: center;
  opacity: 0.9;

  display: flex;
  flex-direction: column;
  justify-content: center; /* ✅ vertical alignment */
  gap: 6px; /* ✅ tighter spacing */
}

.summary-right p:first-child {
  font-weight: 500; 
}

/* =========================
   BUTTONS
========================= */
.result-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
}

.result-actions button {
  padding: 12px 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
}

.result-actions button:first-child {
  background: white;
  color: #2f4f7f;
  font-weight: 600;
}

.secondary-btn {
  background: rgba(255,255,255,0.2);
  color: white;
}

.insight-item.info {
  background: #f5f7fa;
  padding: 10px;
  border-radius: 6px;
}

.insight-item.warning { background: #fff3cd; }
.insight-item.critical { background: #f8d7da; }
.insight-item.suggestion { font-weight: 600; }

.insight-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 8px;
}

/* FORCE override */
.insight-item.info {
  background-color: #f3f6fb !important;
  color: #334155 !important;
}

.insight-item.warning {
  background-color: #fdecc8 !important;
}

.insight-item.suggestion {
  background-color: #dce8ff !important;
}

.insights-card .insight-item.info {
  background-color: #f3f6fb;
  color: #334155;
}

.insights-card .insight-item.warning {
  background-color: #fdecc8;
}

.insights-card .insight-item.suggestion {
  background-color: #dce8ff;
}

#projectInsightList {
  padding: 0;
  margin: 0;
  list-style: none;
}

#projectInsightList li {
  width: 100%;
}

/* ========================= */
/* TASK MODAL */
/* ========================= */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal.hidden {
  display: none;
}

/* BACKDROP */
.modal-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
}

/* MODAL CARD */
.modal-content {
  position: relative;
  background: #ffffff;
  padding: 24px;
  border-radius: 14px;
  width: 90%;
  max-width: 420px;
  z-index: 2;

  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  animation: fadeIn 0.2s ease;
}

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

.form-group label {
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
}

/* BUTTONS */
.modal-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
}

.modal-actions button {
  flex: 1;
}

/* ANIMATION */
@keyframes fadeIn {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.close-btn {
  cursor: pointer;
  font-size: 20px;
}

.summary-left h2,
.summary-right h2 {
  margin: 5px 0;
}

.summary-left p,
.summary-right p {
  color: rgba(255,255,255,0.85);
  font-weight: 500;
}

.recommendation-section {
  margin-top: 20px;
  padding: 16px;
  background: #0f172a;
  border-radius: 12px;
  color: #fff;
}

.recommendation-item {
  padding: 12px;
  margin-top: 10px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}

.recommendation-item.primary {
  background: #2563eb;
}

.recommendation-item.warning {
  background: #f59e0b;
}

.recommendation-item.critical {
  background: #ef4444;
}


.recommendation {
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 14px;
}

.recommendation.primary {
  background: #e0f2fe;
  color: #0369a1;
}

.recommendation.warning {
  background: #fef3c7;
  color: #92400e;
}

.recommendation.critical {
  background: #fee2e2;
  color: #991b1b;
}

.recommendation-card {
  background: #f4f7fb;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 14px;
}

.inline-recommendation {
  margin: 8px 0;
  padding: 8px;
  border-radius: 6px;
  font-size: 13px;
}

.inline-recommendation.critical {
  background: #fee2e2;
  color: #b91c1c;
}

.inline-recommendation.warning {
  background: #fef3c7;
  color: #92400e;
}

.inline-recommendation.primary {
  background: #dbeafe;
  color: #1d4ed8;
}

.inline-insight {
  margin: 6px 0;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 12px;
}

.inline-insight.critical {
  background: #fee2e2;
  color: #b91c1c;
}

.inline-insight.warning {
  background: #fef3c7;
  color: #92400e;
}

.inline-insight.info {
  background: #e0f2fe;
  color: #075985;
}

.stage-card.locked {
  opacity: 0.5;
  pointer-events: none;
}

.stage-card.clickable {
  cursor: pointer;
  transition: 0.2s;
}

.stage-card.clickable:hover {
  transform: scale(1.02);
}

/* Top row only */
.task-item.active-task {
  display: block;
}

/* Create a row ONLY for first line */
.task-item.active-task > span,
.task-item.active-task > .task-btn {
  display: inline-block;
  vertical-align: middle;
}

/* Space between text and button */
.task-item.active-task .task-btn {
  margin-left: 12px;
}

/* Push insights below properly */
.task-item.active-task .task-insights {
  margin-top: 12px;
}

/* Space between action row and insights */
.task-item.active-task .task-insights {
  margin-top: 12px;
}

.task-item.active-task span {
  flex: 1;
}

.task-sub {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}

.task-variance {
  font-size: 13px;
  font-weight: 600;
  margin-top: 2px;
}

.task-variance.over {
  color: #dc2626; /* red */
}

.task-variance.under {
  color: #16a34a; /* green */
}

.intelligence-panel {
  margin-top: 16px;
  padding: 16px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.intel-block {
  margin-bottom: 14px;
}

.intel-block h4 {
  margin-bottom: 6px;
  font-size: 14px;
  color: #1e293b;
}

.intel-block p {
  margin: 0;
  font-size: 14px;
  color: #475569;
}

.intel-block ul {
  padding-left: 18px;
  margin: 0;
}

.intel-block li {
  font-size: 14px;
  margin-bottom: 6px;
}

/* =========================
   🔮 STAGE PREDICTION
========================= */

.stage-prediction {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}

/* 🚨 Risk (Over budget) */
.stage-prediction.risk {
  background: #ffe5e5;
  color: #b00020;
  border-left: 4px solid #e53935;
}

/* ✅ Safe (Within budget) */
.stage-prediction.safe {
  background: #e6f4ea;
  color: #1b5e20;
  border-left: 4px solid #2e7d32;
}

/* =========================
   🧠 EXPLANATION NOTE
========================= */

.stage-note {
  font-size: 13px;
  color: #666;
  margin-top: 6px;
  padding-left: 4px;
}

/* =========================
   💰 FINANCIAL BLOCK
========================= */

.stage-financial {
  margin-top: 6px;
}

.stage-spent {
  font-size: 15px;
  font-weight: 600;
}

.stage-sub {
  color: #888;
  font-size: 13px;
  margin-left: 4px;
}

/* Variance */
.stage-variance {
  font-size: 13px;
  margin-top: 4px;
}

.stage-variance.over {
  color: #e53935;
}

.stage-variance.under {
  color: #2e7d32;
}

/* =========================
   🧱 STAGE CARD POLISH
========================= */

.stage-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.stage-card-header h3 {
  margin: 0;
  font-size: 18px;
}

.stage-status {
  font-size: 13px;
  color: #666;
}