/* ==========================================================================
   Outlook 2010 (Silver colour scheme): QAT, ribbon, panes, message list,
   reading pane, To-Do Bar, status bar, Backstage and message windows.
   ========================================================================== */

:root {
  --o-frame: #e7eaee;
  --o-border: #b6bac0;
  --o-border-soft: #d5dae1;
  --o-hover-top: #fff6d4;
  --o-hover-bot: #fde59a;
  --o-hover-border: #e1c56b;
  --o-press-top: #fde19a;
  --o-press-bot: #fbc95c;
  --o-press-border: #c2a24a;
  --o-sel: #cde3fb;
  --o-sel-border: #84acdd;
  --o-blue-text: #1e395b;
  --o-label: #5c6370;
  --mail-font: Calibri, Carlito, "Segoe UI", sans-serif;
}

/* ---------- QAT inside the glass title bar ---------- */

.qat { display: flex; align-items: center; gap: 1px; padding-left: 4px; height: 100%; flex: none; }
.app-icon { width: 16px; height: 16px; margin: 0 5px 0 2px; }
.qat-btn { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 2px; }
.qat-btn:hover { border-color: var(--o-hover-border); background: linear-gradient(var(--o-hover-top), var(--o-hover-bot)); }
.qat-btn:active { border-color: var(--o-press-border); background: linear-gradient(var(--o-press-top), var(--o-press-bot)); }
.qat-btn[disabled] { opacity: 0.45; pointer-events: none; }
.qat-more { width: 14px; }
.qat-arrow { width: 7px; height: 6px; border-top: 1px solid #222; position: relative; }
.qat-arrow::after { content: ""; position: absolute; left: 0; top: 2px; border: 3.5px solid transparent; border-top: 3.5px solid #222; border-bottom: 0; }
.window.maximised .qat-btn { height: 20px; }

/* ---------- Ribbon tabs ---------- */

.app-window .client { background: var(--o-frame); }

.ribbon-tabs {
  display: flex;
  align-items: flex-end;
  height: 25px;
  padding-left: 2px;
  background: linear-gradient(#f3f5f8, #e7eaee);
  flex: none;
}
.file-tab {
  height: 23px;
  padding: 0 15px;
  margin-right: 3px;
  color: #fff;
  border: 1px solid #1d4f97;
  border-bottom: 0;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(#3f81d2 0%, #2a64b8 50%, #1f56a8 51%, #2d6fc4 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.file-tab:hover { background: linear-gradient(#5b97e2 0%, #3c78cc 50%, #2a66bb 51%, #3b80d6 100%); }
.rtab {
  height: 23px;
  padding: 0 11px;
  margin-right: 1px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 2px 2px 0 0;
  color: #333;
}
.rtab:hover { border-color: #d3c79e; background: linear-gradient(rgba(255, 252, 235, 0.9), rgba(253, 241, 197, 0.6)); }
.rtab.active { position: relative; top: 1px; height: 24px; background: linear-gradient(#ffffff, #fbfcfd); border-color: var(--o-border); color: #1e1e1e; z-index: 1; }
.tabs-spacer { flex: 1; }
.ribbon-mini, .ribbon-help { width: 22px; height: 20px; margin: 0 1px 2px; display: flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 2px; }
.ribbon-help { font-weight: bold; color: #fff; width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #7fb2ef, #1f5fbf); margin: 0 6px 4px 4px; font-size: 11px; }
.ribbon-mini:hover { border-color: var(--o-hover-border); background: linear-gradient(var(--o-hover-top), var(--o-hover-bot)); }

/* ---------- Ribbon body ---------- */

.ribbon {
  flex: none;
  height: 93px;
  display: flex;
  align-items: stretch;
  padding: 2px 2px 3px;
  border-top: 1px solid var(--o-border);
  border-bottom: 1px solid var(--o-border);
  background: linear-gradient(#ffffff 0%, #fbfcfd 40%, #edf0f4 100%);
  overflow: hidden;
}
.ribbon.collapsed { display: none; }

.rgroup {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0 3px;
  flex: none;
}
.rgroup + .rgroup::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 1px;
  background: linear-gradient(rgba(197, 205, 214, 0.1), #c5cdd6 25%, #c5cdd6 75%, rgba(197, 205, 214, 0.1));
}
.rgroup-body { flex: none; height: 71px; display: flex; align-items: stretch; gap: 1px; padding-top: 1px; overflow: hidden; }
.rgroup-label { height: 16px; display: flex; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--o-label); white-space: nowrap; position: relative; }
.rgroup-label .launcher { position: absolute; right: -1px; bottom: 2px; width: 12px; height: 12px; border: 1px solid transparent; }
.rgroup-label .launcher::after { content: ""; position: absolute; right: 2px; bottom: 2px; width: 5px; height: 5px; border-right: 1px solid #6b7480; border-bottom: 1px solid #6b7480; }
.rgroup-label .launcher:hover { border-color: var(--o-hover-border); background: linear-gradient(var(--o-hover-top), var(--o-hover-bot)); }

.rbtn {
  border: 1px solid transparent;
  border-radius: 2px;
  color: #1e1e1e;
  white-space: nowrap;
}
.rbtn:hover { border-color: var(--o-hover-border); background: linear-gradient(var(--o-hover-top), var(--o-hover-bot)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6); }
.rbtn:active, .rbtn.pressed { border-color: var(--o-press-border); background: linear-gradient(var(--o-press-top), var(--o-press-bot)); box-shadow: inset 0 1px 2px rgba(130, 90, 0, 0.25); }
.rbtn[disabled] { opacity: 0.45; pointer-events: none; }
.rbtn.disabled-look { color: #8d8d8d; }
.rbtn.disabled-look svg { opacity: 0.45; filter: grayscale(1); }

.rbtn.large {
  min-width: 42px;
  max-width: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2px 3px 1px;
  line-height: 1.15;
}
.rbtn.large .ico { height: 36px; display: flex; align-items: center; justify-content: center; }
.rbtn.large .lbl { white-space: pre-line; text-align: center; font-size: 12px; }
.rbtn.large .dd { margin-top: 1px; height: 6px; display: flex; justify-content: center; }

.rstack { display: flex; flex-direction: column; justify-content: flex-start; gap: 1px; }
.rbtn.small { height: 22px; display: flex; align-items: center; gap: 4px; padding: 0 4px 0 3px; }
.rbtn.small .dd { margin-left: 1px; }
.rbtn.small .ico { width: 16px; height: 16px; flex: none; }
.rbtn.small .ico svg { width: 16px; height: 16px; }

.rsearch { height: 22px; display: flex; align-items: center; }
.rsearch input { width: 132px; height: 20px; border: 1px solid #abadb3; padding: 0 4px; font-size: 12px; background: #fff; color: #6d6d6d; }
.rsearch .ddbox { width: 14px; height: 20px; border: 1px solid #abadb3; border-left: 0; display: flex; align-items: center; justify-content: center; background: #fff; }

/* Quick Steps gallery */
.qsgallery { display: flex; border: 1px solid #c5cbd3; background: #fff; margin: 2px 0 1px; height: 66px; }
.qsgrid { display: grid; grid-template-columns: 112px 104px; grid-auto-rows: 21px; padding: 1px; }
.qsgrid .rbtn.small { height: 21px; font-size: 12px; overflow: hidden; }
.qsscroll { width: 14px; border-left: 1px solid #d5dae1; display: flex; flex-direction: column; background: linear-gradient(90deg, #f5f7f9, #e8ecf0); }
.qsscroll span { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 7px; color: #555; border-bottom: 1px solid #d5dae1; }
.qsscroll span:last-child { border-bottom: 0; }

/* Office 2010 menus */
.omenu {
  position: absolute;
  min-width: 170px;
  padding: 2px;
  background: linear-gradient(90deg, #f1f3f6 0 26px, #fff 26px);
  border: 1px solid #a7abb0;
  box-shadow: 2px 3px 6px rgba(0, 0, 0, 0.25);
  z-index: 1200;
}
.omenu .mi { display: flex; align-items: center; gap: 8px; height: 24px; padding: 0 18px 0 4px; border: 1px solid transparent; border-radius: 2px; width: 100%; text-align: left; }
.omenu .mi:hover { border-color: var(--o-hover-border); background: linear-gradient(var(--o-hover-top), var(--o-hover-bot)); }
.omenu .mi .chk { width: 16px; text-align: center; font-size: 11px; }
.omenu .mi.checked .chk { border: 1px solid #e3b74a; background: #fde19a; height: 18px; line-height: 16px; border-radius: 2px; }

/* ---------- Main area layout ---------- */

.main {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 222px 352px 1fr 198px;
  grid-template-rows: 1fr;
  grid-template-areas: "nav list read todo";
  gap: 0 5px;
  padding: 4px 4px 3px;
  background: var(--o-frame);
}
.main.nav-min { grid-template-columns: 30px 352px 1fr 198px; }
.main.todo-off { grid-template-columns: 222px 352px 1fr; grid-template-areas: "nav list read"; }
.main.nav-min.todo-off { grid-template-columns: 30px 352px 1fr; }
.main.reading-bottom { grid-template-columns: 222px 1fr 198px; grid-template-rows: minmax(140px, 38%) 1fr; grid-template-areas: "nav list todo" "nav read todo"; gap: 5px; }
.main.reading-bottom.nav-min { grid-template-columns: 30px 1fr 198px; }
.main.reading-bottom.todo-off { grid-template-columns: 222px 1fr; grid-template-areas: "nav list" "nav read"; }
.main.reading-bottom.nav-min.todo-off { grid-template-columns: 30px 1fr; }
.main.reading-off { grid-template-columns: 222px 1fr 198px; grid-template-areas: "nav list todo"; }
.main.reading-off.nav-min { grid-template-columns: 30px 1fr 198px; }
.main.reading-off.todo-off { grid-template-columns: 222px 1fr; grid-template-areas: "nav list"; }
.main.reading-off.nav-min.todo-off { grid-template-columns: 30px 1fr; }
.main.reading-off .readingpane { display: none; }
.main.todo-off .todobar { display: none; }

.navpane, .nav-minimised { grid-area: nav; }
.msglist { grid-area: list; }
.readingpane { grid-area: read; }
.todobar { grid-area: todo; }

.navpane, .msglist, .readingpane, .todobar, .nav-minimised {
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--o-border);
  background: #fff;
}

/* ---------- Navigation pane ---------- */

.navpane { display: flex; flex-direction: column; }
.main.nav-min .navpane { display: none; }
.nav-minimised { display: none; flex-direction: column; align-items: center; padding-top: 4px; background: linear-gradient(90deg, #f6f8fa, #e9edf2); gap: 8px; color: #3d4c63; }
.main.nav-min .nav-minimised { display: flex; }
.nav-minimised:hover { background: linear-gradient(90deg, #fffbe9, #fdeebd); }
.nav-minimised .vlabel { writing-mode: vertical-rl; transform: rotate(180deg); font-weight: bold; font-size: 12px; color: #4b5a70; }

.nav-collapse-row { height: 22px; flex: none; display: flex; justify-content: flex-end; align-items: center; padding-right: 3px; background: linear-gradient(#fbfcfd, #eef1f5); border-bottom: 1px solid var(--o-border-soft); }
.nav-collapse { width: 18px; height: 16px; border: 1px solid transparent; border-radius: 2px; color: #444; font-size: 15px; line-height: 12px; }
.nav-collapse:hover { border-color: var(--o-hover-border); background: linear-gradient(var(--o-hover-top), var(--o-hover-bot)); }

.nav-tree { flex: 1; overflow: auto; padding: 2px 0 6px; }
.nav-head { display: flex; align-items: center; gap: 4px; padding: 3px 6px 2px 4px; font-weight: bold; color: #222; font-size: 12px; }
.nav-head .tri { width: 10px; font-size: 8px; color: #595959; }
.nav-head + .nav-folders { margin-bottom: 6px; }
.nav-folder {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 21px;
  margin: 0 3px 0 0;
  padding-left: 24px;
  border: 1px solid transparent;
  border-radius: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: calc(100% - 3px);
  text-align: left;
}
.nav-folder.sub { padding-left: 36px; }
.nav-folder .ico { flex: none; width: 16px; height: 16px; }
.nav-folder:hover { background: linear-gradient(#f5f9fe, #e4eefc); border-color: #c6dbf5; }
.nav-folder.active { background: linear-gradient(#e2edfc, #c4dafa); border-color: var(--o-sel-border); }
.nav-folder.unread .name { font-weight: bold; }
.nav-folder .count { color: #1d5cb6; font-weight: bold; }
.nav-folder .count.grey { color: #2a7d1e; font-weight: normal; }
.nav-folder .count.bracket { color: #1d5cb6; font-weight: normal; }

.nav-buttons { flex: none; border-top: 1px solid var(--o-border); background: linear-gradient(#f8f9fb, #eaedf1); }
.nav-big {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 31px;
  padding: 0 8px;
  font-weight: bold;
  color: #2b2b2b;
  border-bottom: 1px solid #d0d6de;
  background: linear-gradient(#fdfdfe 0%, #f0f3f6 50%, #e6eaef 51%, #eff2f5 100%);
  text-align: left;
}
.nav-big:hover { background: linear-gradient(#fffbea 0%, #fff1c2 50%, #fde39a 51%, #fff0bd 100%); }
.nav-big.active { background: linear-gradient(#fff3c9 0%, #fde49f 50%, #fbd66c 51%, #fde7a2 100%); }
.nav-big .ico svg { width: 22px; height: 22px; }
.nav-small { display: flex; justify-content: flex-start; align-items: center; height: 30px; padding: 0 6px; gap: 2px; background: linear-gradient(#f8f9fb, #e5e9ee); }
.nav-small button { width: 30px; height: 24px; display: flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 2px; }
.nav-small button:hover { border-color: var(--o-hover-border); background: linear-gradient(var(--o-hover-top), var(--o-hover-bot)); }
.nav-small .nav-config { margin-left: auto; width: 16px; }

/* ---------- Message list ---------- */

.msglist { display: flex; flex-direction: column; }
.search-row { flex: none; padding: 4px 5px; background: linear-gradient(#fbfcfd, #eef1f5); border-bottom: 1px solid var(--o-border-soft); }
.search-box { display: flex; align-items: center; height: 22px; border: 1px solid #abb5c3; background: #fff; }
.search-box input { flex: 1; border: 0; outline: 0; height: 20px; padding: 0 5px; min-width: 0; font-size: 12px; color: #333; }
.search-box input::placeholder { color: #8a8a8a; font-style: italic; }
.search-ico { width: 22px; display: flex; justify-content: center; }

.arrange-row { flex: none; display: flex; justify-content: space-between; align-items: center; height: 22px; padding: 0 8px; border-bottom: 1px solid var(--o-border-soft); color: #333; font-size: 12px; }
.arrange-row .ddarrow { display: inline-flex; vertical-align: middle; margin-left: 2px; }
.arrange-row .newest { color: #333; }
.arrange-row .sortarrow { color: #555; }

.msg-items { flex: 1; overflow-y: auto; overflow-x: hidden; outline: none; }
.msg-group { display: flex; align-items: center; gap: 6px; height: 22px; padding: 0 6px; font-weight: bold; color: var(--o-blue-text); border-bottom: 1px solid #c7d8ef; background: linear-gradient(#fff, #f5f8fc); }
.msg-group .tri { font-size: 8px; color: #555; width: 10px; }

.msg {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr auto 18px;
  grid-template-rows: 18px 18px;
  align-items: center;
  height: 42px;
  padding: 2px 4px 2px 2px;
  border: 1px solid transparent;
  border-bottom-color: #e6e9ee;
  cursor: default;
}
.msg .icon { grid-row: span 2; align-self: start; padding-top: 2px; display: flex; justify-content: center; }
.msg .from { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; color: #222; }
.msg .date { font-size: 11px; color: #444; padding-left: 8px; white-space: nowrap; }
.msg .flag { grid-row: span 2; display: flex; justify-content: center; opacity: 0.5; }
.msg .subject { grid-column: 2 / 4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #444; font-size: 12px; }
.msg.unread .from, .msg.unread .subject { font-weight: bold; color: #000; }
.msg.unread .date { color: #000; font-weight: bold; }
.msg:hover { background: linear-gradient(#f5faff, #e5f0fd); border-color: #c5dbf7; }
.msg.selected { background: linear-gradient(#dcebfc, #c1dbfc); border-color: var(--o-sel-border); }
.msg-items:not(:focus-within) .msg.selected { background: linear-gradient(#eef2f7, #dfe5ec); border-color: #c4ccd6; }
.msg.arrived { animation: arrive 1.2s ease-out; }
@keyframes arrive { from { background: #fff4c2; } }

.list-empty { padding: 18px 10px; text-align: center; color: #666; }

/* ---------- Reading pane ---------- */

.readingpane { display: flex; flex-direction: column; overflow: hidden; }
.rp-empty { flex: 1; display: flex; align-items: center; justify-content: center; color: #777; font-size: 12px; text-align: center; padding: 20px; }
.rp-header { flex: none; display: grid; grid-template-columns: 1fr auto; gap: 0 12px; padding: 10px 12px 9px 14px; border-bottom: 1px solid #dde3ea; background: #fff; }
.rp-subject { grid-column: 1 / -1; font-size: 15px; font-weight: bold; color: #1d1d1d; margin-bottom: 7px; line-height: 1.2; word-break: break-word; }
.rp-meta { min-width: 0; }
.rp-from { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #1d1d1d; margin-bottom: 3px; }
.rp-from .presence { width: 5px; height: 15px; border-radius: 1px; background: linear-gradient(#8fe36d, #3ca31c); box-shadow: 0 0 0 1px rgba(40, 110, 20, 0.5); flex: none; }
.rp-from .presence.away { background: linear-gradient(#ffe58a, #e9b30c); box-shadow: 0 0 0 1px rgba(150, 110, 0, 0.5); }
.rp-from .presence.none { background: linear-gradient(#e8e8e8, #b9b9b9); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); }
.rp-from .addr { color: #555; font-size: 12px; }
.rp-line { color: #444; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-line b { font-weight: normal; color: #666; display: inline-block; min-width: 34px; }
.rp-photo { width: 52px; height: 52px; border: 1px solid #c7cdd6; background: linear-gradient(#f6f8fb, #e1e6ed); display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.rp-photo svg { width: 46px; height: 46px; }
.rp-body { flex: 1; min-height: 0; position: relative; background: #fff; }
.rp-body iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.people-pane { flex: none; height: 26px; display: flex; align-items: center; gap: 6px; padding: 0 8px; border-top: 1px solid var(--o-border-soft); background: linear-gradient(#fbfcfd, #eceff3); color: #444; font-size: 12px; }
.people-pane .mini-photo { width: 18px; height: 18px; border: 1px solid #c7cdd6; background: #eef1f5; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; }
.people-pane .mini-photo svg { width: 16px; height: 16px; }
.people-pane .pp-arrow { margin-left: auto; font-size: 9px; color: #666; }

/* ---------- To-Do Bar ---------- */

.todobar { display: flex; flex-direction: column; overflow: hidden; }
.todo-header { height: 22px; flex: none; display: flex; align-items: center; justify-content: flex-start; padding: 0 6px; color: #555; background: linear-gradient(#fbfcfd, #eef1f5); border-bottom: 1px solid var(--o-border-soft); font-size: 13px; }
.datenav { padding: 6px 6px 4px; border-bottom: 1px solid var(--o-border-soft); }
.dn-title { display: flex; justify-content: space-between; align-items: center; font-weight: bold; color: #2b2b2b; margin-bottom: 3px; padding: 0 2px; }
.dn-title span { color: #555; font-weight: normal; font-size: 10px; }
.dn-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 11px; row-gap: 0; }
.dn-grid .dow { color: #555; border-bottom: 1px solid #c9d2dd; margin-bottom: 1px; padding-bottom: 1px; }
.dn-grid .d { height: 17px; line-height: 15px; border: 1px solid transparent; color: #222; }
.dn-grid .d.other { color: #a0a0a0; }
.dn-grid .d.today { border-color: #e48f1b; font-weight: bold; background: #fff5e0; }
.todo-appts { padding: 12px 8px; color: #6d6d6d; text-align: center; border-bottom: 1px solid var(--o-border-soft); }
.todo-tasks-head { display: flex; gap: 4px; align-items: center; padding: 4px 6px; border-bottom: 1px solid var(--o-border-soft); background: linear-gradient(#fbfcfd, #eef1f5); font-size: 11.5px; white-space: nowrap; overflow: hidden; }
.todo-tasks-head b { font-weight: bold; }
.todo-today { margin-left: auto; color: #555; }
.todo-newtask { padding: 4px 6px; border-bottom: 1px solid var(--o-border-soft); }
.todo-newtask input { width: 100%; height: 20px; border: 1px solid #c5ccd6; padding: 0 4px; font-size: 12px; font-style: italic; color: #333; }
.todo-empty { padding: 14px 8px; color: #6d6d6d; text-align: center; font-size: 11.5px; }

/* ---------- Status bar ---------- */

.statusbar {
  flex: none;
  height: 23px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 4px 0 8px;
  border-top: 1px solid var(--o-border);
  background: linear-gradient(#f5f7f9, #e2e7ec);
  color: #3a3a3a;
  font-size: 11.5px;
  white-space: nowrap;
}
.sb-spacer { flex: 1; }
.sb-progress { display: inline-flex; align-items: center; gap: 6px; }
.sb-progress[hidden] { display: none; }
.mini-progress { width: 90px; height: 10px; border: 1px solid #a5acb5; background: #fff; display: inline-block; overflow: hidden; }
.mini-progress i { display: block; height: 100%; width: 0; background: linear-gradient(#9de282, #3db424); transition: width 0.3s linear; }
.sb-views { display: flex; gap: 2px; }
.sb-views button { width: 22px; height: 17px; border: 1px solid transparent; border-radius: 2px; position: relative; }
.sb-views button::after { content: ""; position: absolute; inset: 3px 5px; border: 1px solid #666; background: linear-gradient(90deg, #fff 45%, #cfdaea 45%); }
.sb-views button + button::after { background: #fff; }
.sb-views button.active { border-color: #c2a24a; background: linear-gradient(#fde19a, #fbc95c); }
.sb-views button:hover { border-color: var(--o-hover-border); }
.sb-zoom { display: flex; align-items: center; gap: 4px; }
.sb-zoom button { width: 16px; height: 16px; line-height: 14px; border-radius: 50%; border: 1px solid transparent; color: #444; font-weight: bold; }
.sb-zoom button:hover { border-color: var(--o-hover-border); background: linear-gradient(var(--o-hover-top), var(--o-hover-bot)); }
.zoom-track { width: 100px; height: 2px; background: #8d96a3; position: relative; }
.zoom-track::before { content: ""; position: absolute; left: 50%; top: -3px; width: 1px; height: 8px; background: #8d96a3; }
.zoom-track i { position: absolute; left: calc(50% - 4px); top: -6px; width: 8px; height: 14px; background: linear-gradient(#fdfdfd, #c8cfd8); border: 1px solid #6a7480; border-radius: 1px; }

/* ---------- Backstage (File tab) ---------- */

.backstage {
  position: absolute;
  inset: 0;
  display: flex;
  background: #fff;
  z-index: 20;
}
.backstage[hidden] { display: none; }
.bs-nav {
  width: 132px;
  flex: none;
  display: flex;
  flex-direction: column;
  padding-bottom: 8px;
  background: linear-gradient(90deg, #2b6ac2, #2155a8);
  color: #fff;
  box-shadow: inset -1px 0 0 #163f80;
}
.bs-file { height: 25px; display: flex; align-items: center; padding-left: 15px; background: linear-gradient(#5591dc, #2a64b8); border-bottom: 1px solid #163f80; }
.bs-item { text-align: left; padding: 7px 14px; color: #fff; border: 1px solid transparent; }
.bs-item:hover { background: linear-gradient(rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.12)); border-color: rgba(255, 255, 255, 0.35); }
.bs-item.on { background: linear-gradient(#fdf2cd, #fbdc85); color: #1e1e1e; border-color: #c9a640; margin-right: -1px; }
.bs-item.big { padding: 10px 14px; }
.bs-sep { height: 1px; margin: 4px 10px; background: rgba(255, 255, 255, 0.35); }
.bs-main { flex: 1; overflow: auto; padding: 18px 26px; color: #333; user-select: text; -webkit-user-select: text; }
.bs-main h1 { font-size: 22px; font-weight: normal; color: #2b5797; margin: 0 0 14px; }
.bs-main h2 { font-size: 15px; font-weight: normal; color: #222; margin: 0 0 4px; }
.bs-main p { margin: 0 0 8px; max-width: 62ch; line-height: 1.45; }
.bs-account { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; margin-bottom: 14px; border: 1px solid #c5cbd3; background: linear-gradient(#fff, #f2f4f7); min-width: 300px; }
.bs-card { display: flex; gap: 16px; padding: 14px 0; border-top: 1px solid #e1e5ea; max-width: 700px; }
.bs-card-btn { width: 86px; height: 86px; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 1px solid #c5cbd3; background: linear-gradient(#fff, #eef1f5); text-align: center; font-size: 12px; line-height: 1.2; padding: 4px; }
.bs-card-btn:hover { border-color: var(--o-hover-border); background: linear-gradient(var(--o-hover-top), var(--o-hover-bot)); }
.bs-quota { width: 260px; height: 14px; border: 1px solid #9aa4b1; background: #fff; margin: 6px 0 4px; }
.bs-quota i { display: block; height: 100%; width: 96%; background: linear-gradient(#ff9b8a, #d23a1e); }
.bs-rule { font-family: Consolas, "Courier New", monospace; font-size: 12px; background: #f6f8fa; border: 1px solid #dde3ea; padding: 8px 10px; margin: 6px 0 4px; white-space: pre-wrap; max-width: 620px; }
.bs-main code { font-family: Consolas, "Courier New", monospace; font-size: 12px; }
.bs-main a { color: #1f5fbf; }

/* ---------- Message (inspector) window ---------- */

.msg-window .client { background: var(--o-frame); }
.msg-window .ribbon { height: 93px; }
.msg-window .mw-header { flex: none; padding: 8px 12px 8px; background: #fff; border-bottom: 1px solid var(--o-border-soft); display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; margin: 4px 4px 0; border: 1px solid var(--o-border); border-bottom: 0; }
.msg-window .mw-row { display: flex; gap: 8px; font-size: 12px; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-window .mw-row b { font-weight: normal; color: #666; min-width: 52px; display: inline-block; }
.msg-window .mw-body { flex: 1; position: relative; margin: 0 4px 4px; border: 1px solid var(--o-border); border-top: 1px solid #dde3ea; background: #fff; }
.msg-window .mw-body iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.msg-window .mw-info { grid-column: 1 / -1; font-size: 11.5px; color: #555; padding: 3px 6px; margin-bottom: 4px; background: #fdf6dc; border: 1px solid #ebd796; }

/* ---------- Phone mode: single pane at full size (see fitScreen in app.js) ---------- */

.rp-back { display: none; }

#screen.phone { touch-action: manipulation; }
#screen.phone .ribbon { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
#screen.phone .ribbon::-webkit-scrollbar { display: none; }
#screen.phone .ribbon-tabs { overflow-x: auto; scrollbar-width: none; }
#screen.phone .ribbon-tabs::-webkit-scrollbar { display: none; }
#screen.phone .rtab, #screen.phone .file-tab { flex: none; }

#screen.phone .main,
#screen.phone .main.reading-bottom,
#screen.phone .main.reading-off {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  grid-template-areas: "pane";
  gap: 0;
  padding: 3px;
}
#screen.phone .navpane,
#screen.phone .nav-minimised,
#screen.phone .todobar { display: none; }
#screen.phone .msglist,
#screen.phone .readingpane { grid-area: pane; display: flex; }
#screen.phone .main:not(.phone-read) .readingpane { display: none; }
#screen.phone .main.phone-read .msglist { display: none; }

#screen.phone .msg { height: 54px; grid-template-rows: 22px 22px; }
#screen.phone .msg .from { font-size: 14px; }
#screen.phone .msg .subject { font-size: 13.5px; }
#screen.phone .msg .date { font-size: 12.5px; }
#screen.phone .msg-group { height: 28px; font-size: 13px; }
#screen.phone .search-row { padding: 5px 6px; }
#screen.phone .search-box { height: 30px; }
#screen.phone .search-box input { height: 28px; font-size: 14px; }
#screen.phone .arrange-row { height: 28px; font-size: 13px; }

#screen.phone .rp-back {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  height: 36px;
  padding: 0 6px;
  border-bottom: 1px solid var(--o-border-soft);
  background: linear-gradient(#fbfcfd, #eef1f5);
}
#screen.phone .rp-back button {
  height: 28px;
  padding: 0 12px 0 8px;
  font-size: 14px;
  border: 1px solid #a9b4c2;
  border-radius: 3px;
  background: linear-gradient(#ffffff, #e6ebf1);
  color: #1e395b;
}
#screen.phone .rp-back button:active { border-color: var(--o-press-border); background: linear-gradient(var(--o-press-top), var(--o-press-bot)); }
#screen.phone .rp-subject { font-size: 17px; }
#screen.phone .rp-from { font-size: 14.5px; }
#screen.phone .rp-line { font-size: 13px; }
#screen.phone .rp-photo { width: 44px; height: 44px; }
#screen.phone .people-pane { display: none; }

#screen.phone .qat-btn { width: 30px; height: 24px; }
#screen.phone .qat-btn svg { width: 18px; height: 18px; }
#screen.phone .titlebar .title { font-size: 11px; text-align: left; padding-left: 4px; }

#screen.phone .statusbar .sb-conn,
#screen.phone .statusbar .sb-views,
#screen.phone .statusbar .sb-zoom { display: none; }
#screen.phone .statusbar { font-size: 12px; height: 26px; }

#screen.phone .bs-nav { width: 104px; }
#screen.phone .bs-main { padding: 14px; }
#screen.phone .bs-card { flex-direction: column; gap: 8px; }
#screen.phone .bs-account { min-width: 0; width: 100%; }
