/* The desktop interface stays unchanged. Mobile uses the same business data and controls. */
.nd-mobile-bar,.nd-mobile-hero{display:none}
.nd-mobile-menu{display:none}
@media(max-width:760px){
  :root{--mobile-safe-bottom:env(safe-area-inset-bottom,0px)}
  html{scroll-padding-bottom:calc(86px + var(--mobile-safe-bottom))}
  body{background:#f7f8fa}
  .app-shell{min-height:100dvh;background:#f7f8fa}
  .sidebar{background:#fff;border-right:0;border-bottom:1px solid #e5e7eb;padding:calc(12px + env(safe-area-inset-top,0px)) 16px 12px;position:sticky;top:0;z-index:20;max-height:none}
  .sidebar .brand{padding:0;gap:10px}
  .sidebar .brand-mark{width:36px;height:36px}
  .sidebar .brand strong{font-size:14px}
  .sidebar .brand span{font-size:10px}
  html.nd-live .prototype-banner{display:none}
  html.nd-live #mainNav{display:none}
  .main{padding:18px 14px calc(100px + var(--mobile-safe-bottom));background:#f7f8fa;min-width:0;max-width:100%}
  .topbar{display:flex;align-items:flex-start;gap:10px;margin-bottom:16px}
  .topbar>div:first-child{min-width:0;flex:1}
  .topbar h1{font-size:28px;line-height:1.18;margin:4px 0 5px;letter-spacing:-.035em}
  .topbar p{font-size:14px;line-height:1.45}
  .top-actions{display:flex;flex-wrap:wrap;gap:8px;width:100%}
  .top-actions .btn{min-height:42px;flex:1}
  .btn,.btn.small,.nd-chart-tools button,.quote-action,.job-action,.invoice-action{min-height:44px}
  .nd-toolbar-controls input,.nd-toolbar-controls select,.form-grid input,.form-grid select,.nd-project-fields input,#prospectDialog input,#prospectDialog select{font-size:16px;min-height:44px}
  .nd-mobile-hero{display:none;background:linear-gradient(130deg,#f4511e,#e8471c);color:#fff;padding:20px;border-radius:17px;box-shadow:0 6px 16px #ed4c2124;margin-bottom:14px;position:relative;overflow:hidden}
  html.nd-live .nd-mobile-hero{display:block}
  .nd-mobile-hero::after{content:"";position:absolute;right:-30px;top:-35px;width:170px;height:170px;border:22px solid #ffffff18;border-radius:50%;pointer-events:none}
  .nd-mobile-kicker{font-size:11px;letter-spacing:.12em;font-weight:700;color:#fff}
  .nd-mobile-hero h2{font-size:19px;margin:8px 0 12px;font-weight:650;line-height:1.25}
  .nd-mobile-hero-value{display:block;font-size:38px;font-weight:750;line-height:1}
  .nd-mobile-hero-caption{font-size:14px;margin:8px 0 14px;color:#fff}
  .nd-mobile-hero-action{border:0;border-radius:9px;padding:11px 15px;min-height:44px;background:#fff;color:#a93313;font-weight:700;font-size:14px;position:relative;z-index:1}
  #dashboard #kpiGrid{border:0;overflow:visible;gap:10px;grid-template-columns:repeat(2,minmax(0,1fr))}
  #kpiGrid .nd-stat{border:1px solid #e7e9eb!important;background:#fff;border-radius:13px;overflow:hidden}
  .nd-stat-body{min-height:116px;padding:13px 10px}
  .nd-stat-label{font-size:12px;line-height:1.35;padding-right:19px}
  .nd-stat-icon{right:9px;top:11px}
  .nd-stat-icon svg{width:17px;height:17px}
  .nd-stat-val{font-size:25px}
  .nd-stat-note{font-size:12px}
  .nd-stat-detail{min-height:42px;font-size:13px}
  .nd-middle{background:#fff;border-radius:14px}
  .nd-analytics{padding:13px 10px 11px}
  .nd-chart-tools{gap:4px}
  .nd-chart-tools button{padding:6px 8px}
  .nd-gauge-note{padding:12px 14px}
  .nd-bottom{gap:10px}
  .nd-bottom .card{border-radius:14px}
  .nd-lead-grid{gap:10px}
  .nd-lead-grid .kpi-card{padding:13px}
  .nd-lead-grid .kpi-value{font-size:24px}
  .nd-lead-table{background:transparent;border:0;box-shadow:none}
  .nd-lead-table .nd-toolbar{padding:10px 0;border:0}
  .nd-toolbar-controls{gap:7px}
  .nd-toolbar-controls input{width:100%;flex:1 1 100%;min-width:0}
  .nd-toolbar-controls select{flex:1;min-width:0}
  #ndLeadTableWrap:not([hidden]){display:block;overflow:visible}
  #ndLeadTableWrap[hidden]{display:none!important}
  .nd-lead-table table,.nd-lead-table tbody{display:block;width:100%;min-width:0}
  .nd-lead-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .nd-lead-table tbody tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px 10px;border:1px solid #e5e7eb;border-radius:15px;background:#fff;padding:15px;margin-bottom:12px;box-shadow:0 2px 5px #12121206}
  .nd-lead-table tbody td{display:block;padding:0;border:0;overflow-wrap:anywhere;min-width:0;font-size:14px}
  .nd-lead-table tbody td:first-child,.nd-lead-table tbody td:last-child{grid-column:1/-1}
  .nd-lead-table tbody td:first-child{padding-bottom:11px;border-bottom:1px solid #edf0f2}
  .nd-lead-table tbody td:nth-child(2)::before,.nd-lead-table tbody td:nth-child(3)::before,.nd-lead-table tbody td:nth-child(4)::before,.nd-lead-table tbody td:nth-child(5)::before{display:block;font-size:11px;letter-spacing:.04em;font-weight:650;color:#66707b;margin-bottom:4px}
  .nd-lead-table tbody td:nth-child(2)::before{content:"SERVICE"}
  .nd-lead-table tbody td:nth-child(3)::before{content:"STAGE"}
  .nd-lead-table tbody td:nth-child(4)::before{content:"VALUE"}
  .nd-lead-table tbody td:nth-child(5)::before{content:"FOLLOW-UP"}
  .nd-person .avatar{width:42px;height:42px;font-size:14px}
  .nd-lead-table tbody td:first-child strong{font-size:16px}
  .nd-lead-table .nd-stage{font-size:13px}
  .nd-lead-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:2px;padding-top:10px;border-top:1px solid #edf0f2}
  .nd-lead-actions .btn{white-space:normal;text-align:center;justify-content:center;padding:9px}
  .nd-lead-table tbody td.empty{grid-column:1/-1;border:0;padding:10px}
  .nd-lead-table tbody td.empty::before{content:none}
  .nd-lead-foot{padding:9px 2px;border:0}
  .table-wrap{overflow-x:auto}
  .nd-project-dialog,.nd-archive-dialog,#prospectDialog{max-height:calc(100dvh - 30px);overflow:auto}
  html.nd-live .nd-mobile-bar{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));position:fixed;bottom:0;left:0;right:0;padding:7px 5px calc(7px + var(--mobile-safe-bottom));background:#fff;border-top:1px solid #e4e6e9;z-index:60;box-shadow:0 -4px 15px #14141408}
  .nd-mobile-tab{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:4px;border:0;background:none;min-width:0;min-height:54px;color:#636e7b;font-size:11px;font-weight:600;padding:4px 0;border-radius:10px;cursor:pointer}
  .nd-mobile-tab svg{width:23px;height:23px}
  .nd-mobile-tab.active{color:#cf3b13;background:#fff0e9}
  .nd-mobile-tab:focus-visible,.nd-mobile-menu-option:focus-visible{outline:2px solid #d6461b;outline-offset:1px}
  .nd-mobile-menu[open]{display:block;position:fixed;inset:auto 0 0;width:100%;max-width:none;max-height:85dvh;margin:0;padding:20px 16px calc(24px + var(--mobile-safe-bottom));border:0;border-radius:20px 20px 0 0;background:#fff;color:#191b1e;overflow:auto}
  .nd-mobile-menu::backdrop{background:#191b1e80}
  .nd-mobile-menu-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
  .nd-mobile-menu-head h2{font-size:20px;line-height:1.25;margin:0}
  .nd-mobile-menu-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .nd-mobile-menu-option{display:flex;align-items:center;gap:10px;text-align:left;min-height:54px;background:#f8f9fa;border:1px solid #e5e7eb;border-radius:11px;padding:11px;font-size:14px;color:#24292f;font-weight:650}
  .nd-mobile-menu-option svg{width:22px;height:22px;color:#e54b20;flex:none}
  .nd-mobile-install{width:100%;margin-top:15px}
  .nd-mobile-install[hidden],.nd-mobile-install-help[hidden]{display:none}
  .nd-mobile-install-help{font-size:14px;line-height:1.55;color:#535d68}
  .toast{bottom:calc(82px + var(--mobile-safe-bottom));max-width:calc(100% - 28px)}
  body>a[href="https://kierangrantwebdesign.co.uk/business-hub/"]{display:none}
}
@media(min-width:761px){.nd-mobile-menu[open]{display:none}}
