@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');
/* ==========================================================================
   ePoct Mail — dizayn sistemi
   --------------------------------------------------------------------------
   Bir dilə bağlı qalırıq: rənglər, aralıqlar, künclər və hərəkət burada
   təyin olunur; heç bir səhifə öz rəngini uydurmur. Palitra Atropatena-nın
   indigo-violet dəstindən gəlir ki, epoct.az-ın yanında yad görünməsin.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&family=Unbounded:wght@500;600&display=swap');

/* ---------------------------------------------------------------- tokenlər */
:root {
  /* --- sətir hündürlükləri və ölçülər --- */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px;

  --r-xs: 6px; --r-sm: 9px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px; --r-full: 999px;

  --sidebar-w: 268px;
  --sidebar-w-collapsed: 72px;
  --header-h: 60px;
  --detail-w: 380px;
  --row-h: 44px;

  /* --- tipografiya --- */
  --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Unbounded', var(--font);
  --font-mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --fs-11: 11px; --fs-12: 12px; --fs-13: 13px; --fs-14: 14px;
  --fs-15: 15px; --fs-16: 16px; --fs-18: 18px; --fs-22: 22px; --fs-28: 28px;

  /* --- hərəkət: premium hiss az animasiyadan gəlir --- */
  --ease: cubic-bezier(.2, .7, .3, 1);
  --t-fast: 120ms var(--ease);
  --t: 160ms var(--ease);
  --t-slow: 240ms var(--ease);

  --z-sticky: 20; --z-drop: 400; --z-modal: 600; --z-toast: 800; --z-tip: 900;

  /* --- tünd tema (əsas) --- */
  --canvas:       #0f0d1f;
  --surface:      #16132a;
  --surface-2:    #1c1836;
  --surface-3:    #241f44;
  --surface-hi:   rgba(255, 255, 255, .045);
  --hover:        rgba(255, 255, 255, .055);
  --active:       rgba(255, 255, 255, .09);
  --sunken:       rgba(0, 0, 0, .24);

  --line:         rgba(255, 255, 255, .075);
  --line-strong:  rgba(255, 255, 255, .14);

  --text:         #f1eefb;
  --text-2:       #a49cc4;
  --text-3:       #6f6890;
  --text-inv:     #11102a;

  --accent:       #b9a6ff;
  /* Qoşma növü nişanları — tətbiqdəki AppColors.fileBadge ilə eyni (hər iki temada). */
  --file-pdf: #e5484d; --file-doc: #3b82f6; --file-xls: #2f9e5b; --file-ppt: #f0803c;
  --file-img: #8a63e6; --file-media: #2fbfa6; --file-other: #7e8fa8;
  --accent-hi:    #cdbfff;
  --accent-ink:   #14102e;
  --accent-soft:  rgba(185, 166, 255, .14);
  --accent-line:  rgba(185, 166, 255, .32);

  --danger:       #ff7b72;
  --danger-soft:  rgba(255, 123, 114, .14);
  --success:      #4ad9a4;
  --success-soft: rgba(74, 217, 164, .14);
  --warning:      #f5c35a;
  --warning-soft: rgba(245, 195, 90, .14);

  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-2: 0 4px 16px rgba(0, 0, 0, .34);
  --shadow-3: 0 18px 48px rgba(0, 0, 0, .5), 0 2px 8px rgba(0, 0, 0, .34);
  --ring: 0 0 0 2px var(--canvas), 0 0 0 4px var(--accent-line);

  --app-bg:
    radial-gradient(1100px 700px at 8% -10%, rgba(120, 88, 220, .16) 0%, transparent 60%),
    radial-gradient(900px 620px at 88% -14%, rgba(70, 92, 200, .11) 0%, transparent 62%),
    var(--canvas);

  color-scheme: dark;
}

[data-theme="light"] {
  --canvas:       #f6f5fb;
  --surface:      #ffffff;
  --surface-2:    #ffffff;
  --surface-3:    #f2f0f9;
  --surface-hi:   rgba(17, 16, 42, .03);
  --hover:        rgba(17, 16, 42, .045);
  --active:       rgba(17, 16, 42, .08);
  --sunken:       rgba(17, 16, 42, .035);

  --line:         #e7e4f1;
  --line-strong:  #d5d1e6;

  --text:         #15132c;
  --text-2:       #63607d;
  --text-3:       #8f8ca6;
  --text-inv:     #ffffff;

  --accent:       #4c34c7;
  --accent-hi:    #3d28ab;
  --accent-ink:   #ffffff;
  --accent-soft:  rgba(76, 52, 199, .08);
  --accent-line:  rgba(76, 52, 199, .3);

  --danger:       #d93a3a;
  --danger-soft:  rgba(217, 58, 58, .09);
  --success:      #0f9d58;
  --success-soft: rgba(15, 157, 88, .1);
  --warning:      #b8801a;
  --warning-soft: rgba(184, 128, 26, .12);

  --shadow-1: 0 1px 2px rgba(17, 16, 42, .06);
  --shadow-2: 0 4px 16px rgba(17, 16, 42, .08);
  --shadow-3: 0 18px 48px rgba(17, 16, 42, .16), 0 2px 8px rgba(17, 16, 42, .06);

  --app-bg:
    radial-gradient(1100px 700px at 8% -10%, rgba(76, 52, 199, .05) 0%, transparent 60%),
    var(--canvas);

  color-scheme: light;
}

/* ------------------------------------------------------------------- baza */
* { box-sizing: border-box; }
*::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-14);
  line-height: 1.5;
  color: var(--text);
  background: var(--app-bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.015em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

/* `hidden` atributunun standart `display:none`-u istənilən display qaydası ilə
   üstələnir (məsələn `.sr-form { display:flex }`) və element gizlənmiş sayıldığı
   halda ekranda boş zolaq kimi qalır. Bunu qəti edirik ki, `el.hidden = true`
   hər yerdə etibarlı işləsin. */
[hidden] { display: none !important; }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-sm); }

::selection { background: var(--accent-soft); color: var(--text); }

/* Qoruyucu: ikonlarımızda width/height atributu yoxdur, yalnız viewBox var.
   Ölçü verməyən bir qabın içində belə SVG konteynerin 100%-ni tutur və
   ekranı doldurur. Bu ilkin ölçü onu həmişə ağıllı hədd içində saxlayır;
   komponent qaydaları (sonra gəlir) lazım olan yerdə üstünü örtür. */
svg { width: 20px; height: 20px; flex: none; }

/* incə sürüşdürmə zolağı — premium hiss detallardadır */
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--line-strong); border-radius: var(--r-full);
  border: 3px solid transparent; background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: var(--text-3); background-clip: content-box; }

.u-mono { font-family: var(--font-mono); font-feature-settings: 'tnum' 1; }
.u-trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.u-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.u-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

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

/* ==========================================================================
   TƏTBİQ QABIĞI — sidebar · header · content · detal paneli
   ========================================================================== */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  grid-template-rows: var(--header-h) minmax(0, 1fr);
  grid-template-areas: "brand header" "side content";
  height: 100vh; height: 100dvh;
  overflow: hidden;
}
.app.has-detail { grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--detail-w); grid-template-areas: "brand header header" "side content detail"; }
.app.is-collapsed { --sidebar-w: var(--sidebar-w-collapsed); }
.app.is-bare { display: block; height: 100vh; height: 100dvh; overflow: auto; }

/* ------------------------------------------------------------- brend küncü */
.brand {
  grid-area: brand;
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 0 var(--sp-4);
  min-width: 0;
}
.brand-mark { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); }
.brand-mark svg { width: 17px; height: 17px; }
.brand-name { font-family: var(--font-display); font-size: var(--fs-16); font-weight: 600; letter-spacing: -.03em; white-space: nowrap; }
.brand-name b { font-weight: 600; color: var(--accent); }
.is-collapsed .brand-name { display: none; }
.is-collapsed .brand { justify-content: center; padding: 0; }

.brand-toggle {
  flex: none; width: 30px; height: 30px; margin-left: auto;
  display: grid; place-items: center; border-radius: var(--r-sm);
  color: var(--text-3); transition: background var(--t-fast), color var(--t-fast);
}
.brand-toggle:hover { background: var(--hover); color: var(--text); }
.brand-toggle svg { width: 18px; height: 18px; }
.is-collapsed .brand-toggle { display: none; }

/* ------------------------------------------------------------------ header */
.header {
  grid-area: header;
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 0 var(--sp-5) 0 var(--sp-2);
  min-width: 0;
}
.header-search { flex: 1; max-width: 680px; min-width: 0; }
.header-tools { display: flex; align-items: center; gap: var(--sp-1); margin-left: auto; }

.icon-btn {
  flex: none; width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: var(--r-sm); color: var(--text-2);
  transition: background var(--t-fast), color var(--t-fast);
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn:disabled { opacity: .4; cursor: not-allowed; }
.icon-btn.is-on { background: var(--accent-soft); color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }

/* --------------------------------------------------------------- sidebar */
.side {
  grid-area: side;
  display: flex; flex-direction: column; min-height: 0;
  padding: 0 var(--sp-3) var(--sp-3);
  gap: var(--sp-3);
}
.side-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: var(--sp-1); padding-bottom: var(--sp-2); }
.side-foot { flex: none; display: flex; flex-direction: column; gap: var(--sp-1); padding-top: var(--sp-3); border-top: 1px solid var(--line); }

