/* App-specific mobile composition; the desktop workspace is untouched. */
.rq-mobile-sheet[hidden] { display:none; }
.rq-mobile-new-sheet:not([open]) { display:none; }
.rq-mobile-page { display:none; }
@media (max-width:820px) {
  html .requote-app { background:var(--m-background); color:var(--m-ink); }
  html .requote-app .app-layout { display:block; padding-top:70px; }
  html .requote-app .sidebar, html .requote-app .rq-topbar { display:none; }
  html .requote-app .main-content { width:100%; min-width:0; margin:0; padding:20px 20px calc(104px + env(safe-area-inset-bottom)); height:auto; min-height:calc(100dvh - 70px); overflow:visible; }
  html .requote-app .rq-page-content { padding:0; }
  .requote-app .page { min-width:0; }
  html .requote-app .rq-quotes-shell, html .requote-app .rq-settings-shell, html .requote-app .rq-analytics-shell, html .requote-app .rq-messages-shell { width:100%; margin:0; padding:8px 0 0; }
  .requote-app .rq-mobile-page.active { display:block; }
  .rq-mobile-app-header { position:fixed; z-index:900; top:0; left:0; right:0; height:70px; display:flex; align-items:center; justify-content:space-between; gap:14px; padding:14px 20px; background:var(--m-background); border-bottom:1px solid var(--m-line); }
  .rq-mobile-app-header a { min-height:44px; display:flex; align-items:center; }
  .rq-mobile-app-header img { width:112px; height:32px; object-fit:contain; }
  .rq-mobile-service { font-size:11px; padding:7px 10px; border:1px solid var(--m-line); border-radius:30px; color:var(--m-muted); }
  .rq-mobile-bottom-nav { position:fixed; z-index:950; bottom:0; left:0; right:0; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:2px; padding:8px 12px calc(8px + env(safe-area-inset-bottom)); min-height:76px; background:var(--m-background); border-top:1px solid var(--m-line); box-shadow:0 -12px 30px rgba(0,0,0,.08); }
  .rq-mobile-bottom-nav button { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; min-width:0; min-height:52px; padding:4px; border:0; border-radius:12px; color:var(--m-muted); background:none; font-size:11px; font-weight:600; cursor:pointer; }
  .rq-mobile-bottom-nav svg { width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
  .rq-mobile-bottom-nav button[aria-current="page"] { background:rgba(110,127,249,.1); color:var(--m-brand); }
  .rq-mobile-bottom-nav .rq-mobile-nav-create svg { width:38px; height:38px; padding:9px; border-radius:13px; color:white; background:linear-gradient(130deg,#5878ff,#7c5be8); margin-top:-14px; box-shadow:0 5px 18px rgba(100,90,230,.2); }
  .rq-mobile-bottom-nav button:focus-visible { outline:2px solid var(--m-brand); outline-offset:-2px; }
  .requote-app #page-dashboard .rq-overview-shell { display:none; }
  .rq-mobile-home-greeting { padding:8px 0 25px; }
  .rq-mobile-home h1, .rq-mobile-page-heading h1 { margin:12px 0 0; font-size:32px; font-weight:730; line-height:1.16; letter-spacing:-.04em; color:var(--m-ink); }
  .rq-mobile-value { position:relative; border-bottom:1px solid var(--m-line); padding:0 0 26px; margin:0 0 22px; }
  .rq-mobile-value > span { font-size:11px; font-weight:700; letter-spacing:.1em; color:var(--m-muted); }
  .rq-mobile-value > strong { display:block; font-size:clamp(46px,12vw,60px); font-weight:760; line-height:1.08; letter-spacing:-.05em; color:var(--m-ink); margin:12px 0; overflow-wrap:anywhere; }
  .rq-mobile-value p { margin:0 0 8px; color:var(--m-ink); font-size:14px; }
  .rq-mobile-value small { font-size:11px; color:var(--m-muted); }
  .rq-mobile-home-stats { display:grid; grid-template-columns:1fr 1fr; gap:20px; padding:24px 0 26px; border-bottom:1px solid var(--m-line); }
  .rq-mobile-home-stats > div { display:grid; gap:8px; }
  .rq-mobile-home-stats strong { font-size:25px; line-height:1; color:var(--m-brand); }
  .rq-mobile-home-stats span { color:var(--m-muted); font-size:12px; }
  .rq-mobile-section-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:26px 0 10px; }
  .rq-mobile-section-heading h2 { margin:8px 0; font-size:22px; letter-spacing:-.035em; color:var(--m-ink); }
  .rq-mobile-section-heading button { border:0; min-height:44px; background:none; color:var(--m-brand); font-size:13px; cursor:pointer; }
  .rq-mobile-timeline { display:grid; }
  .rq-mobile-event { position:relative; display:grid; grid-template-columns:32px minmax(0,1fr); gap:12px; padding:18px 0; border-bottom:1px solid var(--m-line); }
  .rq-mobile-event-icon { display:grid; place-items:center; align-self:start; width:32px; height:32px; border-radius:10px; color:var(--m-brand); background:rgba(111,129,255,.1); font-size:14px; }
  .rq-mobile-event strong { display:block; color:var(--m-ink); font-size:14px; line-height:1.5; }
  .rq-mobile-event p { margin:6px 0; font-size:13px; line-height:1.65; color:var(--m-muted); white-space:pre-wrap; overflow-wrap:anywhere; }
  .rq-mobile-event time { display:block; margin-top:6px; font-size:11px; color:var(--m-muted); }
  .rq-mobile-event button { padding:5px 0; min-height:44px; border:0; background:none; color:var(--m-brand); font-size:13px; cursor:pointer; }
  .rq-mobile-page-heading { padding:8px 0 22px; }
  .rq-mobile-page-heading p { margin:12px 0 0; font-size:14px; line-height:1.6; color:var(--m-muted); }
  html .requote-app .page-header, html .requote-app .rq-page-header { gap:16px; flex-wrap:wrap; margin-bottom:22px; }
  html .requote-app .page-header h2 { font-size:28px; line-height:1.2; letter-spacing:-.04em; }
  html .requote-app .page-header p { font-size:14px; line-height:1.6; }
  html .requote-app .rq-quotes-intro { margin-bottom:18px; }
  html .requote-app .rq-quotes-intro h1 { margin:10px 0; font-size:30px; }
  html .requote-app .rq-quotes-intro p { font-size:13px; line-height:1.6; }
  html .requote-app .rq-quotes-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; padding:18px 0; margin:0 0 18px; border:0; border-bottom:1px solid var(--m-line); border-radius:0; background:none; box-shadow:none; }
  html .requote-app .rq-quotes-summary-item { padding:0; border:0; }
  html .requote-app .rq-quotes-summary-item:nth-child(n+3) { display:none; }
  html .requote-app .rq-quotes-summary-item strong { font-size:28px; line-height:1.2; margin:8px 0; }
  html .requote-app .rq-quotes-summary-item span { font-size:12px; }
  html .requote-app .rq-quotes-summary-item small { font-size:11px; }
  html .requote-app .rq-quotes-workspace { border:0; box-shadow:none; background:none; }
  html .requote-app .rq-quotes-toolbar, html .requote-app .rq-quotes-toolbar-left { display:block; padding:0; }
  html .requote-app .rq-quotes-toolbar-right { display:flex; align-items:flex-end; gap:12px; margin:12px 0 18px; }
  .rq-mobile-quote-filter { flex:1; min-width:0; }
  .rq-mobile-quote-filter > span { display:block; font-size:11px; margin-bottom:8px; color:var(--m-muted); }
  html .requote-app .rq-mobile-quote-filter select { width:100%; padding:10px; background:var(--m-surface); color:var(--m-ink); border:1px solid var(--m-line); }
  html .requote-app #openImportButton { min-height:48px; }
  html .requote-app .rq-quotes-search { width:100%; max-width:none; min-height:50px; }
  html .requote-app .rq-quotes-filters { display:none; }
  html .requote-app .rq-quote-filter { min-height:44px; padding:9px 11px; font-size:12px; }
  html .requote-app #quotesList { display:grid; grid-template-columns:1fr; gap:14px; }
  html .requote-app .rq-quotes-list { padding:0; }
  html .requote-app .rq-premium-quote { padding:18px; border-radius:18px; background:var(--m-surface); border:1px solid var(--m-line); width:100%; min-width:0; box-shadow:none; }
  html .requote-app .rq-premium-quote-main { display:flex; flex-direction:column; align-items:stretch; gap:16px; }
  html .requote-app .rq-premium-customer { gap:10px; min-width:0; }
  html .requote-app .rq-premium-customer-copy { min-width:0; }
  html .requote-app .rq-premium-customer-name { font-size:17px; white-space:normal; overflow-wrap:anywhere; }
  html .requote-app .rq-premium-email { font-size:12px; overflow-wrap:anywhere; white-space:normal; }
  html .requote-app .rq-premium-avatar { width:36px; height:36px; font-size:12px; }
  html .requote-app .rq-premium-value-area { display:flex; flex-direction:row; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; }
  html .requote-app .rq-premium-amount { font-size:28px; letter-spacing:-.04em; }
  html .requote-app .rq-premium-status { min-height:28px; font-size:11px; padding:6px 10px; }
  html .requote-app .rq-premium-subject { display:grid; gap:4px; margin:16px 0; font-size:13px; line-height:1.65; white-space:normal; overflow-wrap:anywhere; }
  html .requote-app .rq-premium-work { white-space:normal; overflow:visible; text-overflow:clip; }
  html .requote-app .rq-premium-separator { display:none; }
  html .requote-app .rq-premium-footer { display:block; margin-top:0; padding-top:12px; }
  html .requote-app .rq-premium-meta { display:flex; flex-wrap:wrap; gap:12px; }
  html .requote-app .rq-premium-date, html .requote-app .rq-premium-automation { font-size:11px; white-space:normal; line-height:1.5; }
  html .requote-app .rq-premium-actions { display:none; }
  html .requote-app .rq-premium-automation { display:none; }
  .rq-mobile-quote-automation { font-size:11px; line-height:1.6; color:var(--m-muted); }
  .rq-mobile-open-quote { display:flex; align-items:center; justify-content:space-between; width:100%; min-height:46px; margin-top:12px; padding:12px 0 0; border:0; border-top:1px solid var(--m-line); background:none; color:var(--m-brand); font-size:13px; font-weight:650; cursor:pointer; }
  .requote-app #newQuoteSection { display:none; }
  .rq-mobile-sheet:not([hidden]), .rq-mobile-new-sheet[open] { position:fixed; inset:0; z-index:1200; width:100%; height:100dvh; max-width:none; max-height:none; margin:0; padding:0; border:0; border-radius:0; background:var(--m-background); color:var(--m-ink); overflow:auto; overscroll-behavior:contain; }
  .rq-mobile-new-sheet::backdrop { background:var(--m-background); }
  .rq-mobile-sheet, .rq-mobile-new-sheet { scroll-padding-top:84px; scroll-padding-bottom:110px; }
  .rq-mobile-sheet-header { position:sticky; z-index:2; top:0; display:flex; align-items:center; gap:14px; padding:12px 18px; border-bottom:1px solid var(--m-line); background:var(--m-background); }
  .rq-mobile-sheet-header h2 { margin:0; font-size:17px; letter-spacing:-.02em; }
  .rq-mobile-sheet-body, #mobileNewQuoteBody { padding:24px 20px calc(32px + env(safe-area-inset-bottom)); }
  .rq-mobile-detail-identity { padding-bottom:24px; border-bottom:1px solid var(--m-line); }
  .rq-mobile-detail-identity h1 { font-size:29px; letter-spacing:-.04em; margin:12px 0; }
  .rq-mobile-detail-identity > strong { display:block; font-size:42px; letter-spacing:-.04em; margin:14px 0; }
  .rq-mobile-detail-status { display:inline-flex; border:1px solid var(--m-line); border-radius:20px; padding:7px 11px; color:var(--m-brand); font-size:12px; }
  .rq-mobile-detail-fields { display:grid; margin:0; padding:8px 0 24px; }
  .rq-mobile-detail-fields > div { padding:15px 0; border-bottom:1px solid var(--m-line); }
  .rq-mobile-detail-fields dt { font-size:11px; color:var(--m-muted); margin-bottom:7px; }
  .rq-mobile-detail-fields dd { margin:0; font-size:14px; line-height:1.6; white-space:pre-wrap; overflow-wrap:anywhere; }
  .rq-mobile-detail-title { font-size:20px; margin:24px 0 12px; letter-spacing:-.025em; }
  .rq-mobile-detail-actions { position:fixed; bottom:0; left:0; right:0; padding:14px 20px calc(14px + env(safe-area-inset-bottom)); border-top:1px solid var(--m-line); background:var(--m-background); }
  #mobileQuoteDetail { padding-bottom:150px; }
  html .requote-app .rq-mobile-detail-actions .rq-premium-actions { display:block; }
  .rq-mobile-detail-actions .rq-status-control { width:100%; display:grid; gap:10px; font-size:13px; }
  .rq-mobile-detail-actions select { width:100%; min-height:50px; font-size:16px; border:1px solid var(--m-line); border-radius:12px; padding:12px; background:var(--m-surface); color:var(--m-ink); }
  html .requote-app #mobileNewQuoteBody #newQuoteSection { display:block; border:0; background:none; box-shadow:none; padding:0; margin:0; }
  html .requote-app #mobileNewQuoteBody .rq-new-quote-header { display:none; }
  html .requote-app .rq-new-quote-body { padding:0; }
  html .requote-app .rq-new-quote-grid, html .requote-app .rq-settings-grid { display:grid; grid-template-columns:1fr; gap:20px; }
  html .requote-app .rq-field-wide { grid-column:auto; }
  html .requote-app .rq-field label { display:block; font-size:13px; margin-bottom:9px; }
  html .requote-app input:not([type="checkbox"]):not([type="radio"]), html .requote-app select, html .requote-app textarea { max-width:100%; min-width:0; min-height:48px; font-size:16px; border-radius:12px; }
  html .requote-app textarea { min-height:110px; }
  html .requote-app #mobileNewQuoteBody { padding-bottom:130px; }
  html .requote-app #mobileNewQuoteBody .rq-new-quote-actions { position:fixed; bottom:0; left:0; right:0; z-index:3; padding:14px 20px calc(14px + env(safe-area-inset-bottom)); border-top:1px solid var(--m-line); background:var(--m-background); }
  html .requote-app #mobileNewQuoteBody .rq-new-quote-actions button { width:100%; }
  .rq-mobile-form-feedback:not([hidden]) { position:fixed; z-index:4; bottom:calc(88px + env(safe-area-inset-bottom)); left:20px; right:20px; max-height:25dvh; overflow:auto; margin:0; padding:14px; border:1px solid var(--m-line); border-radius:12px; background:var(--m-surface); color:var(--m-ink); font-size:14px; line-height:1.6; }
  html .requote-app .rq-new-quote-actions button, html .requote-app .rq-settings-actions button { min-height:50px; }
  .rq-mobile-more-list, .rq-mobile-settings-index { display:grid; }
  .rq-mobile-more-list button, .rq-mobile-settings-index button { display:flex; align-items:center; justify-content:space-between; gap:18px; min-height:76px; padding:18px 0; text-align:left; color:var(--m-ink); border:0; border-bottom:1px solid var(--m-line); background:none; font-size:16px; cursor:pointer; }
  .rq-mobile-more-list small, .rq-mobile-settings-index small { display:block; margin-top:7px; color:var(--m-muted); font-size:12px; }
  .rq-mobile-more-list b, .rq-mobile-settings-index b { font-size:24px; font-weight:400; color:var(--m-muted); }
  .rq-mobile-more-list button[hidden], .rq-mobile-settings-index button[hidden] { display:none; }
  .rq-mobile-settings-back { display:none; min-height:44px; margin:0 0 20px; padding:0; border:0; color:var(--m-brand); background:none; font-size:14px; cursor:pointer; }
  html .requote-app .rq-settings-nav { display:none; }
  html .requote-app #page-impostazioni:not([data-mobile-settings="index"]) .rq-settings-intro { display:none; }
  html .requote-app .rq-settings-layout { display:block; }
  .requote-app #page-impostazioni[data-mobile-settings="index"] .rq-settings-layout { display:none; }
  .requote-app #page-impostazioni:not([data-mobile-settings="index"]) .rq-mobile-settings-index { display:none; }
  .requote-app #page-impostazioni:not([data-mobile-settings="index"]) .rq-mobile-settings-back { display:block; }
  html .requote-app .rq-settings-card { background:none; border:0; border-radius:0; box-shadow:none; }
  html .requote-app .rq-settings-card-header, html .requote-app .rq-settings-card-body { padding:0 0 24px; }
  html .requote-app .rq-settings-card-header h2 { font-size:25px; letter-spacing:-.035em; }
  html .requote-app .rq-settings-card-header p { font-size:14px; line-height:1.6; }
  html .requote-app .rq-followup-step { display:grid; grid-template-columns:32px minmax(0,1fr); gap:12px; padding:18px 0; border-bottom:1px solid var(--m-line); }
  html .requote-app .rq-followup-step-copy strong { font-size:15px; }
  html .requote-app .rq-followup-step-copy span { font-size:12px; line-height:1.6; }
  html .requote-app .rq-followup-delay { grid-column:2; display:flex; gap:10px; align-items:center; margin:0; }
  html .requote-app .rq-followup-delay input { width:100px; }
  html .requote-app .rq-toggle-row { display:flex; gap:18px; align-items:center; padding:16px 0; }
  html .requote-app .rq-switch { flex-shrink:0; }
  html .requote-app .rq-toggle-copy { min-width:0; }
  html .requote-app .rq-toggle-copy span { font-size:13px; line-height:1.65; }
  html .requote-app .rq-account-setting-row { display:flex; flex-direction:column; gap:16px; align-items:stretch; }
  html .requote-app .rq-account-setting-copy { width:100%; min-width:0; }
  html .requote-app #accountLoginEmail { width:100%; }
  .rq-mobile-channel-summary { display:grid; margin-bottom:24px; }
  .rq-mobile-channel-summary > div { display:flex; flex-direction:column; gap:8px; padding:18px 0; border-bottom:1px solid var(--m-line); }
  .rq-mobile-channel-summary strong { font-size:16px; }
  .rq-mobile-channel-summary span { color:var(--m-muted); font-size:13px; }
  html .requote-app #whatsappConnectionStatus { display:inline-flex; padding:8px 12px; border-radius:10px; border:1px solid var(--m-line); font-size:13px; color:var(--m-brand); }
  html .requote-app #connectWhatsAppButton { width:100%; white-space:normal; line-height:1.5; }
  html .requote-app .rq-followup-shell { min-width:0; }
  html .requote-app #page-followup .rq-automation-shell { display:none; }
  html .requote-app .rq-engine-top, html .requote-app .rq-engine-overview, html .requote-app .rq-automation-metrics, html .requote-app .rq-analytics-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
  html .requote-app .rq-messages-layout, html .requote-app .rq-messages-grid, html .requote-app .rq-analytics-layout { grid-template-columns:1fr; }
  html .requote-app .rq-template-tabs, html .requote-app .rq-message-variable-chips { display:flex; flex-wrap:wrap; }
  html .requote-app .rq-settings-actions { display:flex; flex-wrap:wrap; gap:10px; }
  html .requote-app #expiredTrialScreen { padding:20px; }
  html .requote-app #expiredTrialScreen .rq-blocked-header { padding:0 0 20px; }
  html .requote-app #expiredTrialScreen .rq-blocked-main { display:flex; flex-direction:column; gap:0; padding-top:26px; }
  html .requote-app #expiredTrialScreen .rq-blocked-copy { display:contents; }
  html .requote-app #expiredTrialScreen .rq-blocked-symbol { display:none; }
  html .requote-app #expiredTrialScreen .rq-blocked-copy h1 { font-size:32px; line-height:1.15; margin:16px 0; }
  html .requote-app #expiredTrialScreen .expired-trial-description { font-size:14px; line-height:1.7; }
  html .requote-app #expiredTrialScreen .rq-blocked-preservation { margin:18px 0 0; }
  html .requote-app #expiredTrialScreen .rq-blocked-next { order:1; padding:20px; margin-top:24px; }
  html .requote-app #expiredTrialScreen .rq-blocked-next h2 { display:none; }
  html .requote-app #expiredTrialScreen .rq-blocked-results { order:2; margin-top:28px; }
  html .requote-app .rq-decision-modal { max-height:calc(100dvh - 40px); overflow:auto; }
  html .requote-app .rq-decision-modal button { min-height:44px; }
  .requote-app .rq-mobile-open-quote, .requote-app .rq-mobile-event button { touch-action:manipulation; }
}
@media (min-width:821px) {
  .rq-mobile-open-quote, .rq-mobile-quote-automation, .rq-mobile-sheet, .rq-mobile-new-sheet, .rq-mobile-page { display:none !important; }
}
