@font-face {
  font-family: "Pretendard Variable";
  src: url("./assets/PretendardVariable.woff2") format("woff2-variations");
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #edf4f7;
  --canvas: #edf4f7;
  --panel: #ffffff;
  --surface: #ffffff;
  --panel-soft: #f5fafb;
  --soft: #f5fafb;
  --ink: #102033;
  --muted: #66768a;
  --line: #dce6ef;
  --accent: #11867d;
  --accent-dark: #09645f;
  --accent-strong: #075954;
  --accent-soft: #e5f5f2;
  --brand: #11867d;
  --brand-dark: #09645f;
  --brand-soft: #e5f5f2;
  --blue: #1977b9;
  --purple: #6548e8;
  --brand-gradient: var(--brand);
  --gradient: linear-gradient(135deg, #188cc7 0%, #6548e8 100%);
  --radius: 8px;
  --shadow: 0 12px 32px rgba(31, 60, 78, .075);
  --nav-item-width: 104px;
  --font-sans: "Pretendard Variable", "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}

/* Shared operational surfaces: consistent scanning, spacing, and keyboard focus. */
html { scroll-padding-top: 18px; }
html body { background: #f3f6f8; letter-spacing: 0; }
body h1, body h2, body h3, body strong, body p, body button, body input, body select, body textarea { letter-spacing: 0; }
body button, body input, body select, body textarea { font-family: var(--font-sans); }
body button { transition: background-color .14s ease, border-color .14s ease; }
body .portal-header h1, body .topbar h1 { font-size: 25px; letter-spacing: 0; }
body .portal-header, body .topbar { border-radius: 0; border-width: 0 0 1px; background: #fff; box-shadow: none; }
body .portal-status, body .portal-customer-search, body .toolbar, body .review-toolbar,
body .queue-panel, body .table-panel, body .workspace, body .candidate-panel, body .editor-panel,
body .followup-panel, body .admin-panel { border-radius: 0; box-shadow: none; background-color: #fff; }
body .portal-work-card, body .summary-grid article, body .quick-links a, body .release-card { border-radius: 8px; box-shadow: none; }
body :is(.portal-status, .portal-customer-search, .toolbar, .queue-panel, .table-panel, .notice-panel, .followup-panel, .admin-panel, .safety-note, .review-toolbar, .candidate-panel, .editor-panel, .schedule-notice, .calendar-panel, .workspace-panel, .work-card) { border-radius: 8px; }
body :is(.calendar-panel, .workspace-panel, .work-card) { box-shadow: none; }
body .portal-metrics strong, body .summary-grid strong { letter-spacing: 0; }
body .portal-metrics article,
body .followup-shell .summary-grid article,
body .workspace-shell :is(.work-summary, .profile-summary) article {
  display: grid;
  min-height: 64px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
}
body .portal-metrics article strong,
body .followup-shell .summary-grid article strong,
body .workspace-shell :is(.work-summary, .profile-summary) article strong {
  justify-self: end;
  margin: 0;
  font-size: 23px;
  line-height: 1;
}
body :is(.portal-metrics, .summary-grid, .work-summary, .profile-summary) strong { font-variant-numeric: tabular-nums; }
body .work-controls :is(button, input) { border-radius: 6px; }
body button, body input, body select, body textarea, body .ghost-link,
body .topbar-actions > a, body .nav-menu > summary, body .account-menu > summary,
body .nav-popover, body .account-popover, body .account-popover a, body .account-popover button { border-radius: 6px; }
body .topbar-actions > a, body .portal-actions > a, body .nav-menu > summary, body .account-menu > summary { min-height: 38px; padding: 7px 11px; font-size: 13px; font-weight: 600; }
body .topbar-actions a.active, body .portal-actions .ghost-link.active, body .nav-menu summary.active,
body .primary-button, body .review-toolbar button, body .candidate-form .primary, body .login-panel button { background: var(--brand); }
body .primary-button:hover, body .review-toolbar button:hover, body .login-panel button:hover { transform: none; }
body .brand-mark { border-radius: 6px; }
body :is(input,select,textarea):focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; box-shadow: none; }
body button:disabled { cursor: not-allowed; }
body th { font-size: 12px; font-weight: 600; }
body td { line-height: 1.6; }
body tbody tr:hover { background-color: #eff8f6; }
body .session-bar { border-radius: 6px; font-size: 12px; padding: 3px 6px 3px 9px; margin: 0; }
body .session-bar[data-state="active"] { background: #f5f8f9; }
body dialog { border-radius: 8px; }
body .nav-popover, body .account-popover { max-width: calc(100vw - 24px); }
body .candidate-card { position: relative; border: 0; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; border-radius: 0; padding: 15px 13px; }
body .candidate-card.active { border-left-color: var(--brand); }
body .candidate-list { gap: 0; padding: 0; align-content: start; }
body .candidate-date { display: block; margin-top: 7px; color: #526578; font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; }
body .candidate-order { display: block; margin-top: 6px; font-size: 11px; color: var(--brand-dark); }
body .candidate-card > span { line-height: 1.7; margin-top: 7px; }
body .candidate-card small { font-size: 11px; }
body .review-toolbar { flex-wrap: wrap; }
body .review-toolbar label:nth-child(2) { min-width: 180px; }
body .candidate-form { gap: 18px; }
body .candidate-form textarea { min-height: 115px; line-height: 1.8; }
body .candidate-form footer { position: sticky; bottom: 0; padding: 12px 0; border-top: 1px solid var(--line); background: #fff; z-index: 2; }
body .candidate-form .source-panel pre { line-height: 1.8; }
body .safety-note > strong { flex: 0 0 auto; white-space: nowrap; }
body :is(.notice-panel p, .safety-note span, .schedule-notice span, .work-attention-copy small) { word-break: keep-all; overflow-wrap: anywhere; }
body .candidate-panel > header { display: flex; justify-content: space-between; align-items: start; }
body .knowledge-pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
body .knowledge-pager button { padding: 6px 9px; min-height: 32px; border: 1px solid var(--line); color: var(--ink); background: #fff; font-size: 12px; }
body .knowledge-pager span { font-size: 12px; color: var(--muted); }
@media(max-width:900px) {
  body .header-actions, body .portal-header-actions { min-width: 0; flex-wrap: wrap; }
  body .topbar-actions, body .portal-actions { flex-wrap: wrap; overflow: visible; gap: 6px; }
  body .review-toolbar { align-items: stretch; }
  body .import-request-control { min-width: 0; flex: 1 1 180px; }
}
@media(max-width:560px) {
  :root { --nav-item-width: 92px; }
  body .portal-header h1, body .topbar h1 { font-size: 22px; }
  body input, body select, body textarea { font-size: 16px; }
  body .topbar-actions > a, body .portal-actions > a, body .nav-menu > summary { font-size: 12px; padding: 7px 9px; }
  body .candidate-form { padding: 15px; }
  body .candidate-form > header { flex-wrap: wrap; }
  body .review-toolbar label { flex: 1 1 100%; }
  body .review-toolbar label:nth-child(2) { min-width: 0; }
  body .candidate-form footer { grid-template-columns: 1fr 1fr; }
}
@media(pointer:coarse) { body button, body .nav-menu > summary, body .account-menu > summary { min-height: 44px; } }

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 7% 0%, rgba(24, 140, 199, .1), transparent 26rem),
    radial-gradient(circle at 96% 7%, rgba(101, 72, 232, .07), transparent 27rem),
    var(--bg);
  font-family: var(--font-sans);
  font-size: 14px;
}

:focus-visible {
  outline: 3px solid rgba(17, 134, 125, .25);
  outline-offset: 2px;
}

.portal-shell {
  padding: 18px 0 34px;
}

.maintenance-shell,
.followup-shell,
.app-shell {
  padding: 14px;
}

.review-shell {
  margin-top: 14px;
}

.portal-header,
.topbar {
  position: relative;
  z-index: 20;
  overflow: visible;
  border: 1px solid rgba(220, 230, 239, .95);
  border-radius: 18px;
  background: rgba(255, 255, 255, .95);
  box-shadow: var(--shadow);
}

.account-session-group {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
}
.account-session-group > .account-menu { flex: 0 1 auto; min-width: 0; align-self: center; }
.account-session-group > .account-menu > summary { max-width: 100%; }
.session-bar {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  box-sizing: border-box;
  border: 1px solid #dce6ef;
  background: #f7fafc;
  color: #42576b;
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
}
.session-countdown { font-variant-numeric: tabular-nums; min-width: 40px; text-align: center; }
.session-bar button {
  width: auto;
  min-height: 28px;
  padding: 2px 8px;
  border: 1px solid #b5d9d5;
  border-radius: 6px;
  background: #fff;
  color: #087e77;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.session-bar button:disabled { opacity: .65; cursor: wait; }
.session-bar button:focus-visible { outline: 2px solid #087e77; outline-offset: 2px; }
.session-bar[data-state="warning"], .session-bar[data-state="expired"] {
  background: #fff4ee;
  border-color: #edb7a3;
  color: #9c3523;
}
.session-notice {
  position: absolute;
  z-index: 110;
  top: calc(100% + 6px);
  right: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: max-content;
  max-width: min(320px, calc(100vw - 36px));
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #34485b;
  background: #fff;
  box-shadow: 0 8px 24px rgb(31 60 78 / 14%);
  font-size: 12px;
  line-height: 1.5;
}
.session-notice[hidden] { display: none; }
.session-notice[data-tone="warning"], .session-notice[data-tone="error"] { border-color: #edb7a3; color: #783b2f; background: #fff9f6; }
.session-notice[data-tone="success"] { border-color: #b5d9d5; color: var(--brand-dark); background: #f5fbf9; }
.session-message { min-width: 0; word-break: keep-all; overflow-wrap: anywhere; }
.session-dialog-notice {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #edb7a3;
  border-radius: 6px;
  background: #fff9f6;
  color: #783b2f;
  font-size: 13px;
  line-height: 1.5;
}
.session-dialog-notice span { min-width: 0; overflow-wrap: anywhere; }
body .session-dialog-notice button { flex: 0 0 auto; min-height: 36px; white-space: nowrap; }
body .session-dialog-notice button:disabled { opacity: .65; cursor: wait; }
body .session-notice .session-notice-close {
  display: grid;
  flex: 0 0 24px;
  width: 24px;
  min-height: 24px;
  padding: 0;
  place-items: center;
  border: 0;
  color: inherit;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.portal-header {
  margin-bottom: 14px;
  padding: 18px 22px;
}

.topbar {
  padding: 15px 18px;
}

.portal-header h1,
.topbar h1 {
  color: var(--ink);
  font-size: clamp(22px, 2.5vw, 28px);
  letter-spacing: -.035em;
}

.portal-header p,
.eyebrow,
.topbar .eyebrow {
  color: var(--brand);
  font-size: 12px;
  font-weight: 850;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--brand);
  font-size: 18px;
}

.portal-actions,
.topbar-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.header-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

body :is(.portal-actions, .topbar-actions) > :is(a, .nav-menu) {
  flex: 0 0 var(--nav-item-width);
  width: var(--nav-item-width);
}

body :is(.portal-actions, .topbar-actions) > a,
body :is(.portal-actions, .topbar-actions) > .nav-menu > summary {
  display: inline-flex;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding-inline: 6px;
}

body :is(.portal-actions, .topbar-actions) > .nav-menu > summary {
  width: 100%;
}

.portal-actions .ghost-link,
.topbar-actions a,
.topbar-actions .ghost-link,
.nav-menu summary,
.account-menu summary {
  box-sizing: border-box;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: #34485b;
  background: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.topbar-actions a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  place-items: center;
  text-decoration: none;
  white-space: nowrap;
}

.portal-actions .ghost-link:hover,
.topbar-actions a:hover,
.nav-menu summary:hover,
.account-menu summary:hover {
  border-color: rgba(17, 134, 125, .48);
  color: var(--brand-dark);
}

.portal-actions .ghost-link.active,
.topbar-actions a.active,
.topbar-actions .ghost-link.active,
.nav-menu summary.active {
  border-color: transparent;
  color: #fff;
  background: var(--brand-gradient);
}

.nav-menu {
  position: relative;
  flex: 0 0 auto;
}

.nav-menu[open],
.account-menu[open] {
  z-index: 100;
}

.nav-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  list-style: none;
  white-space: nowrap;
  cursor: pointer;
}

.nav-menu summary::-webkit-details-marker {
  display: none;
}

.nav-menu summary::marker,
.account-menu summary::marker {
  content: "";
}

.nav-menu summary::after {
  content: "";
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  margin-top: -3px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .18s ease;
}

.nav-menu[open] summary::after {
  margin-top: 3px;
  transform: rotate(225deg);
}

.nav-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 110;
  display: grid;
  gap: 4px;
  width: 170px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-family: var(--font-sans);
  box-shadow: 0 16px 40px rgba(31, 51, 69, .18);
}

.account-menu {
  position: relative;
  flex: 0 0 auto;
}

.account-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  list-style: none;
  white-space: nowrap;
  cursor: pointer;
}

.account-menu :is(.account-label, #accountLabel) {
  min-width: 0;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-menu summary::-webkit-details-marker {
  display: none;
}

.topbar-actions .nav-popover a,
.portal-actions .nav-popover a {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: flex-start;
  padding: 0 11px;
  border: 0;
  border-radius: 8px;
  color: #34485b;
  background: transparent;
  text-decoration: none;
}

.topbar-actions .nav-popover a:hover,
.portal-actions .nav-popover a:hover,
.topbar-actions .nav-popover a.active,
.portal-actions .nav-popover a.active {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.account-avatar {
  display: grid;
  flex: 0 0 23px;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 8px;
  color: #fff;
  background: var(--brand);
  font-size: 9px;
  line-height: 1;
}

.account-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 110;
  display: grid;
  width: min(280px, calc(100vw - 24px));
  gap: 7px;
  padding: 14px;
  border: 1px solid var(--line);
  border-color: var(--line);
  border-radius: 13px;
  background: #fff;
  font-family: var(--font-sans);
  box-shadow: 0 16px 40px rgba(31, 51, 69, .16);
}

.account-popover strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-popover > span {
  color: var(--muted);
  font-size: 12px;
}

.account-popover a,
.account-popover button {
  display: grid;
  width: 100%;
  min-height: 36px;
  margin: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.account-popover button:hover,
.account-popover a:hover {
  border-color: rgba(17, 134, 125, .42);
  color: var(--brand-dark);
  background: var(--brand-soft);
}

/* Header menus and session notices must stay above the sticky work-delay banner. */
.portal-header:has(.nav-menu[open], .account-menu[open], .session-notice:not([hidden])),
.topbar:has(.nav-menu[open], .account-menu[open], .session-notice:not([hidden])) {
  z-index: 120;
}

.account-popover {
  max-height: min(360px, calc(100vh - 110px));
  overflow-y: auto;
}

.server-monitor {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  min-height: 36px;
  padding: 5px;
  border-radius: 10px;
  background: #f7fafb;
}

.server-monitor span {
  min-height: 24px;
  font-size: 11px;
}

body .workspace-shell .server-monitor span {
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  color: #465769;
  background: #fff;
  font-weight: 800;
}

body .workspace-shell .server-monitor .status-dot::before {
  content: "";
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: #94a3ad;
}

body .workspace-shell .server-monitor .status-dot.connected::before { background: var(--brand); }
body .workspace-shell .server-monitor .status-dot.warning::before { background: #c74732; }

.server-monitor .status-dot::before {
  background: var(--brand);
}

.portal-status,
.portal-customer-search,
.portal-work-card,
.quick-links a,
.summary-grid article,
.toolbar,
.queue-panel,
.table-panel,
.notice-panel,
.followup-panel,
.admin-panel,
.workspace,
.safety-note,
.review-toolbar,
.candidate-panel,
.editor-panel,
.release-card,
.login-panel {
  border-color: var(--line);
  border-radius: 16px;
  background-color: rgba(255, 255, 255, .97);
  box-shadow: var(--shadow);
}

.portal-status,
.portal-customer-search,
.portal-work-card,
.quick-links a {
  border-radius: 15px;
}

.portal-metrics article,
.summary-grid article {
  min-height: 76px;
  padding: 13px 15px;
}

.portal-metrics strong,
.summary-grid strong {
  margin-top: 5px;
  font-size: 23px;
  letter-spacing: -.03em;
}

.portal-metrics span,
.summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.portal-customer-search,
.toolbar,
.review-toolbar {
  padding: 12px 14px;
}

.toolbar {
  top: 6px;
}

input,
select,
textarea,
.toolbar input,
.toolbar select,
dialog input,
dialog select,
dialog textarea {
  border-color: var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
}

input:focus,
select:focus,
textarea:focus,
.toolbar input:focus,
.toolbar select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(17, 134, 125, .1);
  outline: 0;
}

button,
.primary-button,
.secondary-button,
.danger-button,
.filter-toggle {
  border-radius: 10px;
}

.primary-button,
.notice-panel button,
.admin-panel button,
.review-toolbar button,
.candidate-form .primary,
.login-panel button {
  border-color: transparent;
  color: #fff;
  background: var(--brand-gradient);
}

.secondary-button,
.filter-toggle {
  border-color: var(--line);
  color: #34485b;
  background: #fff;
}

body :is(.schedule-shell .calendar-filters, .review-shell .review-toolbar) #refreshButton {
  border: 1px solid var(--line);
  color: #34485b;
  background: #fff;
}

.primary-button:hover,
.notice-panel button:hover,
.review-toolbar button:hover,
.login-panel button:hover {
  filter: brightness(.96);
  transform: translateY(-1px);
}

.panel-header,
.followup-panel > header,
.candidate-panel > header {
  border-color: var(--line);
}

.notice-panel,
.safety-note {
  color: var(--brand-dark);
  background: #ecf8f6;
  box-shadow: none;
}

.notice-icon,
.result-count {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.review-workspace {
  gap: 10px;
}

.candidate-panel,
.editor-panel {
  min-height: 580px;
}

.candidate-card:hover,
.candidate-card.active {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.login-shell {
  padding: 18px;
}

.login-panel {
  width: min(390px, 100%);
  padding: 24px;
}

.login-brand {
  margin-bottom: 22px;
}

.login-brand h1 {
  font-size: 22px;
  letter-spacing: -.03em;
}

.login-panel button {
  min-height: 42px;
}

dialog {
  border-color: var(--line);
  border-radius: 17px;
  box-shadow: 0 24px 70px rgba(27, 48, 66, .2);
}

.toast-stack {
  position: fixed;
  z-index: 10000;
  top: 16px;
  right: auto;
  bottom: auto;
  left: 50%;
  display: grid;
  width: min(420px, calc(100vw - 24px));
  gap: 8px;
  justify-items: stretch;
  transform: translateX(-50%);
  pointer-events: none;
}

.toast-stack .toast {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  pointer-events: auto;
  animation: shared-toast-in 180ms cubic-bezier(.22, 1, .36, 1);
}

.global-operation-status {
  position: fixed;
  z-index: 1000;
  top: max(70px, calc(env(safe-area-inset-top) + 54px));
  left: 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(520px, calc(100vw - 32px));
  padding: 11px 16px;
  border: 1px solid rgb(18 128 117 / 18%);
  border-radius: 999px;
  color: #17324a;
  background: rgb(255 255 255 / 96%);
  box-shadow: 0 12px 34px rgb(35 58 77 / 18%);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -14px);
  transition: opacity 160ms ease, transform 200ms cubic-bezier(.22, 1, .36, 1);
  backdrop-filter: blur(10px);
}

.global-operation-status.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.global-operation-spinner {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 2px solid rgb(18 128 117 / 22%);
  border-top-color: #128075;
  border-radius: 50%;
  animation: global-operation-spin 700ms linear infinite;
}

.global-operation-status[data-mode="success"] .global-operation-spinner,
.global-operation-status[data-mode="error"] .global-operation-spinner {
  border: 0;
  animation: none;
}

.global-operation-status[data-mode="success"] .global-operation-spinner::before {
  content: "✓";
  color: #128075;
}

.global-operation-status[data-mode="error"] {
  border-color: rgb(180 35 24 / 24%);
  color: #9d251c;
  background: rgb(255 247 246 / 97%);
}

.global-operation-status[data-mode="error"] .global-operation-spinner::before {
  content: "!";
  color: #b42318;
}

button.operation-pending {
  cursor: wait !important;
  opacity: .78;
}

button.operation-pending::after {
  content: "";
  display: inline-block;
  width: .8em;
  height: .8em;
  margin-left: .55em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -.08em;
  animation: global-operation-spin 700ms linear infinite;
}

@keyframes global-operation-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .global-operation-status { transition: none; }
  .global-operation-spinner,
  button.operation-pending::after { animation-duration: 1400ms; }
}

@keyframes shared-toast-in {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 900px) {
  .portal-shell {
    padding-top: 9px;
  }

  .maintenance-shell,
  .followup-shell,
  .app-shell {
    padding: 9px;
  }

  .portal-header,
  .topbar {
    border-radius: 16px;
  }

  .portal-actions,
  .topbar-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
    overflow: visible;
  }

  .portal-actions::-webkit-scrollbar,
  .topbar-actions::-webkit-scrollbar {
    display: none;
  }

  .portal-actions .ghost-link,
  .topbar-actions > a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .nav-popover {
    right: auto;
    left: 0;
  }
}

@media (min-width: 561px) and (max-width: 900px) {
  :root { --nav-item-width: 100px; }
}

@media (min-width: 561px) and (max-width: 1280px) {
  body :is(.portal-shell, .maintenance-shell, .followup-shell, .app-shell, .schedule-shell, .workspace-shell, .review-shell, .release-shell, .shell) > :is(.portal-header, .topbar) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px 14px;
  }

  body :is(.portal-header, .topbar) > :first-child {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  body :is(.portal-header, .topbar) > :is(.portal-header-actions, .header-actions) {
    display: contents;
  }

  body :is(.portal-header-actions, .header-actions) > :is(.portal-actions, .topbar-actions) {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    overflow: visible;
  }

  body :is(.portal-header-actions, .header-actions) > :is(.account-menu, .account-session-group) {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: center;
  }

  body .topbar > .server-monitor {
    grid-column: 1 / -1;
    grid-row: 3;
  }
}

@media (max-width: 560px) {
  body :is(.portal-header-actions, .header-actions):has(> .account-session-group) {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  body :is(.portal-header-actions, .header-actions) > .account-session-group {
    align-self: flex-end;
  }

  .account-session-group .account-label { max-width: 75px; }

  .toast-stack {
    top: 8px;
    width: calc(100vw - 16px);
  }

  .portal-header,
  .topbar {
    padding: 14px;
  }

  .portal-header h1,
  .topbar h1 {
    font-size: 21px;
  }

  .portal-metrics article,
  .summary-grid article {
    min-height: 68px;
    padding: 11px 12px;
  }

  .portal-metrics strong,
  .summary-grid strong {
    font-size: 20px;
  }
}

@media (pointer: coarse) {
  body .session-bar button { min-height: 36px; }
}

/* Keep the page edges aligned with the schedule across all main screens. */
body > :is(.portal-shell, .schedule-shell, .workspace-shell, .maintenance-shell, .followup-shell, .app-shell, .review-shell, .release-shell, .shell) {
  box-sizing: border-box;
  width: min(1840px, calc(100% - 32px));
  max-width: none;
  margin-inline: auto;
  padding-inline: 0;
}

@media (max-width: 900px) {
  body > :is(.portal-shell, .schedule-shell, .workspace-shell, .maintenance-shell, .followup-shell, .app-shell, .review-shell, .release-shell, .shell) {
    width: calc(100% - 18px);
  }
}

@media (max-width: 860px) {
  body > .app-shell > .topbar { margin-inline: 0; }
}
