/* ATO Webmail module */
.atowm-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; align-items: start; }
.atowm-folders { position: sticky; top: 80px; padding: 14px; }
.atowm-folders nav { margin-top: 10px; display: flex; flex-direction: column; gap: 2px; }
.atowm-folder { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; color: var(--p-ink) !important; font-size: .9rem; }
.atowm-folder:hover { background: var(--p-bg); }
.atowm-folder.is-active { background: #e2f5ee; color: var(--p-primary) !important; font-weight: 700; }
.atowm-folder .atosp-i { color: var(--p-muted); }
.atowm-folder.is-active .atosp-i { color: var(--p-primary-2); }
.atowm-folder span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.atowm-folder em { font-style: normal; font-size: .72rem; font-weight: 800; background: var(--p-primary); color: #fff; border-radius: 999px; padding: 1px 8px; }
.atowm-account-chip { display: flex; gap: 10px; align-items: center; margin: 14px 0 4px; padding: 10px; background: var(--p-bg); border-radius: 10px; }
.atowm-account-chip div { min-width: 0; }
.atowm-account-chip strong { display: block; font-size: .85rem; color: var(--p-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.atowm-account-chip small { display: block; font-size: .74rem; color: var(--p-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.atowm-external { display: flex; gap: 6px; align-items: center; font-size: .8rem; font-weight: 700; margin-top: 12px; padding: 8px 12px; }
.atowm-list { padding: 0; overflow: hidden; }
.atowm-search { display: flex; gap: 10px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--p-line); flex-wrap: wrap; }
.atowm-search .atosp-search { flex: 1; min-width: 200px; }
.atowm-filters { display: flex; gap: 4px; background: var(--p-bg); padding: 3px; border-radius: 9px; }
.atowm-filters a { padding: 6px 12px; border-radius: 7px; font-size: .8rem; font-weight: 700; color: var(--p-muted) !important; }
.atowm-filters a.is-active { background: #fff; color: var(--p-primary) !important; box-shadow: var(--p-shadow); }
.atowm-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 16px; background: #f7faf9; border-bottom: 1px solid var(--p-line); flex-wrap: wrap; }
.atowm-bulk-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.atowm-messages { list-style: none; margin: 0; padding: 0; }
.atowm-messages li { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--p-line); transition: background .12s; }
.atowm-messages li:hover { background: #f7fbf9; }
.atowm-messages li input[type=checkbox] { width: auto; flex: none; }
.atowm-messages li.is-unread { background: #fbfffd; }
.atowm-messages li.is-unread .atowm-from, .atowm-messages li.is-unread .atowm-subject { font-weight: 800; color: var(--p-ink); }
.atowm-messages li.is-unread::before { content: ""; width: 4px; align-self: stretch; margin-left: -16px; margin-right: 8px; background: var(--p-mint); }
.atowm-star { color: #c9d6d0; display: inline-flex; }
.atowm-star.is-on, .atowm-starred { color: #e9b949 !important; }
.atowm-star.is-on svg, .atowm-starred svg { fill: currentColor; }
.atowm-row { flex: 1; min-width: 0; display: grid; grid-template-columns: 34px minmax(120px, 210px) minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; color: var(--p-text) !important; }
.atowm-from { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.atowm-subject { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--p-text); }
.atowm-meta { display: flex; gap: 8px; align-items: center; color: var(--p-muted); font-size: .8rem; white-space: nowrap; }
.atowm-list .atosp-pagination { padding: 12px 16px; }
.atowm-list .atosp-empty { padding: 50px 10px; }
.atowm-reader { padding: 0 0 10px; overflow: hidden; }
.atowm-reader-bar { display: flex; gap: 6px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--p-line); flex-wrap: wrap; background: #f7faf9; }
.atowm-spacer { flex: 1; }
.atowm-subject-h { font-size: 1.35rem !important; padding: 18px 22px 6px; font-weight: 800; }
.atowm-head { display: flex; gap: 14px; align-items: flex-start; padding: 8px 22px 16px; border-bottom: 1px solid var(--p-line); }
.atowm-head > div { flex: 1; min-width: 0; font-size: .9rem; }
.atowm-head strong { color: var(--p-ink); }
.atowm-head time { font-size: .82rem; white-space: nowrap; }
.atowm-attachments { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 22px; border-bottom: 1px solid var(--p-line); }
.atowm-attachments a, .atowm-attachments label { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border: 1px solid var(--p-line); border-radius: 10px; color: var(--p-ink) !important; font-size: .85rem; max-width: 300px; background: #fff; }
.atowm-attachments a:hover { border-color: var(--p-mint); }
.atowm-attachments span { min-width: 0; }
.atowm-attachments strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.atowm-attachments small { color: var(--p-muted); }
.atowm-attachments input { width: auto; }
.atowm-body { padding: 6px 4px; }
.atowm-body .atowm-images { margin: 10px 18px; }
.atowm-frame { width: 100%; border: 0; min-height: 360px; display: block; background: #fff; }
.atowm-plain { padding: 18px 22px; white-space: normal; font-size: .95rem; line-height: 1.6; overflow-wrap: anywhere; }
.atowm-quote { color: var(--p-muted); }
.atowm-compose .atowm-addr { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--p-line); padding: 6px 0; }
.atowm-compose .atowm-addr label { width: 70px; flex: none; font-weight: 700; font-size: .85rem; color: var(--p-muted); }
.atosp-body .atowm-compose .atowm-addr input { border: 0; box-shadow: none; padding: 8px 0; }
.atosp-body .atowm-textarea { margin-top: 14px; min-height: 320px; font-size: .95rem; line-height: 1.6; resize: vertical; }
.atowm-compose-foot { display: flex; gap: 10px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.atowm-file { position: relative; overflow: hidden; }
.atowm-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
@media (max-width: 980px) {
	.atowm-layout { grid-template-columns: 1fr; }
	.atowm-folders { position: static; }
	.atowm-folders nav { flex-direction: row; overflow-x: auto; }
	.atowm-account-chip { display: none; }
	.atowm-row { grid-template-columns: 34px minmax(0, 1fr) auto; }
	.atowm-row .atowm-subject { grid-column: 2 / 4; grid-row: 2; margin-top: -8px; }
}
@media (max-width: 980px) { .atowm-layout { grid-template-columns: minmax(0, 1fr); } }