.nav-item {
  position: relative; display: flex; align-items: center; gap: var(--sp-3);
  height: 38px; padding: 0 var(--sp-3); border-radius: var(--r-sm);
  color: var(--text-2); font-size: var(--fs-14); font-weight: 500;
  width: 100%; text-align: left; min-width: 0;
  transition: background var(--t-fast), color var(--t-fast);
}
.nav-item svg { flex: none; width: 18px; height: 18px; }
.nav-item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.nav-item.is-active::before {
  content: ''; position: absolute; left: calc(var(--sp-3) * -1); top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 0 3px 3px 0; background: var(--accent);
}
.nav-count {
  flex: none; font-family: var(--font-mono); font-size: var(--fs-11); font-weight: 500;
  color: var(--text-3); letter-spacing: -.02em;
}
.nav-item.is-active .nav-count { color: var(--accent); }
.nav-badge {
  flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-full);
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink);
  font-family: var(--font-mono); font-size: var(--fs-11); font-weight: 500;
}
.nav-sub { padding-left: var(--sp-6); }
.nav-head {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-3) var(--sp-1);
  font-size: var(--fs-11); font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--text-3);
}
.nav-head button { margin-left: auto; color: var(--text-3); display: grid; place-items: center; width: 20px; height: 20px; border-radius: var(--r-xs); }
.nav-head button:hover { background: var(--hover); color: var(--text); }
.nav-head svg { width: 15px; height: 15px; }

/* yığılmış sidebar: yalnız ikonlar */
.is-collapsed .nav-item { justify-content: center; padding: 0; }
.is-collapsed .nav-item span, .is-collapsed .nav-count, .is-collapsed .nav-head { display: none; }
.is-collapsed .nav-badge {
  position: absolute; top: 3px; right: 3px; min-width: 16px; height: 16px;
  padding: 0 4px; font-size: 10px;
}
.is-collapsed .compose-btn span { display: none; }
.is-collapsed .compose-btn { padding: 0; justify-content: center; }
.is-collapsed .side-foot .acct-btn span { display: none; }

.compose-btn {
  flex: none; display: flex; align-items: center; justify-content: center; gap: var(--sp-2);
  height: 44px; border-radius: var(--r-md); margin-bottom: var(--sp-1);
  background: var(--accent); color: var(--accent-ink);
  font-size: var(--fs-14); font-weight: 700; letter-spacing: -.01em;
  box-shadow: var(--shadow-1);
  transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.compose-btn:hover { background: var(--accent-hi); box-shadow: var(--shadow-2); }
.compose-btn:active { transform: translateY(1px); }
.compose-btn svg { width: 18px; height: 18px; }

.acct-btn {
  display: flex; align-items: center; gap: var(--sp-3); width: 100%;
  padding: var(--sp-2); border-radius: var(--r-md); min-width: 0;
  transition: background var(--t-fast);
}
.acct-btn:hover { background: var(--hover); }
.acct-btn span { flex: 1; min-width: 0; text-align: left; }
.acct-btn .acct-n { display: block; font-size: var(--fs-13); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-btn .acct-e { display: block; font-size: var(--fs-12); color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --------------------------------------------------------------- content */
.content {
  grid-area: content;
  min-width: 0; min-height: 0;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg) 0 0 0;
  overflow: hidden;
}
.app.has-detail .content { border-radius: var(--r-lg) 0 0 0; }
.detail {
  grid-area: detail; min-width: 0; min-height: 0; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-left: 0;
  border-radius: 0;
}
.content-scroll { flex: 1; min-height: 0; overflow-y: auto; }

/* səhifə başlığı — ayarlar və kontaktlar kimi sənəd tipli ekranlar üçün */
.page { max-width: 880px; padding: var(--sp-8) var(--sp-8) var(--sp-12); }
.page-wide { max-width: 1180px; }
.page-eyebrow { font-size: var(--fs-12); font-weight: 600; color: var(--text-3); margin-bottom: var(--sp-2); }
.page-title { font-family: var(--font-display); font-size: var(--fs-28); font-weight: 600; letter-spacing: -.035em; line-height: 1.15; }
.page-lead { margin-top: var(--sp-3); color: var(--text-2); font-size: var(--fs-14); max-width: 62ch; }
.page-body { margin-top: var(--sp-8); display: flex; flex-direction: column; gap: var(--sp-8); }

/* mobil naviqasiya — yalnız kiçik ekranda */
.mobile-bar { display: none; }
.scrim { display: none; }

/* ==========================================================================
   KOMPONENTLƏR — eyni element hər səhifədə eyni görünür
   ========================================================================== */

/* ------------------------------------------------------------------ düymə */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  height: 36px; padding: 0 var(--sp-4); border-radius: var(--r-sm);
  font-size: var(--fs-13); font-weight: 600; letter-spacing: -.01em;
  white-space: nowrap; position: relative;
  border: 1px solid transparent;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), opacity var(--t-fast);
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:disabled, .btn.is-disabled { opacity: .45; cursor: not-allowed; }

.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hi); }
.btn-secondary { background: var(--surface-hi); color: var(--text); border-color: var(--line); }
.btn-secondary:hover:not(:disabled) { background: var(--hover); border-color: var(--line-strong); }
.btn-ghost { color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--hover); color: var(--text); }
.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.btn-danger:hover:not(:disabled) { background: var(--danger); color: #fff; }
.btn-lg { height: 44px; padding: 0 var(--sp-5); font-size: var(--fs-14); border-radius: var(--r-md); }
.btn-sm { height: 30px; padding: 0 var(--sp-3); font-size: var(--fs-12); }
.btn-block { width: 100%; }

/* yüklənmə: mətn yerində qalır, ölçü sıçramır */
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ''; position: absolute; width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  animation: spin .6s linear infinite;
  color: var(--accent-ink);
}
.btn-secondary.is-loading::after, .btn-ghost.is-loading::after { color: var(--text-2); }
@keyframes spin { to { transform: rotate(360deg); } }

