/* Dandelion Mail — the CRM web app's look (crm.dn-dxb.com) on Roundcube's Elastic skin.
   Colours come from skin/*.min.css: Elastic compiled with the CRM palette (webmail/skin/_variables.less).
   This file adds what the variables cannot: the CRM fonts, its login card, radii and pills, and a sidebar that
   reads like the CRM's. Tokens below are the CRM's own values (read from the live page, 2026-09-25). */

/* ── Fonts: the CRM's own files ──────────────────────────────────────────────────────────────────────────── */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/inter-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/inter-latin-ext-400-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/inter-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/inter-latin-ext-500-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600 900; font-display: swap; src: url('fonts/inter-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600 900; font-display: swap; src: url('fonts/inter-latin-ext-600-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 600 900; font-display: swap; src: url('fonts/plus-jakarta-sans-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 600 900; font-display: swap; src: url('fonts/plus-jakarta-sans-latin-ext-700-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* IRANYekan ("fanum" cut, as the CRM serves it): the whole face for Persian/Arabic pages, and the same files under a
   second name limited to Arabic-script code points for a Persian name inside the English UI */
@font-face { font-family: 'IRANYekan'; font-weight: 100 500; font-style: normal; font-display: swap; src: url('fonts/iranyekan-regular.woff2') format('woff2'), url('fonts/iranyekan-regular.woff') format('woff'); }
@font-face { font-family: 'IRANYekan'; font-weight: 600 900; font-style: normal; font-display: swap; src: url('fonts/iranyekan-bold.woff2') format('woff2'), url('fonts/iranyekan-bold.woff') format('woff'); }
@font-face { font-family: 'IRANYekan Persian'; font-weight: 100 500; font-style: normal; font-display: swap; src: url('fonts/iranyekan-regular.woff2') format('woff2'), url('fonts/iranyekan-regular.woff') format('woff'); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'IRANYekan Persian'; font-weight: 600 900; font-style: normal; font-display: swap; src: url('fonts/iranyekan-bold.woff2') format('woff2'), url('fonts/iranyekan-bold.woff') format('woff'); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF; }

:root {
  --dn-font: Inter, 'IRANYekan Persian', 'Segoe UI', Tahoma, Arial, sans-serif;
  --dn-display: 'Plus Jakarta Sans', Inter, 'IRANYekan Persian', 'Segoe UI', Tahoma, Arial, sans-serif;
  --dn-brand: #0f6b46; --dn-brand-hover: #0a4c31; --dn-on-brand: #fff; --dn-brand-text: #0f6b46; --dn-tint: #eaf2ed;
  --dn-canvas: #f4f3ef; --dn-surface: #fff; --dn-surface-muted: #faf9f6; --dn-hover: #eae7e0;
  --dn-ink: #161a18; --dn-text-light: #5f665e; --dn-muted: #767d74; --dn-line: #e6e2da; --dn-line-strong: #e0dbd2;
  --dn-focus: rgba(15, 107, 70, .22); --dn-shadow-pop: 0 12px 32px rgba(22, 26, 24, .12);
}
html.dark-mode {
  --dn-brand: #2f8f61; --dn-brand-hover: #3aa672; --dn-on-brand: #04120b; --dn-brand-text: #5cae83; --dn-tint: #172a20;
  --dn-canvas: #0f1211; --dn-surface: #1a1f1d; --dn-surface-muted: #212724; --dn-hover: rgba(255, 255, 255, .06);
  --dn-ink: #f4f7f4; --dn-text-light: #aab2ab; --dn-muted: #98a09a; --dn-line: #2b322e; --dn-line-strong: #38403b;
  --dn-focus: rgba(47, 143, 97, .35); --dn-shadow-pop: 0 12px 32px rgba(0, 0, 0, .45);
}
html[dir="rtl"] { --dn-font: 'IRANYekan', Tahoma, sans-serif; --dn-display: 'IRANYekan', Tahoma, sans-serif; }

body, .form-control, .custom-select, input, select, textarea, button, .btn, .popover, .tooltip, .ui-dialog, .ui-widget,
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: var(--dn-font); }

/* ── Login: the CRM's login card on its dark backdrop ─────────────────────────────────────────────────────── */
html body.task-login {
  background: #080b0f radial-gradient(circle at 50% 10%, #1e2127 0, #0b0f14 42%, #080b0f 100%) no-repeat fixed;
  color: var(--dn-ink);
  height: auto; min-height: 100%; overflow-y: auto;
}
body.task-login #layout {
  background: transparent; height: auto; min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: max(32px, env(safe-area-inset-top)) 16px max(32px, env(safe-area-inset-bottom)); box-sizing: border-box;
}
body.task-login #layout-content {
  display: flex !important; flex-direction: column; align-items: stretch; text-align: start;
  flex: 0 1 480px; width: 100%; max-width: 480px; height: auto; min-height: 0; box-sizing: border-box;
  padding: 30px 38px 36px; border-radius: 20px;
  background: #fff !important; box-shadow: 0 28px 80px rgba(0, 0, 0, .46);
}
body.task-login #logo {
  position: static !important; top: auto !important; align-self: center;
  height: 100px; max-height: 100px; width: auto; margin: 0 0 12px; opacity: 1;
  content: url('logo-light.png');
}
body.task-login #login-form { position: static !important; top: auto !important; width: 100%; max-width: none; margin: 0; }
.dn-login-head { text-align: center; margin: 0 0 24px; }
.dn-login-title {
  margin: 0; font-family: var(--dn-display); font-size: 25px; font-weight: 800; letter-spacing: -.035em;
  line-height: 1.2; color: #161a18;
}
html[dir="rtl"] .dn-login-title { letter-spacing: 0; }
.dn-login-subtitle { margin: 6px 0 0; font-size: 13.5px; color: #5f665e; }

/* fields: label above, icon inside, 54px tall, 13px corners — as on the CRM */
body.task-login #login-form table, body.task-login #login-form tbody { display: block; width: 100%; }
body.task-login #login-form tr { display: flex; flex-direction: column; margin: 0 0 18px; }
body.task-login #login-form td { display: block; width: 100%; padding: 0; border: 0; }
body.task-login #login-form td.title {
  display: block !important; margin: 0 0 8px; padding: 0; text-align: start;
  font-size: 13.5px; font-weight: 700; color: #161a18;
}
body.task-login #login-form td.input-group { display: flex; position: relative; flex-wrap: nowrap; }
body.task-login #login-form .input-group-prepend {
  position: absolute; z-index: 4; inset-inline-start: 0; top: 0; bottom: 0; width: 48px; margin: 0;
  display: flex; align-items: center; justify-content: center; pointer-events: none;
}
body.task-login #login-form .input-group-prepend .input-group-text {
  background: transparent !important; border: 0 !important; padding: 0; color: #5f665e !important; font-size: 15px;
}
body.task-login #login-form .form-control,
body.task-login #login-form .input-group > .form-control {
  height: 54px; font-size: 16px; /* 16px stops iOS zooming into the field */
  color: #1c1f25 !important; background: #fff !important;
  border: 1px solid #e1e2ec !important; border-radius: 13px !important;
  padding-block: 0; padding-inline: 48px 16px; box-shadow: none;
}
body.task-login #login-form .form-control::placeholder { color: #9aa0a6; }
body.task-login #login-form .form-control:focus {
  border-color: #0f6b46 !important; box-shadow: 0 0 0 3px rgba(15, 107, 70, .18) !important;
}
body.task-login #login-form .formbuttons { margin: 6px 0 0; padding: 0; }
body.task-login #rcmloginsubmit {
  width: 100%; height: 54px; margin: 0; padding: 0;
  font-size: 15px; font-weight: 700; letter-spacing: 0; text-transform: none !important; color: #fff !important;
  background: #0f6b46 !important; border: 0 !important; border-radius: 13px;
  box-shadow: 0 8px 20px rgba(15, 107, 70, .24);
}
body.task-login #rcmloginsubmit:hover, body.task-login #rcmloginsubmit:focus-visible { background: #0a4c31 !important; }
body.task-login #rcmloginsubmit:focus-visible { outline: 3px solid rgba(15, 107, 70, .35); outline-offset: 2px; }
body.task-login #login-footer { color: #767d74 !important; text-align: center; }
body.task-login #login-footer:empty { display: none; }
body.task-login #messagestack div { border-radius: 12px; }

