/* ============================================================
   Cabin Fever Digital · CPM Tool · cpm.css
   Design system for the // jobs subdomain.
   Aligned with cabinfeverdigital.com brand palette.
   ============================================================ */

:root {
  /* Core CFD palette (from cfd.css) */
  --bg:           #1C1C1E;
  --text:         #F5F0E8;
  --brass:        #B8963E;
  --brass-dim:    rgba(184, 150, 62, 0.12);
  --brass-bright: #C9A649;
  --surface:      #222224;
  --surface-2:    #282828;
  --surface-3:    #2D2D2F;
  --border:       rgba(245, 240, 232, 0.07);
  --border-strong:rgba(245, 240, 232, 0.14);
  --dim:          rgba(245, 240, 232, 0.48);
  --dim-2:        rgba(245, 240, 232, 0.72);

  /* Status colors (CFD-aligned: blue/green/red/amber) */
  --status-blue:      #0A84FF;
  --status-blue-dim:  rgba(10, 132, 255, 0.14);
  --status-green:     #34C759;
  --status-green-dim: rgba(52, 199, 89, 0.14);
  --status-red:       #FF453A;
  --status-red-dim:   rgba(255, 69, 58, 0.14);
  --status-amber:     #FFB340;
  --status-amber-dim: rgba(255, 179, 64, 0.14);

  /* Typography */
  --font-sans: "DM Sans", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;

  /* Spacing scale */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;

  /* Sizing */
  --nav-width: 232px;
  --top-bar-height: 60px;
  --radius-sm: 2px;
  --radius-md: 3px;

  /* Motion */
  --t-fast: 160ms;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

::selection { background: var(--brass); color: var(--bg); }
a { color: inherit; text-decoration: none; }

/* Visually hidden (for accessibility) */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   App layout
   ============================================================ */
.app {
  display: grid;
  grid-template-columns: var(--nav-width) 1fr;
  grid-template-rows: var(--top-bar-height) 1fr;
  grid-template-areas:
    "topbar topbar"
    "nav    main";
  min-height: 100vh;
}

/* ============================================================
   Top bar — CFD-style co-branded
   ============================================================ */
.top-bar {
  grid-area: topbar;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 var(--sp-5) 0 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Hamburger button (mobile only) */
.hamburger {
  display: none;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 10px;
  margin-left: var(--sp-2);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--t-fast) ease, color var(--t-fast) ease;
}

.hamburger:hover { background: var(--surface); color: var(--brass); }
.hamburger:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

.cfd-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 var(--sp-6);
  height: 100%;
  width: var(--nav-width);
  border-right: 1px solid var(--border);
  flex-shrink: 0;
}

.cfd-logo__mark {
  width: 28px;
  height: 28px;
  border: 1px solid var(--brass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14px;
  color: var(--brass);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.cfd-logo__divider {
  width: 1px;
  height: 26px;
  background: var(--border-strong);
}

.cfd-logo__word {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cfd-logo__primary {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--text);
  line-height: 1;
}

.cfd-logo__sub {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cfd-logo__rule {
  width: 11px;
  height: 1px;
  background: var(--brass);
}

.cfd-logo__sub-text {
  font-size: 7px;
  font-weight: 500;
  letter-spacing: 0.4em;
  color: var(--text);
  opacity: 0.5;
}

.tool-label {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding-left: var(--sp-6);
  height: 100%;
  border-right: 1px solid var(--border);
  padding-right: var(--sp-6);
  flex-shrink: 0;
}

.tool-label__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brass);
}

.tool-label__text {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--dim-2);
}

.tool-label__text strong {
  color: var(--text);
  font-weight: 500;
}

.search-wrap {
  flex: 1;
  max-width: 460px;
  margin: 0 var(--sp-6);
  position: relative;
}

.search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px 8px 36px;
  font-family: var(--font-sans);
  font-size: 13px;
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--t-fast) ease;
}

.search-input::placeholder { color: var(--dim); }
.search-input:focus { border-color: var(--brass); }

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dim);
  pointer-events: none;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-left: auto;
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--dim-2);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  position: relative;
  transition: color var(--t-fast) ease, background var(--t-fast) ease;
}

.icon-btn:hover { background: var(--surface); color: var(--text); }
.icon-btn:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

.notification-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  background: var(--brass);
  border-radius: 50%;
  border: 2px solid var(--bg);
}

