/* SmartMD shared interface. Icons: Lucide, see vendor/lucide-LICENSE. */
:root{--sm-bg:#f5f7fb;--sm-surface:#fff;--sm-ink:#16233c;--sm-muted:#586780;--sm-line:#dfe6f0;--sm-accent:#335cff;--sm-soft:#eef2ff;--sm-radius:16px}
.sm-confirm{max-width:480px;width:calc(100% - 40px);border:1px solid var(--sm-line);border-radius:18px;padding:28px;background:#fff;color:var(--sm-ink);font:15px/1.6 system-ui,sans-serif;box-shadow:0 24px 80px #12255130}.sm-confirm::backdrop{background:#16233c66}.sm-confirm h2{font-size:21px;margin:0 0 12px}.sm-confirm p{color:var(--sm-muted)}.sm-confirm .sm-actions{justify-content:flex-end}
.sm-icon{width:20px;height:20px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;vertical-align:middle}
.sm-app{margin:0;background:var(--sm-bg);color:var(--sm-ink);font:15px/1.6 Inter,ui-sans-serif,system-ui,-apple-system,'Segoe UI','Microsoft YaHei',sans-serif}
.sm-app *{box-sizing:border-box}.sm-app a{color:inherit}.sm-app [hidden]{display:none!important}
.sm-app :is(a,button,input,select,textarea,summary):focus-visible,.sm-settings :is(summary,select,a):focus-visible{outline:3px solid #6688ff;outline-offset:4px}
.sm-topbar{height:76px;position:sticky;top:0;z-index:100;display:flex;align-items:center;gap:32px;padding:0 32px;border-bottom:1px solid var(--sm-line);background:#ffffffed;backdrop-filter:blur(14px)}
.sm-brand{display:flex;align-items:center;gap:0;font-size:23px;font-weight:780;letter-spacing:-1px;text-decoration:none}.sm-brand>span:last-child{color:var(--sm-accent)}.sm-brand-mark{display:grid;place-items:center;width:36px;height:36px;background:var(--sm-accent);color:white;border-radius:11px;margin-right:10px}.sm-brand-mark .sm-icon{width:23px;height:23px}.sm-workspace{color:var(--sm-muted);font-size:13px;border-left:1px solid var(--sm-line);padding-left:26px}
.sm-settings{position:relative;margin-left:auto;color:var(--sm-ink);font:14px/1.5 system-ui,sans-serif;text-align:left}.sm-settings summary{display:flex;align-items:center;gap:9px;list-style:none;cursor:pointer;padding:10px 12px;border:1px solid var(--sm-line);border-radius:10px;background:white;min-height:44px}.sm-settings summary::-webkit-details-marker{display:none}.sm-settings summary .sm-icon:last-child{width:14px}.sm-settings-panel{position:absolute;right:0;top:calc(100% + 10px);width:250px;background:white;border:1px solid var(--sm-line);border-radius:14px;padding:18px;box-shadow:0 14px 50px #17244220;z-index:1100}.sm-settings-panel label{display:flex;align-items:center;gap:9px;font-weight:600;margin:0 0 10px}.sm-settings-panel select{width:100%;min-height:44px;padding:9px 12px;border:1px solid #c6d0e0;border-radius:8px;background:white;color:var(--sm-ink)}.sm-settings-panel a{display:flex;align-items:center;gap:8px;margin-top:15px;text-decoration:none;color:var(--sm-muted)}.sm-language-status:empty{display:none}.sm-language-status{font-size:13px;color:#a13232!important}
.sm-sidebar{position:fixed;top:76px;bottom:0;left:0;width:232px;display:flex;flex-direction:column;gap:6px;padding:28px 16px;background:#fff;border-right:1px solid var(--sm-line);z-index:50;overflow:auto}.sm-nav-label{font-size:11px;text-transform:uppercase;letter-spacing:1.5px;font-weight:650;color:var(--sm-muted);padding:0 14px 15px}.sm-sidebar a{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:10px;text-decoration:none;font-size:14px;font-weight:550;color:var(--sm-muted);white-space:nowrap;min-height:46px}.sm-sidebar a:hover{background:var(--sm-bg);color:var(--sm-accent)}.sm-sidebar a[aria-current]{color:#294de0;background:var(--sm-soft)}.sm-sidebar-footer{margin-top:auto;padding-top:30px}.sm-sidebar-footer>span{display:block;padding:14px;font-size:11px;color:var(--sm-muted)}
.sm-main{max-width:1360px;margin:0 auto;padding:42px 48px 24px}.sm-staff .sm-main{margin-left:232px}.sm-app h1{font-size:clamp(29px,3.2vw,42px);line-height:1.2;letter-spacing:-1.3px;font-weight:730;margin:10px 0 14px}.sm-app h2{font-size:19px;letter-spacing:-.4px;margin:0 0 14px}.sm-app h3{font-size:16px;line-height:1.45;margin:16px 0 7px;font-weight:650}.sm-app p{color:var(--sm-muted);margin:8px 0;max-width:850px}.sm-eyebrow{font-size:11px;letter-spacing:1.8px;text-transform:uppercase;font-weight:700;color:var(--sm-accent)}.sm-page-heading{margin-bottom:30px}.sm-heading-row{display:flex;align-items:center;justify-content:space-between;gap:24px}.sm-hero{position:relative;overflow:hidden;background:linear-gradient(115deg,#122551,#2444a0);color:white;border-radius:22px;padding:36px;margin-bottom:32px}.sm-hero:after{content:'';position:absolute;width:260px;height:260px;border:45px solid #ffffff08;border-radius:50%;right:-70px;top:-90px;pointer-events:none}.sm-hero h1{font-size:clamp(28px,3.4vw,42px);color:white}.sm-hero p{color:#d3def9}.sm-hero .sm-eyebrow{color:#b9cbff}.sm-hero .sm-button{background:white;color:#2545b0;border-color:white;margin-top:20px}.sm-hero-meta{margin-top:18px;font-size:12px;color:#c9d6f6}
.sm-button{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:44px;padding:10px 17px;border:1px solid var(--sm-line);border-radius:10px;background:white;color:var(--sm-ink);text-decoration:none;font-size:14px;font-weight:600;cursor:pointer}.sm-button.primary{background:var(--sm-accent);border-color:var(--sm-accent);color:#fff}.sm-button:hover{filter:brightness(.96)}.sm-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:24px}
.sm-section{margin:30px 0}.sm-section-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:18px}.sm-section-heading h2{margin:0}.sm-search{display:flex;align-items:center;gap:10px;background:white;border:1px solid var(--sm-line);border-radius:10px;padding:0 12px;width:min(100%,320px);color:var(--sm-muted)}.sm-search input{border:0;background:transparent;width:100%;min-width:0;padding:11px 0;outline-offset:0;font:inherit;color:var(--sm-ink)}.sm-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.sm-card{display:block;background:white;border:1px solid var(--sm-line);border-radius:var(--sm-radius);padding:22px;text-decoration:none;transition:transform .16s,border-color .16s,box-shadow .16s;min-width:0}.sm-card:hover{border-color:#9baef8;transform:translateY(-3px);box-shadow:0 10px 26px #2439620b}.sm-card-top{display:flex;align-items:center;gap:12px}.sm-card-top>.sm-icon:last-child{margin-left:auto;width:17px;height:17px;color:#7c8ba6}.sm-card-icon{display:grid;place-items:center;background:var(--sm-soft);color:#365bdd;width:42px;height:42px;border-radius:12px}.sm-card:nth-child(3n+2) .sm-card-icon{background:#eaf6f5;color:#187d80}.sm-card:nth-child(3n+3) .sm-card-icon{background:#f4effe;color:#7c53be}.sm-card p{font-size:13px;line-height:1.65;margin:0}.sm-count{font-size:24px;font-weight:650;letter-spacing:-1px;color:var(--sm-ink)}
.sm-note,.sm-panel{background:white;border:1px solid var(--sm-line);border-radius:var(--sm-radius);padding:24px;margin:22px 0}.sm-note{background:#edf2fa;border-color:transparent;font-size:13px}.sm-note summary{cursor:pointer;font-weight:650;min-height:32px}.sm-note li{margin:10px 0}.sm-empty{display:flex;align-items:center;gap:14px;padding:16px 0;color:var(--sm-muted)}.sm-empty>.sm-icon{color:#258275}.sm-queue{list-style:none;padding:0;margin:0}.sm-queue a{display:flex;justify-content:space-between;gap:16px;padding:16px 0;text-decoration:none;border-bottom:1px solid var(--sm-line)}.sm-queue small{color:var(--sm-muted)}.sm-footer{padding:24px 0 8px;margin-top:32px;border-top:1px solid var(--sm-line);color:#65748d;font-size:12px}.sm-skip{position:fixed;top:-100px;left:16px;z-index:2000;background:white;padding:12px}.sm-skip:focus{top:8px}
.sm-public .sm-main{max-width:1160px}.sm-public .sm-landing{padding:65px 0 36px;max-width:850px}.sm-landing h1{font-size:clamp(38px,6vw,66px);letter-spacing:-2.5px}.sm-app :is(button,input,select,textarea){font:inherit}.sm-app button{min-height:44px;border-radius:9px}.sm-app button:not(.primary){color:var(--sm-ink);border-color:var(--sm-line)}.sm-app .primary{background:var(--sm-accent);border-color:var(--sm-accent);color:white}.sm-app :is(input,select,textarea){border-color:#c6d0e0;border-radius:8px}.sm-app .panel{background:white;border-color:var(--sm-line);border-radius:var(--sm-radius)}.sm-app .hero{padding:20px 0 28px}.sm-app .eyebrow{color:var(--sm-accent)}
[data-sm-icon]::before{content:'';display:inline-block;width:17px;height:17px;background:currentColor;mask:var(--sm-button-icon) center/contain no-repeat;-webkit-mask:var(--sm-button-icon) center/contain no-repeat;margin-right:8px;vertical-align:-3px;flex-shrink:0}
/* Native Desk uses its own lifecycle, forms and contrast-aware theme variables. */
html[data-theme="light"] body[data-route]{--primary:#335cff;--btn-primary:#335cff;--bg-color:#f5f7fb;--navbar-bg:#fff;--text-color:#16233c;--text-muted:#586780;--border-color:#dfe6f0}
body[data-route] .page-head{background:var(--bg-color)}body[data-route] .layout-main-section{border-radius:16px}body[data-route] .btn-primary{background:var(--primary);border-color:var(--primary)}body[data-route] .page-head .btn, .smartmd-operations>div>.btn,.smartmd-reception button{min-height:40px;border-radius:9px;padding:9px 14px}.smartmd-operations{min-height:380px}.smartmd-operations>div:first-child{padding:16px;background:var(--subtle-fg);border-radius:13px}.smartmd-operations .sm-native-empty{padding:32px 20px;text-align:center;color:var(--text-muted);background:var(--subtle-fg);border:1px dashed var(--border-color);border-radius:14px}
body[data-route] .sm-settings{margin:0 12px}body[data-route] .sm-settings summary{min-height:36px;padding:7px 10px}body[data-route] .navbar{border-bottom:1px solid var(--border-color)}.sm-document-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px;margin:8px 0;border:1px solid var(--border-color);border-radius:12px;background:var(--card-bg);text-decoration:none!important}.sm-document-row:hover{border-color:#879fff;background:var(--subtle-fg)}.smartmd-operations .sm-document-row .sm-icon{color:#4263dc;margin-right:12px}.smartmd-operations h3{margin-top:24px}.smartmd-operations .editor{border:1px solid var(--border-color);border-radius:16px;padding:24px}.smartmd-reception .panel{background:var(--card-bg);box-shadow:0 3px 14px #1b2e4e05}.smartmd-reception .bar{background:#365bdd!important}.smartmd-reception .bar.conflict{background:#995818!important}
@media(min-width:1600px){.sm-staff .sm-main{margin-left:max(232px,calc((100vw - 1128px)/2))}}
@media(max-width:1100px){.sm-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sm-main{padding:30px 28px}.sm-sidebar{width:210px}.sm-staff .sm-main{margin-left:210px}}
@media(max-width:760px){.sm-topbar{height:68px;padding:0 18px;gap:12px}.sm-workspace{display:none}.sm-brand{font-size:21px}.sm-sidebar{position:sticky;top:68px;width:100%;flex-direction:row;padding:10px 14px;gap:5px;border-right:0;border-bottom:1px solid var(--sm-line);overflow-x:auto}.sm-sidebar a{padding:9px 12px;font-size:13px}.sm-nav-label,.sm-sidebar-footer{display:none}.sm-staff .sm-main{margin-left:0}.sm-main{padding:25px 18px}.sm-heading-row,.sm-section-heading{align-items:flex-start;flex-direction:column;gap:16px}.sm-search{width:100%}.sm-hero{padding:26px}.sm-hero h1{font-size:30px}.sm-card{padding:20px}.sm-public .sm-landing{padding-top:30px}.sm-settings-panel{width:230px}.sm-queue a{flex-direction:column;gap:4px}}
@media(max-width:480px){.sm-grid{grid-template-columns:1fr}.sm-settings summary{padding:9px}.sm-app h1{letter-spacing:-.8px}.sm-note,.sm-panel{padding:20px}.sm-actions .sm-button{width:100%}}
@media(prefers-reduced-motion:reduce){.sm-card{transition:none}.sm-card:hover{transform:none}}

/* Workflows and section-specific setup stay distinct from workspace configuration. */
.sm-customer-filters{display:flex;flex-wrap:wrap;align-items:flex-end;gap:14px}.sm-customer-filters label{display:flex;flex-direction:column;gap:6px;min-width:150px;flex:1;font-weight:600;font-size:13px}.sm-customer-filters .sm-customer-search{flex:2;min-width:220px}.sm-customer-filters :is(input,select){width:100%;min-height:44px;border:1px solid var(--sm-line);border-radius:9px;padding:10px;background:#fff;color:var(--sm-ink);font:inherit}.sm-customer-row{display:flex;align-items:center;gap:22px;text-decoration:none;margin-bottom:12px}.sm-customer-row>div{flex:1;min-width:0;overflow-wrap:anywhere}.sm-customer-row small,.sm-customer-row div>span:not(.sm-customer-tag){display:block;color:var(--sm-muted)}.sm-customer-row strong{font-size:18px}.sm-customer-row:hover{border-color:var(--sm-accent)}.sm-customer-tag{display:inline-block;border:1px solid var(--sm-line);border-radius:20px;padding:2px 9px;margin:4px 4px 0 0;background:var(--sm-soft);font-size:12px;overflow-wrap:anywhere}.sm-customer-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.sm-customer-facts dt{color:var(--sm-muted);font-size:13px}.sm-customer-facts dd{margin:3px 0 0;overflow-wrap:anywhere}.sm-customer-notes{white-space:pre-wrap;overflow-wrap:anywhere}#customers{scroll-margin-top:110px}@media(max-width:760px){.sm-customer-facts{grid-template-columns:repeat(2,minmax(0,1fr))}.sm-customer-row{align-items:flex-start;flex-wrap:wrap}.sm-customer-row>div{flex-basis:100%}.sm-customer-row>.sm-icon{display:none}.sm-customer-filters label{min-width:0;flex-basis:100%}.sm-customer-filters .sm-customer-search{min-width:0}.sm-customer-filters .sm-button{width:100%}}
.sm-subnav{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 24px;padding-bottom:14px;border-bottom:1px solid var(--sm-line)}
.sm-subnav a{display:flex;align-items:center;gap:8px;padding:10px 14px;border-radius:9px;background:#fff;border:1px solid var(--sm-line);text-decoration:none;font-size:14px}
.sm-subnav a:hover{border-color:var(--sm-accent);color:var(--sm-accent)}
.sm-section-settings{border-top:1px solid var(--sm-line);padding-top:28px;margin-top:36px}
.sm-section-settings h2{display:flex;align-items:center;gap:9px}
.sm-app :is(#settings,#workflows){scroll-margin-top:100px}
@media(max-width:760px){.sm-sidebar-footer{display:contents}.sm-sidebar-footer>span{display:none}.sm-sidebar a{flex-shrink:0}.sm-app :is(#settings,#workflows){scroll-margin-top:150px}}

.sm-stock-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr));gap:18px}.sm-stock-card{border:1px solid var(--sm-line);border-radius:12px;padding:20px;min-width:0;overflow-wrap:anywhere}.sm-stock-card .sm-customer-facts{grid-template-columns:repeat(2,minmax(0,1fr))}

/* Guided sales reuse the catalogue controls and keep the next step prominent. */
.sm-sale-stage{font-size:22px;font-weight:650;color:var(--text-color);margin:0 0 16px}.sm-sale-steps{display:flex;flex-wrap:wrap;gap:12px 30px;padding:0;list-style-position:inside;margin:0 0 20px}.sm-sale-steps li{padding:10px 14px;border-radius:10px;background:var(--subtle-fg);font-size:13px}.sm-card-sales .sm-catalog-section:has(.sm-sale-stage){border-left:4px solid #365bdd}.sm-card-sales .control-value{overflow-wrap:anywhere}@media(max-width:650px){.sm-sale-steps{display:grid;grid-template-columns:1fr 1fr;gap:8px}.sm-sale-stage{font-size:19px}}
/* Unified service and card catalogue. */
.sm-catalog{padding:24px;max-width:1400px;margin:auto}.sm-catalog-tabs,.sm-catalog-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-bottom:22px}.sm-catalog .btn{min-height:44px;display:inline-flex;align-items:center;gap:8px}.sm-catalog-tabs .active{background:#365bdd;color:#fff;border-color:#365bdd}.sm-catalog-section{border:1px solid var(--border-color);background:var(--card-bg);border-radius:16px;padding:24px;margin-bottom:22px;min-width:0}.sm-catalog-section h3{font-size:18px;margin:0 0 20px}.sm-catalog-section>.btn{margin:0 10px 10px 0}.sm-catalog-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-bottom:24px}.sm-catalog-card{display:flex;flex-direction:column;gap:18px;padding:22px;border:1px solid var(--border-color);background:var(--card-bg);border-radius:16px;text-decoration:none!important;color:var(--text-color)!important;min-width:0;overflow-wrap:anywhere}.sm-catalog-card:hover{border-color:#6688ff;box-shadow:0 6px 20px #1d3b6b0d}.sm-catalog-card img{height:130px;width:100%;object-fit:cover;border-radius:10px}.sm-catalog-card-icon{display:grid;place-items:center;width:44px;height:44px;background:#eef2ff;color:#365bdd;border-radius:12px}.sm-catalog-card h3{font-size:20px;margin:8px 0}.sm-catalog-card p{margin:5px 0;color:var(--text-muted)}.sm-catalog-card small{display:block;font-size:11px;color:var(--text-muted);margin-top:16px}.sm-catalog-status{font-size:12px;color:var(--text-muted)}.sm-catalog-tag{display:inline-block;background:var(--subtle-fg);border-radius:12px;padding:3px 9px;margin:5px 5px 0 0;font-size:12px}.sm-catalog-empty{grid-column:1/-1;text-align:center;padding:50px 20px;border:1px dashed var(--border-color);border-radius:16px}.sm-catalog-help{padding:18px 22px;background:var(--subtle-fg);border-radius:12px}.sm-catalog-error{color:var(--red-600);padding:20px}.sm-catalog a:focus-visible,.sm-catalog button:focus-visible{outline:3px solid #6688ff;outline-offset:3px}
@media(max-width:1100px){.sm-catalog-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:650px){.sm-catalog{padding:14px}.sm-catalog-section{padding:18px}.sm-catalog-cards{grid-template-columns:1fr}.sm-catalog .form-section>.section-body{display:block}.sm-catalog .form-column{width:100%;max-width:100%;flex:none}.sm-catalog .frappe-control[data-fieldtype="Table"]{overflow-x:auto}.sm-catalog-section>.btn{width:100%;justify-content:flex-start}}

.sm-catalog.sm-card-sales{padding-top:76px}
.sm-catalog{padding-top:76px}
.sm-work-context{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;margin-bottom:20px;border:1px solid var(--border-color,#dce3ee);border-radius:12px;background:var(--card-bg,#fff);font-weight:600}
.sm-work-context>span{overflow-wrap:anywhere;min-width:0}
.sm-customer-package{padding:12px 0;border-bottom:1px solid var(--border-color,#dce3ee)}
.sm-remaining{font-weight:600;color:var(--text-color,#263248)}
.sm-catalog details>summary{cursor:pointer;padding:8px 0;color:var(--text-muted,#52627b)}
.sm-catalog details>div{padding-top:14px}
@media(max-width:600px){.sm-work-context{align-items:flex-start;flex-direction:column}.smartmd-reception .choices{grid-template-columns:minmax(0,1fr)}}
