﻿/* ============================================================
   Jihad University Mail — application shell
   Loaded after jihad.css
   ============================================================ */

:root {
  --j-navy: #0b2340;
  --j-navy-2: #123a5c;
  --j-teal: #0f8b8d;
  --j-teal-dark: #0b6f71;
  --j-gold: #c8a45c;
  --j-bg: #eef3f8;
  --j-card: #ffffff;
  --j-ink: #172a3d;
  --j-muted: #7b8a9c;
  --j-line: #e6edf4;
  --j-soft: #f5f8fb;
}

body:not(.task-login) {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--j-bg);
}

/* ---------- App bar ---------- */
#jihad-appbar {
  flex: 0 0 68px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 20px;
  background: #fff;
  border-bottom: 1px solid var(--j-line);
  box-shadow: 0 4px 22px rgba(11, 35, 64, .06);
  position: relative;
  z-index: 200;
  direction: rtl;
}

.jihad-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
  color: var(--j-navy) !important;
}
.jihad-brand img {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  box-shadow: 0 6px 16px rgba(15, 139, 141, .18);
}
.jihad-brand-text { display: flex; flex-direction: column; line-height: 1.35; }
.jihad-brand-text strong { font-size: 15px; font-weight: 700; color: var(--j-navy); }
.jihad-brand-text small { font-size: 10px; color: var(--j-muted); font-weight: 400; }

.jihad-nav {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-right: 4px;
}
.jihad-nav a {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  border-radius: 10px;
  color: #5b6b7c !important;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.jihad-nav a svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.jihad-nav a:hover { background: #f2f7fb; color: var(--j-teal-dark) !important; }
body.task-mail .jihad-nav a[data-task="mail"],
body.task-addressbook .jihad-nav a[data-task="addressbook"],
body.task-settings .jihad-nav a[data-task="settings"] {
  background: #e8f6f4;
  color: var(--j-teal-dark) !important;
}

.jihad-actions {
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.jihad-compose {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 11px;
  background: var(--j-teal);
  color: #fff !important;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 7px 18px rgba(15, 139, 141, .22);
  white-space: nowrap;
}
.jihad-compose:hover { background: var(--j-teal-dark); color: #fff !important; }
.jihad-compose svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.jihad-user { display: flex; align-items: center; gap: 8px; color: #33475c; font-size: 12px; }
.jihad-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e8f6f4;
  color: var(--j-teal-dark);
  font-weight: 700;
  font-size: 13px;
}
.jihad-email { direction: ltr; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jihad-logout {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #8a9aab !important;
}
.jihad-logout:hover { background: #fdf0f0; color: #b44b4b !important; }
.jihad-logout svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

/* hide Roundcube's legacy task rail — replaced by app bar */
#layout-menu { display: none !important; }

/* ---------- Shell ---------- */
#layout {
  flex: 1;
  min-height: 0;
  height: auto !important;
  display: flex;
  gap: 14px;
  padding: 14px;
  direction: rtl;
  overflow: hidden;
  background: var(--j-bg);
}

#layout-sidebar,
#layout-list,
#layout-content {
  background: var(--j-card);
  border: 0 !important;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(16, 42, 67, .07);
  overflow: hidden;
  min-width: 0;
  max-width: none;
  height: 100%;
}
#layout-sidebar { flex: 0 0 232px; }
#layout-list { flex: 0 0 370px; }
#layout-content { flex: 1; }

#layout > div > .header {
  height: 64px;
  min-height: 64px;
  line-height: 1.35;
  padding: 0 14px;
  background: #fff !important;
  border-bottom: 1px solid var(--j-line) !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--j-ink);
}
#layout > div > .header .header-title { margin: 0 !important; text-align: right !important; flex: none; }

.eyebrow {
  display: block;
  font-size: 9.5px;
  font-weight: 500;
  color: var(--j-muted);
  letter-spacing: .2px;
  margin-bottom: 2px;
}
.jihad-panel-title,
.jihad-list-heading,
.jihad-message-title { min-width: 0; overflow: hidden; }
.jihad-panel-title .header-title,
.jihad-list-heading .header-title,
.jihad-message-title .header-title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--j-navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#messagelist-header .header-title:empty::after { content: "صندوق ورودی"; }
.jihad-message-title .header-title:empty::after { content: "پیام"; }

/* ---------- Folder column ---------- */
.jihad-sidebar-header { gap: 6px; }
.jihad-folder-label {
  padding: 13px 18px 6px;
  font-size: 10.5px;
  color: var(--j-muted);
  font-weight: 500;
}
#folderlist-content { padding-bottom: 10px; }
#mailboxlist { padding: 0 10px; margin: 0; }
#mailboxlist li { margin: 2px 0; list-style: none; }
#mailboxlist li > a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 8px 11px;
  border-radius: 11px;
  color: #3c4f63 !important;
  font-size: 12.5px;
  font-weight: 500;
}
#mailboxlist li > a:before {
  content: "";
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  background: center / contain no-repeat;
  opacity: .8;
}
#mailboxlist li.inbox > a:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f8b8d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6.5A2.5 2.5 0 0 1 5.5 4h13A2.5 2.5 0 0 1 21 6.5v11a2.5 2.5 0 0 1-2.5 2.5h-13A2.5 2.5 0 0 1 3 17.5v-11Z'/%3E%3Cpath d='m4 7 8 6 8-6'/%3E%3C/svg%3E");
}
#mailboxlist li.trash > a:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b46b6b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M8 6V4h8v2M19 6l-1 15H6L5 6M10 11v6M14 11v6'/%3E%3C/svg%3E");
}
#mailboxlist li.sent > a:before,
#mailboxlist li.drafts > a:before,
#mailboxlist li.junk > a:before,
#mailboxlist li > a:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237b8a9c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7a2 2 0 0 1 2-2h5l2 2h7a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Z'/%3E%3C/svg%3E");
}
#mailboxlist li.selected > a { background: #e8f6f4; color: var(--j-teal-dark) !important; font-weight: 600; }
#mailboxlist li > a:hover { background: #f5f9fc; }
#mailboxlist .unreadcount {
  margin-right: auto;
  background: var(--j-teal);
  color: #fff;
  border-radius: 999px;
  min-width: 19px;
  padding: 1px 6px;
  font-size: 10.5px;
  text-align: center;
  line-height: 17px;
}

