
.account-bar{position:sticky;top:0;z-index:20;background:#e7f5ef;border:1px solid #b5dbcb;border-radius:14px;padding:14px 18px;margin-bottom:20px;display:flex;gap:12px;align-items:center;flex-wrap:wrap;color:#123d34}
.account-bar.delegated{background:#fff3d5;border-color:#dfba63}.account-bar a{color:#176850}.account-bar button{margin-left:auto}.account-detail{font-size:13px;opacity:.9}.customer-tools{scroll-margin-top:95px}.customer-tools label,.customer-create label{display:flex;flex-direction:column;gap:6px}.customer-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.customer-form input{width:100%;min-width:0}.customer-actions{display:flex;gap:10px;flex-wrap:wrap;margin:16px 0}.customer-card{padding:20px;border:1px solid #dbe8e2;background:#fafdfb;border-radius:16px;margin:14px 0}.customer-card h3{margin:0 0 12px}.customer-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.customer-grid p{margin:4px 0}.customer-status{white-space:pre-line;line-height:1.8}.customer-error{color:#ac3328}.customer-tools img{width:240px;max-width:100%;display:block}.audit-entry{padding:12px;border-bottom:1px solid #e3e9e6;white-space:pre-wrap;word-break:break-word}.audit-entry pre{white-space:pre-wrap;max-height:240px;overflow:auto}.customer-link{display:inline-block;border-radius:10px;padding:10px 16px;text-decoration:none;background:#e8f3ec;color:#176451}.action-permanent_simulation{background:#e7eefc;color:#2059b3;border:1px solid #b8ccef}.mark{width:auto!important}
@media(max-width:750px){.customer-form,.customer-grid{grid-template-columns:1fr}.account-bar{top:0}.customer-actions>*{flex:1}.live-row{flex-wrap:wrap}.customer-card{padding:14px}}

.customer-form input:invalid{border-color:#d9e0e7}.customer-form input:user-invalid{border-color:#be584a}

.plan-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.plan-grid>.plan{min-width:0}.plan-grid .control-actions{flex-wrap:wrap}@media(max-width:1000px){.plan-grid{grid-template-columns:minmax(0,1fr)}}@media(max-width:700px){#combo-controls .plan button{white-space:normal}}

.chat-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:18px}.chat-card{min-width:0;border:1px solid #dbe5e0;border-radius:14px;overflow:hidden;background:#f4f8f6}.chat-card h3{margin:0;padding:18px 18px 6px;overflow-wrap:anywhere;font-size:17px}.chat-status{font-size:12px;padding:0 18px;color:#536c67;min-height:36px;overflow-wrap:anywhere}.chat-messages{height:480px;overflow:auto;padding:14px;overscroll-behavior:contain}.chat-bubble{max-width:92%;width:fit-content;background:#fff;border:1px solid #e1e9e5;border-radius:12px;padding:12px 14px;margin:0 auto 12px 0;min-width:0;box-shadow:0 1px 3px #173c3010}.chat-bubble.outgoing{background:#daf3e8;margin-left:auto;margin-right:0;border-color:#c1e1d3}.chat-meta,.chat-media{display:block;color:#587369;font-size:11px;overflow-wrap:anywhere;margin-bottom:5px}.chat-text{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.65}.chat-media{margin-top:7px}.chat-empty{text-align:center;padding:30px 12px;color:#6c817a}.chat-toolbar{display:flex;gap:8px;padding:12px;flex-wrap:wrap;border-top:1px solid #dbe5e0}.chat-toolbar button{font-size:12px;padding:8px 12px}.chat-toolbar button:disabled{opacity:.55}
@media(max-width:1100px){.chat-grid{grid-template-columns:minmax(0,1fr)}}@media(max-width:600px){.chat-messages{height:390px;padding:9px}.chat-card h3{font-size:15px}.chat-bubble{max-width:96%;padding:10px}.chat-toolbar button{flex:1}.chat-text{font-size:13px}}
#combo-controls>.plan{display:flex;flex-direction:column;gap:0}
#combo-controls>.plan>p{min-height:48px;margin:0 0 8px}
#combo-controls .combo-save{align-self:flex-start;min-width:170px;min-height:48px;margin-top:16px}
#combo-controls .combo-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;width:100%;padding-top:24px;margin-top:auto}
#combo-controls .combo-actions button{width:100%;min-width:0;min-height:52px;padding:12px 8px;white-space:normal;line-height:1.5}
.chat-compose{padding:14px;border-top:1px solid #dbe5e0;display:grid;gap:10px}
.chat-compose label{font-size:13px;color:#385f53}.chat-compose textarea{width:100%;min-height:88px;resize:vertical;font:inherit;padding:10px;border:1px solid #cbded5;border-radius:10px;background:#fff}
.chat-send-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.chat-send-state{font-size:12px;color:#526c65;white-space:pre-wrap;overflow-wrap:anywhere;margin:0}
@media(max-width:400px){#combo-controls .combo-actions{grid-template-columns:1fr}.chat-send-actions button{flex:1}}
/* Refined account header and two clear account-management areas. */
.account-bar{position:relative;top:auto;padding:12px 15px;gap:8px 12px;margin:0 0 18px;background:#fff;border:1px solid #dce7e5;border-radius:12px;box-shadow:0 2px 6px #12372e04;color:#24473e;font-size:12px}.account-avatar{width:31px;height:31px;display:inline-grid;place-items:center;border-radius:9px;background:#e8f5ee;color:#266e55;font-size:16px;font-weight:600;flex-shrink:0}.account-bar strong{font-size:13px;font-weight:600}.account-detail{font-size:11px;color:#789087;opacity:1}.account-bar>a{margin-left:auto;display:inline-flex;align-items:center;gap:5px;text-decoration:none;padding:5px 8px;border-radius:6px;color:#2a6c56;background:#f0f7f3;min-height:32px}.account-bar .account-logout{order:10;margin:0;font-size:11px;min-height:33px;padding:6px 11px;border-color:#dce5e1;background:#fff;color:#526d61}.account-bar.delegated{border-color:#dccca8;background:#fffaf0}.account-bar.delegated .account-avatar{background:#f1e7d2;color:#8b703c}.account-bar .account-detail:last-child:not(:empty){flex-basis:100%;padding-left:43px;font-size:10px}.customer-tools{scroll-margin-top:24px}#customer-links{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}#customer-links>h2{font-size:17px;margin:0}#customer-links>.customer-status{font-size:12px;line-height:1.75;margin:0}#customer-links>.customer-status:empty{display:none}#customer-links>.footnote{font-size:11px;margin:0}#customer-links .customer-actions{margin:3px 0 6px;gap:8px}#customer-links .customer-actions button{font-size:12px;min-height:40px;padding:8px 12px}#customer-links .customer-actions select{font:inherit;font-size:12px;padding:8px 10px;border:1px solid #d6e3de;border-radius:7px;background:#fafcfb;color:#3b6455;min-width:0;max-width:100%;min-height:40px}#customer-links .account-password{margin:0;border:1px solid #dfe9e5;background:#fbfdfc;padding:12px 14px;font-size:12px}#customer-links .account-password summary{color:#416755}#customer-links .account-password[open] .customer-form{margin-top:14px}#customer-links[data-account-type=root]{grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:22px}#customer-links[data-account-type=root]>h2,#customer-links[data-account-type=root]>.customer-status{grid-column:1/-1}#customer-links[data-account-type=root]>.account-command{grid-column:1;align-self:start;margin:0;padding-right:16px;border-right:1px solid #e4ebe7}#customer-links[data-account-type=root]>.account-password{grid-column:2;align-self:start}#customer-links[data-account-type=root]>.account-password .customer-form{grid-template-columns:1fr}#customer-links .customer-form{gap:11px}#customer-links .customer-form label{font-size:11px}#customer-links .customer-form input{padding:8px 11px;font-size:13px;min-height:40px}#customer-links .customer-form button{font-size:12px;min-height:40px}#customer-links #customer-audit{margin-top:15px}#combo-controls .plan>p{min-height:0;margin:0 0 8px}#combo-controls .combo-save{min-width:0;min-height:40px;padding:8px 13px;font-size:12px;margin-top:10px}#combo-controls .combo-actions{padding-top:16px;gap:8px}#combo-controls .combo-actions button{min-height:42px;font-size:12px;padding:8px}#combo-controls .plan>label{font-size:11px;margin-top:8px}#combo-controls .plan>label>input{padding:8px 11px;min-height:38px}
@media(max-width:1000px){#customer-links[data-account-type=root]{grid-template-columns:1fr}#customer-links[data-account-type=root]>.account-command,#customer-links[data-account-type=root]>.account-password{grid-column:1;border-right:0;padding-right:0}}
@media(max-width:700px){.account-bar{padding:10px 12px;margin-bottom:14px;gap:7px 9px;position:relative;top:auto}.account-avatar{width:28px;height:28px;font-size:15px}.account-bar strong{font-size:12px}.account-detail{font-size:10px}.account-bar>a{font-size:11px;margin-left:0;min-height:35px}.account-bar .account-logout{margin-left:auto;min-height:35px;font-size:11px}.account-bar .account-detail:last-child:not(:empty){padding-left:0;overflow-wrap:anywhere;line-height:1.7}.account-bar .account-detail{max-width:100%;overflow-wrap:anywhere}#customer-links{gap:9px}#customer-links .customer-actions>*{flex:initial}#customer-links .account-command{display:grid;grid-template-columns:1fr;gap:7px;width:100%}#customer-links .account-command>*{width:100%}#customer-links .customer-form{grid-template-columns:1fr}#customer-links .customer-actions button{white-space:normal}#customer-links .account-password{padding:11px 12px}.customer-form input{min-width:0}#combo-controls .combo-actions{grid-template-columns:repeat(3,minmax(0,1fr))}#combo-controls .combo-actions button{min-height:42px;font-size:11px}}
@media(max-width:360px){.account-bar .account-detail{flex-basis:100%}.account-bar strong{font-size:12px}.account-bar>a{margin-left:37px}#customer-links .account-password{padding:10px}#combo-controls .combo-actions{grid-template-columns:1fr}}

/* Closed chat cards fetch nothing; headings remain keyboard accessible. */
.chat-card>summary.chat-toggle{cursor:pointer;padding:20px;font-weight:700;font-size:1.1rem;color:inherit}
.chat-grid{align-items:start}
.chat-card:not([open])>:not(summary){display:none}
