@import url("../../elastic/styles/styles.min.css");
@import url("https://mail.finora.global/css/finora-tokens.css?v=356ad3f29a91");

/* FINORA adapter: Elastic owns layout/state; canonical mail tokens own appearance.
 * Parent-skin assets, folder indentation and runtime visibility are preserved. */

html { font-size: var(--root-font-size); }

/* ── 전역 ─────────────────────────────────────────────────── */
html body,
html.dark-mode body {
  font-family: var(--f-font);
  font-size: var(--type-body);
  line-height: var(--line-body);
  color: var(--f-ink);
  background: var(--f-ground);
  -webkit-font-smoothing: antialiased;
}
html #layout a, html.dark-mode #layout a { color: inherit; }
html #layout a:focus-visible, html #layout button:focus-visible { outline: var(--focus-width) solid var(--f-accent); outline-offset: var(--focus-inset-offset); }
/* Elastic 파랑 제거 */
html a:not(.btn):not(.button), html.dark-mode a:not(.btn):not(.button) { color: var(--f-accent-ink); }
html.dark-mode a:not(.btn):not(.button) { color: var(--f-accent-ink); }

/* ── 1. 작업 레일 (#layout-menu / #taskmenu) ───────────────── */
html #layout #layout-menu, html.dark-mode #layout #layout-menu {
  background: var(--f-ground);
  border-right: var(--space-0);
  width: var(--wm-rail-width);
}
html #layout #taskmenu a, html.dark-mode #layout #taskmenu a {
  background: var(--color-transparent);
  color: var(--f-ink-3);
  border-bottom: var(--space-0) !important;
  border-radius: var(--space-0);
  position: relative;
  margin: var(--space-1) var(--space-2);
  padding: var(--space-2) var(--space-0) var(--space-2);
  font-size: var(--type-label);
  line-height: var(--line-control);
  min-height: var(--control-height-default);
  font-weight: var(--weight-medium);
  letter-spacing: normal;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}
html #layout #taskmenu a:before, html.dark-mode #layout #taskmenu a:before { font-size: var(--wm-icon-emphasis); margin-bottom: var(--space-1); }
html #layout #taskmenu a:hover, html.dark-mode #layout #taskmenu a:hover { background: var(--f-line-soft); color: var(--f-ink); }
html #layout #taskmenu a.selected, html.dark-mode #layout #taskmenu a.selected {
  background: var(--color-transparent);
  color: var(--f-accent-ink);
}
/* 편지쓰기 — 강조 버튼 */
html #layout #taskmenu a.compose, html.dark-mode #layout #taskmenu a.compose {
  background: var(--f-accent);
  color: var(--f-on-accent);
  border-radius: var(--radius-panel);
  margin: var(--space-3) var(--space-2) var(--space-4);
  padding: var(--space-3) var(--space-0) var(--space-2);
  box-shadow: none;
  font-weight: var(--weight-semibold);
}
html #layout #taskmenu a.compose:hover:not(.disabled), html.dark-mode #layout #taskmenu a.compose:hover:not(.disabled) { background: var(--f-accent-ink); }
html #layout #taskmenu a.logout, html.dark-mode #layout #taskmenu a.logout { color: var(--f-ink-3); }
html #layout #taskmenu a.logout:hover { color: var(--f-danger); }
/* 상단 로고 자리 */
html #layout #layout-menu .popover-header, html.dark-mode #layout #layout-menu .popover-header,
html #layout #layout-menu .special-buttons, html.dark-mode #layout #layout-menu .special-buttons { background: var(--color-transparent) !important; }
html #layout #layout-menu #logo, html.dark-mode #layout #layout-menu #logo { margin: var(--space-4) auto var(--space-1); max-width: var(--wm-rail-logo-width); width: var(--wm-rail-logo-width); height: auto; }

/* ── 2. 폴더 목록 (#layout-sidebar) ───────────────────────── */
html #layout #layout-sidebar, html.dark-mode #layout #layout-sidebar {
  background: var(--f-ground);
  border-right: var(--space-0);
  min-width: var(--wm-sidebar-min);
  max-width: var(--wm-sidebar-max);
}
html #layout>div>.header, html.dark-mode #layout>div>.header {
  background: var(--color-transparent);
  border-bottom: var(--space-0);
  color: var(--f-ink);
  position: sticky; top: var(--header-top); z-index: var(--wm-z-header);
  height: auto; min-height: var(--header-height); line-height: var(--line-control);
  display: flex; align-items: center;
  padding: var(--space-0) var(--space-3);
  font-weight: var(--weight-semibold);
  font-size: var(--type-body);
  letter-spacing: normal;
}
html #layout #layout-sidebar>.header, html.dark-mode #layout #layout-sidebar>.header { justify-content: flex-start; padding-left: var(--space-4); }
html #layout #layout-sidebar .scroller, html.dark-mode #layout #layout-sidebar .scroller { padding: var(--space-0) var(--space-3) var(--space-3); }

html #layout #mailboxlist li, html.dark-mode #layout #mailboxlist li,
html #layout #mailboxlist li ul, html.dark-mode #layout #mailboxlist li ul { border: var(--space-0); }
html #layout #mailboxlist li>a, html.dark-mode #layout #mailboxlist li>a,
html #layout #mailboxlist li>div>a, html.dark-mode #layout #mailboxlist li>div>a {
  color: var(--f-ink-2);
  border-radius: var(--space-0);
  height: auto; min-height: var(--control-height-default); line-height: var(--line-control);
  padding-block: var(--control-padding-block); display: flex; align-items: center;
  padding-left: var(--wm-folder-indent);
  font-size: var(--type-body);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}