/* ---------- Message list column ---------- */
.jihad-list-header { gap: 6px; }
.jihad-list-actions { margin-right: auto; display: flex; align-items: center; gap: 3px; }
.jihad-list-actions .toolbar { display: flex; align-items: center; gap: 2px; }
.jihad-list-actions .toolbar a,
.jihad-list-actions > a.button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #697b8d !important;
}
.jihad-list-actions .toolbar a:hover,
.jihad-list-actions > a.button:hover { background: var(--j-soft); color: var(--j-teal-dark) !important; }
.jihad-list-actions .inner { display: none !important; }
.jihad-list-actions a:before { font-size: 15px; }

#mailsearchform {
  margin: 10px 12px 2px;
  padding: 0 10px;
  background: var(--j-soft);
  border: 1px solid #edf2f7;
  border-radius: 12px;
  min-height: 42px;
  display: flex;
  align-items: center;
}
#mailsearchform form { display: flex; align-items: center; width: 100%; margin: 0; }
#mailsearchform input[type="text"],
#mailsearchform input[type="search"] {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  height: 40px;
  padding: 0 4px;
  font-size: 12.5px;
}
#mailsearchform .searchbutton,
#mailsearchform .button { color: var(--j-muted); }

#messagelist-content { background: #fbfdff; }
#messagelist {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 7px;
  padding: 4px 9px 12px;
  table-layout: fixed;
}
#messagelist thead { display: none; }
#messagelist tbody tr { background: #fff; }
#messagelist tbody tr td {
  border-top: 1px solid #eef3f8;
  border-bottom: 1px solid #eef3f8;
  padding: 11px 9px;
  vertical-align: middle;
}
#messagelist tbody tr td:first-child { border-right: 1px solid #eef3f8; border-radius: 0 12px 12px 0; }
#messagelist tbody tr td:last-child { border-left: 1px solid #eef3f8; border-radius: 12px 0 0 12px; }
#messagelist tbody tr:hover td { background: #f7fbfb; }
#messagelist tbody tr.unread td { background: #f1faf9; }
#messagelist tbody tr.unread td.subject { border-right: 3px solid var(--j-teal); }
#messagelist td.selection { width: 26px; padding-left: 0; padding-right: 0; }
#messagelist th.threads,
#messagelist th.status,
#messagelist th.fromto,
#messagelist th.date,
#messagelist th.size,
#messagelist th.flag,
#messagelist th.attachment,
#messagelist td.flags { display: none; }
#messagelist .fromto { display: block; font-weight: 600; font-size: 12.5px; color: var(--j-ink); }
#messagelist .date { float: left; color: var(--j-muted); font-size: 10.5px; margin-top: 2px; }
#messagelist .size { display: none; }
#messagelist td.subject > .subject { display: block; margin-top: 4px; font-size: 11.5px; font-weight: 400; color: #65778a; }
#messagelist td.subject > .subject a { color: inherit !important; }
#messagelist .msgicon {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--j-teal);
  margin-left: 5px;
  vertical-align: middle;
}
#messagelist tr:not(.unread) .msgicon { visibility: hidden; }
#messagelist .rcmContactAddress { color: var(--j-ink) !important; }

