
/* Shell */
.lm-shell{max-width:980px;margin:28px auto;font-family:system-ui,-apple-system,Segoe UI,Roboto;line-height:1.35}
.lm-card{background:#fff;border:1px solid #e5e7eb;border-radius:18px;padding:18px 18px 16px 18px;box-shadow:0 10px 24px rgba(0,0,0,.06)}
.lm-brand{display:flex;gap:12px;align-items:center;margin-bottom:8px}
.lm-brand-sm{display:flex;gap:10px;align-items:center;margin-bottom:14px}
.lm-logo{width:44px;height:44px;border-radius:14px;background:#111827;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:900;letter-spacing:.5px}
.lm-logo.sm{width:38px;height:38px;border-radius:14px}
.lm-title{font-weight:900}
.lm-subtitle{color:#6b7280;font-size:13px}
.lm-h2{margin:10px 0 10px 0;font-size:20px}

/* Form */
.lm-form label{font-weight:800;margin-top:12px;display:block}
.lm-form input,.lm-form textarea{width:100%;padding:10px;border:1px solid #d1d5db;border-radius:12px;margin-top:6px;background:#fff}
.lm-username{display:flex;gap:8px;align-items:center}
.lm-username span{font-weight:800;color:#6b7280;white-space:nowrap}
.lm-help{margin-top:6px;font-size:13px;color:#6b7280}
.lm-btn-primary{background:#2563eb;color:#fff;border:none;border-radius:12px;padding:10px 16px;cursor:pointer;font-weight:800}
.lm-btn-secondary{background:#111827;color:#fff;border:none;border-radius:12px;padding:10px 14px;cursor:pointer;font-weight:800}
.lm-logout{display:inline-flex;justify-content:center;text-decoration:none}

/* Mail layout */
.lm-mail{display:grid;grid-template-columns:260px 1fr 0;gap:14px}
@media (max-width: 920px){ .lm-mail{grid-template-columns:1fr} .lm-view{position:fixed;inset:0;background:#fff;z-index:9999;border-radius:0} }
.lm-sidebar{background:#0b1220;color:#eaf2ff;border-radius:18px;padding:16px;border:1px solid rgba(255,255,255,.08)}
.lm-identity{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.10);border-radius:14px;padding:12px;margin-bottom:12px}
.lm-identity-label{font-size:12px;color:rgba(234,242,255,.7)}
.lm-identity-email{font-weight:900;margin-top:4px;word-break:break-all}
.lm-main{background:#fff;border:1px solid #e5e7eb;border-radius:18px;overflow:hidden}
.lm-topbar{display:flex;justify-content:space-between;align-items:baseline;padding:14px 14px;border-bottom:1px solid #e5e7eb;background:#f9fafb}
.lm-topbar-title{font-weight:900}
.lm-topbar-hint{color:#6b7280;font-size:13px}

/* List */
.lm-list-head{display:grid;grid-template-columns:1.1fr 2fr 140px;padding:10px 14px;font-size:12px;color:#6b7280;border-bottom:1px solid #e5e7eb;background:#fff}
.lm-list{max-height:560px;overflow:auto}
.lm-row{display:grid;grid-template-columns:1.1fr 2fr 140px;gap:10px;padding:12px 14px;border-bottom:1px solid #f1f5f9;cursor:pointer}
.lm-row:hover{background:#f8fafc}
.lm-row:focus{outline:2px solid #2563eb;outline-offset:-2px}
.lm-row-from{font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lm-row-subject{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lm-row-date{color:#6b7280;font-size:13px;text-align:right;white-space:nowrap}
.lm-empty{padding:16px;color:#6b7280}

/* Message view */
.lm-view{background:#fff;border:1px solid #e5e7eb;border-radius:18px;padding:14px;display:none}
.lm-view.is-open{display:block}
.lm-view-top{display:flex;gap:10px;align-items:center;justify-content:space-between;margin-bottom:10px}
.lm-icon-btn{border:1px solid #e5e7eb;background:#fff;border-radius:12px;padding:8px 10px;font-weight:800;cursor:pointer}
.lm-view-title{font-weight:900;flex:1;text-align:right}
.lm-view-meta{display:flex;justify-content:space-between;gap:10px;color:#111827;border-top:1px solid #e5e7eb;border-bottom:1px solid #e5e7eb;padding:10px 0;margin:10px 0}
.lm-view-meta span{color:#6b7280;font-weight:800}
.lm-view-body{padding:10px 0;color:#111827;white-space:pre-wrap}
.lm-view-actions{display:flex;justify-content:flex-end;margin-top:10px}

/* Reply box */
.lm-replybox{margin-top:12px;border-top:1px solid #e5e7eb;padding-top:12px}
.lm-replybox label{font-weight:900;display:block;margin-bottom:6px}
.lm-replybox textarea{width:100%;min-height:110px;padding:10px;border:1px solid #d1d5db;border-radius:12px}
.lm-reply-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:10px}

/* Modal */
.lm-modal{display:none;position:fixed;inset:0;z-index:99999}
.lm-modal.is-open{display:block}
.lm-modal-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.45)}
.lm-modal-card{position:relative;max-width:420px;margin:12vh auto 0 auto;background:#fff;border-radius:16px;box-shadow:0 20px 50px rgba(0,0,0,.25);padding:16px}
.lm-modal-title{font-weight:900;margin-bottom:8px}
.lm-modal-body{color:#111827;margin-bottom:14px}
.lm-modal-actions{display:flex;justify-content:flex-end}
