.stage3-messages{display:grid;grid-template-columns:minmax(220px,.8fr) minmax(0,1.7fr);gap:18px}.stage3-card{background:#fff;border:1px solid rgba(9,30,48,.12);border-radius:16px;padding:18px;color:#091e30}.stage3-thread-list{display:grid;gap:8px}.stage3-thread{width:100%;text-align:left;border:1px solid rgba(9,30,48,.1);background:#f7f8fa;border-radius:12px;padding:12px;color:#091e30}.stage3-thread.active{border-color:#c99327;box-shadow:0 0 0 2px rgba(201,147,39,.15)}.stage3-thread small,.stage3-muted{display:block;color:#67727d;margin-top:5px}.stage3-unread{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:#b92c2c;color:#fff;font-size:12px}.stage3-messages-log{height:min(52vh,520px);overflow:auto;display:flex;flex-direction:column;gap:10px;padding:8px}.stage3-message{max-width:82%;padding:10px 12px;border-radius:13px;background:#eef1f4;color:#091e30}.stage3-message.mine{align-self:flex-end;background:#0b2539;color:#fff}.stage3-message small{display:block;margin-top:5px;opacity:.72}.stage3-compose{display:flex;gap:8px;margin-top:12px}.stage3-compose textarea{flex:1;min-height:72px}.stage3-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px;margin-top:18px}.stage3-manager{margin-top:20px}.stage3-list{display:grid;gap:10px;margin:12px 0}.stage3-row{display:flex;justify-content:space-between;gap:12px;padding:12px;border:1px solid rgba(9,30,48,.1);border-radius:12px}.stage3-row-actions,.stage3-form-actions{display:flex;align-items:center;gap:8px}.stage3-row-actions{flex:0 0 auto}.stage3-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.stage3-form .wide{grid-column:1/-1}.stage3-form input,.stage3-form select,.stage3-form textarea{width:100%}.stage3-payment-note{border-left:4px solid #c99327;background:#fff8e8}.stage3-public{margin-top:22px}.stage3-public .stage3-row{background:#fff}.stage3-status{min-height:20px;font-size:.9rem}.stage3-status.error{color:#b42318}
.stage3-inbox-tools{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 16px}.stage3-inbox-tools label{flex:1}.stage3-inbox-tools input,.stage3-member-discovery input{width:100%;box-sizing:border-box;min-height:44px;border:1px solid #d7dde0;border-radius:10px;padding:0 12px;font:inherit}.stage3-inbox-tabs{display:flex;gap:6px}.stage3-inbox-tabs button,.stage3-member-discovery button,.stage3-request button,.stage3-member-result button,.stage3-conversation-heading button{min-height:40px;border:1px solid #c99527;border-radius:9px;background:#fff;color:#6f4d0c;font-weight:800;cursor:pointer}.stage3-inbox-tabs button.active{background:#102b3b;color:#fff;border-color:#102b3b}.stage3-member-discovery{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:10px;margin-bottom:16px;padding:14px;border:1px solid #e0e5e7;border-radius:12px;background:#f8fafb}.stage3-member-discovery label{display:grid;gap:6px}.stage3-member-discovery label span{font-size:12px;font-weight:800;color:#40515b}.stage3-member-discovery>div{grid-column:1/-1}.stage3-member-result,.stage3-request{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 0;border-top:1px solid #e2e6e8}.stage3-member-result>a{display:flex;align-items:center;min-width:0;gap:10px;color:inherit;text-decoration:none}.stage3-member-result>a>span:last-child{min-width:0}.stage3-member-result small,.stage3-request small{display:block;color:#6c7880}.stage3-member-avatar{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border-radius:50%;background:#d5aa43;color:#102b3b;font-weight:900}.stage3-thread>span{display:flex;align-items:center;justify-content:space-between;gap:8px}.stage3-thread em{display:block;color:#8a6415;font-size:11px;font-style:normal}.stage3-request{display:block}.stage3-request p{margin:8px 0;white-space:pre-wrap}.stage3-request div{display:flex;gap:8px}.stage3-conversation-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}.stage3-conversation-heading h3{margin:0}.stage3-conversation-heading>div:last-child{display:flex;align-items:center;gap:8px}.stage3-conversation-heading a{color:#8a6415;font-weight:800}.stage3-official-notice{padding:12px;border:1px solid #c99527;border-radius:10px;background:#fff8e6;color:#5d460f}.stage3-message.official{border-left:3px solid #c99527}.stage3-message.official>strong{display:block;margin-bottom:5px;color:#8a6415;font-size:11px;text-transform:uppercase;letter-spacing:.08em}
@media(max-width:760px){.stage3-messages{grid-template-columns:1fr}.stage3-row{align-items:flex-start}.stage3-row-actions{flex-direction:column}.stage3-form{grid-template-columns:1fr}.stage3-form .wide{grid-column:auto}.stage3-messages-log{height:45vh}.stage3-inbox-tools,.stage3-conversation-heading{align-items:stretch;flex-direction:column}.stage3-inbox-tabs{display:grid;grid-template-columns:repeat(3,1fr)}.stage3-member-discovery{grid-template-columns:1fr}.stage3-member-discovery>div{grid-column:1}.stage3-member-result{align-items:flex-start;flex-wrap:wrap}.stage3-member-result button{margin-left:48px;flex:1}.stage3-conversation-heading>div:last-child{justify-content:space-between}.stage3-compose{display:grid;grid-template-columns:1fr}.stage3-compose button{width:100%}}

/* Mobile inbox integrity: dynamic viewport sizing keeps requests, history and composer clear of Safari chrome. */
.panel[data-panel=messages],.stage3-messages,.stage3-card,#stage3-message-view{min-width:0}.stage3-request.highlight{border:2px solid #c99527;border-radius:12px;padding:13px;background:#fff9e8}.stage3-messages-log{scroll-padding-block:12px calc(24px + env(safe-area-inset-bottom,0px));overscroll-behavior:contain;-webkit-overflow-scrolling:touch}.stage3-compose textarea{font-size:16px}.stage3-compose button{min-height:48px}
@media(max-width:760px){.panel[data-panel=messages]{padding-bottom:calc(110px + env(safe-area-inset-bottom,0px));overflow:visible}.stage3-messages{display:grid;grid-template-columns:minmax(0,1fr);gap:16px}.stage3-card{padding:14px}.stage3-thread-list{max-height:none;overflow:visible}.stage3-messages-log{height:clamp(280px,52dvh,520px);padding:8px 8px calc(24px + env(safe-area-inset-bottom,0px));overflow-y:auto}.stage3-compose{position:sticky;bottom:max(0px,env(safe-area-inset-bottom,0px));z-index:2;padding:10px 0 max(10px,env(safe-area-inset-bottom,0px));background:#fff}.stage3-member-result button{min-height:44px}.stage3-request button{min-height:44px}}