/* ---------- Reading pane ---------- */
.jihad-message-header { gap: 8px; }
#toolbar-menu { margin-right: auto; display: flex; align-items: center; gap: 7px; }
.jihad-action-group {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--j-soft);
  border-radius: 11px;
}
#toolbar-menu a {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #5b6b7c !important;
  position: relative;
}
#toolbar-menu a:hover { background: #fff; color: var(--j-teal-dark) !important; }
#toolbar-menu a.disabled { opacity: .38; }
#toolbar-menu .inner { display: none !important; }
#toolbar-menu a:before {
  content: "";
  width: 18px;
  height: 18px;
  background: center / contain no-repeat;
}
#toolbar-menu a.reply:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6b7c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 17l-5-5 5-5'/%3E%3Cpath d='M4 12h9a6 6 0 0 1 6 6v1'/%3E%3C/svg%3E");
}
#toolbar-menu a.reply-all:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6b7c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 17l-5-5 5-5M14 17l-5-5 5-5'/%3E%3Cpath d='M4 12h8a6 6 0 0 1 6 6v1'/%3E%3C/svg%3E");
}
#toolbar-menu a.forward:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6b7c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 17l5-5-5-5'/%3E%3Cpath d='M20 12h-9a6 6 0 0 0-6 6v1'/%3E%3C/svg%3E");
}
#toolbar-menu a.delete:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b46b6b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M8 6V4h8v2M19 6l-1 15H6L5 6M10 11v6M14 11v6'/%3E%3C/svg%3E");
}
#toolbar-menu a.markmessage:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6b7c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l2.8 5.7 6.2.9-4.5 4.4 1.1 6.2-5.6-2.9-5.6 2.9 1.1-6.2L3 9.6l6.2-.9L12 3Z'/%3E%3C/svg%3E");
}
#toolbar-menu a.more:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6b7c' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='5' cy='12' r='1'/%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3Ccircle cx='19' cy='12' r='1'/%3E%3C/svg%3E");
}
#toolbar-menu a.print:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6b7c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9V3h12v6M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2'/%3E%3Crect x='6' y='14' width='12' height='8'/%3E%3C/svg%3E");
}
#toolbar-menu a.prev:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6b7c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E");
}
#toolbar-menu a.next:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6b7c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E");
}
#toolbar-menu .dropbutton { display: flex; align-items: center; }
#toolbar-menu .dropbutton .dropdown {
  width: 15px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #9aabba !important;
}
#toolbar-menu .dropbutton .dropdown:before { content: "▾"; font-size: 9px; }
#toolbar-menu .dropbutton .dropdown .inner { display: none; }