.avatar {
  width: 30px;
  height: 30px;
  background: var(--brass-dim);
  color: var(--brass);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.04em;
  cursor: pointer;
  margin-left: var(--sp-2);
  flex-shrink: 0;
}

/* ============================================================
   Left navigation
   ============================================================ */
.nav {
  grid-area: nav;
  background: var(--bg);
  border-right: 1px solid var(--border);
  padding: var(--sp-5) 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.nav-section {
  padding: 0 var(--sp-3);
}

.nav-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--brass);
  padding: var(--sp-2) var(--sp-3);
  margin-top: var(--sp-4);
  margin-bottom: var(--sp-1);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.nav-label::before {
  content: "";
  width: 14px;
  height: 1px;
  background: var(--brass);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 9px var(--sp-3);
  font-size: 13px;
  color: var(--dim-2);
  text-decoration: none;
  border-radius: var(--radius-sm);
  margin-bottom: 1px;
  cursor: pointer;
  transition: background var(--t-fast) ease, color var(--t-fast) ease;
  position: relative;
}

.nav-item:hover {
  background: var(--surface);
  color: var(--text);
}

.nav-item.active {
  background: var(--brass-dim);
  color: var(--brass);
  font-weight: 500;
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--brass);
}

.nav-item .icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke-width: 1.5;
}

.nav-item .count {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  color: var(--dim);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.nav-item.active .count {
  color: var(--brass);
}

.nav-footer {
  margin-top: auto;
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--border);
  font-size: 10px;
  color: var(--dim);
  font-family: var(--font-mono);
  line-height: 1.6;
  letter-spacing: 0.02em;
}

.nav-footer .commit {
  color: var(--brass);
}

/* Mobile drawer backdrop (hidden on desktop) */
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 19;
  opacity: 0;
  transition: opacity var(--t-fast) ease;
}

/* ============================================================
   Main content area
   ============================================================ */
.main {
  grid-area: main;
  padding: var(--sp-6) var(--sp-8);
  overflow-y: auto;
}

/* Page header */
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--sp-8);
  gap: var(--sp-6);
}

.greeting-block .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}

.greeting-block .eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--brass);
}

.greeting-block .eyebrow__label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.32em;
  color: var(--brass);
  text-transform: uppercase;
  font-family: var(--font-sans);
}

.greeting-block h1 {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(28px, 3.6vw, 42px);
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: var(--sp-3);
}

.greeting-block h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--dim-2);
}

.greeting-block .status-line {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dim);
  letter-spacing: 0.02em;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
}

.greeting-block .status-line .sep {
  color: var(--border-strong);
}

.greeting-block .status-line strong {
  color: var(--text);
  font-weight: 500;
}

.greeting-block .status-line .hot {
  color: var(--brass);
  font-weight: 500;
}

.page-actions {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
  flex-shrink: 0;
}

/* Buttons */
.btn {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  transition: all var(--t-fast) ease;
  text-decoration: none;
  letter-spacing: 0.03em;
  line-height: 1;
}

.btn:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

.btn-brass {
  background: var(--brass);
  color: #1A1A1C;
  border-color: var(--brass);
}

.btn-brass:hover { background: var(--brass-bright); border-color: var(--brass-bright); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  border-color: var(--brass);
  color: var(--brass);
}

/* ============================================================
   Dashboard grid
   ============================================================ */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--sp-6);
}

@media (max-width: 1100px) {
  .dashboard-grid { grid-template-columns: 1fr; }
}

.dashboard-col { display: flex; flex-direction: column; gap: var(--sp-5); }

/* ============================================================
   Widgets
   ============================================================ */
.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.widget-title {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--text);
}

.widget-title .marker {
  display: inline-block;
  width: 4px;
  height: 4px;
  background: var(--brass);
  border-radius: 50%;
}

.widget-title .count {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--dim);
  margin-left: var(--sp-1);
  letter-spacing: 0.02em;
}

.widget-link {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--brass);
  text-decoration: none;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 4px;
}

.widget-link:hover { color: var(--brass-bright); }
.widget-body { padding: 0; }

/* ============================================================
   Appointment list
   ============================================================ */
.appt-list { list-style: none; }

.appt-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast) ease;
  cursor: pointer;
}

.appt-item:hover { background: var(--surface-2); }
.appt-item:last-child { border-bottom: none; }

