@charset "UTF-8";
/*
    대시보드 > 메일함 (/dashboard/mail)

    좌(메일함) + 우(목록) 두 칸. 본문과 쓰기는 모달이다.

    높이를 고정했다 — 목록이 길어지거나 첨부 줄이 늘어도 바깥 틀이
    출렁이지 않게. 스크롤은 목록 안에서만 생긴다.
*/

/* ── 틀 ───────────────────────────────────────────────────────── */

.ml-page{
    display:flex; gap:14px; align-items:stretch;
    height:calc(100vh - 230px); min-height:430px;
}

.ml-side{
    flex:0 0 248px; display:flex; flex-direction:column; min-height:0;
    background:#fff; border:1px solid #e3e8f0; border-radius:10px; overflow:hidden;
}
.ml-side__head{
    display:flex; align-items:center; justify-content:space-between; gap:8px;
    padding:12px 14px; border-bottom:1px solid #eef1f6; background:#fafbfd;
}
.ml-side__head h2{ margin:0; font-size:14px; font-weight:700; color:#243247; }
/* index.css 의 .btn 은 width:90px 로 못박혀 있다. 좁은 자리라 풀어 준다 */
.ml-side__head .btn{
    flex:none; width:auto; min-width:0; height:26px; padding:0 9px; font-size:11.5px;
}
.ml-side__body{ flex:1 1 auto; min-height:0; overflow:auto; padding:8px; }

.ml-main{
    flex:1 1 auto; min-width:0; display:flex; flex-direction:column; min-height:0;
}

/* ── 메일함 목록 ──────────────────────────────────────────────── */

.ml-acct{
    padding:10px 10px 8px; border-radius:8px; margin-bottom:6px;
    border:1px solid transparent;
}
.ml-acct.is-cur{ background:#f4f8fd; border-color:#dbe7f4; }

.ml-acct__nm{
    margin:0 0 2px; display:flex; align-items:center; gap:6px;
    font-size:13px; font-weight:700; color:#243247;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.ml-acct__tag{
    flex:none; padding:0 6px; height:17px; line-height:17px; border-radius:9px;
    font-size:10.5px; font-weight:700; color:#55637a; background:#eceff4;
}
.ml-acct__tag.is-share{ color:#fff; background:#0a529d; }

.ml-acct__em{
    margin:0 0 7px; font-size:11.5px; color:#8a94a6;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.ml-acct__warn{ font-style:normal; color:#c9313d; }

.ml-box{
    display:flex; align-items:center; gap:6px; width:100%;
    padding:0 9px; height:30px; margin-top:2px;
    border:none; border-radius:6px; background:transparent;
    font-size:12.5px; color:#41506a; text-align:left; cursor:pointer;
}
.ml-box:hover{ background:#eaf1f9; }
.ml-box.is-on{ background:#0a529d; color:#fff; font-weight:700; }
.ml-box b{
    margin-left:auto; padding:0 6px; height:17px; line-height:17px; border-radius:9px;
    font-size:11px; color:#fff; background:#d9534f;
}
.ml-box.is-on b{ background:rgba(255,255,255,.26); }

/* ── 도구줄 ───────────────────────────────────────────────────── */

.ml-tool{
    display:flex; align-items:center; justify-content:space-between;
    gap:10px; flex-wrap:wrap; margin-bottom:8px;
}
.ml-tool__left,
.ml-tool__right{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }

.ml-cur{ font-size:14px; font-weight:700; color:#243247; }
.ml-tool .cfg-total{ font-size:12.5px; color:#77839a; }
.ml-tool .cfg-total b{ color:#0a529d; }

.ml-chk{
    display:inline-flex; align-items:center; gap:5px;
    font-size:12.5px; color:#55637a; cursor:pointer;
}
.ml-chk input{ margin:0; }

.ml-search{
    display:flex; align-items:center; height:34px; width:260px;
    border:1px solid #dfe4ec; border-radius:6px; background:#fff; overflow:hidden;
}
.ml-search input{
    flex:1 1 auto; min-width:0; height:100%; border:none; padding:0 10px; font-size:13px;
}
.ml-search input:focus{ outline:none; }
.ml-search .search-btn{
    flex:none; width:36px; height:100%; border:none; background:#f2f5f9; cursor:pointer;
}

.ml-tool .btn{
    flex:none; width:auto; min-width:0; height:34px; padding:0 13px;
    gap:5px; font-size:12.5px; white-space:nowrap;
}

/* 안내 한 줄 : 마지막 수신 시각, 또는 왜 못 받았는지 */
.ml-note{
    margin:0 0 8px; padding:7px 11px; border-radius:6px;
    font-size:12.5px; line-height:1.6; color:#55637a; background:#f3f5f9;
}
.ml-note.is-warn{ color:#9a2b35; background:#fdf1f2; }

/* ── 메일 목록 ────────────────────────────────────────────────── */

.ml-list-scroll{
    flex:1 1 auto; min-height:0; overflow:auto;
    background:#fff; border:1px solid #e3e8f0; border-radius:10px;
}
.ml-list-scroll > .simplebar-wrapper{ height:100%; }

.ml-list{ margin:0; padding:0; list-style:none; }

.ml-item{
    display:flex; align-items:center; gap:12px;
    padding:11px 16px; border-bottom:1px solid #f1f4f8; cursor:pointer;
}
.ml-item:last-child{ border-bottom:none; }
.ml-item:hover{ background:#f7fafd; }

.ml-item__who{
    flex:0 0 150px; min-width:0;
    font-size:13px; color:#41506a;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.ml-item__by{
    display:block; font-style:normal; font-size:11px; color:#8a94a6;
}

.ml-item__main{ flex:1 1 auto; min-width:0; }
.ml-item__sj{
    margin:0; font-size:13.5px; color:#243247;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.ml-item__pv{
    margin:2px 0 0; font-size:12px; color:#8a94a6;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.ml-clip{ margin-right:4px; font-size:12px; }

.ml-item__dt{
    flex:0 0 112px; text-align:right;
    font-size:12px; color:#8a94a6; white-space:nowrap;
}

/* 안 읽은 것 — 굵게, 왼쪽에 파란 선 */
.ml-item.is-new{ box-shadow:inset 3px 0 0 #0a529d; background:#fcfdff; }
.ml-item.is-new .ml-item__who,
.ml-item.is-new .ml-item__sj{ font-weight:700; color:#16243a; }

/* ── 모달 공통 ────────────────────────────────────────────────── */

.ml-modal{
    display:none; position:fixed; inset:0; z-index:1050;
    align-items:center; justify-content:center;
}
.ml-modal.active{ display:flex; }
.ml-modal .modal__dim{ position:absolute; inset:0; background:rgba(16,32,56,.45); }

.ml-modal .modal__box{
    position:relative; display:flex; flex-direction:column;
    background:#fff; border-radius:12px; overflow:hidden;
    box-shadow:0 18px 48px rgba(16,32,56,.25);
}
/* 줄이 늘고 줄어도 모달 크기는 그대로다 — 안에서만 스크롤이 생긴다 */
.ml-modal .ml-view__box{  width:min(840px, calc(100vw - 32px)); height:min(700px, calc(100vh - 48px)); }
.ml-modal .ml-write__box{ width:min(720px, calc(100vw - 32px)); height:min(660px, calc(100vh - 48px)); }
.ml-modal .ml-acct__box{  width:min(640px, calc(100vw - 32px)); height:min(680px, calc(100vh - 48px)); }

.ml-modal .modal__head{
    flex:none; display:flex; align-items:center; gap:10px;
    padding:14px 18px; border-bottom:1px solid #eef1f6; background:#fafbfd;
}
.ml-modal .mskin__ttl{ flex:1 1 auto; min-width:0; display:flex; flex-direction:column; }
.ml-modal .mskin__ttl h3{
    margin:0; font-size:15px; font-weight:700; color:#243247;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.ml-modal .mskin__ttl i{ font-style:normal; font-size:12px; color:#8a94a6; }
.ml-modal .modal__close{
    flex:none; width:34px; height:34px; border:none; background:transparent;
    font-size:24px; color:#8a94a1; cursor:pointer; border-radius:6px;
}
.ml-modal .modal__close:hover{ background:rgba(10,82,157,.08); color:#0a529d; }

.ml-modal .modal__body{ flex:1 1 auto; min-height:0; overflow-y:auto; display:flex; flex-direction:column; }
.ml-modal .modal__card{ padding:16px 20px; }

.ml-modal .modal__foot{
    flex:none; display:flex; justify-content:flex-end; gap:8px;
    padding:12px 18px; border-top:1px solid #eef1f6; background:#fafbfd;
}
.ml-modal .modal__foot .btn{
    flex:none; width:auto; min-width:0; height:34px; padding:0 15px; font-size:13px;
}
/* .btn 은 display:inline-flex 라 hidden 속성만으로는 안 숨는다 */
.ml-modal .btn[hidden]{ display:none; }

/* ── 메일 보기 ────────────────────────────────────────────────── */

.ml-head{ flex:none; padding:14px 20px 10px; border-bottom:1px solid #f1f4f8; }
.ml-head__l{ margin:0 0 4px; display:flex; gap:10px; font-size:12.5px; line-height:1.7; }
.ml-head__l:last-child{ margin-bottom:0; }
.ml-head__l span{ flex:0 0 62px; color:#8a94a6; }
.ml-head__l b{
    flex:1 1 auto; min-width:0; font-weight:600; color:#41506a;
    word-break:break-all;
}

.ml-files{
    flex:none; display:flex; align-items:center; gap:8px; flex-wrap:wrap;
    padding:9px 20px; border-bottom:1px solid #f1f4f8; background:#fafbfd;
}
.ml-files__t{ font-size:12px; font-weight:700; color:#55637a; }
.ml-file{
    display:inline-flex; align-items:center; gap:4px;
    padding:0 9px; height:26px; border-radius:13px;
    border:1px solid #dbe3ee; background:#fff;
    font-size:12px; color:#0a529d; text-decoration:none;
}
.ml-file:hover{ background:#f0f6fc; }
.ml-file i{ font-style:normal; color:#8a94a6; }
.ml-file.is-gone{ color:#9a2b35; border-color:#f0d6d9; background:#fdf5f6; cursor:not-allowed; }

/* 남이 보낸 글이 그려지는 자리. sandbox 를 걸어 스크립트는 돌지 않는다 */
.ml-body{
    flex:1 1 auto; min-height:0; width:100%; border:none; background:#fff;
}

/* ── 입력칸 ───────────────────────────────────────────────────── */

.ml-from{
    margin:0 0 12px; padding:8px 11px; border-radius:6px;
    font-size:12.5px; color:#55637a; background:#f3f5f9;
}
.ml-from b{ color:#243247; }

.ml-f{ display:block; margin-bottom:11px; }
.ml-f > span{
    display:block; margin-bottom:5px; font-size:12.5px; font-weight:600; color:#55637a;
}
.ml-f > span em{ font-style:normal; color:#d9534f; }
.ml-f .form-control{ width:100%; height:38px; }
.ml-f .ml-ta{ height:190px; padding:9px 11px; resize:none; line-height:1.7; }

/* 서버 주소 + 포트 + SSL 을 한 줄에 */
.ml-f2{ display:flex; gap:9px; align-items:flex-end; }
.ml-f2 .ml-f{ flex:1 1 auto; min-width:0; }
.ml-f2 .ml-f--port{ flex:0 0 92px; }
.ml-chk--f{ flex:none; height:38px; margin-bottom:11px; }
.ml-chk--row{ margin-top:4px; }

.ml-hint{ margin:-5px 0 12px; font-size:11.5px; color:#8a94a6; line-height:1.6; }
.ml-hint b{ color:#55637a; }

/* ── 좁은 화면 ────────────────────────────────────────────────── */

@media (max-width: 900px){
    .ml-page{ flex-direction:column; height:auto; min-height:0; }
    .ml-side{ flex:0 0 auto; }
    .ml-side__body{ max-height:220px; }
    .ml-list-scroll{ max-height:60vh; }
    .ml-search{ width:100%; }
    .ml-item__who{ flex:0 0 100px; }
    .ml-item__dt{ flex:0 0 84px; font-size:11.5px; }
}