#layout-content .iframe-wrapper { background: #fbfdff; }
#layout-content iframe { background: #fbfdff; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  #layout-sidebar { flex-basis: 210px; }
  #layout-list { flex-basis: 340px; }
}
@media (max-width: 980px) {
  #jihad-appbar { gap: 10px; padding: 0 12px; }
  .jihad-brand { min-width: 0; }
  .jihad-brand-text small { display: none; }
  .jihad-nav a span { display: none; }
  .jihad-nav a { padding: 9px; }
  .jihad-email { display: none; }
  #layout { gap: 10px; padding: 10px; }
  #layout-sidebar { flex-basis: 66px; }
  #layout-sidebar .jihad-folder-label,
  #layout-sidebar .header-title,
  #layout-sidebar .footer { display: none; }
  #mailboxlist li > a { justify-content: center; padding: 10px 6px; }
  #mailboxlist li > a { font-size: 0; gap: 0; }
  #mailboxlist li > a:before { width: 20px; height: 20px; }
  #mailboxlist .unreadcount { position: absolute; }
  #layout-list { flex-basis: 300px; }
}
@media (max-width: 720px) {
  .jihad-brand-text { display: none; }
  .jihad-compose span { display: none; }
  .jihad-compose { padding: 10px; }
  #layout-list { flex-basis: 280px; }
}

/* Roundcube moves the message toolbar into #toolbar-menu; style that container */
#toolbar-menu {
  background: transparent !important;
  border: 0 !important;
  position: static !important;
  float: none !important;
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 0 0 auto !important;
  list-style: none !important;
}
#toolbar-menu > li { display: flex !important; align-items: center !important; list-style: none !important; }
#toolbar-menu .jihad-action-group {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: #f5f8fb;
  border-radius: 11px;
}
#toolbar-menu a.jihad-action {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #5b6b7c !important;
}
#toolbar-menu a.jihad-action:hover { background: #fff; color: #0b6f71 !important; }
#toolbar-menu a.jihad-action.disabled { opacity: .38; }
#toolbar-menu .inner { display: none !important; }

/* toolbar corrections after Roundcube moves it into the header */
#toolbar-menu {
  margin: 0 auto 0 0 !important;
  width: auto !important;
}
#toolbar-menu a.jihad-action {
  width: 34px !important;
  height: 34px !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
}
#toolbar-menu a.jihad-action:before {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px;
  display: inline-block !important;
}
.jihad-list-actions .toolbar {
  background: transparent !important;
  border: 0 !important;
  position: static !important;
  float: none !important;
  height: auto !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}
.jihad-list-actions .toolbar a {
  float: none !important;
  width: 32px !important;
  height: 32px !important;
  padding: 0 !important;
}

/* compose view: options sidebar narrow, editor wide */
body.action-compose #layout-sidebar {
  flex: 0 0 300px !important;
  order: 2 !important;
}
body.action-compose #layout-content {
  flex: 1 1 auto !important;
  order: 0 !important;
}
body.action-compose #layout { gap: 14px; }

/* balance message header: title right, actions left */
#toolbar-menu { margin: 0 0 0 auto !important; }

/* pin message actions to the left edge of the reading header */
.jihad-message-header { position: relative; }
.jihad-message-header #toolbar-menu {
  position: absolute !important;
  left: 14px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  margin: 0 !important;
  z-index: 5;
}
@media (max-width: 720px) {
  .jihad-message-header #toolbar-menu { left: 6px !important; }
  .jihad-message-title { max-width: 110px; }
}

