/* MADHOUSE_COMMS_INBOX_V1 */
html body .mi-page{padding:22px 28px!important;color:#f5f4f6;font:14px/1.5 Arial,sans-serif;min-width:0}html body .mi-page[hidden],html body .mi-page [hidden]{display:none!important}body.mad-inbox-mode .passport-layout{display:none!important}.mi-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:24px}.mi-page .mi-heading h1{font:800 clamp(32px,4vw,48px)/1.1 Arial,sans-serif!important;letter-spacing:-1.5px;margin:8px 0}.mi-heading p{margin:4px 0}.mi-eyebrow{font-size:10px;font-weight:800;letter-spacing:2px;color:#ff2759}.mi-muted{color:#b6b0bc}.mi-actions{display:flex;gap:10px;flex-wrap:wrap}html body .mi-page button,.mi-dialog button{font:700 13px/1.3 Arial,sans-serif!important;min-height:42px;padding:10px 14px;border:1px solid #514955;border-radius:9px;background:#252229;color:#fff;cursor:pointer;text-transform:none;white-space:normal}html body .mi-page button:disabled,.mi-dialog button:disabled{opacity:.5;cursor:wait}html body .mi-page button:hover,.mi-dialog button:hover{background:#342c36;border-color:#99808e}html body .mi-page button:focus-visible,.mi-dialog button:focus-visible{outline:2px solid #ff9cb7;outline-offset:3px}html body .mi-page .mi-primary,.mi-dialog .mi-primary{background:#ed003f;border-color:#ff3b6a}.mi-layout{display:grid;grid-template-columns:185px 320px minmax(0,1fr);height:min(720px,calc(100dvh - 240px));min-height:520px;border:1px solid #49404b;border-radius:16px;background:#111114;overflow:hidden}.mi-sidebar{padding:18px 10px;display:flex!important;flex-direction:column!important;justify-content:flex-start!important;align-items:stretch!important;gap:7px!important;min-width:0;background:linear-gradient(180deg,#20131b,#121215 65%);border-right:1px solid #38313c}.mi-page .mi-sidebar>button{display:flex;align-items:center;gap:10px;width:100%;margin:0;text-align:left;border:1px solid transparent;background:transparent;font-size:12px!important}.mi-sidebar>button>span:first-child{width:18px;font-size:17px}.mi-page .mi-sidebar .mi-active{background:#b50931!important;border-color:#ed174c!important}.mi-count{margin-left:auto;background:#ec003f;border-radius:20px;min-width:17px;text-align:center;font-size:10px}.mi-count:empty{display:none}.mi-sidebar-note{color:#a99ba8;font-size:11px;padding:20px 8px;line-height:1.7;margin-top:auto}.mi-center{padding:16px 12px;border-right:1px solid #38313c;min-width:0;overflow-y:auto}.mi-page input[type=search],.mi-dialog input{width:100%;min-height:44px;padding:11px 13px;border:1px solid #514650;border-radius:9px;background:#1e1b21;color:#fff;font:14px Arial,sans-serif!important;box-sizing:border-box}.mi-list-status{font-size:12px;color:#b9adb9}.mi-pin-row{display:flex;gap:8px;overflow-x:auto;padding-bottom:10px}.mi-page .mi-pin-row button{display:flex;flex-direction:column;gap:5px;align-items:center;flex:0 0 52px;min-width:0;background:transparent;border:0;padding:0}.mi-pin-row small{font-size:10px;max-width:55px;overflow:hidden;text-overflow:ellipsis}.mi-avatar{display:grid;place-items:center;flex:0 0 39px;width:39px;height:39px;border-radius:50%;background:linear-gradient(140deg,#5c535e,#2a2630);border:1px solid #746575;font-size:12px;font-weight:800;color:#fff}.mi-page .mi-row{display:flex;position:relative;align-items:center;gap:10px;width:100%;padding:13px 9px;margin:4px 0;background:transparent;border:1px solid transparent;text-align:left}.mi-page .mi-row.mi-selected{background:linear-gradient(100deg,#581224,#2f1721)!important;border-color:#9d2447!important;box-shadow:inset 3px 0 #ff174f}.mi-row-copy{min-width:0;flex:1}.mi-row-first{display:flex;align-items:center;gap:6px}.mi-row-first strong{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}.mi-row-first time{font:9px Arial,sans-serif;color:#b8a5b4;white-space:nowrap}.mi-preview{display:block;margin-top:5px;font:11px/1.4 Arial,sans-serif;color:#b5a7b5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mi-row-meta{display:flex;align-items:center;gap:5px}.mi-row-meta small{font-size:8px;color:#c9b4c3}.mi-unread{display:block;width:8px;height:8px;border-radius:50%;background:#ff174f}.mi-thread{display:flex;flex-direction:column;position:relative;min-width:0;min-height:0;overflow:hidden;background:radial-gradient(ellipse at top right,#32131d33,transparent 60%),#101013}.mi-thread-top{display:flex;gap:12px;align-items:center;padding:18px;border-bottom:1px solid #3e3541;background:#19171d;flex:0 0 auto}.mi-thread-identity{flex:1;min-width:0}.mi-page .mi-thread h2{font:700 19px/1.3 Arial,sans-serif!important;margin:0;overflow-wrap:anywhere}.mi-thread-identity p{margin:4px 0 0;font-size:11px}.mi-thread-tools{display:flex;gap:5px;flex-wrap:wrap;justify-content:end}.mi-page .mi-thread-tools button{font-size:10px!important;min-height:32px;padding:6px 9px}.mi-page .mi-back{display:none}.mi-stream{flex:1;min-height:0;overflow-y:auto;padding:20px;display:flex;flex-direction:column;gap:12px;overscroll-behavior:contain}.mi-date{align-self:center;font-size:10px;color:#b9adb9;background:#232027;border-radius:12px;padding:4px 10px;margin:4px 0}.mi-page .mi-bubble{align-self:flex-start;max-width:80%;margin:0!important;padding:11px 14px!important;border:1px solid #4b424e!important;border-radius:13px 13px 13px 3px!important;background:#29252e!important;overflow-wrap:anywhere;min-width:60px}.mi-page .mi-bubble.mi-mine{align-self:flex-end;background:#a60630!important;border-color:#c81c4b!important;border-radius:13px 13px 3px 13px!important}.mi-bubble p{font:14px/1.6 Arial,sans-serif!important;margin:0!important;white-space:pre-wrap}.mi-bubble strong{display:block;font-size:11px;color:#ffbacd;margin-bottom:5px}.mi-bubble time{display:block;text-align:right;font-size:9px;color:#dac5d1;margin-top:6px}.mi-composer{padding:14px 18px;border-top:1px solid #39313d;background:#19161d}.mi-page .mi-composer textarea{display:block;width:100%;min-height:65px;max-height:160px;resize:vertical;box-sizing:border-box;padding:12px;border:1px solid #574956;border-radius:10px;background:#252029;color:#fff;font:14px/1.5 Arial,sans-serif}.mi-composer-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:8px}.mi-composer-footer small{font-size:10px;color:#b7a8b5}.mi-status{font-size:12px;color:#e9afc0;margin:0;padding:0 18px;max-height:110px;overflow:auto}.mi-status:not(:empty){padding:12px 18px}.mi-status button{margin:8px}.mi-empty{margin:auto;padding:40px 25px;text-align:center;max-width:380px}.mi-empty-icon{font-size:43px;color:#f00946;margin-bottom:18px}.mi-empty button{margin-top:20px}.mi-empty-history{font-size:12px;color:#bcaebe;text-align:center}.mi-page .mi-older{margin:8px auto 0;font-size:10px!important;padding:5px 10px;min-height:30px}.mi-dialog{background:#161219;color:#fff;border:1px solid #665364;border-radius:16px;padding:24px;width:min(550px,92vw);max-height:85dvh;box-sizing:border-box}.mi-dialog::backdrop{background:#000b;backdrop-filter:blur(5px)}.mi-dialog-top{display:flex;justify-content:space-between;gap:14px;align-items:center;margin-bottom:20px}.mi-dialog h2{font:700 23px Arial,sans-serif}.mi-dialog>div:not(.mi-dialog-top)>button{display:block;width:100%;text-align:left;margin:8px 0}.mi-dialog>button{margin:15px 0}.mi-dialog p{font-size:13px;color:#c3b4c2}.mi-sidebar-note,.mi-preview,.mi-thread-identity p{line-height:1.5}
@media(min-width:1700px){.mi-layout{grid-template-columns:200px 365px minmax(0,1fr)}}@media(max-width:1100px){.mi-layout{grid-template-columns:150px 260px minmax(0,1fr)}.mi-page .mi-sidebar>button{font-size:11px!important;padding:10px 6px}.mi-thread-top{flex-wrap:wrap}.mi-thread-tools{justify-content:start}.mi-thread-identity{flex-basis:70%}}
@media(max-width:760px){html body .mi-page{padding:18px 12px!important}.mi-heading{gap:12px;align-items:start;flex-wrap:wrap;margin-bottom:15px}.mi-heading .mi-actions{width:100%}.mi-heading .mi-actions button{flex:1}.mi-layout{display:flex;flex-direction:column;height:calc(100dvh - 280px);min-height:450px;border-radius:12px}.mi-sidebar{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;overflow-x:auto;border-right:0;border-bottom:1px solid #403343;padding:8px;flex:0 0 auto}.mi-page .mi-sidebar>button{width:auto;flex:0 0 auto;padding:8px 10px;font-size:11px!important;gap:6px}.mi-sidebar-note{display:none}.mi-sidebar>button>span:first-child{display:none}.mi-center{flex:1;min-height:0;border:0;overflow:auto}.mi-thread{display:none}.mi-conversation-open .mi-heading,.mi-conversation-open .mi-sidebar,.mi-conversation-open .mi-center{display:none!important}.mi-conversation-open .mi-thread{display:flex;flex:1}.mi-conversation-open .mi-layout{height:calc(100dvh - 165px);min-height:420px}.mi-page .mi-back{display:inline-flex!important;font-size:11px!important;min-height:34px;padding:7px 9px}.mi-thread-top{padding:12px;gap:10px}.mi-thread-identity{flex-basis:auto}.mi-thread-tools{width:100%;justify-content:end}.mi-thread-top h2{font-size:18px!important}.mi-stream{padding:14px}.mi-page .mi-bubble{max-width:87%}.mi-composer{padding:10px}.mi-composer-footer small{display:none}.mi-composer-footer{justify-content:flex-end}.mi-page .mi-composer textarea{font-size:16px;min-height:60px}.mi-pin-row{gap:14px}}

/* MADHOUSE_COMPACT_COMPOSER_V1: desktop full-width compact composer; responsive mobile */
@media (min-width:761px){
  html body .mi-page .mi-composer.mi-composer-compact{display:flex;align-items:center;gap:10px;padding:10px 14px;min-width:0}
  html body .mi-page .mi-composer.mi-composer-compact textarea{flex:1 1 auto;min-width:0;width:auto;height:46px;min-height:46px;max-height:150px;resize:vertical;padding:11px 14px;line-height:22px}
  html body .mi-page .mi-composer.mi-composer-compact .mi-composer-footer{display:flex;flex:0 0 auto;margin:0;gap:0}
  html body .mi-page .mi-composer.mi-composer-compact .mi-composer-footer small{display:none}
  html body .mi-page .mi-composer.mi-composer-compact .mi-composer-footer button{min-height:46px;padding:10px 19px;white-space:nowrap}
}
@media (max-width:760px){
  html body .mi-page .mi-composer.mi-composer-compact{display:flex;align-items:flex-end;gap:8px;padding:9px 10px max(9px,env(safe-area-inset-bottom));min-width:0}
  html body .mi-page .mi-composer.mi-composer-compact textarea{flex:1 1 auto;width:auto;min-width:0;min-height:44px;height:44px;max-height:128px;resize:vertical;padding:10px 11px;font-size:16px;line-height:22px}
  html body .mi-page .mi-composer.mi-composer-compact .mi-composer-footer{flex:0 0 auto;margin:0;display:flex;align-items:flex-end}
  html body .mi-page .mi-composer.mi-composer-compact .mi-composer-footer small{display:none}
  html body .mi-page .mi-composer.mi-composer-compact .mi-composer-footer button{min-height:44px;padding:9px 13px;white-space:nowrap}
}


/* MADHOUSE_INBOX_COMPOSER_V3 */
html body .mi-page .mi-thread {
  min-width: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

html body .mi-page .mi-composer {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 10px 14px !important;
}

html body .mi-page .mi-composer textarea {
  display: block !important;
  flex: 1 1 0% !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 46px !important;
  min-height: 46px !important;
  max-height: 120px !important;
  padding: 11px 13px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  resize: vertical !important;
}

html body .mi-page .mi-composer-footer {
  display: flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
}

html body .mi-page .mi-composer-footer small {
  display: none !important;
}

html body .mi-page .mi-composer-footer button {
  min-height: 46px !important;
  height: 46px !important;
  margin: 0 !important;
  white-space: nowrap !important;
}

@media (max-width: 760px) {
  html body .mi-page .mi-composer {
    gap: 8px !important;
    padding: 8px 10px !important;
  }

  html body .mi-page .mi-composer textarea {
    height: 44px !important;
    min-height: 44px !important;
    font-size: 16px !important;
  }

  html body .mi-page .mi-composer-footer button {
    height: 44px !important;
    min-height: 44px !important;
    padding: 8px 12px !important;
  }
}