/* uğur vəziyyəti — göndərildikdən sonra qısa təsdiq */
.btn.is-done { background: var(--success); color: #06241a; }

/* ------------------------------------------------------------------ sahələr */
.field { display: flex; flex-direction: column; gap: var(--sp-2); }
.field-label { font-size: var(--fs-12); font-weight: 600; color: var(--text-2); }
.field-hint { font-size: var(--fs-12); color: var(--text-3); }
.field-error { font-size: var(--fs-12); color: var(--danger); display: flex; align-items: center; gap: var(--sp-1); }
.field-error svg { width: 13px; height: 13px; }

.input, .textarea, .select {
  width: 100%; min-width: 0;
  height: 40px; padding: 0 var(--sp-3);
  background: var(--sunken); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  font-size: var(--fs-14);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.textarea { height: auto; min-height: 112px; padding: var(--sp-3); resize: vertical; line-height: 1.6; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:hover, .textarea:hover, .select:hover { border-color: var(--line-strong); }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input:disabled, .textarea:disabled, .select:disabled { opacity: .5; cursor: not-allowed; }
.input.is-invalid, .textarea.is-invalid { border-color: var(--danger); }

.select {
  appearance: none; padding-right: var(--sp-8); cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238f8ca6' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
.select option { background: var(--surface-3); color: var(--text); }

.input-search { position: relative; }
.input-search .input { height: 40px; padding-left: 40px; border-radius: var(--r-md); background: var(--sunken); }
.input-search > svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-3); pointer-events: none; }
.input-search .input-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; display: grid; place-items: center; border-radius: var(--r-full); color: var(--text-3); }
.input-search .input-clear:hover { background: var(--hover); color: var(--text); }
.input-search .input-clear svg { width: 14px; height: 14px; }

/* --------------------------------------------------------- seçim elementləri */
.check { display: flex; align-items: flex-start; gap: var(--sp-3); cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check-box {
  flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 5px;
  border: 1.5px solid var(--line-strong); background: transparent;
  display: grid; place-items: center;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.check-box svg { width: 12px; height: 12px; color: var(--accent-ink); opacity: 0; transform: scale(.7); transition: opacity var(--t-fast), transform var(--t-fast); }
.check input:checked + .check-box { background: var(--accent); border-color: var(--accent); }
.check input:checked + .check-box svg { opacity: 1; transform: scale(1); }
.check input:indeterminate + .check-box { background: var(--accent); border-color: var(--accent); }
.check input:indeterminate + .check-box::after { content: ''; width: 9px; height: 2px; border-radius: 1px; background: var(--accent-ink); }
.check input:indeterminate + .check-box svg { display: none; }
.check input:focus-visible + .check-box { box-shadow: var(--ring); }
.check input:disabled + .check-box { opacity: .4; }
.check-text { font-size: var(--fs-14); }
.check-text small { display: block; color: var(--text-3); font-size: var(--fs-12); margin-top: 2px; }

.toggle { display: flex; align-items: center; gap: var(--sp-3); cursor: pointer; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-track {
  flex: none; width: 38px; height: 22px; border-radius: var(--r-full);
  background: var(--line-strong); position: relative;
  transition: background var(--t);
}
.toggle-track::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; box-shadow: var(--shadow-1);
  transition: transform var(--t);
}
.toggle input:checked + .toggle-track { background: var(--accent); }
.toggle input:checked + .toggle-track::after { transform: translateX(16px); }
.toggle input:focus-visible + .toggle-track { box-shadow: var(--ring); }
.toggle input:disabled + .toggle-track { opacity: .4; }

/* ------------------------------------------------------------------ avatar */
.avatar {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: var(--fs-13); font-weight: 700; letter-spacing: -.02em;
  color: #fff; text-transform: uppercase; user-select: none;
}
.avatar-sm { width: 28px; height: 28px; font-size: var(--fs-11); }
.avatar.has-photo { background: var(--surface-3); overflow: hidden; }
.avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-lg { width: 48px; height: 48px; font-size: var(--fs-16); }
.avatar-xl { width: 64px; height: 64px; font-size: var(--fs-22); }

/* -------------------------------------------------------------- nişan/çip */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 20px; padding: 0 var(--sp-2); border-radius: var(--r-xs);
  font-size: var(--fs-11); font-weight: 700; letter-spacing: .01em;
  background: var(--surface-hi); color: var(--text-2);
}
.badge svg { width: 12px; height: 12px; }
.badge-accent  { background: var(--accent-soft);  color: var(--accent); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger  { background: var(--danger-soft);  color: var(--danger); }

.chip {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  height: 30px; padding: 0 var(--sp-3); border-radius: var(--r-full);
  background: var(--surface-hi); border: 1px solid var(--line);
  font-size: var(--fs-12); font-weight: 600; color: var(--text-2);
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.chip:hover { background: var(--hover); color: var(--text); }
.chip.is-on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.chip svg { width: 14px; height: 14px; }
.chip-x { display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; margin-right: -4px; color: inherit; opacity: .6; }
.chip-x:hover { opacity: 1; background: var(--active); }
.chip-x svg { width: 11px; height: 11px; }

/* alıcı çipi — compose üçün */
.rcpt {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  height: 26px; padding: 0 var(--sp-1) 0 var(--sp-1); border-radius: var(--r-full);
  background: var(--surface-hi); border: 1px solid var(--line);
  font-size: var(--fs-13); max-width: 260px;
}
.rcpt .avatar { width: 20px; height: 20px; font-size: 9px; }
.rcpt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rcpt.is-bad { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }

/* -------------------------------------------------------------------- kart */
.card {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: var(--sp-5);
}
.card-row { display: flex; align-items: center; gap: var(--sp-4); }
.card-title { font-size: var(--fs-15); font-weight: 700; letter-spacing: -.015em; }
.card-sub { font-size: var(--fs-13); color: var(--text-2); margin-top: var(--sp-1); }

.sec { display: flex; flex-direction: column; gap: var(--sp-4); }
.sec-head { display: flex; align-items: baseline; gap: var(--sp-3); }
.sec-title { font-size: var(--fs-18); font-weight: 700; letter-spacing: -.02em; }
.sec-desc { font-size: var(--fs-13); color: var(--text-2); max-width: 64ch; }

/* -------------------------------------------------------------------- list */
.rows { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.rows > * + * { border-top: 1px solid var(--line); }
.row {
  display: flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-3) var(--sp-4); background: var(--surface-2);
  min-width: 0;
}
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: var(--fs-14); font-weight: 600; }
.row-sub { font-size: var(--fs-12); color: var(--text-3); margin-top: 2px; }
.row-actions { display: flex; align-items: center; gap: var(--sp-1); flex: none; }

/* ------------------------------------------------------- üst qatlar: menyu */
.menu {
  position: fixed; z-index: var(--z-drop); min-width: 200px; max-width: 320px;
  padding: var(--sp-1); border-radius: var(--r-md);
  background: var(--surface-3); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-3);
  animation: pop var(--t-fast) both;
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.menu-item {
  display: flex; align-items: center; gap: var(--sp-3); width: 100%;
  height: 34px; padding: 0 var(--sp-3); border-radius: var(--r-xs);
  font-size: var(--fs-13); color: var(--text); text-align: left;
  transition: background var(--t-fast);
}
.menu-item:hover { background: var(--hover); }
.menu-item svg { width: 16px; height: 16px; flex: none; color: var(--text-2); }
.menu-item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-item.is-danger { color: var(--danger); }
.menu-item.is-danger svg { color: var(--danger); }
.menu-item kbd { font-family: var(--font-mono); font-size: var(--fs-11); color: var(--text-3); }
.menu-sep { height: 1px; margin: var(--sp-1) 0; background: var(--line); }
.menu-head { padding: var(--sp-2) var(--sp-3) var(--sp-1); font-size: var(--fs-11); font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); }

/* ---------------------------------------------------------------- tooltip */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip); position: absolute; z-index: var(--z-tip);
  left: 50%; top: calc(100% + 7px); transform: translateX(-50%);
  padding: 5px var(--sp-2); border-radius: var(--r-xs);
  background: var(--surface-3); border: 1px solid var(--line-strong);
  color: var(--text); font-size: var(--fs-11); font-weight: 600; white-space: nowrap;
  box-shadow: var(--shadow-2);
  opacity: 0; pointer-events: none; transition: opacity var(--t-fast);
}
[data-tip]:hover::after { opacity: 1; transition-delay: .35s; }

/* ------------------------------------------------------------------ modal */
.scrim.is-open {
  display: block; position: fixed; inset: 0; z-index: var(--z-modal);
  background: rgba(8, 6, 18, .55); backdrop-filter: blur(3px);
  animation: fade var(--t) both;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  position: fixed; z-index: calc(var(--z-modal) + 1);
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 64px);
  display: flex; flex-direction: column;
  background: var(--surface-3); border: 1px solid var(--line-strong);
  border-radius: var(--r-lg); box-shadow: var(--shadow-3);
  animation: rise var(--t) both;
}
@keyframes rise { from { opacity: 0; transform: translate(-50%, calc(-50% + 10px)); } }
.modal-head { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-5) var(--sp-5) var(--sp-3); }
.modal-title { flex: 1; font-size: var(--fs-16); font-weight: 700; letter-spacing: -.02em; }
.modal-body { padding: 0 var(--sp-5) var(--sp-2); overflow-y: auto; color: var(--text-2); font-size: var(--fs-14); }
.modal-foot { display: flex; gap: var(--sp-2); justify-content: flex-end; padding: var(--sp-4) var(--sp-5) var(--sp-5); }

/* Hesabın silinməsi dialoqu (core.js → deleteAccount) */
.del-acct { display: flex; flex-direction: column; gap: 4px; margin-top: var(--sp-3); }
.del-acct p { margin: 0 0 var(--sp-2); line-height: 1.5; }
.del-acct-note { padding: var(--sp-3); border-radius: var(--r-md); background: var(--warning-soft); color: var(--text); }
.del-acct-note a { color: var(--accent); }

/* ------------------------------------------------------------------- toast */
.toasts {
  position: fixed; z-index: var(--z-toast); left: 50%; bottom: var(--sp-6);
  transform: translateX(-50%);
  display: flex; flex-direction: column-reverse; gap: var(--sp-2);
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: var(--sp-3);
  min-height: 42px; padding: var(--sp-2) var(--sp-3) var(--sp-2) var(--sp-4);
  border-radius: var(--r-md); pointer-events: auto;
  background: var(--surface-3); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-3); color: var(--text); font-size: var(--fs-13); font-weight: 500;
  animation: toast-in var(--t-slow) both;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.97); } }
.toast.is-out { animation: toast-out var(--t) both; }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px) scale(.98); } }
.toast > svg { width: 17px; height: 17px; flex: none; }
.toast.is-success > svg { color: var(--success); }
.toast.is-error > svg { color: var(--danger); }
.toast span { flex: 1; }
.toast button { padding: 0 var(--sp-2); height: 28px; border-radius: var(--r-xs); font-size: var(--fs-12); font-weight: 700; color: var(--accent); }
.toast button:hover { background: var(--hover); }

/* -------------------------------------------------------------------- tabs */
.tabs { display: flex; gap: var(--sp-1); padding: var(--sp-1); background: var(--sunken); border-radius: var(--r-sm); }
.tab {
  flex: 1; height: 32px; padding: 0 var(--sp-3); border-radius: var(--r-xs);
  font-size: var(--fs-13); font-weight: 600; color: var(--text-2);
  transition: background var(--t-fast), color var(--t-fast);
}
.tab:hover { color: var(--text); }
.tab.is-on { background: var(--surface-3); color: var(--text); box-shadow: var(--shadow-1); }

/* ==========================================================================
   VƏZİYYƏTLƏR — boş · yüklənir · xəta
   ========================================================================== */