/* ===== consistent icon system ===== */
#messagelist-header .toolbar a,
#messagelist-header > a.button {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 9px;
}
#messagelist-header .toolbar a:before,
#messagelist-header > a.button:before,
#mailsearchform .searchbutton:before {
  content:  !important;
 font-family: inherit !important;
 font-size: 0 !important;
 width: 19px !important;
 height: 19px !important;
 display: inline-block !important;
 background-position: center !important;
 background-repeat: no-repeat !important;
 background-size: 19px 19px !important;
}
#messagelist-header a.select:before,
#messagelist-header a.selection:before {
 background-image: url( data:image/svg+xml,%3Csvg xmlns=http://www.w3.org/2000/svg viewBox=0 0 24 24 fill=none stroke=%234e6275 stroke-width=1.9 stroke-linecap=round stroke-linejoin=round%3E%3Crect x=3 y=3 width=18 height=18 rx=4/%3E%3Cpath d=m7.5 12 3 3 6-6/%3E%3C/svg%3E);
}
#messagelist-header a.options:before {
 background-image: url(data:image/svg+xml,%3Csvg xmlns=http://www.w3.org/2000/svg viewBox=0 0 24 24 fill=none stroke=%234e6275 stroke-width=1.9 stroke-linecap=round%3E%3Cpath d=M4 7h16M4 12h16M4 17h16/%3E%3Ccircle cx=9 cy=7 r=2 fill=%23fff/%3E%3Ccircle cx=15 cy=12 r=2 fill=%23fff/%3E%3Ccircle cx=8 cy=17 r=2 fill=%23fff/%3E%3C/svg%3E);
}
#messagelist-header a.refresh:before {
 background-image: url(data:image/svg+xml,%3Csvg xmlns=http://www.w3.org/2000/svg viewBox=0 0 24 24 fill=none stroke=%234e6275 stroke-width=1.9 stroke-linecap=round stroke-linejoin=round%3E%3Cpath d=M20 11a8 8 0 1 0-2.3 6.7/%3E%3Cpath d=M20 4v7h-7/%3E%3C/svg%3E);
}
#messagelist-header a.toolbar-menu-button:before {
 background-image: url(data:image/svg+xml,%3Csvg xmlns=http://www.w3.org/2000/svg viewBox=0 0 24 24 fill=%234e6275%3E%3Ccircle cx=5 cy=12 r=1.8/%3E%3Ccircle cx=12 cy=12 r=1.8/%3E%3Ccircle cx=19 cy=12 r=1.8/%3E%3C/svg%3E);
}
#messagelist-header a.threads:before {
 background-image: url(data:image/svg+xml,%3Csvg xmlns=http://www.w3.org/2000/svg viewBox=0 0 24 24 fill=none stroke=%234e6275 stroke-width=1.9 stroke-linecap=round%3E%3Cpath d=M4 6h16M7 12h13M10 18h10/%3E%3C/svg%3E);
}
#mailsearchform .searchbutton:before {
 background-image: url(data:image/svg+xml,%3Csvg xmlns=http://www.w3.org/2000/svg viewBox=0 0 24 24 fill=none stroke=%237b8a9c stroke-width=1.9 stroke-linecap=round%3E%3Ccircle cx=11 cy=11 r=7/%3E%3Cpath d=m20 20-4-4/%3E%3C/svg%3E);
}

#toolbar-menu a.jihad-action {
 width: 36px !important;
 height: 36px !important;
 min-width: 36px !important;
 padding: 0 !important;
}
#toolbar-menu a.jihad-action:before {
 width: 19px !important;
 height: 19px !important;
 background-size: 19px 19px !important;
}
#toolbar-menu a.jihad-action.disabled { opacity: .62 !important; }
#toolbar-menu .jihad-action-group { gap: 2px; padding: 3px; }

#mailboxlist li.sent > a:before {
 background-image: url(data:image/svg+xml,%3Csvg xmlns=http://www.w3.org/2000/svg viewBox=0 0 24 24 fill=none stroke=%230f8b8d stroke-width=1.8 stroke-linecap=round stroke-linejoin=round%3E%3Cpath d=m22 2-7 20-4-9-9-4Z/%3E%3Cpath d=M22 2 11 13/%3E%3C/svg%3E);
}
#mailboxlist li.drafts > a:before {
 background-image: url(data:image/svg+xml,%3Csvg xmlns=http://www.w3.org/2000/svg viewBox=0 0 24 24 fill=none stroke=%237b8a9c stroke-width=1.8 stroke-linecap=round stroke-linejoin=round%3E%3Cpath d=M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z/%3E%3Cpath d=M14 2v6h6/%3E%3C/svg%3E);
}
#mailboxlist li.junk > a:before {
 background-image: url(data:image/svg+xml,%3Csvg xmlns=http://www.w3.org/2000/svg viewBox=0 0 24 24 fill=none stroke=%23b4773f stroke-width=1.8 stroke-linecap=round stroke-linejoin=round%3E%3Cpath d=M12 3 2.5 20h19L12 3Z/%3E%3Cpath d=M12 9v4M12 17h.01/%3E%3C/svg%3E);
}

