/* ============================
   PHULAX BLUEPRINTAI — STYLES
   ============================ */

:root {
  --bg: #05070f;
  --bg2: #080c18;
  --surface: #0e1428;
  --surface2: #141a30;
  --border: rgba(255,255,255,0.07);
  --accent: #00d4ff;
  --accent2: #7c3aed;
  --accent3: #10b981;
  --text: #f0f4ff;
  --text-muted: #7885a8;
  --text-faint: #3d4a6b;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 40px rgba(0,0,0,0.5);
  --font: 'Inter', system-ui, sans-serif;
  --font-head: 'Space Grotesk', 'Inter', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; text-decoration: none; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: 10px; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  color: #fff;
  box-shadow: 0 0 24px rgba(0,212,255,0.25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 36px rgba(0,212,255,0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--surface);
  border-color: rgba(255,255,255,0.15);
}

.btn-sm:not(.btn-primary):not(.btn-ghost) {
  background: var(--surface2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-sm:not(.btn-primary):not(.btn-ghost):hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---- NAV ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(5,7,15,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
}
.logo-icon {
  font-size: 22px;
  color: var(--accent);
  filter: drop-shadow(0 0 8px var(--accent));
}
.logo-sub {
  color: var(--accent);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* ---- HERO ---- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 120px 0 80px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 40%, transparent 100%);
}
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}
.glow-1 {
  width: 600px; height: 600px;
  background: var(--accent2);
  top: -200px; right: -100px;
}
.glow-2 {
  width: 400px; height: 400px;
  background: var(--accent);
  bottom: -100px; left: -50px;
  opacity: 0.2;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(0,212,255,0.08);
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 24px;
}
.hero-title {
  font-family: var(--font-head);
  font-size: clamp(42px, 7vw, 80px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 24px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--accent2) 0%, var(--accent) 60%, var(--accent3) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 36px;
  line-height: 1.7;
}
.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
}
.stat { display: flex; flex-direction: column; }
.stat-num {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}
.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}
.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-faint);
  font-size: 12px;
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ---- SECTION COMMON ---- */
section { padding: 100px 0; }
.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-badge {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent2);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.section-header h2 {
  font-family: var(--font-head);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 12px;
}
.section-header p {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
}

/* ---- FEATURES ---- */
.features { background: var(--bg2); }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all 0.25s;
}
.feature-card:hover {
  border-color: rgba(0,212,255,0.2);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}
.feature-card--accent {
  border-color: rgba(124,58,237,0.3);
  background: linear-gradient(135deg, rgba(124,58,237,0.1), rgba(0,212,255,0.05));
}
.feature-icon {
  font-size: 32px;
  margin-bottom: 16px;
}
.feature-card h3 {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}
.feature-card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
}

/* ---- ESTIMATOR ---- */
.estimator-section {
  background: var(--bg);
  position: relative;
}
.estimator-wrap {
  max-width: 1100px;
  margin: 0 auto;
}
.estimator-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto 1fr;
  gap: 2px;
  background: var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.est-results {
  grid-column: 2;
  grid-row: 1;
}
.render-section {
  grid-column: 2;
  grid-row: 2;
}
.est-input-panel {
  background: var(--surface);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.est-input-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.est-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg2);
  border-radius: 8px;
  padding: 3px;
}
.est-tab {
  flex: 1;
  padding: 7px;
  background: none;
  border: none;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.est-tab.active {
  background: var(--surface2);
  color: var(--text);
}
.est-examples {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.est-examples span {
  font-size: 12px;
  color: var(--text-faint);
}
.example-chip {
  padding: 4px 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}
.example-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.tab-content { display: none; }
.tab-content.active { display: block; }

.est-textarea {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  padding: 16px;
  resize: vertical;
  min-height: 180px;
  transition: border-color 0.2s;
}
.est-textarea:focus {
  outline: none;
  border-color: rgba(0,212,255,0.4);
}
.est-textarea::placeholder { color: var(--text-faint); }

.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.detail-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.detail-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.detail-field input,
.detail-field select {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  padding: 10px 12px;
  width: 100%;
  transition: border-color 0.2s;
}
.detail-field input:focus,
.detail-field select:focus {
  outline: none;
  border-color: rgba(0,212,255,0.4);
}
.detail-field select option {
  background: var(--surface2);
}

.est-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}
.api-key-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.api-key-wrap input {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 13px;
  padding: 9px 12px;
}
.api-key-wrap input:focus {
  outline: none;
  border-color: rgba(0,212,255,0.3);
}
.api-key-link {
  font-size: 12px;
  color: var(--accent);
  white-space: nowrap;
}
.api-key-link:hover { text-decoration: underline; }

/* ---- RESULTS ---- */
.est-results {
  background: var(--surface);
  padding: 28px;
  overflow-y: auto;
  max-height: 700px;
  min-height: 500px;
  display: flex;
  flex-direction: column;
}
.results-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-faint);
  gap: 12px;
}
.placeholder-icon { font-size: 48px; opacity: 0.5; }
.results-placeholder p { font-size: 14px; line-height: 1.7; }

