:root {
  --brand: #E1141E; --brand-d: #b80f17; --ink: #141a26; --muted: #6b7280; --line: #e8eaef;
  --bg: #f5f6f8; --panel: #fff; --hover: #f3f4f7; --sel: #fff1f1; --side: 252px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { font-family: "Plus Jakarta Sans", system-ui, sans-serif; background: var(--bg); color: var(--ink); margin: 0; }
a { color: inherit; text-decoration: none; }
.btn-brand { background: var(--brand); color: #fff; border: 0; font-weight: 600; }
.btn-brand:hover, .btn-brand:focus { background: var(--brand-d); color: #fff; }
.btn-icon { width: 36px; height: 36px; padding: 0; display: inline-grid; place-items: center; border-radius: 10px; color: #3b4252; border: 0; background: transparent; }
.btn-icon:hover { background: var(--hover); }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: #f08a8f; box-shadow: 0 0 0 .2rem rgba(225, 20, 30, .12); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.min-w-0 { min-width: 0; }

/* Marka */
.pm-brand { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; font-weight: 600; margin-bottom: 18px; }
.pm-brand b { color: var(--brand); font-weight: 800; }
.pm-logo { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; }
.pm-avatar { width: 32px; height: 32px; border-radius: 50%; background: #ffe3e4; color: var(--brand-d); display: inline-grid; place-items: center; font-weight: 700; flex: none; font-size: .85rem; }
.pm-avatar.lg { width: 42px; height: 42px; font-size: 1rem; }

/* Kabuk */
.pm-shell { display: flex; height: 100vh; }
.pm-side { width: var(--side); flex: none; padding: 18px 14px; display: flex; flex-direction: column; background: var(--bg); overflow-y: auto; }
.pm-folders, .pm-side-foot { display: flex; flex-direction: column; gap: 2px; }
.pm-side-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.pm-folders a, .pm-side-foot a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; font-weight: 500; color: #374151; }
.pm-folders a:hover, .pm-side-foot a:hover { background: #eceef2; }
.pm-folders a.active, .pm-side-foot a.active { background: var(--sel); color: var(--brand-d); font-weight: 700; }
.pm-folders a span { flex: 1; }
.pm-folders em { font-style: normal; font-size: .75rem; font-weight: 700; background: var(--brand); color: #fff; border-radius: 20px; padding: 1px 8px; }
.pm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pm-top { display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 4px; }
.pm-search { flex: 1; max-width: 680px; display: flex; align-items: center; gap: 10px; background: #e9ebf0; border-radius: 12px; padding: 0 14px; }
.pm-search:focus-within { background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.08); }
.pm-search input { border: 0; background: transparent; outline: 0; height: 44px; flex: 1; min-width: 0; }
.pm-user { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 4px 8px; border-radius: 12px; font-size: .9rem; }
.pm-user:hover { background: #e9ebf0; }
.pm-content { flex: 1; min-height: 0; padding: 0 16px 16px 4px; }
.pm-toasts { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 1080; width: min(560px, calc(100% - 32px)); }
.pm-backdrop { display: none; }

/* Liste + okuma */
.pm-split { display: flex; height: 100%; gap: 12px; }
.pm-list, .pm-reader { background: var(--panel); border-radius: 16px; overflow-y: auto; }
.pm-list { width: 42%; min-width: 340px; max-width: 560px; flex: none; }
.pm-reader { flex: 1; min-width: 0; }
.pm-reader.single { height: 100%; }
.pm-list-head { position: sticky; top: 0; z-index: 2; background: var(--panel); display: flex; align-items: center; gap: 8px; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--line); }
.pm-list-head h2 { font-size: 1rem; font-weight: 700; margin: 0 0 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-bulk-actions { display: none; }
.pm-bulk-actions.show { display: flex; }
.pm-bulk-actions.show ~ .pm-count { display: none; }
.pm-count { margin-left: auto; font-size: .78rem; color: var(--muted); white-space: nowrap; }
.pm-bulk-actions.show + .pm-count + .btn-group, .pm-list-head .btn-group { margin-left: 0; }
.pm-bulk-actions.show { margin-left: auto; }
.pm-items { list-style: none; margin: 0; padding: 0; }
.pm-items li { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px 12px 18px; border-bottom: 1px solid #f0f1f4; position: relative; }
.pm-items li:hover { background: var(--hover); }
.pm-items li.active { background: var(--sel); }
.pm-items li.unread::before { content: ""; position: absolute; left: 6px; top: 20px; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.pm-items li .form-check-input { margin-top: 3px; flex: none; }
.pm-items a { flex: 1; min-width: 0; }
.pm-row1 { display: flex; align-items: center; gap: 6px; }
.pm-from { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .92rem; }
.pm-row1 time { font-size: .75rem; color: var(--muted); white-space: nowrap; }
.pm-row1 .bi { font-size: .8rem; color: var(--muted); }
.pm-subj { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.pm-prev { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-items li.unread .pm-from, .pm-items li.unread .pm-subj { font-weight: 700; }
.pm-none { justify-content: center; flex-direction: column; align-items: center !important; color: var(--muted); padding: 60px 0 !important; }
.pm-none .bi { font-size: 2rem; }
.pm-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #9aa1ad; }
.pm-empty .bi { font-size: 3rem; color: #d5d8de; }

.pm-msg { padding: 14px 24px 24px; }
.pm-msg-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; position: sticky; top: 0; background: var(--panel); padding: 4px 0 10px; z-index: 2; }
.pm-msg-bar .btn-light { background: #f1f2f5; border: 0; border-radius: 10px; }
.pm-msg-subj { font-size: 1.35rem; font-weight: 700; margin: 10px 0 16px; word-break: break-word; }
.pm-msg-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.pm-img-note { font-size: .82rem; background: #f6f7f9; border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; color: #4b5563; }
.pm-img-note a { color: var(--brand); font-weight: 600; }
.pm-body { width: 100%; border: 0; min-height: 120px; display: block; }
.pm-files { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.pm-file { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; max-width: 280px; font-size: .85rem; }
.pm-file:hover { border-color: #f3b4b7; background: var(--sel); }
.pm-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-file small { color: var(--muted); white-space: nowrap; }
.pm-file .bi { color: var(--brand); font-size: 1.2rem; }

/* Sayfalar */
.pm-page { background: var(--panel); border-radius: 16px; padding: 24px; height: 100%; overflow-y: auto; }
.pm-card { border: 1px solid var(--line); border-radius: 14px; padding: 20px; background: #fff; }
.pm-card h2 { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.pm-card h2 .bi { color: var(--brand); }
.pm-danger { border-color: #f5c2c5; background: #fff8f8; }
.pm-rows { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.pm-rows li + li { border-top: 1px solid var(--line); }
.pm-rows a { display: flex; align-items: center; gap: 10px; padding: 11px 14px; }
.pm-rows a:hover { background: var(--hover); }
.pm-rows a b { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.pm-rows a span { font-size: .8rem; color: var(--muted); }
.pm-dns code { color: #374151; word-break: break-all; }
.pm-copy { cursor: copy; }
.pm-copy:hover { background: #fff1f1; }

.pm-compose { max-width: 920px; }
.pm-field { display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.pm-field label { width: 64px; color: var(--muted); font-size: .9rem; flex: none; }
.pm-field input { flex: 1; border: 0; outline: 0; height: 46px; min-width: 0; background: transparent; }
.pm-editor { width: 100%; border: 0; outline: 0; resize: vertical; padding: 16px 0; font-size: .95rem; line-height: 1.6; min-height: 280px; }
.pm-sig { font-size: .8rem; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 8px; }
.pm-sig pre { font-family: inherit; margin: 4px 0 0; white-space: pre-wrap; }

/* Giriş */
body.login { background: radial-gradient(1200px 600px at 10% -10%, #ffe5e6 0, transparent 60%), radial-gradient(900px 500px at 110% 110%, #ffe9e2 0, transparent 55%), #f7f7f9; }
.pm-login { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; }
.pm-login-card { width: 100%; max-width: 430px; background: #fff; border-radius: 22px; padding: 36px 32px; box-shadow: 0 20px 60px rgba(20, 26, 38, .08); }
.pm-login-card h1 { font-size: 1.45rem; font-weight: 800; margin-bottom: 6px; }
.pm-login-card .pm-toasts { position: static; transform: none; width: auto; }
.pm-login-help { margin-top: 22px; font-size: .78rem; color: var(--muted); background: #f6f7f9; border-radius: 12px; padding: 10px 12px; }
.pm-login-foot { margin-top: 18px; font-size: .8rem; color: var(--muted); }

/* Yenile, kota, boşalt */
.pm-refresh.htmx-request .bi, .htmx-request .pm-refresh .bi, #refresh-btn.htmx-request .bi { animation: pm-spin .8s linear infinite; }
@keyframes pm-spin { to { transform: rotate(360deg); } }
.pm-quota { font-size: .75rem; color: var(--muted); padding: 4px 12px 10px; }
.pm-quota .progress { height: 4px; margin-top: 6px; background: #e5e7eb; }
.pm-quota .progress-bar { background: var(--brand); }
.pm-folders small { font-size: .75rem; color: var(--muted); }
.pm-add-folder { color: var(--muted) !important; font-size: .88rem; }
.pm-empty-bar { display: flex; align-items: center; gap: 10px; justify-content: space-between; font-size: .8rem; color: #4b5563; background: #fafafb; padding: 8px 18px; border-bottom: 1px solid var(--line); }
kbd { background: #eef0f3; color: #374151; border-radius: 5px; padding: 1px 6px; font-size: .75rem; box-shadow: inset 0 -1px 0 #d6d9df; }

/* Zengin metin */
.pm-toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.pm-toolbar button { border: 0; background: transparent; width: 34px; height: 32px; border-radius: 8px; color: #374151; }
.pm-toolbar button:hover { background: var(--hover); }
.pm-toolbar .sep { width: 1px; background: var(--line); margin: 4px 6px; }
div.pm-editor { min-height: 300px; padding: 16px 2px; outline: 0; overflow-wrap: anywhere; }
div.pm-editor:empty::before { content: attr(data-placeholder); color: #9aa1ad; }
div.pm-editor blockquote { margin: 0 0 0 .8ex; border-left: 2px solid #d1d5db; padding-left: 1ex; color: #4b5563; }
div.pm-editor a { color: var(--brand); text-decoration: underline; }
.pm-select { flex: 1; border: 0; outline: 0; height: 46px; background: transparent; min-width: 0; }
.pm-static { flex: 1; color: #374151; font-size: .92rem; }
label.pm-file { cursor: pointer; }

/* Yönetim */
.pm-admin { background: #f9fafb; }
.pm-admin .pm-card { box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.pm-admin-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.pm-admin-head h1 { font-size: 1.5rem; font-weight: 800; margin: 0; word-break: break-all; }
.pm-admin-head p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.pm-crumbs { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--muted); margin-bottom: 10px; flex-wrap: wrap; }
.pm-crumbs a:hover { color: var(--brand); }
.pm-crumbs .bi { font-size: .65rem; }
.pm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 22px; }
.pm-stat { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.pm-stat > .bi { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.25rem; background: var(--sel); color: var(--brand); flex: none; }
.pm-stat b { display: block; font-size: 1.25rem; font-weight: 800; line-height: 1.2; }
.pm-stat span { font-size: .8rem; color: var(--muted); }
.pm-stat.ok > .bi { background: #e8f7ee; color: #15803d; }
.pm-stat.bad > .bi { background: #fff4e5; color: #b45309; }
.pm-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.pm-card-head h2 { margin: 0; }
.pm-filter { max-width: 220px; }
.pm-badge { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.pm-badge.ok { background: #e8f7ee; color: #15803d; }
.pm-badge.warn { background: #fff4e5; color: #b45309; }
.pm-badge.dark { background: #1f2937; color: #fff; }
.pm-badge.bad { background: #fdecec; color: #b91c1c; }
.pm-badge.lg { font-size: .85rem; padding: 7px 14px; }
.pm-domains { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.pm-domain { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; transition: border-color .15s, box-shadow .15s; }
.pm-domain:hover { border-color: #f3b4b7; box-shadow: 0 4px 14px rgba(225, 20, 30, .07); }
.pm-domain-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pm-domain-top b { overflow: hidden; text-overflow: ellipsis; }
.pm-domain-meta { display: flex; gap: 14px; margin-top: 8px; font-size: .8rem; color: var(--muted); }
.pm-domain-meta .bi { margin-right: 4px; }
.pm-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; }
.pm-avatar.xl { width: 56px; height: 56px; font-size: 1.4rem; border-radius: 16px; }
.pm-checks { list-style: none; margin: 0; padding: 0; }
.pm-checks li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f1f2f4; font-size: .9rem; }
.pm-checks li:last-child { border-bottom: 0; }
.pm-checks li span { margin-left: auto; font-size: .8rem; color: var(--muted); }
.pm-checks li.ok .bi { color: #16a34a; }
.pm-checks li.warn .bi { color: #d97706; }
.pm-checks li.bad .bi { color: #dc2626; }
.pm-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.pm-steps li { counter-increment: s; position: relative; padding: 0 0 14px 40px; }
.pm-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--sel); color: var(--brand); font-weight: 800; display: grid; place-items: center; font-size: .85rem; }
.pm-steps b { display: block; font-size: .9rem; }
.pm-steps span { font-size: .82rem; color: var(--muted); }
.pm-step-no { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; display: inline-grid; place-items: center; font-size: .8rem; font-weight: 800; }
.pm-progress { height: 6px; background: #eef0f3; }
.pm-progress .progress-bar { background: #16a34a; }
.pm-callout { display: flex; align-items: center; gap: 14px; background: #fff7f7; border: 1px solid #fbd5d7; border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; flex-wrap: wrap; }
.pm-callout > .bi { font-size: 1.5rem; color: var(--brand); }
.pm-callout.info { background: #f3f7ff; border-color: #d5e2fb; }
.pm-callout.info > .bi { color: #2563eb; }
.pm-callout b { display: block; font-size: .92rem; }
.pm-callout span { font-size: .82rem; color: #4b5563; }
.pm-records { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pm-records li { display: flex; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.pm-records li.ok { border-color: #d3eedd; }
.pm-records li.warn { border-color: #f6dfb8; background: #fffcf5; }
.pm-rec-state { font-size: 1.15rem; padding-top: 1px; }
.pm-records li.ok .pm-rec-state { color: #16a34a; }
.pm-records li.warn .pm-rec-state { color: #d97706; }
.pm-records li.bad .pm-rec-state { color: #c4c8cf; }
.pm-rec-body { flex: 1; min-width: 0; }
.pm-rec-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pm-rec-title small { margin-left: auto; font-size: .75rem; color: var(--muted); }
.pm-type { font-size: .7rem; font-weight: 700; background: #eef0f3; border-radius: 6px; padding: 1px 7px; color: #374151; }
.pm-rec-body p { font-size: .82rem; color: var(--muted); margin: 4px 0 8px; }
.pm-rec-grid { display: grid; grid-template-columns: 52px 1fr; gap: 4px 10px; font-size: .78rem; align-items: start; }
.pm-rec-grid > span { color: var(--muted); padding-top: 3px; }
.pm-rec-grid code { background: #f6f7f9; border-radius: 6px; padding: 3px 8px; color: #1f2937; word-break: break-all; }
.pm-copy { cursor: copy; position: relative; }
.pm-copy:hover { background: #fff1f1 !important; }
.copied { outline: 2px solid #16a34a; outline-offset: 1px; }
.pm-copy.copied::after { content: "Kopyalandı"; position: absolute; right: 6px; top: -22px; font: 600 .7rem/1 "Plus Jakarta Sans", sans-serif; background: #16a34a; color: #fff; padding: 4px 6px; border-radius: 6px; }
.pm-subform { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 16px; }
.pm-subform h3 { font-size: .95rem; font-weight: 700; margin-bottom: 10px; }
.pm-rows .pm-avatar { width: 28px; height: 28px; font-size: .75rem; }
.pm-creds { border-color: #bfe5cd; background: #f6fdf8; }
.pm-creds pre { background: #fff; border: 1px dashed #bfe5cd; border-radius: 10px; padding: 14px; font-size: .85rem; white-space: pre-wrap; }
.pm-empty-state { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 30px 0; }
.pm-empty-state .bi { font-size: 2rem; }

/* Tüm postalar (yönetici) */
.pm-allmail { display: flex; flex-direction: column; gap: 12px; height: 100%; }
.pm-allmail .pm-split { flex: 1; min-height: 0; height: auto; }
.pm-allmail-bar { background: var(--panel); border-radius: 16px; padding: 12px 16px; }
.pm-allmail-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.pm-allmail-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pm-allmail-filters .form-select, .pm-allmail-filters .form-control { width: auto; max-width: 220px; }
.pm-allmail-filters .pm-grow { flex: 1; min-width: 180px; max-width: none; }
.pm-check { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; white-space: nowrap; }
.pm-check .form-check-input { margin: 0; }
.pm-box { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: .72rem; font-weight: 600; color: #374151; background: #f1f2f5; border-radius: 6px; padding: 1px 7px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-box .bi { font-size: .7rem; color: var(--muted); }
.pm-tabs { display: flex; gap: 4px; overflow-x: auto; margin: 0 -4px 10px; padding: 0 4px 2px; scrollbar-width: none; }
.pm-tabs::-webkit-scrollbar { display: none; }
.pm-tab { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 6px 12px; border-radius: 10px; font-size: .84rem; font-weight: 600; color: #4b5563; }
.pm-tab:hover { background: var(--hover); color: var(--ink); }
.pm-tab.active { background: var(--sel); color: var(--brand-d); }
.pm-search-sm { max-width: none; border-radius: 10px; padding: 0 12px; }
.pm-search-sm input { height: 34px; font-size: .88rem; }
.pm-search-sm .bi { color: var(--muted); }
.pm-pill { display: inline-grid; place-items: center; min-width: 18px; height: 18px; border-radius: 9px; background: var(--brand); color: #fff; font-size: .7rem; margin-left: 2px; }
.pm-list-title { min-width: 0; flex: 1; }
.pm-list-title h2 { margin: 0; }
.pm-list-title small { display: block; color: var(--muted); font-size: .74rem; }
.pm-bulkbar { display: none; position: sticky; top: 57px; z-index: 2; align-items: center; gap: 10px; padding: 8px 12px 8px 18px; background: #fff7f7; border-bottom: 1px solid #f6d5d7; }
.pm-bulkbar.show { display: flex; }
.pm-bulkbar b { font-size: .85rem; white-space: nowrap; color: var(--brand-d); }
.pm-bulkbar-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.pm-bulkbar-btns .btn { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; padding: 3px 9px; border-radius: 8px; }
.pm-selall { display: none; padding: 7px 18px; font-size: .82rem; background: #f8fafc; border-bottom: 1px solid var(--line); text-align: center; }
.pm-selall.show { display: block; }
.pm-newer-wrap:empty { display: none; }
.pm-newer-wrap { position: sticky; top: 60px; z-index: 3; display: flex; justify-content: center; height: 0; overflow: visible; }
.pm-newer { margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 20px; background: var(--brand); color: #fff; font-size: .8rem; font-weight: 600; padding: 6px 14px; box-shadow: 0 6px 18px rgba(225, 20, 30, .3); }
.pm-items-adm li { padding-right: 12px; }
.pm-quick { display: none; position: absolute; right: 10px; top: 8px; background: var(--hover); border-radius: 10px; padding: 2px; }
.pm-quick .btn-icon { width: 30px; height: 30px; }
.pm-quick .btn-icon:hover { background: #e2e5ea; }
.pm-items-adm li:hover .pm-quick { display: flex; }
.pm-items-adm li:hover time { visibility: hidden; }
.pm-items-adm li.active .pm-quick { background: var(--sel); }
.pm-more, .pm-end { justify-content: center; color: var(--muted); font-size: .84rem; cursor: pointer; }
.pm-more:hover { color: var(--brand-d); }
.pm-more .pm-more-load, .pm-more.htmx-request .pm-more-idle { display: none; }
.pm-more.htmx-request .pm-more-load { display: inline-flex; align-items: center; }
.pm-end { cursor: default; }
.pm-msg-actions { display: flex; gap: 2px; }
.pm-retention { display: flex; gap: 8px; align-items: flex-start; font-size: .8rem; color: #6b4f00; background: #fffaeb; border-bottom: 1px solid #fde9b6; padding: 8px 18px; line-height: 1.45; }
.pm-retention .bi { margin-top: 2px; }
.pm-card .pm-retention { border: 1px solid #fde9b6; border-radius: 10px; padding: 9px 12px; }
.pm-switch { display: inline-flex; align-items: center; gap: 8px; padding-left: 0; font-size: .82rem; font-weight: 600; color: #374151; white-space: nowrap; }
.pm-switch .form-check-input { margin: 0; float: none; cursor: pointer; }
.pm-switch .form-check-label { cursor: pointer; }
.pm-trashed { color: var(--brand-d) !important; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.pm-trashed .bi { font-size: .7rem; }
@media (hover: none) { .pm-quick { display: none !important; } .pm-items-adm li:hover time { visibility: visible; } }

/* Yönetim paneli (modern) */
.pm-dash { max-width: 1480px; margin: 0 auto; }
.pm-dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.pm-dash-head h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 4px; }
.pm-dash-head p { color: var(--muted); margin: 0; }
.pm-dash-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pm-dash-actions .btn { border-radius: 10px; font-weight: 600; }
.pm-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 600; color: #4b5563; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 4px 12px; }
.pm-live { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 0 rgba(22, 163, 74, .5); animation: pmPulse 2s infinite; }
.pm-live.bad { background: #dc2626; box-shadow: 0 0 0 0 rgba(220, 38, 38, .5); }
@keyframes pmPulse { 70% { box-shadow: 0 0 0 7px rgba(0, 0, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); } }
.pm-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 22px; }
.pm-kpi { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.pm-kpi-ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 1.25rem; color: var(--brand); background: linear-gradient(135deg, #fff1f1, #ffe1e2); flex: none; }
.pm-kpi small { display: block; font-size: .75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pm-kpi b { display: block; font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; font-variant-numeric: tabular-nums; }
.pm-kpi em { font-style: normal; font-size: .76rem; color: var(--muted); }
.pm-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.pm-card-head h2 { margin: 0; }
.pm-card-search { width: 240px; }
.pm-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pm-tools .pm-search { width: 230px; }
.pm-tools .ts-wrapper, .pm-tools > .form-select { width: 220px; }
.pm-count-chip { font-size: .72rem; font-weight: 700; color: var(--muted); background: #f1f2f5; border-radius: 20px; padding: 2px 9px; }
.pm-dlist { display: flex; flex-direction: column; }
.pm-dhead, .pm-drow { display: grid; grid-template-columns: minmax(180px, 2.2fr) 130px 70px 90px minmax(150px, 1.6fr); gap: 14px; align-items: center; padding: 10px 12px; }
.pm-dhead { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-bottom: 1px solid var(--line); }
.pm-drow { border-radius: 12px; transition: background .12s; }
.pm-drow + .pm-drow { border-top: 1px solid #f2f3f6; }
.pm-drow:hover { background: var(--hover); }
.pm-dname { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pm-dname b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-dfav { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: .85rem; color: #fff; background: linear-gradient(135deg, #1f2937, #4b5563); flex: none; }
.pm-num { font-variant-numeric: tabular-nums; font-weight: 600; }
.pm-usage { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pm-usage small { white-space: nowrap; color: #374151; font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; }
.pm-bar { flex: 1; height: 6px; border-radius: 6px; background: #eef0f3; overflow: hidden; display: block; min-width: 40px; }
.pm-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #f87171, var(--brand)); min-width: 3px; }
.pm-none-found { padding: 18px; text-align: center; color: var(--muted); font-size: .9rem; }
.pm-acc-wrap { max-height: 640px; overflow: auto; margin: 0 -20px -20px; padding: 0 8px; }
.pm-acc-table thead th { position: sticky; top: 0; background: #fff; z-index: 1; white-space: nowrap; user-select: none; }
.pm-acc-table thead th .bi { font-size: .7rem; opacity: .35; }
.pm-acc-table thead th[data-dir] .bi { opacity: 1; color: var(--brand); }
.pm-acc-table td small { font-size: .76rem; }
.pm-heavy { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.pm-heavy a { display: flex; justify-content: space-between; gap: 10px; font-size: .86rem; font-weight: 600; margin-bottom: 5px; min-width: 0; }
.pm-heavy a:hover span { color: var(--brand-d); }
.pm-heavy small { color: var(--muted); font-weight: 500; white-space: nowrap; }
.pm-addr { display: flex; align-items: center; gap: 6px; }
.pm-addr > span { color: var(--muted); font-weight: 700; }
.pm-addr > .form-control { flex: 1; }
.pm-addr > .ts-wrapper, .pm-addr > .form-select { flex: 1.2; min-width: 0; }

/* Aranabilir seçim kutuları (Tom Select) — çerçeve ve ok işareti Bootstrap form-select'te (sarmalayıcıda) kalır */
.ts-wrapper.form-select { padding: 0 !important; border-radius: 10px; cursor: pointer; }
.ts-wrapper.form-select .ts-control { background: transparent !important; padding: 5px 34px 5px 11px; min-height: 34px; font-size: .88rem; box-shadow: none !important; cursor: pointer; }
.ts-wrapper.form-select-sm .ts-control { min-height: 29px; padding-top: 3px; padding-bottom: 3px; font-size: .84rem; }
.ts-wrapper.form-select.focus { border-color: #f08a8f; box-shadow: 0 0 0 .2rem rgba(225, 20, 30, .12); }
.ts-wrapper.form-select .ts-control > input { cursor: pointer; }
.ts-dropdown { border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(16, 24, 40, .14); margin-top: 6px; overflow: hidden; font-size: .88rem; z-index: 1060; }
.ts-dropdown .dropdown-input-wrap { padding: 8px; border-bottom: 1px solid var(--line); }
.ts-dropdown .dropdown-input { border-radius: 8px; border: 1px solid #dee2e6; padding: 6px 10px; width: 100%; outline: 0; }
.ts-dropdown .dropdown-input:focus { border-color: #f08a8f; }
.ts-dropdown .ts-dropdown-content { max-height: 320px; padding: 4px; }
.ts-dropdown .option { border-radius: 8px; padding: 7px 10px; }
.ts-dropdown .active { background: var(--sel); color: var(--brand-d); }
.ts-dropdown .selected { font-weight: 700; }
.ts-dropdown .optgroup-header { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px 10px 4px; }
.ts-dropdown .no-results { padding: 10px; color: var(--muted); }
.ts-wrapper.pm-select { flex: 1; }
.ts-wrapper.pm-select .ts-control { border: 0 !important; background-color: transparent !important; padding-left: 0; min-height: 44px; box-shadow: none !important; }
.pm-allmail-filters .ts-wrapper { width: 220px; }

/* Mobil */
@media (max-width: 991.98px) {
  .pm-side { position: fixed; z-index: 1050; inset: 0 auto 0 0; background: #fff; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.15); }
  body.side-open .pm-side { transform: none; }
  body.side-open .pm-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 1040; }
  .pm-top { padding: 8px 10px; }
  .pm-content { padding: 0 8px 8px; }
  .pm-split .pm-reader { display: none; }
  .pm-list { width: 100%; max-width: none; min-width: 0; }
  .pm-msg { padding: 10px 14px 20px; }
  .pm-page { padding: 16px; }
  .pm-allmail-filters .form-select, .pm-allmail-filters .form-control, .pm-allmail-filters .ts-wrapper { max-width: none; flex: 1 1 45%; width: auto; }
  .pm-dhead { display: none; }
  .pm-drow { grid-template-columns: 1fr auto; row-gap: 6px; }
  .pm-drow > :nth-child(3), .pm-drow > :nth-child(4) { display: none; }
  .pm-drow .pm-usage { grid-column: 1 / -1; }
  .pm-card-search, .pm-tools .pm-search, .pm-tools .ts-wrapper, .pm-tools > .form-select { width: 100%; }
  .pm-tools { width: 100%; }
  .pm-acc-wrap { max-height: none; }
}
