@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700;800&family=DM+Sans:wght@400;500;600;700&display=swap');

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: 'DM Sans', Inter, system-ui, sans-serif; background: #0B1423; color: #F5F7FA; }

body { display: flex; }

/* ===== SIDEBAR ===== */
.sidebar {
  width: 220px;
  min-width: 220px;
  background: #0B1423;
  display: flex;
  flex-direction: column;
  padding: 0;
  height: 100vh;
  position: sticky;
  top: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.logo-mark {
  display: flex;
  align-items: center;
}

.logo-text {
  display: none;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: #8b95a3;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.15s;
  cursor: pointer;
}

.nav-item svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  flex-shrink: 0;
}

.nav-item:hover { background: #12213a; color: #F5F7FA; }
.nav-item.active { border-left: 3px solid #84CC16; background: rgba(132,204,22,0.1); color: #F5F7FA; }

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.profile-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #84CC16;
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-name { color: #F5F7FA; font-size: 13px; font-weight: 600; }
.profile-role { color: #8b95a3; font-size: 11px; }

/* ===== MAIN ===== */
.main { flex: 1; overflow-y: auto; min-height: 100vh; padding: 28px 32px; max-width: calc(100vw - 220px); background: #0B1423; }

/* ===== PAGE HEADER ===== */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.page-header h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.5px; }
.subtext { color: #8b95a3; font-size: 13.5px; margin-top: 3px; }

/* ===== VIEWS ===== */
.view { display: none; }
.view.active { display: block; }

/* ===== ALERT ===== */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  margin-bottom: 20px;
}

.alert svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; margin-top: 1px; }
.alert-warning { background: #FEF9C3; color: #854D0E; border: 1px solid #FDE047; }

/* ===== KPI STRIP ===== */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.kpi-card {
  background: #0f1b2f;
  border-radius: 12px;
  padding: 16px 18px;
  border: 1px solid rgba(255,255,255,0.08);
}

.kpi-value { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; }
.kpi-label { font-size: 12px; color: #8b95a3; margin-top: 3px; }
.kpi-warn { color: #F59E0B; }
.kpi-ok { color: #22C55E; }

/* ===== SECTION HEADER ===== */
.section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.section-header h2 { font-size: 16px; font-weight: 600; }
.badge { background: rgba(132,204,22,0.12); color: #84CC16; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 20px; }

/* ===== PROJECT CARDS ===== */
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.project-card {
  background: #0f1b2f;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 20px;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.project-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.3); border-color: #84CC16; }

.project-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.project-address { display: flex; align-items: center; gap: 10px; }
.project-icon { font-size: 22px; }
.project-name { font-size: 15px; font-weight: 600; }
.project-suburb { font-size: 12px; color: #8b95a3; margin-top: 2px; }

.project-status {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}
.status-active { background: #DCFCE7; color: #16A34A; }
.status-review { background: #FEF3C7; color: #D97706; }

.progress-row { display: flex; justify-content: space-between; margin-bottom: 6px; }
.progress-label { font-size: 12px; color: #8b95a3; }
.progress-pct { font-size: 12px; font-weight: 600; }

.progress-bar { background: #F3F4F6; border-radius: 6px; height: 7px; margin-bottom: 14px; overflow: hidden; }
.progress-fill { background: #84CC16; height: 100%; border-radius: 6px; transition: width 0.5s; }

.project-meta { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.meta-item { display: flex; gap: 8px; font-size: 12.5px; }
.meta-key { color: #8b95a3; min-width: 72px; }
.meta-val { font-weight: 500; color: #F5F7FA; }

.trade-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 500; padding: 2px 8px; border-radius: 6px; }
.trade-elec { background: #EDE9FE; color: #6D28D9; }
.trade-conc { background: #F3F4F6; color: #F5F7FA; }
.trade-paint { background: #DCFCE7; color: #15803D; }
.trade-plumb { background: #CCFBF1; color: #0F766E; }
.trade-plast { background: #FCE7F3; color: #BE185D; }
.trade-tile { background: #FFF7ED; color: #C2410C; }
.trade-skip { background: #FEE2E2; color: #B91C1C; }
.trade-chip.trade-chip { margin-top: 0; }

.project-card-footer { display: flex; gap: 10px; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,0.06); padding-top: 12px; }
.footer-stat { font-size: 12px; color: #8b95a3; }
.warn-stat { color: #D97706; }

/* ===== BUTTONS ===== */
.btn-primary {
  background: #84CC16;
  color: #F5F7FA;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  font-family: 'DM Sans', Inter, sans-serif;
}
.btn-primary:hover { background: #6ca712; }

.btn-secondary {
  background: transparent;
  color: #F5F7FA;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  font-family: 'DM Sans', Inter, sans-serif;
}
.btn-secondary:hover { background: #84CC16; border-color: #84CC16; }

.btn-back {
  background: none;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  color: #8b95a3;
}
.btn-back:hover { background: rgba(255,255,255,0.06); }

/* ===== HERO ROW ===== */
.hero-row { display: grid; grid-template-columns: 160px 1fr 260px; gap: 16px; margin-bottom: 20px; }

.hero-card { background: #0f1b2f; border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 20px; }

.ring-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; }
.progress-ring { width: 110px; height: 110px; }
.ring-label { text-align: center; margin-top: 6px; }
.ring-pct { font-size: 24px; font-weight: 700; }
.ring-sub { font-size: 12px; color: #8b95a3; }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px 20px; }
.detail-item {}
.detail-key { font-size: 11px; color: #8b95a3; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px; }
.detail-val { font-size: 14px; font-weight: 500; }
.stage-pill { background: rgba(132,204,22,0.12); color: #84CC16; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }

.next-card { display: flex; flex-direction: column; gap: 4px; }
.next-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: #8b95a3; }
.next-trade { font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.trade-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.trade-dot.trade-elec { background: #8B5CF6; }
.next-date { font-size: 15px; font-weight: 600; color: #84CC16; }
.next-sub { font-size: 13px; color: #8b95a3; }
.next-warn { font-size: 12.5px; color: #D97706; background: #FEF9C3; border-radius: 6px; padding: 6px 10px; margin-top: 6px; }

/* ===== AI BAR ===== */
.ai-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #0B1423;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 20px;
}

.ai-icon { color: #84CC16; font-size: 18px; }
.ai-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #F5F7FA;
  font-size: 14px;
  font-family: 'DM Sans', Inter, sans-serif;
}
.ai-input::placeholder { color: #8b95a3; }
.ai-btn {
  background: #84CC16;
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

/* ===== PROJECT TABS ===== */
.project-tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.08); padding-bottom: 0; }
.tab-btn {
  background: none;
  border: none;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: #8b95a3;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
}
.tab-btn:hover { color: #F5F7FA; }
.tab-btn.active { color: #84CC16; border-bottom-color: #84CC16; }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ===== TIMELINE ===== */
.timeline { position: relative; padding-left: 80px; }
.timeline::before { content: ''; position: absolute; left: 56px; top: 12px; bottom: 12px; width: 2px; background: #E5E7EB; }

.timeline-event { position: relative; margin-bottom: 24px; }
.tl-date { position: absolute; left: -80px; top: 10px; font-size: 11.5px; color: #8b95a3; text-align: right; width: 66px; line-height: 1.3; }
.tl-dot { position: absolute; left: -14px; top: 12px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 2px currentColor; }
.tl-dot-elec { background: #8B5CF6; color: #8B5CF6; }
.tl-dot-chip { background: #F59E0B; color: #F59E0B; }
.tl-dot-conc { background: #6B7280; color: #8b95a3; }
.tl-dot-insp { background: #1E3A5F; color: #1E3A5F; }
.tl-dot-ai { background: #84CC16; color: #84CC16; }
.tl-dot-warn { background: #EF4444; color: #EF4444; }
.tl-dot-del { background: #EAB308; color: #EAB308; }
.tl-dot-plumb { background: #14B8A6; color: #14B8A6; }

.tl-card { background: #0f1b2f; border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 14px 18px; }
.tl-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.tl-title { font-size: 14px; font-weight: 600; }
.tl-meta { font-size: 12.5px; color: #8b95a3; margin-bottom: 10px; }

.tl-badge { font-size: 11px; font-weight: 600; padding: 2px 10px; border-radius: 20px; }
.badge-pass { background: #DCFCE7; color: #16A34A; }
.badge-done { background: #F3F4F6; color: #F5F7FA; }
.badge-delay { background: #FEE2E2; color: #B91C1C; }

.tl-photos { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.photo-thumb { width: 52px; height: 40px; background: linear-gradient(135deg, #CBD5E1, #8b95a3); border-radius: 6px; }
.photo-more { font-size: 12px; color: #84CC16; font-weight: 500; cursor: pointer; }

.tl-ai-card { background: rgba(132,204,22,0.08); border-color: rgba(132,204,22,0.2); }
.tl-ai-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ai-icon-sm { color: #84CC16; font-size: 14px; }
.tl-ai-body { font-size: 13.5px; color: #8b95a3; line-height: 1.6; }

.tl-warn-card { background: #FFF7ED; border-color: #FED7AA; }
.tl-delay-reason { font-size: 12.5px; color: #C2410C; background: #FEE2E2; border-radius: 6px; padding: 6px 10px; margin-top: 6px; }

/* ===== CALENDAR ===== */
.cal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }

.cal-toggle { display: flex; background: #0B1423; border-radius: 8px; padding: 3px; }
.cal-view-btn {
  background: none;
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #8b95a3;
  cursor: pointer;
  transition: all 0.15s;
}
.cal-view-btn.active { background: #0f1b2f; color: #F5F7FA; box-shadow: 0 1px 6px rgba(0,0,0,0.3); }

.cal-nav { display: flex; align-items: center; gap: 12px; }
.cal-nav-btn { background: #0f1b2f; border: 1px solid rgba(255,255,255,0.08); border-radius: 6px; width: 28px; height: 28px; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; color: #F5F7FA; }
.cal-title { font-size: 14px; font-weight: 600; }

.cal-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.leg-item { display: flex; align-items: center; gap: 5px; font-size: 12px; color: #F5F7FA; }
.leg-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }

.cal-day-col { background: #0f1b2f; border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; overflow: hidden; min-height: 160px; }
.cal-day-hdr { padding: 10px 12px; font-size: 12px; font-weight: 600; background: #12213a; border-bottom: 1px solid rgba(255,255,255,0.06); color: #8b95a3; }
.cal-day-hdr span { display: block; font-size: 15px; font-weight: 700; color: #F5F7FA; margin-top: 2px; }

.cal-event { margin: 6px; border-radius: 7px; padding: 8px 10px; color: #fff; }
.ce-title { font-size: 11.5px; font-weight: 600; line-height: 1.3; }
.ce-time { font-size: 10.5px; opacity: 0.85; margin-top: 2px; }
.ce-warn { font-size: 10.5px; background: rgba(255,255,255,0.25); border-radius: 4px; padding: 2px 5px; margin-top: 4px; }

.cal-day-empty { padding: 20px 12px; font-size: 12px; color: #D1D5DB; text-align: center; }

/* ===== PAYMENTS ===== */
.view-toggle { display: flex; background: #0B1423; border-radius: 8px; padding: 3px; }
.view-btn {
  background: none;
  border: none;
  border-radius: 6px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #8b95a3;
  cursor: pointer;
  transition: all 0.15s;
}
.view-btn.active { background: #0f1b2f; color: #F5F7FA; box-shadow: 0 1px 6px rgba(0,0,0,0.3); }

.payments-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.mat-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }

.pay-summary-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 24px; }
.pay-summary-card { background: #0f1b2f; border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 16px; }
.pay-sum-label { font-size: 11px; color: #8b95a3; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.pay-sum-val { font-size: 20px; font-weight: 700; letter-spacing: -0.5px; }

.pay-table { width: 100%; border-collapse: collapse; background: #0f1b2f; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,0.08); font-size: 13.5px; color: #F5F7FA; }
.pay-table thead tr { background: #12213a; }
.pay-table th { text-align: left; padding: 12px 16px; font-size: 12px; font-weight: 600; color: #8b95a3; text-transform: uppercase; letter-spacing: 0.4px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.pay-table td { padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.pay-table tr:last-child td { border-bottom: none; }

.pay-status { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.pay-paid { background: #DCFCE7; color: #16A34A; }
.pay-pending { background: #FEF3C7; color: #D97706; }
.pay-upcoming { background: #F3F4F6; color: #8b95a3; }

/* Owner Pay View */
.owner-pay-summary { background: #0f1b2f; border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 24px; margin-bottom: 16px; }
.owner-pay-summary h3 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.owner-subtitle { font-size: 13px; color: #8b95a3; margin-bottom: 20px; }
.owner-pay-bar { background: #F3F4F6; border-radius: 8px; height: 12px; overflow: hidden; margin-bottom: 8px; }
.owner-pay-fill { background: #84CC16; height: 100%; border-radius: 8px; }
.owner-pay-labels { display: flex; justify-content: space-between; font-size: 13px; color: #8b95a3; margin-bottom: 20px; }

.owner-next-claim { background: rgba(132,204,22,0.12); border: 1px solid rgba(132,204,22,0.3); border-radius: 10px; padding: 16px; }
.onc-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: #84CC16; margin-bottom: 4px; }
.onc-stage { font-size: 15px; font-weight: 600; }
.onc-amount { font-size: 28px; font-weight: 700; color: #84CC16; margin: 4px 0; }
.onc-note { font-size: 12.5px; color: #8b95a3; }

.owner-variation-alert { background: #FEF9C3; border: 1px solid #FDE047; border-radius: 12px; padding: 16px 18px; font-size: 13.5px; color: #854D0E; }

/* ===== MATERIALS ===== */
.mat-list { display: flex; flex-direction: column; gap: 10px; }

.mat-item {
  background: #0f1b2f;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: border-color 0.15s;
}
.mat-item:hover { border-color: #84CC16; }

.mat-check-col { padding-top: 2px; }
.mat-check { width: 16px; height: 16px; cursor: pointer; accent-color: #84CC16; }

.mat-info { flex: 1; }
.mat-title { font-size: 14px; font-weight: 500; margin-bottom: 3px; }
.mat-meta { font-size: 12px; color: #8b95a3; margin-bottom: 6px; }

.mat-resp { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 140px; }
.resp-badge { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.resp-builder { background: rgba(132,204,22,0.12); color: #84CC16; }
.resp-owner { background: #FEF3C7; color: #D97706; }

.mat-status { font-size: 12px; font-weight: 500; }
.status-ok { color: #16A34A; }
.status-warn { color: #D97706; }
.status-urgent { color: #B91C1C; }

/* ===== PHOTOS ===== */
.photos-header { display: flex; gap: 12px; margin-bottom: 16px; }
.photo-search {
  flex: 1;
  background: #12213a;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13.5px;
  font-family: 'DM Sans', Inter, sans-serif;
  outline: none;
  color: #F5F7FA;
}
.photo-search:focus { border-color: #84CC16; }

.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.photo-tile { height: 160px; border-radius: 10px; position: relative; overflow: hidden; }
.ph1 { background: linear-gradient(135deg, #c6d2e0 0%, #8b95a3 100%); }
.ph2 { background: linear-gradient(135deg, #d4c5b0 0%, #a89070 100%); }
.ph3 { background: linear-gradient(135deg, #b0ccd4 0%, #7090a0 100%); }
.ph4 { background: linear-gradient(135deg, #b0c8b0 0%, #708070 100%); }
.ph5 { background: linear-gradient(135deg, #c8c0d0 0%, #8878a0 100%); }
.ph6 { background: linear-gradient(135deg, #d0c0b0 0%, #a08070 100%); }
.photo-tag { position: absolute; bottom: 8px; left: 8px; background: rgba(0,0,0,0.65); color: #fff; font-size: 11px; padding: 3px 8px; border-radius: 5px; font-weight: 500; }

/* ===== MOBILE OVERLAY ===== */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}
.sidebar-overlay.active { display: block; }

/* ===== MOBILE TOP BAR ===== */
.mobile-topbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: #0B1423;
  z-index: 100;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
}
.mobile-topbar .logo-mark { display:flex; align-items:center; }
.mobile-topbar .logo-text { display:none; }
.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.hamburger span { display:block; width:22px; height:2px; background:#8b95a3; border-radius:2px; transition:all 0.2s; }

/* ===== MOBILE BOTTOM TAB BAR ===== */
.mobile-tabbar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: #0B1423;
  border-top: 1px solid rgba(255,255,255,0.08);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}
.mobile-tabbar nav {
  display: flex;
  height: 100%;
}
.mobile-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #8b95a3;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: none;
  transition: color 0.15s;
  padding: 0;
}
.mobile-tab svg { width:20px; height:20px; stroke:currentColor; fill:none; stroke-width:1.8; }
.mobile-tab.active { color: #84CC16; }
.mobile-tab:hover { color: #8b95a3; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .kpi-strip { grid-template-columns: repeat(3, 1fr); }
  .pay-summary-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-row { grid-template-columns: 140px 1fr; }
  .next-card { grid-column: span 2; }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  /* Hide desktop sidebar, show mobile UI */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    min-width: 240px;
    height: 100vh;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .sidebar.open { transform: translateX(0); }

  .mobile-topbar { display: flex; }
  .mobile-tabbar { display: block; }

  .main {
    max-width: 100vw;
    padding: 72px 16px 80px; /* top: topbar height, bottom: tabbar height */
    min-height: 100vh;
  }

  /* Stack layouts */
  .kpi-strip { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pay-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .project-grid { grid-template-columns: 1fr; }
  .hero-row { grid-template-columns: 1fr; }
  .ring-card { display: none; }
  .next-card { grid-column: unset; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .cal-week { grid-template-columns: repeat(3, 1fr); }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }

  /* Page header stacks */
  .page-header { flex-direction: column; gap: 12px; align-items: flex-start; }
  .page-header h1 { font-size: 20px; }

  /* Payments table scrollable */
  .pay-table { display: block; overflow-x: auto; }

  /* Project tabs scroll */
  .project-tabs { overflow-x: auto; white-space: nowrap; padding-bottom: 0; }
  .project-tabs::-webkit-scrollbar { display: none; }

  /* Materials resp column stacks */
  .mat-item { flex-wrap: wrap; }
  .mat-resp { flex-direction: row; align-items: center; min-width: unset; width: 100%; justify-content: space-between; margin-top: 6px; }

  /* Hero buttons full width */
  .page-header > div:last-child { display: flex; flex-direction: column; gap: 8px; width: 100%; }
  .page-header .btn-primary, .page-header .btn-secondary { width: 100%; text-align: center; }

  /* AI bar */
  .ai-bar { flex-wrap: nowrap; }
}