.results-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.results-header h3 {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
}
.results-export-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.result-body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}
.result-body h4 {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  margin: 20px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.result-body h4:first-child { margin-top: 0; }
.result-body p { color: var(--text-muted); margin-bottom: 8px; }
.result-body ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}
.result-body ul li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg2);
  border-radius: 8px;
  font-size: 13px;
}
.result-body ul li .item-name { color: var(--text-muted); }
.result-body ul li .item-val { font-weight: 600; color: var(--text); }
.result-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(0,212,255,0.1));
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: var(--radius);
  margin-top: 16px;
}
.result-total .total-label {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 16px;
}
.result-total .total-val {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 22px;
  color: var(--accent);
}

/* Streaming cursor */
.cursor {
  display: inline-block;
  width: 2px;
  height: 14px;
  background: var(--accent);
  border-radius: 1px;
  animation: blink 0.8s infinite;
  vertical-align: middle;
  margin-left: 2px;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

/* ---- EXPORTS ---- */
.exports-section { background: var(--bg2); }
.exports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.export-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all 0.25s;
}
.export-card:hover {
  border-color: rgba(0,212,255,0.2);
  transform: translateY(-3px);
}
.export-logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 18px;
  margin-bottom: 16px;
}
.revit-logo { background: linear-gradient(135deg, #0073c6, #00b4ff); }
.procore-logo { background: linear-gradient(135deg, #f15a29, #f9a12e); }
.cad-logo { background: linear-gradient(135deg, #1a1a2e, #16213e); border: 1px solid var(--border); font-size: 13px; }
.pdf-logo { background: linear-gradient(135deg, #c0392b, #e74c3c); }
.export-card h3 {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
}
.export-card p { color: var(--text-muted); font-size: 14px; line-height: 1.65; margin-bottom: 16px; }
.export-badge {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.25);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ---- CTA ---- */
.cta-section { background: var(--bg); padding: 80px 0; }
.cta-box {
  position: relative;
  text-align: center;
  padding: 80px 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.glow-cta {
  width: 500px; height: 300px;
  background: var(--accent2);
  top: -150px; left: 50%;
  transform: translateX(-50%);
  opacity: 0.15;
}
.cta-box h2 {
  font-family: var(--font-head);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  margin-bottom: 12px;
  position: relative;
}
.cta-box p {
  color: var(--text-muted);
  font-size: 17px;
  margin-bottom: 28px;
  position: relative;
}
.cta-box .btn { position: relative; }

/* ---- FOOTER ---- */
.footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 60px 0 0;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.footer-brand {
  max-width: 280px;
}
.footer-brand .logo { margin-bottom: 12px; display: flex; }
.footer-brand p { color: var(--text-muted); font-size: 14px; line-height: 1.6; }
.footer-links { display: flex; gap: 48px; }
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.footer-col a {
  font-size: 14px;
  color: var(--text-faint);
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding: 20px 0;
  font-size: 13px;
  color: var(--text-faint);
  flex-wrap: wrap;
  gap: 8px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .estimator-box {
    grid-template-columns: 1fr;
  }
  .est-results {
    max-height: none;
    min-height: 300px;
  }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px;
    left: 0; right: 0;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
    gap: 16px;
  }
  .hero-stats { flex-wrap: wrap; gap: 16px; }
  .details-grid { grid-template-columns: 1fr; }
  .footer-links { flex-direction: column; gap: 24px; }
  .footer-top { flex-direction: column; }
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--surface2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

/* ---- RENDERING ---- */
.render-section {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 20px 28px;
}
.render-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.render-label {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
}
.render-sub {
  font-size: 13px;
  color: var(--text-muted);
}
.render-img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  max-height: 300px;
  object-fit: cover;
}
.render-loading {
  text-align: center;
  padding: 20px 0;
  font-size: 13px;
  color: var(--text-faint);
}
.render-error {
  font-size: 12px;
  color: var(--text-faint);
  padding: 8px 0;
}

/* ---- STREAM PROGRESS BAR ---- */
.stream-progress-wrap {
  padding: 10px 14px 6px;
  border-bottom: 1px solid var(--border);
}
.stream-progress-track {
  height: 4px;
  background: var(--surface2);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}
.stream-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  border-radius: 4px;
  transition: width 0.4s ease;
}
.stream-progress-label {
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.5px;
}

/* ---- LOADING BAR ---- */
.progress-bar {
  height: 3px;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  border-radius: 2px;
  margin-bottom: 16px;
  animation: progress 2s ease-in-out infinite;
  transform-origin: left;
}
@keyframes progress {
  0% { transform: scaleX(0); opacity: 1; }
  70% { transform: scaleX(0.85); opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}

/* ---- ERROR ---- */
.error-msg {
  padding: 12px 16px;
  background: rgba(255,51,85,0.1);
  border: 1px solid rgba(255,51,85,0.3);
  border-radius: 8px;
  color: #ff5577;
  font-size: 13px;
  margin-top: 8px;
}

/* ---- RENDER CUSTOMIZE ---- */
.render-customize {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}
.render-custom-input {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  padding: 8px 12px;
  transition: border-color 0.2s;
}
.render-custom-input:focus {
  outline: none;
  border-color: rgba(0,212,255,0.4);
}
.render-custom-input::placeholder { color: var(--text-faint); }
.render-regen-btn {
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---- SHARE URL BAR ---- */
.share-url-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,212,255,0.06);
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.share-url-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}
.share-url-input {
  flex: 1;
  min-width: 160px;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  padding: 0;
}
.share-url-input:focus { outline: none; }

/* ---- LABOR / EXTRA SECTIONS ---- */
.labor-section {
  margin-top: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.labor-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg2);
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 8px;
}
.labor-header {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0;
}
.crew-control {
  display: flex;
  align-items: center;
  gap: 6px;
}
.crew-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}
.crew-input {
  width: 56px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  padding: 3px 6px;
  text-align: center;
}
.crew-input:focus { outline: none; border-color: var(--accent); }
.crew-unit { font-size: 12px; color: var(--text-faint); }
.crew-apply-btn { padding: 3px 10px; font-size: 12px; }
.labor-body {
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}
.labor-body ul { margin: 0; padding: 0; list-style: none; }
.labor-body li { padding: 4px 0; border-bottom: 1px solid var(--border); }
.labor-body li:last-child { border: none; }
.labor-body .cr-name { color: var(--text); display: inline-block; min-width: 160px; }
.labor-body .cr-cost { color: var(--accent3); font-weight: 600; float: right; }

/* ---- EDITABLE ESTIMATE TABLE ---- */
.estimate-table-wrap {
  overflow-x: auto;
  margin-bottom: 12px;
}
.estimate-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.estimate-table th {
  background: var(--bg2);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.estimate-table th:last-child { text-align: right; }
.estimate-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: middle;
}
.estimate-table td:last-child {
  text-align: right;
  font-weight: 600;
  color: var(--text);
}
.estimate-table tr:hover td { background: rgba(255,255,255,0.02); }
.est-phase-row td {
  background: var(--bg2);
  color: var(--accent);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 10px 6px;
  border-top: 1px solid var(--border);
}
.est-editable {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  padding: 3px 6px;
  width: 80px;
  text-align: right;
  transition: border-color 0.15s;
}
.est-editable:focus {
  outline: none;
  border-color: rgba(0,212,255,0.4);
  background: var(--bg2);
}
.est-grand-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(0,212,255,0.1));
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: var(--radius);
  margin-top: 16px;
}
.est-grand-total .total-label {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 16px;
}
.est-grand-total .total-val {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 22px;
  color: var(--accent);
}