/* the dark theme: the same card, in the CRM's dark surfaces */
html.dark-mode body.task-login #layout-content { background: #1a1f1d !important; box-shadow: 0 28px 80px rgba(0, 0, 0, .6); border: 1px solid #2b322e; }
html.dark-mode body.task-login #logo { content: url('logo-dark.png'); }
html.dark-mode .dn-login-title, html.dark-mode body.task-login #login-form td.title { color: #f4f7f4; }
html.dark-mode .dn-login-subtitle { color: #aab2ab; }
html.dark-mode body.task-login #login-form .form-control { color: #f4f7f4 !important; background: #212724 !important; border-color: #38403b !important; }
html.dark-mode body.task-login #login-form .form-control:focus { border-color: #2f8f61 !important; box-shadow: 0 0 0 3px rgba(47, 143, 97, .3) !important; }
html.dark-mode body.task-login #login-form .input-group-prepend .input-group-text { color: #aab2ab !important; }
html.dark-mode body.task-login #rcmloginsubmit { background: #2f8f61 !important; color: #04120b !important; box-shadow: 0 8px 20px rgba(0, 0, 0, .35); }
html.dark-mode body.task-login #rcmloginsubmit:hover, html.dark-mode body.task-login #rcmloginsubmit:focus-visible { background: #3aa672 !important; }

@media screen and (max-width: 480px) {
  body.task-login #layout-content { padding: 26px 22px 28px; border-radius: 18px; }
  body.task-login #logo { height: 84px; }
}

/* ── Sidebar (task menu) = the CRM's sidebar ────────────────────────────────────────────────────────────── */
#layout-menu { border-inline-end: 1px solid var(--dn-line); }
/* the DN mark in the CRM's rounded logo tile */
#layout-menu .popover-header img,
#layout-menu #logo {
  opacity: 1; content: url('dn-mark.png'); box-sizing: border-box; width: 46px; height: 46px; max-width: none;
  padding: 4px; margin-top: 6px; border-radius: 12px; background: var(--dn-canvas); border: 1px solid var(--dn-line);
  vertical-align: middle;
}
html.dark-mode #layout-menu .popover-header img,
html.dark-mode #layout-menu #logo { content: url('dn-mark-dark.png'); opacity: 1; }
@media screen and (min-width: 481px) {
  /* rail items as the CRM's rounded nav pills (the phone drawer keeps Elastic's full-width rows) */
  #taskmenu a { border-radius: 12px; margin: 2px 6px; width: calc(100% - 12px); font-weight: 500; }
  /* keep the bottom buttons inside the sidebar so its hairline runs the full height */
  #layout-menu { position: relative; }
  #layout-menu .special-buttons { inset-inline-start: 0; inset-inline-end: 0; width: auto; }
}
#taskmenu a.selected { font-weight: 600; }
html.dark-mode #taskmenu a.selected,
html.dark-mode #taskmenu a.selected span.inner,
html.dark-mode #taskmenu a.selected:before { color: #5cae83 !important; }
html.dark-mode #taskmenu a.selected { background: #172a20 !important; }
html.dark-mode #layout-menu .popover-header a,
html.dark-mode #layout-menu .popover-header a:before { color: #aab2ab; }
#taskmenu a.compose, #taskmenu a.compose:before { color: var(--dn-brand-text) !important; }
#taskmenu a { border-color: transparent !important; }