html #layout #mailboxlist li>a:before, html.dark-mode #layout #mailboxlist li>a:before { opacity: var(--wm-opacity-icon); font-size: inherit; }
html #layout #mailboxlist li>a:hover, html.dark-mode #layout #mailboxlist li>a:hover { background: var(--f-line-soft); color: var(--f-ink); }
html #layout #mailboxlist li.selected>a, html.dark-mode #layout #mailboxlist li.selected>a,
html #layout #mailboxlist li.selected>div>a, html.dark-mode #layout #mailboxlist li.selected>div>a,
html #layout .listing li.selected, html.dark-mode #layout .listing li.selected,
html #layout .listing li.selected>a, html.dark-mode #layout .listing li.selected>a,
html #layout .listing li.selected>div>a, html.dark-mode #layout .listing li.selected>div>a {
  background: var(--color-transparent);
  color: var(--f-accent-ink);
}
html #layout #mailboxlist li.selected>a:before, html.dark-mode #layout #mailboxlist li.selected>a:before { opacity: var(--count-one); }
/* 하위 폴더 들여쓰기 — Elastic 의 인라인 padding 을 존중하되 시각 노이즈 제거 */
html #layout #mailboxlist ul li>a, html.dark-mode #layout #mailboxlist ul li>a { font-size: var(--type-label); height: auto; min-height: var(--control-height-default); line-height: var(--line-control); }
/* 미읽음 카운트 */
html #layout #mailboxlist span.unreadcount, html.dark-mode #layout #mailboxlist span.unreadcount {
  background: var(--color-transparent); color: var(--f-ink-3);
  font-size: var(--type-meta); line-height: var(--line-caption); font-weight: var(--weight-regular); font-variant-numeric: tabular-nums;
  margin-right: var(--space-3); padding: var(--space-0); min-width: unset; line-height: inherit;
}
html #layout #mailboxlist li.selected span.unreadcount, html.dark-mode #layout #mailboxlist li.selected span.unreadcount { color: var(--f-accent-ink); }
html #layout #mailboxlist li.mailbox.unread>a, html.dark-mode #layout #mailboxlist li.mailbox.unread>a { color: var(--f-ink); font-weight: var(--weight-semibold); }
/* 공용 사서함 묶음 — 'Shared' 가상 폴더를 구역 라벨처럼 */
html #layout #mailboxlist>li.virtual, html.dark-mode #layout #mailboxlist>li.virtual { margin-top: var(--space-4); position: relative; }
html #layout #mailboxlist>li.virtual>a, html.dark-mode #layout #mailboxlist>li.virtual>a {
  color: var(--f-ink-3); font-size: var(--type-meta); letter-spacing: var(--wm-tracking-label); text-transform: uppercase; font-weight: var(--weight-semibold);
  margin-top: var(--space-0); padding-left: var(--space-4); height: auto; min-height: var(--control-height-compact); line-height: var(--line-caption);
}
html #layout #mailboxlist>li.virtual>.treetoggle, html.dark-mode #layout #mailboxlist>li.virtual>.treetoggle {
  top: var(--space-0); height: auto; min-height: var(--control-height-compact); line-height: var(--control-height-compact); left: auto; right: var(--space-3);
}
html #layout #mailboxlist>li.virtual>a:before, html.dark-mode #layout #mailboxlist>li.virtual>a:before { display: none; }
/* 하위 가상 노드(공용함 이름) — 일반 폴더처럼, 살짝 굵게 */
html #layout #mailboxlist li li.virtual>a, html.dark-mode #layout #mailboxlist li li.virtual>a { color: var(--f-ink); font-weight: var(--weight-semibold); font-size: var(--type-label); }
html #layout #mailboxlist>li.virtual>a:hover { background: var(--color-transparent); }
html #layout #mailboxlist li.virtual .treetoggle, html.dark-mode #layout #mailboxlist li.virtual .treetoggle { opacity: var(--opacity-disabled); }
/* 폴더 하단 (용량) */
html #layout #layout-sidebar>.footer, html.dark-mode #layout #layout-sidebar>.footer { background: var(--color-transparent); border-top: var(--space-0); color: var(--f-ink-3); }

