/* EXPERS admin console on Blueprint 6 (bp6-*) with Pretendard. Blueprint draws
   every component; this file only lays the page out, sets the font, the app
   background and the few things Blueprint has no component for (the 7-day
   chart and the message previews). Colors are Blueprint's own. */
:root, body {
  --bp-typography-family-default: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Segoe UI", Roboto, "Helvetica Neue", blueprint-icons-16, sans-serif;
}
body, input, button, textarea, select {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Segoe UI", Roboto, "Helvetica Neue", blueprint-icons-16, sans-serif;
}
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #f6f7f9; word-break: keep-all; overflow-wrap: break-word; }
body.bp6-dark { background: #1c2127; }
/* Before the script adds bp6-dark, a dark system does not flash a light page. */
@media (prefers-color-scheme: dark) { body:not(.bp6-light) { background: #1c2127; color: #f6f7f9; } }
p { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.brand { font-weight: 700; letter-spacing: .04em; }
.bp6-heading.page-title { font-size: 22px; line-height: 25px; margin: 0; } /* Blueprint H3 metrics */
.page-head { display: flex; flex-direction: column; gap: 4px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack.tight { gap: 8px; }
.stack > p:empty, .stack > div:empty { display: none; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.below { margin-top: 8px; }
.bp6-form-group.flush { margin-bottom: 0; }
/* Blueprint sizes a compact callout's icon only for its .bp6-callout-icon markup; the same
   metrics (32px gutter, icon at 8px/10px) for the icon-class form used here. */
.bp6-callout.bp6-compact[class*=bp6-icon-] { padding-left: 32px; }
.bp6-callout.bp6-compact[class*=bp6-icon-]::before { left: 8px; top: 10px; }
/* Errors are Blueprint danger callouts, the same as the panel's. */
.bp6-callout.error { white-space: pre-wrap; margin: 0 0 15px; }
.bp6-button + .bp6-callout.error { margin-top: 8px; }
.stack > .bp6-callout.error, .gate-card > .bp6-callout.error, .bp6-callout.error:last-child { margin-bottom: 0; }
.result { color: #238551; margin: 0 0 16px; white-space: pre-wrap; }
.result.bad { color: #cd4246; }
.bp6-dark .result.bad { color: #fa999c; }
.bp6-dark .result { color: #72ca9b; }
.bp6-alert-contents { word-break: keep-all; overflow-wrap: anywhere; } /* Blueprint breaks Korean words here */

/* login and staff */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; box-sizing: border-box; }
.gate-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 12px; }
.gate-card .bp6-form-group { margin: 0; }

/* shell: navbar on top, menu on the left */
.app-navbar { position: sticky; top: 0; }
.app-navbar .brand { margin-right: 12px; }
.app-body { display: grid; grid-template-columns: 220px minmax(0, 1fr); }
.app-sidebar { position: sticky; top: 50px; height: calc(100vh - 50px); box-sizing: border-box; overflow-y: auto; padding: 8px;
               background: #ffffff; box-shadow: 1px 0 0 rgba(17, 20, 24, 0.15); }
.bp6-dark .app-sidebar { background: #252a31; box-shadow: 1px 0 0 rgba(255, 255, 255, 0.2); }
.app-menu, .bp6-dark .app-menu { background: transparent; min-width: 0; padding: 0; }
.app-menu .bp6-menu-divider { margin: 4px 0; }
.app-menu .bp6-menu-item > .bp6-icon { align-self: center; }
.app-main { padding: 20px 24px 64px; max-width: 1040px; min-width: 0; box-sizing: border-box; display: flex; flex-direction: column; gap: 16px; }
.view { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* callouts with a button on the right */
.strip { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.strip-text { flex: 1; min-width: 200px; }
.form-note { margin-bottom: 16px; }

/* home: two columns that each stack their sections, so a short section on one side
   leaves no gap on the other */
.home-columns { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.home-column { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.legend { gap: 12px; flex-wrap: wrap; }
.legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; }
.l-auto::before, .day .a { background: #2d72d2; }
.l-draft::before, .day .d { background: #8abbff; }
.l-hand::before, .day .h { background: #abb3bf; }
.bp6-dark .l-auto::before, .bp6-dark .day .a { background: #4c90f0; }
.bp6-dark .l-hand::before, .bp6-dark .day .h { background: #738091; }
.chart { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; height: 180px; align-items: end; }
.day { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; font-size: 12px; }
.day .col { width: 100%; max-width: 28px; display: flex; flex-direction: column-reverse; border-radius: 2px; overflow: hidden; background: rgba(143, 153, 168, 0.15); min-height: 3px; }
.day .col i { display: block; width: 100%; }
.day b { font-weight: 600; font-variant-numeric: tabular-nums; min-height: 15px; }
.day span { color: #5f6b7c; }
.bp6-dark .day span { color: #abb3bf; }
.day.today span { color: #215db0; font-weight: 600; }
.bp6-dark .day.today span { color: #8abbff; }
.figures { width: 100%; }
table.figures th { font-weight: 400; color: #5f6b7c; }
.bp6-dark table.figures th { color: #abb3bf; }
.figures td { text-align: right !important; font-variant-numeric: tabular-nums; font-weight: 600; }
.figures tr:first-child th, .figures tr:first-child td { box-shadow: none !important; }
.page-title em { font-style: normal; color: #215db0; }
.bp6-dark .page-title em { color: #8abbff; }
.money { margin: 0 0 12px; font-variant-numeric: tabular-nums; }
.setup-progress { width: min(240px, 40%); }

/* card list rows (a Blueprint card per row) */
.bp6-card-list > .row { display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box; text-align: left; font: inherit; color: inherit; }
button.row { border: 0; margin: 0; }
a.row, a.row:hover { color: inherit; text-decoration: none; }
.row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-quote { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-end { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.row.locked .row-title { color: #5f6b7c; }
.bp6-card-list > .row.sub-row { padding-left: 48px; }
.thumb { width: 32px; height: 32px; border-radius: 4px; object-fit: cover; flex: none; background: rgba(143, 153, 168, 0.15); }
.bp6-card-list > .empty-card { display: block; padding: 24px 16px; }
.bp6-card-list > .bp6-control-card .bp6-control { margin: 0; }
.bp6-non-ideal-state-visual { font-size: 32px; }
.card-sub { display: block; margin-top: 2px; font-weight: 400; }
.bp6-control-card-label { display: block; flex: 1; min-width: 0; }

/* company material */
.bp6-section-header-left { min-width: 0; }
.bp6-section-header-right .bp6-button, .tab-head > .bp6-button, .row-end .bp6-button { white-space: nowrap; }
.tab-head { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; }
.tab-head > p { flex: 1; min-width: 0; }
.tab-head > .bp6-button, .title-row > .bp6-button { flex: none; }
/* Only the button's own UA look is reset; Blueprint's 14px / 30px tab metrics stay. */
button.bp6-tab { background: none; border: 0; padding: 0; margin: 0; font-family: inherit; }
.toolbar { display: flex; gap: 12px; align-items: center; }
.toolbar .search { flex: 1; min-width: 0; }
.toolbar .bp6-segmented-control { flex: none; }
#upload-state p { margin-bottom: 8px; }
.title-row { flex-direction: row; justify-content: space-between; align-items: flex-start; gap: 16px; }
.title-row > div { display: flex; flex-direction: column; gap: 4px; }

/* forms */
.setting { align-items: center; gap: 8px 12px; }
.setting > label.bp6-label { flex: 1; min-width: 0; margin: 0 !important; line-height: 1.4 !important; }
.setting > label.bp6-label .bp6-text-muted { display: block; font-size: 12px; }
.unit-input { width: 120px; }
.unit-input .bp6-input { width: 100%; padding-right: 48px !important; text-align: right; -moz-appearance: textfield; }
.unit-input .bp6-input::-webkit-inner-spin-button, .unit-input .bp6-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.unit-input .bp6-input-action .bp6-tag { margin: 4px; }
.budget-input { width: 160px; }
.bp6-numeric-input { flex: none; }
.hours { display: flex; align-items: center; gap: 8px; flex: none; }
.add-row { display: flex; }
.add-row > .bp6-input { flex: 1; min-width: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags:empty { display: none; }
#asset-keywords:not(:empty) { margin-bottom: 8px; }
.tone-list { display: flex; flex-direction: column; gap: 12px; }
.tone-list:empty { display: none; }
.tone-item { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.count-line { display: flex; justify-content: space-between; gap: 12px; }
.count { white-space: nowrap; font-variant-numeric: tabular-nums; }
.count.over { color: #c87619; font-weight: 600; }
.warn-list { margin: 8px 0 0; padding-left: 28px; }
.warn-list li { list-style: disc; }
.host-line { display: flex; gap: 8px; flex-wrap: wrap; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-top: 16px; }
.form-actions > p { flex: 1; min-width: 200px; }
#test-scope-note { margin-top: -8px; }
/* The details content slot sits outside Blueprint's box-sizing inheritance: restore it. */
details > * { box-sizing: border-box; }
details.more > summary { list-style: none; }
details.more { margin-top: 12px; }
details.more:not(:last-child) { margin-bottom: 15px; } /* Blueprint's form-group gap */
details.more > summary::-webkit-details-marker { display: none; }
details.more[open] > summary { margin-bottom: 12px; }
/* A fold-out shows whether it is open: its caret turns, as in the panel. */
details > summary.bp6-button::before { transition: transform 100ms cubic-bezier(0.4, 1, 0.75, 0.9); }
details[open] > summary.bp6-button::before { transform: rotate(90deg); }
.more-body { padding: 0 0 4px; }
.copy-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.copy-text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.copy-text code { word-break: break-all; white-space: normal; }
.done-list li { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.channel-lines { margin-top: 8px; font-size: 12px; }
.channel-lines li { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
/* A solid app-background bar with a top rule, like the panel's send bar. */
.sticky-save { position: sticky; bottom: 0; z-index: 2; margin: 0 -24px; padding: 8px 24px; display: flex; justify-content: flex-end;
               background-color: #f6f7f9; box-shadow: 0 -1px 0 rgba(17, 20, 24, 0.15); }
.bp6-dark .sticky-save { background-color: #1c2127; box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.2); }

/* answer check */
#test-result.stale .bp6-section-card > :not(#test-stale) { opacity: .45; }
#verdict .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.result-block { display: flex; flex-direction: column; gap: 8px; }
.result-block > h6 { margin: 0; }
.result-meta { display: flex; justify-content: space-between; gap: 12px; }
.result-meta .count { margin-left: auto; }
.tone-warn, .lang-problems { color: #c87619; font-size: 12px; font-weight: 600; }
.lang-lines > div, .draft-translation { white-space: pre-wrap; overflow-wrap: anywhere; }

/* the FAQ sheet's answers in other languages: one card per language */
.lang-card.bp6-card { display: flex; flex-direction: column; gap: 8px; }
.lang-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lang-head .lang-meta { margin-left: auto; }
#faq-lang-add .bp6-html-select { flex: 1 1 auto; }
#faq-translations:empty { display: none; }

/* message previews: what the customer receives */
.bubble-preview { padding: 12px; border-radius: 4px; background: rgba(143, 153, 168, 0.15); display: flex; flex-direction: column; }
.bubble { margin: 0 0 0 auto; max-width: 82%; width: fit-content; box-sizing: border-box; background: #2d72d2; color: #ffffff;
          padding: 8px 12px; border-radius: 8px 8px 2px 8px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.bubble.draft { margin: 0; background: #ffffff; color: #1c2127; border-radius: 8px 8px 8px 2px; box-shadow: 0 0 0 1px rgba(17, 20, 24, 0.1); }
.bp6-dark .bubble.draft { background: #2f343c; color: #f6f7f9; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2); }
.bubble img { display: block; max-width: min(220px, 100%); max-height: 180px; border-radius: 4px; margin: 2px 0 8px; }
.bubble .file-box { display: flex; align-items: center; gap: 8px; padding: 8px; margin: 2px 0 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.18); }
.bubble .link-line { display: block; margin-top: 6px; text-decoration: underline; overflow-wrap: anywhere; }

/* document sheet */
.preview { max-height: 34vh; overflow: auto; padding: 4px 12px; border-radius: 4px; background: #ffffff; box-shadow: inset 0 0 0 1px rgba(17, 20, 24, 0.15); }
.bp6-dark .preview { background: #252a31; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2); }
.preview:empty { display: none; }
.preview p { white-space: pre-wrap; margin: 8px 0; }
.preview h4 { margin: 12px 0 0; font-size: 12px; font-weight: 600; color: #5f6b7c; }
.preview h4 + p { margin-top: 4px; }
.frames { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.frames figure { margin: 0; }
.frames img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 4px; display: block; background: rgba(143, 153, 168, 0.15); }
.frames figcaption { font-size: 12px; color: #5f6b7c; margin-top: 4px; font-variant-numeric: tabular-nums; }
.token-box { margin: 0; white-space: pre-wrap; word-break: break-all; }

/* 「AI로 정리하기」 sheet: a section per kind, a card per proposed item */
#organize-running p { margin-bottom: 8px; }
.org-section { display: flex; flex-direction: column; gap: 8px; }
.org-section > h6 { margin: 0; display: flex; align-items: center; gap: 8px; }
.org-card.bp6-card { display: flex; flex-direction: column; gap: 8px; }
.org-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.org-head > .bp6-control { margin: 0; }
.org-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.org-card label.bp6-label, .org-card .bp6-form-group { margin-bottom: 0; }
.org-card .two { gap: 8px 16px; }
.org-card details.more { margin: 0; }
.org-card details.more[open] > summary { margin-bottom: 8px; }
.org-count { text-align: right; }
.org-current { display: flex; flex-direction: column; gap: 4px; padding: 8px 12px; border-radius: 4px; background: rgba(143, 153, 168, 0.15); }
.org-current p { white-space: pre-wrap; }
.org-compare { align-items: start; }
.org-url { overflow-wrap: anywhere; }
.org-fail { color: #cd4246; font-size: 12px; font-weight: 600; }
.bp6-dark .org-fail { color: #fa999c; }
.org-list { margin: 0; padding-left: 20px; }
.org-list li { list-style: disc; }

/* native dialogs drawn as Blueprint dialogs; the backdrop is Blueprint's overlay backdrop */
dialog.bp6-dialog { padding: 0; border: 0; margin: auto; color: #1c2127; max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); box-sizing: border-box; overflow: hidden; }
.bp6-dark dialog.bp6-dialog { color: #f6f7f9; }
dialog.bp6-dialog.sheet { width: 560px; }
dialog.bp6-dialog.narrow { width: 440px; }
dialog.bp6-dialog.wide { width: 720px; }
dialog.bp6-dialog:not([open]) { display: none; } /* Blueprint's display:flex would show closed dialogs */
dialog.bp6-dialog::backdrop { background-color: rgba(17, 20, 24, 0.7); }
dialog.bp6-alert { width: 400px; padding: 20px; }
dialog.bp6-alert[open] { display: block; }
#ask-icon { font-size: 40px; }
#ask-body p { margin-top: 8px; }
.bp6-dialog-header > .bp6-tag { margin-right: 8px; flex: none; }
/* Every sheet body is Blueprint's scroll container (margin 0, padding 16px), so focus
   rings and the selected radio card's ring stay inside the scroll box. */
.bp6-dialog-body-scroll-container { min-height: 0; }
.bp6-dialog-body > .bp6-form-group:last-child { margin-bottom: 0; }
.bp6-dialog-footer-fixed { flex-wrap: wrap; }
.bp6-dialog-footer-main-section { display: flex; flex-wrap: wrap; gap: 4px; }
.bp6-dialog-footer-main-section:empty { display: none; }
.bp6-dialog-footer-actions { margin-left: auto; }

/* toasts: the container is a popover so a toast shows above an open dialog */
#toaster { inset: 0 0 auto 0; margin: 0; border: 0; background: transparent; width: auto; height: auto; overflow: visible; }
.bp6-toast-message { padding: 11px; flex: 1; word-break: keep-all; overflow-wrap: anywhere; }

/* One column: the sections join one stack, today's numbers first. */
@media (max-width: 1080px) {
  .home-columns { display: flex; flex-direction: column; align-items: stretch; }
  .home-column { display: contents; }
  .home-today { order: 1; } .home-todo { order: 2; } .home-switch { order: 3; } .home-chart { order: 4; } .home-cost { order: 5; }
}
@media (max-width: 760px) {
  .app-body { grid-template-columns: minmax(0, 1fr); }
  .app-sidebar { position: sticky; top: 50px; z-index: 9; height: auto; padding: 4px 8px; overflow: hidden; box-shadow: 0 1px 0 rgba(17, 20, 24, 0.15); }
  .bp6-dark .app-sidebar { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2); }
  /* 4px of room inside the scrollers keeps Blueprint's focus ring (2px + 2px offset) whole. */
  .app-strip { display: flex; overflow-x: auto; scrollbar-width: none; padding: 4px; margin: -4px; }
  .app-strip::-webkit-scrollbar { display: none; }
  .app-strip > .bp6-button { flex: none; }
  .app-strip > .bp6-menu-divider { display: none; }
  .app-navbar .nav-label { display: none; }
  .app-navbar .bp6-button[class*=bp6-icon-]::before { margin-right: 0; }
  .app-main { padding: 16px 16px 64px; }
  .tab-head, .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar .bp6-segmented-control { overflow-x: auto; }
  .tab-head > .bp6-button { align-self: flex-start; }
  .two { grid-template-columns: minmax(0, 1fr); }
  .setting { flex-wrap: wrap; }
  .frames { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Rows stay on one line: the title ellipsizes and the status stays on the right. */
  .bp6-card-list > .row { padding-left: 16px; padding-right: 16px; }
  .bp6-card-list > .row > .row-end { flex: 0 1 auto; max-width: 60%; }
  .bp6-card-list > .row.sub-row { padding-left: 44px; }
  .sticky-save { margin: 0 -16px; padding: 8px 16px; }
  .bp6-tabs .bp6-tab-list { column-gap: 16px; overflow-x: auto; padding: 4px; margin: -4px; }
  .title-row { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