.appt-time {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--brass);
  width: 72px;
  flex-shrink: 0;
  padding-top: 2px;
  letter-spacing: 0.02em;
}

.appt-body { flex: 1; min-width: 0; }

.appt-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 3px;
  line-height: 1.35;
  color: var(--text);
}

.appt-meta {
  font-size: 12px;
  color: var(--dim);
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.appt-meta a { color: var(--brass); text-decoration: none; }
.appt-meta a:hover { border-bottom: 1px solid var(--brass); }

.appt-type-badge {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  margin-top: 2px;
  font-family: var(--font-sans);
}

.badge-site { background: var(--status-blue-dim); color: var(--status-blue); }
.badge-meeting { background: var(--status-green-dim); color: var(--status-green); }
.badge-inspection { background: var(--status-amber-dim); color: var(--status-amber); }
.badge-sub { background: var(--brass-dim); color: var(--brass); }

/* ============================================================
   Follow-ups
   ============================================================ */
.followup-list { list-style: none; }

.followup-item {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: var(--sp-3);
  align-items: flex-start;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--t-fast) ease;
}

.followup-item:hover { background: var(--surface-2); }
.followup-item:last-child { border-bottom: none; }

.followup-check {
  width: 14px;
  height: 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-top: 2px;
  transition: border-color var(--t-fast) ease;
}

.followup-item:hover .followup-check { border-color: var(--brass); }

.followup-body { min-width: 0; }

.followup-text {
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 4px;
  color: var(--text);
}

.followup-meta {
  font-size: 11px;
  color: var(--dim);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.followup-meta a { color: var(--brass); text-decoration: none; font-family: var(--font-sans); }

.followup-age {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--status-amber);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  padding-top: 3px;
}

.followup-age.old { color: var(--status-red); }

/* ============================================================
   Deadlines
   ============================================================ */
.deadline-list { list-style: none; }

.deadline-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: var(--sp-3);
  align-items: center;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  transition: background var(--t-fast) ease;
  cursor: pointer;
}

.deadline-item:hover { background: var(--surface-2); }
.deadline-item:last-child { border-bottom: none; }

.deadline-when {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-align: right;
  letter-spacing: 0.02em;
}

.deadline-when.past { color: var(--status-red); }
.deadline-when.soon { color: var(--status-amber); }
.deadline-when.ok { color: var(--dim-2); }

.deadline-body { line-height: 1.3; min-width: 0; }

.deadline-title { font-weight: 400; color: var(--text); font-size: 13px; }

.deadline-meta {
  font-size: 11px;
  color: var(--dim);
  font-family: var(--font-mono);
  margin-top: 2px;
  letter-spacing: 0.02em;
}

.deadline-cat {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
  white-space: nowrap;
}

/* ============================================================
   Active jobs grid
   ============================================================ */
.jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1px;
  background: var(--border);
}

.job-card {
  background: var(--surface);
  padding: var(--sp-4);
  cursor: pointer;
  transition: background var(--t-fast) ease;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  color: inherit;
  text-decoration: none;
}

.job-card:hover { background: var(--surface-2); }
.job-card:hover .job-card-name { color: var(--brass); }

.job-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-2);
}

.job-card-name {
  font-weight: 500;
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--text);
  transition: color var(--t-fast) ease;
}

.job-card-client {
  font-size: 11px;
  color: var(--dim);
  font-family: var(--font-mono);
  margin-top: 2px;
  letter-spacing: 0.02em;
}

.status-badge {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.status-lead, .status-estimate { background: var(--status-blue-dim); color: var(--status-blue); }
.status-signed { background: var(--brass-dim); color: var(--brass); }
.status-in-progress { background: var(--status-green-dim); color: var(--status-green); }
.status-punch { background: var(--status-amber-dim); color: var(--status-amber); }
.status-complete { background: var(--border); color: var(--dim-2); }

.job-card-photos {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 10px;
  color: var(--dim);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.photo-bar {
  flex: 1;
  height: 3px;
  background: var(--border);
  border-radius: 1px;
  overflow: hidden;
}

.photo-bar-fill {
  height: 100%;
  background: var(--status-green);
  transition: width 0.3s;
}

.photo-bar-fill.warning { background: var(--status-amber); }
.photo-bar-fill.danger { background: var(--status-red); }

.job-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--sp-2);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
}