/* give the mailbox title room; hide unused thread button */
.jihad-list-heading { flex: 1 1 auto !important; min-width: 0; }
#messagelist-header a.threads { display: none !important; }
#messagelist-header .jihad-list-actions { flex: 0 0 auto !important; }
#messagelist-header .header-title { font-size: 14px; }

/* title width + slightly larger message actions */
.jihad-list-heading { flex: 0 0 160px !important; }
.jihad-list-heading .header-title { width: 160px; }
#toolbar-menu a.jihad-action { width: 38px !important; height: 38px !important; min-width: 38px !important; }
#toolbar-menu a.jihad-action:before { width: 20px !important; height: 20px !important; background-size: 20px 20px !important; }
#toolbar-menu .jihad-action-group { padding: 3px !important; }

/* hide mobile-only / duplicate header buttons on desktop */
#messagelist-header > a.task-menu-button,
#messagelist-header > a.back-sidebar-button,
#messagelist-header > a.selection { display: none !important; }

/* login input groups: icon beside field, not above it */
#login-form td.input.input-group {
  display: flex !important;
  align-items: stretch !important;
  width: 100% !important;
  padding: 0 0 16px !important;
}
#login-form .input-group-prepend { display: flex !important; align-items: center !important; }
#login-form .input-group-text {
  width: 44px !important;
  height: 44px !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid #d8e2ec !important;
  border-left: 0 !important;
  border-radius: 0 10px 10px 0 !important;
  background: #f5f8fb !important;
  color: #5b6b7c !important;
  font-size: 15px !important;
}
#login-form .input-group > .form-control,
#login-form .input-group > input {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  height: 44px !important;
  border-radius: 10px 0 0 10px !important;
}
#login-form .input-group-prepend { margin: 0 !important; }

/* popup menu item direction */
.popupmenu li[role= menuitem] > a,
.popupmenu .menu a[role=button] {
  direction: rtl !important;
  text-align: right !important;
  padding: 8px 12px !important;
  border-radius: 8px !important;
}

/* add-folder button in sidebar */
.jihad-add-folder {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #e8f6f4;
  color: #0b6f71 !important;
}
.jihad-add-folder:hover { background: #d8f0ed; }
.jihad-add-folder svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
#layout-sidebar .sidebar-menu.jihad-icon-btn {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px;
  display: grid !important;
  place-items: center !important;
  border-radius: 9px;
  color: #5b6b7c !important;
}
#layout-sidebar .sidebar-menu.jihad-icon-btn:hover { background: #f5f9fc; }

/* keep login icon and input on one row */
#login-form td.input.input-group { flex-wrap: nowrap !important; }
#login-form .input-group > .form-control,
#login-form .input-group > input {
  width: auto !important;
  flex: 1 1 0 !important;
  min-width: 0 !important;
}

/* deterministic mailbox-list header layout */
#messagelist-header { position: relative !important; }
.jihad-list-heading {
  position: absolute !important;
  right: 14px !important;
  left: 178px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  flex: none !important;
  width: auto !important;
}
.jihad-list-heading .header-title { width: auto !important; }
.jihad-list-actions {
  position: absolute !important;
  left: 12px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  margin: 0 !important;
  width: auto !important;
  flex: none !important;
}
@media (max-width: 720px) {
  .jihad-list-heading { left: 150px !important; }
  .jihad-list-actions { left: 6px !important; }
}