/* folder list: the CRM's rounded, tinted selection */
#folderlist-content li > a { border-radius: 12px; }
#folderlist-content li.selected > a { color: var(--dn-brand-text); font-weight: 600; }

/* dark: text links in the CRM's light green — Elastic has one link colour for both themes, and the CRM's #0f6b46
   is too dark on a dark ground. :where() keeps this at the weight of Elastic's own `a` rule, so lists keep theirs. */
:where(html.dark-mode) a { color: #5cae83; }
:where(html.dark-mode) a:hover { color: #7cc39d; }
html.dark-mode .tox-dialog__body-nav-item--active,
html.dark-mode .ui-state-highlight,
html.dark-mode .ui-widget-content .ui-state-highlight { color: #5cae83; }

/* ── Controls: the CRM's radii and pills ──────────────────────────────────────────────────────────────────── */
.btn { border-radius: 999px; font-weight: 600; }
.btn-secondary, .btn.btn-secondary {
  color: var(--dn-ink) !important; background: var(--dn-surface) !important; border: 1px solid var(--dn-line) !important;
}
.btn-secondary:hover, .btn.btn-secondary:hover { background: var(--dn-canvas) !important; }
html.dark-mode .btn-primary, html.dark-mode .btn.btn-primary,
html.dark-mode .btn-primary:before { color: var(--dn-on-brand) !important; }
.form-control, .custom-select, .input-group > .form-control { border-radius: 12px; }
.input-group > .input-group-prepend > .input-group-text { border-start-start-radius: 12px; border-end-start-radius: 12px; }
.input-group > .input-group-append > .input-group-text,
.input-group > .input-group-append > .btn { border-start-end-radius: 12px; border-end-end-radius: 12px; }
.input-group > .form-control:not(:last-child) { border-start-end-radius: 0; border-end-end-radius: 0; }
.input-group > .form-control:not(:first-child) { border-start-start-radius: 0; border-end-start-radius: 0; }
.searchbar, #layout .searchbar { border-radius: 999px; }
.popover, .ui-dialog, .ui-dialog.popupdialog { border-radius: 16px; border-color: var(--dn-line); box-shadow: var(--dn-shadow-pop); }
.popover .popover-body { border-radius: 16px; }
.ui-dialog .ui-dialog-titlebar { border-radius: 16px 16px 0 0; }
#messagestack div { border-radius: 12px; }
.listing li .unreadcount, .listing tr .unreadcount, #folderlist-content li .unreadcount {
  border-radius: 999px; font-weight: 600;
}

/* compose / floating action button: the CRM's green round "+" */
.floating-action-buttons a.button {
  background: var(--dn-brand); color: var(--dn-on-brand); opacity: 1;
  box-shadow: 0 8px 20px rgba(15, 107, 70, .28);
}
.floating-action-buttons a.button:before { color: var(--dn-on-brand) !important; }
html.dark-mode .floating-action-buttons a.button { box-shadow: 0 8px 20px rgba(0, 0, 0, .4); }

/* Phone: comfortable touch rows, iOS safe areas */
@media screen and (max-width: 480px) {
  #messagelist tr td,
  .listing li > a { min-height: 48px; }
  #layout > div > .footer { padding-bottom: env(safe-area-inset-bottom); }
}

/* Plain-text mail in the normal reading font, wrapped to the screen; Persian/Arabic paragraphs take their own
   direction and align to their start */
div.message-part pre, div.message-part div.pre {
  font-family: inherit; white-space: pre-wrap; word-wrap: break-word; unicode-bidi: plaintext; text-align: start;
}

/* Undo-send bar (undo_send.js): the CRM's dark toast */
.dn-undo-send {
  position: fixed; z-index: 10000; left: 50%; transform: translateX(-50%);
  bottom: calc(76px + env(safe-area-inset-bottom)); max-width: calc(100vw - 24px); width: max-content;
  display: flex; align-items: center; gap: 18px; padding: 12px 14px 12px 18px;
  background: #161a18; color: #f4f7f4; border-radius: 12px; font-size: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
}
html.dark-mode .dn-undo-send { background: #212724; border: 1px solid #2b322e; }
.dn-undo-send, .dn-undo-send span { white-space: nowrap; }
.dn-undo-send button {
  border: 0; background: transparent; color: #5cae83; font-weight: 700; font-size: 15px;
  letter-spacing: .02em; text-transform: uppercase; padding: 6px 8px; cursor: pointer;
}
.dn-undo-send button:focus-visible { outline: 2px solid #5cae83; outline-offset: 2px; border-radius: 6px; }

