/* COREMAIL uygulama katmanı — kullanıcı paneli, yönetim, webmail, giriş ekranları (core.css üzerine) */

/* ================================================================ panel iskeleti */
.layout-panel { min-height: 100vh; }
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: calc(100vh - var(--demo-h, 0px)); }
.has-demo { --demo-h: 32px; }

.sidebar {
    position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
    background: var(--surface); border-right: 1px solid var(--border); z-index: 30;
}
.has-demo .sidebar { height: calc(100vh - 32px); top: 0; }
.sb-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 12px 18px; }
.sb-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin: 2px 12px 8px; padding: 3px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); }
.sb-switch a { display: flex; align-items: center; justify-content: center; gap: 6px; height: 28px; border-radius: 6px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.sb-switch a:hover { color: var(--text); }
.sb-switch a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.sb-nav { flex: 1; overflow-y: auto; padding: 4px 10px 12px; }
.sb-group + .sb-group { margin-top: 14px; }
.sb-label { padding: 0 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.sb-item {
    position: relative; display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px;
    border-radius: var(--radius-sm); color: var(--text-2); font-size: 13.5px; font-weight: 450; transition: background .12s, color .12s;
}
.sb-item .ic { color: var(--faint); transition: color .12s; }
.sb-item:hover { background: var(--hover); color: var(--text); }
.sb-item:hover .ic { color: var(--text-2); }
.sb-item.active { background: var(--surface-2); color: var(--text); font-weight: 550; box-shadow: inset 0 0 0 1px var(--border); }
.sb-item.active .ic { color: var(--accent); }
.sb-count { margin-left: auto; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.sb-foot { border-top: 1px solid var(--border); padding: 12px; }
.user-card { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: var(--radius); }
.avatar {
    width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none;
    font-size: 12.5px; font-weight: 600; color: #fff; background: var(--ink); letter-spacing: .02em;
}
.avatar-lg { width: 40px; height: 40px; font-size: 14px; }
.user-card .who { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.user-card .who strong { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-card .who small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-card form { display: flex; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
    position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 28px;
    background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--border);
}
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); min-width: 0; }
.crumbs a:hover { color: var(--text); }
.crumbs .sep { color: var(--faint); }
.crumbs strong { color: var(--text); font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topbar .menu-btn { display: none; margin-left: -8px; }
.mode-pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 500; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); }
.mode-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.mode-pill.demo::before { background: var(--accent); }
.content { width: 100%; max-width: 1240px; margin: 0 auto; padding: 28px 28px 64px; }
.backdrop { display: none; }

/* ================================================================ sayfa başlığı */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head .eyebrow { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.page-head h1 { font-size: 26px; font-weight: 600; letter-spacing: -.025em; }
.page-head h1 .serif { font-size: 1.32em; letter-spacing: -.012em; font-weight: 400; }
.page-head p { margin: 6px 0 0; color: var(--muted); max-width: 60ch; }
.actions, .inline-forms { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-forms form, form.inline { display: inline-flex; }

/* ================================================================ kartlar */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); margin-bottom: 20px; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-head h2, .card-head h3 { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; margin: 0; }
.card-head .sub { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.card-body { padding: 20px; }
.card-body > :last-child { margin-bottom: 0; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card-flush .table-wrap { margin: 0; padding: 0; }
.card-accent { border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow); }
.card-accent .card-head { border-bottom-color: var(--accent-line); }
.card-danger { border-color: var(--danger-line); }
.card-danger .card-head h3 { color: var(--danger); }
.section-title { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin: 22px 0 10px; }
.section-title:first-child { margin-top: 0; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.stack { display: flex; flex-direction: column; min-width: 0; }
.stack > .card:last-child { margin-bottom: 0; }

/* istatistikler */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-bottom: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.stat { padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; color: var(--text); text-decoration: none; position: relative; transition: background .15s; }
.stat + .stat { border-left: 1px solid var(--border); }
a.stat:hover { background: var(--hover); }
.stat-label { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.stat-value { font-size: 26px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-value small { font-size: 15px; color: var(--faint); font-weight: 500; letter-spacing: 0; }
.stat-foot { font-size: 12px; color: var(--muted); }
.stat-foot.warn { color: var(--warn); }
.meter { height: 4px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: 4px; }
.meter > i { display: block; height: 100%; border-radius: 99px; background: var(--ink); }

/* boş durum */
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty-icon { width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--faint); }
.empty h3 { color: var(--text); font-size: 15px; margin-bottom: 4px; }
.empty p { margin: 0 auto 16px; max-width: 42ch; font-size: 13.5px; }

/* tanım listesi */
.dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0; margin: 0; font-size: 13.5px; }
.dl dt, .dl dd { padding: 10px 0; border-bottom: 1px dashed var(--border); margin: 0; }
.dl dt { color: var(--muted); padding-right: 24px; }
.dl dd { overflow-wrap: anywhere; text-align: right; }
.dl dt:last-of-type, .dl dd:last-of-type { border-bottom: 0; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.rows li:last-child { border-bottom: 0; }
.rows .main-col { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.rows .main-col strong { font-weight: 550; font-size: 13.5px; }
.rows .main-col small { color: var(--muted); font-size: 12.5px; }
.bullets { padding-left: 18px; margin: 0; color: var(--text-2); }
.bullets li { margin-bottom: 6px; }
.bullets li::marker { color: var(--faint); }

/* tablolar */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 500; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table th:first-child, .table td:first-child { padding-left: 20px; }
.table th:last-child, .table td:last-child { padding-right: 20px; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: var(--hover); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .strong { font-weight: 550; color: var(--text); }
.table .sub { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.table-compact td { padding: 9px 14px; font-size: 13px; }
.table td .btn + .btn, .table td form + .btn, .table td form + form, .table td .btn + form { margin-left: 4px; }
.cell-user { display: flex; align-items: center; gap: 10px; }
.cell-user .avatar { width: 28px; height: 28px; font-size: 11px; }
.toolbar { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; flex: 1; }
.filters input, .filters select { width: auto; flex: 0 1 220px; min-width: 150px; height: 34px; font-size: 13.5px; }
.search-input { position: relative; flex: 0 1 260px; }
.search-input .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search-input input { padding-left: 34px; width: 100%; }
.pagination { display: flex; gap: 4px; justify-content: center; padding: 14px; border-top: 1px solid var(--border); }
.pagination a { min-width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); font-size: 13px; background: var(--surface); }
.pagination a:hover { background: var(--hover); }
.pagination a.active { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.import-form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.import-form select, .import-form input { width: auto; flex: 1 1 150px; height: 32px; font-size: 13px; }
.inline-checks { display: flex; gap: 16px; flex-wrap: wrap; }

/* kota */
.quota { margin: 2px 0; }
.quota-track { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.quota-fill { height: 100%; background: var(--ink); border-radius: 99px; transition: width .5s var(--ease); min-width: 3px; }
.quota.warn .quota-fill { background: var(--warn); }
.quota.danger .quota-fill { background: var(--danger); }
.quota-text { font-size: 12px; color: var(--muted); margin-top: 7px; display: flex; justify-content: space-between; gap: 8px; font-variant-numeric: tabular-nums; }

/* posta kutusu kartları */
.mb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; padding: 20px; }
.mb-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; background: var(--surface); display: flex; flex-direction: column; gap: 14px; transition: border-color .15s, box-shadow .15s; }
.mb-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.mb-card-top { display: flex; align-items: flex-start; gap: 12px; }
.mb-icon { width: 36px; height: 36px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--text-2); flex: none; }
.mb-card-top .addr { font-family: var(--mono); font-size: 13px; font-weight: 500; overflow-wrap: anywhere; line-height: 1.35; }
.mb-card-top .meta { font-size: 12px; color: var(--muted); margin-top: 3px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mb-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.unread-dot { display: inline-flex; align-items: center; gap: 5px; color: var(--accent-text); font-weight: 500; }
.unread-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* son iletiler listesi */
.msg-rows { list-style: none; margin: 0; padding: 0; }
.msg-rows li a { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--border); transition: background .1s; }
.msg-rows li:last-child a { border-bottom: 0; }
.msg-rows li a:hover { background: var(--hover); }
.msg-rows .avatar { width: 32px; height: 32px; font-size: 12px; }
.msg-rows .txt { min-width: 0; }
.msg-rows .txt strong { display: block; font-size: 13.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-rows .txt span { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-rows .unread strong::after { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-left: 7px; vertical-align: 2px; }
.msg-rows time { font-size: 12px; color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; }

.copy-box { display: flex; gap: 10px; align-items: center; padding: 10px 10px 10px 14px; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius); flex-wrap: wrap; }
.copy-box code { flex: 1; border: 0; background: none; font-size: 13px; word-break: break-all; padding: 0; color: var(--text); }
pre.code { background: #171412; color: #E7E5E4; padding: 18px 20px; border-radius: var(--radius); overflow-x: auto; font: 12.5px/1.7 var(--mono); margin: 0 0 14px; border: 1px solid #2A2623; }
pre.code .c { color: #8A817A; }
pre.code .s { color: #FDBA8C; }
.checklist { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; background: var(--surface); font-size: 13.5px; }
.checklist li .ic { margin-top: 2px; }
.checklist li.ok .ic { color: var(--ok); }
.checklist li.fail { background: var(--danger-soft); }
.checklist li.fail .ic { color: var(--danger); }
.checklist small { display: block; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }

.sticky-actions { position: sticky; bottom: 0; margin: 0 -28px; padding: 14px 28px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; z-index: 5; }
.settings-nav { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.settings-nav a { padding: 10px 12px; font-size: 13.5px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.settings-nav a:hover { color: var(--text); }
.settings-nav a.on { color: var(--text); border-bottom-color: var(--accent); font-weight: 550; }
.autofill { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; padding: 14px; margin-bottom: 20px; border-radius: var(--radius); background: var(--surface-2); border: 1px dashed var(--border-strong); }
.autofill .field { flex: 1 1 240px; }
.autofill .hint { flex-basis: 100%; margin: 0; }
.conn-col { padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); display: flex; flex-direction: column; gap: 14px; }
.conn-col h4 { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.conn-col h4 .ic { color: var(--accent); }
.plan-edit { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 14px; background: var(--surface); }
.plan-edit h4 { font-size: 13px; color: var(--muted); font-weight: 500; }

/* ================================================================ giriş ekranları */
.layout-auth { min-height: 100vh; background: var(--bg); }
.auth-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); min-height: calc(100vh - var(--demo-h, 0px)); }
.auth-side { display: flex; flex-direction: column; padding: 28px 40px; }
.auth-side .brand { align-self: flex-start; }
.auth-form-wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; width: 100%; max-width: 380px; margin: 0 auto; padding: 40px 0; }
.auth-form-wrap.wide { max-width: 560px; }
.auth-form-wrap h1 { font-family: var(--serif); font-weight: 400; font-size: 40px; letter-spacing: -.02em; line-height: 1.05; margin-bottom: 10px; }
.auth-form-wrap .lead { color: var(--muted); margin-bottom: 28px; }
.auth-switch { margin: 22px 0 0; font-size: 13.5px; color: var(--muted); }
.auth-switch a { color: var(--text); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-strong); }
.auth-legal { font-size: 12px; color: var(--faint); display: flex; gap: 14px; flex-wrap: wrap; }
.auth-legal a:hover { color: var(--text); }
.auth-art {
    position: relative; overflow: hidden; background: #171412; color: #E7E5E4; display: flex; flex-direction: column; justify-content: space-between;
    padding: 48px; border-left: 1px solid var(--border);
}
.auth-art::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at 70% 30%, #000 20%, transparent 75%); }
.auth-art::after { content: ""; position: absolute; width: 520px; height: 520px; right: -160px; top: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(240, 90, 40, .28), transparent 65%); }
.auth-art > * { position: relative; z-index: 1; }
.auth-quote { font-family: var(--serif); font-size: clamp(32px, 3.2vw, 46px); line-height: 1.08; letter-spacing: -.015em; color: #FAFAF9; max-width: 15ch; }
.auth-quote em { color: #FF8A63; }
.auth-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; color: #A8A29E; font-size: 14px; }
.auth-points li { display: flex; gap: 10px; align-items: center; }
.auth-points .ic { color: #FF8A63; }
.mock-stack { display: grid; gap: 8px; max-width: 440px; margin-top: 36px; }
.mock-row { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); }
.mock-row:nth-child(1) { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); }
.mock-row i { width: 30px; height: 30px; border-radius: 50%; background: #3A3531; display: block; }
.mock-row:nth-child(1) i { background: #F05A28; }
.mock-row b { display: block; height: 8px; border-radius: 4px; background: rgba(255,255,255,.55); width: 46%; margin-bottom: 7px; }
.mock-row s { display: block; height: 6px; border-radius: 4px; background: rgba(255,255,255,.18); width: 82%; }
.mock-row em { width: 34px; height: 6px; border-radius: 4px; background: rgba(255,255,255,.2); }
.auth-art-foot { font-size: 12.5px; color: #78716C; }
.error-page { max-width: 520px; margin: 0 auto; padding: 12vh 24px; text-align: center; }
.error-code { font-family: var(--serif); font-size: 120px; line-height: 1; color: var(--text); letter-spacing: -.04em; }
.error-code span { color: var(--accent); }
.error-page h1 { font-size: 22px; margin: 12px 0 8px; }
.error-page p { color: var(--muted); }
.error-page .actions { justify-content: center; margin-top: 24px; }

/* ================================================================ webmail */
.layout-mail { height: 100vh; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); }
.mail-app { flex: 1; min-height: 0; display: grid; grid-template-columns: 240px minmax(320px, 400px) minmax(0, 1fr); }
.mail-side { background: var(--bg); border-right: 1px solid var(--border); padding: 14px 12px; display: flex; flex-direction: column; gap: 14px; min-height: 0; overflow-y: auto; }
.mail-side-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 2px 6px; }
.mb-select { gap: 6px; }
.mb-select > span { font-size: 11px !important; letter-spacing: .06em; text-transform: uppercase; color: var(--faint) !important; font-weight: 600 !important; padding-left: 4px; }
.mb-select select { height: 36px; font-family: var(--mono); font-size: 12.5px; }
.folders { display: flex; flex-direction: column; gap: 1px; }
.folders button {
    display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; background: none; border: 0; border-radius: var(--radius-sm);
    color: var(--text-2); font: 450 13.5px var(--font); cursor: pointer; text-align: left; transition: background .12s, color .12s;
}
.folders button .ic { color: var(--faint); }
.folders button:hover { background: var(--hover); color: var(--text); }
.folders button.active { background: var(--surface); color: var(--text); font-weight: 550; box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.folders button.active .ic { color: var(--accent); }
.folders .count { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.folders button.active .count { color: var(--accent-text); }
.mail-side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--border); padding-top: 12px; }
.mail-side-foot a, .mail-side-foot .linklike { display: flex; gap: 10px; align-items: center; height: 32px; padding: 0 10px; font-size: 13px; border-radius: var(--radius-sm); color: var(--text-2); text-decoration: none; }
.mail-side-foot a:hover, .mail-side-foot .linklike:hover { background: var(--hover); color: var(--text); }
.mail-side-foot .ic { color: var(--faint); }
#side-quota { padding: 0 10px 10px; }
.mail-list { border-right: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.mail-list-head { display: flex; align-items: center; gap: 6px; padding: 14px 14px 10px 18px; }
.mail-list-head h2 { margin: 0; flex: 1; font-size: 16px; font-weight: 600; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search { display: flex; align-items: center; gap: 8px; margin: 0 14px 10px; padding: 0 12px; height: 36px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--faint); transition: border-color .15s, box-shadow .15s, background .15s; }
.search:focus-within { border-color: var(--accent); box-shadow: var(--focus); background: var(--surface); }
.search input { border: 0; background: transparent; padding: 0; height: 100%; box-shadow: none !important; font-size: 13.5px; }
.msg-list { flex: 1; overflow-y: auto; min-height: 0; border-top: 1px solid var(--border); }
.msg-item {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; padding: 13px 16px 13px 22px; border: 0; border-bottom: 1px solid var(--border);
    cursor: pointer; position: relative; background: var(--surface); width: 100%; text-align: left; font: inherit; color: inherit; transition: background .1s;
}
.msg-item:hover { background: var(--hover); }
.msg-item.active { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--ink); }
.msg-item.unread::before { content: ""; position: absolute; left: 9px; top: 19px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.msg-item .from { font-size: 13.5px; font-weight: 450; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-item.unread .from { font-weight: 600; color: var(--text); }
.msg-item .date { font-size: 12px; color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.msg-item .subj { grid-column: 1 / -1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; display: flex; gap: 6px; align-items: center; color: var(--text); }
.msg-item.unread .subj { font-weight: 550; }
.msg-item .subj .ic { color: var(--faint); }
.msg-item .subj span { overflow: hidden; text-overflow: ellipsis; }
.msg-item .snip { grid-column: 1 / -1; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pager { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pager:empty { display: none; }
.mail-read { background: var(--surface); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.reader-empty, .state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--muted); padding: 32px; text-align: center; font-size: 13.5px; }
.reader-empty .empty-icon { margin: 0; }
.state .btn { margin-top: 6px; }
.reader-toolbar { display: flex; gap: 4px; align-items: center; height: 54px; padding: 0 14px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.reader-toolbar .spacer { flex: 1; }
.reader-toolbar select { width: auto; height: 30px; font-size: 13px; padding-left: 10px; }
.reader-scroll { flex: 1; overflow-y: auto; padding: 28px 36px 40px; min-height: 0; }
.reader-subject { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.15; letter-spacing: -.015em; margin: 0 0 20px; overflow-wrap: anywhere; }
.reader-meta { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.reader-meta .who { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.5; }
.reader-meta .who strong { font-weight: 600; }
.reader-meta .who div { overflow-wrap: anywhere; }
.reader-body-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.7; color: var(--text); max-width: 72ch; }
.reader-frame { width: 100%; border: 1px solid var(--border); min-height: 200px; background: #fff; border-radius: var(--radius); }
.html-note { font-size: 12px; color: var(--muted); margin: 0 0 10px; display: flex; gap: 6px; align-items: center; }
.attachments { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.att { display: inline-flex; align-items: center; gap: 10px; padding: 9px 14px 9px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); font-size: 13px; max-width: 100%; box-shadow: var(--shadow-sm); transition: border-color .15s; }
.att:hover { border-color: var(--border-strong); }
.att .file-ic { width: 30px; height: 30px; border-radius: 7px; background: var(--accent-soft); color: var(--accent-text); display: flex; align-items: center; justify-content: center; flex: none; }
.att span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.att small { color: var(--muted); display: block; font-weight: 400; }
.skeleton { padding: 15px 22px; border-bottom: 1px solid var(--border); }
.skeleton i { display: block; height: 9px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.3s infinite; margin: 7px 0; }
@keyframes shimmer { to { background-position: -200% 0; } }
.spinner { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--ink); animation: spin .8s linear infinite; }

.compose { width: min(720px, calc(100vw - 24px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: var(--radius-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow-pop); }
.compose[open] { animation: pop .22s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.compose::backdrop { background: rgba(23, 20, 18, .42); backdrop-filter: blur(2px); }
.compose form { display: flex; flex-direction: column; max-height: calc(100vh - 48px); }
.compose header, .compose footer { display: flex; align-items: center; gap: 8px; padding: 12px 16px 12px 20px; }
.compose header { border-bottom: 1px solid var(--border); justify-content: space-between; }
.compose header h3 { margin: 0; font-size: 14.5px; }
.compose footer { border-top: 1px solid var(--border); flex-wrap: wrap; background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.compose footer .spacer { flex: 1; }
.compose-body { padding: 0 20px 14px; overflow-y: auto; }
.compose-row { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); }
.compose-row label { width: 54px; color: var(--muted); font-size: 13px; flex: none; }
.compose-row input { border: 0; height: 44px; padding: 0; box-shadow: none !important; background: transparent; }
.compose textarea { border: 0; padding: 16px 0; min-height: 260px; box-shadow: none !important; background: transparent; font-size: 14.5px; line-height: 1.65; }
.compose-files, .compose-fwd { display: flex; flex-wrap: wrap; gap: 6px; }
.compose-fwd { margin-top: 8px; font-size: 12.5px; color: var(--muted); align-items: center; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 4px 0 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px; }
.file-chip button { border: 0; background: none; cursor: pointer; color: var(--muted); display: flex; padding: 3px; border-radius: 50%; }
.file-chip button:hover { background: var(--surface-3); color: var(--text); }
.file-btn { cursor: pointer; }
.only-mobile { display: none !important; }
.side-backdrop { display: none; }

/* ================================================================ duyarlı */
@media (max-width: 1180px) {
    .grid-main { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat:nth-child(3) { border-left: 0; }
    .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
    .grid-3 { grid-template-columns: 1fr; }
    .mail-app { grid-template-columns: 220px minmax(280px, 340px) minmax(0, 1fr); }
}
@media (max-width: 960px) {
    .auth-split { grid-template-columns: 1fr; }
    .auth-art { display: none; }
}
@media (max-width: 900px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { position: fixed; left: 0; top: 0; bottom: 0; height: 100vh !important; width: 280px; transform: translateX(-100%); transition: transform .25s var(--ease); box-shadow: none; }
    body.sidebar-open .sidebar { transform: none; box-shadow: var(--shadow-pop); }
    body.sidebar-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(23, 20, 18, .4); z-index: 25; }
    .topbar { padding: 0 16px; }
    .topbar .menu-btn { display: inline-flex; }
    .content { padding: 20px 16px 48px; }
    .sticky-actions { margin: 0 -16px; padding: 12px 16px; }
    .grid-2 { grid-template-columns: 1fr; }
    .page-head h1 { font-size: 22px; }

    .only-mobile { display: inline-flex !important; }
    .mail-app { grid-template-columns: 1fr; }
    .mail-side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 40; transform: translateX(-100%); transition: transform .25s var(--ease); }
    .mail-app.side-open .mail-side { transform: none; box-shadow: var(--shadow-pop); }
    .mail-app.side-open ~ .side-backdrop { display: block; position: fixed; inset: 0; background: rgba(23, 20, 18, .4); z-index: 35; }
    .mail-app[data-view="list"] .mail-read { display: none; }
    .mail-app[data-view="read"] .mail-list { display: none; }
    .mail-list { border-right: 0; }
    .reader-scroll { padding: 20px 18px 32px; }
    .reader-subject { font-size: 24px; }
}
@media (max-width: 560px) {
    .stats { grid-template-columns: 1fr 1fr; }
    .stat { padding: 14px 16px; }
    .stat-value { font-size: 22px; }
    .auth-side { padding: 20px; }
    .auth-form-wrap h1 { font-size: 34px; }
    .filters input, .filters select, .search-input { flex: 1 1 100%; }
    .dl { grid-template-columns: 1fr; }
    .dl dt { border-bottom: 0; padding-bottom: 0; }
    .dl dd { text-align: left; padding-top: 2px; }
    .card-head, .card-body, .toolbar { padding-left: 16px; padding-right: 16px; }
    .mb-grid { padding: 16px; }
    .compose { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; }
    .compose form { max-height: 100dvh; height: 100%; }
    .compose-body { flex: 1; }
    .compose footer { border-radius: 0; }
}
@media (max-width: 900px) { .sidebar .menu-close { display: inline-flex !important; } }

/* ================================================================ düzeltmeler v2: tablolar, boş durumlar, pencereler */
.empty p { margin-left: auto !important; margin-right: auto !important; }
.empty .btn { margin-top: 4px; }
.table td.tnum, .table td.nowrap, .table .tnum { white-space: nowrap; }
.table td.cell-actions { white-space: nowrap; text-align: right; width: 1%; }
.cell-actions > * + * { margin-left: 6px; }
.cell-actions form { display: inline-flex; }
.table td.cell-main { min-width: 200px; }
.status-stack { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.table .mono.strong { font-size: 13px; }
.table th.right, .table td.right { text-align: right; }

.modal { width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: var(--radius-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow-pop); overflow: hidden; }
.modal[open] { animation: pop .22s var(--ease); display: flex; flex-direction: column; }
.modal::backdrop { background: rgba(23, 20, 18, .42); backdrop-filter: blur(2px); }
.modal form.modal-form { display: flex; flex-direction: column; min-height: 0; max-height: calc(100vh - 48px); gap: 0; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--border); }
.modal-head h2 { font-size: 16px; font-weight: 600; margin: 0; }
.modal-head p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.modal-body { padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); }
@media (max-width: 560px) {
    .modal { width: 100vw; max-width: 100vw; max-height: 100dvh; height: auto; margin: auto 0 0; border-radius: 16px 16px 0 0; }
}
.sticky-actions { margin: 4px 0 20px; padding: 10px 12px 10px 18px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: 0 10px 30px -12px rgba(28, 25, 23, .18); bottom: 16px; align-items: center; }
.sticky-actions::before { content: "Değişiklikleri kaydetmeyi unutmayın"; margin-right: auto; font-size: 13px; color: var(--muted); }
@media (max-width: 900px) { .sticky-actions { margin: 4px 0 20px; padding: 10px 12px; } .sticky-actions::before { display: none; } }

/* ================================================================ mobil: tablolar etiketli kartlara dönüşür */
@media (max-width: 720px) {
    .table thead { display: none; }
    .table, .table tbody, .table tr { display: block; width: 100%; }
    .table tr { padding: 14px 16px; border-bottom: 1px solid var(--border); }
    .table tbody tr:last-child { border-bottom: 0; }
    .table tbody tr:hover { background: transparent; }
    .table td { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 5px 0 !important; border: 0 !important; text-align: right; width: 100%; min-width: 0 !important; white-space: normal; }
    .table td::before { content: attr(data-label); color: var(--muted); font-size: 12.5px; text-align: left; flex: none; }
    .table td:first-child, .table td.cell-main { display: block; text-align: left; padding-bottom: 8px !important; }
    .table td:first-child::before, .table td.cell-main::before, .table td[colspan]::before { display: none; }
    .table td.cell-actions { justify-content: flex-start; flex-wrap: wrap; padding-top: 10px !important; text-align: left; }
    .table td.cell-actions::before { display: none; }
    .table td:has(input:not([type=checkbox]):not([type=hidden]), select, textarea) { display: block; text-align: left; }
    .table td:has(input:not([type=checkbox]):not([type=hidden]), select, textarea)::before { display: block; margin-bottom: 6px; }
    .table .cell-user { justify-content: flex-end; text-align: right; }
    .table td:first-child .cell-user { justify-content: flex-start; text-align: left; }
    .table-wrap { overflow: visible; }
    .toolbar { padding: 12px 16px; }
    .topbar .mode-pill { display: none; }
    .demo-bar .long { display: none; }
}
@media (min-width: 721px) { .demo-bar .short { display: none; } }
.mail-notifications { position: relative; font-size: 13px; }
.mail-notifications > summary { display: flex; gap: 8px; align-items: center; cursor: pointer; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; list-style: none; background: var(--surface); color: var(--text); }
.mail-notifications > summary::-webkit-details-marker { display: none; }
.mail-notifications [hidden] { display: none; }
.notification-panel { position: absolute; top: calc(100% + 8px); right: 0; width: min(340px, calc(100vw - 32px)); padding: 16px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-pop); z-index: 90; max-height: 65vh; overflow-y: auto; }
.notification-panel p { margin: 10px 0; line-height: 1.5; }
.notification-mailbox { display: flex; flex-direction: column; gap: 3px; padding: 10px 0; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.notification-mailbox small { color: var(--muted); }
.mail-side .notification-panel { position: static; width: 100%; margin-top: 8px; max-height: 40vh; padding: 12px; }
.notification-panel .btn { white-space: normal; height: auto; min-height: 32px; }
.mailbox-address { margin: 0; padding: 0 16px 8px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
@media (max-width: 720px) {
    .table td.cell-actions { width: 100%; }
    .table td.nowrap, .table td.tnum { white-space: normal; }
    .table td.mono { word-break: break-all; text-align: left; }
}