/* ── 3. 메시지 목록 (#layout-list) ────────────────────────── */
html #layout #layout-list, html.dark-mode #layout #layout-list {
  background: var(--f-surface);
  border-left: var(--border-width) solid var(--f-line);
  border-right: var(--border-width) solid var(--f-line);
  overflow: hidden;
  min-width: var(--wm-list-min);
}
html #layout #layout-list>.header, html.dark-mode #layout #layout-list>.header { justify-content: flex-start; padding: var(--space-0) var(--space-2); border-bottom: var(--border-width) solid var(--f-line-soft); }
html #layout #layout-list>.header .toolbar a.button, html.dark-mode #layout #layout-list>.header .toolbar a.button { color: var(--f-ink-3); font-size: var(--type-label); line-height: var(--line-control); }
html #layout #layout-list>.header .toolbar a.button:hover:not(.disabled) { color: var(--f-ink); background: var(--f-line-soft); }
html #layout #layout-list>.header .toolbar a.button:before { font-size: var(--wm-icon-toolbar); }
/* 검색줄 → 알약 입력 */
html #layout .searchbar, html.dark-mode #layout .searchbar {
  background: var(--color-transparent); border-bottom: var(--space-0); height: auto; min-height: var(--data-toolbar-height); padding: calc((var(--data-toolbar-height) - var(--control-height-default)) / var(--count-two)) var(--space-4);
}
html #layout .searchbar input, html.dark-mode #layout .searchbar input {
  background: var(--f-ground); border: var(--border-width) solid var(--color-border-control); border-radius: var(--radius-pill);
  color: var(--f-ink); height: auto; min-height: var(--control-height-default); line-height: var(--line-control); padding: var(--control-padding-block) var(--space-4) var(--control-padding-block) var(--wm-folder-indent); font-size: var(--type-label);
}
html #layout .searchbar input:focus { background: var(--f-surface); border-color: var(--f-accent); }
html #layout .searchbar a.button.search, html.dark-mode #layout .searchbar a.button.search { color: var(--f-ink-3); position: absolute; left: var(--wm-search-icon-left); top: var(--wm-center); transform: translateY(var(--wm-transform-center)); z-index: var(--count-two); }
html #layout .searchbar .searchfilterbar, html.dark-mode #layout .searchbar .searchfilterbar { margin-left: var(--space-0); }
html #layout .searchbar a.button.options, html.dark-mode #layout .searchbar a.button.options { color: var(--f-ink-3); }
/* 행 */
html #layout #messagelist td, html.dark-mode #layout #messagelist td { border-color: var(--f-line-soft); }
html #layout #messagelist tr.message>td, html.dark-mode #layout #messagelist tr.message>td {
  background: var(--color-transparent); color: var(--f-ink); padding: var(--space-2) var(--space-2) var(--space-2) var(--space-0);
  height: var(--data-row-height); line-height: var(--line-body);
}
html #layout #messagelist tr.message>td.subject, html.dark-mode #layout #messagelist tr.message>td.subject { padding-left: var(--space-4); padding-right: var(--space-2); }
html #layout #messagelist tr.message>td.flags, html.dark-mode #layout #messagelist tr.message>td.flags { padding-right: var(--space-4); width: var(--wm-flags-width); }
html #layout #messagelist tr.message:hover>td, html.dark-mode #layout #messagelist tr.message:hover>td { background: var(--f-line-soft); }
html #layout #messagelist tr.message.selected>td, html.dark-mode #layout #messagelist tr.message.selected>td,
html #layout .listing tr.selected td, html.dark-mode #layout .listing tr.selected td {
  background: var(--f-line-soft); color: var(--f-accent-ink);
}
/* Paint-only selection lines stay inside native boxes; they reserve no space. */
html #layout #messagelist tr.message>td:first-child { position: relative; }
html #layout #taskmenu a.selected::after,
html #layout #mailboxlist li.selected::after,
html #layout .listing li.selected::after,
html #layout #messagelist tr.message.selected>td:first-child::after {
  content: "";
  position: absolute;
  inset-block: var(--space-0);
  inset-inline-start: var(--space-0);
  width: var(--border-width);
  background: var(--f-accent);
  pointer-events: none;
}
html #layout #messagelist tr.message.focused>td, html.dark-mode #layout #messagelist tr.message.focused>td { outline: var(--space-0); }
/* 행 안 텍스트 위계 — 발신자(진하게) / 시각 / 제목 */
html #layout #messagelist td.subject span, html.dark-mode #layout #messagelist td.subject span { line-height: var(--line-body); }
html #layout #messagelist td.subject span.fromto, html.dark-mode #layout #messagelist td.subject span.fromto {
  color: var(--f-ink); font-size: var(--type-body); font-weight: var(--weight-medium); padding-left: var(--space-0); order: 1;
}
html #layout #messagelist td.subject span.date, html.dark-mode #layout #messagelist td.subject span.date {
  color: var(--f-ink-3); font-size: var(--type-meta); line-height: var(--line-caption); font-variant-numeric: tabular-nums; order: 2; padding-left: var(--space-2);
}
html #layout #messagelist td.subject span.size, html.dark-mode #layout #messagelist td.subject span.size { display: none !important; }
html #layout #messagelist td.subject span.status, html.dark-mode #layout #messagelist td.subject span.status { display: none; }
html #layout #messagelist td.subject span.subject, html.dark-mode #layout #messagelist td.subject span.subject {
  order: 3; color: var(--f-ink-2); font-size: var(--type-body); margin-top: var(--space-1); display: flex; align-items: center;
}
html #layout #messagelist td.subject span.subject a, html.dark-mode #layout #messagelist td.subject span.subject a { color: inherit; }
html #layout #messagelist tr.unread td.subject span.fromto, html.dark-mode #layout #messagelist tr.unread td.subject span.fromto,
html #layout #messagelist tr.unread td.subject span.subject, html.dark-mode #layout #messagelist tr.unread td.subject span.subject {
  font-weight: var(--weight-title); color: var(--f-ink);
}
/* 읽음 상태 점 — 미읽음만 강조색 점, 나머지는 자리만 */
html #layout #messagelist td.subject span.msgicon.status, html.dark-mode #layout #messagelist td.subject span.msgicon.status { width: var(--wm-icon-small); height: auto; margin-right: var(--space-1); }
html #layout #messagelist td.subject span.msgicon.status:before, html.dark-mode #layout #messagelist td.subject span.msgicon.status:before {
  content: "\f111"; font-size: var(--wm-icon-micro); color: var(--color-transparent); width: var(--wm-icon-small); height: auto; line-height: var(--count-one);
}
html #layout #messagelist td.subject span.msgicon.status.unread:before, html.dark-mode #layout #messagelist td.subject span.msgicon.status.unread:before { color: var(--f-accent); }
html #layout #messagelist td.subject span.msgicon.status.replied:before, html.dark-mode #layout #messagelist td.subject span.msgicon.status.replied:before { color: var(--f-ink-3); }
/* 플래그·첨부 */
html #layout #messagelist td.flags span.flag span.flagged:before, html.dark-mode #layout #messagelist td.flags span.flag span.flagged:before { color: var(--f-danger); }
html #layout #messagelist td.flags span.flag span.unflagged:before { color: var(--f-line); }
html #layout #messagelist tr.message:hover td.flags span.flag span.unflagged:before { color: var(--f-ink-3); }
html #layout #messagelist tr.flagged td, html.dark-mode #layout #messagelist tr.flagged td,
html #layout #messagelist tr.flagged td.subject span.subject a, html.dark-mode #layout #messagelist tr.flagged td.subject span.subject a,
html #layout #messagelist tr.flagged td.subject span.fromto, html.dark-mode #layout #messagelist tr.flagged td.subject span.fromto,
html #layout #messagelist tr.flagged td.subject span.date, html.dark-mode #layout #messagelist tr.flagged td.subject span.date { color: inherit; }
html #layout #messagelist td.flags span.attachment:before, html.dark-mode #layout #messagelist td.flags span.attachment:before { color: var(--f-ink-3); }
/* 목록 하단 (페이지네이션) */
html #layout #layout-list>.footer, html.dark-mode #layout #layout-list>.footer { height: auto; min-height: var(--data-toolbar-height); padding-inline: var(--space-4); align-items: center; background: var(--color-transparent); border-top: var(--border-width) solid var(--f-line-soft); color: var(--f-ink-3); font-size: var(--type-meta); line-height: var(--line-caption); }
html #layout #layout-list>.footer a.button, html.dark-mode #layout #layout-list>.footer a.button { color: var(--f-ink-3); height: auto; min-height: var(--control-height-compact); padding: var(--control-padding-block) var(--control-padding-inline); font-size: var(--type-label); line-height: var(--line-control); display: inline-flex; align-items: center; justify-content: center; }