.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--sp-3); padding: var(--sp-12) var(--sp-6); text-align: center;
  min-height: 280px;
}
.empty-art {
  width: 56px; height: 56px; border-radius: var(--r-lg); display: grid; place-items: center;
  background: var(--surface-hi); color: var(--text-3); margin-bottom: var(--sp-1);
}
.empty-art svg { width: 26px; height: 26px; }
.empty-title { font-size: var(--fs-16); font-weight: 700; letter-spacing: -.015em; }
.empty-text { font-size: var(--fs-13); color: var(--text-3); max-width: 42ch; }
.empty .btn { margin-top: var(--sp-2); }

.error-state .empty-art { background: var(--danger-soft); color: var(--danger); }

/* skelet — ölçü siçramasın deyə real sətirlə eyni hündürlükdə */
.sk { background: var(--surface-hi); border-radius: var(--r-xs); position: relative; overflow: hidden; }
.sk::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, var(--hover), transparent);
  animation: sheen 1.25s infinite;
}
@keyframes sheen { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.sk-line { height: 11px; }
.sk-avatar { width: 36px; height: 36px; border-radius: 50%; flex: none; }
.sk-row { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-3) var(--sp-5); border-bottom: 1px solid var(--line); }
.sk-row .sk-body { flex: 1; display: flex; flex-direction: column; gap: 7px; min-width: 0; }

/* ==========================================================================
   POÇT SƏTHLƏRİ
   ========================================================================== */

/* ------------------------------------------------------------ alət zolağı */
.toolbar {
  flex: none; display: flex; align-items: center; gap: var(--sp-1);
  height: 52px; padding: 0 var(--sp-3) 0 var(--sp-4);
  border-bottom: 1px solid var(--line);
  position: relative;
}
.toolbar-sep { width: 1px; height: 20px; background: var(--line); margin: 0 var(--sp-2); flex: none; }
.toolbar-title { font-size: var(--fs-15); font-weight: 700; letter-spacing: -.02em; }
.toolbar-meta { font-family: var(--font-mono); font-size: var(--fs-12); color: var(--text-3); }
.toolbar-right { margin-left: auto; display: flex; align-items: center; gap: var(--sp-1); }

/* toplu seçim zolağı — seçim olanda əvəzinə açılır */
.bulkbar {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center; gap: var(--sp-2);
  padding: 0 var(--sp-3) 0 var(--sp-4);
  background: var(--accent-soft);
  border-bottom: 1px solid var(--accent-line);
  animation: fade var(--t-fast) both;
}
.bulkbar-count { font-size: var(--fs-13); font-weight: 700; color: var(--accent); margin-right: var(--sp-2); }
.bulkbar .icon-btn { color: var(--text); }
.bulkbar .icon-btn:hover { background: var(--active); }

/* ------------------------------------------------------------ məktub siyahısı */
.list { flex: 1; min-height: 0; overflow-y: auto; }
.list-day {
  position: sticky; top: 0; z-index: var(--z-sticky);
  padding: var(--sp-4) var(--sp-5) var(--sp-2);
  font-size: var(--fs-11); font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--text-3);
  background: linear-gradient(var(--surface) 62%, transparent);
  backdrop-filter: blur(6px);
}

.msg {
  position: relative; display: flex; align-items: center; gap: var(--sp-3);
  padding: 0 var(--sp-4) 0 var(--sp-3);
  min-height: 56px; cursor: pointer;
  border-bottom: 1px solid var(--line);
  transition: background var(--t-fast);
}
.msg:hover { background: var(--hover); }
.msg.is-selected { background: var(--accent-soft); }
.msg.is-open { background: var(--active); }
/* oxunmamış: sol kənarda incə vurğu + daha güclü mətn */
.msg.is-unread::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent);
}
.msg.is-unread .msg-from, .msg.is-unread .msg-subject { color: var(--text); font-weight: 700; }
.msg-from { font-weight: 500; }
.msg-subject { font-weight: 500; }

.msg-check { flex: none; width: 28px; display: grid; place-items: center; }
.msg-star { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: var(--r-xs); color: var(--text-3); transition: color var(--t-fast), background var(--t-fast); }
.msg-star:hover { background: var(--active); color: var(--warning); }
.msg-star.is-on { color: var(--warning); }
.msg-star svg { width: 16px; height: 16px; }