/* folders page: explicit create-folder button */
.jihad-new-folder {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px;
  margin-left: auto;
  border-radius: 9px;
  background: #e8f6f4;
  color: #0b6f71 !important;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.jihad-new-folder:hover { background: #d8f0ed; }
.jihad-new-folder svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
/* settings folder toolbar buttons need their labels back */
body.task-settings #toolbar-menu { position: static !important; margin: 0 0 0 auto !important; }
body.task-settings #toolbar-menu .inner { display: inline !important; font-size: 12px !important; }
body.task-settings #toolbar-menu li > a {
  display: flex !important;
  align-items: center !important;
  gap: 5px;
  width: auto !important;
  min-width: 0 !important;
  height: 34px !important;
  padding: 0 10px !important;
  color: #4e6275 !important;
}
body.task-settings #toolbar-menu a.create { color: #0b6f71 !important; font-weight: 600; }
body.task-settings #toolbar-menu a.create:before {
  content: ;
 width: 15px;
 height: 15px;
 display: inline-block;
 background: url( data:image/svg+xml,%3Csvg xmlns=http://www.w3.org/2000/svg viewBox=0 0 24 24 fill=none stroke=%230b6f71 stroke-width=2.2 stroke-linecap=round%3E%3Cpath d=M12 5v14M5 12h14/%3E%3C/svg%3E) center / contain no-repeat;
}

body.task-settings #toolbar-menu a.create {
  background: #e8f6f4 !important;
  color: #0b6f71 !important;
  font-weight: 700 !important;
  border-radius: 9px !important;
  padding: 0 12px !important;
}

/* make the exact Roundcube create-folder anchor impossible to miss */
#rcmbtn112 {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-width: 86px !important;
  height: 34px !important;
  padding: 0 13px !important;
  background: #0f8b8d !important;
  color: #fff !important;
  border-radius: 9px !important;
  opacity: 1 !important;
  visibility: visible !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}
#rcmbtn112 .inner { display: inline !important; color: #fff !important; }
#rcmbtn112:before {
  content:  !important;
 width: 15px !important;
 height: 15px !important;
 display: inline-block !important;
 background: url( data:image/svg+xml,%3Csvg xmlns=http://www.w3.org/2000/svg viewBox=0 0 24 24 fill=none stroke=%23ffffff stroke-width=2.2 stroke-linecap=round%3E%3Cpath d=M12 5v14M5 12h14/%3E%3C/svg%3E) center / contain no-repeat !important;
}
#rcmbtn112:hover { background: #0b6f71 !important; color: #fff !important; }
body.task-settings #toolbar-menu #rcmbtn112 {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-width: 92px !important;
  height: 34px !important;
  padding: 0 13px !important;
  background: #0f8b8d !important;
  color: #ffffff !important;
  border-radius: 9px !important;
  opacity: 1 !important;
  visibility: visible !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}
body.task-settings #toolbar-menu #rcmbtn112 .inner {
  display: inline !important;
  color: #ffffff !important;
}
body.task-settings #toolbar-menu #rcmbtn112:before {
  content: "" !important;
  width: 15px !important;
  height: 15px !important;
  display: inline-block !important;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / contain no-repeat !important;
}
body.task-settings #toolbar-menu #rcmbtn112:hover {
  background: #0b6f71 !important;
  color: #ffffff !important;
}