/* ── 4. 본문 (#layout-content) ────────────────────────────── */
html #layout #layout-content, html.dark-mode #layout #layout-content { background: var(--f-surface); }
html #layout #layout-content>.header, html.dark-mode #layout #layout-content>.header { border-bottom: var(--border-width) solid var(--f-line-soft); justify-content: flex-start; padding: var(--space-0) var(--space-3); }
/* Elastic command links normally have command names, not a .button class.
 * The task rail also has menu.toolbar, so scope commands to content columns.
 * Desktop header commands can be native buttons outside the toolbar container.
 * Phone/small header icon geometry stays under Elastic's responsive layout.
 * Preserve native visibility/popups; change only the command's visual recipe. */
html #layout>:is(#layout-content,#layout-list,#layout-sidebar) :is(.menu.toolbar a,.menu.toolbar button,.toolbar a.button),
html:not(.layout-phone):not(.layout-small) #layout>:is(#layout-content,#layout-list,#layout-sidebar)>.header :is(a,button).toolbar-button {
  color: var(--f-ink-2);
  background-color: var(--color-transparent);
  border-width: var(--space-0);
  font-family: var(--f-font);
  font-size: var(--type-label);
  line-height: var(--line-control);
  font-weight: var(--weight-medium);
  min-height: var(--control-height-default);
  height: auto;
  min-width: var(--control-height-default);
  max-width: none;
  padding: var(--control-padding-block) var(--space-2);
  border-radius: var(--radius-control);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  text-decoration: none;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}
html #layout>:is(#layout-content,#layout-list,#layout-sidebar) :is(.menu.toolbar a,.menu.toolbar button,.toolbar a.button):is(:hover,:focus-visible,:active,.selected,.pressed):not(.disabled):not(:disabled),
html:not(.layout-phone):not(.layout-small) #layout>:is(#layout-content,#layout-list,#layout-sidebar)>.header :is(a,button).toolbar-button:is(:hover,:focus-visible,:active,.selected,.pressed):not(.disabled):not(:disabled) {
  background-color: var(--f-line-soft);
  color: var(--f-accent-ink);
  text-decoration: none;
  transform: none;
}
html #layout>:is(#layout-content,#layout-list,#layout-sidebar) :is(.menu.toolbar a,.menu.toolbar button,.toolbar a.button):is(.disabled,:disabled),
html:not(.layout-phone):not(.layout-small) #layout>:is(#layout-content,#layout-list,#layout-sidebar)>.header :is(a,button).toolbar-button:is(.disabled,:disabled) {
  color: var(--f-ink-3);
  opacity: var(--opacity-disabled);
}
/* Elastic fixes toolbar glyph height with !important; keep one line for both. */
html #layout>:is(#layout-content,#layout-list,#layout-sidebar) :is(.menu.toolbar a,.menu.toolbar button,.toolbar a.button)::before,
html:not(.layout-phone):not(.layout-small) #layout>:is(#layout-content,#layout-list,#layout-sidebar)>.header :is(a,button).toolbar-button::before {
  font-size: var(--wm-icon-toolbar);
  height: var(--line-control) !important;
  line-height: var(--line-control);
  margin: var(--space-0);
}
html #layout>:is(#layout-content,#layout-list,#layout-sidebar) .menu.toolbar button { float: left; }
html #layout>:is(#layout-content,#layout-list,#layout-sidebar) .menu.toolbar li { height: auto; min-height: var(--control-height-default); }
html #layout>:is(#layout-content,#layout-list,#layout-sidebar) .menu.toolbar .dropbutton { border-radius: var(--radius-control); vertical-align: top; }
html #layout>:is(#layout-content,#layout-list,#layout-sidebar) .menu.toolbar .dropbutton a.dropdown { min-width: var(--control-height-compact); padding-inline: var(--space-1); }
html #layout>:is(#layout-content,#layout-list,#layout-sidebar) .menu.toolbar .dropbutton a.dropdown::before { line-height: var(--line-control); }
html #layout>:is(#layout-content,#layout-list,#layout-sidebar) .menu.toolbar>.spacer { width: var(--space-2); }
html #layout #layout-content .iframe-wrapper, html.dark-mode #layout #layout-content .iframe-wrapper { background: var(--f-surface); }

