/* SurveyTerra compact density layer. Loaded last so legacy pages inherit safe,
   consistent sizing without changing their behavior or data contracts. */
body{font-size:var(--st-text-md);line-height:1.35}
.shell{height:100vh;min-height:0;overflow:hidden}
.shell>main{height:100vh;min-height:0;overflow-y:auto}
#content{padding:var(--st-page-padding) 16px}
.page-toolbar{align-items:center;gap:var(--st-section-gap);margin-bottom:10px}
.page-toolbar h2{font-size:20px;margin-bottom:2px}.page-toolbar p{font-size:12px}
.button,.table-link{min-height:var(--st-button-height);padding:6px 10px;font-size:12px;gap:6px}
.panel{padding:12px}.form-panel{padding:12px 14px}
.filter-bar,.inline-form,.control-row{gap:var(--st-control-gap);margin-bottom:10px}
.filter-bar label,.inline-form label,.control-row label,.enterprise-form label{gap:4px;font-size:12px}
.filter-bar input,.filter-bar select,.inline-form select,.enterprise-form input,.enterprise-form select,.enterprise-form textarea{
  min-height:var(--st-input-height);padding:6px var(--st-input-padding-x);border-radius:7px;font-size:13px
}
.filter-bar input{min-width:190px}.enterprise-form textarea{min-height:64px}
.form-grid{gap:9px 12px}.form-actions{margin-top:10px}
.check{gap:7px!important}.check input{width:15px;height:15px}
.table-wrap table{font-size:12px}.table-wrap th{font-size:10px}.table-wrap td,.table-wrap th{padding:8px 10px}
.actions{gap:5px}.actions button{min-height:28px;padding:4px 8px;font-size:11px}

