/* =========================================================
   Posta Paneli — arayüz stilleri (Bootstrap 5.3 üzerine)
   ========================================================= */

:root {
    --brand: #4f46e5;
    --brand-2: #7c3aed;
    --brand-soft: #eef0ff;
    --brand-grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 55%, #d946ef 110%);
    --bg: #f3f4fa;
    --surface: #ffffff;
    --surface-2: #f8f9fd;
    --border: #e6e8f2;
    --border-strong: #d6d9e8;
    --text: #0f172a;
    --muted: #64748b;
    --hover: #f2f3fb;
    --active-bg: #eceefe;
    --sidebar-bg: #fbfbfe;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
    --shadow: 0 12px 32px -14px rgba(30, 41, 99, .22);
    --shadow-lg: 0 24px 60px -20px rgba(30, 41, 99, .35);
    --radius: 16px;
    --radius-sm: 10px;
    --ok: #16a34a;
    --bad: #dc2626;
    --warn: #d97706;

    --bs-primary: #4f46e5;
    --bs-primary-rgb: 79, 70, 229;
    --bs-link-color: #4f46e5;
    --bs-link-color-rgb: 79, 70, 229;
    --bs-link-hover-color: #4338ca;
    --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --bs-border-radius: .65rem;
    --bs-border-radius-lg: .9rem;
    --bs-focus-ring-color: rgba(99, 102, 241, .25);
}

[data-bs-theme="dark"] {
    --brand: #818cf8;
    --brand-soft: #23264a;
    --bg: #0a0c16;
    --surface: #121522;
    --surface-2: #171b2b;
    --border: #232840;
    --border-strong: #2e3452;
    --text: #e6e8f2;
    --muted: #949cb8;
    --hover: #191d31;
    --active-bg: #1f2446;
    --sidebar-bg: #0e1120;
    --shadow: 0 12px 32px -14px rgba(0, 0, 0, .6);
    --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .7);
    --bs-body-bg: #0a0c16;
    --bs-body-color: #e6e8f2;
    --bs-link-color: #a5b4fc;
    --bs-link-color-rgb: 165, 180, 252;
    --bs-tertiary-bg: #171b2b;
    --bs-border-color: #262b44;
}

html, body { height: 100%; }
body {
    background: var(--bg);
    color: var(--text);
    font-feature-settings: "cv11", "ss01";
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}
a { text-decoration: none; }
::selection { background: rgba(99, 102, 241, .22); }

/* ---------- Butonlar ---------- */
.btn { font-weight: 600; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
.btn-sm { border-radius: 9px; }
.btn-lg { border-radius: 14px; font-size: 1rem; padding: .7rem 1.2rem; }
.btn-primary {
    --bs-btn-bg: #4f46e5; --bs-btn-border-color: transparent; --bs-btn-hover-bg: #4338ca; --bs-btn-hover-border-color: transparent;
    --bs-btn-active-bg: #3730a3; --bs-btn-disabled-bg: #a5b4fc; --bs-btn-disabled-border-color: transparent;
    background-image: var(--brand-grad);
    box-shadow: 0 8px 20px -8px rgba(99, 102, 241, .65);
}
.btn-primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: rgba(99, 102, 241, .45); --bs-btn-hover-bg: var(--brand-soft); --bs-btn-hover-color: var(--brand); --bs-btn-hover-border-color: var(--brand); --bs-btn-active-bg: var(--brand-soft); --bs-btn-active-color: var(--brand); }
.btn-light-soft { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.btn-light-soft:hover { background: var(--hover); color: var(--text); border-color: var(--border-strong); }
.btn-light-soft.disabled { opacity: .45; }
.btn, .icon-btn { transition: background-color .15s, color .15s, border-color .15s, transform .15s, box-shadow .15s, filter .15s; }

.icon-btn {
    width: 40px; height: 40px; flex: 0 0 40px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 12px; border: 0; background: transparent; color: var(--muted);
    font-size: 1.15rem; cursor: pointer;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.link-btn { background: none; border: 0; padding: 2px 6px; color: var(--muted); font-size: .82rem; font-weight: 600; border-radius: 6px; }
.link-btn:hover { color: var(--brand); background: var(--hover); }

.form-control, .form-select { border-color: var(--border-strong); border-radius: 11px; padding: .6rem .85rem; background-color: var(--surface); }
.form-control:focus, .form-select:focus { border-color: #818cf8; box-shadow: 0 0 0 4px rgba(99, 102, 241, .15); }
.form-label { font-weight: 600; font-size: .85rem; color: var(--text); margin-bottom: .35rem; }
.form-text { color: var(--muted); font-size: .78rem; }
.form-floating > .form-control { border-radius: 14px; }
.input-group > .btn { border-color: var(--border-strong); }
.input-group-text { background: var(--surface-2); border-color: var(--border-strong); color: var(--muted); font-size: .85rem; }
.form-check-input:checked { background-color: #6366f1; border-color: #6366f1; }
.switch-lg .form-check-input { width: 2.6em; height: 1.4em; margin-top: .1em; cursor: pointer; }
.switch-lg .form-check-label { padding-left: .4rem; font-weight: 500; cursor: pointer; }
.alert { border-radius: 14px; border: 0; }
.alert-info-soft { background: var(--brand-soft); color: var(--text); }
.alert-warning-soft { background: rgba(245, 158, 11, .12); color: var(--text); }

/* ---------- Kabuk ---------- */
.app-shell { display: flex; height: 100vh; height: 100dvh; overflow: hidden; overflow: clip; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; overflow: clip; position: relative; }
.page-body { flex: 1; overflow-y: auto; padding: 24px clamp(16px, 3vw, 32px) 48px; }

.sidebar { --bs-offcanvas-width: 300px; background: var(--sidebar-bg); border-right: 1px solid var(--border); }
@media (min-width: 992px) {
    .sidebar { width: 284px; flex: 0 0 284px; }
}
.sidebar-inner { display: flex; flex-direction: column; height: 100%; padding: 18px 14px 14px; gap: 4px; overflow-y: auto; width: 100%; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 14px; }
.sidebar-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--muted); padding: 16px 12px 6px; }
.sidebar-foot { margin-top: auto; padding-top: 12px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 1.08rem; letter-spacing: -.01em; }
.brand:hover { color: var(--text); }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--brand-grad); box-shadow: 0 8px 18px -6px rgba(124, 58, 237, .6); font-size: 1.1rem; }

