/* ==========================================================================
   Poçt — Yandex 360 Mail dizayn sistemi əsasında
   Ölçülər canlı interfeysdən götürülüb: rail 64 · aside 291 · sətir 38/78
   ========================================================================== */

:root {
  /* geometriya */
  --rail-w: 64px;
  --aside-w: 291px;
  --right-w: 319px;
  --gap: 16px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --row-h: 38px;

  /* tünd tema (əsas) */
  --txt-1: rgba(247, 247, 255, .9);
  --txt-2: rgba(247, 247, 255, .5);
  --txt-3: rgba(247, 247, 255, .32);
  --txt-on-accent: #fff;

  --line: rgba(255, 255, 255, .1);
  --hover: rgba(255, 255, 255, .08);
  --active: rgba(255, 255, 255, .2);
  --chip: rgba(211, 211, 222, .15);
  --chip-hover: rgba(211, 211, 222, .24);

  --panel: rgba(0, 0, 0, .22);
  --panel-soft: rgba(255, 255, 255, .04);
  --overlay: rgba(10, 9, 11, .6);
  --pop: #33313a;
  --pop-line: rgba(255, 255, 255, .12);

  --btn-light: rgba(247, 247, 255, .92);
  --btn-light-fg: #222426;
  --accent: #fc3f1d;
  --unread: #ffdc60;
  --danger: #ff5c4d;

  --shadow-pop: 0 12px 40px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .4);

  --app-bg:
    radial-gradient(1200px 820px at 3% -8%, #5c352a 0%, rgba(92, 53, 42, 0) 55%),
    radial-gradient(940px 720px at 40% -22%, #4a2f3d 0%, rgba(74, 47, 61, 0) 58%),
    linear-gradient(162deg, #272428 0%, #171618 62%, #121113 100%);

  --font: "YS Text", -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter",
          Arial, "Helvetica Neue", sans-serif;
}

/* işıqlı tema */
[data-theme="light"] {
  --txt-1: rgba(20, 20, 26, .92);
  --txt-2: rgba(20, 20, 26, .52);
  --txt-3: rgba(20, 20, 26, .34);
  --line: rgba(0, 0, 0, .1);
  --hover: rgba(0, 0, 0, .05);
  --active: rgba(0, 0, 0, .09);
  --chip: rgba(28, 28, 40, .07);
  --chip-hover: rgba(28, 28, 40, .12);
  --panel: rgba(255, 255, 255, .72);
  --panel-soft: rgba(255, 255, 255, .5);
  --overlay: rgba(40, 36, 44, .35);
  --pop: #fff;
  --pop-line: rgba(0, 0, 0, .08);
  --btn-light: #2b2a31;
  --btn-light-fg: #f7f7ff;
  --shadow-pop: 0 12px 40px rgba(40, 30, 50, .18), 0 2px 8px rgba(40, 30, 50, .1);
  --app-bg:
    radial-gradient(1100px 760px at 4% -8%, #ffd9c7 0%, rgba(255, 217, 199, 0) 56%),
    radial-gradient(900px 700px at 42% -20%, #e5dcf7 0%, rgba(229, 220, 247, 0) 58%),
    linear-gradient(162deg, #f4f1ef 0%, #eceaf0 100%);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  font: 400 13px/1.5 var(--font);
  color: var(--txt-1);
  background: var(--app-bg) fixed;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
svg { width: 20px; height: 20px; flex: none; display: block; }
::selection { background: #ffedaf; color: #1b1b1f; }

.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- skelet ---------- */
.app {
  height: 100vh;
  display: grid;
  grid-template-columns: var(--rail-w) var(--aside-w) minmax(0, 1fr) auto;
  padding: 12px 16px 12px 0;
  gap: 0;
}

/* ---------- sol ikon zolağı ---------- */
.rail {
  grid-column: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 0 16px;
  overflow: hidden auto;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }

.rail-logo { display: block; margin-bottom: 4px; }
.rail-logo svg { width: 32px; height: 32px; }

.rail-app {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  color: var(--txt-1);
  opacity: .82;
  transition: background .12s, opacity .12s, transform .12s;
  position: relative;
}
.rail-app:hover { background: var(--hover); opacity: 1; }
.rail-app:active { transform: scale(.93); }
.rail-app svg { width: 22px; height: 22px; }
.rail-app.is-brand { opacity: 1; }
.rail-app.is-brand svg { width: 36px; height: 36px; }
.rail-app.is-brand:hover { background: none; }
.rail-app.is-last { margin-top: 8px; }

.rail-app[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute; left: calc(100% + 6px); top: 50%;
  transform: translateY(-50%);
  background: var(--pop); color: var(--txt-1);
  border: 1px solid var(--pop-line);
  padding: 5px 9px; border-radius: var(--r-sm);
  white-space: nowrap; font-size: 12px; z-index: 60;
  box-shadow: var(--shadow-pop); pointer-events: none;
}

/* ---------- yan panel ---------- */
.aside {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-right: var(--gap);
}

.aside-head {
  display: flex; align-items: center;
  gap: 2px; padding: 6px 0 14px;
}
.aside-title {
  font-size: 28px; font-weight: 700; letter-spacing: -.4px;
  margin: 0 auto 0 0; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.icon-btn {
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  color: var(--txt-1);
  transition: background .12s, transform .12s, color .12s;
}
.icon-btn:hover { background: var(--hover); }
.icon-btn:active { transform: scale(.93); }
.icon-btn.is-sm { width: 28px; height: 28px; }
.icon-btn.is-sm svg { width: 17px; height: 17px; }

.compose-row { display: flex; gap: 8px; margin-bottom: 12px; }

.compose {
  flex: 1 1 auto; height: 36px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--btn-light); color: var(--btn-light-fg);
  border-radius: var(--r-md);
  font-size: 14px; font-weight: 500;
  transition: filter .12s, transform .12s;
}
.compose:hover { filter: brightness(.94); }
.compose:active { transform: scale(.985); }
.compose svg { width: 18px; height: 18px; }

.refresh { width: 36px; height: 36px; background: var(--chip); border-radius: var(--r-md); }
.refresh:hover { background: var(--chip-hover); }
.refresh.is-spinning svg { animation: spin .7s linear; }
@keyframes spin { to { transform: rotate(360deg); } }

.aside-scroll { flex: 1 1 auto; overflow: hidden auto; min-height: 0; scrollbar-width: thin; }
.aside-scroll::-webkit-scrollbar { width: 6px; }
.aside-scroll::-webkit-scrollbar-thumb { background: var(--chip); border-radius: 3px; }

/* qovluq sətri */
.folder {
  height: 36px; margin-bottom: 2px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 10px 0 10px;
  border-radius: var(--r-md);
  color: var(--txt-1); cursor: pointer;
  transition: background .12s;
  position: relative; width: 100%; text-align: left;
}
.folder:hover { background: var(--hover); }
.folder.is-active { background: var(--active); }
.folder svg { width: 18px; height: 18px; opacity: .9; }
.folder-name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder.is-child { padding-left: 38px; }
.folder-unread {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--txt-2); flex: none;
}
.folder-count { color: var(--txt-2); font-variant-numeric: tabular-nums; flex: none; }
.folder.is-active .folder-count { color: var(--txt-1); }
.folder-act {
  width: 22px; height: 22px; flex: none; display: none;
  place-items: center; border-radius: 6px; color: var(--txt-2);
}
.folder-act svg { width: 15px; height: 15px; }
.folder:hover .folder-act { display: grid; }
.folder-act:hover { background: var(--hover); color: var(--txt-1); }

/* çip sırası */
.chips { display: flex; gap: 8px; margin: 10px 0 12px; }
.chip {
  flex: 1 1 0; height: 36px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--chip); border-radius: var(--r-md);
  color: var(--txt-1); font-variant-numeric: tabular-nums;
  transition: background .12s;
}
.chip:hover { background: var(--chip-hover); }
.chip.is-active { background: var(--active); }
.chip svg { width: 17px; height: 17px; }
.chip .dot-y { color: var(--unread); }

.aside-foot {
  padding: 12px 0 2px; margin-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--txt-2); font-size: 12px;
}
.foot-row { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; flex-wrap: wrap; }
.foot-link { display: inline-flex; align-items: center; gap: 6px; color: var(--txt-2); cursor: pointer; }
.foot-link:hover { color: var(--txt-1); }
.foot-link svg { width: 15px; height: 15px; }
.foot-copy { color: var(--txt-3); font-size: 11px; }

/* ---------- əsas panel ---------- */
.main {
  grid-column: 3;
  min-width: 0; min-height: 0;
  display: flex; flex-direction: column;
  background: var(--panel);
  border-radius: var(--r-lg);
  overflow: hidden;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

/* axtarış */
.search-bar { padding: 10px 12px 6px; }
.search {
  height: 36px; display: flex; align-items: center; gap: 8px;
  padding: 0 12px; border-radius: var(--r-md);
  background: var(--chip); color: var(--txt-2);
}
.search svg { width: 17px; height: 17px; }
.search input {
  flex: 1; background: none; border: 0; outline: 0;
  color: var(--txt-1); min-width: 0;
}
.search input::placeholder { color: var(--txt-2); }

/* alət paneli */
.toolbar {
  display: flex; align-items: center; gap: 2px;
  padding: 4px 12px 8px; min-height: 44px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.tb-check { padding: 0 10px 0 4px; }
.tb-btn {
  height: 32px; padding: 0 10px;
  display: inline-flex; align-items: center; gap: 7px;
  border-radius: var(--r-sm); color: var(--txt-2);
  white-space: nowrap; transition: background .12s, color .12s;
}
.tb-btn:hover:not(:disabled) { background: var(--hover); color: var(--txt-1); }
.tb-btn:disabled { opacity: .4; cursor: default; }
.tb-btn svg { width: 17px; height: 17px; }
.tb-btn .chev { width: 14px; height: 14px; margin-left: -2px; }
.tb-sel { margin-left: auto; color: var(--txt-2); white-space: nowrap; padding-right: 4px; }

/* siyahı */
.list { flex: 1 1 auto; overflow: hidden auto; min-height: 0; scrollbar-width: thin; }
.list::-webkit-scrollbar { width: 8px; }
.list::-webkit-scrollbar-thumb { background: var(--chip); border-radius: 4px; }
.list::-webkit-scrollbar-thumb:hover { background: var(--chip-hover); }

.day-sep {
  padding: 16px 16px 6px; color: var(--txt-3);
  font-size: 11px; font-weight: 500; letter-spacing: .3px;
  text-transform: lowercase;
  position: sticky; top: 0; z-index: 2;
  background: linear-gradient(180deg, rgba(24,22,26,.92) 55%, rgba(24,22,26,0));
  backdrop-filter: blur(6px);
}
[data-theme="light"] .day-sep {
  background: linear-gradient(180deg, rgba(250,249,252,.94) 55%, rgba(250,249,252,0));
}

.row {
  display: grid;
  grid-template-columns: 16px 28px 32px 180px 16px minmax(0, 1fr) auto auto;
  grid-template-areas: "expand check ava sender dot body attach date";
  align-items: center;
  column-gap: 12px;
  min-height: var(--row-h);
  padding: 0 16px 0 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  position: relative;
  transition: background .1s;
}
.row:hover { background: var(--hover); }
.row.is-selected { background: var(--active); }
.row.is-open { background: var(--active); }
.row.is-tall { min-height: 78px; align-items: start; padding-top: 12px; padding-bottom: 12px; }

.row-expand { grid-area: expand; justify-self: end; color: var(--txt-3); display: grid; place-items: center; }
.row-expand svg { width: 12px; height: 12px; }
.row.is-tall .row-expand,
.row.is-tall .row-check,
.row.is-tall .row-ava,
.row.is-tall .row-sender,
.row.is-tall .row-dot,
.row.is-tall .row-date { margin-top: 5px; }

.row-check { grid-area: check; justify-self: center; }
.cbx {
  width: 16px; height: 16px; border-radius: 4px;
  border: 1.5px solid var(--txt-3); display: grid; place-items: center;
  transition: background .12s, border-color .12s;
}
.cbx svg { width: 12px; height: 12px; opacity: 0; color: #fff; }
.cbx.is-on { background: var(--accent); border-color: var(--accent); }
.cbx.is-on svg { opacity: 1; }
.row:hover .cbx { border-color: var(--txt-2); }

.row-ava { grid-area: ava; }
.ava {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; font-size: 13px; font-weight: 500;
  letter-spacing: .2px; user-select: none;
}
.ava.is-sm { width: 24px; height: 24px; font-size: 11px; }
.ava.is-lg { width: 40px; height: 40px; font-size: 15px; }

.row-sender { grid-area: sender; color: var(--txt-1); }
.row.is-unread .row-sender { font-weight: 700; }

.row-dot { grid-area: dot; justify-self: center; }
.dot-btn { width: 16px; height: 16px; display: grid; place-items: center; border-radius: 50%; }
.dot-btn svg { width: 9px; height: 9px; color: transparent; }
.row.is-unread .dot-btn svg { color: var(--unread); }
.row:hover .dot-btn svg { color: var(--txt-3); }
.row.is-unread:hover .dot-btn svg { color: var(--unread); }
.dot-btn:hover svg { transform: scale(1.25); }

.row-body { grid-area: body; min-width: 0; }
.row-line { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.row-subject { color: var(--txt-1); flex: 0 1 auto; }
.row.is-unread .row-subject { font-weight: 700; }
.row.is-tall .row-subject { flex: 1 1 auto; }
.row-snippet { color: var(--txt-2); flex: 1 1 auto; min-width: 0; }
.row.is-tall .row-snippet { display: block; margin-top: 4px; }
.row-thread {
  flex: none; height: 18px; min-width: 22px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--chip); border-radius: 6px;
  color: var(--txt-2); font-size: 11px; font-variant-numeric: tabular-nums;
}
.row-badges { display: inline-flex; gap: 4px; flex: none; align-items: center; }
.lb-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.row-star { color: var(--txt-3); display: none; }
.row-star svg { width: 15px; height: 15px; }
.row:hover .row-star { display: block; }
.row-star.is-on { display: block; color: var(--unread); }
.row-star.is-on svg { fill: var(--unread); }

.row-attach { grid-area: attach; display: flex; gap: 6px; align-items: center; }
.att {
  width: 116px; height: 72px; padding: 8px;
  background: var(--chip); border-radius: var(--r-md);
  display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden; transition: background .12s;
}
.att:hover { background: var(--chip-hover); }
.att-name {
  font-size: 11px; line-height: 1.3; color: var(--txt-1);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-all;
}
.att-kind {
  align-self: flex-start; padding: 1px 5px; border-radius: 4px;
  font-size: 10px; font-weight: 700; color: #fff; letter-spacing: .3px;
}
.att-kind.pdf { background: #e5352b; }
.att-kind.img { background: #3aa655; }
.att-kind.doc { background: #2b6cd4; }
.att-more {
  width: 36px; height: 72px; background: var(--chip); border-radius: var(--r-md);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 8px 0; color: var(--txt-1); font-size: 12px;
}
.att-more .dl { color: var(--txt-2); }
.att-more .dl:hover { color: var(--txt-1); }
.att-more svg { width: 16px; height: 16px; }

.row-date {
  grid-area: date; color: var(--txt-2);
  font-variant-numeric: tabular-nums; white-space: nowrap;
  justify-self: end; min-width: 44px; text-align: right;
}
.row-clip { color: var(--txt-2); }
.row-clip svg { width: 14px; height: 14px; }

/* boş vəziyyət */
.empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  color: var(--txt-2); padding: 40px;
}
.empty svg { width: 44px; height: 44px; opacity: .45; }
.empty b { color: var(--txt-1); font-size: 15px; font-weight: 500; }

/* ---------- məktub görünüşü ---------- */
.reader { flex: 1 1 auto; overflow: hidden auto; min-height: 0; }
.reader-in { max-width: 860px; padding: 18px 28px 60px; }
.reader-subject {
  font-size: 22px; font-weight: 700; line-height: 1.3;
  margin: 0 0 16px; letter-spacing: -.2px;
}
.reader-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 20px; }
.reader-meta { flex: 1; min-width: 0; }
.reader-from { font-weight: 700; }
.reader-mail { color: var(--txt-2); }
.reader-to { color: var(--txt-2); margin-top: 2px; }
.reader-date { color: var(--txt-2); white-space: nowrap; }
.reader-body { font-size: 14px; line-height: 1.62; color: var(--txt-1); }
.reader-body p { margin: 0 0 14px; }
.reader-body code {
  background: var(--chip); padding: 1px 5px; border-radius: 4px; font-size: 13px;
}
.reader-att { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 6px; }
.reader-actions { display: flex; gap: 8px; margin-top: 28px; flex-wrap: wrap; }
.btn {
  height: 36px; padding: 0 16px; border-radius: var(--r-md);
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--chip); color: var(--txt-1); transition: background .12s;
}
.btn:hover { background: var(--chip-hover); }
.btn svg { width: 17px; height: 17px; }
.btn.is-primary { background: var(--btn-light); color: var(--btn-light-fg); }
.btn.is-primary:hover { filter: brightness(.94); background: var(--btn-light); }
.btn.is-danger:hover { background: rgba(255, 92, 77, .18); color: var(--danger); }

/* ---------- sağ sütun ---------- */
.side-right {
  grid-column: 4;
  width: var(--right-w);
  padding-left: var(--gap);
  display: flex; flex-direction: column; gap: 12px;
  overflow: hidden auto;
  scrollbar-width: none;
}
.side-right::-webkit-scrollbar { display: none; }
.card {
  background: var(--panel); border-radius: var(--r-lg);
  padding: 14px 16px; backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.card h3 {
  margin: 0 0 12px; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: space-between;
}
.card h3 span { color: var(--txt-2); font-weight: 400; }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-grid i { color: var(--txt-3); font-style: normal; font-size: 11px; padding-bottom: 4px; }
.cal-day {
  height: 28px; display: grid; place-items: center;
  border-radius: 8px; font-size: 12px; color: var(--txt-1);
  font-variant-numeric: tabular-nums;
}
.cal-day.is-out { color: var(--txt-3); }
.cal-day.is-today { background: var(--accent); color: #fff; font-weight: 700; }
.cal-day.has-ev { position: relative; }
.cal-day.has-ev::after {
  content: ""; position: absolute; bottom: 3px; width: 4px; height: 4px;
  border-radius: 50%; background: var(--unread);
}
.cal-day.is-today.has-ev::after { background: #fff; }

.bar { height: 6px; border-radius: 3px; background: var(--chip); overflow: hidden; margin: 4px 0 8px; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, #fc3f1d, #ff9147); }
.muted { color: var(--txt-2); font-size: 12px; }

.contact { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; }
.contact:hover .contact-name { color: var(--accent); }
.contact-name { font-size: 12px; }
.contact-mail { font-size: 11px; color: var(--txt-2); }

/* ---------- yaz pəncərəsi ---------- */
.composer {
  position: fixed; right: 24px; bottom: 0;
  width: 620px; max-width: calc(100vw - 48px);
  background: var(--pop); border: 1px solid var(--pop-line);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: var(--shadow-pop);
  display: flex; flex-direction: column;
  z-index: 50;
  animation: slideUp .18s ease-out;
}
@keyframes slideUp { from { transform: translateY(16px); opacity: 0; } }
.composer.is-min { height: auto !important; }
.composer.is-min .composer-body { display: none; }
.composer-head {
  display: flex; align-items: center; gap: 4px;
  padding: 10px 10px 10px 16px; border-bottom: 1px solid var(--line);
  cursor: default;
}
.composer-head b { flex: 1; font-size: 13px; }
.composer-body { display: flex; flex-direction: column; height: 460px; }
.composer-field {
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px; height: 42px; border-bottom: 1px solid var(--line);
}
.composer-field label { color: var(--txt-2); width: 52px; flex: none; }
.composer-field input {
  flex: 1; background: none; border: 0; outline: 0; color: var(--txt-1); min-width: 0;
}
.composer-text {
  flex: 1; padding: 14px 16px; background: none; border: 0; outline: 0;
  color: var(--txt-1); resize: none; font-size: 14px; line-height: 1.6;
}
.composer-foot {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-top: 1px solid var(--line);
}
.composer-foot .spacer { flex: 1; }
.composer-att { padding: 0 16px 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 6px 0 10px; border-radius: 13px;
  background: var(--chip); font-size: 12px;
}
.pill button { color: var(--txt-2); display: grid; place-items: center; }
.pill svg { width: 13px; height: 13px; }

/* ---------- menyu ---------- */
.menu {
  position: fixed; z-index: 70; min-width: 210px;
  background: var(--pop); border: 1px solid var(--pop-line);
  border-radius: var(--r-md); box-shadow: var(--shadow-pop);
  padding: 6px; animation: pop .12s ease-out;
}
@keyframes pop { from { transform: translateY(-4px); opacity: 0; } }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  height: 34px; padding: 0 10px; border-radius: var(--r-sm);
  color: var(--txt-1); text-align: left; font-size: 13px;
}
.menu-item:hover { background: var(--hover); }
.menu-item svg { width: 16px; height: 16px; opacity: .8; }
.menu-item .lb-dot { width: 9px; height: 9px; }
.menu-sep { height: 1px; background: var(--line); margin: 5px 4px; }
.menu-head { padding: 6px 10px 4px; color: var(--txt-2); font-size: 11px; }

/* ---------- toast ---------- */
.toasts {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; z-index: 90; align-items: center;
}
.toast {
  background: var(--pop); border: 1px solid var(--pop-line);
  border-radius: var(--r-md); box-shadow: var(--shadow-pop);
  padding: 10px 14px; display: flex; align-items: center; gap: 14px;
  font-size: 13px; animation: pop .16s ease-out;
}
.toast button { color: var(--accent); font-weight: 500; }

/* ---------- responsiv ---------- */
@media (max-width: 1500px) {
  .app { grid-template-columns: var(--rail-w) var(--aside-w) minmax(0, 1fr); }
  .side-right { display: none; }
}
@media (max-width: 1080px) {
  .app { grid-template-columns: var(--rail-w) minmax(0, 1fr); }
  .aside {
    position: fixed; left: var(--rail-w); top: 12px; bottom: 12px;
    width: calc(var(--aside-w) + var(--gap)); z-index: 40;
    background: var(--pop); border-radius: var(--r-lg);
    padding: 12px 16px; transform: translateX(-110%);
    transition: transform .2s ease; box-shadow: var(--shadow-pop);
  }
  body.aside-open .aside { transform: none; }
  .main { grid-column: 2; }
  .row { grid-template-columns: 0 28px 32px 128px 16px minmax(0, 1fr) auto auto; }
  .row-attach { display: none; }
}
@media (max-width: 720px) {
  .app { grid-template-columns: minmax(0, 1fr); padding: 8px; }
  .rail { display: none; }
  .aside { left: 8px; }
  .main { grid-column: 1; }
  .row { grid-template-columns: 0 0 32px minmax(0,1fr) 16px 0 auto auto; row-gap: 2px; }
  .row-check, .row-body { display: none; }
  .row.is-tall { min-height: 60px; }
  .composer { right: 0; left: 0; width: auto; max-width: none; }
}