/* compose: proper card padding and no right-edge overflow */
#compose-content > form.formcontent {
  padding: 18px 22px 24px !important;
  box-sizing: border-box !important;
  width: 100% !important;
}
#compose-headers,
#composebodycontainer,
#compose-attachments,
#composestatusbar {
  width: 100% !important;
  max-width: 100% !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
  box-sizing: border-box !important;
  position: static !important;
  right: auto !important;
  left: auto !important;
}
#compose-headers .form-group.row {
  margin-right: 0 !important;
  margin-left: 0 !important;
}
#compose-headers .form-group.row > * { min-width: 0 !important; }
#compose-headers .col-form-label {
  flex: 0 0 62px !important;
  padding-left: 10px !important;
  color: #5b6b7c !important;
  font-size: 12px !important;
}
#composebodycontainer {
  margin-top: 12px !important;
  border: 1px solid #e6edf4 !important;
  border-radius: 13px !important;
  overflow: hidden !important;
  background: #fff !important;
}
#composebodycontainer .editor-toolbar {
  background: #f5f8fb !important;
  border-bottom: 1px solid #e6edf4 !important;
  padding: 6px 8px !important;
}
#composebodycontainer iframe { width: 100% !important; }
#compose-content .formbuttons { padding: 14px 0 0 !important; }
/* ===== address book toolbar icons ===== */
body.task-addressbook #toolbar-menu {
  position: static !important;
  margin: 0 auto 0 0 !important;
  background: transparent !important;
  display: flex !important;
  width: auto !important;
  height: auto !important;
}
body.task-addressbook #toolbar-menu li > a {
  display: grid !important;
  place-items: center !important;
  width: 38px !important;
  height: 34px !important;
  min-width: 38px !important;
  padding: 0 !important;
  border-radius: 8px !important;
  color: #4e6275 !important;
}
body.task-addressbook #toolbar-menu li > a:hover { background: #f2f7fb !important; }
body.task-addressbook #toolbar-menu .inner { display: none !important; }
body.task-addressbook #toolbar-menu li > a:before {
  content: "" !important;
  width: 18px !important;
  height: 18px !important;
  display: inline-block !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: 18px 18px !important;
}
body.task-addressbook #toolbar-menu a.create:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b6f71' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
}
body.task-addressbook #toolbar-menu a.print:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234e6275' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9V3h12v6M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2'/%3E%3Crect x='6' y='14' width='12' height='8'/%3E%3C/svg%3E");
}
body.task-addressbook #toolbar-menu a.delete:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b46b6b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M8 6V4h8v2M19 6l-1 15H6L5 6M10 11v6M14 11v6'/%3E%3C/svg%3E");
}
body.task-addressbook #toolbar-menu a.search:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234e6275' stroke-width='1.9' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E");
}
body.task-addressbook #toolbar-menu a.import:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234e6275' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16V3M7 8l5-5 5 5M4 16v4a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-4'/%3E%3C/svg%3E");
}
body.task-addressbook #toolbar-menu a.export:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234e6275' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v13M7 11l5 5 5-5M4 16v4a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-4'/%3E%3C/svg%3E");
}
body.task-addressbook #toolbar-menu a.dropdown:before {
  content: "▾" !important;
  width: auto !important;
  height: auto !important;
  background: none !important;
  color: #9aabba !important;
}

/* address-book header title */
body.task-addressbook #layout-list > .header .header-title {
  color: #0b2340 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

/* keep disabled actions readable */
#toolbar-menu a.jihad-action.disabled { opacity: .78 !important; }
#messagelist-header a.disabled { opacity: .72 !important; }
#mailboxlist li > a:before { opacity: 1 !important; }
/* address-book list header select button */
body.task-addressbook #layout-list > .header { position: relative !important; }
body.task-addressbook #toolbar-list-menu {
  position: absolute !important;
  left: 14px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  display: flex !important;
  align-items: center !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}
body.task-addressbook #toolbar-list-menu li > a {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  background: transparent !important;
  color: #4e6275 !important;
  border-radius: 8px !important;
}
body.task-addressbook #toolbar-list-menu .inner { display: none !important; }
body.task-addressbook #toolbar-list-menu a.select:before {
  content: "" !important;
  width: 18px !important;
  height: 18px !important;
  display: inline-block !important;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234e6275' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='4'/%3E%3Cpath d='m7.5 12 3 3 6-6'/%3E%3C/svg%3E") center / contain no-repeat !important;
}
body.task-addressbook #layout-list > .header .header-title {
  display: block !important;
  visibility: visible !important;
  color: #0b2340 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  margin-right: 14px !important;
}

/* classAct removes .jihad-action from reply/delete buttons; size icons by action class */
#toolbar-menu a.reply,
#toolbar-menu a.reply-all,
#toolbar-menu a.forward,
#toolbar-menu a.delete,
#toolbar-menu a.markmessage,
#toolbar-menu a.more,
#toolbar-menu a.print,
#toolbar-menu a.prev,
#toolbar-menu a.next {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
}
#toolbar-menu a.reply:before,
#toolbar-menu a.reply-all:before,
#toolbar-menu a.forward:before,
#toolbar-menu a.delete:before,
#toolbar-menu a.markmessage:before,
#toolbar-menu a.more:before,
#toolbar-menu a.print:before,
#toolbar-menu a.prev:before,
#toolbar-menu a.next:before {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  display: inline-block !important;
  background-size: 20px 20px !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}