/* 본문 프레임 안 (iframe 문서에도 이 CSS 가 로드된다) */
html body.iframe, html.dark-mode body.iframe { background: var(--f-surface); padding: var(--space-2) var(--space-7) var(--space-8); }
html #message-header, html.dark-mode #message-header { margin-bottom: var(--space-5); }
html #message-header>.subject, html.dark-mode #message-header>.subject {
  font-size: var(--type-heading); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-title); line-height: var(--line-heading); color: var(--f-ink); margin: var(--space-4) var(--space-0) var(--space-4);
}
html #message-header .header, html.dark-mode #message-header .header { border-bottom: var(--border-width) solid var(--f-line-soft); padding-bottom: var(--space-4); }
html #message-header .header .contact-photo, html.dark-mode #message-header .header .contact-photo { border-radius: var(--radius-circle); width: var(--touch-target); height: var(--touch-target); }
html #message-header .header-headers, html.dark-mode #message-header .header-headers { color: var(--f-ink-3); font-size: var(--type-meta); line-height: var(--line-caption); }
html #message-header .header-headers .header-title, html.dark-mode #message-header .header-headers .header-title { color: var(--f-ink-3); }
html #message-header .header-headers a, html.dark-mode #message-header .header-headers a { color: var(--f-accent-ink); font-weight: var(--weight-medium); }
html #message-header .header-headers .rcmContactAddress, html.dark-mode #message-header .header-headers .rcmContactAddress { color: var(--f-ink); font-weight: var(--weight-semibold); font-size: var(--type-body); }
html #message-header .header-links a, html.dark-mode #message-header .header-links a { color: var(--f-ink-3); }
html #messagebody, html.dark-mode #messagebody { color: var(--f-ink); font-size: var(--type-body); line-height: var(--line-body); }
html #messagebody div.pre, html.dark-mode #messagebody div.pre,
html #messagebody .message-part, html.dark-mode #messagebody .message-part { font-family: var(--f-font); max-width: var(--wm-reading-max); }
html #messagebody pre, html.dark-mode #messagebody pre { font-family: var(--f-font); white-space: pre-wrap; }
html .message-part blockquote, html.dark-mode .message-part blockquote { border-left: var(--focus-width) solid var(--f-line); color: var(--f-ink-3); }
/* 첨부 목록 */
html #attachment-list, html.dark-mode #attachment-list { background: var(--f-ground); border: var(--border-width) solid var(--f-line); border-radius: var(--radius-control); }

/* Staff self-service settings use the same form, status and table recipes. */
html #layout .finora-account-panel {
  background: var(--f-surface);
  color: var(--f-ink);
  border: var(--space-0);
  border-radius: var(--space-0);
}
html #layout .finora-account-panel .formcontent {
  padding: var(--panel-space);
  max-width: var(--content-max);
}
html #layout .finora-account-panel h2 {
  margin: var(--space-0) var(--space-0) var(--section-gap);
}
html #layout .finora-account-panel fieldset {
  min-width: var(--min-content);
  margin: var(--space-0) var(--space-0) var(--section-gap);
  padding: var(--space-0);
  border: var(--space-0);
}
html #layout .finora-account-panel legend {
  float: none;
  width: auto;
  margin: var(--space-0) var(--space-0) var(--space-4);
  padding: var(--space-0);
  font-size: var(--type-heading);
  line-height: var(--line-heading);
  font-weight: var(--weight-semibold);
}
html #layout .finora-account-panel .hint {
  margin: var(--space-0) var(--space-0) var(--space-4);
  font-size: var(--type-body);
  line-height: var(--line-body);
  color: var(--f-ink-3);
}
html #layout .finora-account-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-3);
  margin: var(--space-0) var(--space-0) var(--space-4);
}
html #layout .finora-account-form .form-group {
  flex: var(--count-one) var(--count-one) var(--keyvalue-label-size);
  min-width: var(--min-content);
  margin: var(--space-0);
}
html #layout .finora-account-form .form-group>label {
  display: block;
  margin-bottom: var(--space-2);
}
html #layout .finora-account-form>.btn {
  flex-shrink: var(--weight-none);
  border-radius: var(--radius-control);
}
html #layout .finora-account-rules {
  width: var(--fill);
  margin: var(--space-0);
  border-collapse: collapse;
}
html #layout .finora-account-rules :is(th,td) {
  height: var(--data-row-height);
  padding: var(--space-2) var(--space-4);
  border-bottom: var(--border-width) solid var(--f-line);
  white-space: normal;
  overflow-wrap: anywhere;
}
html #layout .finora-account-rules td { background: var(--f-surface); color: var(--f-ink); }
html #layout .finora-account-rules th {
  text-align: left;
  color: var(--f-ink-3);
  background: var(--f-ground);
  font-size: var(--type-meta);
  line-height: var(--line-caption);
  font-weight: var(--weight-medium);
}
html #layout .finora-account-rules :is(th,td):last-child { text-align: right; }
html #layout .finora-account-rules .finora-account-form {
  display: inline-flex;
  margin: var(--space-0);
}
html #layout .finora-account-rules .btn {
  min-height: var(--control-height-compact);
}
html #layout .finora-account-status {
  margin: var(--space-0) var(--space-0) var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: var(--border-width) solid var(--f-line);
  border-radius: var(--radius-control);
  background: var(--f-ground);
  color: var(--f-ink);
}
html #layout .finora-account-status.confirmation {
  border-color: var(--f-success);
  background: var(--f-success-soft);
  color: var(--f-success);
}
html #layout .finora-account-status.error {
  border-color: var(--f-danger);
  background: var(--f-danger-soft);
  color: var(--f-danger);
}

