/* AteaSoft Webmail — Outlook-inspired, AteaPanel blue system */

:root {
  --bg: #f3f6fb;
  --bg-soft: #e8eef7;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --border: #dbe3ef;
  --border-strong: #c5d0e0;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #dbeafe;
  --accent: #0ea5e9;
  --topbar: #0f172a;
  --topbar-text: #e2e8f0;
  --danger: #dc2626;
  --success: #059669;
  --unread: #eff6ff;
  --selected: #e0f2fe;
  --shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
  --radius: 8px;
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
}

html[data-theme="dark"] {
  --bg: #0b1220;
  --bg-soft: #111827;
  --surface: #111827;
  --surface-2: #0f172a;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --border: #1e293b;
  --border-strong: #334155;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-soft: #1e3a5f;
  --topbar: #020617;
  --topbar-text: #e2e8f0;
  --unread: #172554;
  --selected: #1e3a5f;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html, body { max-width: 100%; overflow-x: hidden; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
.outlook { max-width: 100vw; overflow-x: hidden; }
.ol-list, .ol-read, .ol-item-main, .ol-read-meta { min-width: 0; }
.ol-text { overflow-wrap: anywhere; }

a { color: var(--primary); }

/* —— Inline SVG icons —— */
.ic {
  display: inline-block;
  vertical-align: -0.18em;
  flex-shrink: 0;
  pointer-events: none;
}
button .ic, a .ic, label .ic, h2 .ic, .ol-folder-ico .ic { vertical-align: middle; }

img.logo-light { display: inline-block; }
img.logo-dark { display: none; }
html[data-theme="dark"] img.logo-light { display: none !important; }
html[data-theme="dark"] img.logo-dark { display: inline-block !important; }
.desktop-only { display: none; }
.mobile-only { display: inline-flex; }
@media (min-width: 900px) {
  .desktop-only { display: inline-flex; }
  .mobile-only { display: none !important; }
}

/* —— Boot splash / auth animation shells —— */
.splash, .auth-anim {
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: center;
  background:
    radial-gradient(1200px 600px at 12% -8%, rgba(56,189,248,.16), transparent 55%),
    radial-gradient(900px 500px at 88% 8%, rgba(124,58,237,.14), transparent 50%),
    #f7f9fe;
  transition: opacity .4s ease, visibility .4s ease;
}
html[data-theme="dark"] .splash,
html[data-theme="dark"] .auth-anim {
  background:
    radial-gradient(1000px 520px at 15% 0%, rgba(37,99,235,.22), transparent 50%),
    radial-gradient(800px 420px at 88% 12%, rgba(124,58,237,.18), transparent 45%),
    #0b1220;
}
.splash.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.auth-anim { opacity: 0; visibility: hidden; }
.auth-anim.is-active { opacity: 1; visibility: visible; }

/* —— Envelope-open animation —— */
.env-stage { display: grid; justify-items: center; gap: 30px; }
.env-svg {
  width: 176px; height: auto;
  filter: drop-shadow(0 18px 34px rgba(37,99,235,.22));
}
.env-caption {
  display: grid; justify-items: center; gap: 14px;
  position: absolute; left: 0; right: 0;
  bottom: calc(44px + env(safe-area-inset-bottom, 0px));
}
.env-logo { display: block; height: 26px; width: auto; }
.env-status { display: inline-flex; align-items: center; gap: 3px; }
.env-text { font-size: .88rem; font-weight: 600; color: var(--muted); letter-spacing: .01em; }
.env-dots { display: inline-flex; align-items: flex-end; gap: 3px; padding-bottom: 2px; margin-left: 3px; }
.env-dots i {
  width: 5px; height: 5px; border-radius: 50%;
  background: #6d76dc;
  animation: envDot 1s ease-in-out infinite;
}
.env-dots i:nth-child(2) { animation-delay: .16s; }
.env-dots i:nth-child(3) { animation-delay: .32s; }
@keyframes envDot {
  0%, 60%, 100% { opacity: .25; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}

/* animation pieces — paused until `.play`/`.is-active` set on the shell */
.env-anim .env-svg,
.env-anim .env-papers,
.env-anim .env-paper-front,
.env-anim .env-paper-back { animation-play-state: paused; }
.env-anim.play .env-svg,
.env-anim.play .env-papers,
.env-anim.play .env-paper-front,
.env-anim.play .env-paper-back,
.auth-anim.is-active .env-svg,
.auth-anim.is-active .env-papers,
.auth-anim.is-active .env-paper-front,
.auth-anim.is-active .env-paper-back { animation-play-state: running; }

.env-svg { animation: envPop .5s cubic-bezier(.2,.8,.2,1) both; transform-origin: center; }
.env-papers {
  transform-box: fill-box; transform-origin: center center;
  animation: envFloat 3.2s ease-in-out 1s infinite;
}
.env-paper-front {
  transform-box: fill-box; transform-origin: center bottom;
  animation: envRise .75s cubic-bezier(.2,.85,.25,1) .5s both;
}
.env-paper-back {
  transform-box: fill-box; transform-origin: center bottom;
  animation: envRiseBack .75s cubic-bezier(.2,.85,.25,1) .4s both;
}
@keyframes envPop {
  0% { transform: scale(.72) translateY(10px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
@keyframes envRise {
  0% { transform: translateY(40px) scale(.95); opacity: 0; }
  60% { opacity: 1; }
  100% { transform: translateY(-8px) scale(1); opacity: 1; }
}
@keyframes envRiseBack {
  0% { transform: translateY(34px); opacity: 0; }
  60% { opacity: 1; }
  100% { transform: translateY(6px); opacity: 1; }
}
@keyframes envFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
@media (prefers-reduced-motion: reduce) {
  .env-paper-front, .env-paper-back, .env-svg, .env-papers { animation-duration: .01ms !important; }
}

/* —— Page navigation loader —— */
.page-loader {
  position: fixed; inset: 0; z-index: 9000;
  display: grid; place-items: center;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
}
.page-loader.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.page-loader[hidden] { display: none !important; }
.page-loader.is-visible[hidden] { display: grid !important; }
.page-loader-card {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px 28px;
  box-shadow: var(--shadow);
  min-width: 160px;
  font-size: .9rem;
  font-weight: 600;
}
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border-strong);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
body.is-loading { cursor: progress; }
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* —— Microsoft-style login —— */
.page-login {
  min-height: 100dvh;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(56,189,248,.18), transparent 55%),
    radial-gradient(900px 500px at 90% 10%, rgba(124,58,237,.12), transparent 50%),
    linear-gradient(160deg, #f8fafc 0%, #eef2ff 45%, #f1f5f9 100%);
}
html[data-theme="dark"] .page-login {
  background:
    radial-gradient(1000px 500px at 15% 0%, rgba(37,99,235,.25), transparent 50%),
    radial-gradient(800px 400px at 90% 20%, rgba(124,58,237,.18), transparent 45%),
    #0b1220;
}
.ms-auth {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px 16px 40px;
}
.theme-fab {
  position: fixed; top: 16px; right: 16px; z-index: 5;
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  cursor: pointer; box-shadow: var(--shadow);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s ease, color .15s ease;
}
.theme-fab:hover { color: var(--primary); }
.ms-stack { width: 100%; max-width: 440px; display: grid; gap: 14px; }
.ms-card, .ms-options {
  background: var(--surface);
  border: 1px solid rgba(15,23,42,.06);
  box-shadow: var(--shadow);
  border-radius: 4px;
}
.ms-card { padding: 36px 40px 32px; }
.ms-brand-row { margin-bottom: 22px; }
.ms-logo { display: block; height: 42px; width: auto; }
.ms-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
}
.ms-sub { margin: 8px 0 22px; color: var(--muted); font-size: .95rem; }
.ms-alert {
  background: #fef2f2; color: #b91c1c;
  border: 1px solid #fecaca; border-radius: 4px;
  padding: 10px 12px; font-size: .88rem; margin-bottom: 16px;
}
html[data-theme="dark"] .ms-alert { background: #450a0a; border-color: #7f1d1d; color: #fecaca; }
.ms-form { display: grid; gap: 18px; }
.ms-field { position: relative; }
.ms-field input {
  width: 100%;
  border: none;
  border-bottom: 2px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  padding: 18px 0 8px;
  outline: none;
  transition: border-color .15s ease;
}
.ms-field input:focus { border-bottom-color: var(--primary); }
.ms-field label {
  position: absolute; left: 0; top: 16px;
  color: var(--muted); font-size: 1rem;
  pointer-events: none;
  transition: .15s ease;
}
.ms-field input:focus + label,
.ms-field input:not(:placeholder-shown) + label,
.ms-field input:-webkit-autofill + label,
.ms-field input:autofill + label {
  top: 0; font-size: .75rem; color: var(--primary); font-weight: 600;
}
/* Tarayıcı otomatik doldurma arka planını nötrle (alt-çizgi görünümü korunur) */
.ms-field input:-webkit-autofill,
.ms-field input:-webkit-autofill:hover,
.ms-field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--surface) inset;
  box-shadow: 0 0 0 1000px var(--surface) inset;
  caret-color: var(--text);
  transition: background-color 99999s ease 0s;
}
.ms-help { margin: 0; font-size: .88rem; color: var(--muted); }
.ms-help a { color: var(--primary); font-weight: 600; text-decoration: none; }
.ms-help a:hover { text-decoration: underline; }
.ms-actions { display: flex; justify-content: flex-end; margin-top: 6px; }
.ms-btn {
  background: var(--primary); color: #fff; border: none;
  padding: 10px 28px; min-width: 120px;
  font: inherit; font-weight: 600; font-size: .95rem;
  border-radius: 2px; cursor: pointer;
}
.ms-btn:hover { background: var(--primary-hover); }
.ms-options {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; color: var(--muted); font-size: .9rem;
}
.ms-key { color: var(--muted); display: inline-flex; }

/* —— Outlook shell —— */
.outlook {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto auto 1fr;
  background: var(--bg);
}

.ol-top {
  display: flex; align-items: center; gap: 14px;
  padding: 0 14px;
  height: 56px;
  background: var(--surface);
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.ol-top-left, .ol-top-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.ol-logo { display: block; height: 34px; max-height: 34px; width: auto; }
.ol-product {
  font-size: .82rem; font-weight: 600; color: var(--muted);
  padding-left: 12px; border-left: 1px solid var(--border);
  letter-spacing: .01em;
}
.ol-search {
  flex: 1; max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-soft);
  border: 1px solid transparent;
  border-radius: 6px; padding: 0 12px; height: 36px;
  transition: background .15s ease, border-color .15s ease;
}
.ol-search:focus-within { background: var(--surface); border-color: var(--primary); }
.ol-search input {
  flex: 1; border: none; background: transparent; color: var(--text);
  font: inherit; font-size: .88rem; outline: none;
}
.ol-search input::placeholder { color: var(--muted); }
.ol-search .ic { color: var(--muted); flex-shrink: 0; }
.ol-icon-btn {
  width: 36px; height: 36px; border-radius: 8px;
  border: none; background: transparent; color: var(--muted);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; font-size: 1rem;
  transition: background .12s ease, color .12s ease;
}
.ol-icon-btn:hover { background: var(--bg-soft); color: var(--primary); }
.ol-user { display: flex; align-items: center; gap: 8px; }
.ol-user-mail { font-size: .78rem; color: var(--muted); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ol-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary);
  color: #fff; font-size: .78rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.ol-back-top { color: inherit; text-decoration: none; font-size: 1.2rem; padding: 4px 8px; }

.ol-ribbon {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 9px 14px;
  background: #353b65;
  border-bottom: 1px solid #2b3054;
}
.ol-new {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--primary); color: #fff !important;
  text-decoration: none; border: none; cursor: pointer;
  font: inherit; font-weight: 600; font-size: .88rem;
  padding: 8px 16px; border-radius: 6px;
  box-shadow: 0 1px 2px rgba(37,99,235,.25);
  transition: background .15s ease, transform .05s ease;
}
.ol-new:hover { background: var(--primary-hover); }
.ol-new:active { transform: translateY(1px); }
.ol-new .ic { color: #fff; }
.ol-new-plus { font-size: 1.1rem; line-height: 1; }
.ol-new-sm { padding: 6px 12px; font-size: .82rem; }

/* Yeni posta button contrast on the blue ribbon */
.ol-ribbon .ol-new {
  background: #fff; color: var(--primary) !important;
  font-weight: 700; box-shadow: 0 1px 3px rgba(15,23,42,.2);
}
.ol-ribbon .ol-new:hover { background: #eef2ff; }
.ol-ribbon .ol-new .ic { color: var(--primary); }
.ol-ribbon-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 6px;
  color: #fff; text-decoration: none; font-size: .85rem; font-weight: 500;
  border: none; background: transparent; cursor: pointer;
}
.ol-ribbon-btn .ic { color: rgba(255,255,255,.9); }
.ol-ribbon-btn:hover { background: rgba(255,255,255,.16); }
.ol-ribbon-btn:hover .ic { color: #fff; }
.ol-ribbon-btn.is-disabled { opacity: .55; pointer-events: none; }
.ol-ribbon-spacer { flex: 1; }
.ol-ribbon-meta {
  display: inline-flex; align-items: center; gap: 6px;
  color: rgba(255,255,255,.9); font-size: .8rem; font-weight: 500;
}
.ol-ribbon-meta .ic { color: rgba(255,255,255,.9); }

/* —— Floating toasts —— */
.toast-region {
  position: fixed; top: 68px; right: 18px; z-index: 8500;
  display: flex; flex-direction: column; gap: 10px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 12px 12px 14px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
  font-size: .88rem; font-weight: 500;
  pointer-events: auto;
  animation: toastIn .25s cubic-bezier(.2,.8,.2,1);
}
.toast.is-hiding { animation: toastOut .25s ease forwards; }
.toast-ico { display: inline-flex; flex-shrink: 0; }
.toast-msg { flex: 1; min-width: 0; line-height: 1.35; }
.toast-close {
  flex-shrink: 0; border: none; background: transparent; cursor: pointer;
  color: var(--muted); padding: 3px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
}
.toast-close:hover { background: var(--bg-soft); color: var(--text); }
.toast-success { border-left-color: var(--success); }
.toast-success .toast-ico { color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-error .toast-ico { color: var(--danger); }
@keyframes toastIn {
  from { transform: translateX(24px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes toastOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(24px); opacity: 0; }
}
@media (max-width: 899px) {
  .toast-region { top: auto; bottom: 16px; right: 16px; left: 16px; width: auto; }
}

.ol-body {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 0;
  height: calc(100dvh - 56px - 53px);
  overflow: hidden;
}
@media (min-width: 900px) {
  .ol-body {
    grid-template-columns: 220px minmax(280px, 360px) 1fr;
  }
}

.ol-folders {
  background: var(--surface-2);
  border-right: 1px solid var(--border);
  padding: 14px 10px;
  overflow-y: auto;
  /* mobile: off-canvas drawer */
  position: fixed; z-index: 60; top: 0; left: 0; bottom: 0;
  width: min(292px, 84vw);
  transform: translateX(-104%);
  transition: transform .3s cubic-bezier(.34, .8, .34, 1), box-shadow .3s ease;
  will-change: transform;
  box-shadow: none;
}
.ol-folders.is-open {
  transform: translateX(0);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .38);
}
.ol-scrim {
  position: fixed; inset: 0; z-index: 55;
  background: rgba(15, 23, 42, .48);
  opacity: 0; visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
}
.ol-scrim.is-visible { opacity: 1; visibility: visible; }
@media (min-width: 900px) {
  .ol-folders {
    position: static; width: auto; transform: none;
    box-shadow: none; transition: none; will-change: auto;
  }
  .ol-scrim { display: none; }
}
.ol-folder-group { margin-bottom: 16px; }
.ol-folder-label {
  font-size: .68rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
  padding: 6px 10px;
}
.ol-folder {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 6px;
  color: var(--text); text-decoration: none; font-size: .88rem;
  transition: background .12s ease;
}
.ol-folder:hover { background: var(--bg-soft); }
@media (hover: none) {
  .ol-folder:hover { background: transparent; }
  .ol-folder.is-active:hover { background: var(--primary-soft); }
}
.ol-folder.is-active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}
.ol-folder.is-active .ol-folder-ico { color: var(--primary); }
.ol-folder.is-static { cursor: default; opacity: .85; }
.ol-folder-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; color: var(--muted);
}
.ol-folder-account { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .78rem; }
.ol-badge {
  margin-left: auto;
  background: var(--primary); color: #fff;
  font-size: .7rem; font-weight: 700;
  min-width: 20px; height: 18px; padding: 0 6px;
  border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
}

.ol-list {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
}
.page-app.has-selected .ol-list { display: none; }
@media (min-width: 900px) {
  .page-app.has-selected .ol-list { display: flex; }
}
/* Yeni posta / yanıt yazarken gelen kutusu listesi gizlensin */
.page-app.composing .ol-list { display: none !important; }
@media (min-width: 900px) {
  .page-app.composing .ol-body { grid-template-columns: 220px 1fr; }
}
.ol-list-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.ol-tab {
  border: none; background: transparent; font: inherit;
  font-weight: 700; font-size: .9rem; color: var(--primary);
  border-bottom: 2px solid var(--primary); padding: 4px 2px 8px;
  cursor: default;
}
.ol-list-count { color: var(--muted); font-size: .78rem; }
.ol-list-scroll { flex: 1; overflow-y: auto; }
.ol-item {
  display: grid; grid-template-columns: 40px 1fr; gap: 10px;
  padding: 12px 14px; text-decoration: none; color: inherit;
  border-bottom: 1px solid var(--border); border-left: 3px solid transparent;
}
.ol-item:hover { background: var(--bg-soft); }
.ol-item.is-unread { background: var(--unread); font-weight: 600; }
.ol-item.is-unread .ol-item-from { font-weight: 700; }
.ol-item.is-selected {
  background: var(--selected);
  border-left-color: var(--primary);
}
.ol-item-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary);
  color: #fff; font-size: .8rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ol-item-avatar.lg { width: 44px; height: 44px; font-size: 1rem; }
.ol-item-main { min-width: 0; }
.ol-item-row { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.ol-item-from { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ol-item-date { font-size: .72rem; color: var(--muted); flex-shrink: 0; font-weight: 500; }
.ol-item-subject {
  font-size: .82rem; color: var(--muted); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ol-item.is-unread .ol-item-subject { color: var(--text); }
.ol-empty-list { padding: 48px 20px; text-align: center; color: var(--muted); }

.ol-read {
  display: none; flex-direction: column; min-height: 0;
  background: var(--surface); overflow: hidden;
}
.page-app.has-selected .ol-read { display: flex; }
@media (min-width: 900px) {
  .ol-read { display: flex; }
}
.ol-read-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--border); gap: 10px;
  background: var(--surface-2);
  position: sticky; top: 0; z-index: 5;
}
.ol-back {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--primary); text-decoration: none; font-weight: 600; font-size: .9rem;
}
.ol-read-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ol-act {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 7px;
  font-size: .85rem; font-weight: 600; text-decoration: none;
  color: var(--text); background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color .12s ease, background .12s ease, color .12s ease;
}
.ol-act .ic { color: var(--muted); }
.ol-act:hover { border-color: var(--primary); color: var(--primary); }
.ol-act:hover .ic { color: var(--primary); }
.ol-act-primary {
  background: var(--primary); color: #fff; border-color: var(--primary);
  box-shadow: 0 1px 2px rgba(37,99,235,.28);
}
.ol-act-primary .ic { color: #fff; }
.ol-act-primary:hover { background: var(--primary-hover); color: #fff; border-color: var(--primary-hover); }
.ol-act-primary:hover .ic { color: #fff; }
@media (max-width: 560px) {
  .ol-act-label { display: none; }
}

.ol-reply-cta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 28px; padding-top: 20px;
  border-top: 1px dashed var(--border);
}
.ol-read-inner { flex: 1; overflow-y: auto; padding: 20px 22px 40px; max-width: 920px; width: 100%; margin: 0 auto; }
.ol-read-subject { margin: 0 0 18px; font-size: 1.35rem; line-height: 1.3; letter-spacing: -.02em; }
.ol-read-header { display: flex; gap: 12px; margin-bottom: 18px; }
.ol-read-meta { min-width: 0; font-size: .86rem; }
.ol-read-from { font-weight: 700; font-size: .95rem; margin-bottom: 4px; }
.ol-read-line { color: var(--muted); margin-top: 2px; word-break: break-word; }
.ol-read-line span { color: var(--text); font-weight: 600; margin-right: 4px; }
.ol-attach { margin-bottom: 18px; }
.ol-attach-title {
  display: flex; align-items: center; gap: 7px;
  font-size: .8rem; font-weight: 600; color: var(--muted);
  margin-bottom: 10px;
}
.ol-attach-title .ic { color: var(--primary); }
.ol-attach-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.ol-attach-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: inherit; text-decoration: none;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.ol-attach-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(37,99,235,.14);
}
.ol-attach-ico {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary);
}
.ol-attach-info { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.ol-attach-name {
  font-size: .84rem; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ol-attach-size { font-size: .74rem; color: var(--muted); margin-top: 2px; }
.ol-attach-dl { color: var(--muted); flex-shrink: 0; }
.ol-attach-card:hover .ol-attach-dl { color: var(--primary); }
.ol-attach-flag { color: var(--muted); margin-right: 3px; }
.ol-attach-flag .ic { vertical-align: -0.15em; }
.ol-read-body {
  border-top: 1px solid var(--border);
  padding-top: 18px;
}
.ol-text {
  margin: 0; white-space: pre-wrap; word-break: break-word;
  font: inherit; line-height: 1.55; font-size: .95rem;
}
.ol-html {
  width: 100%; min-height: 360px; border: none;
  background: #fff; border-radius: 4px;
}
.ol-muted { color: var(--muted); }
.ol-read-empty {
  flex: 1; display: grid; place-content: center; text-align: center;
  padding: 40px 24px; color: var(--muted);
}
.ol-read-empty-icon { margin-bottom: 12px; opacity: .9; }
.ol-read-empty h2 { margin: 0 0 6px; color: var(--text); font-size: 1.15rem; }
.ol-read-empty p { margin: 0; font-size: .92rem; }

/* —— Inline compose (in reading pane) —— */
.ol-compose-pane {
  display: flex; flex-direction: column;
  height: 100%; min-height: 0;
  background: var(--surface);
}
.ol-compose-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.ol-compose-heading {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 1.02rem; font-weight: 700; letter-spacing: -.01em;
}
.ol-compose-heading-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--primary-soft); color: var(--primary);
}
.ol-compose-error {
  display: flex; align-items: center; gap: 8px;
  margin: 12px 16px 0; padding: 10px 12px; border-radius: 8px;
  background: #fef2f2; color: var(--danger);
  border: 1px solid #fecaca; font-size: .86rem;
}
html[data-theme="dark"] .ol-compose-error { background: #450a0a; border-color: #7f1d1d; color: #fecaca; }
.ol-compose-body {
  display: flex; flex-direction: column;
  flex: 1; min-height: 0; overflow-y: auto;
}
.ol-compose-body textarea {
  flex: 1; min-height: 200px; border: none; resize: none;
  padding: 16px; font: inherit; font-size: .95rem; line-height: 1.55;
  color: var(--text); background: var(--surface); outline: none;
}
.compose-editor-wrap {
  flex: 1; min-height: 220px; display: flex; flex-direction: column;
  background: var(--surface);
}
.compose-editor { flex: 1; min-height: 180px; display: flex; flex-direction: column; }
.compose-editor .ql-toolbar.ql-snow {
  border: none; border-bottom: 1px solid var(--border);
  background: var(--surface-2); padding: 8px 10px;
}
.compose-editor .ql-container.ql-snow {
  border: none; flex: 1; font: inherit; font-size: .95rem; background: var(--surface);
}
.compose-editor .ql-editor {
  min-height: 180px; padding: 16px; line-height: 1.55; color: var(--text);
}
.compose-editor .ql-editor.ql-blank::before {
  color: var(--muted); font-style: normal; left: 16px; right: 16px;
}
html[data-theme="dark"] .compose-editor .ql-toolbar.ql-snow,
html[data-theme="dark"] .compose-editor .ql-container.ql-snow {
  color: var(--text);
}
html[data-theme="dark"] .compose-editor .ql-snow .ql-stroke { stroke: #94a3b8; }
html[data-theme="dark"] .compose-editor .ql-snow .ql-fill { fill: #94a3b8; }
html[data-theme="dark"] .compose-editor .ql-snow .ql-picker { color: #cbd5e1; }
html[data-theme="dark"] .compose-editor .ql-snow .ql-picker-options {
  background: var(--surface); border-color: var(--border);
}
html[data-theme="dark"] .compose-editor .ql-snow .ql-picker-item:hover { color: var(--primary); }
html[data-theme="dark"] .compose-editor .ql-snow button:hover .ql-stroke,
html[data-theme="dark"] .compose-editor .ql-snow .ql-picker-label:hover .ql-stroke,
html[data-theme="dark"] .compose-editor .ql-snow button.ql-active .ql-stroke {
  stroke: var(--primary);
}
html[data-theme="dark"] .compose-editor .ql-snow button:hover .ql-fill,
html[data-theme="dark"] .compose-editor .ql-snow button.ql-active .ql-fill {
  fill: var(--primary);
}
.ol-compose-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-top: 1px solid var(--border);
  background: var(--surface-2); flex-shrink: 0;
}
.ol-ribbon-btn-ghost {
  color: var(--text); border: 1px solid var(--border);
}
.ol-ribbon-btn-ghost .ic { color: var(--muted); }
.ol-ribbon-btn-ghost:hover { background: var(--bg-soft); }

/* —— Compose form fields (shared) —— */
.compose-field {
  display: grid; grid-template-columns: 56px 1fr;
  align-items: center; gap: 8px;
  padding: 0 14px; border-bottom: 1px solid var(--border); min-height: 44px;
}
.compose-field label { font-size: .85rem; color: var(--muted); font-weight: 600; }
.compose-field input {
  border: none; background: transparent; font: inherit; color: var(--text);
  padding: 10px 0; outline: none; width: 100%;
}
.compose-attach {
  padding: 10px 16px 4px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.compose-attach-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.compose-attach-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 6px; cursor: pointer;
  font-size: .85rem; font-weight: 600;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--border));
}
.compose-attach-btn:hover {
  background: color-mix(in srgb, var(--primary) 16%, transparent);
}
.compose-attach-hint { font-size: .78rem; color: var(--muted); }
.compose-attach-list {
  list-style: none; margin: 8px 0 4px; padding: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.compose-attach-list:empty { display: none; }
.compose-attach-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 10px; border-radius: 6px; font-size: .82rem;
  background: var(--surface); border: 1px solid var(--border);
}
.compose-attach-item span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compose-attach-item button {
  border: none; background: transparent; color: var(--muted);
  cursor: pointer; font-size: 1rem; line-height: 1; padding: 2px 4px;
}
.compose-attach-item button:hover { color: #dc2626; }

@media (max-width: 899px) {
  .ol-product { display: none; }
  .ol-search { display: none; }
  .ol-top { gap: 8px; padding: 0 10px; }
  .ol-top-left { flex: 0 0 auto; }
  .ol-top-right { flex: 1 1 auto; justify-content: flex-end; }
  .ol-logo { height: 28px; max-height: 28px; }
  .ol-ribbon { padding: 8px 10px; gap: 5px; }
  .ol-ribbon-meta { display: none; }
  .ol-read-inner { padding: 16px 14px 32px; }
  .ol-read-subject { font-size: 1.15rem; }
}

/* —— Install (telefona kur) page —— */
.page-install { background: var(--bg); }
.install { min-height: 100dvh; }
.install-top {
  display: flex; align-items: center; gap: 14px;
  padding: 0 16px; height: 56px;
  background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.install-logo { display: block; height: 26px; margin-left: auto; }
.install-main { max-width: 720px; margin: 0 auto; padding: 24px 16px 60px; }
.install-hero { text-align: center; margin-bottom: 26px; }
.install-hero-ico {
  width: 62px; height: 62px; margin: 0 auto 14px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 16px; color: #fff;
  background: linear-gradient(135deg, #7f88e6, #4f52c0);
  box-shadow: 0 10px 26px rgba(79,82,192,.35);
}
.install-hero h1 { margin: 0 0 8px; font-size: 1.5rem; letter-spacing: -.02em; }
.install-hero p { margin: 0 auto; max-width: 460px; color: var(--muted); font-size: .95rem; line-height: 1.5; }

.install-tabs {
  display: flex; gap: 6px; padding: 5px;
  background: var(--bg-soft); border-radius: 12px; margin-bottom: 20px;
}
.install-tab {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 12px; border: none; background: transparent; cursor: pointer;
  border-radius: 9px; font: inherit; font-weight: 600; font-size: .9rem; color: var(--muted);
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.install-tab .ic { color: currentColor; }
.install-tab.is-active {
  background: var(--surface); color: var(--primary);
  box-shadow: 0 2px 8px rgba(15,23,42,.08);
}
.install-panel { display: none; }
.install-panel.is-active { display: block; animation: fadeUp .25s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.install-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px; margin-bottom: 16px;
}
.install-cta {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(127,136,230,.12), rgba(79,82,192,.06));
  border-color: color-mix(in srgb, var(--primary) 25%, var(--border));
}
.install-cta-text { flex: 1; min-width: 200px; }
.install-cta-text h2 { margin: 0 0 4px; font-size: 1.05rem; }
.install-cta-text p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.45; }
.install-dl { white-space: nowrap; }

.install-steps { display: grid; gap: 12px; margin: 4px 2px 8px; }
.install-step { display: flex; align-items: flex-start; gap: 12px; font-size: .92rem; line-height: 1.45; }
.install-step .ic { color: var(--success); vertical-align: -.15em; }
.install-step-no {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary);
  font-size: .8rem; font-weight: 700;
}
.install-note { font-size: .82rem; color: var(--muted); margin: 12px 2px 0; }

.install-card-head {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: .95rem; margin-bottom: 14px;
}
.install-card-head .ic { color: var(--primary); }
.install-settings { display: grid; gap: 8px; }
.install-set-group {
  border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; display: grid; gap: 6px;
}
.install-set-title {
  display: flex; align-items: center; gap: 7px;
  font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); margin-bottom: 2px;
}
.install-set-title .ic { color: var(--primary); }
.install-set {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: .88rem; color: var(--muted); padding: 4px 2px;
}
.install-set > b { color: var(--text); font-weight: 600; }
.install-copy {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--border); background: var(--surface-2);
  border-radius: 8px; padding: 6px 10px; cursor: pointer;
  font: inherit; font-size: .85rem; color: var(--text); max-width: 62%;
  transition: border-color .12s ease, background .12s ease;
}
.install-copy b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.install-copy .ic { color: var(--muted); flex-shrink: 0; }
.install-copy:hover { border-color: var(--primary); }
.install-copy.is-copied { border-color: var(--success); color: var(--success); }
.install-copy.is-copied .ic { color: var(--success); }