.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-link {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
    color: var(--text); font-weight: 500; font-size: .92rem; position: relative;
}
.side-link i { font-size: 1.1rem; color: var(--muted); width: 20px; text-align: center; }
.side-link span:not(.badge-count) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-link:hover { background: var(--hover); color: var(--text); }
.side-link.active { background: var(--active-bg); color: var(--brand); font-weight: 650; }
.side-link.active i { color: var(--brand); }
.badge-count { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 99px; background: var(--brand); color: #fff; font-size: .72rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
[data-bs-theme="dark"] .badge-count { background: #6366f1; }
.badge-count.muted { background: var(--border); color: var(--muted); }

.btn-compose {
    margin: 4px 4px 14px; padding: 13px 16px; border-radius: 16px; color: #fff !important; font-weight: 700;
    background: var(--brand-grad); box-shadow: 0 12px 24px -10px rgba(99, 102, 241, .75);
}
.btn-compose:hover { filter: brightness(1.06); transform: translateY(-1px); }

.account-switch { margin: 0 4px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); overflow: hidden; }
.account-current { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: none; text-align: left; color: var(--text); }
.account-current:disabled { opacity: 1; cursor: default; }
.account-current > i { color: var(--muted); }
.account-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.account-text b { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-text small { font-size: .75rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-list { border-top: 1px solid var(--border); padding: 6px; display: flex; flex-direction: column; gap: 2px; max-height: 280px; overflow-y: auto; }
.account-item { display: flex; align-items: center; gap: 10px; padding: 8px 8px; border-radius: 10px; color: var(--text); }
.account-item:hover { background: var(--hover); color: var(--text); }
.account-item .dot, .from-chip .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--mb, #6366f1); flex: 0 0 10px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--mb, #6366f1) 20%, transparent); }

.mb-icon { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-size: 1.15rem; background: linear-gradient(135deg, var(--mb, #6366f1), color-mix(in srgb, var(--mb, #6366f1) 55%, #d946ef)); box-shadow: 0 8px 18px -8px var(--mb, #6366f1); }
.mb-icon-sm { width: 34px; height: 34px; flex-basis: 34px; border-radius: 11px; font-size: .95rem; }

.perm-hint { margin: 14px 4px 0; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px dashed var(--border-strong); }
.perm-hint > span { display: block; font-size: .72rem; color: var(--muted); font-weight: 600; margin-bottom: 8px; }

.sidebar-user-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px; border: 1px solid var(--border); background: var(--surface); border-radius: 16px; color: var(--text); text-align: left; }
.sidebar-user-btn:hover { border-color: var(--border-strong); }
.sidebar-user-btn > i { color: var(--muted); }
.sidebar-user-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.sidebar-user-text strong { font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-text small { font-size: .74rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown-menu { border: 1px solid var(--border); border-radius: 14px; padding: 6px; background: var(--surface); --bs-dropdown-link-active-bg: var(--brand-soft); --bs-dropdown-link-active-color: var(--brand); }
.dropdown-item { border-radius: 9px; padding: 8px 12px; font-size: .9rem; display: flex; align-items: center; gap: 10px; }
.dropdown-item i { color: var(--muted); }
.dropdown-item.text-danger i { color: inherit; }

/* ---------- Üst çubuk ---------- */
.topbar {
    display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 12px clamp(14px, 2.4vw, 28px);
    background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5;
}
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { font-size: 1.15rem; font-weight: 750; margin: 0; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-title p { margin: 0; font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

/* ---------- Avatar ---------- */
.avatar { --av: #6366f1; width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: .85rem; color: #fff; background: linear-gradient(135deg, var(--av), color-mix(in srgb, var(--av) 60%, #000 0%)); background: linear-gradient(135deg, var(--av), color-mix(in srgb, var(--av) 70%, #fff)); letter-spacing: .02em; user-select: none; }
.avatar-sm { width: 30px; height: 30px; flex-basis: 30px; font-size: .68rem; }
.avatar-lg { width: 48px; height: 48px; flex-basis: 48px; font-size: 1rem; }
.avatar-xl { width: 72px; height: 72px; flex-basis: 72px; font-size: 1.5rem; }
.avatar-stack { display: flex; align-items: center; }
.avatar-stack .avatar { border: 2px solid var(--surface); margin-left: -8px; }
.avatar-stack .avatar:first-child { margin-left: 0; }
.avatar-stack-text { margin-left: 10px; font-size: .8rem; color: var(--muted); font-weight: 500; }

/* ---------- Etiketler / çipler ---------- */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--border); font-size: .7rem; font-weight: 600; color: var(--muted); white-space: nowrap; vertical-align: middle; }
.tag-indigo { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.tag-orange { background: rgba(249, 115, 22, .12); color: #ea580c; border-color: transparent; }
.chip-sm { font-size: .72rem; padding: 1px 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); margin-left: 4px; }
.box-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 99px; font-size: .76rem; font-weight: 600; background: color-mix(in srgb, var(--mb) 12%, transparent); color: color-mix(in srgb, var(--mb) 80%, var(--text)); margin: 2px 4px 2px 0; }
.box-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--mb); }

.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: .74rem; font-weight: 650; white-space: nowrap; }
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-pill.ok { color: var(--ok); background: rgba(22, 163, 74, .1); }
.status-pill.bad { color: var(--bad); background: rgba(220, 38, 38, .1); }
.status-pill.unknown { color: var(--muted); background: var(--surface-2); }
.status-pill.loading::before { animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .2; } }
@keyframes spin { to { transform: rotate(360deg); } }

.perm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.perm-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 8px; font-size: .74rem; font-weight: 600; }
.perm-chip.on { background: var(--brand-soft); color: var(--brand); }
.perm-chip.off { background: var(--surface-2); color: var(--muted); text-decoration: line-through; opacity: .65; }
.perm-chips-compact .perm-chip { padding: 0; width: 30px; height: 30px; justify-content: center; border-radius: 9px; font-size: .9rem; }
.perm-chips-compact .perm-chip.off { text-decoration: none; opacity: .4; }

/* ---------- Paneller ---------- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.panel + .panel { margin-top: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.panel-head h2 { font-size: 1rem; font-weight: 700; margin: 0; display: flex; align-items: center; gap: 10px; }
.panel-head h2 i { color: var(--brand); }
.form-section-title { font-size: .95rem; font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.form-section-title i { color: var(--brand); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.stat-card { display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--text); box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--text); }
.stat-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff; font-size: 1.35rem; flex: 0 0 52px; }
.stat-body { display: flex; flex-direction: column; line-height: 1.2; }
.stat-body small { color: var(--muted); font-weight: 600; font-size: .78rem; }
.stat-body strong { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; margin: 2px 0; }
.stat-body em { font-style: normal; color: var(--muted); font-size: .76rem; }
.grad-indigo { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.grad-pink { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.grad-teal { background: linear-gradient(135deg, #14b8a6, #06b6d4); }
.grad-green { background: linear-gradient(135deg, #22c55e, #16a34a); }
.grad-red { background: linear-gradient(135deg, #f97316, #dc2626); }

.bar-chart { display: flex; align-items: flex-end; gap: clamp(8px, 2vw, 22px); height: 200px; padding-top: 10px; }
.bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; }
.bar { width: 100%; max-width: 48px; height: var(--h); border-radius: 10px 10px 6px 6px; background: var(--brand-grad); opacity: .9; transition: height .6s cubic-bezier(.2, .8, .2, 1); }
.bar-col:hover .bar { opacity: 1; }
.bar-val { font-size: .75rem; font-weight: 700; color: var(--muted); }
.bar-label { font-size: .74rem; color: var(--muted); font-weight: 600; }

.attention-list { display: flex; flex-direction: column; gap: 8px; }
.attention-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); }
.attention-item:hover { color: var(--text); border-color: var(--border-strong); }
.attention-item i { font-size: 1.1rem; margin-top: 1px; }
.attention-item.danger i { color: var(--bad); }
.attention-item.warning i { color: var(--warn); }
.attention-item span { display: flex; flex-direction: column; font-size: .88rem; }
.attention-item small { color: var(--muted); }
.empty-mini { padding: 22px; text-align: center; color: var(--muted); font-size: .9rem; border: 1px dashed var(--border-strong); border-radius: 12px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--border); }
.timeline li:last-child { border-bottom: 0; }
.tl-icon { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 11px; display: grid; place-items: center; font-size: 1rem; }
.tl-body { flex: 1; min-width: 0; font-size: .88rem; }
.tl-body small { display: block; color: var(--muted); font-size: .8rem; margin-top: 2px; overflow-wrap: anywhere; }
.timeline time { font-size: .76rem; color: var(--muted); white-space: nowrap; text-align: right; display: flex; flex-direction: column; }
.tone-blue { background: rgba(59, 130, 246, .12); color: #3b82f6; }
.tone-gray { background: var(--surface-2); color: var(--muted); }
.tone-green { background: rgba(34, 197, 94, .13); color: #16a34a; }
.tone-red { background: rgba(239, 68, 68, .12); color: #dc2626; }
.tone-indigo { background: var(--brand-soft); color: var(--brand); }
.tone-teal { background: rgba(20, 184, 166, .13); color: #0d9488; }
.tone-pink { background: rgba(236, 72, 153, .12); color: #db2777; }
.tone-orange { background: rgba(249, 115, 22, .12); color: #ea580c; }

/* ---------- Filtre çubuğu ---------- */
.filter-bar { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.filter-bar .search-field { flex: 1 1 260px; }
.filter-bar-wrap .form-select { flex: 0 1 200px; }
.search-field { position: relative; }
.search-field > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-field .form-control { padding-left: 40px; border-radius: 12px; background: var(--surface); }
.search-field-sm > i { left: 11px; font-size: .85rem; }
.search-field-sm .form-control { padding-left: 32px; width: 200px; max-width: 100%; }
.seg { display: inline-flex; padding: 4px; gap: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 13px; }
.seg .btn { border: 0; border-radius: 10px; padding: 7px 14px; font-weight: 600; font-size: .86rem; color: var(--muted); background: transparent; flex: 1; }
.seg .btn:hover { color: var(--text); }
.seg .btn.active, .seg .btn-check:checked + .btn { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.seg-sm .btn { padding: 6px 12px; font-size: .82rem; }

/* ---------- Mail hesap kartları ---------- */
.mb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
@media (max-width: 400px) { .mb-grid { grid-template-columns: 1fr; } }
.mb-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 16px; box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s; overflow: hidden; }
.mb-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--mb), color-mix(in srgb, var(--mb) 40%, #d946ef)); }
.mb-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.mb-card.is-passive { opacity: .62; }
.mb-card header { display: flex; align-items: center; gap: 12px; }
.mb-title { flex: 1; min-width: 0; }
.mb-title h3 { font-size: 1rem; font-weight: 700; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-title p { margin: 0; font-size: .82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-meta { margin: 0; display: grid; gap: 6px; padding: 12px; border-radius: 12px; background: var(--surface-2); }
.mb-meta div { display: flex; gap: 10px; font-size: .8rem; }
.mb-meta dt { width: 40px; color: var(--muted); font-weight: 600; }
.mb-meta dd { margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-limits { display: flex; gap: 16px; font-size: .8rem; color: var(--muted); flex-wrap: wrap; }
.mb-limits i { color: var(--brand); }
.mb-card footer { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--border); margin-top: auto; }

/* ---------- Veri listesi (müşteriler) ---------- */
.data-list { display: flex; flex-direction: column; }
.data-row { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); align-items: center; }
.data-row:last-child { border-bottom: 0; }
.data-head { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding-top: 12px; padding-bottom: 12px; background: var(--surface-2); }
@media (min-width: 768px) {
    .data-row { grid-template-columns: minmax(220px, 1.4fr) 1.6fr 140px 90px 120px; gap: 16px; }
}
.person { display: flex; align-items: center; gap: 12px; color: var(--text); min-width: 0; }
.person:hover { color: var(--text); }
.person > span { display: flex; flex-direction: column; min-width: 0; }
.person b { font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person small { color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-muted { font-size: .82rem; color: var(--muted); }
.cell-actions { display: flex; gap: 2px; justify-content: flex-end; }
.cell-actions form { display: inline; }
@media (max-width: 767.98px) { .cell-actions { justify-content: flex-start; margin-left: 40px; } .cell-boxes, .cell-muted { margin-left: 52px; } .data-row > span:nth-child(4) { margin-left: 52px; } }

/* ---------- Düzenleme formu ---------- */
.edit-layout { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
@media (min-width: 1200px) { .edit-layout { grid-template-columns: minmax(0, 1fr) 320px; } }
.edit-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.edit-main .panel + .panel { margin-top: 0; }
.sticky-panel { position: sticky; top: 0; }
@media (max-width: 1199.98px) { .edit-side { order: -1; } .sticky-panel { position: static; } }
.preview-card { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.preview-card > div { display: flex; flex-direction: column; min-width: 0; }
.preview-card b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-card small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.server-box { padding: 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); }
.server-box h3 { font-size: .9rem; font-weight: 700; margin-bottom: 12px; display: flex; gap: 8px; align-items: center; }
.server-box h3 i { color: var(--brand); }

.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.perm-toggle { cursor: pointer; display: block; position: relative; }
.perm-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.perm-toggle-box { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); transition: border-color .15s, background .15s, box-shadow .15s; height: 100%; }
.perm-toggle:hover .perm-toggle-box { border-color: var(--border-strong); }
.perm-toggle-icon { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-size: 1.1rem; transition: all .15s; }
.perm-toggle-text { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.perm-toggle-text b { font-size: .9rem; }
.perm-toggle-text small { color: var(--muted); font-size: .76rem; }
.perm-switch { width: 38px; height: 22px; flex: 0 0 38px; border-radius: 99px; background: var(--border-strong); position: relative; transition: background .2s; }
.perm-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.perm-toggle input:checked + .perm-toggle-box { border-color: rgba(99, 102, 241, .55); background: color-mix(in srgb, var(--brand-soft) 55%, var(--surface)); box-shadow: 0 0 0 4px rgba(99, 102, 241, .08); }
.perm-toggle input:checked + .perm-toggle-box .perm-toggle-icon { background: var(--brand-grad); color: #fff; }
.perm-toggle input:checked + .perm-toggle-box .perm-switch { background: #6366f1; }
.perm-toggle input:checked + .perm-toggle-box .perm-switch::after { transform: translateX(16px); }
.perm-toggle input:focus-visible + .perm-toggle-box { outline: 2px solid var(--brand); outline-offset: 2px; }

.color-picks { display: flex; gap: 10px; flex-wrap: wrap; }
.color-pick { position: relative; }
.color-pick input { position: absolute; opacity: 0; inset: 0; }
.color-pick span { display: block; width: 32px; height: 32px; border-radius: 10px; background: var(--c); cursor: pointer; transition: transform .15s, box-shadow .15s; }
.color-pick input:checked + span { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--c); transform: scale(1.05); }
.color-pick input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 4px; }

.pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; max-height: 420px; overflow-y: auto; padding: 2px; }
.pick-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 40px 12px 12px; border-radius: 14px; border: 1.5px solid var(--border); cursor: pointer; transition: border-color .15s, background .15s; }
.pick-item:hover { border-color: var(--border-strong); }
.pick-item input { position: absolute; opacity: 0; }
.pick-item:has(input:checked) { border-color: rgba(99, 102, 241, .6); background: color-mix(in srgb, var(--brand-soft) 50%, var(--surface)); }
.pick-check { position: absolute; right: 12px; top: 50%; transform: translateY(-50%) scale(.6); color: var(--brand); font-size: 1.2rem; opacity: 0; transition: all .15s; }
.pick-item:has(input:checked) .pick-check { opacity: 1; transform: translateY(-50%) scale(1); }
.pick-item:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.pick-text { flex: 1; display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.pick-text b { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-text small { font-size: .76rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-perms { display: flex; gap: 6px; margin-top: 4px; font-size: .78rem; color: var(--border-strong); }
.mini-perms i.on { color: var(--brand); }

.test-results { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.test-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; font-size: .84rem; }
.test-row i { margin-top: 2px; }
.test-row span { display: flex; flex-direction: column; min-width: 0; }
.test-row small { color: var(--muted); overflow-wrap: anywhere; }
.test-row.ok { background: rgba(22, 163, 74, .09); }
.test-row.ok i { color: var(--ok); }
.test-row.bad { background: rgba(220, 38, 38, .08); }
.test-row.bad i { color: var(--bad); }
.test-row.wait { background: var(--surface-2); }
.meta-list { margin: 0 0 16px; display: grid; gap: 6px; font-size: .82rem; }
.meta-list div { display: flex; justify-content: space-between; gap: 10px; }
.meta-list dt { color: var(--muted); font-weight: 500; }
.meta-list dd { margin: 0; }

.cred-card { display: flex; gap: 16px; align-items: flex-start; padding: 18px; border-radius: 16px; background: color-mix(in srgb, var(--brand-soft) 70%, var(--surface)); border: 1px solid rgba(99, 102, 241, .3); flex-wrap: wrap; }
.cred-icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--brand-grad); color: #fff; font-size: 1.2rem; }
.cred-text { background: var(--surface); padding: 12px 14px; border-radius: 10px; margin: 0; font-size: .85rem; white-space: pre-wrap; border: 1px solid var(--border); }

.pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 16px; font-size: .84rem; color: var(--muted); font-weight: 600; }
.list-foot { text-align: center; padding: 18px; font-size: .8rem; color: var(--muted); }

/* ---------- Boş durumlar ---------- */
.empty-state { text-align: center; padding: clamp(36px, 8vw, 80px) 20px; max-width: 520px; margin: 0 auto; }
.empty-state h3 { font-size: 1.2rem; font-weight: 750; margin-top: 18px; }
.empty-state p { color: var(--muted); margin-bottom: 22px; }
.empty-art { width: 96px; height: 96px; margin: 0 auto; border-radius: 30px; display: grid; place-items: center; font-size: 2.6rem; color: var(--brand); background: radial-gradient(circle at 30% 20%, #fff 0, var(--brand-soft) 70%); box-shadow: inset 0 0 0 1px rgba(99, 102, 241, .15), var(--shadow); }
[data-bs-theme="dark"] .empty-art { background: radial-gradient(circle at 30% 20%, #2a2f5a 0, var(--brand-soft) 70%); }
.state-card { text-align: center; padding: 48px 24px; color: var(--muted); }
.state-card > i { font-size: 2.2rem; color: var(--brand); display: block; margin-bottom: 10px; opacity: .85; }
.state-card.danger > i { color: var(--bad); }
.state-card h3 { font-size: 1.02rem; font-weight: 700; color: var(--text); }
.state-card p { font-size: .88rem; max-width: 360px; margin: 6px auto 16px; overflow-wrap: anywhere; }

/* =========================================================
   POSTA
   ========================================================= */
.mail-split { flex: 1; display: grid; grid-template-columns: minmax(340px, 410px) minmax(0, 1fr); min-height: 0; }
@media (min-width: 1500px) { .mail-split { grid-template-columns: 450px minmax(0, 1fr); } }
.list-pane { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-right: 1px solid var(--border); }
.reader-pane { display: flex; flex-direction: column; min-height: 0; background: var(--bg); }
@media (max-width: 991.98px) {
    .mail-split { grid-template-columns: minmax(0, 1fr); }
    .mail-split.show-reader .list-pane { display: none; }
    .mail-split:not(.show-reader) .reader-pane { display: none; }
    .list-pane { border-right: 0; }
}
.list-topbar { position: static; background: var(--surface); backdrop-filter: none; border-bottom: 0; padding-bottom: 6px; }
.list-search { padding: 0 16px 10px; }
.list-search .form-control { background: var(--surface-2); border-color: transparent; }
.list-search .form-control:focus { background: var(--surface); border-color: #818cf8; }
.list-tools { display: flex; align-items: center; gap: 10px; padding: 4px 16px 10px; border-bottom: 1px solid var(--border); min-height: 52px; }
.check-all { display: inline-flex; cursor: pointer; position: relative; }
.check-all input { position: absolute; opacity: 0; }
.check-all span { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--border-strong); display: grid; place-items: center; transition: all .15s; }
.check-all input:checked + span { background: #6366f1; border-color: #6366f1; }
.check-all input:checked + span::after { content: "\F633"; font-family: "bootstrap-icons"; color: #fff; font-size: .8rem; }
.check-all input:indeterminate + span { background: #6366f1; border-color: #6366f1; }
.check-all input:indeterminate + span::after { content: ""; width: 9px; height: 2px; background: #fff; border-radius: 2px; }
.chip-filters { display: flex; gap: 6px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.chip-filters::-webkit-scrollbar { display: none; }
.chip-filter { padding: 6px 12px; border-radius: 99px; font-size: .8rem; font-weight: 600; color: var(--muted); background: var(--surface-2); white-space: nowrap; border: 1px solid transparent; }
.chip-filter:hover { color: var(--text); }
.chip-filter.active { background: var(--brand-soft); color: var(--brand); border-color: rgba(99, 102, 241, .25); }
.bulk-actions { display: flex; gap: 2px; align-items: center; }
.bulk-actions:not([hidden]) ~ * { display: none; }
.list-tools:has(.bulk-actions:not([hidden])) .chip-filters { display: none; }
.list-tools:has(.bulk-actions:not([hidden])) .bulk-actions { flex: 1; }
.list-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; }

.mail-list { list-style: none; margin: 0; padding: 0; }
.mail-item { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 13px 16px 13px 16px; border-bottom: 1px solid var(--border); transition: background .12s; }
.mail-item:hover { background: var(--hover); }
.mail-item.active { background: var(--active-bg); }
.mail-item.active::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand-grad); }
.mail-item:has(.mi-check input:checked) { background: color-mix(in srgb, var(--brand-soft) 70%, var(--surface)); }
.mi-check { position: relative; cursor: pointer; flex: 0 0 40px; height: 40px; display: grid; place-items: center; }
.mi-check input { position: absolute; opacity: 0; pointer-events: none; }
.mi-check .bi-check-lg { display: none; width: 40px; height: 40px; border-radius: 50%; background: #6366f1; color: #fff; align-items: center; justify-content: center; font-size: 1.2rem; }
.mi-check input:checked ~ .avatar { display: none; }
.mi-check input:checked ~ .bi-check-lg { display: flex; }
.mi-check:hover .avatar { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px #a5b4fc; }
.mi-check input:focus-visible ~ .avatar { outline: 2px solid var(--brand); outline-offset: 2px; }
.mi-link { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; color: var(--text); padding-right: 22px; }
.mi-link:hover { color: var(--text); }
.mi-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.mi-from { font-size: .9rem; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mi-from small { color: var(--muted); font-weight: 500; }
.mi-top time { font-size: .74rem; color: var(--muted); white-space: nowrap; font-weight: 500; }
.mi-subject { font-size: .86rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mi-meta { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--muted); min-height: 18px; }
.mi-size { margin-left: auto; opacity: .7; font-size: .72rem; }
.mail-item.unread .mi-from, .mail-item.unread .mi-subject { font-weight: 750; color: var(--text); }
.mail-item.unread .mi-top time { color: var(--brand); font-weight: 700; }
.mail-item.unread .mi-link::after { content: ""; position: absolute; left: 6px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: #6366f1; }
.mi-star { position: absolute; right: 10px; bottom: 9px; border: 0; background: none; color: var(--border-strong); font-size: 1rem; padding: 4px; border-radius: 8px; line-height: 1; }
.mi-star:hover { color: #f59e0b; background: var(--surface-2); }
.mi-star.on { color: #f59e0b; }

.reader-topbar { position: static; }
.reader-actions { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.reader-actions .vr { height: 24px; align-self: center; opacity: .15; }
.reader-scroll { flex: 1; overflow-y: auto; padding: clamp(10px, 2.4vw, 28px); }
.reader { max-width: 940px; margin: 0 auto; background: var(--surface); border-radius: 22px; padding: clamp(18px, 3vw, 32px); box-shadow: var(--shadow); border: 1px solid var(--border); }
.reader-subject { font-size: clamp(1.15rem, 2.4vw, 1.5rem); font-weight: 750; letter-spacing: -.015em; margin: 0 0 18px; overflow-wrap: anywhere; }
.reader-head { display: flex; gap: 14px; align-items: flex-start; padding-bottom: 18px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.reader-people { flex: 1; min-width: 0; }
.reader-from { display: flex; flex-wrap: wrap; gap: 0 8px; align-items: baseline; }
.reader-from b { font-size: .98rem; }
.reader-from span { color: var(--muted); font-size: .84rem; overflow-wrap: anywhere; }
.reader-to { border: 0; background: none; padding: 0; font-size: .82rem; color: var(--muted); text-align: left; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.reader-to:hover { color: var(--text); }
.reader-date { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.recipient-list { margin: 10px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); display: grid; gap: 6px; font-size: .82rem; }
.recipient-list div { display: grid; grid-template-columns: 90px 1fr; gap: 8px; }
.recipient-list dt { color: var(--muted); font-weight: 600; }
.recipient-list dd { margin: 0; overflow-wrap: anywhere; }
.remote-note { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: rgba(245, 158, 11, .1); font-size: .84rem; margin-bottom: 16px; flex-wrap: wrap; }
.remote-note > i { color: var(--warn); }
.remote-note span { flex: 1; }
.mail-frame { width: 100%; min-height: 160px; border: 0; display: block; background: #fff; border-radius: 12px; }
[data-bs-theme="dark"] .mail-frame { padding: 14px; }
.attachments { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); }
.attachments-head { font-size: .85rem; font-weight: 700; margin-bottom: 12px; color: var(--muted); }
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.att-card { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); min-width: 0; }
.att-icon { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.35rem; background: var(--surface); color: var(--brand); border: 1px solid var(--border); }
.att-icon .bi-file-earmark-pdf { color: #dc2626; }
.att-icon .bi-file-earmark-excel { color: #16a34a; }
.att-icon .bi-file-earmark-word { color: #2563eb; }
.att-thumb { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px; overflow: hidden; background: var(--surface); }
.att-thumb img { width: 100%; height: 100%; object-fit: cover; }
.att-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.att-info b { font-size: .84rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-info small { font-size: .74rem; color: var(--muted); }
.att-actions { display: flex; }
.att-actions .icon-btn { width: 34px; height: 34px; flex-basis: 34px; font-size: 1rem; }
.quick-reply { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.reader-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px; color: var(--muted); }
.reader-empty h3 { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-top: 22px; }

.fab { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); width: 60px; height: 60px; border-radius: 20px; display: grid; place-items: center; color: #fff; font-size: 1.45rem; background: var(--brand-grad); box-shadow: 0 16px 32px -10px rgba(99, 102, 241, .8); z-index: 20; transition: transform .2s; }
.fab:hover { color: #fff; transform: translateY(-2px) scale(1.03); }

/* ---------- Yazma ---------- */
.compose { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; }
.compose-scroll { flex: 1; overflow-y: auto; padding: clamp(0px, 2.4vw, 28px); }
.compose-card { max-width: 940px; margin: 0 auto; background: var(--surface); border-radius: 22px; padding: 10px clamp(14px, 2.6vw, 28px) 24px; box-shadow: var(--shadow); border: 1px solid var(--border); }
@media (max-width: 575.98px) { .compose-card { border-radius: 0; border: 0; box-shadow: none; min-height: 100%; } }
.compose-card > .alert { margin-top: 14px; }
.field-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); min-height: 54px; }
.field-label { flex: 0 0 56px; font-size: .84rem; font-weight: 600; color: var(--muted); margin: 0; }
.field-input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: .95rem; padding: 6px 0; }
.field-extra { display: flex; gap: 2px; }
.field-error { color: var(--bad); font-size: .8rem; padding: 6px 0 0 68px; }
.field-error.warning { color: var(--warn); }
.attach-zone .field-error { padding-left: 0; }
.from-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); font-size: .86rem; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.from-chip small { color: var(--muted); font-weight: 500; }
.rcpt-input { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; cursor: text; padding: 2px 0; }
.rcpt-input.is-invalid .rcpt-typing { color: var(--bad); }
.rcpt-typing { flex: 1 1 140px; min-width: 120px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: .95rem; padding: 6px 0; }
.rcpt-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 4px; border-radius: 99px; background: var(--brand-soft); color: var(--text); font-size: .84rem; font-weight: 550; max-width: 100%; }
.rcpt-chip .avatar { width: 22px; height: 22px; flex-basis: 22px; font-size: .56rem; }
.rcpt-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rcpt-chip button { border: 0; background: none; color: var(--muted); padding: 0 3px; line-height: 1; font-size: 1rem; border-radius: 50%; }
.rcpt-chip button:hover { color: var(--bad); }
.rcpt-chip.bad { background: rgba(220, 38, 38, .1); color: var(--bad); }

.editor-wrap { margin-top: 12px; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--surface); }
.editor-wrap:focus-within { border-color: #a5b4fc; box-shadow: 0 0 0 4px rgba(99, 102, 241, .1); }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--border); background: var(--surface-2); position: sticky; top: 0; z-index: 2; }
.editor-toolbar button, .tb-color { width: 36px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 9px; background: none; color: var(--muted); font-size: 1.05rem; cursor: pointer; position: relative; }
.editor-toolbar button:hover, .tb-color:hover { background: var(--surface); color: var(--text); }
.editor-toolbar button.active { background: var(--brand-soft); color: var(--brand); }
.tb-color input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.tb-sep { width: 1px; height: 22px; background: var(--border-strong); margin: 6px 4px; }
.editor { min-height: 300px; padding: 18px 20px; outline: 0; font-size: .96rem; line-height: 1.65; overflow-wrap: anywhere; }
.editor:empty::before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; }
.editor blockquote { margin: 10px 0; padding: 2px 0 2px 14px; border-left: 3px solid #c7d2fe; color: var(--muted); }
.editor img { max-width: 100%; height: auto; }
.editor p { margin: 0 0 .6em; }
@media (max-width: 575.98px) { .editor { min-height: 46vh; padding: 14px 4px; } .editor-wrap { border-radius: 12px; } }

.attach-zone { margin-top: 16px; }
.kept-list, .file-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.file-list:empty { display: none; }
.file-chip { position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 8px 10px 8px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); font-size: .84rem; max-width: 100%; cursor: default; }
.file-chip > i:first-of-type { font-size: 1.2rem; color: var(--brand); }
.file-chip span { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.file-chip b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.file-chip small { color: var(--muted); font-size: .72rem; }
.file-chip.bad { border-color: rgba(220, 38, 38, .4); background: rgba(220, 38, 38, .06); }
.file-chip.bad small { color: var(--bad); }
.file-chip button, .chip-x { border: 0; background: none; color: var(--muted); font-size: 1rem; padding: 2px; cursor: pointer; }
.file-chip button:hover, .chip-x:hover { color: var(--bad); }
.file-chip.kept { cursor: pointer; }
.file-chip.kept input { position: absolute; opacity: 0; }
.file-chip.kept:has(input:not(:checked)) { opacity: .5; text-decoration: line-through; }
.file-chip.kept:has(input:not(:checked)) .chip-x::before { content: "\F64D"; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px; border-radius: 16px; border: 2px dashed var(--border-strong); color: var(--muted); cursor: pointer; text-align: center; transition: all .15s; }
.dropzone > i { font-size: 1.8rem; color: var(--brand); }
.dropzone b { color: var(--brand); }
.dropzone small { font-size: .76rem; }
.dropzone:hover, .dropzone.drag { border-color: #818cf8; background: var(--brand-soft); }
.attach-meter { height: 6px; border-radius: 99px; background: var(--surface-2); margin-top: 12px; overflow: hidden; }
.attach-meter-bar { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--brand-grad); transition: width .3s; }
.attach-meter-bar.over { background: linear-gradient(90deg, #f97316, #dc2626); }
.attach-status { font-size: .76rem; color: var(--muted); margin-top: 6px; }
.attach-status.over { color: var(--bad); font-weight: 600; }

.compose-foot { display: flex; gap: 10px; align-items: center; padding: 12px clamp(14px, 2.4vw, 28px) calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: var(--surface); }
.compose-topbar .btn-send { display: none; }
@media (max-width: 575.98px) { .compose-topbar .btn-send { display: inline-flex; } .compose-foot .btn-send { display: none; } }
.sending-overlay { position: absolute; inset: 0; z-index: 30; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; background: color-mix(in srgb, var(--surface) 75%, transparent); backdrop-filter: blur(4px); font-weight: 600; }
.sending-overlay[hidden] { display: none; }

/* ---------- Bildirimler ---------- */
.toast-stack { position: fixed; top: 78px; right: 16px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 32px)); }
.toast-item { display: flex; align-items: flex-start; gap: 10px; padding: 13px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); font-size: .9rem; animation: toastIn .35s cubic-bezier(.2, .9, .3, 1.2); }
.toast-item > i { font-size: 1.15rem; margin-top: 1px; }
.toast-item span { flex: 1; overflow-wrap: anywhere; }
.toast-success > i { color: var(--ok); }
.toast-danger > i { color: var(--bad); }
.toast-warning > i { color: var(--warn); }
.toast-info > i { color: var(--brand); }
.toast-close { border: 0; background: none; color: var(--muted); font-size: 1.2rem; line-height: 1; padding: 0 2px; }
.toast-item.hide { animation: toastOut .3s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px) scale(.97); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }
@media (max-width: 575.98px) { .toast-stack { top: auto; bottom: calc(90px + env(safe-area-inset-bottom)); left: 16px; right: 16px; max-width: none; } }

/* ---------- Giriş / kurulum ---------- */
.auth-page { background:
    radial-gradient(900px 500px at 0% 0%, rgba(99, 102, 241, .16), transparent 60%),
    radial-gradient(700px 500px at 100% 100%, rgba(217, 70, 239, .14), transparent 60%),
    var(--bg); min-height: 100vh; }
.auth-wrap { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-grid { width: 100%; max-width: 1040px; display: grid; grid-template-columns: 1fr; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-lg); background: var(--surface); border: 1px solid var(--border); }
@media (min-width: 992px) { .auth-grid { grid-template-columns: 1.1fr 1fr; min-height: 600px; } }
.auth-hero { position: relative; overflow: hidden; color: #fff; background: linear-gradient(150deg, #4338ca 0%, #6d28d9 50%, #c026d3 100%); padding: 48px; flex-direction: column; justify-content: space-between; }
.auth-hero::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .18), transparent 70%); right: -180px; top: -160px; }
.auth-hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .14) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(180deg, transparent, #000 60%); opacity: .5; }
.auth-hero-inner { position: relative; z-index: 1; }
.auth-hero .brand { color: #fff; }
.auth-hero .brand-mark { background: rgba(255, 255, 255, .18); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
.auth-hero h2 { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin: 44px 0 14px; }
.auth-hero p { opacity: .85; max-width: 420px; }
.auth-points { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.auth-points li { display: flex; gap: 12px; align-items: center; font-weight: 500; }
.auth-points i { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .16); }
.auth-hero-art { position: relative; z-index: 1; height: 170px; margin-top: 30px; }
.float-card { position: absolute; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: rgba(255, 255, 255, .95); color: #1e1b4b; box-shadow: 0 18px 40px -12px rgba(30, 27, 75, .5); animation: float 6s ease-in-out infinite; }
.float-card i { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: var(--brand-grad); }
.float-card span { display: flex; flex-direction: column; line-height: 1.25; font-size: .85rem; }
.float-card small { color: #64748b; }
.fc-1 { left: 0; top: 0; }
.fc-2 { right: 10px; top: 46px; animation-delay: -2s; }
.fc-3 { left: 70px; bottom: 0; animation-delay: -4s; }
@keyframes float { 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .float-card, .toast-item { animation: none; } }
.auth-card { padding: clamp(28px, 5vw, 56px); display: flex; flex-direction: column; justify-content: center; background: var(--surface); }
.auth-wrap > .auth-card { width: 100%; max-width: 460px; border-radius: 26px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.auth-wrap > .auth-card-wide { max-width: 780px; }
.pw-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); font-size: 1.1rem; padding: 6px; z-index: 5; }
.error-badge { font-size: 3.6rem; font-weight: 800; letter-spacing: -.04em; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.req-list { display: flex; flex-wrap: wrap; gap: 8px; }
.req { font-size: .78rem; font-weight: 600; padding: 5px 10px; border-radius: 99px; }
.req.ok { background: rgba(22, 163, 74, .1); color: var(--ok); }
.req.bad { background: rgba(220, 38, 38, .1); color: var(--bad); }

.profile-wrap { max-width: 760px; margin: 0 auto; padding: 28px 16px 60px; }
.profile-head { display: flex; gap: 18px; align-items: center; }
.profile-box { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1px solid var(--border); color: var(--text); flex-wrap: wrap; }
.profile-box:hover { border-color: var(--border-strong); color: var(--text); background: var(--hover); }
.profile-box > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.profile-box small { color: var(--muted); }

/* ---------- Yardımcılar ---------- */
.plain-text { white-space: pre-wrap; }
@media (max-width: 991.98px) {
    .topbar { min-height: 60px; }
    .page-body { padding-top: 18px; }
}
@media (max-width: 575.98px) {
    .panel { padding: 16px; border-radius: 14px; }
    .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-card { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
    .stat-icon { width: 42px; height: 42px; flex-basis: 42px; font-size: 1.1rem; border-radius: 13px; }
    .stat-body strong { font-size: 1.3rem; }
    .reader { border-radius: 16px; }
    .reader-scroll { padding: 8px; }
    .filter-bar .seg { width: 100%; }
    .search-field-sm .form-control { width: 100%; }
    .panel-head .search-field-sm { width: 100%; }
}
@media print {
    .sidebar, .topbar, .list-pane, .fab, .quick-reply, .toast-stack { display: none !important; }
}