/* ── 5. 공통 위젯 — 폼·팝업·버튼 ────────────────────────── */
html #layout .popupmenu, html.dark-mode #layout .popupmenu,
html .popover, html.dark-mode .popover { background: var(--f-surface); border: var(--border-width) solid var(--f-line); border-radius: var(--radius-panel); box-shadow: none; color: var(--f-ink); }
html .popover-header, html.dark-mode .popover-header { background: var(--color-transparent); color: var(--f-ink-3); border-bottom: var(--border-width) solid var(--f-line-soft); }
html .popupmenu .listing li a, html.dark-mode .popupmenu .listing li a { color: var(--f-ink-2); border-radius: var(--radius-control); font-size: var(--type-label); line-height: var(--line-control); height: auto; min-height: var(--control-height-default); padding-block: var(--control-padding-block); }
html .popupmenu .listing li>a:not(.disabled):hover, html.dark-mode .popupmenu .listing li>a:not(.disabled):hover,
html .popover .menu li a:not(.disabled):hover, html.dark-mode .popover .menu li a:not(.disabled):hover,
html .menu.toolbar .dropbutton:not(.disabled):hover, html.dark-mode .menu.toolbar .dropbutton:not(.disabled):hover,
html .menu.toolbar .dropbutton a.dropdown:hover, html.dark-mode .menu.toolbar .dropbutton a.dropdown:hover {
  background-color: var(--f-line-soft);
  color: var(--f-ink);
}
html .popupmenu .listing li.selected, html.dark-mode .popupmenu .listing li.selected,
html .popupmenu .listing li.selected>a, html.dark-mode .popupmenu .listing li.selected>a,
html .popupmenu .listing li.selected>a:not(.disabled):is(:hover,:focus,:active),
html.dark-mode .popupmenu .listing li.selected>a:not(.disabled):is(:hover,:focus,:active) {
  background: var(--f-line-soft); color: var(--f-accent-ink);
}
/* Elastic clones the compose command into a separate mobile action, outside
 * the task rail and command toolbar. Keep its native placement and hit area. */
html #layout .floating-action-buttons a.button,
html.dark-mode #layout .floating-action-buttons a.button {
  background-color: var(--f-accent);
  color: var(--f-on-accent);
  opacity: var(--count-one);
  border-radius: var(--radius-circle);
  box-shadow: none;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}
html #layout .floating-action-buttons a.button:is(:hover,:focus-visible,:active):not(.disabled),
html.dark-mode #layout .floating-action-buttons a.button:is(:hover,:focus-visible,:active):not(.disabled) {
  background-color: var(--f-accent-ink);
  color: var(--f-on-accent);
  transform: none;
}
/* Control and type recipes apply to inherited screens without changing their DOM. */
html h1 { font-size: var(--type-title); line-height: var(--line-title); font-weight: var(--weight-semibold); }
html h2, html legend, html #layout>div>.header h1 { font-size: var(--type-heading); line-height: var(--line-heading); font-weight: var(--weight-semibold); }
html .ui-dialog-title, html .modal-title { font-size: var(--type-dialog); line-height: var(--line-dialog); font-weight: var(--weight-semibold); }
html .form-group>label, html .propform td.title { font-size: var(--type-label); line-height: var(--line-control); font-weight: var(--weight-medium); }
html .btn { font-family: var(--f-font); transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast); height: auto; min-height: var(--control-height-default); padding: var(--control-padding-block) var(--control-padding-inline); font-size: var(--type-label); line-height: var(--line-control); font-weight: var(--weight-medium); display: inline-flex; align-items: center; justify-content: center; white-space: normal; }
html .btn-sm, html #countcontrols a.button, html .pagenav a.button { height: auto; min-height: var(--control-height-compact); font-size: var(--type-label); line-height: var(--line-control); }
html .btn-primary, html.dark-mode .btn-primary { min-height: var(--control-height-primary); background: var(--f-accent); border-color: var(--f-accent); color: var(--f-on-accent); border-radius: var(--radius-control); }
html .btn-primary:not(:disabled):not(.disabled):is(:hover,:focus,:active,.active),
html.dark-mode .btn-primary:not(:disabled):not(.disabled):is(:hover,:focus,:active,.active) {
  background: var(--f-accent-ink); border-color: var(--f-accent-ink); color: var(--f-on-accent);
}
html .btn-secondary, html.dark-mode .btn-secondary { background: var(--f-surface); border-color: var(--f-line); color: var(--f-ink-2); border-radius: var(--radius-control); }
html .btn-secondary:not(:disabled):not(.disabled):is(:hover,:focus,:active,.active),
html.dark-mode .btn-secondary:not(:disabled):not(.disabled):is(:hover,:focus,:active,.active) {
  background: var(--f-line-soft); border-color: var(--f-line); color: var(--f-ink);
}
html .btn-primary:is(:disabled,.disabled), html.dark-mode .btn-primary:is(:disabled,.disabled),
html .btn-primary:is(:disabled,.disabled):is(:hover,:focus,:active,.active),
html.dark-mode .btn-primary:is(:disabled,.disabled):is(:hover,:focus,:active,.active) {
  background: var(--f-accent); border-color: var(--f-accent); color: var(--f-on-accent);
}
html .btn-secondary:is(:disabled,.disabled), html.dark-mode .btn-secondary:is(:disabled,.disabled),
html .btn-secondary:is(:disabled,.disabled):is(:hover,:focus,:active,.active),
html.dark-mode .btn-secondary:is(:disabled,.disabled):is(:hover,:focus,:active,.active) {
  background: var(--f-surface); border-color: var(--f-line); color: var(--f-ink-2);
}
html .form-control, html.dark-mode .form-control,
html .custom-select, html.dark-mode .custom-select {
  height: auto;
  min-height: var(--control-height-default);
  padding: var(--control-padding-block) var(--control-padding-inline);
  font-family: var(--f-font);
  font-size: var(--type-label);
  line-height: var(--line-control);
  background-color: var(--f-surface);
  color: var(--f-ink);
  border-radius: var(--radius-control);
}
html .form-control:not(.is-invalid), html.dark-mode .form-control:not(.is-invalid),
html .custom-select:not(.is-invalid), html.dark-mode .custom-select:not(.is-invalid) { border-color: var(--color-border-control); }
/* Elastic's two-class background shorthand clears a lower-specificity surface.
 * Keep its arrow asset and native popup; own just the select's background color. */
