/* Servello v1.23 — one app shell, one record-sheet system.
   Loaded after specialized screen styles. Scope everything to the Servello app. */
body.sv-mode.ucsh-mode-app {
 --sv-sheet-teal:var(--sv-tenant-accent,#3f897e);
 --sv-shell-height:72px;
}
/* The top header is the only place the brand appears. No page-specific shell. */
body.sv-mode .sv-network-parity {--sv-uc-topbar:var(--sv-shell-height)}
body.sv-mode .sv-network-parity .ucsh-topbar {
 position:fixed;inset:0 0 auto 0;height:var(--sv-shell-height);z-index:220;
 padding:0 clamp(16px,2vw,30px);background:#fff;border-bottom:1px solid #e5eeeb;
}
body.sv-mode .sv-network-parity .ucsh-sidebar {
 top:var(--sv-shell-height);height:calc(100dvh - var(--sv-shell-height));bottom:0;
 z-index:120;padding-top:12px;overscroll-behavior:contain;
}
body.sv-mode .sv-network-parity .ucsh-main{padding-top:var(--sv-shell-height)}
body.sv-mode .sv-network-parity .sv-topbar-brand{display:flex!important;align-items:center;min-width:0}
body.sv-mode .sv-network-parity .sv-topbar-brand .sv-brand{display:flex;align-items:center}
body.sv-mode .sv-network-parity .sv-sidebar-top{justify-content:flex-start!important;align-items:center!important;padding:0 3px 8px!important;margin:0 0 6px!important;gap:0!important}
body.sv-mode .sv-network-parity .ucsh-sidebar .sv-brand{display:none!important}
body.sv-mode .sv-network-parity .ucsh-sidebar .sv-collapse{justify-content:flex-start;width:100%;height:36px}
body.sv-mode .sv-network-parity:has(.svh-dashboard) .sv-crumbs{display:none}
body.sv-mode .sv-network-parity:has(.svh-dashboard) .ucsh-search{margin-right:auto}
/* Legacy fallback obeys the same header/sidebar contract. */
body.sv-mode.ucsh-mode-app .ucsh-app:not(.sv-network-parity) .ucsh-topbar{position:fixed;top:0;left:0;right:0;z-index:220;height:var(--sv-shell-height);background:#fff}
body.sv-mode.ucsh-mode-app .ucsh-app:not(.sv-network-parity) .ucsh-sidebar{top:var(--sv-shell-height);height:calc(100dvh - var(--sv-shell-height));bottom:0;z-index:120}
body.sv-mode.ucsh-mode-app .ucsh-app:not(.sv-network-parity) .ucsh-main{padding-top:var(--sv-shell-height)}
body.sv-mode .sv-legacy-header-brand{display:flex;align-items:center;gap:9px;min-width:180px;color:#153a3d;font-size:21px;letter-spacing:-.035em}
body.sv-mode .sv-legacy-header-brand img{border-radius:10px;background:#103b3e;padding:2px}
/* Details and edit forms become one consistent bottom-up sheet, above the fixed header. */
body.sv-mode.ucsh-mode-app .ucsh-drawer-wrap,
body.sv-mode.ucsh-mode-app .ucsh-drawer-wrap.is-open {
 position:fixed;inset:0;z-index:5000;display:flex!important;align-items:flex-end;justify-content:center;
 opacity:0;visibility:hidden;pointer-events:none;transition:opacity .23s ease,visibility .23s ease;
 isolation:isolate;
}
body.sv-mode.ucsh-mode-app .ucsh-drawer-wrap.is-open{opacity:1;visibility:visible;pointer-events:auto}
body.sv-mode.ucsh-mode-app .ucsh-drawer-scrim{position:absolute;inset:0;background:rgba(11,30,35,.62);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}
body.sv-mode.ucsh-mode-app .ucsh-drawer{
 box-sizing:border-box;position:relative;inset:auto;bottom:auto;right:auto;top:auto;
 z-index:1;flex:none;display:flex;flex-direction:column;width:min(880px,calc(100% - 38px));
 height:auto;max-height:min(89dvh,900px);margin:0 auto 0;
 border:1px solid #e0ece8;border-bottom:0;border-radius:25px 25px 0 0;
 background:#fff;box-shadow:0 -24px 100px rgba(5,32,31,.24);
 transform:translate3d(0,105%,0);transition:transform .31s cubic-bezier(.2,.8,.24,1);
 will-change:transform;overflow:hidden;
}
body.sv-mode.ucsh-mode-app .ucsh-drawer-wrap.is-open .ucsh-drawer{transform:translate3d(0,0,0)}
body.sv-mode.ucsh-mode-app .ucsh-drawer::before{
 content:"";display:block;position:absolute;left:calc(50% - 24px);top:9px;
 width:48px;height:5px;border-radius:999px;background:#d4e5de;pointer-events:none;
}
body.sv-mode.ucsh-mode-app .ucsh-drawer-head{
 box-sizing:border-box;flex:none;display:flex;align-items:center;gap:15px;
 padding:30px clamp(19px,3vw,32px) 19px!important;
 background:linear-gradient(135deg,#f4faf7 0%,#fff 66%);
 border-bottom:1px solid #e6eee9;
}
body.sv-mode.ucsh-mode-app .sv-sheet-glyph{
 width:47px;height:47px;flex:0 0 47px;display:grid;place-items:center;
 border:1px solid #cce9dd;border-radius:15px;background:#e8f7f0;color:#087967;
 font-size:26px;line-height:1;font-weight:700;
}
body.sv-mode.ucsh-mode-app .sv-sheet-heading{display:grid;min-width:0;gap:4px;flex:1}
body.sv-mode.ucsh-mode-app .sv-sheet-eyebrow{font-size:10px;line-height:1.3;letter-spacing:.105em;text-transform:uppercase;font-weight:850;color:#388979}
body.sv-mode.ucsh-mode-app .ucsh-drawer-head h2{margin:0;font-weight:790;color:#14343b;line-height:1.2;font-size:clamp(19px,2.1vw,25px);letter-spacing:-.035em;overflow-wrap:anywhere}
body.sv-mode.ucsh-mode-app .sv-sheet-subtitle{font-size:11px;color:#758c87;text-transform:none;line-height:1.45}
body.sv-mode.ucsh-mode-app .ucsh-drawer-head .ucsh-close{
 margin-left:auto;flex:none;display:grid;place-items:center;width:39px;height:39px;
 border:1px solid #dfeae4;border-radius:12px;background:#fff;color:#47645d;
 font-size:24px;line-height:1;box-shadow:0 1px 3px rgba(10,30,30,.03);
}
body.sv-mode.ucsh-mode-app .ucsh-drawer-head .ucsh-close:hover{background:#eef8f3;color:#116958;border-color:#a7d4c3}
body.sv-mode.ucsh-mode-app .ucsh-drawer-body{
 box-sizing:border-box;flex:1 1 auto;min-height:0;padding:24px clamp(19px,3vw,32px) 29px!important;
 overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-color:#c9e0d6 transparent;
 background:#fff;
}
body.sv-mode.ucsh-mode-app .ucsh-drawer-foot{
 box-sizing:border-box;flex:none;display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;
 gap:9px;padding:16px clamp(19px,3vw,32px) calc(16px + env(safe-area-inset-bottom,0px))!important;
 background:#f9fcfa;border-top:1px solid #e8efea;
}
body.sv-mode.ucsh-mode-app .ucsh-drawer-foot:empty{display:none}
body.sv-mode.ucsh-mode-app .ucsh-drawer-foot .ucsh-button{min-height:43px;border-radius:11px;padding:11px 17px}
body.sv-mode.ucsh-mode-app .ucsh-drawer-foot .ucsh-button-primary{background:#157d69;border-color:#157d69}
body.sv-mode.ucsh-mode-app .ucsh-drawer-body>.ucsh-detail-section{border:0!important;background:transparent!important;padding:0!important;margin:0 0 18px}
body.sv-mode.ucsh-mode-app .ucsh-drawer-body .ucsh-detail-section h3,
body.sv-mode.ucsh-mode-app .ucsh-drawer-body h3{font-size:13px;letter-spacing:-.015em;color:#1b4949;margin:19px 0 11px}
body.sv-mode.ucsh-mode-app .ucsh-drawer-body .ucsh-kv{
 display:grid;grid-template-columns:minmax(125px,.8fr) minmax(0,1.5fr);gap:0;
 border:1px solid #e5eeea;border-radius:15px;overflow:hidden;background:#fff;
}
body.sv-mode.ucsh-mode-app .ucsh-drawer-body .ucsh-kv dt,
body.sv-mode.ucsh-mode-app .ucsh-drawer-body .ucsh-kv dd{
 margin:0;padding:12px 15px!important;border-bottom:1px solid #edf3ef;min-width:0;line-height:1.5;overflow-wrap:anywhere;
}
body.sv-mode.ucsh-mode-app .ucsh-drawer-body .ucsh-kv dt{font-size:11px;font-weight:730;color:#627e77;background:#f9fbfa}
body.sv-mode.ucsh-mode-app .ucsh-drawer-body .ucsh-kv dd{font-size:13px;color:#183e40}
body.sv-mode.ucsh-mode-app .ucsh-drawer-body .ucsh-kv dt:nth-last-of-type(1),
body.sv-mode.ucsh-mode-app .ucsh-drawer-body .ucsh-kv dd:nth-last-of-type(1){border-bottom:0}
body.sv-mode.ucsh-mode-app .ucsh-drawer-body .ucsh-public-item,
body.sv-mode.ucsh-mode-app .ucsh-drawer-body .ucsh-activity{
 padding:13px 14px;margin:5px 0;border:1px solid #e7f0eb;border-radius:12px;
 background:#fff;line-height:1.45;
}
body.sv-mode.ucsh-mode-app .ucsh-drawer-body .ucsh-public-item:hover{background:#f5fbf8;border-color:#b9e1cf}
body.sv-mode.ucsh-mode-app .ucsh-drawer-body .ucsh-form-grid{gap:17px 19px}
body.sv-mode.ucsh-mode-app .ucsh-drawer-body .ucsh-field label{font-size:12px;font-weight:750;color:#315450}
body.sv-mode.ucsh-mode-app .ucsh-drawer-body .ucsh-field input,
body.sv-mode.ucsh-mode-app .ucsh-drawer-body .ucsh-field select,
body.sv-mode.ucsh-mode-app .ucsh-drawer-body .ucsh-field textarea{border:1px solid #d9e8e0;border-radius:11px;background:#fbfdfc;min-height:43px}
body.sv-mode.ucsh-mode-app .ucsh-drawer-body .ucsh-field :is(input,select,textarea):focus-visible{outline:2px solid #b8e9d1;outline-offset:1px;border-color:#3f897e}
body.sv-mode.ucsh-mode-app .ucsh-drawer-body .ucsh-form-section{padding:10px 0 9px;color:#28725e;border-bottom:1px solid #e9f0eb;margin-top:13px}
body.sv-mode.ucsh-mode-app .ucsh-drawer-body .ucsh-card{box-shadow:none;border:1px solid #e7efe9}
body.sv-mode.ucsh-mode-app .ucsh-drawer-body .ucsh-table-wrap{border:1px solid #e5eee9;border-radius:13px;overflow-x:auto}
body.sv-mode.ucsh-mode-app .ucsh-drawer-body .ucsh-alert{border-radius:12px}
body.sv-mode.ucsh-mode-app.sv-sheet-active{overflow:hidden}
/* Gabriel — exact requested visual values. */
body.sv-mode .ucsh-ai-fab{background:linear-gradient(130deg,#261869 0%,#6555e9 44%,#08263f 100%)!important}
body.sv-mode .ucsh-ai-fab img{width:30px!important;height:30px!important}
body.sv-mode .ucsh-ai-head{border-radius:10px 10px 0px 0px!important}
/* Other native Servello dialogs get the same bottom-up motion and safe layering. */
body.sv-mode .sv-growth-overlay,body.sv-mode .sv-biz-overlay{z-index:5100;align-items:flex-end;justify-content:center}
body.sv-mode .sv-growth-dialog,body.sv-mode .sv-biz-dialog{
 border-radius:22px 22px 0 0;max-height:min(88dvh,850px);width:min(680px,100%);
 padding:28px 26px calc(24px + env(safe-area-inset-bottom,0px));
 animation:sv-enter-sheet .32s cubic-bezier(.2,.8,.24,1) both;
}
@keyframes sv-enter-sheet{from{opacity:.75;transform:translate3d(0,64px,0)}to{opacity:1;transform:translate3d(0,0,0)}}
@media(max-width:1040px){
 body.sv-mode.ucsh-mode-app .sv-network-parity .ucsh-sidebar{z-index:240}
}
@media(max-width:780px){
 body.sv-mode.ucsh-mode-app{--sv-shell-height:64px}
 body.sv-mode.ucsh-mode-app .sv-network-parity .ucsh-topbar{height:64px}
 body.sv-mode.ucsh-mode-app .sv-network-parity .ucsh-sidebar{top:64px;height:calc(100dvh - 64px)}
 body.sv-mode.ucsh-mode-app .ucsh-drawer{width:100%;max-height:calc(100dvh - 8px);border-radius:24px 24px 0 0}
 body.sv-mode.ucsh-mode-app .ucsh-drawer-head{padding:31px 16px 15px!important;gap:11px}
 body.sv-mode.ucsh-mode-app .sv-sheet-glyph{width:40px;height:40px;flex-basis:40px;font-size:22px;border-radius:13px}
 body.sv-mode.ucsh-mode-app .ucsh-drawer-head h2{font-size:19px}
 body.sv-mode.ucsh-mode-app .ucsh-drawer-body{padding:17px 16px 21px!important}
 body.sv-mode.ucsh-mode-app .ucsh-drawer-foot{padding:12px 16px calc(13px + env(safe-area-inset-bottom,0px))!important;justify-content:stretch}
 body.sv-mode.ucsh-mode-app .ucsh-drawer-foot .ucsh-button{flex:1 1 auto}
 body.sv-mode.ucsh-mode-app .ucsh-drawer-body .ucsh-kv{grid-template-columns:minmax(92px,.72fr) minmax(0,1.35fr)}
 body.sv-mode.ucsh-mode-app .ucsh-drawer-body .ucsh-kv dt,
 body.sv-mode.ucsh-mode-app .ucsh-drawer-body .ucsh-kv dd{padding:11px!important}
 body.sv-mode.ucsh-mode-app .ucsh-drawer-body .ucsh-form-grid{grid-template-columns:minmax(0,1fr)}
 body.sv-mode.ucsh-mode-app .ucsh-drawer-body .ucsh-field-full,body.sv-mode.ucsh-mode-app .ucsh-drawer-body .ucsh-form-section{grid-column:1}
 body.sv-mode .sv-growth-overlay,body.sv-mode .sv-biz-overlay{padding:0}
 body.sv-mode .sv-growth-dialog,body.sv-mode .sv-biz-dialog{width:100%;max-width:none;max-height:calc(100dvh - 8px);padding:27px 19px calc(24px + env(safe-area-inset-bottom,0px));border-radius:23px 23px 0 0}
 body.sv-mode.ucsh-mode-app .sv-legacy-header-brand{min-width:0}
 body.sv-mode.ucsh-mode-app .sv-legacy-header-brand strong{display:none}
}
@media(prefers-reduced-motion:reduce){
 body.sv-mode.ucsh-mode-app .ucsh-drawer,body.sv-mode.ucsh-mode-app .ucsh-drawer-wrap{transition:none!important}
 body.sv-mode .sv-growth-dialog,body.sv-mode .sv-biz-dialog{animation:none!important}
}
