@font-face {
  font-family: 'Material Icons';
  src: url('assets/fonts/MaterialIcons-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/Inter-Variable.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --primary: #103e91;
  --primary-hover: #0b2d6b;
  --primary-light: #2b61b8;
  --primary-soft: #e7efff;
  --primary-faint: #f3f6ff;
  --primary-gradient: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  --background: #f4f6f4;
  --surface: #ffffff;
  --surface-muted: #f0f3f0;
  --border: #dde4df;
  --border-strong: #cbd5ce;
  --text: #1b2721;
  --muted: #68766f;
  --danger: #c43838;
  --warning: #e09b28;
  --shadow: 0 16px 40px rgba(16, 62, 145, .10);
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }

html, body, #app { width: 100%; min-width: 320px; height: 100%; margin: 0; }

@supports (height: 100dvh) {
  html, body, #app { height: 100dvh; }
}

body {
  overflow: hidden;
  background: var(--background);
  color: var(--text);
  font-family: 'Inter', 'Segoe UI Variable', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  font-weight: 350;
  font-optical-sizing: auto;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .56; }
button, input, select, textarea { transition: border-color .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease; }
:focus-visible { outline: 3px solid rgba(16, 62, 145, .22); outline-offset: 2px; }

* { scrollbar-width: thin; scrollbar-color: #a7b2ac transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: #a7b2ac; border: 2px solid transparent; border-radius: 999px; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: #86958d; border: 2px solid transparent; background-clip: padding-box; }

.mi {
  display: inline-block;
  font-family: 'Material Icons';
  font-size: 22px;
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

.app-loading {
  height: 100%; display: grid; place-items: center; color: var(--primary);
}

.loading-state { display: grid; place-items: center; gap: 14px; padding: 22px; color: var(--muted); font-weight: 350; }
.loading-gif { width: 48px; height: 48px; display: block; object-fit: contain; }
.loading-gif-inline { width: 20px; height: 20px; object-fit: contain; }
.mail-loader {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid #dbe6fa; border-top-color: var(--primary);
  box-shadow: 0 5px 16px rgba(16, 62, 145, .08);
  animation: loader-spin 5.8s cubic-bezier(.45, 0, .55, 1) infinite alternate;
}

.spinner {
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid rgba(16, 62, 145, .2); border-top-color: var(--primary);
  animation: loader-spin 4.2s cubic-bezier(.45, 0, .55, 1) infinite alternate;
}
.spinner-small { width: 18px; height: 18px; border-width: 2px; }
.btn-primary .spinner { border-color: rgba(255, 255, 255, .32); border-top-color: #fff; }
@keyframes loader-spin { to { transform: rotate(180deg); } }

.btn {
  min-height: 46px; border: 0; border-radius: var(--radius-md); padding: 0 20px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 620; letter-spacing: -.005em; transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary-gradient); color: white; box-shadow: 0 8px 18px rgba(16, 62, 145, .18); }
.btn-primary.is-sending { cursor: wait; opacity: .84; transform: none; }
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%); box-shadow: 0 10px 22px rgba(16, 62, 145, .24); }
.btn-tonal { background: var(--primary-soft); color: var(--primary); }
.btn-outline { background: white; border: 1px solid var(--border-strong); color: var(--primary); }
.btn-danger { background: #fff0f0; color: var(--danger); }
.btn-small { min-height: 38px; padding: 0 14px; border-radius: 13px; }
.icon-btn {
  width: 42px; height: 42px; border: 0; border-radius: 13px; background: transparent;
  display: inline-grid; place-items: center; color: #3d4a44;
}
.icon-btn:hover { background: var(--surface-muted); color: var(--primary); }
.icon-btn.active { color: var(--warning); }
.profile-button {
  width: 44px; height: 44px; flex: 0 0 44px; border: 0;
  border-radius: 14px; overflow: hidden;
  background: #fff;
  display: grid; place-items: center; position: relative; padding: 3px;
  box-shadow: 0 2px 10px rgba(16,62,145,.16), 0 0 0 1px rgba(16,62,145,.08);
}
.profile-button img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  border-radius: 10px;
}
.profile-button:hover { opacity: .9; }
.account-sheet-backdrop { display: none; }

.login-shell { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(480px, 610px); background: white; }
.brand-panel {
  min-height: 680px; padding: 58px 64px; display: flex; flex-direction: column;
  background: linear-gradient(145deg, #f4f7ff 0%, #e5edfc 100%);
}
.brand-logo { width: min(300px, 48%); height: 105px; object-fit: contain; object-position: left center; }
.brand-copy { margin: auto 0; }
.brand-copy h1 { margin: 0; font-size: clamp(38px, 3.2vw, 52px); line-height: 1.12; letter-spacing: -1.5px; font-weight: 680; }
.brand-copy p { max-width: 760px; margin: 24px 0 34px; color: var(--muted); font-size: 17px; line-height: 1.6; }
.feature-row { display: flex; flex-wrap: wrap; gap: 12px; }
.feature-pill { display: inline-flex; align-items: center; gap: 9px; background: white; border: 1px solid var(--border); border-radius: 999px; padding: 10px 16px; font-weight: 590; color: var(--muted); }
.feature-pill .mi { color: var(--primary); font-size: 19px; }
.partner-logos { display: flex; align-items: center; justify-content: center; gap: 18px; min-height: 60px; }
.partner-logos img { max-width: 190px; width: 29%; height: 48px; object-fit: contain; }
.partner-logos .divider { width: 1px; height: 40px; background: var(--border-strong); }

.login-panel { overflow-y: auto; padding: 42px 38px; display: flex; align-items: center; background: var(--surface); }
.login-form { width: 100%; max-width: 550px; margin: auto; }
.compact-logo { display: none; width: 230px; height: 90px; object-fit: contain; margin: 0 auto 30px; }
.login-form h2 { font-size: 25px; margin: 0 0 10px; letter-spacing: -.55px; font-weight: 670; }
.login-lead { color: var(--muted); line-height: 1.55; margin: 0 0 26px; }
.saved-label, .section-label { color: var(--primary); font-size: 11px; font-weight: 680; letter-spacing: 1.05px; }
.saved-accounts { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 20px; }
.saved-chip { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 7px 12px 7px 7px; display: flex; gap: 8px; align-items: center; }
.saved-chip span:first-child { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 680; }
.field { position: relative; margin-bottom: 14px; }
.field label { position: absolute; z-index: 1; top: -8px; left: 17px; background: white; padding: 0 7px; color: var(--muted); font-size: 12px; }
.field .mi.prefix { position: absolute; left: 15px; top: 18px; color: #526159; }
.field input, .field select {
  width: 100%; min-height: 58px; border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  background: white; padding: 0 50px; outline: none;
}
.field select { padding-left: 16px; }
.field input:focus, .field select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(16, 62, 145, .09); }
.password-toggle { position: absolute; right: 8px; top: 8px; }
.remember-card { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface-muted); border-radius: 14px; margin: 6px 0 8px; }
.remember-card input { width: 20px; height: 20px; accent-color: var(--primary); }
.remember-card strong { display: block; margin-bottom: 3px; font-weight: 630; }
.remember-card small { color: var(--muted); }
.advanced-toggle { padding: 10px 8px; border: 0; background: transparent; color: var(--primary); display: flex; align-items: center; gap: 8px; }
.advanced-fields { display: none; background: var(--surface-muted); border-radius: var(--radius-md); padding: 16px; margin: 3px 0 10px; }
.advanced-fields.open { display: block; }
.server-title { font-size: 16px; font-weight: 670; margin: 3px 0 12px; }
.server-grid { display: grid; grid-template-columns: minmax(0, 1fr) 100px 140px; gap: 10px; margin-bottom: 18px; }
.server-grid .field { margin: 0; }
.server-grid .field input { padding: 0 15px; }
.form-error { display: none; padding: 14px 16px; border-radius: 14px; color: var(--danger); background: #fff0f0; line-height: 1.45; margin: 12px 0 4px; }
.form-error.show { display: block; }
.login-actions { display: grid; gap: 10px; margin-top: 20px; }
.login-partners { display: none; margin-top: 28px; }

.mail-shell { height: 100%; padding: 14px; display: grid; grid-template-columns: 292px minmax(390px, var(--list-pane-width, 500px)) minmax(480px, 1fr); gap: 14px; }
.pane { min-width: 0; min-height: 0; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; }
.sidebar { display: flex; flex-direction: column; }
.account-logo { height: 112px; padding: 22px; display: grid; place-items: center; }
.account-logo img { width: 100%; height: 64px; object-fit: contain; }
.sidebar-close, .sidebar-scrim { display: none; }
.sidebar-compose { margin: 0 14px 18px; }
.folder-heading { padding: 0 20px 10px; color: var(--muted); font-size: 11px; font-weight: 680; letter-spacing: 1.15px; }
.folder-list { flex: 1; overflow-y: auto; padding: 0 10px; }
.folder-item { width: 100%; min-height: 54px; border: 0; background: transparent; border-radius: 14px; padding: 0 13px; display: flex; align-items: center; gap: 13px; font-weight: 500; text-align: left; margin-bottom: 4px; }
.folder-item:hover { background: var(--surface-muted); }
.folder-item.selected { background: var(--primary-soft); color: var(--primary); }
.folder-item .label { flex: 1; }
.badge { min-width: 24px; height: 22px; border-radius: 999px; padding: 0 7px; display: grid; place-items: center; background: var(--primary); color: white; font-size: 11px; }
.account-switcher { position: relative; border-top: 1px solid var(--border); padding: 10px; }
.settings-shortcut-btn { display: none; }
.account-switcher-btn { width: 100%; border: 1px solid var(--border); background: var(--surface-muted); border-radius: var(--radius-md); padding: 9px 10px; display: flex; align-items: center; gap: 10px; text-align: left; }
.switch-logo { width: 42px; height: 42px; border-radius: 12px; padding: 5px; background: white; object-fit: contain; }
.switch-text { min-width: 0; flex: 1; }
.switch-text strong, .switch-text small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.switch-text small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.account-menu { position: absolute; z-index: 50; display: none; left: 10px; right: 10px; bottom: 76px; background: white; border: 1px solid var(--border); border-radius: 16px; padding: 8px; box-shadow: var(--shadow); max-height: 420px; overflow-y: auto; }
.account-menu.open { display: block; }
.account-menu-title { padding: 7px 10px; color: var(--primary); font-size: 11px; font-weight: 680; letter-spacing: .8px; }
.account-option { width: 100%; border: 0; background: transparent; border-radius: 12px; padding: 8px; display: flex; align-items: center; gap: 10px; text-align: left; }
.account-option:hover, .account-option.selected { background: var(--primary-soft); }
.account-option img { width: 35px; height: 35px; padding: 4px; object-fit: contain; border-radius: 10px; background: var(--surface-muted); }
.account-option span:not(.mi) { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.account-option.danger { color: var(--danger); }
.menu-divider { height: 1px; background: var(--border); margin: 6px 0; }

.list-pane { position: relative; display: flex; flex-direction: column; }
.list-pane-resizer { position: absolute; z-index: 5; top: 0; right: -9px; width: 18px; height: 100%; padding: 0; border: 0; background: transparent; cursor: col-resize; }
.list-pane-resizer::after { content: '⋮'; position: absolute; top: 50%; left: 4px; width: 10px; height: 42px; border-radius: 999px; color: rgba(16, 62, 145, .55); background: rgba(16, 62, 145, .10); font-size: 20px; font-weight: 700; line-height: 38px; text-align: center; transform: translateY(-50%); transition: color .16s ease, background .16s ease, height .16s ease; }
.list-pane-resizer:hover::after, body.resizing-list-pane .list-pane-resizer::after { height: 62px; background: var(--primary); }
body.resizing-list-pane { cursor: col-resize; user-select: none; }
.list-header { padding: 18px 14px 10px; border-bottom: 1px solid var(--border); }
.list-title-row { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 12px; }
.list-title-row h2 { margin: 0; font-size: 22px; font-weight: 660; letter-spacing: -.45px; }
.search-compose { height: 58px; border-radius: 18px; background: var(--surface-muted); display: flex; align-items: center; padding: 0 6px 0 13px; }
.search-compose > .mi { color: #405049; }
.search-compose input { min-width: 0; flex: 1; border: 0; background: transparent; outline: none; padding: 0 12px; font-size: 16px; }
.compose-round {
  width: 46px; height: 46px; border-radius: 15px; border: 0;
  background: var(--primary-gradient); color: #fff;
  display: grid; place-items: center; box-shadow: 0 8px 18px rgba(16, 62, 145, .22);
}
.search-compose .compose-round .mi { color: #fff; font-size: 21px; }
.compose-round:hover { opacity: .92; }
.filter-row { display: flex; align-items: center; gap: 7px; padding: 0; overflow-x: auto; border-bottom: 0; }
.filter { min-height: 38px; border: 1px solid var(--border); border-radius: 13px; background: white; padding: 0 15px; white-space: nowrap; font-weight: 430; }
.filter.selected { background: var(--primary-soft); color: var(--primary); border-color: #b8cbed; font-weight: 610; box-shadow: 0 4px 12px rgba(16, 62, 145, .07); }
.filter .mi { font-size: 18px; vertical-align: -3px; }
.message-list { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.filters-selection-row { display: flex; align-items: center; gap: 0; padding: 8px 14px; overflow-x: auto; border-bottom: 1px solid var(--border); scrollbar-width: none; }
.filters-selection-row::-webkit-scrollbar { display: none; }
.filter-divider { width: 1px; height: 26px; background: #d0d9e8; margin: 0 12px; flex-shrink: 0; }
.bulk-select-trigger { min-height: 38px; border: 1px solid #b9cceb; border-radius: 13px; background: #eef4ff; color: var(--primary); font-size: 14px; font-weight: 700; padding: 0 18px; cursor: pointer; flex-shrink: 0; }
.bulk-select-trigger:hover { background: #e3edff; }
.bulk-toolbar-active { display: flex; align-items: center; gap: 8px; flex: 1; }
.bulk-toolbar-active .bulk-count { color: var(--ink); font-weight: 650; font-size: 13px; }
.bulk-toolbar-active button { min-height: 32px; border: 1px solid #c6d4ec; border-radius: 9px; padding: 0 10px; display: inline-flex; align-items: center; gap: 5px; background: #fff; color: var(--primary); font-size: 12px; font-weight: 600; cursor: pointer; }
.bulk-toolbar-active button:hover { background: var(--primary-soft); }
.bulk-toolbar-active button.danger { color: #b42318; border-color: #f0b8b3; }
.bulk-toolbar-active button.danger:hover { background: #fff1f0; }
.bulk-select-all { flex: 0 0 auto; width: 24px; display: grid; place-items: center; cursor: pointer; }
.message-select { position: absolute; top: -4px; left: -4px; z-index: 2; display: grid; place-items: center; cursor: pointer; }
.bulk-select-all input, .message-select input { position: absolute; opacity: 0; pointer-events: none; }
.bulk-select-all .checkmark, .message-select .checkmark { width: 18px; height: 18px; display: grid; place-items: center; border: 1.5px solid #c8d4e5; border-radius: 5px; background: #fff; color: transparent; transition: background-color .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease; }
.message-row:hover .message-select .checkmark { border-color: #9aadc4; box-shadow: 0 1px 4px rgba(16, 62, 145, .12); }
.bulk-select-all .checkmark .mi, .message-select .checkmark .mi { display: none; }
.bulk-select-all input:checked + .checkmark, .message-select input:checked + .checkmark { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 3px 8px rgba(16, 62, 145, .25); transform: scale(1.04); }
.bulk-select-all input:checked + .checkmark::after, .message-select input:checked + .checkmark::after { content: '✓'; font-size: 14px; line-height: 1; font-weight: 800; }
.bulk-select-all input:focus-visible + .checkmark, .message-select input:focus-visible + .checkmark { outline: 3px solid rgba(16, 62, 145, .22); }
.message-row { width: 100%; border: 0; border-bottom: 1px solid #edf0ee; background: white; padding: 14px 8px 14px 14px; display: flex; align-items: flex-start; gap: 12px; text-align: left; transition: background-color .18s ease, box-shadow .18s ease; }
.message-row:hover { background: #f8faff; box-shadow: inset 3px 0 0 rgba(16, 62, 145, .22); }
.message-row.selected { background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); }
.message-row.is-selected { background: #eaf1ff; box-shadow: inset 3px 0 0 var(--primary); }
.avatar-wrap { position: relative; flex: 0 0 auto; }
.avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: #e8e3f2; color: var(--primary); font-size: 18px; font-weight: 680; }
.avatar-logo { position: absolute; width: 22px; height: 22px; right: -4px; bottom: -4px; border: 1px solid var(--border); border-radius: 50%; background: white; padding: 3px; object-fit: contain; }
.message-copy { min-width: 0; flex: 1; }
.message-line { display: flex; align-items: baseline; gap: 8px; line-height: 1.3; }
.message-line strong, .message-subject, .message-snippet { overflow: hidden; text-overflow: ellipsis; }
.message-line strong, .message-subject { white-space: nowrap; }
.message-line strong { font-weight: 360; }
.message-line time { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 300; flex: 0 0 auto; }
.message-subject { margin-top: 4px; font-weight: 340; line-height: 1.35; }
.message-snippet { color: var(--muted); font-weight: 300; line-height: 1.35; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.message-row.unread .message-line strong, .message-row.unread .message-subject { font-weight: 650; }
.message-actions { display: flex; flex-direction: column; margin-top: -6px; }
.message-actions .icon-btn { width: 35px; height: 35px; color: #45544c; }
.message-row.unread .message-actions .icon-btn:last-child { color: var(--primary); }
.empty-state { height: 100%; min-height: 260px; display: grid; place-items: center; padding: 30px; text-align: center; color: var(--muted); }
.empty-state .mi { width: 82px; height: 82px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-size: 40px; margin: auto; }
.empty-state h3 { color: var(--text); margin: 15px 0 7px; }
.load-error { display: grid; justify-items: center; gap: 8px; padding: 22px 14px; text-align: center; color: var(--muted); }
.load-error > .mi { color: var(--danger); font-size: 30px; }
.load-error strong { color: var(--text); font-weight: 620; }
.load-error p { max-width: 240px; margin: 0 0 5px; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }

.detail-pane { display: flex; flex-direction: column; position: relative; }
.detail-toolbar { min-height: 70px; padding: 10px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 6px; }
.detail-toolbar .spacer { flex: 1; }
.detail-scroll { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 28px; }
.message-title { margin: 0 0 24px; font-size: clamp(23px, 2vw, 29px); letter-spacing: -.65px; font-weight: 670; }
.sender-card { display: flex; align-items: flex-start; gap: 12px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.sender-card .avatar { flex: 0 0 auto; }
.sender-info { min-width: 0; flex: 1; }
.sender-info strong { display: block; font-size: 16px; margin: 3px 0 5px; font-weight: 630; }
.sender-info div { color: var(--muted); line-height: 1.45; word-break: break-word; }
.sender-card time { color: var(--muted); margin-top: 5px; white-space: nowrap; }
.mail-body { margin-top: 26px; min-height: 250px; }
.mail-frame { display: block; width: 100%; border: 0; min-height: 360px; overflow: hidden; background: white; }
.plain-body { white-space: pre-wrap; font-size: 16px; line-height: 1.65; word-break: break-word; }
.attachments { margin-top: 24px; }
.attachment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.attachment-card { border: 1px solid var(--border); background: var(--surface); border-radius: 12px; padding: 12px; display: flex; align-items: center; gap: 10px; cursor: pointer; text-align: left; transition: background .15s ease, box-shadow .15s ease, transform .15s ease; }
.attachment-card:hover { background: #f5f8ff; box-shadow: 0 2px 8px rgba(16, 62, 145, .1); transform: translateY(-1px); }
.attachment-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.attachment-icon .mi { font-size: 22px; }
.attachment-info { min-width: 0; flex: 1; }
.attachment-info strong { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-info small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }

.preview-modal-backdrop { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.6); display: grid; place-items: center; padding: 12px; backdrop-filter: blur(4px); }
.preview-modal { width: 100%; height: 100%; max-width: 100%; max-height: 100%; background: var(--surface); border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.preview-modal.windowed { max-width: 900px; max-height: 85vh; height: auto; border-radius: 16px; }
.preview-header { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.preview-file-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.preview-file-icon .mi { font-size: 20px; }
.preview-file-name { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-file-name small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 2px; }
.preview-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.preview-body { flex: 1; overflow: auto; min-height: 300px; display: flex; align-items: center; justify-content: center; background: #f0f2f5; }
.preview-loading { display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--muted); }
.preview-image { max-width: 100%; max-height: 75vh; object-fit: contain; display: block; margin: auto; }
.preview-frame { width: 100%; height: 75vh; border: 0; }
.preview-text { width: 100%; padding: 20px; margin: 0; font-size: 13px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; background: white; overflow: auto; max-height: 75vh; }
.preview-office { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 300px; padding: 40px; }
.preview-office-notice { text-align: center; color: var(--muted); }
.preview-office-notice .mi { font-size: 48px; color: var(--primary); margin-bottom: 12px; }
.preview-office-notice p { margin: 12px 0 20px; line-height: 1.6; }

.word-viewer { width: 100%; max-width: 800px; margin: 0 auto; padding: 40px 48px; background: #fff; min-height: 100%; font-size: 15px; line-height: 1.7; color: #222; word-break: break-word; }
.word-viewer h1, .word-viewer h2, .word-viewer h3 { margin: 1.2em 0 .5em; font-weight: 700; }
.word-viewer h1 { font-size: 22px; }
.word-viewer h2 { font-size: 18px; }
.word-viewer h3 { font-size: 16px; }
.word-viewer p { margin: 0 0 .8em; }
.word-viewer table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13px; }
.word-viewer th, .word-viewer td { border: 1px solid #d0d5dd; padding: 8px 10px; text-align: left; }
.word-viewer th { background: #f1f3f5; font-weight: 600; }
.word-viewer img { max-width: 100%; height: auto; }
.word-viewer ul, .word-viewer ol { padding-left: 24px; margin: 0 0 .8em; }

.excel-viewer { width: 100%; height: 100%; display: flex; flex-direction: column; background: #fff; }
.sheet-tabs { display: flex; gap: 0; border-bottom: 2px solid #e0e0e0; padding: 0 8px; background: #f8f9fa; overflow-x: auto; flex-shrink: 0; }
.sheet-tab { padding: 10px 18px; border: 0; background: transparent; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; white-space: nowrap; transition: color .15s, border-color .15s; }
.sheet-tab:hover { color: var(--ink); background: #eef1f5; }
.sheet-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 650; }
.sheet-body { flex: 1; overflow: auto; }
.sheet-content { padding: 0; }
.sheet-content.hidden { display: none; }
.sheet-content table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sheet-content th, .sheet-content td { border: 1px solid #e0e4e8; padding: 6px 10px; text-align: left; white-space: nowrap; }
.sheet-content th { background: #f1f3f5; font-weight: 600; position: sticky; top: 0; z-index: 1; }
.sheet-content tr:hover td { background: #f5f8ff; }

@media (max-width: 640px) {
  .attachment-grid { grid-template-columns: 1fr; }
  .preview-modal-backdrop { padding: 0; }
  .preview-modal { max-width: 100%; max-height: 100vh; border-radius: 0; }
}

.compose-header { min-height: 82px; padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 13px; }
.compose-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; background: var(--primary-soft); color: var(--primary); }
.compose-title { flex: 1; }
.compose-title strong { display: block; font-size: 21px; font-weight: 660; letter-spacing: -.4px; }
.compose-title small { display: block; margin-top: 4px; color: var(--muted); }
.compose-form { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 16px 20px 0; }
.sender-select { min-height: 69px; border: 1px solid var(--border); background: var(--primary-faint); border-radius: var(--radius-md); display: flex; align-items: center; gap: 12px; padding: 9px 13px; margin-bottom: 12px; }
.sender-select img { width: 52px; height: 44px; object-fit: contain; background: white; border-radius: 12px; padding: 5px; }
.sender-select label { flex: 1; min-width: 0; }
.sender-select small { display: block; color: var(--muted); margin-bottom: 3px; }
.sender-select select { width: 100%; border: 0; background: transparent; outline: none; font-size: 16px; font-weight: 620; }
.smtp-badge { border: 1px solid var(--border-strong); background: white; border-radius: 12px; padding: 9px 12px; display: flex; align-items: center; gap: 7px; white-space: nowrap; color: var(--muted); }
.compose-fields { border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.compose-field { min-height: 59px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--border); }
.compose-field:last-child { border-bottom: 0; }
.compose-field .mi { color: #526159; }
.compose-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 15px; }
.cc-toggle { border: 0; background: transparent; color: var(--primary); font-weight: 610; }
.cc-row { display: none; }
.cc-row.open { display: flex; }
.editor-wrap { flex: 1; min-height: 270px; margin-top: 12px; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: visible; display: flex; flex-direction: column; }
.editor-source { flex: 1; width: 100%; min-height: 240px; resize: none; border: 0; border-radius: inherit; outline: 0; padding: 22px 24px; font: inherit; line-height: 1.65; }
.editor-wrap > .ck-editor, .reply-editor-wrap > .ck-editor { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.editor-wrap .ck-editor__main, .reply-editor-wrap .ck-editor__main { flex: 1; min-height: 0; display: flex; }
.editor-wrap .ck.ck-toolbar, .reply-editor-wrap .ck.ck-toolbar {
  border: 0; border-bottom: 1px solid var(--border); border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: #fbfcfb; padding: 6px 9px;
}
.editor-wrap .ck-toolbar__items, .reply-editor-wrap .ck-toolbar__items { flex-wrap: wrap !important; row-gap: 3px; }
.editor-wrap .ck.ck-editor__editable_inline, .reply-editor-wrap .ck.ck-editor__editable_inline {
  flex: 1; min-height: 210px; max-height: none; overflow-y: auto;
  border: 0 !important; border-radius: 0 0 var(--radius-md) var(--radius-md) !important;
  box-shadow: none !important; padding: 20px 24px; color: var(--text);
  font-family: 'Inter', 'Segoe UI Variable', 'Segoe UI', system-ui, sans-serif;
  font-size: 15px; font-weight: 350; line-height: 1.65;
}
.editor-wrap .ck.ck-editor__editable_inline { min-height: 230px; }
.editor-wrap .ck.ck-editor__editable_inline.ck-focused, .reply-editor-wrap .ck.ck-editor__editable_inline.ck-focused { box-shadow: inset 0 0 0 2px rgba(16, 62, 145, .12) !important; }
.ck.ck-button.ck-on, a.ck.ck-button.ck-on { background: var(--primary-soft); color: var(--primary); }
.ck.ck-button:not(.ck-disabled):hover, a.ck.ck-button:not(.ck-disabled):hover { background: var(--surface-muted); }
.ck-powered-by,
.ck-powered-by-balloon,
.ck.ck-powered-by { display: none !important; }
.drop-zone {
  width: 100%; min-height: 58px; margin-top: 10px; padding: 10px 15px;
  border: 1px dashed #aebfe2; border-radius: 15px; background: #f8faff; color: var(--primary);
  display: flex; align-items: center; justify-content: center; gap: 11px; text-align: left;
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.drop-zone:hover { border-color: var(--primary); background: var(--primary-faint); transform: translateY(-1px); }
.drop-zone > .mi { width: 34px; height: 34px; border-radius: 11px; background: var(--primary-soft); display: grid; place-items: center; }
.drop-copy { min-width: 0; display: grid; gap: 2px; }
.drop-copy strong { font-size: 13px; font-weight: 620; color: var(--text); }
.drop-copy small { color: var(--muted); font-size: 11px; font-weight: 320; }
.compose-form.is-dragging .drop-zone, .reply-box.is-dragging .drop-zone {
  border-color: var(--primary); border-style: solid; background: #e7efff;
  box-shadow: 0 0 0 4px rgba(16, 62, 145, .12), 0 12px 30px rgba(16, 62, 145, .12);
}
.compose-form.is-dragging .drop-zone { transform: translateY(-2px); }
.drop-zone-compact { width: calc(100% - 24px); min-height: 52px; margin: 10px 12px 0; }
.compose-error { min-height: 34px; padding: 8px 4px; color: var(--danger); }
.compose-footer { min-height: 68px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; padding: 9px 0; }
.attachment-action { display: contents; color: var(--primary); }
.attachment-action .mi { width: 42px; height: 42px; border-radius: 13px; display: inline-grid; place-items: center; font-size: 23px; transition: background .16s ease, color .16s ease, transform .16s ease; }
.attachment-action span { display: inline-flex; align-items: center; min-height: 42px; padding: 0 8px 0 2px; font-size: 14px; font-weight: 560; white-space: nowrap; cursor: pointer; }
.attachment-action:hover .mi, .attachment-action:hover span { color: var(--primary-hover); }
.attachment-action:hover .mi { background: var(--primary-soft); transform: translateY(-1px); }
.attachment-list { flex: 1; display: flex; gap: 7px; overflow-x: auto; }
.attachment-chip { background: var(--surface-muted); border-radius: 999px; padding: 8px 11px; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.attachment-chip button { border: 0; background: transparent; padding: 0; color: var(--danger); }
.reply-box { border: 1px solid var(--border); border-radius: var(--radius-md); margin-top: 24px; overflow: visible; }
.reply-meta { padding: 12px 15px; background: var(--surface-muted); color: var(--muted); }
.reply-editor-wrap { min-height: 190px; display: flex; flex-direction: column; }
.reply-editor-wrap .ck.ck-editor__editable_inline { min-height: 145px; }
.reply-actions { display: flex; gap: 9px; align-items: center; border-top: 1px solid var(--border); padding: 10px 12px; }
.reply-actions .spacer { flex: 1; }

.toast { position: fixed; z-index: 100; left: 24px; bottom: 24px; max-width: min(520px, calc(100vw - 48px)); display: none; padding: 14px 18px; border-radius: 14px; color: white; background: #26342d; box-shadow: var(--shadow); }
.toast.show { display: block; animation: toast-in .24s ease-out; }
.toast.error { background: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.modal-backdrop { position: fixed; z-index: 80; inset: 0; background: rgba(10, 24, 18, .38); display: grid; place-items: center; padding: 22px; }
.modal { width: min(560px, 100%); max-height: 80vh; overflow-y: auto; background: white; border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
.modal h3 { margin: 0 0 16px; font-size: 22px; }
.modal p { color: var(--muted); line-height: 1.55; margin: 0; }
.modal-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; background: var(--primary-soft); color: var(--primary); margin-bottom: 14px; }
.modal-icon.danger { background: #fff0f0; color: var(--danger); }
.settings-account { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface-muted); }
.settings-account img { width: 42px; height: 42px; border-radius: 11px; padding: 4px; background: white; object-fit: contain; }
.settings-account strong, .settings-account small { display: block; }
.settings-account small { color: var(--muted); margin-top: 3px; }
.settings-note { margin-top: 14px !important; }
.settings-toggle { display: flex; align-items: center; gap: 11px; margin-top: 16px; padding: 12px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface-muted); }
.settings-toggle input { width: 18px; height: 18px; accent-color: var(--primary); }
.settings-toggle span { display: grid; gap: 3px; }
.settings-toggle small { color: var(--muted); }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.settings-field { display: grid; gap: 5px; }
.settings-field span, .signature-preview-label { color: var(--muted); font-size: 12px; font-weight: 600; }
.settings-field input { width: 100%; box-sizing: border-box; border: 1px solid var(--border); border-radius: 11px; padding: 10px 11px; font: inherit; color: var(--text); background: var(--surface); }
.settings-field-wide { grid-column: 1 / -1; }
.signature-preview-label { margin-top: 16px; margin-bottom: 6px; }
.signature-preview { min-height: 80px; padding: 10px; overflow: auto; border: 1px solid var(--border); border-radius: 13px; background: #fff; }
.signature-preview .dismail-signature { margin-top: 0 !important; }
@media (max-width: 560px) { .settings-grid { grid-template-columns: 1fr; } .settings-field-wide { grid-column: auto; } }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.mobile-bar { display: none; }
.mobile-compose-bar { display: none; }

@media (max-width: 1250px) {
  .mail-shell { grid-template-columns: 250px minmax(340px, 430px) minmax(420px, 1fr); padding: 9px; gap: 9px; }
  .list-pane-resizer { display: none; }
  .sidebar-compose { font-size: 0; }
  .sidebar-compose .mi { font-size: 22px; }
  .detail-scroll { padding: 22px; }
}

@media (max-width: 980px) {
  body { overflow: hidden; }
  input, select, textarea, [contenteditable="true"] { font-size: 16px !important; }
  .login-shell { grid-template-columns: 1fr; }
  .brand-panel { display: none; }
  .login-panel { min-height: 100%; padding: 32px 24px; }
  .compact-logo, .login-partners { display: flex; }
  .mail-shell { height: 100%; display: block; padding: 0; }
  .pane { border: 0; border-radius: 0; }
  .sidebar { position: fixed; z-index: 70; top: 0; bottom: 0; left: 0; width: min(330px, 88vw); transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-scrim { display: block; position: fixed; z-index: 65; inset: 0; background: rgba(12, 26, 39, .36); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  .sidebar-scrim.open { opacity: 1; pointer-events: auto; }
  .account-logo { position: relative; }
  .sidebar-compose { font-size: 16px; }
  .account-switcher-btn { display: none; }
  .account-menu { display: none !important; }
  .settings-shortcut-btn {
    display: flex; align-items: center; gap: 12px; width: 100%;
    border: 0; border-radius: var(--radius-md); padding: 12px 14px;
    background: linear-gradient(145deg, rgba(255,255,255,.85) 0%, rgba(231,239,255,.5) 100%);
    border: 1px solid rgba(16,62,145,.08);
    box-shadow: 0 1px 4px rgba(16,62,145,.06), inset 0 1px 0 rgba(255,255,255,.9);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    color: var(--primary); font-size: 15px; font-weight: 620; cursor: pointer;
  }
  .settings-shortcut-btn .mi {
    width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
    background: linear-gradient(145deg, #1a56b8 0%, var(--primary) 45%, #0b2d6b 100%);
    color: #fff; font-size: 22px;
    box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 2px 6px rgba(16,62,145,.18);
  }
  .settings-shortcut-btn:active { transform: scale(.97); }
  .sidebar-compose span { display: inline; }
  .sidebar-close { display: grid; position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; place-items: center; border: 1px solid var(--border); border-radius: 14px; background: rgba(255, 255, 255, .94); color: var(--ink); box-shadow: 0 6px 16px rgba(18, 45, 73, .11); }
  .sidebar-close:hover { background: var(--primary-soft); color: var(--primary); }
  .list-pane { height: 100%; }
  .list-pane-resizer { display: none; }
  .detail-pane { position: fixed; z-index: 60; inset: 0; transform: translateX(102%); transition: transform .2s ease; background: white; }
  .detail-pane.open { transform: translateX(0); }
  .mobile-bar { min-height: 68px; padding: 8px 12px; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid var(--border); }
  .mobile-bar img { width: 125px; height: 46px; object-fit: contain; }
  .mobile-bar strong { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .mobile-bar .profile-button { margin-left: auto; width: 44px; height: 44px; flex: 0 0 44px; }
  /* Keep the account avatar inside its compact button. The generic mobile-bar
     logo rule above must not stretch this image beyond the button bounds. */
  .mobile-bar .profile-button img { width: 100%; height: 100%; flex: 0 0 auto; object-fit: contain; }
  .desktop-only { display: none !important; }
  .list-header { padding-top: 10px; }
  .compose-form { padding: 12px 14px 0; }
  .mobile-compose-bar { display: flex; align-items: center; gap: 9px; min-height: 64px; padding: 8px 12px; border-top: 1px solid var(--border); background: var(--surface); }
  .mobile-compose-bar { position: relative; top: -12px; margin-bottom: -12px; }
  .mobile-compose-bar > .mi { color: var(--primary); }
  .mobile-compose-bar input { flex: 1; min-width: 0; height: 46px; border: 1px solid var(--border); border-radius: 999px; outline: 0; padding: 0 15px; background: var(--surface-muted); color: var(--text); }
  .mobile-compose-bar input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(16, 62, 145, .12); }
  .mobile-compose-bar .compose-round { flex: 0 0 46px; width: 46px; height: 46px; }
  .account-sheet-backdrop { display: flex; position: fixed; z-index: 100; inset: 0; align-items: flex-end; background: rgba(12, 26, 39, .38); }
  .account-sheet { width: 100%; max-height: min(72vh, 560px); overflow: hidden; padding: 9px 16px 20px; background: var(--surface); border-radius: 24px 24px 0 0; box-shadow: 0 -14px 40px rgba(16, 62, 145, .20); animation: account-sheet-up .3s cubic-bezier(.22, .8, .28, 1); }
  .account-sheet-handle { width: 42px; height: 4px; margin: 2px auto 12px; border-radius: 999px; background: var(--border-strong); }
  .account-sheet-header { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 10px; border-bottom: 1px solid var(--border); }
  .account-sheet-header h3 { margin: 0; font-size: 21px; font-weight: 680; }
  .account-sheet-list { max-height: min(56vh, 430px); overflow-y: auto; padding-top: 8px; }
  .account-sheet .account-option { min-height: 58px; padding: 9px 10px; }
  @keyframes account-sheet-up { from { transform: translateY(100%); opacity: .7; } to { transform: translateY(0); opacity: 1; } }
}

@media (max-width: 620px) {
  .login-panel { padding: 22px 18px; align-items: flex-start; }
  .compact-logo { width: 210px; }
  .server-grid { grid-template-columns: minmax(0, 1fr) 86px; }
  .server-grid .security { grid-column: 1 / -1; }
  .partner-logos { gap: 9px; }
  .partner-logos .divider { height: 30px; }
  .detail-scroll { padding: 18px; }
  .sender-card { flex-wrap: wrap; }
  .sender-card time { width: 100%; padding-left: 58px; }
  .detail-toolbar { min-height: 62px; }
  .detail-toolbar { justify-content: flex-end; }
  .detail-toolbar .spacer { display: none; }
  .detail-toolbar .btn { min-width: 46px; padding: 0 12px; font-size: 0; }
  .detail-toolbar .btn .mi { font-size: 22px; }
  .smtp-badge span:last-child { display: none; }
  .editor { padding: 18px; }
  /* Keep the composer compact on phones so attachments and actions remain reachable. */
  .detail-scroll { padding-bottom: 34px; }
  .compose-form { min-height: auto; padding-bottom: 8px; }
  .editor-wrap { flex: 0 0 auto; min-height: 0; }
  .editor-wrap .ck.ck-editor__editable_inline { min-height: 180px; }
  .reply-editor-wrap { min-height: 0; }
  .reply-editor-wrap .ck.ck-editor__editable_inline { min-height: 150px; }
  .drop-zone { justify-content: flex-start; padding: 9px 11px; }
  .drop-copy small { white-space: normal; }
  .compose-footer, .reply-actions { position: sticky; bottom: 0; z-index: 3; background: var(--surface); }
}

/* ============================================================
   Modern UI — premium varsayılan görünüm, minimal hover.
   Sadece CSS; HTML/JS değişikliği gerektirmez.
   ============================================================ */

/* --- Arama çubuğu: frosted glass görünümü --- */
.search-compose {
  background: linear-gradient(180deg, rgba(255,255,255,.82) 0%, rgba(240,243,240,.72) 100%);
  border: 1px solid rgba(16, 62, 145, .08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 1px 3px rgba(16,62,145,.05), 0 4px 12px rgba(16,62,145,.04);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.search-compose:focus-within {
  border-color: rgba(16, 62, 145, .22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 0 0 3px rgba(16,62,145,.08), 0 4px 14px rgba(16,62,145,.07);
}

/* --- Compose FAB: 3D kabartmalı buton --- */
.compose-round {
  position: relative;
  background: linear-gradient(145deg, #1a56b8 0%, var(--primary) 40%, #0b2d6b 100%);
  box-shadow:
    0 1px 0 0 rgba(255,255,255,.25) inset,
    0 -1px 0 0 rgba(0,0,0,.12) inset,
    0 4px 8px rgba(16,62,145,.22),
    0 8px 20px rgba(16,62,145,.16);
}
.compose-round::after {
  content: '';
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(ellipse 70% 50% at 35% 25%, rgba(255,255,255,.38), transparent 70%);
}
.compose-round:active { box-shadow: 0 1px 0 0 rgba(255,255,255,.25) inset, 0 2px 6px rgba(16,62,145,.2); transform: scale(.96); }

/* --- "Tüm hesaplar" butonu: derin gradient + iç aydınlatma --- */
.sidebar-compose {
  position: relative; overflow: hidden;
  background: linear-gradient(150deg, #1a56b8 0%, var(--primary) 50%, #0a265a 100%);
  box-shadow:
    0 1px 0 0 rgba(255,255,255,.2) inset,
    0 -1px 0 0 rgba(0,0,0,.1) inset,
    0 4px 10px rgba(16,62,145,.2),
    0 8px 24px rgba(16,62,145,.12);
}
.sidebar-compose::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,.14) 0%, transparent 100%);
  border-radius: inherit; pointer-events: none;
}
.sidebar-compose:active { transform: scale(.97); }

/* --- Filtre sekmeleri: cam buton hissi --- */
.filter-row { gap: 6px; padding: 8px 12px; }
.filter {
  border: 1px solid rgba(16,62,145,.06);
  background: linear-gradient(180deg, rgba(255,255,255,.7) 0%, rgba(240,243,240,.5) 100%);
  color: var(--muted);
  box-shadow: 0 1px 2px rgba(16,62,145,.04), inset 0 1px 0 rgba(255,255,255,.8);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.filter.selected {
  background: linear-gradient(145deg, #1a56b8 0%, var(--primary) 45%, #0b2d6b 100%);
  color: #fff; border-color: transparent;
  box-shadow:
    0 1px 0 rgba(255,255,255,.2) inset,
    0 4px 12px rgba(16,62,145,.24),
    0 1px 3px rgba(16,62,145,.18);
}
.filter.selected .mi { color: #fff; }
.filter:active { transform: scale(.97); }

/* --- "Seç" pill: cam efektli çip --- */
.bulk-select-trigger {
  background: linear-gradient(180deg, rgba(255,255,255,.8) 0%, rgba(238,244,255,.6) 100%);
  border: 1px solid rgba(16,62,145,.12);
  color: var(--primary); font-weight: 700;
  box-shadow: 0 1px 3px rgba(16,62,145,.06), inset 0 1px 0 rgba(255,255,255,.9);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.bulk-select-trigger:active { transform: scale(.96); }

/* --- Avatarlar: degrade + cam çerçeve --- */
.avatar {
  background: linear-gradient(145deg, #e7efff 0%, #c8d8f5 100%);
  box-shadow: 0 0 0 1.5px rgba(16,62,145,.08), inset 0 1px 0 rgba(255,255,255,.6);
}
.message-row.unread .avatar {
  background: linear-gradient(145deg, #1a56b8 0%, var(--primary) 45%, #0b2d6b 100%);
  color: #fff;
  box-shadow: 0 3px 10px rgba(16,62,145,.22), inset 0 1px 0 rgba(255,255,255,.2);
}
.avatar-logo {
  box-shadow: 0 2px 6px rgba(16,24,20,.14), 0 0 0 2px #fff;
}

/* --- Hesap değiştirici: cam kart --- */
.account-switcher-btn {
  background: linear-gradient(180deg, rgba(255,255,255,.7) 0%, rgba(240,243,240,.5) 100%);
  border: 1px solid rgba(16,62,145,.07);
  box-shadow: 0 1px 3px rgba(16,62,145,.05), inset 0 1px 0 rgba(255,255,255,.8);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.switch-logo { box-shadow: 0 1px 4px rgba(16,62,145,.08), 0 0 0 1px rgba(16,62,145,.05); }

/* --- "Gönder" butonu: 3D premium gradient --- */
.btn-primary {
  position: relative;
  background: linear-gradient(145deg, #1a56b8 0%, var(--primary) 45%, #0b2d6b 100%);
  box-shadow:
    0 1px 0 0 rgba(255,255,255,.22) inset,
    0 -1px 0 0 rgba(0,0,0,.1) inset,
    0 4px 10px rgba(16,62,145,.22),
    0 8px 20px rgba(16,62,145,.12);
  border: 0;
}
.btn-primary::after {
  content: '';
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(ellipse 60% 45% at 30% 20%, rgba(255,255,255,.3), transparent 65%);
}
.btn-primary:hover {
  background: linear-gradient(145deg, #1a56b8 0%, var(--primary) 45%, #0b2d6b 100%);
  box-shadow:
    0 1px 0 0 rgba(255,255,255,.22) inset,
    0 -1px 0 0 rgba(0,0,0,.1) inset,
    0 4px 10px rgba(16,62,145,.22),
    0 8px 20px rgba(16,62,145,.12);
  opacity: .92;
}
.btn-primary:active { transform: scale(.96); box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 2px 6px rgba(16,62,145,.2); }
.btn-primary .mi { position: relative; }

/* --- "Dosya ekle" butonu: cam efektli aksiyon --- */
.attachment-action .mi {
  background: linear-gradient(180deg, rgba(255,255,255,.85) 0%, rgba(231,239,255,.6) 100%);
  border: 1px solid rgba(16,62,145,.1);
  box-shadow: 0 1px 3px rgba(16,62,145,.06), inset 0 1px 0 rgba(255,255,255,.9);
  color: var(--primary);
}
.attachment-action span {
  color: var(--primary); font-weight: 620; letter-spacing: -.01em;
}
.attachment-action:hover .mi {
  background: linear-gradient(180deg, rgba(231,239,255,.9) 0%, rgba(200,216,245,.5) 100%);
  transform: none;
}

/* --- Compose footer: ince üst çizgi yerine cam bar --- */
.compose-footer {
  background: linear-gradient(180deg, rgba(255,255,255,.75) 0%, rgba(244,246,244,.6) 100%);
  border-top: 1px solid rgba(16,62,145,.06);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}

/* --- Reply actions: aynı cam bar --- */
.reply-actions {
  background: linear-gradient(180deg, rgba(255,255,255,.75) 0%, rgba(244,246,244,.6) 100%);
  border-top: 1px solid rgba(16,62,145,.06);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}

/* --- "İptal" / outline buton: cam çip --- */
.btn-outline {
  background: linear-gradient(180deg, rgba(255,255,255,.8) 0%, rgba(240,243,240,.5) 100%);
  border: 1px solid rgba(16,62,145,.12);
  box-shadow: 0 1px 2px rgba(16,62,145,.04), inset 0 1px 0 rgba(255,255,255,.8);
}
.btn-outline:active { transform: scale(.97); }

/* --- Hesap paneli (mobile account sheet): frosted glass --- */
.account-sheet-backdrop {
  background: rgba(8, 18, 36, .45);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.account-sheet {
  background: linear-gradient(180deg, rgba(255,255,255,.92) 0%, rgba(244,246,250,.88) 100%);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -8px 40px rgba(16,62,145,.18), 0 -2px 8px rgba(16,62,145,.06);
}
.account-sheet-handle {
  width: 38px; height: 4px;
  background: linear-gradient(90deg, rgba(16,62,145,.12), rgba(16,62,145,.22), rgba(16,62,145,.12));
  border-radius: 999px;
}
.account-sheet-header {
  border-bottom: 1px solid rgba(16,62,145,.06);
}
.account-sheet-header h3 {
  background: linear-gradient(135deg, var(--primary) 0%, #2b61b8 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Hesap seçenekleri: cam kart hissi --- */
.account-option {
  border-radius: 14px;
  transition: background .15s ease, box-shadow .15s ease;
}
.account-option:hover, .account-option.selected {
  background: linear-gradient(135deg, rgba(231,239,255,.7) 0%, rgba(200,216,245,.4) 100%);
  box-shadow: 0 2px 8px rgba(16,62,145,.06), inset 0 1px 0 rgba(255,255,255,.8);
}
.account-option.selected {
  border: 1px solid rgba(16,62,145,.1);
}
.account-option img {
  background: linear-gradient(145deg, rgba(255,255,255,.9) 0%, rgba(231,239,255,.6) 100%);
  box-shadow: 0 1px 4px rgba(16,62,145,.08), 0 0 0 1px rgba(16,62,145,.05);
}
.account-option .mi {
  color: var(--primary);
}
.account-option.danger {
  color: var(--danger);
}
.account-option.danger:hover {
  background: linear-gradient(135deg, rgba(255,241,240,.7) 0%, rgba(248,220,218,.4) 100%);
  box-shadow: 0 2px 8px rgba(196,56,56,.06);
}

/* --- Desktop hesap menüsü: aynı cam stil --- */
.account-menu {
  background: linear-gradient(180deg, rgba(255,255,255,.94) 0%, rgba(244,246,250,.9) 100%);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(16,62,145,.06);
  box-shadow: 0 12px 40px rgba(16,62,145,.14), 0 2px 8px rgba(16,62,145,.06);
}
.account-menu-title {
  background: linear-gradient(135deg, var(--primary) 0%, #2b61b8 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (max-width: 980px) {
  .filter-row { padding: 8px 12px 10px; }
  .compose-round:active, .sidebar-compose:active, .filter:active, .bulk-select-trigger:active { transform: scale(.95); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