html .form-control.custom-select, html.dark-mode .form-control.custom-select { background-color: var(--f-surface); }
html .custom-select, html.dark-mode .custom-select { padding-inline-end: var(--space-7); }
html .form-control:focus:not(.is-invalid), html.dark-mode .form-control:focus:not(.is-invalid),
html .custom-select:focus:not(.is-invalid), html.dark-mode .custom-select:focus:not(.is-invalid) {
  border-color: var(--f-accent);
  background-color: var(--f-surface);
  box-shadow: none;
}
/* The vendor dark focus color is important; all other focus paint stays normal. */
html.dark-mode .form-control:focus:not(.is-invalid) { color: var(--f-ink) !important; }
html .form-control:disabled, html .custom-select:disabled,
html.dark-mode .form-control:disabled, html.dark-mode .custom-select:disabled {
  background-color: var(--color-disabled-bg);
  color: var(--color-disabled-text);
}
/* Recipient chips and input-group actions belong to the app, not the message. */
html #layout .recipient-input, html.dark-mode #layout .recipient-input {
  min-height: var(--control-height-default);
  padding: var(--space-0) var(--space-3) var(--space-1);
  background-color: var(--f-surface);
  color: var(--f-ink);
  border-radius: var(--radius-control);
}
html #layout .recipient-input:not(.is-invalid), html.dark-mode #layout .recipient-input:not(.is-invalid) { border-color: var(--color-border-control); }
html #layout .recipient-input.focus:not(.is-invalid), html.dark-mode #layout .recipient-input.focus:not(.is-invalid) {
  background-color: var(--f-surface);
  border-color: var(--f-accent);
  color: var(--f-ink);
}
html #layout .recipient-input input, html.dark-mode #layout .recipient-input input {
  color: var(--f-ink);
  font-family: var(--f-font);
  font-size: var(--type-label);
  line-height: var(--line-control);
}
html #layout .recipient-input .recipient, html.dark-mode #layout .recipient-input .recipient {
  background-color: var(--f-accent-soft);
  color: var(--f-accent-ink);
  border-color: var(--f-line);
  border-radius: var(--radius-small);
}
html #layout .input-group-text, html.dark-mode #layout .input-group-text {
  min-height: var(--control-height-default);
  min-width: var(--control-height-default);
  padding: var(--control-padding-block) var(--space-2);
  align-items: center;
  justify-content: center;
  font-size: var(--type-label);
  line-height: var(--line-control);
  background-color: var(--f-ground);
  border-color: var(--color-border-control);
  color: var(--f-ink-2);
}
/* Bootstrap marks .rounded-left important; preserve the group's joined edge. */
html #layout .input-group>.rounded-left { border-radius: var(--radius-control) var(--space-0) var(--space-0) var(--radius-control) !important; }
html #layout .input-group>.input-group-append:last-child>.input-group-text { border-radius: var(--space-0) var(--radius-control) var(--radius-control) var(--space-0); }
html #layout a.input-group-text:is(:hover,:focus-visible), html.dark-mode #layout a.input-group-text:is(:hover,:focus-visible) {
  background-color: var(--f-line-soft);
  color: var(--f-accent-ink);
  text-decoration: none;
}
/* The plain-text editor toolbar is outside the textarea; never style sent HTML. */
html .html-editor .editor-toolbar, html.dark-mode .html-editor .editor-toolbar {
  background-color: var(--f-ground);
  border-color: var(--f-line);
  border-radius: var(--radius-control) var(--radius-control) var(--space-0) var(--space-0);
}
html .html-editor .editor-toolbar .mce-i-html, html.dark-mode .html-editor .editor-toolbar .mce-i-html {
  width: var(--control-height-compact);
  height: var(--control-height-compact);
  margin: var(--space-0) var(--space-1);
  color: var(--f-ink-2);
  border-radius: var(--radius-small);
}
html .html-editor .editor-toolbar .mce-i-html::before {
  width: var(--control-height-compact);
  line-height: var(--control-height-compact);
}
html .html-editor .editor-toolbar .mce-i-html:is(:hover,:focus-visible), html.dark-mode .html-editor .editor-toolbar .mce-i-html:is(:hover,:focus-visible) {
  background-color: var(--f-line-soft);
  border-color: var(--color-transparent);
  color: var(--f-accent-ink);
}
html .html-editor>textarea { padding-block-start: calc(var(--control-height-compact) + var(--space-3)); }
html #layout .file-upload, html.dark-mode #layout .file-upload {
  border-width: var(--border-width);
  border-color: var(--f-line);
  border-radius: var(--radius-panel);
}
html #layout .file-upload.droptarget.hover, html.dark-mode #layout .file-upload.droptarget.hover {
  background-color: var(--f-line-soft);
  border-color: var(--f-accent);
}
html #layout .file-upload .hint, html.dark-mode #layout .file-upload .hint,
html .formcontent .hint, html.dark-mode .formcontent .hint { color: var(--f-ink-3); font-size: var(--type-meta); line-height: var(--line-caption); }
/* TinyMCE chrome shares the same palette; its editable iframe keeps author styles. */
html div.tox.tox-tinymce, html.dark-mode div.tox.tox-tinymce { border-color: var(--color-border-control); border-radius: var(--radius-control); }
html div.tox :is(.tox-toolbar,.tox-toolbar-overlord>div), html.dark-mode div.tox :is(.tox-toolbar,.tox-toolbar-overlord>div) {
  background-image: none;
  background-color: var(--f-ground);
  border-color: var(--f-line);
}
html div.tox .tox-tbtn, html.dark-mode div.tox .tox-tbtn {
  color: var(--f-ink-2);
  border-radius: var(--radius-small);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}
