/* Mobile shell uses existing WorkOS colors and keeps desktop screens intact. */
[hidden]{display:none!important}.mobile-tabs,.mobile-close,.mobile-brand,.mobile-stage-filter,.mobile-chat-tabs{display:none}
.mobile-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.6);border:0;z-index:39}
.mobile-install-link{display:flex;align-items:center;gap:10px;width:100%;margin-top:8px;border:1px solid var(--line);background:var(--panel2);border-radius:12px;color:var(--text);padding:11px 12px;text-align:left;cursor:pointer}
.mobile-install-link small{display:block;color:var(--muted);font-size:11px;margin-top:2px}
.mobile-install-dialog{position:fixed;max-width:430px;width:calc(100% - 32px);max-height:85dvh;overflow:auto;border:1px solid var(--line);border-radius:24px;padding:28px;color:var(--text);background:var(--panel);box-shadow:0 20px 80px #0006}
.mobile-install-dialog::backdrop{background:#0009}.mobile-install-dialog img{border-radius:16px}.mobile-install-dialog h2{font-size:25px;line-height:1.2;margin-bottom:12px}.mobile-install-dialog p{color:var(--muted);line-height:1.6}.mobile-install-dialog h3{font-size:15px;margin:22px 0 3px}.mobile-install-dialog small{color:var(--muted);display:block;margin-top:20px}.mobile-dialog-close{position:absolute;right:12px;top:12px;min-width:44px;min-height:44px}.mobile-network{position:fixed;bottom:16px;left:50%;transform:translateX(-50%);width:min(460px,calc(100% - 24px));padding:12px 16px;background:#60430c;color:#fff6dc;border:1px solid #bc9149;border-radius:14px;box-shadow:0 8px 30px #0005;z-index:90;font-size:14px;text-align:center}.mobile-table-scroll{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
@media(max-width:900px){
  :root{--mobile-top:calc(64px + env(safe-area-inset-top,0px));--mobile-bottom:calc(66px + env(safe-area-inset-bottom,0px))}
  html{scroll-padding-top:calc(var(--mobile-top) + 16px);scroll-padding-bottom:calc(var(--mobile-bottom) + 16px)}
  body{font-size:14px;-webkit-tap-highlight-color:transparent}
  body.menu-open{overflow:hidden}
  .sidebar{width:min(320px,88vw);height:100dvh;max-height:100dvh;padding:calc(20px + env(safe-area-inset-top,0px)) 16px calc(16px + env(safe-area-inset-bottom,0px));transform:translateX(-100%);visibility:hidden;transition:transform .2s,visibility .2s;z-index:40;box-shadow:12px 0 40px #0003}
  .menu-open .sidebar{transform:translateX(0);visibility:visible}
  .sidebar .brand{padding-right:28px}.sidebar .nav{min-height:44px;padding:11px 12px;font-size:14px}.sidebar nav{padding-top:4px}.sidebar .navgroup{padding-top:20px}.sidebar .profile{padding-top:14px}.mobile-close{display:block;position:absolute;top:calc(12px + env(safe-area-inset-top,0px));right:8px;width:44px;height:44px;color:var(--text)}
  .topbar{left:0;height:var(--mobile-top);padding:env(safe-area-inset-top,0px) max(16px,env(safe-area-inset-right,0px)) 0 max(16px,env(safe-area-inset-left,0px));gap:8px;background:var(--bg)}
  .mobile-menu{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;padding:0;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--text);font-size:21px}
  .mobile-brand{display:block;font-size:16px;font-weight:750;letter-spacing:-.03em;margin-right:auto}.mobile-brand small{display:block;font-size:8px;color:var(--muted);letter-spacing:.2em}
  .topbar .search{min-width:0;width:45%;max-width:300px;flex:0 1 45%;height:44px;margin:0;padding:0 10px}.topbar .search input{min-width:0;width:100%;font-size:16px}.topbar .search kbd{display:none}.top-actions .iconbtn{width:40px;height:44px;padding:0}
  .content{margin-left:0;max-width:100%;padding:calc(var(--mobile-top) + 22px) max(16px,env(safe-area-inset-right,0px)) calc(var(--mobile-bottom) + 28px) max(16px,env(safe-area-inset-left,0px))}
  .auth-content{padding:calc(24px + env(safe-area-inset-top,0px)) 18px calc(24px + env(safe-area-inset-bottom,0px));min-height:100dvh}
  .mobile-tabs{position:fixed;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));inset:auto 0 0;height:var(--mobile-bottom);padding:6px max(6px,env(safe-area-inset-right,0px)) env(safe-area-inset-bottom,0px) max(6px,env(safe-area-inset-left,0px));border-top:1px solid var(--line);background:var(--panel);z-index:30;overflow:visible;gap:2px;flex:none}
  .mobile-tabs>a,.mobile-tabs>button{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;padding:4px 0;border:0;border-radius:12px;background:transparent;color:var(--muted);font-size:10px;font-weight:600;line-height:1.2;cursor:pointer;min-height:52px}
  .mobile-tabs svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
  .mobile-tabs [aria-current=page],.mobile-tabs [aria-expanded=true]{background:var(--panel2);color:var(--accent)}
  .mobile-count{position:absolute;top:0;right:calc(50% - 24px);min-width:15px;padding:2px 4px;border-radius:12px;background:var(--accent);color:var(--bg);font-size:9px;line-height:12px}
  .mobile-network{bottom:calc(var(--mobile-bottom) + 10px)}
  .page-head,.page-head.compact{align-items:flex-start;flex-wrap:wrap;gap:16px;margin-bottom:20px}.page-head h1{font-size:27px;line-height:1.16;margin-bottom:9px;overflow-wrap:anywhere}.page-head p{font-size:13px;line-height:1.6}.head-actions{flex-wrap:wrap;width:100%;gap:8px}.head-actions .btn{flex:1;text-align:center;display:flex;align-items:center;justify-content:center}
  .btn,.iconbtn{min-height:44px}.btn{padding:11px 13px}.btn.small{padding:10px 12px}.form-actions{flex-wrap:wrap;gap:8px}input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea{max-width:100%;min-width:0;font-size:16px!important;min-height:44px}input[type=checkbox],input[type=radio]{min-width:20px;min-height:20px}textarea{line-height:1.5}
  .dashboard-grid,.detail-grid,.project-grid,.people-grid,.sales-two-col,.company-grid,.sales-two-col.wide-left{grid-template-columns:minmax(0,1fr)}.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.metric{padding:15px}.metric strong{font-size:27px}.panel{padding:16px;min-width:0}.panel-head{gap:10px;flex-wrap:wrap}.panel-head h3{line-height:1.35}.panel p,.task-row,.timeline-row,.company-card{overflow-wrap:anywhere}.panel-head a{min-height:36px;display:flex;align-items:center}.span2{grid-column:auto}
  .form-grid{grid-template-columns:minmax(0,1fr)!important}.form-grid>*{min-width:0}.form-grid .span-2,.form-grid .span-4{grid-column:auto}.form-grid label{font-size:13px;line-height:1.5}.form-grid input,.form-grid select,.form-grid textarea{margin-top:5px}
  .task-row{flex-wrap:wrap;gap:8px;padding:14px 2px}.task-row>.grow{flex-basis:65%}.attention-strip{flex-wrap:wrap;gap:12px}.attention-strip>div{min-width:0}.attention-strip .btn{width:100%;text-align:center}
  .home-kanban,.kanban{grid-template-columns:minmax(0,1fr);overflow:visible;min-width:0}.home-column,.kanban .column{min-width:0;width:100%}.home-task-card{cursor:pointer}.dropzone{min-height:60px}.form-grid .full{grid-column:1/-1}.login-shell{width:100%;min-height:calc(100dvh - 60px);grid-template-columns:minmax(0,1fr)}.login-art{display:none}.login-card{min-width:0;width:100%;max-width:440px;margin:auto;padding:24px 18px}
  .modal{padding:12px;padding-top:calc(12px + env(safe-area-inset-top,0px));z-index:60}.modal-card,.modal-content{max-width:100%;max-height:calc(100dvh - 40px);overflow:auto}
  .mobile-table-scroll table{min-width:600px}.mobile-table-scroll{border-radius:10px}.mobile-table-scroll th,.mobile-table-scroll td{padding:12px 10px}
  .sales-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.sales-kpis article{padding:14px}.sales-kpis article strong{font-size:25px}.sales-kpis article:first-child{grid-column:1/-1}.sales-toolbar,.filter-row,.legend{align-items:stretch;flex-direction:column;gap:10px}.sales-toolbar .legend{flex-direction:row;flex-wrap:wrap;font-size:11px}.filter-row input,.filter-row select{width:100%}
  .mobile-stage-filter{display:block;margin:18px 0 12px;font-size:12px;color:var(--muted)}.mobile-stage-filter select{display:block;width:100%;margin-top:7px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--text)}
  .sales-pipeline-wrap{overflow:visible}.sales-pipeline{display:grid;grid-template-columns:minmax(0,1fr);min-width:0;gap:12px}.pipeline-column{min-width:0;width:100%;max-height:none}.pipeline-column.mobile-stage-hidden{display:none}.pipeline-column header{padding:14px}.pipeline-cards{max-height:none;overflow:visible}.opportunity-card{padding:16px}.opportunity-card>strong{font-size:16px;line-height:1.35}.opportunity-card p{font-size:12px;line-height:1.6}.sales-list>a{align-items:flex-start;flex-wrap:wrap;gap:8px}.sales-list>a>div{min-width:0;flex:1 1 70%}.opportunity-command{grid-template-columns:minmax(0,1fr)}.opportunity-command>div{border-left:0;border-top:1px solid var(--line)}.opportunity-command>div:first-child{border-top:0}
  .mobile-chat-tabs{display:flex;gap:6px;margin:0 0 14px;padding:5px;background:var(--panel);border:1px solid var(--line);border-radius:14px}.mobile-chat-tabs button{flex:1;border:0;border-radius:10px;padding:12px 5px;background:transparent;color:var(--muted);font-size:13px;min-height:44px}.mobile-chat-tabs button[aria-pressed=true]{color:var(--text);background:var(--panel2);box-shadow:0 1px 4px #0002}
  .chat-page-head h1{font-size:25px}.chat-page-head p,.chat-page-head .head-actions{display:none}.chat-page-head{margin-bottom:14px}.chat-shell{display:block;height:auto;min-height:0;max-height:none}.chat-shell .chat-main-panel,.chat-shell .chat-directory,.chat-shell .chat-thread-list-panel{display:none}.chat-shell[data-mobile-pane=conversation] .chat-main-panel{display:flex}.chat-shell[data-mobile-pane=threads] .chat-thread-list-panel,.chat-shell[data-mobile-pane=people] .chat-directory{display:block}
  .chat-main-panel{height:calc(var(--mobile-viewport,100dvh) - var(--mobile-top) - var(--mobile-bottom) - 160px);min-height:320px;max-height:760px;overflow:hidden;padding:0;flex-direction:column}.chat-head{padding:12px;gap:10px;flex-wrap:wrap}.chat-head h2{font-size:17px;overflow-wrap:anywhere}.chat-messages{min-height:0;flex:1;overflow:auto;padding:12px}.chat-bubble{max-width:100%;min-width:0}.chat-bubble-row{gap:7px}.chat-bubble p{font-size:14px;line-height:1.5}.chat-compose{padding:10px;grid-template-columns:44px minmax(0,1fr) auto;gap:6px;flex:none}.chat-compose textarea{min-height:44px;max-height:120px}.chat-attach-btn{width:44px;height:44px}.chat-compose .btn{padding:10px 8px;font-size:12px}.chat-upload-note{font-size:10px;line-height:1.5;padding:0 12px 10px}.chat-thread-list,.chat-people{max-height:none;overflow:visible}.chat-person,.chat-thread{min-height:64px}.chat-selected-file.rich{max-width:100%}.chat-image-attachment{max-width:100%}
  .mobile-keyboard .mobile-tabs{display:none}.mobile-keyboard .mobile-network{bottom:10px}.mobile-keyboard .content{padding-bottom:16px}.mobile-keyboard .chat-main-panel{height:calc(var(--mobile-viewport,100dvh) - var(--mobile-top) - 130px);min-height:180px}.mobile-keyboard .chat-upload-note{display:none}
  .command-center{padding:12px;margin:0 0 16px;min-width:0}.command-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.command-layout,.command-bottom{grid-template-columns:minmax(0,1fr)}.command-head{align-items:flex-start;flex-direction:column}.command-person-head{grid-template-columns:auto minmax(100px,1fr) 50px}.command-person-head .command-stat{display:none}.command-person-head .open-stat{display:block}.command-person-head>*{min-width:0}.command-person-head strong{overflow-wrap:anywhere}.command-team-list,.command-feed,.deadline-list{max-height:none}.command-task-stack>a{flex-wrap:wrap}.command-task-stack>a>*{min-width:0}
}
@media(max-width:380px){.topbar{padding-left:10px;padding-right:10px;gap:4px}.mobile-brand{font-size:14px}.topbar .search{max-width:140px}.content{padding-left:12px;padding-right:12px}.page-head h1{font-size:25px}.panel{padding:13px}.chat-compose{grid-template-columns:40px minmax(0,1fr) auto}.chat-attach-btn{width:40px}.mobile-tabs>a,.mobile-tabs>button{font-size:9px}}
@media(prefers-reduced-motion:reduce){.sidebar{transition:none}}

.push-settings{margin-bottom:20px;scroll-margin-top:100px}.push-settings h2{margin:8px 0;font-size:23px}.push-settings p{color:var(--muted);max-width:680px}.push-settings .push-status{color:var(--text);padding:12px 14px;background:var(--panel2);border-radius:12px}.push-actions{display:flex;gap:10px;flex-wrap:wrap}.push-team{display:flex;align-items:center;gap:10px;margin:18px 0}.push-settings small{display:block;color:var(--muted);max-width:680px;margin-top:18px;line-height:1.6}@media(max-width:900px){.security-grid{grid-template-columns:minmax(0,1fr)}.push-actions .btn{width:100%}.push-settings h2{font-size:23px}.push-team{font-size:13px;line-height:1.5}}