.job-card-stat {
  font-size: 10px;
  color: var(--dim);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

.job-card-stat .num {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  display: block;
  margin-bottom: 2px;
  font-family: var(--font-sans);
  letter-spacing: -0.01em;
}

.job-card-next {
  font-size: 11px;
  color: var(--dim);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.job-card-next strong {
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 500;
}

/* ============================================================
   Activity
   ============================================================ */
.activity-list { list-style: none; }

.activity-item {
  display: grid;
  grid-template-columns: 6px 1fr auto;
  gap: var(--sp-3);
  align-items: flex-start;
  padding: var(--sp-3) var(--sp-4);
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast) ease;
}

.activity-item:hover { background: var(--surface-2); }
.activity-item:last-child { border-bottom: none; }

.activity-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brass);
  margin-top: 8px;
}

.activity-dot.green { background: var(--status-green); }
.activity-dot.amber { background: var(--status-amber); }
.activity-dot.dim { background: var(--dim); }

.activity-body { min-width: 0; line-height: 1.4; color: var(--dim-2); }
.activity-body strong { color: var(--text); font-weight: 500; }

.activity-job {
  font-size: 10px;
  color: var(--dim);
  font-family: var(--font-mono);
  margin-top: 2px;
  letter-spacing: 0.02em;
}

.activity-when {
  font-size: 10px;
  color: var(--dim);
  font-family: var(--font-mono);
  white-space: nowrap;
  padding-top: 2px;
  letter-spacing: 0.02em;
}

/* ============================================================
   Overdue bills
   ============================================================ */
.bills-list { list-style: none; }

.bill-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--sp-3);
  align-items: center;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  cursor: pointer;
  transition: background var(--t-fast) ease;
}

.bill-item:hover { background: var(--surface-2); }
.bill-item:last-child { border-bottom: none; }

.bill-vendor { font-weight: 500; color: var(--text); }
.bill-meta { font-size: 10px; color: var(--dim); font-family: var(--font-mono); margin-top: 2px; letter-spacing: 0.02em; }

.bill-amount {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  letter-spacing: 0.02em;
}

.bill-overdue {
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--status-red);
  background: var(--status-red-dim);
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

/* ============================================================
   Feedback FAB
   ============================================================ */
.feedback-fab {
  position: fixed;
  bottom: var(--sp-5);
  right: var(--sp-5);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  padding: 10px 18px;
  border-radius: 24px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  z-index: 50;
  transition: all var(--t-fast) ease;
  letter-spacing: 0.04em;
}

.feedback-fab:hover {
  border-color: var(--brass);
  color: var(--brass);
}

.feedback-fab:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

/* ============================================================
   Mobile (≤768px): drawer-style nav with hamburger
   ============================================================ */
@media (max-width: 768px) {
  .app {
    grid-template-columns: 1fr;
    grid-template-areas:
      "topbar"
      "main";
  }

  .hamburger { display: flex; }

  .cfd-logo {
    padding: 0 var(--sp-3);
    width: auto;
    gap: 10px;
    border-right: none;
  }

  .cfd-logo__primary { font-size: 11px; }
  .cfd-logo__sub-text { font-size: 6px; }

  .tool-label {
    padding: 0 var(--sp-3);
    border-right: none;
  }

  .search-wrap { display: none; }

  /* Nav becomes an off-canvas drawer */
  .nav {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 280px;
    max-width: 85vw;
    background: var(--bg);
    border-right: 1px solid var(--border-strong);
    z-index: 20;
    transform: translateX(-100%);
    transition: transform 220ms ease;
    padding-top: var(--sp-5);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
  }

  .nav.open { transform: translateX(0); }

  .nav-backdrop.open {
    display: block;
    opacity: 1;
  }

  .nav-item { padding: 12px var(--sp-3); font-size: 14px; }

  .main {
    padding: var(--sp-4);
    grid-area: main;
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-4);
  }

  .greeting-block h1 { font-size: 28px; }

  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; justify-content: center; }

  .dashboard-grid { gap: var(--sp-4); }

  /* Job cards in a single column on phone */
  .jobs-grid { grid-template-columns: 1fr; }

  /* Feedback button — keep visible but slightly smaller */
  .feedback-fab { bottom: var(--sp-4); right: var(--sp-4); padding: 9px 14px; font-size: 11px; }
}

/* Tablet tweaks: between 768 and 1100 — nav stays, content single-column */
@media (min-width: 769px) and (max-width: 1100px) {
  .main { padding: var(--sp-5) var(--sp-6); }
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