.msg-who { flex: none; width: 200px; display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
.msg-from { font-size: var(--fs-14); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }

.msg-body { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: var(--sp-2); }
.msg-subject { font-size: var(--fs-14); color: var(--text-2); flex: none; max-width: 52%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-snippet { font-size: var(--fs-13); color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

.msg-end { flex: none; display: flex; align-items: center; gap: var(--sp-2); }
.msg-thread {
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: var(--r-xs);
  display: grid; place-items: center; background: var(--surface-hi);
  font-family: var(--font-mono); font-size: 10px; font-weight: 500; color: var(--text-2);
}
.msg-clip { color: var(--text-3); display: grid; place-items: center; }
.msg-clip svg { width: 15px; height: 15px; }
.msg-date { font-family: var(--font-mono); font-size: var(--fs-12); color: var(--text-3); width: 58px; text-align: right; }

/* hover-də əməliyyatlar — tarixin yerini tutur, sıçrama olmur */
.msg-hover { display: none; align-items: center; gap: 2px; }
.msg:hover .msg-hover { display: flex; }
.msg:hover .msg-date, .msg:hover .msg-thread, .msg:hover .msg-clip { display: none; }
.msg-hover .icon-btn { width: 30px; height: 30px; }
.msg-hover .icon-btn svg { width: 16px; height: 16px; }

/* siyahının sonu — «daha çox yüklə» */
.list-more {
  display: flex; align-items: center; justify-content: center; gap: var(--sp-3);
  padding: var(--sp-6) var(--sp-4) var(--sp-8);
}
.list-more-c { font-size: var(--fs-12); color: var(--text-3); }

/* ------------------------------------------------------------------ oxucu */
.reader { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.reader-scroll { flex: 1; min-height: 0; overflow-y: auto; }
.reader-inner { max-width: 820px; padding: var(--sp-6) var(--sp-8) var(--sp-12); }
.reader-subject { font-size: var(--fs-22); font-weight: 700; letter-spacing: -.028em; line-height: 1.3; }

.reader-head { display: flex; align-items: flex-start; gap: var(--sp-4); margin-top: var(--sp-5); }
.reader-who { flex: 1; min-width: 0; }
.reader-name { font-size: var(--fs-14); font-weight: 700; }
.reader-mail { font-size: var(--fs-13); color: var(--text-3); }
.reader-to { font-size: var(--fs-12); color: var(--text-3); margin-top: var(--sp-1); }
.reader-to button { color: var(--text-3); text-decoration: underline; text-underline-offset: 2px; }
.reader-when { flex: none; font-family: var(--font-mono); font-size: var(--fs-12); color: var(--text-3); }

.reader-body { margin-top: var(--sp-6); font-size: var(--fs-14); line-height: 1.68; color: var(--text); overflow-wrap: break-word; }
/* Gövdənin İÇİ (keçid, şəkil, sitat rəngləri) kölgə kökündədir və bu faylın
   qaydaları ora keçmir — onlar pages/mail.js-dəki BODY_CSS-dədir. Burada
   yalnız qabın özü qalır. */
/* öz rəngini elan edən məktublar (Google, banklar…) işıqlı zəmində düzgün görünür */
.reader-body.needs-light { background: #fff; color: #202124; border-radius: var(--r-md); padding: var(--sp-5); }
/* Məktubun öz <body>-si var (rəng, cədvəl): kartı o özü doldurur, boşluğu da
   özü verir. Enli məktub kartdan çıxmır, kart daxilində sürüşür. `contain`
   məktubun öz cədvəlindəki position:absolute bloklarını kartın içində saxlayır —
   onlar oxucunun alət zolağının üstünə saxta düymə çəkə bilməz. */
.reader-body.is-framed { padding: 0; overflow-x: auto; contain: paint; }

.reader-acts { display: flex; gap: var(--sp-2); margin-top: var(--sp-8); padding-top: var(--sp-6); border-top: 1px solid var(--line); }

/* qoşmalar — kart şəklində */
.atts { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-6); }
.att {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3); min-width: 210px; max-width: 280px;
  background: var(--surface-hi); border: 1px solid var(--line); border-radius: var(--r-sm);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.att:hover { border-color: var(--line-strong); background: var(--hover); }
.att-icon { flex: none; width: 32px; height: 32px; border-radius: var(--r-xs); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.att-icon svg { width: 16px; height: 16px; }
.att-main { flex: 1; min-width: 0; }
.att-name { font-size: var(--fs-13); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-size { font-family: var(--font-mono); font-size: var(--fs-11); color: var(--text-3); }
.att-bar { height: 3px; border-radius: 2px; background: var(--line); margin-top: 5px; overflow: hidden; }
.att-bar i { display: block; height: 100%; background: var(--accent); transition: width var(--t); }

/* zəncir */
.thread { display: flex; flex-direction: column; gap: var(--sp-2); margin-top: var(--sp-6); }
.thread-item { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--surface-2); }
.thread-head { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); cursor: pointer; }
.thread-head:hover { background: var(--hover); }
.thread-name { font-size: var(--fs-13); font-weight: 600; flex: none; }
.thread-snip { flex: 1; min-width: 0; font-size: var(--fs-13); color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-when { font-family: var(--font-mono); font-size: var(--fs-11); color: var(--text-3); flex: none; }
.thread-body { padding: 0 var(--sp-4) var(--sp-4); font-size: var(--fs-14); line-height: 1.65; }

/* ----------------------------------------------------------------- compose */
.cmp {
  position: fixed; z-index: var(--z-modal); right: var(--sp-6); bottom: 0;
  width: min(680px, calc(100vw - 48px)); height: min(640px, calc(100vh - 40px));
  display: flex; flex-direction: column;
  background: var(--surface-3); border: 1px solid var(--line-strong);
  border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: var(--shadow-3);
  animation: rise-up var(--t) both;
}
@keyframes rise-up { from { opacity: 0; transform: translateY(16px); } }
.cmp.is-min { height: 46px; }
.cmp.is-min .cmp-rest { display: none; }
.cmp.is-max { right: 0; left: 0; top: 0; width: 100%; height: 100%; border-radius: 0; margin: auto; max-width: 980px; }

.cmp-bar {
  flex: none; display: flex; align-items: center; gap: var(--sp-2);
  height: 46px; padding: 0 var(--sp-2) 0 var(--sp-4);
  background: var(--surface-2); border-radius: var(--r-lg) var(--r-lg) 0 0;
  cursor: move; user-select: none;
}
.cmp.is-min .cmp-bar, .cmp.is-max .cmp-bar { border-radius: 0; }
.cmp-title { flex: 1; font-size: var(--fs-13); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-rest { flex: 1; display: flex; flex-direction: column; min-height: 0; }

.cmp-fields { flex: none; padding: 0 var(--sp-4); }
.cmp-field { display: flex; align-items: flex-start; gap: var(--sp-3); min-height: 44px; padding: var(--sp-2) 0; border-bottom: 1px solid var(--line); }
.cmp-label { flex: none; width: 52px; padding-top: 5px; font-size: var(--fs-12); font-weight: 600; color: var(--text-3); }
.cmp-slot { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.cmp-slot input { flex: 1; min-width: 120px; height: 26px; border: 0; background: none; font-size: var(--fs-14); outline: none; }
.cmp-slot input::placeholder { color: var(--text-3); }
.cmp-cc { display: flex; gap: var(--sp-2); flex: none; padding-top: 3px; }
.cmp-cc button { font-size: var(--fs-12); font-weight: 700; color: var(--text-3); padding: 0 var(--sp-1); }
.cmp-cc button:hover { color: var(--accent); }
.cmp-cc button.is-on { color: var(--accent); }

.cmp-tools { flex: none; display: flex; align-items: center; gap: 2px; padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cmp-tools .icon-btn { width: 30px; height: 30px; }
.cmp-tools .icon-btn svg { width: 15px; height: 15px; }

.cmp-editor { flex: 1; min-height: 0; overflow-y: auto; padding: var(--sp-4); font-size: var(--fs-14); line-height: 1.65; outline: none; }
.cmp-editor:empty::before { content: attr(data-ph); color: var(--text-3); }
.cmp-editor blockquote { margin: var(--sp-3) 0; padding-left: var(--sp-3); border-left: 2px solid var(--line-strong); color: var(--text-2); }

.cmp-atts { flex: none; display: flex; flex-wrap: wrap; gap: var(--sp-2); padding: 0 var(--sp-4) var(--sp-3); max-height: 148px; overflow-y: auto; }
.cmp-foot { flex: none; display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--line); }
.cmp-status { flex: 1; font-size: var(--fs-12); color: var(--text-3); text-align: right; }

/* fayl sürüklənəndə */
.cmp.is-drop::after {
  content: ''; position: absolute; inset: var(--sp-2);
  border: 2px dashed var(--accent); border-radius: var(--r-md);
  background: var(--accent-soft); pointer-events: none;
}

/* ==========================================================================
   AYARLAR — sol kateqoriya naviqasiyası + sağda seçilmiş bölmə
   ========================================================================== */
.set { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 0; flex: 1; }
.set-nav { border-right: 1px solid var(--line); padding: var(--sp-4) var(--sp-3); overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.set-pane { min-width: 0; overflow-y: auto; }

/* ==========================================================================
   GİRİŞ EKRANI
   ========================================================================== */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-art {
  position: relative; overflow: hidden; padding: var(--sp-12);
  display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(760px 520px at 18% 8%, rgba(120, 88, 220, .30) 0%, transparent 62%),
    radial-gradient(620px 460px at 76% 86%, rgba(64, 86, 200, .22) 0%, transparent 60%),
    var(--canvas);
  border-right: 1px solid var(--line);
}
.auth-art::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.07) 1px, transparent 0);
  background-size: 28px 28px; mask-image: radial-gradient(70% 60% at 30% 30%, #000 0%, transparent 75%);
}
.auth-claim { font-family: var(--font-display); font-size: clamp(26px, 3vw, 38px); font-weight: 600; letter-spacing: -.04em; line-height: 1.12; max-width: 13ch; }
.auth-sub { margin-top: var(--sp-5); color: var(--text-2); font-size: var(--fs-15); max-width: 44ch; line-height: 1.6; }
.auth-points { display: flex; flex-direction: column; gap: var(--sp-3); margin-top: var(--sp-8); position: relative; z-index: 1; }
.auth-point { display: flex; align-items: flex-start; gap: var(--sp-3); font-size: var(--fs-14); color: var(--text-2); }
.auth-point svg { flex: none; width: 17px; height: 17px; color: var(--accent); margin-top: 2px; }
.auth-foot { font-size: var(--fs-12); color: var(--text-3); position: relative; z-index: 1; }

.auth-side { display: flex; align-items: center; justify-content: center; padding: var(--sp-8); }
.auth-form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: var(--sp-5); }
.auth-title { font-size: var(--fs-22); font-weight: 700; letter-spacing: -.03em; }
.auth-note { font-size: var(--fs-12); color: var(--text-3); line-height: 1.6; }
.auth-disclose { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-13); font-weight: 600; color: var(--text-2); }
.auth-disclose svg { width: 15px; height: 15px; transition: transform var(--t-fast); }
.auth-disclose[aria-expanded="true"] svg { transform: rotate(180deg); }

/* ==========================================================================
   2FA — mərhələli quraşdırma
   ========================================================================== */
.steps { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-6); }
.step { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-12); font-weight: 600; color: var(--text-3); }
.step-dot {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--line-strong); font-family: var(--font-mono); font-size: 11px;
  transition: background var(--t), border-color var(--t), color var(--t);
}
.step.is-on .step-dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.step.is-on { color: var(--text); }
.step.is-done .step-dot { background: var(--success); border-color: var(--success); color: #06241a; }
.step-line { flex: 1; height: 1px; background: var(--line); min-width: 12px; }

.qr { padding: var(--sp-4); background: #fff; border-radius: var(--r-md); width: max-content; }
.qr svg { display: block; width: 168px; height: 168px; }

.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
.code {
  font-family: var(--font-mono); font-size: var(--fs-13); letter-spacing: .06em;
  padding: var(--sp-2) var(--sp-3); background: var(--sunken);
  border: 1px solid var(--line); border-radius: var(--r-xs); text-align: center;
}

.otp { display: flex; gap: var(--sp-2); }
.otp input {
  width: 46px; height: 54px; text-align: center;
  font-family: var(--font-mono); font-size: var(--fs-22); font-weight: 500;
  background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--text);
}
.otp input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ==========================================================================
   RESPONSIVE — mobil ayrıca UX-dir, kiçildilmiş desktop deyil
   ========================================================================== */
@media (max-width: 1280px) {
  .app.has-detail { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); grid-template-areas: "brand header" "side content"; }
  .app.has-detail .detail { display: none; }
}

@media (max-width: 1080px) {
  .app { --sidebar-w: var(--sidebar-w-collapsed); }
  .app .nav-item span, .app .nav-count, .app .nav-head, .app .brand-name, .app .compose-btn span, .app .acct-btn span { display: none; }
  .app .nav-item, .app .compose-btn { justify-content: center; padding: 0; }
  .app .brand { justify-content: center; padding: 0; }
  .app .brand-toggle { display: none; }
  .msg-who { width: 168px; }
  .set { grid-template-columns: 200px minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-art { display: none; }
  .auth-side { padding: var(--sp-6) var(--sp-5); align-items: flex-start; padding-top: var(--sp-12); }
  .set { grid-template-columns: minmax(0, 1fr); }
  .set-nav { display: none; }
  .set.is-nav .set-nav { display: flex; }
  .set.is-nav .set-pane { display: none; }
}

@media (max-width: 760px) {
  /* qabıq: sidebar çekmecəyə çevrilir, altda naviqasiya zolağı açılır */
  .app, .app.is-collapsed, .app.has-detail {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: var(--header-h) minmax(0, 1fr) 58px;
    grid-template-areas: "header" "content" "mobile";
  }
  .brand { display: none; }
  .header { padding: 0 var(--sp-3); gap: var(--sp-2); }
  .header .brand-mob { display: flex; }

  .side {
    position: fixed; z-index: calc(var(--z-modal) + 2); left: 0; top: 0; bottom: 0;
    width: 282px; padding: var(--sp-4) var(--sp-3);
    background: var(--surface); border-right: 1px solid var(--line);
    transform: translateX(-100%); transition: transform var(--t-slow);
    display: flex;
  }
  body.side-open .side { transform: none; }
  body.side-open .scrim { display: block; position: fixed; inset: 0; z-index: calc(var(--z-modal) + 1); background: rgba(8, 6, 18, .5); }
  /* çekmecədə tam adlar geri qayıdır */
  .side .nav-item { justify-content: flex-start; padding: 0 var(--sp-3); height: 44px; }
  .side .nav-item span, .side .nav-count, .side .nav-head, .side .compose-btn span, .side .acct-btn span { display: revert; }
  .side .compose-btn { justify-content: center; }

  .content { border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0; }

  .mobile-bar {
    grid-area: mobile; display: flex; align-items: stretch;
    background: var(--surface); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mobile-tab {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    font-size: 10px; font-weight: 600; color: var(--text-3);
  }
  .mobile-tab svg { width: 21px; height: 21px; }
  .mobile-tab.is-on { color: var(--accent); }

  /* siyahı: iki sətirli, barmağa uyğun */
  .msg { min-height: 74px; padding: var(--sp-3) var(--sp-4); align-items: flex-start; gap: var(--sp-3); }
  .msg-check { display: none; }
  .msg.is-picking .msg-check { display: grid; }
  .msg-who { width: auto; flex: none; }
  .msg-who .msg-from { display: none; }
  .msg-body { flex-direction: column; align-items: stretch; gap: 3px; }
  .msg-body .msg-from { display: block; font-size: var(--fs-14); }
  .msg-subject { max-width: none; }
  .msg-snippet { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .msg-end { flex-direction: column; align-items: flex-end; gap: var(--sp-1); align-self: flex-start; }
  .msg-hover { display: none !important; }
  .msg:hover .msg-date, .msg:hover .msg-thread, .msg:hover .msg-clip { display: revert; }

  /* sürüşdürmə əməliyyatları */
  .msg-swipe { position: absolute; inset: 0; display: flex; pointer-events: none; }
  .msg-swipe i { flex: 1; display: grid; place-items: center; color: #fff; }
  .msg-swipe i:first-child { background: var(--success); justify-content: flex-start; padding-left: var(--sp-5); }
  .msg-swipe i:last-child { background: var(--danger); justify-content: flex-end; padding-right: var(--sp-5); }
  .msg-front { position: relative; z-index: 1; display: flex; align-items: flex-start; gap: var(--sp-3); width: 100%; background: var(--surface); transition: transform var(--t); }

  /* oxucu və compose tam ekran */
  .reader-inner { padding: var(--sp-5) var(--sp-4) var(--sp-12); }
  .reader-subject { font-size: var(--fs-18); }
  /* Cavab zolağı mobildə barmağın altında yapışqan qalır. Yapışqan element
     təbii yerinə çatanadək altındakı məzmunun üstünü örtür — ona görə oxucuya
     zolağın hündürlüyü qədər əlavə boşluq verilir ki, sonuncu qoşma və ya
     zəncir sətri həmişəlik gizli qalmasın. */
  .reader-acts {
    position: sticky; bottom: 0; z-index: 2;
    background: var(--surface);
    margin: var(--sp-6) calc(var(--sp-4) * -1) 0;
    padding: var(--sp-2) var(--sp-4);
    border-top: 1px solid var(--line);
    flex-wrap: wrap; row-gap: var(--sp-2);
  }
  .reader-acts .btn { flex: 1 1 auto; min-width: 116px; height: 40px; }
  .reader-acts-end { display: flex; gap: 2px; width: 100%; justify-content: space-around; }
  .reader-acts-end .icon-btn { width: 44px; height: 40px; }
  .reader-inner { padding-bottom: calc(var(--sp-12) + 132px); }

  .cmp, .cmp.is-max { inset: 0; width: 100%; height: 100%; max-width: none; border-radius: 0; border: 0; }
  .cmp-bar { cursor: default; }
  .cmp .js-cmp-min, .cmp .js-cmp-max { display: none; }

  .page { padding: var(--sp-5) var(--sp-4) var(--sp-12); }
  .page-title { font-size: var(--fs-22); }
  .toolbar { height: 48px; padding: 0 var(--sp-2); }
  .toasts { left: var(--sp-3); right: var(--sp-3); bottom: calc(58px + var(--sp-3)); transform: none; }
  .toast { width: 100%; }
  .modal { width: calc(100vw - 24px); }
  .codes { grid-template-columns: minmax(0, 1fr); }
  .otp input { width: 40px; height: 48px; font-size: var(--fs-18); }
}

/* barmaqla idarə: hover yoxdursa əməliyyatlar həmişə görünsün */
@media (hover: none) {
  .msg-hover { display: none !important; }
}

/* ==========================================================================
   HESAB PƏNCƏRƏSİ və qalan qabıq detalları
   Bunlar core.js-in çəkdiyi elementlərdir — səhifə modulu olmadığı üçün
   CSS-ləri yalnız burada ola bilər.
   ========================================================================== */
.acct {
  position: fixed; z-index: var(--z-drop);
  width: 288px; padding: var(--sp-2);
  background: var(--surface-3); border: 1px solid var(--line-strong);
  border-radius: var(--r-lg); box-shadow: var(--shadow-3);
  animation: pop var(--t-fast) both;
}
.acct-x {
  position: absolute; top: var(--sp-2); right: var(--sp-2);
  width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: var(--r-xs); color: var(--text-3);
  transition: background var(--t-fast), color var(--t-fast);
}
.acct-x:hover { background: var(--hover); color: var(--text); }
.acct-x svg { width: 15px; height: 15px; }

.acct-head {
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-1);
  padding: var(--sp-5) var(--sp-4) var(--sp-4); text-align: center;
}
.acct-head .avatar { margin-bottom: var(--sp-2); }
.acct-name { font-size: var(--fs-15); font-weight: 700; letter-spacing: -.015em; }
.acct-mail { font-size: var(--fs-12); color: var(--text-3); word-break: break-all; }

.acct-items { display: flex; flex-direction: column; gap: 2px; padding-top: var(--sp-2); border-top: 1px solid var(--line); }

/* sidebar sətrinin sağındakı əməliyyat (qovluğu boşalt və s.) */
.nav-act {
  flex: none; width: 24px; height: 24px; display: grid; place-items: center;
  border-radius: var(--r-xs); color: var(--text-3); opacity: 0;
  transition: opacity var(--t-fast), background var(--t-fast), color var(--t-fast);
}
.nav-item:hover .nav-act { opacity: 1; }
.nav-act:hover { background: var(--active); color: var(--text); }
.nav-act svg { width: 14px; height: 14px; }
@media (hover: none) { .nav-act { opacity: 1; } }

/* yalnız mobil qabıqda görünən elementlər (çekmecə düyməsi) */
.only-mob { display: none !important; }
@media (max-width: 760px) { .only-mob { display: grid !important; } }

/* rəng nöqtəsi — menyularda etiket rəngi üçün */
.lb-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
/* `.menu-item span { flex: 1 }` nöqtəni də uzadıb ovala çevirirdi (P.menu-nun `dot`
   bəndi — tapşırıq statusu menyusu ilk işlədəndir); menyuda nöqtə öz ölçüsündə qalsın. */
.menu-item .lb-dot { flex: none; }

/* iki sütunlu köməkçi (P.ui.cols) */
.st-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-8); }
@media (max-width: 1100px) { .st-cols { grid-template-columns: minmax(0, 1fr); } }

/* server əlçatan olmayanda göstərilən ekran */
.offline {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--sp-3); padding: var(--sp-8); text-align: center;
}
.offline svg { width: 40px; height: 40px; color: var(--danger); }
.offline b { font-size: var(--fs-18); font-weight: 700; letter-spacing: -.02em; }
.offline p { max-width: 46ch; color: var(--text-2); font-size: var(--fs-14); line-height: 1.6; }
.offline .btn { margin-top: var(--sp-2); }

/* ==========================================================================
   Giriş ekranı — mərkəzlənmiş kart
   --------------------------------------------------------------------------
   Əvvəlki quruluşda solda marketinq paneli vardı. Giriş ekranı satış yeri
   deyil: müştəri artıq qərar verib və işləməyə gəlib. Ona görə indi
   yuxarıda loqo və dil/tema, ortada tək kart, altda qısa ayaq var.
   ========================================================================== */
.auth2{
  min-height:100dvh;display:grid;grid-template-rows:auto 1fr auto;
  background:
    radial-gradient(760px 420px at 50% -10%, var(--accent-soft) 0%, transparent 62%),
    var(--canvas);
}
.auth2-top{
  display:flex;align-items:center;gap:var(--sp-4);
  padding:var(--sp-5) var(--sp-6);
}
.auth2-brand{display:flex;align-items:center;gap:var(--sp-3);min-height:44px;color:var(--text)}
.auth2-brand .brand-name{font-weight:700;letter-spacing:-.02em;font-size:17px}
.auth2-brand .brand-name b{color:var(--accent);font-weight:700}
.auth2-act{margin-left:auto;display:flex;align-items:center;gap:var(--sp-2)}

.auth2-mid{
  display:grid;align-content:start;justify-items:center;
  padding:var(--sp-8) var(--sp-5) var(--sp-10);gap:var(--sp-5);
}
.auth2-card{
  width:100%;max-width:440px;background:var(--surface);
  border:1px solid var(--line);border-radius:22px;
  padding:var(--sp-10) var(--sp-8);
  box-shadow:0 20px 60px rgba(20,16,46,.10), 0 2px 6px rgba(20,16,46,.05);
}
[data-theme="dark"] .auth2-card{box-shadow:0 20px 60px rgba(0,0,0,.45)}

.auth2-card .auth-head{margin-bottom:var(--sp-6)}
.auth2-card .auth-title{font-size:26px;line-height:1.2;letter-spacing:-.03em;margin:0}
.auth2-card .auth-note{margin-top:var(--sp-2);color:var(--text-2);font-size:15px}
.auth2-card .auth-form{display:grid;gap:var(--sp-5)}
.auth2-card .btn-block{width:100%}

.auth2-help{width:100%;max-width:440px}
.auth2-det summary{
  list-style:none;cursor:pointer;display:inline-flex;align-items:center;
  min-height:44px;font-size:14px;font-weight:600;color:var(--accent);
}
.auth2-det summary::-webkit-details-marker{display:none}
.auth2-det p{margin-top:var(--sp-2);font-size:14px;color:var(--text-2);line-height:1.6}

.auth2-foot{padding:0 var(--sp-6) var(--sp-8);text-align:center}
.auth2-tag{font-size:14px;color:var(--text-2)}
.auth2-links{margin-top:var(--sp-2);display:flex;gap:var(--sp-3);justify-content:center;
  align-items:center;font-size:13px;color:var(--text-3)}
.auth2-links a{color:var(--text-2);display:inline-flex;align-items:center;min-height:44px}
.auth2-links a:hover{color:var(--accent)}

/* ---------- dil menyusu ---------- */
.lgn{position:relative}
.lgn-btn{
  display:flex;align-items:center;gap:6px;height:40px;padding:0 var(--sp-3);
  border-radius:var(--r-md);font-size:14px;font-weight:700;color:var(--text-2);
  background:transparent;border:0;cursor:pointer;
  transition:background var(--t-fast),color var(--t-fast);
}
.lgn-btn:hover{background:var(--hover);color:var(--text)}
.lgn-btn svg{width:17px;height:17px}
.lgn-menu{
  position:absolute;right:0;top:calc(100% + 6px);min-width:172px;z-index:60;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-md);
  box-shadow:0 18px 44px rgba(20,16,46,.18);padding:var(--sp-2);display:grid;gap:2px;
}
.lgn-opt{
  display:flex;align-items:center;min-height:42px;padding:0 var(--sp-3);
  border:0;background:transparent;border-radius:var(--r-sm);cursor:pointer;
  font-size:15px;color:var(--text);text-align:left;width:100%;
}
.lgn-opt:hover{background:var(--hover)}
.lgn-opt.is-on{color:var(--accent);font-weight:700;background:var(--accent-soft)}

