#content[data-page=kds]{color:#25475b}
.kg-intro{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:2px 0 24px}.kg-intro h2{font-size:21px;margin:0 0 8px;font-weight:800;letter-spacing:-.3px}.kg-intro p{font-size:14px;color:#6b8192;margin:0;line-height:1.6}.kg-count{flex-shrink:0;background:#e8f1f7;border:1px solid #c7dce9;border-radius:9px;padding:8px 12px;font-size:12px;font-weight:750;color:#466b82}
.kg-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,330px),1fr));gap:20px}.kg-card{background:#fff;border:1px solid #c6dae7;border-radius:16px;padding:22px;box-shadow:0 4px 0 #dbe7ef,0 7px 18px #24455d07;min-width:0}.kg-head{display:flex;align-items:center;gap:12px}.kg-icon{display:grid;place-items:center;flex:0 0 44px;height:44px;border:1px solid #ffd3ac;background:#fff3e7;border-radius:12px;color:#d26a12}.kg-icon svg{width:25px;height:25px}.kg-name{min-width:0;flex:1}.kg-name small{font-size:9px;letter-spacing:1px;color:#7a91a2;font-weight:750}.kg-name h3{font-size:21px;line-height:1.3;margin:3px 0 0;overflow-wrap:anywhere;font-weight:800}.kg-edit{background:none;border:none;color:#497189;font-size:11px;font-weight:700;cursor:pointer;padding:8px 0 8px 6px;white-space:nowrap}.kg-edit:hover{text-decoration:underline}
.kg-products{display:flex;gap:12px;align-items:center;background:#f3f8fb;border:1px solid #e0ebf2;border-radius:11px;margin:22px 0 18px;padding:14px 16px}.kg-products>strong{font-size:30px;line-height:1;color:#226482;font-weight:800}.kg-products>span{font-size:13px;font-weight:750}.kg-products small{display:block;font-size:11px;font-weight:400;color:#7690a2;margin-top:4px}.kg-products-empty{background:#fafbfc}.kg-products-empty>strong{color:#8da0ac}
.kg-actions{display:flex;gap:10px}.kg-actions .btn{flex:1;display:flex;align-items:center;justify-content:center;text-decoration:none;height:43px;padding:0 10px;font-size:12px;border-radius:10px;white-space:nowrap}.kg-actions .btn-pri{background:#ff8014;box-shadow:0 3px #cf6612}.kg-actions .btn-sec{background:#f6fafc;box-shadow:0 3px #c6d9e5;border:1px solid #bed5e4;color:#365e76}
.kg-link{border-top:1px solid #e3ecf2;margin-top:23px;padding-top:15px}.kg-link label{display:block;font-size:11px;font-weight:700;color:#6c8394;margin-bottom:8px}.kg-link-field{display:flex;align-items:stretch;background:#f5f8fa;border:1px solid #d4e1e9;border-radius:9px;overflow:hidden}.kg-link-field input{min-width:0;width:100%;flex:1;border:0!important;background:transparent!important;box-shadow:none!important;border-radius:0!important;padding:10px!important;font-size:11px!important;color:#688293;font-family:inherit;height:36px;outline-offset:-3px}.kg-link-field button{border:0;border-left:1px solid #d4e1e9;background:#edf4f9;color:#31627f;padding:0 12px;font-size:11px;font-weight:750;cursor:pointer}.kg-link-field button:hover{background:#deedf6}
.kg-note{margin-top:26px;border-left:3px solid #a9c7da;padding:3px 0 3px 15px;color:#6d8395}.kg-note strong{font-size:12px;color:#466c83}.kg-note p{font-size:12px;margin:5px 0;line-height:1.5}.kg-note small{font-size:11px;line-height:1.5;display:block}
.kg-card button:focus-visible,.kg-card a:focus-visible{outline:3px solid #3888b6;outline-offset:3px}
#kdsSectorDialog::backdrop{background:#16344766;backdrop-filter:blur(3px)}
@media(max-width:600px){.kg-intro{align-items:flex-start}.kg-intro h2{font-size:18px}.kg-intro p{font-size:12px}.kg-count{display:none}.kg-card{padding:18px}.kg-grid{gap:16px}.kg-name h3{font-size:19px}}
.kg-route{font-size:11px;color:#698497;margin-top:15px;line-height:1.5}.kg-products-link{border:0;background:none;color:#246585;font:700 12px inherit;cursor:pointer;text-align:left;padding:0;margin:0 0 18px}.kg-dialog{margin:auto;border:1px solid #bbd4e3;border-radius:18px;padding:24px;width:540px;max-width:calc(100vw - 32px);max-height:90dvh;color:#21495d;overflow:auto}.kg-dialog::backdrop{background:#15334566;backdrop-filter:blur(3px)}.kg-dialog header{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-bottom:20px}.kg-dialog header small{font-size:10px;letter-spacing:1px;color:#7390a3}.kg-dialog h2{font-size:22px;margin:4px 0}.kg-dialog .field{margin:16px 0}.kg-dialog label{display:block;font-size:13px;font-weight:700}.kg-dialog input:not([type=checkbox]),.kg-dialog select{display:block;box-sizing:border-box;width:100%;background:#f8fbfd;border:1px solid #bfd4e2;border-radius:9px;padding:11px;color:#21495d;margin-top:7px;font:inherit;min-width:0}.kg-dialog small{display:block;font-size:11px;color:#738b9c;margin-top:5px;font-weight:400;line-height:1.5}.kg-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.kg-check{display:flex!important;align-items:center;gap:12px;padding:14px;background:#f1f7fb;border:1px solid #c9dce9;border-radius:11px;margin:16px 0}.kg-check input{width:22px;height:22px;accent-color:#ed7c20;flex-shrink:0}.kg-check small{font-weight:400}.kg-config-note{font-size:12px;color:#6c8596;line-height:1.6}.kg-dialog footer{display:flex;justify-content:flex-end;margin-top:18px}.kg-dialog [role=alert]{color:#b74132;font-size:12px}.kg-dialog-products{width:860px}.kg-product-search{margin:16px 0!important}.kg-product-form{padding:18px;border:1px solid #c6dce9;border-radius:12px;margin:14px 0}.kg-product-title{display:flex;justify-content:space-between;gap:12px;margin-bottom:16px}.kg-product-title strong{font-size:16px}.kg-product-title span{font-size:11px;color:#708b9d}.kg-entry-options{background:#fff7ec;border-radius:10px;padding:12px;margin-top:12px}.kg-product-save{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:14px}.kg-product-save [role=status]{font-size:12px;color:#437c65}.kg-product-save button{flex-shrink:0}@media(max-width:600px){.kg-form-grid{grid-template-columns:1fr}.kg-dialog{padding:18px}.kg-product-title{flex-direction:column}}
.kg-dialog [hidden]{display:none!important}

/* Product linking: only the product list scrolls. */
#kdsLinkDialog{width:min(1000px,calc(100vw - 32px));height:min(760px,calc(100dvh - 40px));max-height:calc(100dvh - 40px);padding:24px;border:1px solid #cbdde8;border-top:4px solid #2697bd;border-radius:20px;overflow:hidden;box-sizing:border-box;color:#203f54}
#kdsLinkDialog[open]{display:flex;flex-direction:column;gap:14px}
#kdsLinkDialog .kg-link-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:0;border:0;flex-shrink:0}
#kdsLinkDialog .kg-link-head small{font-size:10px;letter-spacing:.1em;font-weight:800;color:#237c9d}
#kdsLinkDialog h2{margin:5px 0;font-size:24px}
#kdsLinkDialog p{font-size:13px;color:#596f7e;margin:5px 0;line-height:1.4}
#kdsLinkDialog .kg-link-target{display:grid;gap:6px;flex-shrink:0;background:#f1f7fa;padding:12px;border-radius:12px;border:1px solid #dce8ef}
#kdsLinkDialog label[for]{font-size:12px;font-weight:750}
#kdsLinkDialog select,#kdsLinkDialog .kg-link-tools input{min-width:0;min-height:42px;border:1px solid #bcd2e0;border-radius:9px;padding:9px 12px;font:inherit;background:#fff;color:#203f54;width:100%;box-sizing:border-box}
#kdsLinkDialog .kg-link-tools{display:grid;grid-template-columns:1.3fr 1fr auto auto;gap:8px;flex-shrink:0}
#kdsLinkDialog .btn{white-space:nowrap;min-height:42px;font-size:12px;border-radius:10px}
#kdsLinkDialog .kg-link-list-head{display:flex;justify-content:space-between;color:#667b89;font-size:11px;font-weight:700;padding:0 12px}
#kdsLinkList{overflow:auto;flex:1;min-height:0;border:1px solid #dce6ed;border-radius:12px;background:#fff}
#kdsLinkDialog .kg-link-product{display:flex;align-items:center;gap:12px;padding:13px 14px;border-bottom:1px solid #e5edf2;cursor:pointer;min-height:66px;box-sizing:border-box}
#kdsLinkDialog .kg-link-product:hover{background:#f6fafc}#kdsLinkDialog .kg-link-product:has(input:checked){background:#edf8f4;box-shadow:inset 3px 0 #169b70}
#kdsLinkDialog .kg-link-product input{width:19px;height:19px;flex-shrink:0;accent-color:#168466}
#kdsLinkDialog .kg-link-product>span{min-width:0}#kdsLinkDialog .kg-link-product strong{font-size:14px}#kdsLinkDialog .kg-link-product small{display:block;font-size:11px;color:#62798a;margin-top:4px}
#kdsLinkDialog .kg-link-destination{margin-left:auto;border:1px solid #d9e6ee;background:#f3f8fb;padding:5px 9px;border-radius:7px;font-size:11px;flex-shrink:0;max-width:35%;overflow-wrap:anywhere}
#kdsLinkDialog .kg-link-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;border-top:1px solid #dce6ed;padding:14px 0 0;margin:0;flex-shrink:0}
#kdsLinkDialog #kdsLinkError{color:#b33030}#kdsLinkDialog .kg-link-empty{padding:24px;text-align:center}
@media(max-width:650px){#kdsLinkDialog{padding:16px;width:calc(100vw - 16px);height:calc(100dvh - 24px);max-height:calc(100dvh - 24px)}#kdsLinkDialog[open]{gap:10px}#kdsLinkDialog h2{font-size:19px}#kdsLinkDialog .kg-link-tools{grid-template-columns:1fr 1fr}#kdsLinkDialog .kg-link-footer p{font-size:11px}#kdsLinkDialog .kg-link-footer .btn{white-space:normal}#kdsLinkDialog .kg-link-product{gap:8px;padding:10px}#kdsLinkDialog .kg-link-product strong{font-size:12px}}

/* Dense linking workspace: reserve the height for products. */
#kdsLinkDialog{padding:18px 22px;height:calc(100dvh - 32px);max-height:920px;width:min(1080px,calc(100vw - 32px));border-radius:18px}
#kdsLinkDialog[open]{gap:9px}
#kdsLinkDialog .kg-link-head{margin:0;min-height:0;padding:0 0 10px;border-bottom:1px solid #e0e9ef;align-items:center}
#kdsLinkDialog .kg-link-head small{font-size:9px}
#kdsLinkDialog h2{font-size:21px;line-height:1.2;margin:3px 0}
#kdsLinkDialog .kg-link-head p{margin:3px 0 0;font-size:12px}
#kdsLinkDialog .kg-link-head [data-close]{padding:8px 17px;min-height:36px;box-shadow:0 3px 0 #c4d5e0;border-color:#bfd2df;background:linear-gradient(#fff,#edf4f8);color:#294d64;font-weight:750}
#kdsLinkDialog .kg-link-target{display:grid;grid-template-columns:140px minmax(0,1fr);align-items:center;gap:12px;padding:8px 12px;margin:0;background:linear-gradient(110deg,#e8f3f9,#f7fbfd);border:1px solid #bfd8e8;border-left:4px solid #2587ad;border-radius:11px;box-shadow:0 3px 0 #d9e6ee}
#kdsLinkDialog .kg-link-target label{margin:0;color:#28617d;font-size:12px;line-height:1.3}
#kdsLinkDialog #kdsLinkTarget{height:40px;min-height:40px;padding:8px 38px 8px 13px;border:1px solid #9ebfd3;border-bottom:3px solid #93b5ca;background:linear-gradient(#fff,#f0f7fb);font-size:14px;font-weight:750;color:#204f6a;box-shadow:0 2px 5px #1649650a;cursor:pointer}
#kdsLinkDialog .kg-link-tools{margin:2px 0 0;gap:7px}
#kdsLinkDialog .kg-link-tools input,#kdsLinkDialog .kg-link-tools select{height:36px;min-height:36px;font-size:12px;padding:7px 10px}
#kdsLinkDialog .kg-link-tools .btn{height:36px;min-height:36px;padding:7px 10px;font-size:11px}
#kdsLinkDialog .kg-link-list-head{padding:0 10px;font-size:10px;margin:0;line-height:1.2}
#kdsLinkDialog .kg-link-product{min-height:46px;padding:6px 11px;gap:10px;margin:0;line-height:1.25}
#kdsLinkDialog .kg-link-product strong{font-size:13px;font-weight:700}
#kdsLinkDialog .kg-link-product small{font-size:10px;margin-top:2px;line-height:1.2}
#kdsLinkDialog .kg-link-product input{width:17px;height:17px;margin:0}
#kdsLinkDialog .kg-link-destination{font-size:10px;padding:4px 8px}
#kdsLinkDialog .kg-link-footer{padding-top:9px;gap:10px}
#kdsLinkDialog .kg-link-footer strong{font-size:14px}
#kdsLinkDialog .kg-link-footer p{font-size:11px;margin:3px 0 0}
#kdsLinkDialog #kdsLinkError:empty{display:none}
#kdsLinkDialog #kdsSaveLinks{min-height:38px;padding:9px 18px;box-shadow:0 3px 0 #b74c0c}
@media(max-width:650px){#kdsLinkDialog{padding:12px;width:calc(100vw - 16px);height:calc(100dvh - 20px);max-height:calc(100dvh - 20px)}#kdsLinkDialog .kg-link-target{grid-template-columns:85px minmax(0,1fr);padding:7px 8px;gap:6px}#kdsLinkDialog h2{font-size:17px}#kdsLinkDialog .kg-link-head p{font-size:11px}#kdsLinkDialog .kg-link-product{min-height:48px}#kdsLinkDialog .kg-link-head [data-close]{padding:8px 11px}#kdsLinkDialog .kg-link-tools{gap:6px}}
