/* SoilRx — app-shell rich-header + dash-home extras.
   Copied VERBATIM from design/current/SoilRx User Home Dashboard.html's <style>.
   Loaded AFTER colors_and_type.css + customer-shell.css so the rich header
   (.greet/.header-actions/.profile/.menu…) and the dash-home row style the
   shared AppShell. Rules already present in customer-shell.css are NOT
   duplicated here. Do not hand-edit — these mirror the design 1:1. */

/* ---- rich header (design lines 116–157) ---- */
.app-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 16px clamp(18px, 3.5vw, 40px); background: rgba(253, 251, 246, 0.82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-1); }
.greet .hello { display: flex; align-items: center; gap: 10px; }
.greet .hello h1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(20px, 2.4vw, 26px); letter-spacing: var(--tracking-snug); margin: 0; color: var(--fg-1); }
.greet .hello .wave { width: 24px; height: 24px; color: var(--soil-400); }
.greet p { margin: 3px 0 0; font-size: 13.5px; color: var(--fg-2); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border-1); background: var(--bg-surface); color: var(--ink-600); display: grid; place-items: center; cursor: pointer; position: relative; transition: background var(--dur-fast), color var(--dur-fast); }
.icon-btn:hover { background: var(--bone-100); color: var(--ink-800); }
.icon-btn .ic { width: 20px; height: 20px; }
.icon-btn .ndot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--soil-400); border: 2px solid var(--bg-surface); }
.btn-download { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-family: var(--font-sans); font-weight: 700; font-size: 14px; color: #fff;
  background: linear-gradient(135deg, var(--leaf-400), var(--leaf-500)); border: none; border-radius: var(--radius-pill); padding: 11px 20px;
  box-shadow: 0 6px 16px -5px rgba(86,129,26,0.55); transition: transform var(--dur-fast), box-shadow var(--dur-fast); }
.btn-download:hover { transform: translateY(-1px); box-shadow: 0 9px 22px -6px rgba(86,129,26,0.6); }
.btn-download .ic { width: 18px; height: 18px; stroke-width: 2; }
.header-divider { width: 1px; height: 30px; background: var(--border-1); }
.profile { position: relative; }
.profile-btn { display: flex; align-items: center; gap: 11px; background: none; border: none; cursor: pointer; padding: 4px 8px 4px 4px; border-radius: var(--radius-pill); transition: background var(--dur-fast); }
.profile-btn:hover { background: var(--bone-100); }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 15px; font-family: var(--font-display);
  background: linear-gradient(140deg, var(--leaf-400), var(--leaf-500)); box-shadow: inset 0 0 0 2px rgba(255,255,255,0.25), 0 3px 8px -2px rgba(86,129,26,0.45); }
.profile-meta { text-align: left; line-height: 1.25; }
.profile-meta b { display: block; font-size: 14px; font-weight: 700; color: var(--fg-1); }
.profile-meta span { font-size: 12px; color: var(--fg-3); }
.profile-btn .chev { width: 18px; height: 18px; color: var(--ink-400); transition: transform var(--dur-fast); }
.profile.open .profile-btn .chev { transform: rotate(180deg); }
.menu { position: absolute; top: calc(100% + 10px); right: 0; width: 248px; background: var(--bg-surface); border: 1px solid var(--border-1); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3); padding: 8px; opacity: 0; transform: translateY(-6px) scale(0.98); transform-origin: top right; pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); z-index: 40; }
.profile.open .menu { opacity: 1; transform: none; pointer-events: auto; }
.menu-head { display: flex; align-items: center; gap: 12px; padding: 12px 12px 14px; border-bottom: 1px solid var(--border-2); margin-bottom: 6px; }
.menu-head .avatar { width: 44px; height: 44px; }
.menu-head b { display: block; font-size: 14.5px; font-weight: 700; }
.menu-head span { font-size: 12.5px; color: var(--fg-2); }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 9px; border: none; background: none; cursor: pointer; font-family: var(--font-sans); font-size: 14px; font-weight: 600; color: var(--ink-600); text-align: left; transition: background var(--dur-fast), color var(--dur-fast); }
.menu-item .ic { width: 19px; height: 19px; color: var(--ink-400); }
.menu-item:hover { background: var(--bone-100); color: var(--ink-800); }
.menu-sep { height: 1px; background: var(--border-2); margin: 6px 4px; }
.menu-item.danger { color: var(--soil-500); }
.menu-item.danger .ic { color: var(--soil-500); }

/* ---- dash-home row (design lines 614–628) ---- */
.dash-home { display: flex; align-items: center; gap: 8px; padding: 5px 8px 5px 12px; border-radius: 11px; position: relative; z-index: 1; }
.dash-home:hover { background: rgba(255,255,255,0.07); }
.dash-home.active { background: rgba(106,189,69,0.18); }
.dash-home-link { display: flex; align-items: center; gap: 13px; flex: 1; min-width: 0; color: rgba(244,248,234,0.82); text-decoration: none; font-weight: 700; font-size: 14.5px; padding: 7px 0; white-space: nowrap; }
.dash-home-link .ic { width: 21px; height: 21px; }
.dash-home:hover .dash-home-link { color: #fff; }
.dash-home.active .dash-home-link { color: #e3f4c8; }
.dash-home.active .dash-home-link .ic { color: var(--leaf-300); }
.dash-home .add { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; color: rgba(244,248,234,0.6); background: rgba(255,255,255,0.06); cursor: pointer; flex: none; transition: background var(--dur-fast), color var(--dur-fast); }
.dash-home .add:hover { background: rgba(106,189,69,0.22); color: var(--leaf-300); }
.dash-home .add .ic { width: 14px; height: 14px; stroke-width: 2.4; }
body.nav-collapsed .dash-home { justify-content: center; padding: 5px 0; }
body.nav-collapsed .dash-home-link { justify-content: center; gap: 0; flex: none; padding: 7px 0; }
body.nav-collapsed .dash-home .add { display: none; }

/* empty site tree */
.dash-tree .site-empty { padding: 10px 12px; font-size: 12.5px; line-height: 1.4; color: rgba(244,248,234,0.42); }
body.nav-collapsed .dash-tree .site-empty { display: none; }

/* ---- header responsive (design lines 395–402) ---- */
@media (max-width: 760px) {
  .profile-meta { display: none; }
  .greet p { display: none; }
}
@media (max-width: 560px) {
  .btn-download .dl-label { display: none; }
  .btn-download { padding: 11px; }
}