@media (max-width:520px){
  .auth2-top{padding:var(--sp-4)}
  .auth2-card{padding:var(--sp-8) var(--sp-5);border-radius:18px}
  .auth2-mid{padding:var(--sp-5) var(--sp-4) var(--sp-8)}
  .auth2-card .auth-title{font-size:23px}
}

/* ePoct customer mailbox — light paper, forest navigation, quiet lime selection.
   Scoped away from the independently maintained login. No mail content styles reset. */

body:has(#app:not(.is-bare)) {
 --font:'DM Sans',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
 --font-display:var(--font); --sidebar-w:248px; --header-h:76px;
 --canvas:#09170f;--surface:#101f17;--surface-2:#15271d;--surface-3:#1b3023;
 --surface-hi:#ffffff08;--hover:#d3efb30b;--active:#c6fb4b16;--sunken:#00000024;
 --line:#ffffff12;--line-strong:#ffffff26;--text:#edf5ec;--text-2:#b9cbbf;--text-3:#91a797;
 --accent:#c6fb4b;--accent-hi:#d7ff78;--accent-ink:#082615;--accent-soft:#c6fb4b17;--accent-line:#c6fb4b55;
 --text-inv:#082615;--app-bg:var(--canvas);--selection-bg:#263d20;--side-bg:#0d1d13;
 --shadow-1:0 1px 3px #00180714;--shadow-2:0 8px 24px #0003;--shadow-3:0 24px 70px #0006;
 --ring:0 0 0 2px var(--surface),0 0 0 4px var(--accent-line);
 /* Tapşırıq statusu (pages/tasks.js, company.js): dolu nişan + onun üstündəki mətn.
    Mətn rəngləri 4.5:1-dən yuxarı kontrast üçün seçilib. */
 --st-todo:#5f6e64;--st-todo-ink:#eef3ef;--st-doing:#f2a93b;--st-doing-ink:#2b1b00;
 --st-stuck:#d4394a;--st-stuck-ink:#fff;--st-done:#3ecf8e;--st-done-ink:#04210f;
 /* Tapşırıq prioriteti: yumşaq nişan (fon -soft, mətn əsas rəng) — statusdan sakit görünsün. */
 --pr-low:#8ab4f8;--pr-low-soft:#8ab4f824;--pr-medium:#b3a4f7;--pr-medium-soft:#b3a4f724;
 --pr-high:#f5a35c;--pr-high-soft:#f5a35c24;--pr-urgent:#ff7b7b;--pr-urgent-soft:#ff7b7b24;
 background:var(--canvas);font-family:var(--font);color-scheme:dark;
}
html[data-theme="light"] body:has(#app:not(.is-bare)) {
 --canvas:#f3f7f1;--surface:#fff;--surface-2:#fff;--surface-3:#f1f6ef;
 --surface-hi:#103b1605;--hover:#eaf2e7;--active:#e3efd8;--sunken:#f6f8f4;
 --line:#e2e9df;--line-strong:#c4d4c3;--text:#173622;--text-2:#4c6654;--text-3:#647c6c;
 --accent:#17482b;--accent-hi:#256139;--accent-ink:#fff;--accent-soft:#e6f0dc;--accent-line:#427c4899;
 --text-inv:#fff;--selection-bg:#f0f8de;--side-bg:#f1f6ed;
 --danger:#b92e31;--danger-soft:#b92e310d;--success:#176a3d;--success-soft:#176a3d10;--warning:#8b650d;
 --shadow-2:0 8px 24px #103d1010;--shadow-3:0 24px 70px #103d1026;
 --st-todo:#c9d3cc;--st-todo-ink:#2b3d31;--st-doing:#fdab3d;--st-doing-ink:#3a2400;
 --st-stuck:#d83a4f;--st-stuck-ink:#fff;--st-done:#2fc97f;--st-done-ink:#03301a;
 --pr-low:#2463c4;--pr-low-soft:#2463c417;--pr-medium:#5b43c9;--pr-medium-soft:#5b43c917;
 --pr-high:#a84d08;--pr-high-soft:#a84d0817;--pr-urgent:#c3283c;--pr-urgent-soft:#c3283c17;
 color-scheme:light;
}
#app:not(.is-bare) .brand{background:var(--side-bg);padding:0 20px;border-right:1px solid var(--line);gap:9px}
#app:not(.is-bare) .brand-mark{width:35px;height:35px;border-radius:11px;background:#c6fb4b;color:#082615}
#app:not(.is-bare) .brand-mark svg{width:24px;height:24px}
#app:not(.is-bare) .brand-name{font-size:26px;letter-spacing:-1.2px;font-weight:700}
#app:not(.is-bare) .brand-name b{color:var(--text);font-weight:700}
#app:not(.is-bare) .side{background:var(--side-bg);border-right:1px solid var(--line);padding:10px 16px 16px;gap:22px}
#app:not(.is-bare) .compose-btn{height:46px;border-radius:9px;box-shadow:none}
#app:not(.is-bare) .nav-item{height:43px;border-radius:8px;font-size:13px}
#app:not(.is-bare) .nav-item.is-active::before{display:none}
#app:not(.is-bare) .nav-badge{background:transparent;color:var(--accent);font-weight:700}
#app:not(.is-bare) .nav-head{font-size:10px;letter-spacing:.1em}
#app:not(.is-bare) .header{padding:0 26px;background:var(--surface);border-bottom:1px solid var(--line)}
#app:not(.is-bare) .header-search{max-width:640px}
#app:not(.is-bare) .header-search .input{height:42px;background:var(--canvas);border-color:transparent;border-radius:9px}
#app:not(.is-bare) .content{border:0;border-radius:0;background:var(--surface)}
#app:not(.is-bare) .page-title{font-size:30px;font-weight:600;letter-spacing:-1px}
#app:not(.is-bare) .reader-subject{font-size:26px;font-weight:600;letter-spacing:-.8px}
#app:not(.is-bare) .reader-inner{padding:30px 32px 48px;max-width:940px}
#app:not(.is-bare) .reader-body{font-size:15px;line-height:1.8}
#app:not(.is-bare) .reader-acts{margin-top:36px}
#app:not(.is-bare) .att{border-radius:10px;background:var(--sunken)}
#app:not(.is-bare) .cmp{border-radius:14px 14px 0 0;box-shadow:var(--shadow-3);border-color:var(--line-strong)}
#app:not(.is-bare) .cmp-bar{background:var(--side-bg);border-bottom:1px solid var(--line)}
#app:not(.is-bare) .cmp-editor{font-size:15px;line-height:1.75}
#app:not(.is-bare) .cmp-foot{background:var(--surface)}
#app:not(.is-bare) .avatar{filter:saturate(.65)}
/* Əsl profil şəkli solğunlaşmasın — filtr yalnız hərfli avatarların rəngini yumşaldır. */
#app:not(.is-bare) .avatar.has-photo{filter:none}
.mail-workspace{display:grid;grid-template-columns:minmax(320px,37%) minmax(0,1fr);height:100%;min-height:0;min-width:0;flex:1}
.mail-column{display:flex;flex-direction:column;min-width:0;min-height:0;border-right:1px solid var(--line);overflow:hidden}
.mail-reading{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden;background:var(--surface)}
.mail-reading-idle{align-items:center;justify-content:center;background:var(--surface)}
.mail-welcome{text-align:center;max-width:300px;padding:32px;color:var(--text-3)}
.mail-welcome>svg{width:66px;height:66px;padding:18px;border-radius:20px;background:var(--accent-soft);color:var(--accent);margin-bottom:22px}
.mail-welcome h2{font-size:23px;color:var(--text);font-weight:600;letter-spacing:-.6px;margin-bottom:10px}
.mail-welcome p{font-size:14px;line-height:1.7}
.mail-column .toolbar{height:auto;min-height:114px;padding:20px 20px 14px;flex-wrap:wrap;align-content:center;gap:6px}
.mail-column .toolbar-title{font-size:24px;letter-spacing:-.8px;flex:1}
.mail-column .toolbar-meta{font-size:10px}
.mail-column .tb-chips{flex-basis:100%;margin:4px 0 0;display:flex;gap:7px}
.mail-column .tb-chips .chip{font-size:11px;height:28px}
.mail-column .tb-pick{width:24px}
.mail-column .msg{min-height:106px;display:grid;grid-template-columns:35px minmax(0,1fr) 50px;gap:0 10px;padding:16px 18px;align-items:start}
.mail-column .msg-who{grid-column:1;grid-row:1;width:auto}
.mail-column .msg-who>.msg-from{display:none}
.mail-column .msg-body{grid-column:2;grid-row:1;display:flex;flex-direction:column;gap:4px;min-width:0}
.mail-column .msg-body>.msg-from{display:block;width:100%;font-size:12px;font-weight:600}
.mail-column .msg-subject{max-width:100%;width:100%;font-size:13px;line-height:1.5}
.mail-column .msg-snippet{font-size:11px;max-width:100%;line-height:1.5}
.mail-column .msg-end{grid-column:3;grid-row:1;gap:5px;justify-content:flex-end;flex-wrap:wrap;width:50px}
.mail-column .msg-date{font-size:10px;width:auto}
.mail-column .msg-star{position:absolute;right:18px;bottom:12px;width:26px;height:26px}
.mail-column .msg-check{display:none}
.mail-column .msg.is-picking .msg-check{display:grid;grid-column:1;grid-row:1;width:35px;height:36px}
.mail-column .msg.is-picking .msg-who{visibility:hidden}
.mail-column .msg .msg-hover{display:none}
.mail-column .msg:hover .msg-date,.mail-column .msg:hover .msg-thread,.mail-column .msg:hover .msg-clip{display:flex}
.mail-column .msg.is-open,.mail-column .msg.is-selected{background:var(--selection-bg)}
.mail-column .msg.is-open::before{content:'';position:absolute;inset:0 auto 0 0;width:3px;background:var(--accent)}
.mail-column .list-day{padding:12px 20px 8px;font-size:10px}
.mail-column .bulkbar{flex-wrap:wrap;align-content:center;padding:12px;gap:8px;background:var(--surface-3)}
.mail-column .bulkbar .toolbar-right{margin-left:0}
@media(min-width:761px) and (max-width:1200px){.mail-workspace{grid-template-columns:minmax(300px,42%) minmax(0,1fr)}#app:not(.is-bare) .reader-inner{padding:24px}.mail-column .toolbar-meta{display:none}}
@media(min-width:761px) and (max-width:1080px){#app:not(.is-bare){--sidebar-w:72px}#app:not(.is-bare) .brand{padding:0}#app:not(.is-bare) .side{padding:10px}.mail-column .msg{padding:16px 12px;gap:0 7px}}
@media(min-width:761px){#app.is-collapsed{--sidebar-w:72px}#app.is-collapsed .brand{padding:0}#app.is-collapsed .side{padding-left:10px;padding-right:10px}}
@media(max-width:760px){
 body:has(#app:not(.is-bare)){--header-h:64px}
 #app:not(.is-bare) .header{padding:0 10px;gap:5px}
 #app:not(.is-bare) .header-tools{gap:0}
 #app:not(.is-bare) .header-tools .icon-btn{width:34px;height:42px}
 #app:not(.is-bare) .header-search .input{font-size:12px}
 #app:not(.is-bare) .side{padding:22px 16px}
 #app:not(.is-bare) .reader-inner{padding:24px 18px 160px}
 #app:not(.is-bare) .reader-subject{font-size:23px}
 #app:not(.is-bare) .reader-body{font-size:14px}
 .mail-workspace{display:flex;flex-direction:column}
 .mail-column{flex:1;border:0}
 .mail-reading-idle,.mail-workspace.is-reading>.mail-column{display:none}
 .mail-workspace.is-reading>.mail-reading{flex:1}
 .mail-column .toolbar{min-height:102px;padding:14px 16px}
 .mail-column .toolbar-title{font-size:23px}
 .mail-column .msg{min-height:104px;grid-template-columns:42px minmax(0,1fr) 52px;padding:14px 16px;gap:0 9px}
 .mail-column .msg-body>.msg-from{font-size:13px}.mail-column .msg-subject{font-size:14px}.mail-column .msg-snippet{font-size:12px}
 .mail-column .msg-star{width:36px;height:36px;right:12px;bottom:4px}
 #app:not(.is-bare) .mobile-bar{background:var(--side-bg)}
 #app:not(.is-bare) .mobile-tab.is-on{background:var(--accent-soft)}
 #app:not(.is-bare) .cmp{border-radius:0}
}
@media print{.mail-workspace{display:block}.mail-column,.mail-reading-idle{display:none!important}.mail-reading{display:block;overflow:visible}}

#app:not(.is-bare) .cmp{background:var(--surface)}
@media(hover:hover){.mail-column .msg:hover .msg-hover,.mail-column .msg:focus-within .msg-hover{display:flex;position:absolute;right:48px;bottom:8px;background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:2px;box-shadow:var(--shadow-1)}}
.mail-reading .reader-mail{overflow-wrap:anywhere}
@media(min-width:761px) and (max-width:1200px){.mail-reading .reader-head{flex-wrap:wrap}.mail-reading .reader-when{width:100%;order:3}}

/* ------------------------------------------------------------------ */
/* DÜZƏLİŞ — YIĞILMIŞ PANELİ GERİ AÇMAQ                               */
/*                                                                     */
/* Yuxarıdakı `.is-collapsed .brand-toggle { display:none }` qaydası    */
/* paneli yığan düyməni, panel yığılan kimi gizlədirdi — nəticədə       */
/* paneli bir daha açmaq mümkün olmurdu (localStorage-də `poct.sidebar` */
/* «1» qalırdı və növbəti açılışda da yığılı gəlirdi).                  */
/*                                                                     */
/* Köhnə qayda SİLİNMƏYİB; burada daha yüksək xüsusiyyətlə üstələnir.   */
/* Dar ekran (max-width:1080px) qaydasına TOXUNULMUR: orada panel       */
/* qəsdən yığılıdır və mobil menyu işləyir.                            */
@media (min-width: 1081px) {
  .app.is-collapsed .brand { justify-content: center; }
  /* Yığılı halda loqonun yerini düymə tutur: 72px zolaqda ikisi birdən
     sığmır, düymə isə burada daha vacibdir — yeganə çıxış yoludur. */
  .app.is-collapsed .brand-mark { display: none; }
  .app.is-collapsed .brand-toggle { display: grid; margin: 0 auto; }
}

/* «Qutuya daxil ol» vərəqi — rəhbər işçinin qutusuna baxır (core.js mountManagerViewBar). */
.mv-bar { position: fixed; inset: 0 0 auto 0; z-index: 900; height: 40px; display: flex; align-items: center;
  gap: var(--sp-3); padding: 0 var(--sp-4); background: var(--warning); color: #1f1600; font-size: var(--fs-13); }
.mv-bar > svg { flex: none; width: 18px; height: 18px; }
.mv-bar > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-bar em { font-style: normal; opacity: .75; margin-left: var(--sp-2); }
body.has-mv-bar .app { height: calc(100dvh - 40px); margin-top: 40px; }
