/* Wesoco Posta — monochrome, Gmail-like layout, 3D touches */
:root {
  --bg: #060606;
  --panel: #0e0e0e;
  --panel-2: #141414;
  --line: rgba(255,255,255,.07);
  --line-2: rgba(255,255,255,.12);
  --text: #f2f2f2;
  --muted: rgba(255,255,255,.55);
  --faint: rgba(255,255,255,.35);
  --hover: rgba(255,255,255,.05);
  --accent: #fff;
  --radius: 16px;
  --ease: cubic-bezier(.2,.8,.2,1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
::selection { background: rgba(255,255,255,.28); }

/* ================= LOGIN (3D) ================= */
.login { position: fixed; inset: 0; display: grid; place-items: center; overflow: hidden; perspective: 1400px;
  background: radial-gradient(1200px 700px at 50% 115%, rgba(255,255,255,.12), transparent 60%), radial-gradient(800px 500px at 50% 40%, rgba(255,255,255,.05), transparent 70%), #030303; }
.scene { position: absolute; inset: 0; transform-style: preserve-3d; pointer-events: none; }
.orbit { position: absolute; left: 50%; top: 48%; border-radius: 50%; transform-style: preserve-3d; }
.o1 { width: 1000px; height: 1000px; margin: -500px 0 0 -500px; border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 0 80px rgba(255,255,255,.07), inset 0 0 80px rgba(255,255,255,.04); animation: orbitA 28s linear infinite; }
.o2 { width: 760px; height: 760px; margin: -380px 0 0 -380px; border: 1.5px solid transparent;
  border-top-color: rgba(255,255,255,.7); border-left-color: rgba(255,255,255,.2); filter: drop-shadow(0 0 12px rgba(255,255,255,.45)); animation: orbitB 12s linear infinite; }
.o3 { width: 1300px; height: 1300px; margin: -650px 0 0 -650px; border: 1px dashed rgba(255,255,255,.08); animation: orbitC 70s linear infinite reverse; }
.core { position: absolute; left: 50%; top: 46%; width: 460px; height: 460px; margin: -230px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, rgba(255,255,255,.3), rgba(255,255,255,.05) 45%, transparent 70%); filter: blur(46px); animation: breathe 8s ease-in-out infinite; }
.floor { position: absolute; left: -50%; right: -50%; bottom: -30%; height: 70%;
  background: radial-gradient(closest-side, rgba(255,255,255,.08), transparent); transform: rotateX(80deg); }
@keyframes orbitA { from { transform: rotateX(72deg) rotateZ(0); } to { transform: rotateX(72deg) rotateZ(360deg); } }
@keyframes orbitB { from { transform: rotateX(63deg) rotateY(16deg) rotateZ(0); } to { transform: rotateX(63deg) rotateY(16deg) rotateZ(360deg); } }
@keyframes orbitC { from { transform: rotateX(78deg) rotateZ(0); } to { transform: rotateX(78deg) rotateZ(360deg); } }
@keyframes breathe { 0%,100% { opacity: .55; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.08); } }

.login-card { position: relative; width: min(400px, calc(100vw - 32px)); padding: 40px 34px 32px; border-radius: 26px; overflow: hidden;
  background: linear-gradient(160deg, rgba(255,255,255,.11), rgba(255,255,255,.02) 45%, rgba(255,255,255,.05));
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 60px 120px -30px rgba(0,0,0,.95), 0 30px 70px -40px rgba(255,255,255,.18), inset 0 1px 0 rgba(255,255,255,.28);
  backdrop-filter: blur(24px) saturate(140%); -webkit-backdrop-filter: blur(24px) saturate(140%);
  transform-style: preserve-3d; transform: rotateX(var(--rx, 10deg)) rotateY(var(--ry, -8deg));
  transition: transform .5s var(--ease); animation: cardIn 1s var(--ease) both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(40px) rotateX(30deg) scale(.94); } }
.sheen { position: absolute; inset: -40% -60%; pointer-events: none; background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.16) 50%, transparent 60%); animation: sheen 6.5s ease-in-out infinite; }
@keyframes sheen { 0% { transform: translateX(-60%); } 55%,100% { transform: translateX(60%); } }
.login-logo { display: block; width: 200px; margin: 0 auto 30px; transform: translateZ(40px);
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.9)) drop-shadow(0 0 22px rgba(255,255,255,.18)); }
.field { display: block; margin-bottom: 14px; transform: translateZ(24px); }
.field span { display: block; font-size: 12px; color: var(--muted); margin: 0 0 6px 4px; letter-spacing: .02em; }
.field input { width: 100%; height: 48px; padding: 0 16px; border-radius: 14px; background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.14);
  box-shadow: inset 0 2px 8px rgba(0,0,0,.55); font-size: 15px; outline: none; transition: border-color .2s, box-shadow .2s; }
