/* Delivery Hub — painel único, responsivo e legível. */
.hub-page{color:#f5efdf}
.hub-hero{background:radial-gradient(circle at 87% 8%,#d5a35e45,transparent 45%),linear-gradient(140deg,#283c50,#101c2b);border:1px solid #c6a87066;border-radius:18px;padding:22px;margin-bottom:18px}
.hub-hero>small{color:#e7b869;font-size:11px;letter-spacing:.11em;font-weight:800}
.hub-hero h2{font-size:clamp(27px,4vw,39px);color:#ffe4bb;margin:8px 0}
.hub-hero p,.hub-hint{color:#bfd0db;font-size:12px;line-height:1.6}
.hub-page h3{color:#ffe1ae;font-size:19px;margin:24px 0 12px}
.hub-numbers{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:18px}
.hub-numbers>div{background:#0d1c2a88;border:1px solid #829cbd66;border-radius:12px;padding:12px}
.hub-numbers strong{font-size:24px;color:#fff2ce;display:block}
.hub-numbers small{font-size:10px;color:#c4d4e1}
.hub-platforms{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.hub-platform,.hub-box,.hub-order{border:1px solid #8aa2ba6b;background:linear-gradient(145deg,#22344a,#132336);border-radius:14px;padding:15px;min-width:0;box-shadow:inset 0 1px #ffffff18,0 7px 17px #0003}
.hub-platform header,.hub-order header{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;flex-wrap:wrap}
.hub-platform header strong,.hub-order strong{color:#fce5c2;font-size:14px}
.hub-platform header small,.hub-platform p,.hub-order p{font-size:11px;color:#b8c8d6}
.hub-platform p{min-height:33px;margin:10px 0}
.hub-platform a,.hub-platform button{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;margin:0 3px 5px 0;white-space:normal}
.hub-box>p{color:#c5d5e0;font-size:12px;line-height:1.55}
.hub-inputs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.hub-inputs label,.hub-json-label{font-size:12px;color:#dfe9f0;display:flex;flex-direction:column;gap:6px;margin:8px 0}
.hub-inputs input,.hub-inputs select,.hub-json-label textarea,.hub-product select{background:#071726;color:#faecd9;border:1px solid #89a4c1;border-radius:9px;padding:10px;min-height:39px;max-width:100%;box-sizing:border-box}
.hub-json-label textarea{font-family:ui-monospace,Consolas,monospace;font-size:11px;min-height:120px;resize:vertical}
.hub-actions{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}
.hub-preview{background:#0b2434;border:1px solid #5a8a91;border-radius:12px;padding:14px;margin:12px 0}
.hub-preview-line,.hub-product{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:10px 0;border-bottom:1px solid #86a3bd43}
.hub-preview-line>span,.hub-product>div>small{font-size:11px;color:#c5d6e0}
.hub-orders{display:grid;gap:10px}
.hub-order header small,.hub-product small{display:block;margin-top:4px}
.hub-order p{line-height:1.6}
.hub-items{margin:13px 0;border-top:1px solid #86a3bd43}
.hub-product-tools{display:flex;gap:7px;flex-wrap:wrap;align-items:center}
.hub-product-tools select{max-width:310px;min-width:170px;font-size:11px}
.hub-warning{background:#623c36;color:#ffe6d9;border-radius:20px;padding:6px 10px;font-size:11px}
.hub-neutral{background:#245567;color:#d4f8f8;border-radius:20px;padding:6px 10px;font-size:11px}
.hub-done{color:#9ce9b0;font-size:11px;font-weight:750}
.hub-locked{color:#ffc1a7;font-size:11px;font-weight:700}
@media(max-width:850px){.hub-platforms{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.hub-platforms,.hub-inputs{grid-template-columns:1fr}.hub-numbers{gap:5px}.hub-numbers strong{font-size:19px}.hub-platform p{min-height:0}.hub-product-tools{width:100%}.hub-product-tools select{max-width:100%;flex:1}}

/* Branded cards: images sourced from the official sites' identity icons. */
.hub-platform{position:relative;overflow:hidden;transition:transform .2s ease,box-shadow .2s ease;
 background:linear-gradient(145deg,#2a3e51,#142334)}
.hub-platform:hover{transform:translateY(-3px);box-shadow:0 13px 24px #0008}
.hub-platform:before{content:"";position:absolute;inset:0 0 auto;height:4px;background:var(--hub-accent,#c79a54)}
.hub-platform[data-channel="ifood"]{--hub-accent:#e9272e}
.hub-platform[data-channel="99food"]{--hub-accent:#ffcc00}
.hub-platform[data-channel="aiqfome"]{--hub-accent:#a820ba}
.hub-platform[data-channel="rappi"]{--hub-accent:#ff714f}
.hub-platform[data-channel="keeta"]{--hub-accent:#ffcc00}
.hub-platform[data-channel="deliverymuch"]{--hub-accent:#d92a1d}
.hub-platform[data-channel="maisdelivery"]{--hub-accent:#f1a629}
.hub-platform[data-channel="cardapioai"]{--hub-accent:#38b7ad}
.hub-platform[data-channel="olaclick"]{--hub-accent:#f18a54}
.hub-platform[data-channel="goomer"]{--hub-accent:#7469ce}
.hub-platform[data-channel="deliverydireto"]{--hub-accent:#c94b6a}
.hub-platform[data-channel="beefood"]{--hub-accent:#f4c223}
.hub-platform-identity{display:flex;align-items:center;gap:11px;margin-bottom:11px;min-height:67px}
.hub-platform-identity>strong{font-size:16px;overflow-wrap:anywhere;color:#fbe8c6}
.hub-platform-logo{display:grid;place-items:center;background:#fff;border-radius:17px;
 box-shadow:inset 0 0 0 1px #d6d6d6,0 6px 18px #0007;width:66px;height:66px;
 padding:9px;box-sizing:border-box;flex:0 0 auto}
.hub-platform-logo img{display:block;width:100%;height:100%;object-fit:contain}
.hub-platform-logo img[hidden]{display:none}
.hub-logo-fallback{display:none;color:#292b35;font-size:20px;font-weight:900}
.hub-platform-logo.brand-missing .hub-logo-fallback{display:block}
.hub-connection-state{display:inline-block;font-size:10px;border-radius:13px;
 color:#ffdbc8;background:#733e3399;padding:5px 9px;font-weight:800}
.hub-platform .hub-card-actions{display:flex;gap:6px;flex-wrap:wrap}
.hub-platform .hub-partner-note{display:block;color:#9faebd;font-size:9px;line-height:1.5;margin-top:9px}
.hub-platform p{margin-top:12px;min-height:32px}
@media(max-width:540px){.hub-platform-logo{height:57px;width:57px;border-radius:14px}
 .hub-platform-identity{min-height:57px}}

/* Integração MaisDelivery: somente homologação administrativa */
.hub-page .md-sandbox{margin-top:20px;border:1px solid #c08e49;background:linear-gradient(125deg,#29241d,#302b24);color:#f8ebd0}
.md-sandbox h3{margin:0 0 12px;color:#ffe2ae}
.md-sandbox .hub-inputs{display:grid;grid-template-columns:repeat(auto-fit,minmax(185px,1fr));gap:12px}
.md-sandbox .hub-inputs label{display:flex;flex-direction:column;gap:6px;font-size:12px}
.md-sandbox input,.md-sandbox select{max-width:100%;min-width:0;width:100%;box-sizing:border-box}
.md-panel{border:1px solid #796445;border-radius:14px;margin:18px 0 12px;padding:15px}
.md-panel legend{font-weight:700;color:#ffe4b4;padding:0 8px}
.md-panel .btn{margin-top:12px}
.md-result{max-height:240px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;background:#141515;border:1px solid #65573d;padding:13px;border-radius:12px;font-size:12px;color:#e9e5d9}

/* Situação real das conexões: somente MaisDelivery em sandbox. */
.hub-platform[data-api-status="testing"]{border-color:#c6a062a0;background:linear-gradient(145deg,#344351,#162b37)}
.hub-status-testing{background:#6b4a1e;color:#ffeac2;border:1px solid #d0a75e}
.hub-status-soon{background:#344456;color:#d7e0e9;border:1px solid #6b7f91}
.hub-platform button:disabled{opacity:.67;cursor:not-allowed;box-shadow:none}
#mdSandboxPanel{scroll-margin-top:83px}