html div.tox .tox-tbtn svg, html.dark-mode div.tox .tox-tbtn svg { fill: currentColor !important; }
html div.tox .tox-tbtn:is(:hover,:focus-visible,.tox-tbtn--enabled), html.dark-mode div.tox .tox-tbtn:is(:hover,:focus-visible,.tox-tbtn--enabled) {
  background-color: var(--f-line-soft);
  color: var(--f-accent-ink);
}
html #layout .scroller::-webkit-scrollbar-thumb { background: var(--f-line); border-radius: var(--radius-control); }

/* Elastic has focus/drop-menu/recipient-field shadows in several components.
 * TinyMCE's focused wrapper is the sole upstream !important conflict. */
html body:not(.iframe) :where(button,input,select,textarea,a.button,.btn,.ui-widget,.popover,.popupmenu,.minicolors-panel,.CodeMirror,.input-group a,.menu,.listing li,.listing td,.listing-hover-menu,.custom-file-label,.multi-input>.content,.recipient-input,.tagedit-list,.tox,.tox *),
html #rcmdraglayer,
html body:not(.iframe) .custom-control-label::before,
html body:not(.iframe) .custom-file-input:focus~.custom-file-label,
html div.tox.focused {
  box-shadow: none !important;
}

/* 상단 알림 (Elastic 의 messagestack) */
html #messagestack div, html.dark-mode #messagestack div { border-radius: var(--radius-control); font-family: var(--f-font); }

/* 로그인 화면 */
html #layout-login body, html body.task-login { background: var(--f-ground); }
html .task-login #layout-content, html.dark-mode .task-login #layout-content { background: var(--f-ground); }
html .task-login #login-form, html.dark-mode .task-login #login-form {
  background: var(--f-surface); border: var(--border-width) solid var(--f-line); border-radius: var(--radius-dialog);
  padding: var(--space-7) var(--space-7) var(--space-6); box-shadow: none; width: var(--wm-login-width); max-width: calc(var(--fill) - var(--gutter-mobile) - var(--gutter-mobile));
}
html .task-login #login-form .form-control, html.dark-mode .task-login #login-form .form-control { border-radius: var(--space-0) var(--radius-control) var(--radius-control) var(--space-0); height: auto; min-height: var(--control-height-default); font-size: var(--type-label); line-height: var(--line-control); }
html .task-login #login-form .input-group, html.dark-mode .task-login #login-form .input-group { margin-bottom: var(--space-3); }
html .task-login #login-form .input-group-text, html.dark-mode .task-login #login-form .input-group-text { background: var(--f-ground); border-color: var(--f-line); color: var(--f-ink-3); border-radius: var(--radius-control) var(--space-0) var(--space-0) var(--radius-control); min-width: var(--control-height-default); width: auto; font-size: var(--type-label); line-height: var(--line-control); justify-content: center; }
html .task-login #login-form .btn-primary, html.dark-mode .task-login #login-form .btn-primary { height: auto; min-height: var(--control-height-primary); font-weight: var(--weight-medium); font-size: var(--type-label); line-height: var(--line-control); margin-top: var(--space-2); border-radius: var(--radius-control); }
html .task-login #login-form .form-text, html.dark-mode .task-login #login-form .form-text { color: var(--f-ink-3); }
html .task-login #login-footer .finora-mail-apply { width: var(--fill); margin-top: var(--space-4); }
html .task-login #logo, html.dark-mode .task-login #logo { max-width: var(--auth-logo-width); margin-bottom: var(--space-6); }
html.dark-mode.layout-phone .task-login #logo { content: url("../images/finora-small-dark.svg"); }
html .task-login #layout-content>.header, html.dark-mode .task-login #layout-content>.header { display: none; }

/* Keyboard and reduced-motion rules apply to every inherited screen. */
html #layout :where(a,button,input,select,textarea,[tabindex]):focus-visible,
html .popover :where(a,button,input,select,textarea,[tabindex]):focus-visible,
html .popupmenu :where(a,button,input,select,textarea,[tabindex]):focus-visible,
html .ui-dialog :where(a,button,input,select,textarea,[tabindex]):focus-visible,
html .tox :where(a,button,input,select,textarea,[tabindex]):focus-visible,
html .custom-control-input:focus-visible~.custom-control-label::before,
html .custom-file-input:focus-visible~.custom-file-label {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--focus-inset-offset);
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