.field input:focus { border-color: rgba(255,255,255,.6); box-shadow: inset 0 2px 8px rgba(0,0,0,.55), 0 0 0 4px rgba(255,255,255,.08), 0 0 28px rgba(255,255,255,.12); }
.login-error { min-height: 20px; margin: 2px 4px 10px; font-size: 13px; color: #ff8a8a; }
.btn-3d { width: 100%; height: 52px; border-radius: 15px; color: #000; font-weight: 700; letter-spacing: .04em; transform: translateZ(36px) translateY(-4px);
  background: linear-gradient(180deg, #fff, #d6d6d6); box-shadow: inset 0 1px 0 #fff, inset 0 -3px 0 rgba(0,0,0,.18), 0 16px 36px rgba(255,255,255,.16), 0 6px 0 #808080;
  transition: transform .12s, box-shadow .12s; }
.btn-3d:hover { box-shadow: inset 0 1px 0 #fff, inset 0 -3px 0 rgba(0,0,0,.18), 0 20px 44px rgba(255,255,255,.26), 0 6px 0 #808080; }
.btn-3d:active { transform: translateZ(36px) translateY(2px); box-shadow: inset 0 1px 0 #fff, 0 6px 16px rgba(255,255,255,.12), 0 0 0 #808080; }
.btn-3d[disabled] { opacity: .6; cursor: wait; }
.login.shake .login-card { animation: shake .45s; }
@keyframes shake { 20%,60% { translate: -10px 0; } 40%,80% { translate: 10px 0; } }
.login.leaving .login-card { transition: transform .7s var(--ease), opacity .7s; transform: translateZ(400px) rotateX(-20deg); opacity: 0; }
.login.leaving .scene { transition: opacity .7s; opacity: 0; }

/* ================= APP LAYOUT ================= */
.app { position: fixed; inset: 0; display: grid; grid-template-columns: 256px 1fr; grid-template-rows: 64px 1fr; animation: appIn .7s var(--ease) both; }
@keyframes appIn { from { opacity: 0; transform: perspective(1200px) translateZ(-120px) rotateX(6deg); } }
.topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 0 16px 0 22px; }
.brand { height: 18px; width: auto; margin-right: 46px; }
.search { flex: 1; max-width: 720px; height: 46px; display: flex; align-items: center; gap: 10px; padding: 0 16px; border-radius: 23px;
  background: var(--panel-2); border: 1px solid var(--line); transition: background .2s, border-color .2s, box-shadow .2s; }
.search:focus-within { background: #1b1b1b; border-color: var(--line-2); box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.search svg { color: var(--muted); }
.search input { flex: 1; background: none; border: 0; outline: none; font-size: 15px; }
.search kbd { font: 11px var(--font); color: var(--faint); border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 6px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; position: relative; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 50%; color: rgba(255,255,255,.75); transition: background .15s, color .15s, transform .15s; }
.icon-btn:hover { background: var(--hover); color: #fff; }
.icon-btn:active { transform: scale(.92); }
.icon-btn.sm { width: 32px; height: 32px; }
.icon-btn.sm svg { width: 18px; height: 18px; }
.avatar-btn { padding: 4px; border-radius: 50%; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #000;
  background: linear-gradient(145deg, #fff, #bdbdbd); box-shadow: 0 4px 12px rgba(0,0,0,.5), inset 0 -2px 0 rgba(0,0,0,.15); }
.menu { position: absolute; z-index: 50; min-width: 220px; padding: 6px; border-radius: 14px; background: #161616; border: 1px solid var(--line-2);
  box-shadow: 0 24px 60px rgba(0,0,0,.65); transform-origin: top right; animation: pop .18s var(--ease); }
#account-menu { right: 0; top: 50px; }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(-6px); } }
.menu-head { padding: 10px 12px; color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; text-align: left; }
.menu button:hover { background: var(--hover); }
.menu svg { width: 18px; height: 18px; }

/* sidebar */
.sidebar { display: flex; flex-direction: column; padding: 6px 10px 10px 10px; min-height: 0; }
.compose-btn { display: inline-flex; align-items: center; gap: 12px; height: 56px; padding: 0 26px 0 20px; margin: 4px 0 14px; border-radius: 18px; align-self: flex-start;
  background: linear-gradient(180deg, #fff, #dcdcdc); color: #000; font-weight: 600; font-size: 14.5px;
  box-shadow: inset 0 1px 0 #fff, 0 10px 26px rgba(255,255,255,.12), 0 4px 0 #8a8a8a; transform: translateY(-3px); transition: transform .12s, box-shadow .2s; }
.compose-btn:hover { box-shadow: inset 0 1px 0 #fff, 0 14px 34px rgba(255,255,255,.2), 0 4px 0 #8a8a8a; }
.compose-btn:active { transform: translateY(1px); box-shadow: inset 0 1px 0 #fff, 0 4px 12px rgba(255,255,255,.1), 0 0 0 #8a8a8a; }
.folders { list-style: none; margin: 0; padding: 0; overflow: auto; flex: 1; }
.folders li a { display: flex; align-items: center; gap: 16px; height: 36px; padding: 0 14px 0 18px; border-radius: 0 18px 18px 0; margin-left: -10px;
  color: rgba(255,255,255,.78); text-decoration: none; transition: background .15s, color .15s; cursor: pointer; }
.folders li a:hover { background: var(--hover); color: #fff; }
.folders li a.active { background: #fff; color: #000; font-weight: 600; }
.folders li a .count { margin-left: auto; font-size: 12px; font-weight: 700; }
.folders li a svg { width: 19px; height: 19px; }
.folders .sep { height: 1px; background: var(--line); margin: 10px 14px; }
.sidebar-foot { padding: 10px 8px 0; font-size: 12px; color: var(--faint); }

/* content */
.content { min-width: 0; min-height: 0; margin: 0 16px 16px 0; border-radius: 22px; background: var(--panel); border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0,0,0,.45); overflow: hidden; display: flex; flex-direction: column; position: relative; }
.list-view, .read-view { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.list-toolbar, .read-toolbar { display: flex; align-items: center; gap: 2px; height: 52px; padding: 0 10px 0 16px; border-bottom: 1px solid var(--line); flex: none; }
.list-toolbar h1 { font-size: 15px; font-weight: 600; margin: 0 0 0 10px; }
.spacer { flex: 1; }
.range { font-size: 12px; color: var(--muted); margin-right: 6px; }
.bulk { display: flex; animation: pop .15s; }
.check { display: inline-grid; place-items: center; width: 36px; height: 36px; cursor: pointer; }
.check input { display: none; }
.check span { width: 17px; height: 17px; border-radius: 5px; border: 1.6px solid rgba(255,255,255,.45); transition: all .15s; }
.check input:checked + span { background: #fff; border-color: #fff; box-shadow: inset 0 0 0 3px #000; }
.messages { list-style: none; margin: 0; padding: 0; overflow: auto; flex: 1; }
.msg { display: grid; grid-template-columns: 36px 30px 200px 1fr auto; align-items: center; height: 46px; padding: 0 16px 0 8px; border-bottom: 1px solid rgba(255,255,255,.035);
  cursor: pointer; position: relative; transition: background .12s, transform .25s var(--ease), box-shadow .25s; animation: rowIn .4s var(--ease) both; }
@keyframes rowIn { from { opacity: 0; transform: perspective(800px) rotateX(-35deg) translateY(-6px); transform-origin: top; } }
.msg:hover { background: #151515; z-index: 1; box-shadow: 0 6px 18px rgba(0,0,0,.55), inset 1px 0 0 var(--line-2), inset -1px 0 0 var(--line-2); transform: translateZ(0) scale(1.004); }
.msg.selected { background: rgba(255,255,255,.08); }
.msg .from, .msg .line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg .from { color: var(--muted); padding-right: 14px; }
.msg .line { color: var(--faint); }
.msg .line b { color: var(--muted); font-weight: 400; }
.msg.unread .from, .msg.unread .line b { color: #fff; font-weight: 700; }
.msg.unread::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: #fff; box-shadow: 0 0 10px rgba(255,255,255,.6); }
.msg .date { font-size: 12px; color: var(--muted); padding-left: 12px; }
.msg.unread .date { color: #fff; font-weight: 700; }
.msg .clip { width: 14px; height: 14px; margin-left: 8px; vertical-align: -2px; color: var(--muted); }
.msg .hover-acts { display: none; gap: 2px; }
.msg:hover .hover-acts { display: flex; }
.msg:hover .date { display: none; }
.star { color: var(--faint); }
.star svg { width: 18px; height: 18px; }
.star.on { color: #fff; }
.star.on svg { fill: #fff; }

/* empty */
.empty { flex: 1; display: grid; place-content: center; justify-items: center; gap: 18px; color: var(--muted); }
.empty-art { perspective: 600px; }
.cube { width: 64px; height: 64px; position: relative; transform-style: preserve-3d; animation: spin 9s linear infinite; }
.cube i { position: absolute; inset: 0; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.04); box-shadow: inset 0 0 18px rgba(255,255,255,.1); }
.cube i:nth-child(1) { transform: translateZ(32px); } .cube i:nth-child(2) { transform: rotateY(180deg) translateZ(32px); }
.cube i:nth-child(3) { transform: rotateY(90deg) translateZ(32px); } .cube i:nth-child(4) { transform: rotateY(-90deg) translateZ(32px); }
.cube i:nth-child(5) { transform: rotateX(90deg) translateZ(32px); } .cube i:nth-child(6) { transform: rotateX(-90deg) translateZ(32px); }
@keyframes spin { from { transform: rotateX(-24deg) rotateY(0); } to { transform: rotateX(-24deg) rotateY(360deg); } }

/* reading */
.read-view { overflow: auto; animation: readIn .35s var(--ease); }
@keyframes readIn { from { opacity: 0; transform: perspective(1200px) rotateY(-6deg) translateX(30px); } }
.read-toolbar { position: sticky; top: 0; background: var(--panel); z-index: 2; }
.move-wrap { position: relative; }
#move-menu { left: 0; top: 44px; max-height: 320px; overflow: auto; }
.read-subject { font-size: 22px; font-weight: 600; margin: 22px 28px 8px 72px; }
.thread { padding: 0 20px 30px; }
.mail { border-radius: 16px; margin: 10px 0; transition: background .2s; }
.mail.collapsed { cursor: pointer; }
.mail.collapsed:hover { background: var(--hover); }
.mail-head { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 12px 12px 8px; }
.mail-head .avatar { width: 40px; height: 40px; }
.mail-from b { font-weight: 600; } .mail-from span { color: var(--muted); font-size: 12.5px; }
.mail-to { color: var(--muted); font-size: 12.5px; }
.mail-date { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 4px; }
.mail-snippet { color: var(--muted); padding: 0 12px 14px 68px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-body { margin: 0 12px 0 68px; }
.mail-body iframe { width: 100%; border: 0; border-radius: 12px; background: #fff; min-height: 120px; display: block; }
.mail-body pre { white-space: pre-wrap; font: 14px/1.6 var(--font); margin: 0; color: #e8e8e8; }
.images-note { display: flex; align-items: center; gap: 10px; margin: 0 12px 10px 68px; padding: 8px 12px; border-radius: 10px; background: var(--panel-2); color: var(--muted); font-size: 13px; }
.images-note button { color: #fff; text-decoration: underline; }
.files { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 12px 0 68px; }
.file { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); color: #fff; text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .2s; }
.file:hover { transform: translateY(-2px) rotateX(8deg); box-shadow: 0 12px 24px rgba(0,0,0,.5); }
.file small { color: var(--muted); }
.reply-bar { display: flex; gap: 10px; margin: 18px 12px 0 68px; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 18px; border-radius: 19px; border: 1px solid var(--line-2); color: #fff; transition: background .15s, transform .15s; }
.pill:hover { background: var(--hover); transform: translateY(-1px); }
.pill svg { width: 18px; height: 18px; }

/* composer: floating 3D window, bottom right */
.composers { position: fixed; right: 24px; bottom: 0; display: flex; gap: 14px; align-items: flex-end; z-index: 40; perspective: 1400px; }
.composer { width: 560px; height: min(560px, calc(100vh - 90px)); display: flex; flex-direction: column; border-radius: 18px 18px 0 0; background: #121212; border: 1px solid var(--line-2); border-bottom: 0;
  box-shadow: 0 -10px 80px rgba(0,0,0,.75), 0 0 0 1px rgba(0,0,0,.6); transform-origin: bottom center; animation: composeIn .45s var(--ease) both; overflow: hidden; }
@keyframes composeIn { from { opacity: 0; transform: rotateX(40deg) translateY(120px) scale(.9); } }
.composer.closing { animation: composeOut .3s var(--ease) both; }
@keyframes composeOut { to { opacity: 0; transform: rotateX(30deg) translateY(160px) scale(.9); } }
.composer.min { height: 48px; width: 300px; }
.composer.min .composer-body, .composer.min .composer-foot { display: none; }
.composer.max { position: fixed; inset: 6vh 8vw; width: auto; height: auto; border-radius: 20px; border-bottom: 1px solid var(--line-2); }
.composer-head { display: flex; align-items: center; gap: 2px; height: 48px; padding: 0 8px 0 18px; background: #1b1b1b; cursor: pointer; flex: none; }
.composer-title { flex: 1; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.composer-body { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 0 18px; }
.row { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); min-height: 42px; }
.row label { color: var(--muted); font-size: 13px; width: 40px; }
.row input { flex: 1; background: none; border: 0; outline: none; font-size: 14px; height: 40px; }
.link { color: var(--muted); font-size: 13px; padding: 4px 6px; border-radius: 6px; }
.link:hover { color: #fff; background: var(--hover); }
.editor { flex: 1; overflow: auto; outline: none; padding: 14px 0; font-size: 14.5px; line-height: 1.6; }
.editor:empty::before { content: "Mesajını yaz…"; color: var(--faint); }
.editor blockquote { margin: 8px 0; padding-left: 12px; border-left: 2px solid var(--line-2); color: var(--muted); }
.attachments { list-style: none; margin: 0; padding: 0 0 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.attachments li { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 10px; background: var(--panel-2); font-size: 13px; }
.attachments li.up { opacity: .5; }
.composer-foot { display: flex; align-items: center; gap: 8px; padding: 10px 14px 14px; border-top: 1px solid var(--line); flex: none; }
.send-btn { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 22px; border-radius: 20px; font-weight: 700; color: #000;
  background: linear-gradient(180deg, #fff, #d6d6d6); box-shadow: inset 0 1px 0 #fff, 0 3px 0 #808080, 0 10px 24px rgba(255,255,255,.12); transform: translateY(-2px); transition: transform .12s, box-shadow .12s; }
.send-btn:active { transform: translateY(1px); box-shadow: inset 0 1px 0 #fff, 0 0 0 #808080; }
.send-btn svg { width: 17px; height: 17px; }
.send-btn[disabled] { opacity: .6; }
.fmt { display: flex; gap: 2px; }

/* toasts */
.toasts { position: fixed; left: 24px; bottom: 24px; display: flex; flex-direction: column; gap: 10px; z-index: 60; perspective: 800px; }
.toast { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 12px; background: #f2f2f2; color: #000; font-weight: 500;
  box-shadow: 0 20px 50px rgba(0,0,0,.6); animation: toastIn .4s var(--ease) both; }
.toast button { color: #000; font-weight: 700; text-decoration: underline; }
.toast.out { animation: toastOut .3s ease both; }
@keyframes toastIn { from { opacity: 0; transform: rotateX(-70deg) translateY(20px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(20px) scale(.95); } }

/* loading shimmer */
.skeleton { height: 46px; border-bottom: 1px solid rgba(255,255,255,.03); background: linear-gradient(90deg, transparent, rgba(255,255,255,.04), transparent); background-size: 300% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.only-mobile { display: none; }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .only-mobile { display: inline-grid; }
  .brand { display: none; }
  .search kbd { display: none; }
  .sidebar { position: fixed; z-index: 45; top: 64px; bottom: 0; left: 0; width: 272px; background: #0a0a0a; border-right: 1px solid var(--line); transform: translateX(-100%); transition: transform .3s var(--ease); }
  .sidebar.open { transform: none; box-shadow: 30px 0 80px rgba(0,0,0,.7); }
  .content { margin: 0 8px 8px; }
  .msg { grid-template-columns: 30px 1fr auto; height: auto; padding: 10px 12px 10px 6px; }
  .msg .check { display: none; }
  .msg .from { grid-column: 2; } .msg .line { grid-column: 2 / -1; grid-row: 2; }
  .read-subject { margin-left: 20px; } .mail-body, .files, .reply-bar, .images-note, .mail-snippet { margin-left: 12px; padding-left: 0; }
  .composers { right: 0; left: 0; } .composer { width: 100%; height: 88vh; border-radius: 18px 18px 0 0; }
  .login-card { transform: none !important; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ================= EXTRAS: calendar, contacts, settings ================= */
.apps { flex: none; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); overflow: visible; }
.app-view { display: flex; flex-direction: column; min-height: 0; flex: 1; animation: readIn .35s var(--ease); }
.pill.sm-pill { height: 34px; padding: 0 14px; margin-right: 6px; }
.list-toolbar .pill { height: 36px; }

.cal-wrap { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 0 12px 12px; perspective: 1600px; }
.cal-head { display: grid; grid-template-columns: repeat(7, 1fr); padding: 10px 0 6px; }
.cal-head div { text-align: center; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.cal-grid { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: repeat(6, 1fr); gap: 6px; min-height: 0; transform-style: preserve-3d; }
.cal-grid.flip { animation: calFlip .5s var(--ease); }
@keyframes calFlip { from { opacity: .2; transform: rotateX(-18deg) translateY(16px); } }
.cal-cell { position: relative; border-radius: 14px; background: rgba(255,255,255,.025); border: 1px solid var(--line); padding: 6px 6px 4px; overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column; gap: 3px; transition: background .15s, transform .2s var(--ease), box-shadow .2s; animation: rowIn .45s var(--ease) both; }
.cal-cell:hover { background: rgba(255,255,255,.05); transform: translateZ(14px); box-shadow: 0 14px 30px rgba(0,0,0,.5); }
.cal-cell.out { opacity: .38; }
.cal-num { font-size: 12.5px; font-weight: 600; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.cal-cell.today .cal-num { background: #fff; color: #000; box-shadow: 0 0 18px rgba(255,255,255,.45); }
.cal-events { display: flex; flex-direction: column; gap: 3px; min-height: 0; }
.cal-chip { text-align: left; font-size: 12px; padding: 3px 8px; border-radius: 7px; background: rgba(255,255,255,.12); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-left: 2px solid #fff; transition: background .15s; }
.cal-chip:hover { background: rgba(255,255,255,.22); }
.cal-chip.allday { background: #fff; color: #000; font-weight: 600; border-left: 0; }
.cal-more { font-size: 11px; color: var(--muted); padding-left: 6px; }

.mini-search { height: 36px; margin-left: 14px; width: min(320px, 40vw); padding: 0 14px; border-radius: 18px; background: var(--panel-2); border: 1px solid var(--line); outline: none; }
.mini-search:focus { border-color: var(--line-2); }
.contacts { list-style: none; margin: 0; padding: 8px 10px; overflow: auto; flex: 1; }
.contact { display: grid; grid-template-columns: 44px 1.4fr 1fr 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; cursor: pointer;
  transition: background .15s, transform .2s var(--ease); animation: rowIn .4s var(--ease) both; }
.contact:hover { background: var(--hover); transform: translateX(4px); }
.contact .avatar { width: 40px; height: 40px; }
.c-main { display: flex; flex-direction: column; min-width: 0; }
.c-main b, .c-mail, .c-org, .c-phone { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-mail, .c-org, .c-phone { color: var(--muted); font-size: 13px; }
.c-acts { display: flex; opacity: 0; transition: opacity .15s; }
.contact:hover .c-acts { opacity: 1; }

.settings { flex: 1; overflow: auto; padding: 18px 28px 40px; max-width: 860px; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); margin-bottom: 22px; }
.tabs button { padding: 8px 16px; border-radius: 10px; color: var(--muted); transition: background .15s, color .15s; }
.tabs button.on { background: #fff; color: #000; font-weight: 600; }
.tab { display: flex; flex-direction: column; gap: 14px; animation: readIn .3s var(--ease); }
.set-row { display: flex; flex-direction: column; gap: 6px; }
.set-row > span { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.set-row > span svg { width: 15px; height: 15px; }
.set-row input, .set-row textarea, .rule-new input, .rule-new select, .big-input {
  height: 42px; padding: 0 14px; border-radius: 12px; background: rgba(0,0,0,.35); border: 1px solid var(--line-2); outline: none; color: #fff; font: inherit; }
.set-row textarea { height: auto; padding: 10px 14px; resize: vertical; line-height: 1.5; }
.set-row input:focus, .set-row textarea:focus, .rule-new input:focus, .big-input:focus { border-color: rgba(255,255,255,.5); box-shadow: 0 0 0 3px rgba(255,255,255,.06); }
.set-row input[type=date], .set-row input[type=time] { color-scheme: dark; }
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.editor.boxed { min-height: 120px; padding: 12px 14px; border-radius: 12px; background: rgba(0,0,0,.35); border: 1px solid var(--line-2); }
.editor.boxed:empty::before { content: "İmzan… (ad, unvan, telefon)"; }
.hint { color: var(--faint); font-size: 12.5px; margin: 0; }
.tab .send-btn { align-self: flex-start; }
.switch-row { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.switch-row input { display: none; }
.switch { width: 44px; height: 26px; border-radius: 13px; background: rgba(255,255,255,.15); position: relative; transition: background .2s; flex: none; }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.switch-row input:checked + .switch { background: #fff; }
.switch-row input:checked + .switch::after { transform: translateX(18px); background: #000; }
.rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rules li { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); animation: rowIn .3s var(--ease); }
.rules li span { flex: 1; }
.rules li.muted { color: var(--faint); }
.rule-new { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px; border-radius: 16px; border: 1px dashed var(--line-2); }
.rule-new > span { color: var(--muted); font-size: 13px; }
.rule-new input { flex: 1; min-width: 160px; }
.rule-new select { padding: 0 10px; color-scheme: dark; }

.modal-wrap { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: rgba(0,0,0,.55); backdrop-filter: blur(6px); perspective: 1400px; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal-card { width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); overflow: auto; padding: 20px 22px; border-radius: 22px; background: #131313; border: 1px solid var(--line-2);
  box-shadow: 0 50px 120px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 14px; animation: modalIn .45s var(--ease); }
@keyframes modalIn { from { opacity: 0; transform: rotateX(25deg) translateY(40px) scale(.94); } }
.modal-head { display: flex; align-items: center; }
.modal-head h2 { flex: 1; margin: 0; font-size: 18px; }
.modal-foot { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.big-input { height: 50px; font-size: 18px; }
.pill.danger { color: #ff8a8a; border-color: rgba(255,120,120,.3); }

.composer-body { position: relative; }
.suggest { position: absolute; z-index: 5; list-style: none; margin: 0; padding: 6px; min-width: 300px; border-radius: 14px; background: #1a1a1a; border: 1px solid var(--line-2);
  box-shadow: 0 20px 50px rgba(0,0,0,.7); animation: pop .15s var(--ease); }
.suggest li { display: grid; grid-template-columns: 30px auto 1fr; gap: 10px; align-items: center; padding: 6px 10px; border-radius: 9px; cursor: pointer; }
.suggest li:hover { background: var(--hover); }
.suggest .avatar { width: 28px; height: 28px; font-size: 12px; }
.suggest li span:last-child { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.signature { color: var(--muted); }
@media (max-width: 860px) {
  .contact { grid-template-columns: 44px 1fr auto; } .c-org, .c-phone { display: none; }
  .set-grid { grid-template-columns: 1fr; } .settings { padding: 14px; }
  .cal-chip { font-size: 10.5px; padding: 2px 4px; }
}

/* ================= PROFILE PHOTO ================= */
.avatar.photo { background-size: cover !important; background-position: center; color: transparent; }
.avatar.lg { width: 48px; height: 48px; font-size: 18px; }
.avatar.xl { width: 84px; height: 84px; font-size: 32px; box-shadow: 0 14px 34px rgba(0,0,0,.45), inset 0 -3px 0 rgba(0,0,0,.15); transition: transform .3s var(--ease); }
.avatar.xl:hover { transform: perspective(400px) rotateY(-14deg) rotateX(8deg) scale(1.04); }
#account-menu .menu-head { display: grid; grid-template-columns: 48px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; }
#account-menu .menu-head .avatar { grid-row: 1 / 3; }
#account-menu .menu-head b { color: var(--text); font-size: 14px; }
.photo-row { display: flex; align-items: center; gap: 18px; }
.photo-acts { display: flex; flex-direction: column; gap: 6px; }
.photo-btns { display: flex; gap: 8px; margin-top: 4px; }
.photo-btns .pill { cursor: pointer; }

/* ================= THEME SWITCH ================= */
.theme-btn .sun { display: none; }
:root[data-theme="light"] .theme-btn .sun { display: block; }
:root[data-theme="light"] .theme-btn .moon { display: none; }
.theme-btn:hover svg { animation: themeSpin .6s var(--ease); }
@keyframes themeSpin { from { transform: rotate(-90deg) scale(.6); } }
:root.theme-anim *, :root.theme-anim *::before, :root.theme-anim *::after { transition: background-color .4s, color .4s, border-color .4s, box-shadow .4s !important; }
#theme-tabs { margin: 0; }

/* ================= DAY MODE ================= */
:root[data-theme="light"] {
  --bg: #eef0f3; --panel: #ffffff; --panel-2: #f3f4f6; --line: rgba(0,0,0,.08); --line-2: rgba(0,0,0,.14);
  --text: #111214; --muted: rgba(0,0,0,.58); --faint: rgba(0,0,0,.38); --hover: rgba(0,0,0,.045); --accent: #111;
  color-scheme: light;
}
:root[data-theme="light"] .brand, :root[data-theme="light"] .login-logo { filter: invert(1) hue-rotate(180deg); }
:root[data-theme="light"] .icon-btn { color: rgba(0,0,0,.65); }
:root[data-theme="light"] .icon-btn:hover { color: #000; }
:root[data-theme="light"] .search:focus-within { background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.12); }
:root[data-theme="light"] .content { box-shadow: 0 20px 60px rgba(20,24,40,.10); }
:root[data-theme="light"] .menu, :root[data-theme="light"] .suggest { background: #fff; box-shadow: 0 24px 60px rgba(0,0,0,.18); }
:root[data-theme="light"] .avatar { color: #fff; background: linear-gradient(145deg, #2a2a2a, #000); box-shadow: 0 4px 12px rgba(0,0,0,.2), inset 0 -2px 0 rgba(255,255,255,.12); }
:root[data-theme="light"] .compose-btn, :root[data-theme="light"] .send-btn {
  background: linear-gradient(180deg, #2b2b2b, #000); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 10px 26px rgba(0,0,0,.2), 0 4px 0 #555; }
:root[data-theme="light"] .compose-btn:active, :root[data-theme="light"] .send-btn:active { box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 0 0 #555; }
:root[data-theme="light"] .folders li a { color: rgba(0,0,0,.72); }
:root[data-theme="light"] .folders li a:hover { color: #000; }
:root[data-theme="light"] .folders li a.active, :root[data-theme="light"] .tabs button.on { background: #111; color: #fff; }
:root[data-theme="light"] .msg:hover { background: #f7f7f9; box-shadow: 0 6px 18px rgba(0,0,0,.08), inset 1px 0 0 var(--line), inset -1px 0 0 var(--line); }
:root[data-theme="light"] .msg.selected { background: rgba(0,0,0,.06); }
:root[data-theme="light"] .msg.unread .from, :root[data-theme="light"] .msg.unread .line b, :root[data-theme="light"] .msg.unread .date { color: #000; }
:root[data-theme="light"] .msg.unread::before { background: #111; box-shadow: none; }
:root[data-theme="light"] .star.on { color: #111; } :root[data-theme="light"] .star.on svg { fill: #111; }
:root[data-theme="light"] .check span { border-color: rgba(0,0,0,.4); }
:root[data-theme="light"] .check input:checked + span { background: #111; border-color: #111; box-shadow: inset 0 0 0 3px #fff; }
:root[data-theme="light"] .cube i { border-color: rgba(0,0,0,.3); background: rgba(0,0,0,.03); box-shadow: inset 0 0 18px rgba(0,0,0,.06); }
:root[data-theme="light"] .mail-body pre { color: #222; }
:root[data-theme="light"] .file, :root[data-theme="light"] .pill { color: #111; }
:root[data-theme="light"] .composer { background: #fff; box-shadow: 0 -10px 60px rgba(0,0,0,.18); }
:root[data-theme="light"] .composer-head { background: #f2f3f5; }
:root[data-theme="light"] .toast { background: #111; color: #fff; } :root[data-theme="light"] .toast button { color: #fff; }
:root[data-theme="light"] .cal-cell { background: #fafafb; }
:root[data-theme="light"] .cal-cell:hover { background: #fff; box-shadow: 0 14px 30px rgba(0,0,0,.1); }
:root[data-theme="light"] .cal-cell.today .cal-num { background: #111; color: #fff; box-shadow: 0 0 14px rgba(0,0,0,.25); }
:root[data-theme="light"] .cal-chip { background: rgba(0,0,0,.07); border-left-color: #111; }
:root[data-theme="light"] .cal-chip:hover { background: rgba(0,0,0,.13); }
:root[data-theme="light"] .cal-chip.allday { background: #111; color: #fff; }
:root[data-theme="light"] .set-row input, :root[data-theme="light"] .set-row textarea, :root[data-theme="light"] .rule-new input,
:root[data-theme="light"] .rule-new select, :root[data-theme="light"] .big-input, :root[data-theme="light"] .editor.boxed { background: #fff; color: #111; }
:root[data-theme="light"] .switch { background: rgba(0,0,0,.15); }
:root[data-theme="light"] .switch-row input:checked + .switch { background: #111; }
:root[data-theme="light"] .switch-row input:checked + .switch::after { background: #fff; }
:root[data-theme="light"] .modal-wrap { background: rgba(20,24,40,.25); }
:root[data-theme="light"] .modal-card { background: #fff; box-shadow: 0 50px 120px rgba(0,0,0,.25); }
:root[data-theme="light"] .images-note button { color: #111; }
:root[data-theme="light"] ::selection { background: rgba(0,0,0,.18); }
/* login by day: white glass on a pale stage, dark rings */
:root[data-theme="light"] .login { background: radial-gradient(1200px 700px at 50% 115%, rgba(0,0,0,.10), transparent 60%), radial-gradient(800px 500px at 50% 40%, #fff, transparent 70%), #e9ebef; }
:root[data-theme="light"] .o1 { border-color: rgba(0,0,0,.16); box-shadow: 0 0 80px rgba(0,0,0,.05); }
:root[data-theme="light"] .o2 { border-top-color: rgba(0,0,0,.65); border-left-color: rgba(0,0,0,.18); filter: drop-shadow(0 0 8px rgba(0,0,0,.25)); }
:root[data-theme="light"] .o3 { border-color: rgba(0,0,0,.1); }
:root[data-theme="light"] .core { background: radial-gradient(circle at 40% 35%, #fff, rgba(255,255,255,.6) 45%, transparent 70%); }
:root[data-theme="light"] .login-card { background: linear-gradient(160deg, rgba(255,255,255,.95), rgba(255,255,255,.7)); border-color: rgba(0,0,0,.08);
  box-shadow: 0 60px 120px -30px rgba(20,24,40,.35), inset 0 1px 0 #fff; }
:root[data-theme="light"] .field input { background: #f4f5f7; border-color: rgba(0,0,0,.12); box-shadow: inset 0 2px 6px rgba(0,0,0,.06); color: #111; }
:root[data-theme="light"] .field input:focus { border-color: #111; box-shadow: 0 0 0 4px rgba(0,0,0,.06); }
:root[data-theme="light"] .btn-3d { background: linear-gradient(180deg, #2b2b2b, #000); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 16px 36px rgba(0,0,0,.2), 0 6px 0 #555; }
:root[data-theme="light"] .sheen { background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.7) 50%, transparent 60%); }
.set-row > .tabs { align-self: flex-start; }

/* Proportions: compose button smaller; search starts on the same line as the mail panel */
.topbar { gap: 10px; padding: 0 16px 0 0; }
.brand { box-sizing: content-box; width: auto; height: 18px; margin: 0; padding: 0 0 0 22px; flex: 0 0 calc(256px - 22px - 10px); object-fit: contain; object-position: left center; }
.search { height: 42px; border-radius: 21px; max-width: none; flex: 1; }
.compose-btn { height: 42px; padding: 0 18px 0 14px; gap: 9px; margin: 6px 0 12px 4px; border-radius: 14px; font-size: 13.5px; transform: translateY(-2px);
  box-shadow: inset 0 1px 0 #fff, 0 8px 20px rgba(255,255,255,.10), 0 3px 0 #8a8a8a; }
.compose-btn svg { width: 17px; height: 17px; }
:root[data-theme="light"] .compose-btn { box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 8px 20px rgba(0,0,0,.18), 0 3px 0 #555; }
@media (max-width: 860px) { .brand { display: none; } .topbar { padding-left: 8px; } }

/* ================= RULES (cards + step editor) ================= */
.rules-head { display: flex; align-items: center; gap: 16px; }
.rules-head > div { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.rules-head b { font-size: 15px; }
.rules-head .send-btn svg { width: 16px; height: 16px; }
.rule-cards { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; perspective: 1000px; }
.rule-card { display: grid; grid-template-columns: 1fr 22px 1fr 36px; align-items: center; gap: 12px; padding: 14px 12px 14px 14px; border-radius: 16px;
  background: var(--panel-2); border: 1px solid var(--line); animation: rowIn .4s var(--ease) both; transition: transform .25s var(--ease), box-shadow .25s; }
.rule-card:hover { transform: translateY(-2px) rotateX(4deg); box-shadow: 0 14px 30px rgba(0,0,0,.35); }
.rc-when, .rc-then { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rc-when > div, .rc-then > div { min-width: 0; line-height: 1.35; }
.rc-when small, .rc-then small { display: block; font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.rc-op { color: var(--muted); }
.rc-value { font: 600 13px/1.3 var(--font); padding: 2px 8px; border-radius: 7px; background: rgba(255,255,255,.1); word-break: break-all; }
.rc-icon { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: rgba(255,255,255,.07); flex: none; }
.rc-icon svg { width: 17px; height: 17px; }
.rc-icon.solid { background: #fff; color: #000; }
.rc-arrow { color: var(--faint); width: 18px; height: 18px; }
.rc-del { opacity: 0; transition: opacity .15s; }
.rule-card:hover .rc-del { opacity: 1; }
.rules-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 34px 16px; border-radius: 18px; border: 1px dashed var(--line-2); text-align: center; }
.rules-empty .empty-art { margin-bottom: 6px; }
.rule-ideas { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }
.rule-ideas button { padding: 8px 14px; border-radius: 18px; border: 1px solid var(--line-2); transition: background .15s, transform .15s; }
.rule-ideas button:hover { background: var(--hover); transform: translateY(-1px); }

.step { display: flex; gap: 14px; }
.step-no { width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: #fff; color: #000; }
.step-body { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.step-body > b { line-height: 28px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 12px; border: 1px solid var(--line-2); color: var(--muted); transition: all .15s; }
.seg button svg { width: 16px; height: 16px; }
.seg button.on { background: #fff; color: #000; border-color: #fff; font-weight: 600; }
.big-input.sm { height: 44px; font-size: 15px; }
.action-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.action-grid button { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; border-radius: 14px; border: 1px solid var(--line-2);
  color: var(--muted); font-size: 12.5px; text-align: center; transition: transform .2s var(--ease), background .15s, box-shadow .2s; }
.action-grid button svg { width: 22px; height: 22px; }
.action-grid button:hover { transform: translateY(-2px); background: var(--hover); }
.action-grid button.on { background: #fff; color: #000; border-color: #fff; font-weight: 600; box-shadow: 0 12px 28px rgba(255,255,255,.12); transform: translateY(-2px) rotateX(6deg); }
.step-body select { height: 42px; padding: 0 12px; border-radius: 12px; background: rgba(0,0,0,.35); border: 1px solid var(--line-2); color: var(--text); font: inherit; color-scheme: dark; }
.rule-preview { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--panel-2); color: var(--muted); font-size: 13.5px; border-left: 3px solid var(--text); }

:root[data-theme="light"] .rc-value { background: rgba(0,0,0,.07); }
:root[data-theme="light"] .rc-icon { background: rgba(0,0,0,.06); }
:root[data-theme="light"] .rc-icon.solid, :root[data-theme="light"] .step-no,
:root[data-theme="light"] .seg button.on, :root[data-theme="light"] .action-grid button.on { background: #111; color: #fff; border-color: #111; }
:root[data-theme="light"] .rule-card:hover { box-shadow: 0 14px 30px rgba(0,0,0,.1); }
:root[data-theme="light"] .step-body select { background: #fff; color-scheme: light; }
@media (max-width: 860px) {
  .rule-card { grid-template-columns: 1fr 36px; } .rc-arrow { display: none; } .rc-then { grid-column: 1; } .rc-del { opacity: 1; grid-row: 1; grid-column: 2; }
  .rules-head { flex-direction: column; align-items: stretch; }
}

/* No accent side-stripes: the preview is a plain soft box with an icon, event chips are plain pills */
.rule-preview { border-left: 0; display: flex; align-items: center; gap: 10px; }
.rule-preview::before { content: ""; flex: none; width: 16px; height: 16px; background: currentColor; opacity: .7;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8h.01'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8h.01'/%3E%3C/svg%3E") center / contain no-repeat; }
.cal-chip { border-left: 0; }

/* Selects: our own chevron with breathing room, instead of the browser's arrow on the edge */
select {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  padding-right: 40px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f2f2f2' stroke-opacity='.6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: right 14px center !important; background-size: 16px !important;
  transition: border-color .15s, box-shadow .15s;
}
select:hover { border-color: rgba(255,255,255,.3) !important; }
select:focus { outline: none; border-color: rgba(255,255,255,.55) !important; box-shadow: 0 0 0 3px rgba(255,255,255,.07); }
:root[data-theme="light"] select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-opacity='.6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") !important; }
:root[data-theme="light"] select:hover { border-color: rgba(0,0,0,.3) !important; }
:root[data-theme="light"] select:focus { border-color: #111 !important; box-shadow: 0 0 0 3px rgba(0,0,0,.06); }

/* Thin dividers between sidebar items (Gelen kutusu, Yıldızlı, …) */
.folders li { position: relative; }
.folders li:not(.sep):not(:last-child)::after {
  content: ""; position: absolute; left: 18px; right: 14px; bottom: 0; height: 1px; background: var(--line); pointer-events: none;
}
.folders li:has(+ .sep)::after, .folders li:has(> a.active)::after, .folders li:has(+ li > a.active)::after { display: none; }
.folders li a { height: 38px; }
.folders li:not(.sep):not(:last-child)::after { background: rgba(255,255,255,.10); }
:root[data-theme="light"] .folders li:not(.sep):not(:last-child)::after { background: rgba(0,0,0,.09); }

/* Clock & date in the top bar */
.clock { display: flex; align-items: baseline; gap: 8px; margin-right: 10px; padding: 0 14px; height: 36px; border-radius: 18px;
  background: var(--panel-2); border: 1px solid var(--line); white-space: nowrap; align-self: center; line-height: 36px; }
.clock b { font: 600 15px/36px var(--font); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.clock span { font-size: 12.5px; color: var(--muted); }
@media (max-width: 1100px) { .clock span { display: none; } }
@media (max-width: 860px) { .clock { display: none; } }

/* Clock now sits under Ayarlar at the bottom of the sidebar */
.clock { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; height: auto; line-height: 1.2; margin: 10px 4px 2px; padding: 12px 14px;
  border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); }
.clock b { font: 600 22px/1.1 var(--font); letter-spacing: .01em; }
.clock span { font-size: 12.5px; color: var(--muted); }
@media (max-width: 1100px) { .clock span { display: block; } }
@media (max-width: 860px) { .clock { display: flex; } }
.sidebar .clock { align-self: stretch; margin: 10px 0 2px; }

/* ================= CALENDAR v2: one surface with hairlines + agenda ================= */
.cal-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; padding: 0 16px 16px 12px; }
.cal-wrap { padding: 0; min-height: 0; }
.cal-head { padding: 12px 0 8px; }
.cal-grid { gap: 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--line); gap: 1px; }
.cal-cell { border: 0; border-radius: 0; background: var(--panel); padding: 8px 8px 6px; }
.cal-cell.weekend { background: color-mix(in srgb, var(--panel) 92%, var(--text) 3%); }
.cal-cell.out { opacity: 1; }
.cal-cell.out .cal-num { color: var(--faint); font-weight: 500; }
.cal-cell:hover { transform: none; box-shadow: inset 0 0 0 1px var(--line-2); background: color-mix(in srgb, var(--panel) 90%, var(--text) 6%); }
.cal-num { width: 28px; height: 28px; font-size: 13px; }
.cal-cell.today { background: color-mix(in srgb, var(--panel) 88%, var(--text) 7%); }

.agenda { min-height: 0; display: flex; flex-direction: column; gap: 14px; padding-top: 12px; }
.agenda-today { display: flex; flex-direction: column; gap: 2px; padding: 18px 18px 16px; border-radius: 18px; border: 1px solid var(--line);
  background: linear-gradient(160deg, color-mix(in srgb, var(--panel-2) 80%, var(--text) 8%), var(--panel-2)); }
.agenda-today span { font-size: 12.5px; color: var(--muted); text-transform: capitalize; }
.agenda-today b { font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.agenda h3 { margin: 4px 4px 0; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.agenda-list { list-style: none; margin: 0; padding: 0; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.agenda-day { margin: 8px 4px 0; font-size: 12.5px; font-weight: 600; color: var(--muted); text-transform: capitalize; }
.agenda-day:first-child { margin-top: 0; }
.agenda-item { display: grid; grid-template-columns: 62px 1fr; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 12px; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--line); transition: background .15s, transform .2s var(--ease); }
.agenda-item:hover { background: var(--hover); transform: translateX(3px); }
.ag-time { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; padding-top: 1px; }
.agenda-item b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-item small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.agenda-empty { padding: 18px; border-radius: 14px; border: 1px dashed var(--line-2); color: var(--muted); font-size: 13px; line-height: 1.5; }
.agenda-empty span { color: var(--faint); font-size: 12.5px; }
@media (max-width: 1100px) { .cal-layout { grid-template-columns: 1fr; } .agenda { display: none; } }

/* Sidebar: keep the selected folder's white pill off the mail panel */
.sidebar { padding-right: 18px; }
.folders li a { margin-right: 0; }

/* ================= WEEK VIEW ================= */
.cal-views { margin: 0 8px 0 0; padding: 3px; border-radius: 12px; }
.cal-views button { padding: 6px 14px; border-radius: 9px; font-size: 13px; }
.week { min-height: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-top: 12px; background: var(--panel); }
.week-head, .week-allday { display: grid; grid-template-columns: 58px repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); flex: none; }
.wh { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0; border-left: 1px solid var(--line); }
.wh small { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.wh b { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; font-size: 16px; }
.wh.today b { background: var(--text); color: var(--panel); }
.wh:hover b { background: var(--hover); } .wh.today:hover b { background: var(--text); }
.wa-label { font-size: 10.5px; color: var(--faint); display: grid; place-items: center; }
.wa-col { min-height: 30px; padding: 3px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; cursor: pointer; }
.week-body { flex: 1; min-height: 0; overflow: auto; display: grid; grid-template-columns: 58px 1fr; }
.week-hours { position: relative; }
.wh-hour { height: 52px; font-size: 11px; color: var(--faint); text-align: right; padding-right: 8px; transform: translateY(-7px); font-variant-numeric: tabular-nums; }
.week-cols { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.wc { position: relative; border-left: 1px solid var(--line); cursor: pointer;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 51px, var(--line) 51px, var(--line) 52px); }
.wc.weekend { background-color: color-mix(in srgb, var(--panel) 94%, var(--text) 2.5%); }
.wc.today { background-color: color-mix(in srgb, var(--panel) 90%, var(--text) 4%); }
.wev { position: absolute; z-index: 1; overflow: hidden; text-align: left; padding: 5px 8px; border-radius: 9px;
  background: color-mix(in srgb, var(--text) 14%, var(--panel)); border: 1px solid color-mix(in srgb, var(--text) 22%, transparent);
  box-shadow: 0 6px 16px rgba(0,0,0,.25); transition: transform .15s var(--ease), box-shadow .15s; display: flex; flex-direction: column; gap: 1px; }
.wev:hover { transform: translateY(-1px) scale(1.01); z-index: 2; box-shadow: 0 12px 26px rgba(0,0,0,.35); }
.wev b { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wev small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: #ff5a5a; z-index: 3; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #ff5a5a; }
.cal-chip { font-weight: 500; }

/* ================= CLOCK: a quiet line at the bottom of the sidebar ================= */
.sidebar .clock { flex-direction: row; align-items: baseline; gap: 8px; margin: 12px 0 0; padding: 10px 14px 4px; background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.sidebar .clock b { font: 600 14px/1 var(--font); font-variant-numeric: tabular-nums; }
.sidebar .clock span { font-size: 12px; color: var(--faint); }

/* ================= TOOLTIPS ================= */
.tip { position: fixed; z-index: 100; pointer-events: none; padding: 6px 10px; border-radius: 8px; font-size: 12px; font-weight: 500; white-space: nowrap;
  background: var(--text); color: var(--panel); box-shadow: 0 8px 24px rgba(0,0,0,.35); opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; }
.tip.on { opacity: 1; transform: none; }

/* reading toolbar groups */
.read-toolbar .tb-sep { width: 1px; height: 22px; background: var(--line-2); margin: 0 8px; }
.read-toolbar .star.on svg { fill: currentColor; }

/* ================= CLOCK WIDGET (replaces the plain box and the quiet line) ================= */
.sidebar .clock { display: grid; grid-template-columns: 52px 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 12px; row-gap: 10px;
  margin: 12px 0 2px; padding: 14px; border-radius: 18px; border: 1px solid var(--line);
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--text) 10%, transparent), transparent 60%), var(--panel-2);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--text) 8%, transparent), 0 14px 30px rgba(0,0,0,.25); }
.dial { position: relative; width: 52px; height: 52px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--text) 14%, var(--panel)), var(--panel) 70%);
  box-shadow: inset 0 0 0 1px var(--line-2), inset 0 -4px 10px rgba(0,0,0,.35), 0 6px 14px rgba(0,0,0,.35); }
.dial::before { content: ""; position: absolute; inset: 5px; border-radius: 50%;
  background: repeating-conic-gradient(from -1deg, var(--muted) 0 2deg, transparent 2deg 30deg);
  -webkit-mask: radial-gradient(circle, transparent 17px, #000 18px); mask: radial-gradient(circle, transparent 17px, #000 18px); opacity: .7; }
.dial i { position: absolute; left: 50%; bottom: 50%; transform-origin: 50% 100%; border-radius: 2px; background: var(--text); }
.dial .hh { width: 3px; height: 13px; margin-left: -1.5px; }
.dial .mm { width: 2px; height: 18px; margin-left: -1px; }
.dial .ss { width: 1px; height: 20px; margin-left: -.5px; background: #ff5a5a; transition: transform .25s cubic-bezier(.4,2.3,.6,1); }
.dial .pin { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: var(--text); box-shadow: 0 0 0 2px var(--panel); }
.clock-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sidebar .clock b#clock-time { font: 650 24px/1 var(--font); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.colon { font-style: normal; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: .25; } }
.sidebar .clock #clock-date { font-size: 12px; color: var(--muted); text-transform: capitalize; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clock-next { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 2px; padding: 9px 11px; border-radius: 12px; text-decoration: none; color: var(--text);
  background: color-mix(in srgb, var(--text) 6%, transparent); border: 1px solid var(--line); transition: background .15s, transform .15s; }
.clock-next:hover { background: color-mix(in srgb, var(--text) 11%, transparent); transform: translateY(-1px); }
.clock-next span { font-size: 10.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.clock-next b { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-list { overflow-x: hidden; padding-right: 2px; }
.agenda-item:hover { transform: none; background: color-mix(in srgb, var(--text) 8%, var(--panel-2)); border-color: var(--line-2); }

/* User folders grouped under a collapsible "Klasörler" heading */
.folders .group-head { display: flex; align-items: center; gap: 6px; height: 34px; margin: 6px 0 2px; padding: 0 6px 0 8px; }
.folders .group-head::after { display: none; }
.group-toggle { flex: 1; display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 6px; border-radius: 8px; color: var(--muted);
  font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; text-align: left; }
.group-toggle:hover { color: var(--text); background: var(--hover); }
.group-toggle svg { width: 14px; height: 14px; transition: transform .2s var(--ease); }
.group-head.closed .group-toggle svg { transform: rotate(-90deg); }
.group-add { width: 28px; height: 28px; }
.group-add svg { width: 16px; height: 16px; }
.folders li.sub a { padding-left: 30px; }
.folders li.sub[hidden] { display: none; }

/* event detail card */
.ev-card { width: min(460px, calc(100vw - 24px)); }
.ev-card .modal-head { gap: 12px; }
.ev-dot { width: 14px; height: 14px; border-radius: 4px; background: var(--text); flex: none; }
.ev-title { font-size: 20px !important; line-height: 1.3; }
.ev-rows { display: flex; flex-direction: column; gap: 12px; padding: 4px 0 6px 26px; }
.ev-row { display: flex; align-items: flex-start; gap: 12px; color: var(--muted); font-size: 14px; }
.ev-row svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.ev-row span, .ev-row p { color: var(--text); margin: 0; white-space: pre-wrap; line-height: 1.5; }
.ev-row .pill { height: 30px; padding: 0 12px; margin-left: 8px; font-size: 12.5px; text-decoration: none; }
.ev-card .send-btn svg, .ev-card .pill svg { width: 16px; height: 16px; }
.cal-chip { text-align: left; }

/* repeat options */
.repeat-box { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); }
.weekday-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.weekday-pick button { width: 44px; height: 34px; border-radius: 10px; border: 1px solid var(--line-2); color: var(--muted); font-size: 12.5px; transition: all .15s; }
.weekday-pick button.on { background: var(--text); color: var(--panel); border-color: var(--text); font-weight: 600; }
.scope { display: flex; gap: 8px; }
.scope label { flex: 1; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 11px; border: 1px solid var(--line-2); cursor: pointer; font-size: 13px; }
.scope input { accent-color: var(--text); }
.scope label:has(input:checked) { border-color: var(--text); background: color-mix(in srgb, var(--text) 8%, transparent); }
.group-toggle svg { transform: rotate(90deg); }
.group-head.closed .group-toggle svg { transform: rotate(0deg); }
.group-toggle small { margin-left: 2px; font-size: 10.5px; color: var(--faint); font-weight: 600; }
.cal-layout.wide { grid-template-columns: minmax(0, 1fr); }
.cal-layout.wide .agenda { display: none; }
.wev.short { flex-direction: row; align-items: center; gap: 6px; padding: 2px 8px; }
.wev.short small { flex: none; }
.sidebar .clock { grid-template-rows: auto; }

/* ================= RESPONSIVE: phones & tablets ================= */
.app { grid-template-columns: 256px minmax(0, 1fr); }
.topbar, .search { min-width: 0; }
.search input { min-width: 0; }
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: 58px minmax(0, 1fr); }
  .topbar { gap: 6px; padding: 0 8px; }
  .top-actions { gap: 2px; }
  #refresh, .top-actions a.icon-btn[href="#/ayarlar"] { display: none; }
  .search { height: 40px; padding: 0 12px; }
  .content { margin: 0 6px 6px; border-radius: 18px; }
  .list-toolbar, .read-toolbar { padding: 0 6px 0 8px; overflow-x: auto; scrollbar-width: none; }
  .list-toolbar::-webkit-scrollbar, .read-toolbar::-webkit-scrollbar { display: none; }
  .msg { grid-template-columns: 28px minmax(0, 1fr) auto; }
  .msg .right { grid-column: 3; grid-row: 1; }
  .msg .hover-acts { display: none !important; }
  .msg:hover .date { display: inline; }
  .read-subject { font-size: 19px; margin: 16px 14px 6px; }
  .thread { padding: 0 8px 24px; }
  .mail-head { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; padding: 10px 6px 6px; }
  .mail-head .avatar { width: 34px; height: 34px; }
  .mail-from, .mail-to { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .reply-bar { flex-wrap: wrap; }
  .composer.max { inset: 0; border-radius: 0; }
  .settings { padding: 12px; }
  .tabs { max-width: 100%; overflow-x: auto; }
  .contact { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .cal-views button { padding: 6px 10px; }
  .list-toolbar .pill { padding: 0 12px; }
  .list-toolbar h1 { font-size: 14px; white-space: nowrap; }
  #cal-new { padding: 0 10px; } #cal-new svg { margin: 0; }
  .week-head, .week-allday { grid-template-columns: 40px repeat(7, minmax(0, 1fr)); }
  .week-body { grid-template-columns: 40px 1fr; }
  .wh-hour { font-size: 9.5px; padding-right: 4px; }
  .wev { padding: 3px 4px; } .wev small { display: none; }
  .modal-card { padding: 16px; border-radius: 18px; }
  .set-grid { grid-template-columns: 1fr 1fr; }
  .rule-card { padding: 12px; }
  .sidebar { padding-bottom: 14px; }
}
@media (max-width: 480px) {
  .cal-head div { font-size: 10px; letter-spacing: 0; }
  .cal-cell { padding: 4px 3px; }
  .cal-num { width: 22px; height: 22px; font-size: 11.5px; }
  .cal-chip { font-size: 10px; padding: 2px 4px; border-radius: 5px; }
  .cal-more { font-size: 10px; padding: 0 2px; }
  #cal-title { font-size: 13px; }
  .action-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  #calendar-view .list-toolbar { flex-wrap: wrap; height: auto; padding: 8px 8px 6px; row-gap: 8px; overflow: visible; }
  #calendar-view .list-toolbar h1 { order: -1; flex: 1 1 100%; margin: 2px 4px 0; font-size: 16px; }
  #calendar-view .list-toolbar .spacer { display: none; }
  #cal-views { margin-left: auto; }
  .cal-layout { padding: 0 8px 8px; }
}
@media (max-width: 480px) {
  .composer-foot { gap: 4px; padding: 10px 10px 14px; }
  .composer-foot .fmt { gap: 0; overflow-x: auto; scrollbar-width: none; }
  .composer-foot .fmt [data-cmd="underline"], .composer-foot .fmt [data-cmd="insertUnorderedList"] { display: none; }
  .send-btn { padding: 0 16px; }
}
/* Installed on a phone's home screen: keep clear of the notch and home bar */
@supports (padding: env(safe-area-inset-top)) {
  .app { padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
}

/* ================= SIGNATURE EDITOR ================= */
.sig-editor { position: relative; border-radius: 14px; border: 1px solid var(--line-2); overflow: hidden; }
.sig-tools { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; padding: 6px 8px; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.sig-tools .tb-sep { width: 1px; height: 20px; background: var(--line-2); margin: 0 6px; }
.sig-tools select { height: 32px; padding: 0 30px 0 10px !important; border-radius: 9px; background-color: transparent; border: 1px solid var(--line-2); color: var(--text); font: inherit; font-size: 12.5px; background-position: right 8px center !important; }
.sig-color { position: relative; cursor: pointer; }
.sig-color input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
#sig-color-dot { width: 16px; height: 16px; border-radius: 50%; background: #111; box-shadow: 0 0 0 2px var(--panel-2), 0 0 0 3px var(--line-2); }
/* Written on white, like the mail it ends up in */
.sig-area { min-height: 140px; border: 0 !important; border-radius: 0 !important; background: #fff !important; color: #222; padding: 16px 18px !important; font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.sig-area:empty::before { content: "Adın Soyadın · Unvan · Telefon"; color: #9a9a9a; }
.sig-area a { color: #1a56c4; }
.sig-area img { cursor: pointer; border-radius: 4px; transition: outline-color .15s; outline: 2px solid transparent; outline-offset: 3px; }
.sig-area img.picked { outline-color: #1a56c4; }
.img-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; background: var(--panel-2); border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.img-bar input[type=range] { flex: 1; min-width: 120px; accent-color: var(--text); }
.img-bar b { min-width: 52px; color: var(--text); font-variant-numeric: tabular-nums; }
.img-bar .pill { height: 32px; padding: 0 12px; font-size: 12.5px; }
.img-bar .pill svg { width: 15px; height: 15px; }
.sig-preview { border-radius: 14px; background: #fff; color: #222; padding: 18px 20px; border: 1px solid var(--line-2); font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.sig-preview .pv-body { color: #444; margin-bottom: 14px; }
.sig-preview .pv-sig { color: #222; } .sig-preview a { color: #1a56c4; }
.sig-preview img { max-width: 100%; height: auto; }
.composer .signature img { max-width: 100%; height: auto; }
/* Compose on white paper: what you write looks the way it is received */
.composer .editor { background: #fff; color: #222; margin: 10px -18px 0; padding: 16px 18px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.composer .editor:empty::before { color: #9a9a9a; }
.composer .editor a { color: #1a56c4; }
.composer .editor blockquote { border-left-color: #ddd; color: #555; }
.composer .signature { color: #444; }
.composer .attachments { margin-top: 8px; }

/* Repeat: icon chips instead of a bare select */
.repeat-box { gap: 12px; padding: 14px; }
.repeat-head { display: flex; align-items: center; gap: 8px; }
.repeat-head svg { width: 16px; height: 16px; color: var(--muted); }
.repeat-head b { font-size: 13.5px; }
.repeat-summary { margin-left: auto; font-size: 12px; color: var(--muted); text-align: right; }
.repeat-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.repeat-chips button { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel);
  color: var(--muted); font-size: 13px; text-align: left; transition: background .15s, border-color .15s, transform .15s, color .15s; }
.repeat-chips button svg { width: 16px; height: 16px; flex: none; }
.repeat-chips button:hover { color: var(--text); transform: translateY(-1px); }
.repeat-chips button.on { background: var(--text); color: var(--panel); border-color: var(--text); font-weight: 600; box-shadow: 0 8px 20px rgba(0,0,0,.18); }
.repeat-box .weekday-pick { padding-top: 2px; }
.repeat-box .set-row input[type=date] { background: var(--panel); }
@media (max-width: 480px) { .repeat-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Every select in forms and dialogs looks like the inputs around it */
.set-row select, .modal-card select {
  height: 42px; padding: 0 40px 0 14px; border-radius: 12px; background-color: rgba(0,0,0,.35); border: 1px solid var(--line-2); color: var(--text); font: inherit; font-size: 14px; }
:root[data-theme="light"] .set-row select, :root[data-theme="light"] .modal-card select { background-color: #fff; color: #111; }
.modal-card > * { flex-shrink: 0; }   /* a tall dialog scrolls instead of squashing its fields */

/* closed group: no folder rows stuck under the heading; the open folder's name sits in the heading instead */
.group-toggle { min-width: 0; }
.group-here { margin-left: auto; max-width: 110px; padding: 3px 9px; border-radius: 999px; font-style: normal; font-size: 11.5px; font-weight: 600;
  letter-spacing: 0; text-transform: none; color: var(--panel); background: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.folders li.sub:first-of-type, .folders .group-head + li.sub { margin-top: 2px; }
.group-toggle:has(.group-here) { gap: 6px; }
.group-toggle:has(.group-here) small { display: none; }
.group-here { flex-shrink: 0; max-width: 96px; }
/* breathing room between the system folders and the Klasörler group */
.folders .group-head { margin-top: 18px; }
/* text selection on the white writing surfaces (composer, signature editor and preview) must be visible in both themes */
.editor ::selection, .editor::selection, .sig-preview ::selection, .composer input::selection { background: #b3d4ff; color: inherit; }
.msg .line .pv::before { content: "·"; margin: 0 8px; color: var(--faint); }
.msg .line b:empty + .pv::before { content: none; }

/* in-app confirm / text dialog (sits above every other layer, modals included) */
.dlg-wrap { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px;
  background: rgba(0,0,0,.45); backdrop-filter: blur(4px); animation: dlg-fade .15s ease-out; }
.dlg-card { width: min(380px, 100%); display: flex; flex-direction: column; gap: 16px; padding: 22px; border-radius: 18px;
  background: var(--panel); border: 1px solid var(--line-2); box-shadow: 0 24px 60px rgba(0,0,0,.5); animation: dlg-pop .18s var(--ease); }
.dlg-text { margin: 0; font-size: 15px; line-height: 1.5; color: var(--text); }
.dlg-input { height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font: inherit; outline: none; }
.dlg-input:focus { border-color: var(--text); }
.dlg-card footer { display: flex; justify-content: flex-end; gap: 8px; }
.pill.danger.solid { background: #e5484d; border-color: #e5484d; color: #fff; font-weight: 600; }
.pill.danger.solid:hover { background: #d13a3f; }
@keyframes dlg-fade { from { opacity: 0; } }
@keyframes dlg-pop { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.msg .line .pv:empty::before { content: none; }

/* ===== review pass: design fixes ===== */
/* unread: a dot before the sender instead of a glowing side stripe */
.msg.unread::before, :root[data-theme="light"] .msg.unread::before { content: none; display: none; }
.msg.unread .from::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 8px 1px 0; border-radius: 50%;
  background: var(--text); vertical-align: middle; }
.msg .from { position: relative; }

/* composer draft status */
.composer-state { font-size: 11.5px; color: var(--faint); white-space: nowrap; margin-right: 4px; }

/* selection count next to the folder title */
.sel-count { margin-left: 10px; font-size: 13px; color: var(--muted); white-space: nowrap; }

/* disabled buttons look disabled */
.icon-btn:disabled, button:disabled { opacity: .35; pointer-events: none; }

/* auto-reply state next to the switch */
.vac-state { margin-left: 8px; font-size: 12px; font-weight: 600; color: var(--faint); }
#vac-on:checked ~ .vac-state { color: var(--text); }

/* contacts: no sideways jump on hover */
.contact:hover { transform: none; }
.agenda-item:hover { transform: none; }

/* phones and tablets */
.fab, .scrim { display: none; }
@media (max-width: 860px) {
  .sidebar { background: var(--panel); border-right: 1px solid var(--line); }
  .sidebar.open { box-shadow: 24px 0 60px rgba(0,0,0,.35); }
  .scrim:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 44; background: rgba(0,0,0,.35); backdrop-filter: blur(2px); }
  .fab { display: grid; place-items: center; position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 39;
    width: 56px; height: 56px; border-radius: 18px; background: var(--text); color: var(--panel); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
  .fab svg { width: 22px; height: 22px; }
  .composers:has(.composer) ~ .fab, body:has(.composer) .fab { display: none; }
  .read-toolbar { flex-wrap: wrap; height: auto; min-height: 52px; padding-top: 6px; padding-bottom: 6px; overflow: visible; }
  .reply-bar { flex-wrap: nowrap; }
  .reply-bar > * { flex: 1 1 0; min-width: 0; justify-content: center; }
  /* the agenda was hidden below 1100px; on smaller screens it goes under the month */
  .agenda { display: flex; }
}
@media (max-width: 1100px) and (min-width: 861px) { .cal-layout:not(.wide) .agenda { display: flex; } }
@media (max-width: 480px) {
  .composers { inset: 0; }
  .composer, .composer.max { position: fixed; inset: 0; width: auto; height: auto; border-radius: 0; padding-bottom: env(safe-area-inset-bottom); }
  .composer [data-c="min"], .composer [data-c="max"] { display: none; }
  .composer-foot .fmt [data-cmd="underline"], .composer-foot .fmt [data-cmd="insertUnorderedList"] { display: inline-grid; }
  .mail-from, .mail-to { white-space: normal; }
}
@media (max-width: 480px) {
  .reply-bar { gap: 6px; margin-right: 12px; }
  .reply-bar > * { white-space: nowrap; padding: 0 8px; font-size: 13px; gap: 6px; }
  .read-toolbar { padding-right: 10px; }
}
@media (max-width: 480px) { .reply-bar > * { flex: 1 1 auto; } }

/* ===== login: remember me, forgotten password, reset ===== */
.login-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 4px 6px; transform: translateZ(24px); }
.remember { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; color: var(--muted); cursor: pointer; user-select: none; }
.remember input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.remember .tick { width: 18px; height: 18px; border-radius: 6px; border: 1px solid rgba(255,255,255,.3); background: rgba(0,0,0,.4);
  box-shadow: inset 0 1px 3px rgba(0,0,0,.6); display: grid; place-items: center; transition: background .15s, border-color .15s; }
.remember input:checked + .tick { background: #fff; border-color: #fff; }
.remember input:checked + .tick::after { content: ""; width: 9px; height: 5px; border: 2px solid #000; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.remember input:focus-visible + .tick { box-shadow: 0 0 0 3px rgba(255,255,255,.25); }
.remember:hover { color: var(--text); }
.text-link { font-size: 13px; color: var(--muted); padding: 4px 2px; border-radius: 6px; text-decoration: underline; text-decoration-color: rgba(255,255,255,.25); text-underline-offset: 3px; }
.text-link:hover { color: #fff; text-decoration-color: #fff; }
.back-link { display: block; margin: 16px auto 0; transform: translateZ(24px); }
.login-logo.small { width: 150px; margin-bottom: 22px; }
.card-title { margin: 0 0 8px; font-size: 20px; font-weight: 700; text-align: center; transform: translateZ(30px); }
.card-text { margin: 0 0 20px; font-size: 13.5px; line-height: 1.55; color: var(--muted); text-align: center; transform: translateZ(20px); }
.card-hint { margin: -4px 4px 8px; font-size: 12px; color: var(--faint); }
.login-error.ok { color: #8fe3b0; }
.login-card[hidden] { display: none; }

/* ===== Ayarlar > Güvenlik ===== */
.sec-block { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--line); margin-bottom: 16px; }
.sec-block h3 { margin: 0; font-size: 15px; }
.sec-block .hint { margin: -4px 0 2px; }
.sec-block .send-btn { align-self: flex-start; }

/* show / hide password */
.pw-wrap { position: relative; display: block; width: 100%; }
.pw-wrap input { padding-right: 46px !important; width: 100%; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 10px; color: var(--faint); transition: color .15s, background .15s; }
.pw-eye:hover, .pw-eye.on { color: var(--text); background: var(--hover); }
.pw-eye svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.field .pw-eye { color: rgba(255,255,255,.55); }
.field .pw-eye:hover, .field .pw-eye.on { color: #fff; background: rgba(255,255,255,.08); }


/* ===== login stage v2: calmer card, livelier background ===== */
.login-card { transform: rotateX(var(--rx, 3deg)) rotateY(var(--ry, -2deg)); transition: transform .8s var(--ease); }
.login { background:
    radial-gradient(1400px 800px at 50% 120%, rgba(255,255,255,.10), transparent 60%),
    radial-gradient(900px 600px at 50% 45%, rgba(255,255,255,.04), transparent 70%),
    linear-gradient(180deg, #020203 0%, #07070a 55%, #030303 100%); }
.o3 { display: none; }
.o1 { border-color: rgba(255,255,255,.10); }

/* drifting light clouds; one carries the logo's red */
.aurora { position: absolute; inset: -20%; filter: blur(70px); opacity: .9; }
.aurora i { position: absolute; border-radius: 50%; mix-blend-mode: screen; }
.aurora .a1 { width: 52vw; height: 40vw; left: 8%; top: 10%; background: radial-gradient(closest-side, rgba(255,255,255,.16), transparent); animation: drift1 26s ease-in-out infinite alternate; }
.aurora .a2 { width: 46vw; height: 36vw; right: 6%; top: 26%; background: radial-gradient(closest-side, rgba(140,160,200,.16), transparent); animation: drift2 32s ease-in-out infinite alternate; }
.aurora .a3 { width: 34vw; height: 26vw; left: 38%; bottom: 8%; background: radial-gradient(closest-side, rgba(229,72,77,.20), transparent); animation: drift3 22s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(14vw, 8vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-16vw, -6vh) scale(.9); } }
@keyframes drift3 { to { transform: translate(-10vw, -14vh) scale(1.25); } }

/* stars at two depths, twinkling and rising slowly */
.stars { position: absolute; left: 50%; top: 50%; width: 1px; height: 1px; border-radius: 50%; transition: translate .6s var(--ease); }
.stars.far { animation: twinkle 7s ease-in-out infinite, rise 120s linear infinite; }
.stars.near { width: 1.5px; height: 1.5px; animation: twinkle 5s ease-in-out infinite reverse, rise 70s linear infinite; }
@keyframes twinkle { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes rise { from { transform: translateY(0); } to { transform: translateY(-160px); } }

/* a glowing ring turning behind the card, with a red spark at its head */
.halo { position: absolute; left: 50%; top: 47%; width: 640px; height: 640px; margin: -320px 0 0 -320px; border-radius: 50%;
  animation: halo 18s linear infinite; }
.halo::before { content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 62%, rgba(255,255,255,.05) 70%, rgba(255,255,255,.55) 96%, #fff 99%, transparent 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
  filter: drop-shadow(0 0 10px rgba(255,255,255,.5)); }
.halo i { position: absolute; left: 50%; top: -3px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #ff5a5f;
  box-shadow: 0 0 12px 3px rgba(255,90,95,.8), 0 0 40px 8px rgba(229,72,77,.35); }
@keyframes halo { to { transform: rotate(360deg); } }

/* horizon: a thin line of light the stage stands on */
.horizon { position: absolute; left: 10%; right: 10%; top: 78%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55) 50%, transparent);
  box-shadow: 0 0 24px 2px rgba(255,255,255,.18); opacity: .7; }
.floor { background: radial-gradient(closest-side, rgba(255,255,255,.10), transparent); }

/* film grain, so the dark areas don't band */
.grain { position: absolute; inset: 0; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* by day */
:root[data-theme="light"] .aurora { opacity: .7; }
:root[data-theme="light"] .aurora i { mix-blend-mode: multiply; }
:root[data-theme="light"] .aurora .a1 { background: radial-gradient(closest-side, rgba(120,130,150,.22), transparent); }
:root[data-theme="light"] .aurora .a2 { background: radial-gradient(closest-side, rgba(150,170,210,.25), transparent); }
:root[data-theme="light"] .aurora .a3 { background: radial-gradient(closest-side, rgba(229,72,77,.16), transparent); }
:root[data-theme="light"] .stars { display: none; }
:root[data-theme="light"] .halo::before { background: conic-gradient(from 0deg, transparent 0 62%, rgba(0,0,0,.04) 70%, rgba(0,0,0,.35) 96%, #111 99%, transparent 100%); filter: none; }
:root[data-theme="light"] .horizon { background: linear-gradient(90deg, transparent, rgba(0,0,0,.25) 50%, transparent); box-shadow: none; }
:root[data-theme="light"] .grain { opacity: .04; }

@media (max-width: 600px) {
  .halo { width: 420px; height: 420px; margin: -210px 0 0 -210px; }
  .aurora { filter: blur(50px); }
}
@media (prefers-reduced-motion: reduce) {
  .aurora i, .stars, .halo, .orbit, .core { animation: none !important; }
}
.floor { display: none; }
.horizon::after { content: ""; position: absolute; left: 15%; right: 15%; top: 0; height: 220px;
  background: radial-gradient(closest-side at 50% 0, rgba(255,255,255,.09), transparent); }
.aurora .a1 { background: radial-gradient(closest-side, rgba(255,255,255,.20), transparent); }
.aurora .a3 { background: radial-gradient(closest-side, rgba(229,72,77,.28), transparent); }
:root[data-theme="light"] .horizon::after { background: radial-gradient(closest-side at 50% 0, rgba(0,0,0,.06), transparent); }
:root[data-theme="light"] .field .pw-eye { color: rgba(0,0,0,.45); }
:root[data-theme="light"] .field .pw-eye:hover, :root[data-theme="light"] .field .pw-eye.on { color: #000; background: rgba(0,0,0,.06); }
:root[data-theme="light"] .text-link { text-decoration-color: rgba(0,0,0,.25); }
:root[data-theme="light"] .text-link:hover { color: #000; text-decoration-color: #000; }


/* ===== reading pane (Outlook style): list left, mail right ===== */
.split-handle, .read-empty { display: none; }
.content.split { flex-direction: row; --list-w: 420px; }
.content.split > .list-view { flex: none; width: var(--list-w); min-width: 320px; max-width: calc(100% - 420px); }
.content.split > .split-handle:not([hidden]) { display: block; flex: none; width: 9px; margin: 0 -4px; position: relative; z-index: 3; cursor: col-resize; }
.content.split > .split-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: 4px; width: 1px; background: var(--line); transition: background .15s, box-shadow .15s; }
.content.split > .split-handle:hover::before, .content.resizing > .split-handle::before { background: var(--text); box-shadow: 0 0 10px rgba(255,255,255,.35); }
.content.resizing { cursor: col-resize; user-select: none; }
.content.resizing iframe { pointer-events: none; }
.content.split > .read-view, .content.split > .read-empty:not([hidden]) { flex: 1; min-width: 0; }
.content.split > .read-view { animation: paneIn .28s var(--ease); }
@keyframes paneIn { from { opacity: 0; transform: translateX(10px); } }
.content.split #back { display: none; }
.content.split .thread { max-width: 980px; }

/* nothing open yet */
.content.split > .read-empty:not([hidden]) { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--faint); text-align: center; padding: 24px; }
.read-empty b { color: var(--muted); font-size: 15px; font-weight: 600; }
.read-empty span { font-size: 13px; }
.read-empty kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px; border: 1px solid var(--line-2); font: 600 11px/1 inherit; color: var(--muted); }
.re-art { width: 84px; height: 84px; border-radius: 24px; display: grid; place-items: center; margin-bottom: 6px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--text) 10%, transparent), color-mix(in srgb, var(--text) 3%, transparent));
  border: 1px solid var(--line); box-shadow: 0 20px 40px rgba(0,0,0,.25), inset 0 1px 0 color-mix(in srgb, var(--text) 12%, transparent);
  transform: perspective(600px) rotateX(14deg); animation: reFloat 6s ease-in-out infinite; }
.re-art svg { width: 34px; height: 34px; color: var(--muted); }
@keyframes reFloat { 50% { transform: perspective(600px) rotateX(6deg) translateY(-6px); } }

/* compact two-line rows in the narrow list */
.content.split .msg { grid-template-columns: 28px minmax(0, 1fr) auto; grid-template-areas: "check from right" "star line line";
  height: auto; padding: 10px 14px 10px 6px; row-gap: 3px; align-items: center; }
.content.split .msg .check { grid-area: check; }
.content.split .msg .star { grid-area: star; }
.content.split .msg .from { grid-area: from; color: var(--text); font-weight: 500; padding-right: 8px; }
.content.split .msg .line { grid-area: line; }
.content.split .msg .right { grid-area: right; }
.content.split .msg.current { background: color-mix(in srgb, var(--text) 11%, transparent); }
.content.split .msg.current:hover { background: color-mix(in srgb, var(--text) 14%, transparent); }
.content.split .list-toolbar #range { display: none; }
#pane-toggle.on { color: var(--text); background: var(--hover); }
.content.split .msg { grid-template-columns: 34px minmax(0, 1fr) auto; }
.content.split .msg .check, .content.split .msg .star { justify-self: center; }
.reply-bar > * { white-space: nowrap; }
.content.split .mail-date span { white-space: nowrap; }
.content.split .reply-bar { flex-wrap: wrap; }

/* ===== top bar set apart; Yeni posta lined up with the mail card ===== */
.topbar { border-bottom: 1px solid var(--line); }
.content { margin-top: 14px; }
.sidebar { padding-top: 14px; }
.compose-btn { align-self: stretch; justify-content: center; height: 40px; margin: 0 4px 14px; padding: 0 18px; transform: none; border-radius: 13px; }
.compose-btn:active { transform: translateY(1px); }
@media (max-width: 860px) {
  .content { margin-top: 8px; }
  .sidebar { padding-top: 10px; }
}
.topbar { border-bottom-color: var(--line-2); background: color-mix(in srgb, var(--text) 2.5%, transparent); }

/* ===== top bar as a glass card, the same material as the clock ===== */
.topbar { margin: 10px 16px 0 10px; padding: 0 12px 0 16px; border-radius: 18px; border: 1px solid var(--line);
  background: radial-gradient(60% 220% at 0% 0%, color-mix(in srgb, var(--text) 10%, transparent), transparent 60%), var(--panel-2);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--text) 8%, transparent), 0 14px 30px rgba(0,0,0,.25);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); position: relative; z-index: 5; }
.app { grid-template-rows: 64px 1fr; }
.content { margin-top: 12px; }
.sidebar { padding-top: 12px; }
.topbar .search { background: color-mix(in srgb, var(--text) 4%, var(--panel)); }
@media (max-width: 860px) {
  .app { grid-template-rows: 62px minmax(0, 1fr); }
  .topbar { margin: 6px 6px 0; padding: 0 6px 0 4px; border-radius: 16px; }
  .content { margin-top: 8px; }
}
/* logo column = sidebar column, so the search starts exactly where the mail card starts */
.brand { padding: 0 0 0 4px; flex: 0 0 calc(256px - 10px - 16px - 4px - 11px); }
/* more air under the top bar; Yeni posta a little taller and narrower, still level with the mail card */
@media (min-width: 861px) {
  .content { margin-top: 20px; }
  .sidebar { padding-top: 20px; }
  .compose-btn { height: 46px; margin: 0 18px 18px; }
}
@media (max-width: 860px) {
  /* closed drawer: fully out of sight (its buttons' shadows used to peek at the left edge) */
  .sidebar { transform: translateX(calc(-100% - 40px)); visibility: hidden; transition: transform .3s var(--ease), visibility 0s linear .3s; }
  .sidebar.open { transform: none; visibility: visible; transition: transform .3s var(--ease); }
  .sidebar { top: 68px; }
}
/* clock card ends on the same line as the mail card */
@media (min-width: 861px) {
  .sidebar { padding-bottom: 16px; }
  .sidebar .clock { margin-bottom: 0; }
}
.sidebar-foot:has(#quota:empty) { display: none; }
/* the reading pane adapts to its own width: when narrow, text and buttons use the full width */
.read-view { container-type: inline-size; container-name: pane; }
.content.split .reply-bar { flex-wrap: nowrap; }
@container pane (max-width: 640px) {
  .mail-body, .files, .reply-bar, .images-note, .mail-snippet { margin-left: 8px !important; }
  .reply-bar { gap: 8px; margin-right: 0; }
  .reply-bar .pill { padding: 0 14px; gap: 8px; }
}
@container pane (max-width: 380px) {
  .reply-bar { flex-wrap: wrap; }
}
/* visible separators between mails in the list (light theme uses its own --line) */
.msg { border-bottom: 1px solid var(--line); }
.msg:last-child { border-bottom-color: transparent; }
/* and between the mails of one conversation */
.thread .mail + .mail { border-top: 1px solid var(--line); border-radius: 0 0 16px 16px; padding-top: 10px; margin-top: 4px; }


/* ===== attachments: chips with thumbnails, and the viewer ===== */
.files .file { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 4px; border-radius: 14px; border: 1px solid var(--line-2);
  background: color-mix(in srgb, var(--text) 3%, transparent); max-width: 280px; transition: background .15s, border-color .15s, transform .15s; }
.files .file:hover { background: color-mix(in srgb, var(--text) 7%, transparent); border-color: color-mix(in srgb, var(--text) 25%, transparent); transform: translateY(-1px); }
.file-open { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 2px 6px 2px 2px; text-align: left; color: var(--text); }
.file-thumb { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; background: var(--panel-2); flex: none; }
.file-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex: none; font: 700 10.5px/1 var(--font); letter-spacing: .04em;
  color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); }
.file.can-view .file-ico { color: #ff8a8a; border-color: rgba(255,120,120,.25); }
.file-meta { display: flex; flex-direction: column; min-width: 0; }
.file-name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta small { font-size: 11.5px; color: var(--faint); }
.file-dl { flex: none; }

.viewer { position: fixed; inset: 0; z-index: 900; display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; grid-template-rows: 64px minmax(0, 1fr);
  background: rgba(5,5,6,.88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: dlg-fade .15s ease-out; outline: none; }
.viewer-bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 0 14px 0 22px; color: #f2f2f2; }
.viewer-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; flex: 1; }
.viewer-title b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-title small, .viewer-count { color: rgba(255,255,255,.5); font-size: 12.5px; white-space: nowrap; }
.viewer-bar .pill, .viewer-bar .icon-btn { color: #f2f2f2; border-color: rgba(255,255,255,.2); }
.viewer-bar .pill svg { width: 16px; height: 16px; }
.viewer-stage { grid-column: 2; grid-row: 2; display: grid; place-items: center; min-height: 0; padding: 0 0 24px; overflow: auto; }
.viewer-img { max-width: 100%; max-height: calc(100vh - 96px); border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.6); cursor: zoom-in; animation: viewIn .25s var(--ease); background: #fff; }
.viewer-img.zoom { max-width: none; max-height: none; cursor: zoom-out; }
.viewer-pdf { width: min(1000px, 100%); height: calc(100vh - 96px); border: 0; border-radius: 10px; background: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.6); animation: viewIn .25s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: scale(.97); } }
.viewer-nav { grid-row: 2; align-self: center; justify-self: center; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  color: #f2f2f2; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); transition: background .15s; }
.viewer-nav:hover { background: rgba(255,255,255,.18); }
.viewer-nav.prev { grid-column: 1; } .viewer-nav.next { grid-column: 3; }
.viewer-nav svg { width: 20px; height: 20px; }
.viewer-nav[hidden] { display: none; }
@media (max-width: 600px) {
  .viewer { grid-template-columns: 0 minmax(0, 1fr) 0; grid-template-rows: 56px minmax(0, 1fr); }
  .viewer-bar { padding: 0 8px 0 14px; gap: 8px; }
  .viewer-title small, .viewer-dl { display: none; }
  .viewer-nav { position: fixed; bottom: 20px; z-index: 2; }
  .viewer-nav.prev { left: 20px; } .viewer-nav.next { right: 20px; }
  .viewer-stage { padding: 0 8px 80px; }
  .viewer-pdf { height: calc(100vh - 140px); }
}
/* the viewer is always dark, whatever the theme */
.viewer .viewer-bar .pill, .viewer .viewer-bar .icon-btn { color: #f2f2f2 !important; background: rgba(255,255,255,.08) !important; border: 1px solid rgba(255,255,255,.18) !important; box-shadow: none !important; }
.viewer .viewer-bar .pill:hover, .viewer .viewer-bar .icon-btn:hover { background: rgba(255,255,255,.16) !important; }
.viewer .viewer-bar .icon-btn svg { stroke: #f2f2f2; }
.viewer-dl { text-decoration: none; }
@media (max-width: 600px) {
  .viewer .viewer-dl { display: inline-flex; font-size: 0; gap: 0; width: 40px; height: 40px; padding: 0; justify-content: center; }
  .viewer .viewer-dl svg { width: 18px; height: 18px; }
}


/* ===== contacts: column headers, e-mail in its own column, import / export ===== */
.contacts-head, .contacts .contact { display: grid; grid-template-columns: 40px minmax(0, 1.2fr) minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, .9fr) 76px;
  align-items: center; column-gap: 16px; }
.contacts-head { padding: 10px 20px 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint);
  border-bottom: 1px solid var(--line); flex: none; }
.contacts-head[hidden] { display: none; }
.contacts .contact { padding: 10px 20px; border-bottom: 1px solid var(--line); }
.contacts .contact .c-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contacts .contact .c-mail, .contacts .contact .c-org, .contacts .contact .c-phone { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 13.5px; }
.contacts .contact .c-phone { font-variant-numeric: tabular-nums; }
.contacts .contact .c-acts { justify-self: end; display: flex; gap: 2px; }
#contact-import, #contact-export { gap: 7px; }
#contact-import svg, #contact-export svg, #contacts-view .send-btn svg { width: 16px; height: 16px; }
#export-menu { right: 0; left: auto; min-width: 290px; }
#export-menu button { display: flex; align-items: center; gap: 12px; padding: 10px 12px; text-align: left; }
#export-menu button > span { display: flex; flex-direction: column; gap: 2px; }
#export-menu small { color: var(--faint); font-size: 11.5px; }
.import-card { width: min(720px, calc(100vw - 24px)); }
.import-sum { margin: 0; font-size: 14px; color: var(--muted); }
.import-sum b { color: var(--text); }
.import-table { max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.import-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.import-table th { position: sticky; top: 0; background: var(--panel-2); text-align: left; font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); }
.import-table th, .import-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.import-table tr:last-child td { border-bottom: 0; }
@media (max-width: 860px) {
  .contacts-head { display: none; }
  .contacts .contact { grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-areas: "av name acts" "av mail acts"; row-gap: 2px; padding: 10px 12px; }
  .contacts .contact .avatar { grid-area: av; } .contacts .contact .c-name { grid-area: name; } .contacts .contact .c-mail { grid-area: mail; }
  .contacts .contact .c-org, .contacts .contact .c-phone { display: none; }
  .contacts .contact .c-acts { grid-area: acts; }
  #contact-import, #contact-export { font-size: 0; gap: 0; padding: 0 10px; }
  #contacts-view .list-toolbar { flex-wrap: wrap; height: auto; padding: 8px; row-gap: 8px; }
}
.contacts-head { padding-left: 30px; padding-right: 30px; }

/* calendar: quicker turn, and "Bugün" points at today */
.cal-grid.flip { animation-duration: .3s; }
.cal-cell.pulse, #week-head .wh.pulse { animation: todayPulse 1.1s var(--ease); }
@keyframes todayPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--text) 55%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
.sidebar .clock #clock-date { white-space: normal; overflow: visible; line-height: 1.35; }


/* ===== loading skeletons ===== */
.sk { display: block; height: 11px; border-radius: 6px; background: linear-gradient(90deg, var(--hover) 0%, color-mix(in srgb, var(--text) 10%, transparent) 50%, var(--hover) 100%);
  background-size: 250% 100%; animation: skMove 1.3s ease-in-out infinite; }
@keyframes skMove { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.sk-thin { height: 9px; opacity: .7; }
.sk-row { display: grid; grid-template-columns: 30px 200px minmax(0, 1fr) 46px; align-items: center; gap: 16px; height: 46px; padding: 0 16px 0 14px; border-bottom: 1px solid var(--line); list-style: none; }
.sk-row .sk-box { width: 16px; height: 16px; border-radius: 5px; }
.sk-row .sk-date { width: 40px; justify-self: end; }
.content.split .sk-row { grid-template-columns: 34px minmax(0, 1fr) 40px; grid-template-areas: "box from date" ". line line"; height: auto; padding: 14px 14px 14px 6px; row-gap: 10px; }
.content.split .sk-row .sk-box { grid-area: box; justify-self: center; } .content.split .sk-row .sk-from { grid-area: from; }
.content.split .sk-row .sk-line { grid-area: line; width: 85% !important; } .content.split .sk-row .sk-date { grid-area: date; }
.sk-mail { display: flex; flex-direction: column; gap: 12px; padding: 20px 12px; }
.sk-head { display: grid; grid-template-columns: 40px 1fr 60px; gap: 14px; align-items: center; margin-bottom: 10px; }
.sk-head > div { display: flex; flex-direction: column; gap: 8px; }
.sk-avatar { width: 38px; height: 38px; border-radius: 50%; }
.sk-mail .sk-date, .sk-head .sk-date { width: 60px; }
.sk-contact { cursor: default; }
.sk-contact .sk-avatar { width: 34px; height: 34px; }
.sk-agenda { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center; padding: 14px; border-radius: 14px; border: 1px solid var(--line); margin-bottom: 8px; list-style: none; }
.sk-agenda > div { display: flex; flex-direction: column; gap: 8px; }
#calendar-view.loading .cal-cell { position: relative; }
#calendar-view.loading .cal-cell:not(.out)::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 12px; height: 12px; border-radius: 5px;
  background: linear-gradient(90deg, var(--hover) 0%, color-mix(in srgb, var(--text) 9%, transparent) 50%, var(--hover) 100%); background-size: 250% 100%; animation: skMove 1.3s ease-in-out infinite; opacity: .8; }
#calendar-view.loading .cal-cell:nth-child(3n)::after { right: 30%; } #calendar-view.loading .cal-cell:nth-child(4n)::after { display: none; }
@media (prefers-reduced-motion: reduce) { .sk, #calendar-view.loading .cal-cell::after { animation: none; } }
