.mail-layout { display: grid; grid-template-columns: minmax(360px, .92fr) minmax(480px, 1.35fr); gap: 14px; min-height: calc(100vh - 170px); }
.thread-list-card, .reader-card { min-height: 600px; overflow: hidden; }
.thread-rows, .queue-rows { max-height: calc(100vh - 285px); overflow: auto; }
.thread-row, .queue-row { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: white; text-align: left; width: 100%; }
.thread-row:hover, .thread-row.active, .queue-row:hover, .queue-row.active { background: #f8fbff; }
.unread-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--blue); margin-top: 7px; }
.thread-main { min-width: 0; }
.thread-main strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-main p { margin: 3px 0 7px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-meta { text-align: right; color: var(--muted); font-size: 12px; }
.reader-card { padding: 0; }
.reader-empty { height: 100%; display: grid; place-items: center; color: var(--muted); }
.reader-head { padding: 18px; border-bottom: 1px solid var(--line); }
.reader-head h2 { margin: 8px 0 6px; font-size: 22px; letter-spacing: -.03em; }
.reader-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.request-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: #fbfdff; }
.info-item { padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.info-item small { display: block; color: var(--muted); margin-bottom: 4px; }
.messages { padding: 14px 18px; display: grid; gap: 12px; }
.message { border: 1px solid var(--line); border-radius: 16px; padding: 12px; background: white; }
.message.out { background: #f8fbff; border-color: #dbeafe; margin-left: 28px; }
.message-head { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.message pre { margin: 0; white-space: pre-wrap; font-family: inherit; }
.desk-layout { display: grid; grid-template-columns: 320px minmax(460px, 1fr) 320px; gap: 14px; min-height: calc(100vh - 112px); }
.manager-queue, .desk-main, .desk-side { overflow: hidden; }
.desk-main { padding: 18px; }
.desk-side { padding: 16px; }
.pipeline { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.stage { border-radius: 999px; padding: 8px 11px; background: #f1f5f9; color: #334155; font-weight: 800; }
.stage.on { background: #dbeafe; color: #1d4ed8; }
.reply-box { display: grid; gap: 10px; margin-top: 16px; }
.reply-box textarea { width: 100%; min-height: 170px; }
.side-form { display: grid; gap: 10px; }
.side-form label { display: grid; gap: 5px; font-weight: 800; color: #334155; }
@media (max-width: 1200px) { .mail-layout, .desk-layout { grid-template-columns: 1fr; } .thread-rows, .queue-rows { max-height: 420px; } }
.allocation-details { padding: 14px 18px; border-bottom: 1px solid var(--line); background: #fff; }
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.date-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.file-line { display: grid; gap: 6px; color: var(--muted); font-weight: 800; }
.attachment-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.attachment-list span { padding: 5px 8px; border-radius: 999px; background: #eef2f7; color: #475569; font-size: 12px; font-weight: 800; }
.message-html { overflow-x: auto; color: var(--text); }
.message-html * { max-width: 100%; }
.message-html img { max-width: 100%; height: auto; }
.message-html table { max-width: 100%; border-collapse: collapse; }
.message-html a { color: var(--blue); text-decoration: underline; }
.stage:disabled, .reply-box button:disabled, input:disabled, select:disabled, textarea:disabled { cursor: not-allowed; opacity: .65; }
@media (max-width: 700px) { .two-col, .date-row { grid-template-columns: 1fr; } }
.reply-actions, .compose-footer { display: flex; align-items: center; gap: 10px; }
.reply-actions .button, .compose-footer .button { margin-left: auto; }
.attach-icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 999px; background: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 18px; transition: .14s ease; flex: 0 0 auto; }
.attach-icon-button:hover { border-color: #c8d7f8; background: #f8fbff; }
.attach-icon-button:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.hidden-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.selected-files { color: var(--muted); font-size: 12px; font-weight: 750; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0; }
.compose-footer .selected-files { max-width: 260px; }
.reply-actions .selected-files { max-width: 420px; }
.paperclip-svg { display: inline-block; vertical-align: -3px; color: currentColor; }
.email-frame { width: 100%; min-height: 180px; border: 0; display: block; background: #fff; }
.message-body-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; color: var(--text); }
.attach-icon-button { color: #334155; }
.attach-icon-button svg { pointer-events: none; }
.thread-meta .paperclip-svg { margin-top: 4px; color: var(--muted); }