.modal{padding:16px;background:#001b147a}
.dialog{
  width:min(440px,calc(100vw - 24px));max-height:min(82vh,680px);padding:0;border-radius:12px;
  overflow:hidden;display:flex;flex-direction:column;box-shadow:0 20px 56px #001f1780
}
.dialog-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px 8px;border-bottom:1px solid var(--st-border)}
.dialog-header h2{margin:0;font-size:18px}.dialog-header .close{position:static;width:28px;height:28px;padding:0;border-radius:7px;font-size:20px;line-height:1}
#modalBody{display:grid;gap:9px;padding:12px 14px;overflow:auto}
#modalBody>label{display:grid;gap:4px;margin:0;font-size:12px;font-weight:800}
#modalBody input,#modalBody select,#modalBody textarea{min-height:36px;padding:6px 9px;border-radius:7px;font-size:13px}
#modalBody textarea{min-height:64px}
#modalBody .notice{margin:0;padding:8px 9px;font-size:11px}
.compact-dialog-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}.compact-dialog-grid>label{display:grid;gap:4px;margin:0;font-size:12px;font-weight:800}.compact-dialog-grid .span-all{grid-column:1/-1}
#modalError{margin:0 14px 8px;padding:7px 9px;font-size:11px}
.dialog-actions{margin:0;padding:9px 14px 12px;border-top:1px solid var(--st-border);gap:7px;justify-content:flex-end}
.dialog-actions button{flex:0 0 auto;min-width:88px;min-height:32px;padding:6px 12px;font-size:12px}
.dialog-actions .close{position:static!important;width:auto;height:auto;background:#edf2ef;color:var(--st-green-900);font-size:12px!important;line-height:1.35}

#sidebar nav a{min-height:38px;padding:7px 11px;font-size:12px}
#sidebar nav a .nav-icon{width:18px;height:18px}
main>header{min-height:var(--st-topbar)}
main>header .icon{width:var(--st-icon-button-size);height:var(--st-icon-button-size)}

.team-filter{display:grid;grid-template-columns:minmax(180px,1.45fr) repeat(4,minmax(112px,.75fr)) auto;align-items:end}
.team-filter label{min-width:0}.team-filter input,.team-filter select{width:100%;min-width:0}
.team-user{display:flex;align-items:center;gap:8px;min-width:190px}.team-avatar{width:30px;height:30px;flex:0 0 30px;display:grid;place-items:center;border-radius:50%;background:var(--st-green-100);color:var(--st-green-900);font-size:10px;font-weight:900}
.team-user-copy{min-width:0}.team-user-copy small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:220px}
.compact-actions{display:flex;align-items:center;gap:4px;white-space:nowrap}
.compact-actions>button,.compact-actions summary{min-height:28px;padding:4px 7px;border:1px solid var(--st-border);border-radius:6px;background:var(--st-green-50);color:var(--st-green-900);font-size:11px;font-weight:800;cursor:pointer}
.action-menu{position:relative}.action-menu summary{list-style:none}.action-menu summary::-webkit-details-marker{display:none}.action-menu[open] summary{background:var(--st-green-900);color:#fff}
.action-menu-panel{position:absolute;right:0;top:calc(100% + 4px);z-index:8;min-width:150px;padding:4px;border:1px solid var(--st-border);border-radius:8px;background:#fff;box-shadow:var(--st-shadow)}
.action-menu-panel button{display:block;width:100%;padding:7px 8px;text-align:left;background:transparent;border:0;border-radius:5px;font-size:11px}.action-menu-panel button:hover{background:var(--st-green-50)}

.project-form-page{height:calc(100dvh - var(--st-topbar) - 28px);min-height:570px;display:flex;flex-direction:column;overflow:hidden}
.project-form-page .page-toolbar{flex:0 0 auto}.project-form-panel{flex:1;min-height:0;overflow:hidden}
.project-compact-form{height:100%;display:flex;flex-direction:column}
.project-form-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:8px 10px;min-height:0;overflow:auto;padding-right:2px}.project-form-grid>*{min-width:0}
.project-form-grid .col-12{grid-column:span 12}.project-form-grid .col-8{grid-column:span 8}.project-form-grid .col-6{grid-column:span 6}.project-form-grid .col-4{grid-column:span 4}.project-form-grid .col-3{grid-column:span 3}.project-form-grid .col-2{grid-column:span 2}
.project-form-grid textarea{min-height:54px;max-height:72px}
.compact-section{border:1px solid var(--st-border);border-radius:9px;padding:8px 10px;background:#fbfdfc}
.compact-section-title{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px}.compact-section-title h3{margin:0;font-size:13px}.compact-section-title small{color:var(--st-muted)}
.project-options{display:flex;align-items:center;gap:18px;flex-wrap:wrap}.project-options label{display:flex!important;align-items:center;gap:6px}
.aoi-row{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center}.aoi-summary{min-width:0;color:var(--st-muted);font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.aoi-actions{display:flex;gap:6px}.aoi-actions .button{min-height:28px;padding:4px 8px}
.aoi-advanced{margin-top:7px}.aoi-advanced summary{cursor:pointer;color:var(--st-green-800);font-size:11px;font-weight:800}.aoi-advanced textarea{width:100%;margin-top:6px;min-height:64px}
.project-form-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:9px;padding-top:9px;border-top:1px solid var(--st-border)}
.project-form-footer .form-actions{margin:0}.compact-form-error{margin:0;max-width:60%;padding:6px 8px;border-radius:6px;background:#fff0f0;font-size:11px}

.crs-selector{display:grid;gap:4px;min-width:0}.crs-selector>*{min-width:0;max-width:100%}.crs-label-row{width:100%;display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
.crs-selected-row{width:100%;max-width:100%;min-width:0;min-height:40px;padding:6px 9px;display:flex;align-items:center;justify-content:space-between;gap:10px;overflow:hidden;text-align:left;border:1px solid var(--st-border);border-radius:8px;background:var(--st-green-50);color:var(--st-text)}
.crs-selected-copy{min-width:0;display:flex;align-items:center;gap:8px;overflow:hidden}.crs-selected-copy strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.crs-code{flex:0 0 auto;padding:2px 5px;border:1px solid var(--st-border);border-radius:5px;background:#fff;color:var(--st-green-800);font:800 10px/1.2 inherit}
.crs-selected-row small{white-space:nowrap;color:var(--st-muted)}.crs-chevron{font-size:14px;color:var(--st-green-800)}
.crs-dialog-backdrop{position:fixed;inset:0;z-index:80;display:grid;place-items:center;padding:16px;background:#001b147a}
.crs-dialog{width:min(680px,calc(100vw - 24px));max-height:min(76vh,620px);display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--st-border);border-radius:12px;background:#fff;box-shadow:0 20px 56px #001f1780}
.crs-dialog-header,.crs-dialog-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border-bottom:1px solid var(--st-border)}.crs-dialog-header h2{margin:0;font-size:17px}.crs-dialog-header button{width:28px;height:28px;padding:0}
.crs-dialog-body{display:flex;flex-direction:column;gap:8px;padding:10px 12px;min-height:0;overflow:hidden}
.crs-modes{display:flex;gap:5px;overflow-x:auto}.crs-modes button{min-height:28px;padding:4px 8px;white-space:nowrap;border:1px solid var(--st-border);border-radius:6px;background:#fff;font-size:11px;font-weight:800}.crs-modes button.active{background:var(--st-green-900);color:#fff}
.crs-search-row{display:grid;grid-template-columns:minmax(180px,1fr) 132px auto auto;gap:6px}.crs-search-row input,.crs-search-row select{min-width:0;min-height:34px;padding:5px 8px;border:1px solid var(--st-border);border-radius:7px}.crs-search-row .button{min-height:34px}
.crs-results{display:grid;gap:4px;overflow:auto;min-height:160px}.crs-result{min-height:48px;padding:6px 8px;display:grid;grid-template-columns:minmax(0,1fr) auto 18px;align-items:center;gap:8px;text-align:left;border:1px solid var(--st-border);border-radius:7px;background:#fff;color:var(--st-text)}
.crs-result:hover,.crs-result.selected{border-color:var(--st-green-700);background:var(--st-green-50)}.crs-result-main{min-width:0}.crs-result-main strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.crs-result-main small,.crs-result-meta{color:var(--st-muted);font-size:10px}.crs-result-meta{text-align:right}.crs-result-check{color:var(--st-green-700);font-weight:900}
.crs-dialog-footer{border-top:1px solid var(--st-border);border-bottom:0}.crs-dialog-footer small{color:var(--st-muted)}.crs-dialog-footer-actions{display:flex;gap:6px}

@media(max-width:1100px){
  .team-filter{grid-template-columns:repeat(3,minmax(0,1fr))}.project-form-page{height:auto;min-height:0;overflow:visible}.project-form-panel{overflow:visible}.project-compact-form{height:auto}.project-form-grid{grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible}.project-form-grid>.col-12{grid-column:1/-1}.project-form-grid>.col-8,.project-form-grid>.col-6,.project-form-grid>.col-4,.project-form-grid>.col-3{grid-column:auto}
}
@media(max-width:760px){
  #content{padding:10px 10px 24px}.team-filter{grid-template-columns:1fr 1fr}.project-form-grid{grid-template-columns:minmax(0,1fr)}.project-form-grid>*{grid-column:1!important}.project-form-footer{align-items:stretch;flex-direction:column}.compact-form-error{max-width:none}.project-form-footer .form-actions{width:100%}.project-form-footer .button{flex:1}
  .crs-dialog-backdrop{padding:8px}.crs-dialog{max-height:calc(100dvh - 16px)}.crs-search-row{grid-template-columns:1fr 1fr}.crs-search-row input{grid-column:1/-1}.crs-result{grid-template-columns:minmax(0,1fr) 18px}.crs-result-meta{grid-column:1/-1;text-align:left}.dialog{max-height:calc(100dvh - 24px)}
}
@media(max-width:430px){.team-filter{grid-template-columns:1fr}.modal{padding:8px}.dialog{width:100%}.crs-dialog-footer{align-items:stretch;flex-direction:column}.crs-dialog-footer-actions .button{flex:1}}
@media(max-width:430px){.compact-dialog-grid{grid-template-columns:1fr}.compact-dialog-grid .span-all{grid-column:auto}}

/* Approved compact Team management workspace. */
.team-management-page{margin:-2px -4px 0}.team-page-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;align-items:start}.team-page-layout.with-drawer{grid-template-columns:minmax(760px,1fr) 348px}.team-main{min-width:0}
.team-page-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:5px}.team-page-header h2{margin:0;font-size:20px;line-height:1.15}.team-page-header p{margin:3px 0 0;color:var(--st-muted);font-size:11px}.team-page-header .button{min-height:32px;background:var(--st-green-900);color:#fff;border-color:var(--st-green-900)}
.team-summary{display:flex;align-items:center;gap:8px;min-height:24px;margin-bottom:8px;color:var(--st-text);font-size:10px}.team-summary>i{color:#b6c1bc;font-style:normal}.team-summary .online{display:flex;align-items:center;gap:4px}.team-summary .online>i{width:6px;height:6px;border-radius:50%;background:#5dbd48}
.team-management-page .team-filter{grid-template-columns:minmax(166px,1.25fr) repeat(4,minmax(105px,.75fr)) auto;margin-bottom:8px}.team-management-page .team-filter label{font-size:10px}.team-management-page .team-filter input,.team-management-page .team-filter select{min-height:32px;font-size:11px}.team-management-page .team-filter .compact-actions{align-self:end}.team-management-page .team-filter .button{min-height:32px}
.team-table{overflow:visible;border:1px solid var(--st-border);border-radius:9px;background:#fff;box-shadow:0 5px 16px #0a35230b}.team-table>table{width:100%;table-layout:auto}.team-table th{height:38px;padding:7px 7px;font-size:8px;white-space:nowrap}.team-table td{height:66px;padding:6px 7px;vertical-align:middle;font-size:9px;line-height:1.3}.team-table td>b{display:block;font-size:9px}.team-table td>small{display:block;margin-top:2px;color:var(--st-muted);font-size:8px;line-height:1.4}.team-table .team-check{width:27px;text-align:center}.team-table input[type=checkbox]{width:13px;height:13px;accent-color:var(--st-green-800)}.team-row.selected{background:#f1f8f4}.team-row:hover{background:#f7faf8}
.team-sort{display:inline-flex;align-items:center;gap:3px;padding:0;border:0;background:transparent;color:inherit;font:inherit;text-transform:inherit;cursor:pointer}.team-sort.active{color:var(--st-green-800)}.team-sort span{font-size:7px}
.team-row-link{width:100%;padding:0;border:0;background:transparent;text-align:left;color:inherit;cursor:pointer}.team-row-link:hover b{color:var(--st-green-700)}.team-user{min-width:145px;gap:7px}.team-avatar{width:28px;height:28px;flex:0 0 28px;background:var(--avatar-color,var(--st-green-600));color:#fff;font-size:9px}.team-avatar img{width:100%;height:100%;object-fit:cover;border-radius:inherit}.team-avatar.large{width:48px;height:48px;flex-basis:48px;font-size:15px}.team-user-copy b{display:block;font-size:9px;line-height:1.3}.team-user-copy small{max-width:175px;font-size:8px}.verified{color:#2e9c31;font-size:7px}.unverified{color:#8d9994;font-size:8px}
.team-pill{display:inline-flex;align-items:center;gap:4px;max-width:112px;padding:2px 6px;border-radius:999px;font-size:8px;font-weight:800;line-height:1.4;white-space:nowrap}.team-pill i{width:5px;height:5px;flex:0 0 5px;border-radius:50%;background:currentColor}.team-pill.role{color:#31559b;background:#eaf0ff}.team-pill.role.surveyor{color:#267047;background:#e8f4e9}.team-pill.account.active{color:#247638;background:#e8f5e6}.team-pill.account.pending{color:#936a0a;background:#fff4d0}.team-pill.account.disabled{color:#b43832;background:#ffe9e7}.team-pill.live.online{color:#27803d;background:#edf8eb}.team-pill.live.delayed{color:#b47000;background:#fff4dc}.team-pill.live.offline,.team-pill.live.not-connected{color:#748079;background:#eef1ef}.team-status-stack{display:grid;justify-items:start;gap:3px;min-width:92px}
.team-row-actions{display:flex;align-items:center;justify-content:flex-end;gap:2px;white-space:nowrap}.team-icon-action,.team-row-actions .action-menu summary{display:grid;place-items:center;width:24px;height:24px;padding:0;border:0;border-radius:5px;background:transparent;color:var(--st-green-900);font-size:13px;cursor:pointer}.team-icon-action:hover,.team-row-actions .action-menu summary:hover{background:var(--st-green-50)}.team-row-actions .action-menu-panel{z-index:20}.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.team-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:42px;padding:7px 10px;border-top:1px solid var(--st-border);font-size:9px}.team-pagination>div,.team-pagination label{display:flex;align-items:center;gap:5px}.team-pagination select{height:28px;padding:3px 22px 3px 6px;border:1px solid var(--st-border);border-radius:6px;font-size:9px}.team-pagination button{min-width:27px;height:27px;padding:0 6px;border:1px solid transparent;border-radius:5px;background:transparent;font-size:9px}.team-pagination button.active{border-color:var(--st-green-700);background:var(--st-green-50);color:var(--st-green-900)}.team-pagination button:disabled{opacity:.35}
.team-detail-drawer{position:sticky;top:8px;min-height:calc(100dvh - var(--st-topbar) - 34px);max-height:calc(100dvh - var(--st-topbar) - 34px);padding:13px 14px;overflow-y:auto;border-left:1px solid var(--st-border);border-radius:9px;background:#fff;box-shadow:-8px 0 24px #082d2010}.team-drawer-close{position:absolute;right:12px;top:9px;width:26px;height:26px;display:grid;place-items:center;border-radius:6px;color:var(--st-text);font-size:20px;text-decoration:none}.team-detail-drawer>header{display:flex;align-items:center;gap:10px;padding:17px 30px 12px 0}.team-detail-drawer h3{margin:0 0 2px;font-size:13px}.team-detail-drawer header p{margin:0 0 5px;color:var(--st-muted);font-size:9px}.team-detail-drawer section{padding:12px 0;border-top:1px solid var(--st-border)}.team-detail-drawer h4{margin:0 0 9px;font-size:11px}.team-live-line{display:flex;align-items:center;justify-content:space-between;padding:8px 0 12px;font-size:9px}.team-overview{margin:0}.team-overview>div{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:5px 0;border-bottom:1px solid #eef2ef;font-size:9px}.team-overview dt{color:var(--st-muted)}.team-overview dd{margin:0;text-align:right}.team-storage{display:grid;grid-template-columns:1fr auto;gap:5px;margin-top:10px;font-size:9px}.team-storage progress{width:100%;height:6px;grid-column:1/2;accent-color:#55ae42}.team-storage small{font-size:8px}.team-marker-preview{display:grid;grid-template-columns:112px 1fr;gap:10px}.team-marker-map{height:126px;display:grid;place-items:center;border-radius:7px;background:linear-gradient(35deg,#e4e9e6 25%,transparent 25%) 0 0/18px 18px,linear-gradient(-35deg,#eef2ef 25%,transparent 25%) 0 0/18px 18px,#f8faf8}.team-marker-map span{position:relative;width:40px;height:40px;display:grid;place-items:center;border-radius:50% 50% 50% 4px;transform:rotate(-45deg);background:var(--marker-color);color:#fff;font-size:10px;font-weight:900;box-shadow:0 3px 8px #0002}.team-marker-map span::first-letter{}.team-marker-map span{writing-mode:horizontal-tb}.team-marker-map span{line-height:40px}.team-marker-map span{font-variant:normal}.team-marker-preview dl{margin:0}.team-marker-preview dl>div{display:flex;justify-content:space-between;gap:8px;padding:5px 0;border-bottom:1px solid #eef2ef;font-size:9px}.team-marker-preview dt{color:var(--st-muted)}.team-marker-preview dd{margin:0}.marker-color{display:inline-block;width:13px;height:13px;border-radius:3px;background:var(--marker-color)}.team-detail-drawer>footer{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding-top:12px}.team-detail-drawer>footer .button{min-height:30px;font-size:9px}.team-detail-drawer>footer .danger{color:#b3322c;border-color:#f0c6c3;background:#fff8f7}

@media(max-width:1280px){.team-page-layout.with-drawer{grid-template-columns:minmax(700px,1fr) 320px}.team-management-page .team-filter{grid-template-columns:minmax(150px,1.2fr) repeat(4,minmax(94px,.7fr)) auto}.team-table td,.team-table th{padding-left:5px;padding-right:5px}}
@media(max-width:1080px){.team-page-layout.with-drawer{display:block}.team-detail-drawer{position:fixed;z-index:45;top:var(--st-topbar);right:0;bottom:0;width:min(350px,94vw);max-height:none;min-height:0;border-radius:0}.team-management-page .team-filter{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.team-management-page{margin:0}.team-page-header h2{font-size:18px}.team-summary{overflow-x:auto;white-space:nowrap}.team-management-page .team-filter{grid-template-columns:1fr 1fr}.team-table{overflow-x:auto}.team-table table{min-width:980px}.team-pagination{position:sticky;left:0;min-width:720px}.team-detail-drawer{width:100%;top:var(--st-topbar)}}
@media(max-width:430px){.team-management-page .team-filter{grid-template-columns:1fr}.team-page-header{align-items:flex-start}.team-page-header .button{white-space:nowrap}.team-detail-drawer{padding-bottom:calc(14px + env(safe-area-inset-bottom))}}

.team-marker-map span{z-index:1;border-radius:50%;transform:none;writing-mode:horizontal-tb;line-height:normal}
.team-marker-map span::after{content:"";position:absolute;z-index:-1;left:5px;bottom:-5px;width:14px;height:14px;transform:rotate(45deg);background:var(--marker-color);border-radius:2px}
