@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/google-sans-medium-latin-4af1c9b42a0e71e284250ad1559be9f16d5e36af26f7affc4d6cb11c10860a1e.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --line: #d7dde5;
  --text: #1f2937;
  --subtle: #5f6b7a;
  --accent: #1858b8;
  --accent-soft: #e7f0ff;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.app-shell-header {
  background: #0f172a;
  color: #fff;
}

.app-shell-nav {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: #fff;
  font-size: 1.125rem;
  font-weight: 700;
  padding: 0.25rem 0.45rem;
  background: #fff;
  border-radius: 8px;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-logo {
  display: block;
  height: 1.75rem;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-links a {
  color: #dbe3f1;
}

.app-shell-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem;
}

.impersonation-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #e7f0ff 0%, #f8fbff 100%);
  border: 1px solid #bfd3f6;
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.impersonation-banner__body {
  display: grid;
  gap: 0.45rem;
}

.impersonation-banner__badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(3, 105, 161, 0.12);
  color: #0f3d69;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.impersonation-banner__detail {
  margin: 0;
  color: #274064;
}

.impersonation-banner__exit {
  flex-shrink: 0;
}

.admin-operator-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem 1.25rem;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.admin-operator-bar p {
  margin: 0.2rem 0 0;
  color: var(--subtle);
}

.admin-operator-bar__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.account-switcher {
  position: relative;
}

.account-switcher[open] .account-switcher__summary {
  background: #0b2042;
  border-color: #284875;
}

.account-switcher__summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 220px;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(219, 227, 241, 0.2);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.account-switcher__summary::-webkit-details-marker {
  display: none;
}

.account-switcher__summary:hover {
  box-shadow: 0 10px 20px rgba(2, 6, 23, 0.22);
}

.account-switcher__label {
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: #a5b4cf;
  text-transform: uppercase;
}

.account-switcher__value {
  font-weight: 600;
  color: #f8fafc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-switcher__menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  width: min(360px, calc(100vw - 2rem));
  padding: 0.9rem;
  border: 1px solid #d7dde5;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.18);
  z-index: 40;
}

.account-switcher[open] .account-switcher__menu {
  display: block;
}

.account-switcher__section + .account-switcher__section {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid #e8edf3;
}

.account-switcher__section-label {
  margin-bottom: 0.5rem;
  color: #475569;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.account-switcher__identity {
  display: grid;
  gap: 0.15rem;
}

.account-switcher__identity span {
  color: var(--subtle);
  font-size: 0.88rem;
}

.account-switcher__action {
  width: 100%;
  margin-top: 0.65rem;
}

.account-switcher__list {
  display: grid;
  gap: 0.55rem;
}

.account-switcher__item {
  width: 100%;
  display: grid;
  gap: 0.15rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid #d7dde5;
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.account-switcher__item strong {
  color: #0f172a;
}

.account-switcher__item span {
  color: #5f6b7a;
  font-size: 0.9rem;
}

.account-switcher__item:hover,
.account-switcher__item:focus-visible {
  border-color: #8fb4e5;
  background: #f8fbff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.operator-note {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.operator-note p {
  margin: 0;
}

.page-header,
.panel-header-inline {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.page-header {
  margin-bottom: 1.5rem;
}

.subtle {
  color: var(--subtle);
}

.panel,
.error-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.panel-flat {
  border-radius: 10px;
  box-shadow: none;
}

.sheet-document {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2rem 2.5rem;
  margin-bottom: 1.25rem;
  max-width: 900px;
  margin-inline: auto;
  font-size: 0.875rem;
  line-height: 1.6;
}

.legacy-sheet-document {
  max-width: 1120px;
  color: #1f2937;
  font-size: 0.78rem;
  line-height: 1.28;
  padding: 1.4rem 1.6rem;
}

.legacy-sheet-document__header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.legacy-sheet-document__header h1 {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.legacy-sheet-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin-bottom: 0.9rem;
}

.legacy-sheet-table th,
.legacy-sheet-table td {
  border: 1px solid #3f3f46;
  padding: 0.3rem 0.34rem;
  vertical-align: middle;
  background: #fff;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.legacy-sheet-table th {
  font-weight: 600;
}

.legacy-sheet-table th.legacy-sheet-table__label,
.legacy-sheet-table th.legacy-sheet-table__section {
  background: #c8d9eb;
  font-weight: 600;
}

.legacy-sheet-table__section {
  text-align: center;
  width: 3.7rem;
}

.legacy-sheet-table__section--vertical {
  writing-mode: vertical-rl;
  text-orientation: upright;
  letter-spacing: 0.08em;
  line-height: 1.15;
  white-space: nowrap;
}

.legacy-sheet-table__center {
  text-align: center;
}

.legacy-sheet-table__multiline {
  vertical-align: top;
  line-height: 1.38;
  white-space: pre-line;
}

.legacy-sheet-table__pr {
  min-height: 6rem;
}

.legacy-sheet-table--profile .legacy-sheet-table__label {
  width: 6.2rem;
}

.legacy-sheet-table--profile td {
  min-height: 2.3rem;
}

.legacy-sheet-table--project-summary .legacy-sheet-table__no,
.legacy-sheet-table--experience .legacy-sheet-table__no {
  width: 2.1rem;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

.legacy-sheet-table--project-summary .legacy-sheet-table__role {
  width: 12rem;
}

.legacy-sheet-table--experience .legacy-sheet-table__period {
  width: 8.8rem;
}

.legacy-sheet-table--experience .legacy-sheet-table__stack {
  width: 7.8rem;
}

.legacy-sheet-table--experience .legacy-sheet-table__infra {
  width: 5.8rem;
}

.legacy-sheet-table--experience .legacy-sheet-table__stage {
  width: 2.6rem;
}

.legacy-sheet-table--experience .legacy-col-section {
  width: 7%;
}

.legacy-sheet-table--experience .legacy-col-no {
  width: 4.5%;
}

.legacy-sheet-table--experience .legacy-col-period {
  width: 15%;
}

.legacy-sheet-table--experience .legacy-col-work {
  width: 35.5%;
}

.legacy-sheet-table--experience .legacy-col-stack {
  width: 15%;
}

.legacy-sheet-table--experience .legacy-col-infra {
  width: 11%;
}

.legacy-sheet-table--experience .legacy-col-stage {
  width: 4%;
}

.legacy-sheet-table__stage-group,
.legacy-sheet-table__stage-label {
  line-height: 1.12;
  word-break: keep-all;
  overflow-wrap: normal;
}

.legacy-sheet-table__stage-label {
  font-size: 0.72rem;
}

.legacy-period-block {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 6.2rem;
  padding: 0.72rem 0.34rem 0.6rem;
  text-align: center;
}

.legacy-sheet-table td.legacy-sheet-table__period-cell {
  padding: 0;
  vertical-align: middle;
}

.legacy-period-block__duration {
  display: block;
  padding-bottom: 0.34rem;
  font-size: 0.94rem;
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.legacy-period-block__range {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.08rem;
  padding-top: 0.3rem;
  border-top: 1px solid #52525b;
  font-size: 0.82rem;
  line-height: 1.14;
}

.legacy-period-block__date {
  white-space: nowrap;
}

.legacy-period-block__separator {
  line-height: 0.9;
}

.legacy-experience-row__project {
  font-weight: 600;
  vertical-align: top;
}

.legacy-experience-row--detail td {
  vertical-align: top;
}

.legacy-sheet-table__stack-cell,
.legacy-sheet-table__infra-cell {
  text-align: center;
}

.legacy-sheet-table__stage-mark {
  font-size: 1rem;
  font-weight: 400;
  white-space: nowrap;
}

.legacy-work-lines {
  white-space: normal;
}

.legacy-work-line {
  display: block;
}

.legacy-work-line--body + .legacy-work-line--body {
  margin-top: 0.22rem;
  padding-top: 0.22rem;
  border-top: 1px dotted #9ca3af;
}

.legacy-work-line--heading {
  margin-top: 0.46rem;
  font-weight: 600;
}

.legacy-work-line--heading + .legacy-work-line--section-body {
  margin-top: 0.18rem;
}

.legacy-work-line--section-body + .legacy-work-line--section-body {
  margin-top: 0.12rem;
  padding-top: 0;
  border-top: 0;
}

.legacy-work-line--spacer {
  min-height: 0.34rem;
}

.pdf-layout .legacy-sheet-document {
  width: 190mm;
  max-width: none;
  margin: 0 auto;
  padding: 0;
  border: 0;
  font-size: 0.62rem;
  line-height: 1.2;
}

.pdf-layout .legacy-sheet-document__header {
  margin-bottom: 0.55rem;
}

.pdf-layout .legacy-sheet-document__header h1 {
  font-size: 1.45rem;
}

.pdf-layout .legacy-sheet-table {
  margin-bottom: 0.4rem;
}

.pdf-layout .legacy-sheet-table th,
.pdf-layout .legacy-sheet-table td {
  padding: 0.14rem 0.18rem;
}

.pdf-layout .legacy-sheet-table__section {
  width: 2.7rem;
}

.pdf-layout .legacy-sheet-table--project-summary .legacy-sheet-table__role {
  width: 8.8rem;
}

.pdf-layout .legacy-sheet-table--experience .legacy-sheet-table__period {
  width: 6.9rem;
}

.pdf-layout .legacy-sheet-table--experience .legacy-sheet-table__stack {
  width: 6rem;
}

.pdf-layout .legacy-sheet-table--experience .legacy-sheet-table__infra {
  width: 4.7rem;
}

.pdf-layout .legacy-sheet-table--experience .legacy-sheet-table__stage {
  width: 1.8rem;
}

.pdf-layout .legacy-sheet-table__stage-label {
  font-size: 0.58rem;
}

.pdf-layout .legacy-sheet-table__stage-mark {
  font-size: 0.82rem;
}

.pdf-layout .legacy-period-block {
  min-height: 4.7rem;
  padding: 0.38rem 0.2rem 0.34rem;
}

.pdf-layout .legacy-period-block__duration {
  padding-bottom: 0.2rem;
  font-size: 0.74rem;
}

.pdf-layout .legacy-period-block__range {
  padding-top: 0.18rem;
  font-size: 0.64rem;
}

.profile-meta-panel .definition-list {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 1rem 0 0;
}

.profile-meta-panel .definition-list div {
  grid-template-columns: auto 1fr;
  padding: 0.75rem 0.9rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.profile-version-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 1.25rem;
  align-items: start;
}

.profile-version-layout__document {
  min-width: 0;
}

.profile-version-layout__document .sheet-document {
  max-width: none;
  margin-inline: 0;
}

.version-rail {
  position: sticky;
  top: 1.25rem;
  padding-left: 1.25rem;
  border-left: 1px solid #cdd8e8;
}

.version-rail__header {
  padding-bottom: 0.9rem;
  border-bottom: 1px solid #e3eaf4;
}

.version-rail__header h2,
.version-rail__header p,
.version-rail__empty p {
  margin: 0;
}

.version-rail__header h2 {
  margin-top: 0.2rem;
}

.version-rail__eyebrow {
  color: #164a99;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.version-rail__current {
  display: grid;
  gap: 0.25rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid #e3eaf4;
}

.version-rail__action {
  padding: 0.9rem 0;
  border-bottom: 1px solid #e3eaf4;
}

.version-rail__action form,
.version-rail__action .button {
  width: 100%;
}

.version-rail__current span {
  color: #164a99;
  font-size: 0.76rem;
  font-weight: 700;
}

.version-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0 0 0 0.85rem;
  border-left: 1px solid #d7e2f0;
}

.version-list__item {
  position: relative;
}

.version-list__item::before {
  content: "";
  position: absolute;
  top: 0.95rem;
  left: calc(-0.85rem - 4px);
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #164a99;
}

.version-list__item + .version-list__item {
  margin-top: 0.85rem;
}

.version-entry {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: start;
  padding: 0.1rem 0 0.2rem;
  color: var(--text);
  text-decoration: none;
  transition: color 180ms ease;
}

.version-entry:hover,
.version-entry:focus-visible {
  color: var(--accent);
  text-decoration: none;
}

.version-entry:focus-visible {
  outline: 3px solid rgba(3, 105, 161, 0.22);
  outline-offset: 4px;
}

.version-entry__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  color: #164a99;
  font-size: 0.8rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.version-entry__body {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.version-entry__body strong {
  overflow-wrap: anywhere;
}

.version-entry__body span {
  color: var(--subtle);
  font-size: 0.78rem;
}

.version-rail__empty {
  display: grid;
  gap: 0.35rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed #b7c4d6;
}

.version-rail__empty p {
  color: var(--subtle);
}

.grid-two {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr 1fr;
}

.layout-edit {
  align-items: start;
}

.layout-edit-asymmetric {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.95fr);
  align-items: start;
}

.edit-main {
  min-width: 0;
}

.edit-preview-aside {
  min-width: 0;
}

.edit-preview-aside details {
  position: sticky;
  top: 1.25rem;
}

.preview-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  padding: 0.9rem 1rem;
  margin-bottom: 0.75rem;
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.preview-toggle::-webkit-details-marker {
  display: none;
}

.edit-workflow-notice {
  background: #f8fbfd;
  border: 1px solid #d9e3ef;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: 1.25rem;
}

.edit-workflow-notice h2,
.section-heading h2,
.edit-guide-card h3 {
  margin: 0;
}

.edit-workflow-notice p,
.section-heading p {
  margin-bottom: 0;
}

.edit-workflow-notice__lead {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
}

.edit-workflow-notice__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: #dbeafe;
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 700;
}

.edit-workflow-notice__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.edit-guide-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid #d7e4fb;
  border-radius: 12px;
  padding: 1rem;
}

.edit-guide-card ul {
  margin-top: 0.75rem;
}

.edit-guide-card--plain {
  background: transparent;
  border: 0;
  border-left: 3px solid #d7e4fb;
  border-radius: 0;
  padding: 0 0 0 0.9rem;
}

.section-heading {
  margin-bottom: 1rem;
}

.form-save-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
  padding: 0.9rem 1rem;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  border-radius: 14px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.24);
}

.form-save-bar__copy {
  min-width: 0;
}

.form-save-bar__title,
.form-save-bar__status {
  margin: 0;
}

.form-save-bar__title {
  font-weight: 700;
}

.form-save-bar__status {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.92rem;
}

.form-save-bar.is-dirty {
  position: sticky;
  bottom: 1rem;
  z-index: 20;
  background: linear-gradient(135deg, #0f3b75, #164a99);
}

.form-save-bar.is-dirty .form-save-bar__status {
  color: #dbeafe;
}

.profile-summary-strip {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 1rem 0;
}

.profile-summary-strip div {
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.85rem 1rem;
}

.profile-summary-strip dt {
  color: var(--subtle);
  font-size: 0.82rem;
}

.profile-summary-strip dd {
  margin: 0.35rem 0 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.profile-summary-strip--flat {
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0.35rem 0;
}

.profile-summary-strip--flat div {
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  padding: 0.75rem 0.9rem;
}

.profile-summary-strip--flat div:last-child {
  border-right: 0;
}

.edit-guide-inline {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.edit-guide-inline div {
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
}

.edit-guide-inline--muted {
  gap: 0.6rem 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.edit-guide-inline--muted div {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: var(--subtle);
}

.sheet-profile-section--basic {
  padding-bottom: 1rem;
}

.sheet-profile-workbench {
  padding: 0.9rem 1rem 1rem;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.field-grid-compact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: end;
}

.field-grid > .month-range-fields {
  grid-column: 1 / -1;
}

.month-range-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.experience-form-flow {
  display: grid;
  gap: 1rem;
}

.experience-form-flow__period {
  min-width: 0;
}

.experience-form-flow__period .month-range-fields {
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.experience-form-flow__role-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.full-width {
  grid-column: 1 / -1;
}

.toggle-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.form-hint {
  margin: 0.45rem 0 0;
  color: var(--subtle);
  font-size: 0.9rem;
}

.form-errors {
  margin-bottom: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid #fecdd3;
  border-radius: 10px;
  background: #fff1f2;
  color: #9f1239;
}

.form-errors p {
  margin: 0 0 0.4rem;
  font-weight: 700;
}

.form-errors ul {
  margin: 0;
  padding-left: 1.1rem;
}

.mode-hint-list {
  margin: 0.45rem 0 0;
  padding-left: 1.1rem;
}

.mode-hint-list li + li {
  margin-top: 0.25rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  font: inherit;
  background: #fff;
}

textarea {
  resize: vertical;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  background: #fff;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.button:hover {
  text-decoration: none;
  border-color: #b7c4d6;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(3, 105, 161, 0.22);
  outline-offset: 2px;
}

.button-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.button-primary:hover {
  background: #164a99;
  border-color: #164a99;
  color: #fff;
}

.impersonation-start-button {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

.impersonation-start-button:hover {
  background: #1e293b;
  border-color: #1e293b;
  color: #fff;
}

.button-small {
  padding: 0.35rem 0.7rem;
  font-size: 0.875rem;
}

.actions,
.actions-inline {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.sheet-table {
  width: 100%;
  border-collapse: collapse;
}

.sheet-table th,
.sheet-table td {
  border: 1px solid var(--line);
  padding: 0.75rem;
  vertical-align: top;
  text-align: left;
}

.sheet-table th {
  background: #f7f9fc;
}

.sheet-table-edit th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.sheet-table-workbench {
  margin-top: 1rem;
}

.sheet-table-workbench th {
  background: #eef3f8;
  font-size: 0.84rem;
  letter-spacing: 0.01em;
}

.sheet-table-workbench td {
  background: #fff;
}

.experience-config-cell {
  min-width: 22rem;
}

.experience-config-meta {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.45rem 0.75rem;
  margin-top: 0.85rem;
}

.experience-config-meta dt {
  color: var(--subtle);
  font-size: 0.82rem;
}

.experience-config-meta dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.toggle-cell {
  width: 9.5rem;
}

.toggle-choice {
  display: grid;
  gap: 0.45rem;
  justify-items: start;
  font-weight: 500;
}

.toggle-choice input {
  width: auto;
}

.toggle-choice-danger span {
  color: #9f1239;
}

tr.is-excluded {
  background: #fff8f8;
}

.sheet-meta {
  display: grid;
  gap: 0.35rem;
}

.sheet-meta div,
.definition-list div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.5rem;
}

.sheet-section {
  margin-top: 1.5rem;
}

.sheet-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  background: #fbfcfe;
}

.plain-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.plain-list li + li {
  margin-top: 0.5rem;
}

.experience-card + .experience-card {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.experience-body {
  display: grid;
  gap: 0.75rem;
}

.flash {
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.flash.notice {
  background: var(--accent-soft);
  color: var(--accent);
}

.flash.alert {
  background: #fdecec;
  color: var(--danger);
}

/* Tech category card panel */

.tech-category {
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f9fc;
  margin-bottom: 0.75rem;
}

/* Category label above chips */
.tech-category__label {
  display: block;
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--subtle);
}

/* Tech chip selectable pills */

.tech-chip-group {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.tech-choice {
  display: grid;
  align-self: flex-start;
  gap: 0.35rem;
  position: relative;
}

.tech-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 400;
  margin-bottom: 0;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7f9fc;
  color: var(--subtle);
  font-size: 0.83rem;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.tech-choice__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tech-chip__label {
  min-width: 0;
}

.tech-chip__version {
  display: inline-flex;
  align-items: center;
  min-height: 1.2rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: #dbeafe;
  color: #164a99;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
}

.tech-chip__version.is-empty {
  background: transparent;
  color: currentColor;
  padding: 0;
}

/* Hover state */
.tech-chip:hover {
  border-color: #8fb4e5;
  background: #f0f6ff;
  color: var(--text);
}

/* Checked / selected state */
.tech-choice__input:checked + .tech-chip {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

/* Keyboard focus-visible state */
.tech-chip:focus-visible {
  outline: 3px solid rgba(3, 105, 161, 0.28);
  outline-offset: 2px;
}

.tech-version-picker {
  display: none;
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 13rem;
  padding: 0.55rem;
  border: 1px solid #bfd2ea;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
}

.tech-choice.is-editing .tech-version-picker {
  display: block;
}

.tech-version-picker__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}

.tech-version-picker__label {
  margin: 0;
  color: var(--subtle);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.tech-version-picker__actions {
  display: inline-flex;
  gap: 0.5rem;
}

.tech-version-picker__action {
  border: 0;
  background: transparent;
  color: var(--subtle);
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  padding: 0;
}

.tech-version-picker__action:hover,
.tech-version-picker__action:focus-visible {
  color: var(--text);
}

.tech-version-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tech-version-chip {
  display: inline-flex;
  font-weight: 500;
  margin: 0;
}

.tech-version-chip input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tech-version-chip span {
  display: inline-block;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--subtle);
  font-size: 0.78rem;
  line-height: 1.35;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.tech-version-chip:hover span {
  border-color: #8fb4e5;
  color: var(--text);
}

.tech-version-chip input[type="checkbox"]:checked + span {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

.tech-version-chip input[type="checkbox"]:focus-visible + span {
  outline: 3px solid rgba(3, 105, 161, 0.28);
  outline-offset: 2px;
}

.position-input {
  width: 5rem;
}

/* Pagination */

nav.pagination,
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: fit-content;
  max-width: 100%;
  margin: 1rem auto;
  padding: 0.25rem;
  list-style: none;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(215, 221, 229, 0.9);
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.pagination > span {
  display: inline-flex;
}

.pagination a,
.pagination .current,
.pagination .gap,
.pagination .disabled {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.85rem;
  height: 1.85rem;
  padding: 0 0.5rem;
  border: 1px solid transparent;
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  line-height: 1;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, color 150ms ease, transform 150ms ease;
}

.pagination .page a,
.pagination .page.current,
.pagination .gap {
  min-width: 1.85rem;
  padding: 0;
}

.pagination .page a,
.pagination .page.current {
  font-weight: 700;
}

.pagination .first a,
.pagination .prev a,
.pagination .next a,
.pagination .last a,
.pagination .first.disabled,
.pagination .prev.disabled,
.pagination .next.disabled,
.pagination .last.disabled {
  min-width: 2rem;
  overflow: hidden;
  text-indent: -999px;
  white-space: nowrap;
}

.pagination .first a,
.pagination .first.disabled {
  border-radius: 8px 0 0 8px;
}

.pagination .last a,
.pagination .last.disabled {
  border-radius: 0 8px 8px 0;
}

.pagination .first a::before,
.pagination .prev a::before,
.pagination .next a::before,
.pagination .last a::before,
.pagination .first.disabled::before,
.pagination .prev.disabled::before,
.pagination .next.disabled::before,
.pagination .last.disabled::before {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: currentColor;
  font-size: 0.8rem;
  font-weight: 700;
  text-indent: 0;
}

.pagination .first a::before,
.pagination .first.disabled::before {
  content: "<<";
}

.pagination .prev a::before,
.pagination .prev.disabled::before {
  content: "<";
}

.pagination .next a::before,
.pagination .next.disabled::before {
  content: ">";
}

.pagination .last a::before,
.pagination .last.disabled::before {
  content: ">>";
}

.pagination a:hover {
  z-index: 1;
  background: var(--accent-soft);
  border-color: rgba(24, 88, 184, 0.18);
  color: var(--accent);
  text-decoration: none;
  box-shadow: 0 3px 8px rgba(24, 88, 184, 0.1);
  transform: translateY(-1px);
}

.pagination a:focus-visible {
  z-index: 2;
  outline: 2px solid rgba(24, 88, 184, 0.24);
  outline-offset: 1px;
}

.pagination .current {
  z-index: 1;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 3px 8px rgba(24, 88, 184, 0.18);
  pointer-events: none;
}

.pagination .gap,
.pagination .disabled {
  color: var(--subtle);
  background: #f3f6fa;
  cursor: default;
  pointer-events: none;
}

@media (max-width: 640px) {
  nav.pagination,
  .pagination {
    width: 100%;
    border-radius: 10px;
  }

  .pagination a,
  .pagination .current,
  .pagination .gap,
  .pagination .disabled {
    min-width: 1.75rem;
    height: 1.75rem;
  }
}

.page-break-before {
  break-before: page;
}

.pdf-layout {
  background: #fff;
}

/* ── Control Center: /sheet_profiles/:id/edit ── */

.ctrl-center {
  display: grid;
  gap: 0;
}

/* Summary strip */
.ctrl-summary-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f7f9fc;
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.ctrl-summary-strip > * {
  flex: 1 1 10rem;
  padding: 0.6rem 1rem;
  border-right: 1px solid var(--line);
}

.ctrl-summary-strip dt,
.ctrl-summary-strip dd {
  margin: 0;
}

.ctrl-summary-strip dt {
  color: var(--subtle);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.ctrl-summary-strip dd {
  margin-top: 0.25rem;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 700;
}

.ctrl-summary-strip > *:last-child {
  border-right: 0;
}

/* Body: two-column layout */
.ctrl-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 0 1.5rem;
  align-items: start;
}

/* Operations area */
.ctrl-ops {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.ctrl-ops__heading {
  margin: 0;
  padding: 0.55rem 0.9rem;
  background: #eef2f7;
  border-bottom: 1px solid var(--line);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--subtle);
}

.ctrl-ops__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Task row: dense action row */
.ctrl-task {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--line);
  transition: background-color 150ms ease;
}

.ctrl-task:last-child {
  border-bottom: 0;
}

.ctrl-task:hover {
  background: #f7f9fc;
}

.ctrl-task__meta {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex: 1 1 0;
  min-width: 0;
}

.ctrl-task__index {
  flex-shrink: 0;
  min-width: 1.5rem;
  font-size: 0.72rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--subtle);
  letter-spacing: 0.04em;
}

.ctrl-task__label {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ctrl-task__desc {
  color: var(--subtle);
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.ctrl-task > .button,
.ctrl-task > form > .button {
  flex-shrink: 0;
  border-radius: 3px;
  padding: 0.3rem 0.7rem;
  font-size: 0.82rem;
}

/* Guide rail */
.ctrl-guide {
  position: sticky;
  top: 1.25rem;
  border-left: 2px solid var(--line);
  padding-left: 1rem;
}

.ctrl-guide__heading {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--subtle);
}

.ctrl-guide__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.ctrl-guide__note {
  font-size: 0.82rem;
  color: var(--subtle);
  line-height: 1.45;
  padding: 0.55rem 0.65rem;
  border-left: 2px solid var(--line);
  background: #f7f9fc;
}

.ctrl-task > .button:focus-visible,
.ctrl-task > form > .button:focus-visible {
  outline: 3px solid rgba(3, 105, 161, 0.28);
  outline-offset: 2px;
}

@media (max-width: 960px) {
  .ctrl-body {
    grid-template-columns: 1fr;
  }

  .ctrl-guide {
    position: static;
    border-left: 0;
    border-top: 2px solid var(--line);
    padding-left: 0;
    padding-top: 1rem;
    margin-top: 1rem;
  }

  .ctrl-summary-strip > * {
    flex: 1 1 8rem;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .ctrl-task__desc {
    display: none;
  }
}

/* Admin Workflow Guide — pipeline diagram */

.admin-flow-guide {
  max-width: 1120px;
  margin-inline: auto;
  padding: 1.5rem 0;
}

.admin-flow-guide__header {
  margin-bottom: 2rem;
}

.admin-flow-guide__eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.admin-flow-guide__header h1 {
  margin: 0 0 0.4rem;
  font-size: 1.4rem;
}

.admin-flow-guide__lead {
  margin: 0;
  color: var(--subtle);
}

/* Pipeline diagram */

.admin-pipeline-diagram {
  overflow-x: auto;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.admin-pipeline-track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0;
  min-width: 1040px;
}

/* Connector between stages */

.admin-pipeline-connector {
  flex-shrink: 0;
  align-self: center;
  width: 2.4rem;
  height: 2px;
  background: var(--line);
  position: relative;
}

.admin-pipeline-connector::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-left-color: var(--line);
}

/* Stage card */

.admin-pipeline-stage {
  flex: 0 0 150px;
  min-width: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}

.admin-pipeline-stage--check {
  border-color: var(--accent);
}

.admin-pipeline-stage--done {
  border-color: #3cad68;
}

.admin-pipeline-stage__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.6rem;
  background: #f3f6fa;
  border-bottom: 1px solid var(--line);
}

.admin-pipeline-stage__num {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--subtle);
}

.admin-pipeline-stage__status {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
}

.admin-pipeline-stage__status--ready {
  background: var(--accent-soft);
  color: var(--accent);
}

.admin-pipeline-stage__status--running {
  background: #fff3cd;
  color: #856404;
}

.admin-pipeline-stage__status--check {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent);
}

.admin-pipeline-stage__status--done {
  background: #d1f3e0;
  color: #1a6e40;
}

.admin-pipeline-stage__body {
  padding: 0.6rem 0.7rem 0.7rem;
}

.admin-pipeline-stage__body h2 {
  margin: 0 0 0.2rem;
  font-size: 0.88rem;
  font-weight: 700;
}

.admin-pipeline-stage__body p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--subtle);
  line-height: 1.4;
}

/* Branch callout */

.admin-pipeline-branch {
  margin: 0 0.7rem 0.6rem;
  padding: 0.3rem 0.5rem;
  border-left: 2px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 4px 4px 0;
}

.admin-pipeline-branch__label {
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 600;
}

/* Note */

.admin-flow-guide__note {
  margin-top: 1.5rem;
  padding: 0.75rem 0.9rem;
  border-left: 3px solid var(--line);
  background: #f7f9fc;
  border-radius: 0 8px 8px 0;
}

.admin-flow-guide__note p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--subtle);
}

/* Responsive: stack on small screens */

@media (max-width: 700px) {
  .admin-pipeline-track {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-pipeline-connector {
    width: 2px;
    height: 1.5rem;
    align-self: flex-start;
    margin-left: 1.5rem;
    background: var(--line);
  }

  .admin-pipeline-connector::after {
    right: auto;
    bottom: -1px;
    top: auto;
    left: 50%;
    transform: translateX(-50%);
    border-left-color: transparent;
    border-top-color: var(--line);
  }

  .admin-pipeline-stage {
    max-width: none;
    min-width: 0;
  }
}

/* Sign-in */

.auth-body {
  background: var(--panel);
}

.app-shell-main.app-shell-main-auth {
  display: grid;
  align-content: center;
  justify-items: center;
  max-width: none;
  min-height: 100dvh;
  padding: 3rem 1.5rem 6rem;
}

.app-shell-main-auth > .flash {
  width: min(34rem, 100%);
  overflow-wrap: anywhere;
}

.auth-sign-in {
  width: min(34rem, 100%);
  text-align: center;
}

.auth-sign-in__logo {
  display: block;
  width: 180px;
  height: auto;
  margin: 0 auto 2rem;
}

.auth-sign-in__heading {
  margin: 0 0 1rem;
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.25;
}

.auth-sign-in__guidance {
  margin: 0 0 2.5rem;
  color: var(--subtle);
  font-size: 1.25rem;
  text-wrap: balance;
}

.auth-sign-in__form {
  display: flex;
  justify-content: center;
}

/* Google light rectangular button, based on Google's HTML configurator.
 * Brand-specific colors and dimensions intentionally do not inherit app tokens.
 */
.gsi-material-button {
  appearance: none;
  user-select: none;
  background-color: #ffffff;
  background-image: none;
  border: 1px solid #747775;
  border-radius: 4px;
  box-sizing: border-box;
  color: #1f1f1f;
  cursor: pointer;
  font-family: "Google Sans", Arial, "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 14px;
  font-weight: 500;
  height: 40px;
  letter-spacing: 0.25px;
  overflow: hidden;
  padding: 0 12px;
  position: relative;
  text-align: center;
  transition: background-color 218ms, border-color 218ms, box-shadow 218ms;
  vertical-align: middle;
  white-space: nowrap;
  width: 100%;
  max-width: 400px;
  min-width: min-content;
}

.gsi-material-button .gsi-material-button-icon {
  display: block;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-right: 10px;
  object-fit: contain;
}

.gsi-material-button .gsi-material-button-content-wrapper {
  display: flex;
  align-items: center;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  height: 100%;
  width: 100%;
  position: relative;
}

.gsi-material-button .gsi-material-button-contents {
  flex-grow: 0;
  font-family: inherit;
  font-weight: 500;
  line-height: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
}

.gsi-material-button .gsi-material-button-state {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 218ms;
}

.gsi-material-button:disabled {
  cursor: default;
  background-color: #ffffff61;
  border-color: #1f1f1f1f;
}

.gsi-material-button:disabled .gsi-material-button-contents,
.gsi-material-button:disabled .gsi-material-button-icon {
  opacity: 0.38;
}

.gsi-material-button:not(:disabled):active .gsi-material-button-state,
.gsi-material-button:not(:disabled):focus .gsi-material-button-state {
  background-color: #303030;
  opacity: 0.12;
}

.gsi-material-button:not(:disabled):hover {
  box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
}

.gsi-material-button:not(:disabled):hover .gsi-material-button-state {
  background-color: #303030;
  opacity: 0.08;
}

.gsi-material-button:focus-visible {
  outline: 2px solid #1f1f1f;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .gsi-material-button,
  .gsi-material-button .gsi-material-button-state {
    transition: none;
  }
}

.auth-sign-in__help {
  margin: 2.25rem 0 0;
  color: var(--subtle);
  font-size: 1.125rem;
  text-wrap: balance;
}

@media (max-width: 600px) {
  .auth-sign-in__logo {
    width: 160px;
  }

  .auth-sign-in__heading {
    font-size: 2rem;
  }

  .auth-sign-in__guidance,
  .auth-sign-in__help {
    font-size: 0.875rem;
  }
}

/* End sign-in */

@media (max-width: 960px) {
  .grid-two,
  .field-grid,
  .month-range-fields,
  .experience-form-flow__role-row,
  .layout-edit-asymmetric,
  .profile-meta-panel .definition-list,
  .profile-version-layout,
  .edit-workflow-notice__grid,
  .profile-summary-strip,
  .field-grid-compact {
    grid-template-columns: 1fr;
  }

  .app-shell-main,
  .app-shell-nav {
    padding: 1rem;
  }

  .impersonation-banner,
  .page-header,
  .panel-header-inline,
  .admin-operator-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-links,
  .admin-operator-bar__actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .edit-preview-aside details {
    position: static;
  }

  .version-rail {
    position: static;
    order: -1;
  }

  .form-save-bar {
    position: static;
    flex-direction: column;
    align-items: stretch;
  }

  .account-switcher__summary {
    width: 100%;
  }

  .account-switcher__menu {
    left: 0;
    right: auto;
    width: min(100%, calc(100vw - 2rem));
  }
}

/* Month picker */
.mp-hidden-input {
  display: none;
}

.mp-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  min-height: 2.7rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
  border: 1px solid #cbd7e6;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.mp-display::after {
  content: "";
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  border: 1.8px solid var(--accent);
  border-radius: 0.22rem;
  background:
    linear-gradient(var(--accent), var(--accent)) 50% 0.25rem / 68% 1.7px no-repeat;
  opacity: 0.72;
}

.mp-display:hover {
  border-color: #8fb4e5;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.mp-display:focus-visible {
  outline: 3px solid rgba(24, 88, 184, 0.18);
  outline-offset: 2px;
  border-color: var(--accent);
}

.mp-popover {
  z-index: 9999;
  background:
    linear-gradient(135deg, rgba(231, 240, 255, 0.85), rgba(255, 255, 255, 0.97) 42%),
    #fff;
  backdrop-filter: blur(12px);
  border: 1px solid #cbd7e6;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16), 0 4px 12px rgba(15, 23, 42, 0.08);
  width: 252px;
  padding: 0.75rem;
  box-sizing: border-box;
}

.mp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.mp-year-btn {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #d8e1ec;
  padding: 0.25rem 0.5rem;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--accent);
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.mp-year-btn:hover {
  background: #fff;
  border-color: #8fb4e5;
}

.mp-year-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.mp-year-label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.mp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-bottom: 0.6rem;
}

.mp-month {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.35rem 0;
  font-size: 0.8125rem;
  color: var(--text);
  cursor: pointer;
  text-align: center;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.mp-month:hover {
  background: #fff;
  border-color: #8fb4e5;
  color: var(--accent);
}

.mp-month:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.mp-month--active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.mp-month--active:hover {
  background: #164a99;
  border-color: #164a99;
  color: #fff;
}

.mp-footer {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  padding-top: 0.6rem;
}

.mp-action {
  flex: 1;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  padding: 0.3rem 0.5rem;
  font-size: 0.8125rem;
  color: var(--text);
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.mp-action:hover {
  background: #fff;
  border-color: #8fb4e5;
}

.mp-action:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.mp-action--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.mp-action--primary:hover {
  background: #164a99;
  border-color: #164a99;
  color: #fff;
}

@media (max-width: 640px) {
  .mp-popover {
    width: calc(100vw - 16px);
    left: 8px !important;
  }
}

/* Admin temporal picker */

.admin-temporal-picker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.admin-temporal-picker .admin-temporal-picker__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: var(--panel);
  background-color: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-size: 0.875rem;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.admin-temporal-picker .admin-temporal-picker__trigger:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.admin-temporal-picker .admin-temporal-picker__trigger:focus,
.admin-temporal-picker .admin-temporal-picker__trigger[aria-expanded="true"] {
  background: var(--panel);
  background-color: var(--panel);
  color: var(--text);
}

.admin-temporal-picker .admin-temporal-picker__trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}

/* Admin date popover */

.admin-date-popover {
  position: absolute;
  z-index: 9000;
  width: 280px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
  padding: 0.75rem;
}

/* Month/year nav */

.admin-date-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.admin-date-nav__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.admin-date-nav__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: none;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 1.25rem;
  color: var(--subtle);
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s, color 0.1s;
}

.admin-date-nav__btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.admin-date-nav__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Calendar grid */

.admin-date-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 0.5rem;
}

.admin-date-weekday {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--subtle);
  padding: 0.25rem 0;
}

.admin-date-day {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0;
  background: none;
  border: 1px solid transparent;
  border-radius: 5px;
  font: inherit;
  font-size: 0.8125rem;
  color: var(--text);
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s, color 0.1s;
}

.admin-date-day--empty {
  pointer-events: none;
}

.admin-date-day:not(.admin-date-day--empty):hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.admin-date-day:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.admin-date-day--today {
  font-weight: 700;
  color: var(--accent);
}

.admin-date-day--selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.admin-date-day--selected:hover {
  background: #164a99;
  border-color: #164a99;
  color: #fff;
}

/* Time inputs for datetime mode */

.admin-date-time {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.5rem;
}

.admin-date-time__label {
  font-size: 0.8125rem;
  color: var(--subtle);
  flex-shrink: 0;
}

.admin-date-time__inputs {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.admin-date-time__field {
  width: 52px;
  padding: 0.25rem 0.375rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  font: inherit;
  font-size: 0.875rem;
  text-align: center;
  color: var(--text);
  background: var(--panel);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.admin-date-time__field:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(24, 88, 184, 0.15);
}

.admin-date-time__sep {
  font-weight: 600;
  color: var(--subtle);
}

/* Footer actions */

.admin-date-footer {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.admin-date-action {
  flex: 1;
  padding: 0.375rem 0.5rem;
  background: none;
  border: 1px solid var(--line);
  border-radius: 5px;
  font: inherit;
  font-size: 0.8125rem;
  color: var(--text);
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s, color 0.1s;
}

.admin-date-action:hover {
  background: var(--bg);
  border-color: var(--subtle);
}

.admin-date-action:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.admin-date-action--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.admin-date-action--primary:hover {
  background: #164a99;
  border-color: #164a99;
  color: #fff;
}

@media (max-width: 640px) {
  .admin-date-popover {
    width: calc(100vw - 16px);
    left: 8px !important;
  }
}

/* Employee master account overview */

.account-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 12rem;
}

.account-summary__status {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 999px;
  background: var(--subtle);
  box-shadow: 0 0 0 0.25rem color-mix(in srgb, var(--subtle) 16%, transparent);
}

.account-summary--active .account-summary__status {
  background: #16794c;
  box-shadow: 0 0 0 0.25rem rgba(22, 121, 76, 0.14);
}

.account-summary--inactive .account-summary__status,
.account-summary--missing .account-summary__status {
  background: #9f3412;
  box-shadow: 0 0 0 0.25rem rgba(159, 52, 18, 0.14);
}

.account-summary__body {
  display: grid;
  gap: 0.125rem;
}

.account-summary__email {
  color: var(--text);
  font-weight: 700;
}

.account-summary__meta {
  color: var(--subtle);
  font-size: 0.8125rem;
}

.employee-admin-overview {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
  margin: 1rem 2rem 1.25rem;
}

.employee-admin-overview__identity,
.employee-admin-account-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.25rem;
}

.employee-admin-overview__identity {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(12rem, auto) 1fr;
  padding: 0.875rem 1rem;
}

.employee-admin-overview__eyebrow {
  color: var(--subtle);
  font-size: 0.75rem;
  font-weight: 800;
  grid-column: 1 / -1;
  letter-spacing: 0.08em;
  margin: 0 0 0.375rem;
  text-transform: uppercase;
}

.employee-admin-overview h2,
.employee-admin-account-panel h2 {
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 0;
}

.employee-admin-overview__identity p:not(.employee-admin-overview__eyebrow) {
  color: var(--subtle);
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
  margin: 0;
}

.employee-admin-account-panel__header {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.employee-admin-account-panel__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
}

.employee-admin-account-panel__grid > div {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem;
}

.employee-admin-account-panel__grid dt {
  color: var(--subtle);
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.employee-admin-account-panel__grid dd {
  color: var(--text);
  font-weight: 700;
  margin: 0;
  overflow-wrap: anywhere;
}

.admin-state-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
  padding: 0.35rem 0.55rem;
}

.admin-state-pill--active {
  background: rgba(22, 121, 76, 0.12);
  color: #166534;
}

.admin-state-pill--inactive {
  background: rgba(159, 52, 18, 0.12);
  color: #9a3412;
}

.employee-admin-account-panel__permissions {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
}

.employee-admin-account-panel__permissions h3 {
  color: var(--text);
  font-size: 0.875rem;
  margin: 0 0 0.5rem;
}

.employee-admin-account-panel__permissions ul {
  display: grid;
  gap: 0.375rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.employee-admin-account-panel__permissions li {
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  font-weight: 700;
  gap: 0.5rem;
  justify-content: space-between;
  padding: 0.5rem 0.625rem;
}

.employee-admin-account-panel__permissions li span {
  color: var(--subtle);
  font-size: 0.75rem;
}

.employee-admin-account-panel__permissions p,
.employee-admin-account-panel__empty {
  color: var(--subtle);
  margin: 0;
}

@media (max-width: 980px) {
  .employee-admin-overview,
  .employee-admin-account-panel__grid,
  .employee-admin-account-panel__permissions {
    grid-template-columns: 1fr;
  }

  .employee-admin-account-panel__header {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .employee-admin-overview {
    margin: 1rem;
  }

  .employee-admin-overview__identity {
    grid-template-columns: 1fr;
  }

  .employee-admin-overview__identity p:not(.employee-admin-overview__eyebrow) {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    margin-top: 0.25rem;
  }
}

/* Admin boolean toggle switch */
.admin-toggle {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.admin-toggle__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.admin-toggle__track {
  display: inline-block;
  width: 2.75rem;
  height: 1.5rem;
  background: #cbd5e1;
  border-radius: 9999px;
  position: relative;
  transition: background 0.18s ease;
  flex-shrink: 0;
}

.admin-toggle__track::after {
  content: "";
  position: absolute;
  top: 0.2rem;
  left: 0.2rem;
  width: 1.1rem;
  height: 1.1rem;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.18s ease;
}

.admin-toggle__input:checked + .admin-toggle__track {
  background: var(--accent);
}

.admin-toggle__input:checked + .admin-toggle__track::after {
  transform: translateX(1.25rem);
}

.admin-toggle__input:disabled + .admin-toggle__track {
  opacity: 0.45;
  cursor: not-allowed;
}

.admin-toggle__input:focus-visible + .admin-toggle__track {
  outline: 3px solid rgba(24, 88, 184, 0.28);
  outline-offset: 2px;
}

/* Admin impersonation audit log */
.audit-log-summary,
.audit-log-card {
  background: #fff;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  margin-bottom: 1.5rem;
  padding: 1.5rem;
}

.audit-log-summary {
  align-items: flex-start;
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
}

.audit-log-summary__eyebrow {
  color: #667085;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 0.35rem;
  text-transform: uppercase;
}

.audit-log-summary h2,
.audit-log-card h2 {
  color: #1f2937;
  font-size: 1.15rem;
  line-height: 1.35;
  margin: 0;
}

.audit-log-summary p {
  color: #475467;
  margin: 0.5rem 0 0;
}

.audit-log-summary__status {
  border-radius: 6px;
  min-width: 8rem;
  padding: 0.75rem 1rem;
  text-align: center;
}

.audit-log-summary__status span {
  color: #667085;
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
}

.audit-log-summary__status strong {
  color: #1f2937;
  display: block;
  font-size: 1rem;
  margin-top: 0.2rem;
}

.audit-log-summary__status--ended {
  background: #ecfdf3;
  border: 1px solid #abefc6;
}

.audit-log-summary__status--active {
  background: #fffaeb;
  border: 1px solid #fedf89;
}

.audit-log-card__header {
  align-items: flex-start;
  border-bottom: 1px solid #eef2f6;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
}

.audit-log-card__duration {
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 999px;
  color: #344054;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  white-space: nowrap;
}

.audit-log-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.audit-log-timeline::before {
  background: #d8e0ea;
  bottom: 1.4rem;
  content: "";
  left: 0.55rem;
  position: absolute;
  top: 1.4rem;
  width: 2px;
}

.audit-log-event {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.2rem 1fr;
  position: relative;
}

.audit-log-event + .audit-log-event {
  margin-top: 1.5rem;
}

.audit-log-event__marker {
  background: #155eef;
  border: 3px solid #eff4ff;
  border-radius: 999px;
  height: 1rem;
  margin-top: 0.35rem;
  position: relative;
  width: 1rem;
  z-index: 1;
}

.audit-log-event--end .audit-log-event__marker {
  background: #12b76a;
  border-color: #ecfdf3;
}

.audit-log-event__body {
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  padding: 1rem;
}

.audit-log-event__header {
  align-items: baseline;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.audit-log-event__header h3 {
  color: #1f2937;
  font-size: 1rem;
  margin: 0;
}

.audit-log-event__header time,
.audit-log-event__header span {
  color: #475467;
  font-weight: 700;
}

.audit-log-event__details,
.audit-log-context {
  display: grid;
  gap: 0.9rem;
  margin: 0;
}

.audit-log-event__details {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.audit-log-context {
  grid-template-columns: minmax(10rem, 14rem) minmax(0, 1fr);
}

.audit-log-context > div {
  display: contents;
}

.audit-log-event__details dt,
.audit-log-context dt {
  color: #667085;
  font-size: 0.8rem;
  font-weight: 700;
}

.audit-log-event__details dd,
.audit-log-context dd {
  color: #1f2937;
  margin: 0.25rem 0 0;
  overflow-wrap: anywhere;
}

.audit-log-context dd {
  margin-top: 0;
}

@media (max-width: 760px) {
  .audit-log-summary,
  .audit-log-card__header,
  .audit-log-event__header {
    display: block;
  }

  .audit-log-summary__status,
  .audit-log-card__duration {
    display: inline-block;
    margin-top: 1rem;
  }

  .audit-log-event__details,
  .audit-log-context {
    grid-template-columns: 1fr;
  }

  .audit-log-context > div {
    display: block;
  }
}

/* PDF export status panel */
.pdf-export-status {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.75rem 1.25rem;
  border-left: 4px solid #d7dde5;
}

.pdf-export-status--pending,
.pdf-export-status--processing {
  border-left-color: #1858b8;
  background: #f7fbff;
}

.pdf-export-status--ready {
  border-left-color: #16794c;
  background: #f0faf5;
}

.pdf-export-status--failed {
  border-left-color: #b42318;
  background: #fff5f5;
}

.pdf-export-status__summary {
  min-width: 16rem;
  flex: 1 1 26rem;
}

.pdf-export-status__label {
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0;
}

.pdf-export-status__description {
  margin: 0;
  font-size: 0.85rem;
}

.pdf-export-status__details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  margin: 0.45rem 0 0;
  padding: 0;
  list-style: none;
  color: #5f6b7a;
  font-size: 0.78rem;
  line-height: 1.45;
}

.pdf-export-status__details li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.pdf-export-status__details li::before {
  content: "";
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 999px;
  background: #9aa7b7;
  flex: 0 0 auto;
}

.pdf-export-status__actions {
  display: flex;
  align-items: center;
  min-height: 2rem;
}

.pdf-export-status__actions form {
  margin: 0;
}

@keyframes pdf-status-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.pdf-export-status__refresh {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #e7f0ff;
  color: #164a99;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  white-space: nowrap;
  animation: pdf-status-pulse 2.4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .pdf-export-status__refresh {
    animation: none;
  }
}

.pdf-export-status--compact {
  margin-top: 0.55rem;
  padding: 0.55rem 0 0 2.65rem;
  border-top: 1px dashed #d7e2f0;
  border-left: 0;
  background: transparent;
  gap: 0.5rem 0.75rem;
}

.pdf-export-status--compact.pdf-export-status--pending,
.pdf-export-status--compact.pdf-export-status--processing {
  border-top-color: #1858b8;
}

.pdf-export-status--compact.pdf-export-status--ready {
  border-top-color: #16794c;
}

.pdf-export-status--compact.pdf-export-status--failed {
  border-top-color: #b42318;
}

.pdf-export-status--compact .pdf-export-status__description {
  flex-basis: 100%;
}

.pdf-export-status--compact .pdf-export-status__details {
  flex-direction: column;
  gap: 0.15rem;
  margin-top: 0.3rem;
}

.pdf-export-status--compact .pdf-export-status__actions {
  min-height: auto;
}

/* ── PDF import workbench ── */
.wb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.75rem;
}
.wb-header__left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.wb-header__title {
  font-weight: 700;
  font-size: 1rem;
  margin: 0;
}
.wb-header__right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.wb-confirm-hint {
  font-size: 0.82rem;
  color: var(--subtle);
}

.wb-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.8fr) minmax(520px, 2fr) minmax(360px, 1fr);
  gap: 0.75rem;
  align-items: start;
}
@media (max-width: 1180px) {
  .wb-layout { grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); }
  .wb-pane--right { grid-column: 1 / -1; position: static; max-height: none; }
}
@media (max-width: 800px) {
  .wb-layout { grid-template-columns: 1fr; }
  .wb-pane--left { position: static; max-height: none; }
  .wb-form-grid { grid-template-columns: 1fr; }
  .corr-row,
  .corr-row--full {
    grid-template-columns: 1fr;
  }
  .corr-row__src { padding-top: 0; }
  .corr-row-dates { grid-template-columns: 1fr; }
}

.wb-pane {
  background: var(--panel);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem;
  min-width: 0;
}
.wb-pane--left { position: sticky; top: 0.75rem; max-height: calc(100vh - 4rem); overflow-y: auto; }
.wb-pane--right { position: sticky; top: 0.75rem; max-height: calc(100vh - 4rem); overflow-y: auto; }

.wb-fieldset {
  border: 1px solid var(--line);
  padding: 0.5rem 0.75rem 0.65rem;
  margin: 0;
}
.wb-fieldset legend {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--subtle);
  padding: 0 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.wb-fieldset--grow { flex: 1; display: flex; flex-direction: column; }
.wb-fieldset--grow textarea { flex: 1; }
.wb-fieldset--stacked { margin-top: 0.75rem; }

.wb-summary-dl {
  display: grid;
  grid-template-columns: minmax(5.5rem, max-content) minmax(0, 1fr);
  gap: 0;
  margin: 0;
}
.wb-summary-dl dt,
.wb-summary-dl dd {
  margin: 0;
  padding: 0.45rem 0.35rem;
  border-bottom: 1px solid #e4eaf2;
  font-size: 0.82rem;
}
.wb-summary-dl dt {
  color: var(--subtle);
  font-weight: 700;
  white-space: nowrap;
}
.wb-summary-dl dd {
  min-width: 0;
  overflow-wrap: anywhere;
}

.wb-source-text {
  width: 100%;
  min-height: 200px;
  font-size: 0.78rem;
  font-family: monospace;
  resize: vertical;
  border: 1px solid var(--line);
  padding: 0.4rem;
  background: #fafbfc;
  color: var(--text);
}

.wb-mapping-status {
  margin: 0 0 0.45rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.45;
}

.wb-source-chunk-list {
  display: grid;
  gap: 0.35rem;
  overflow-y: auto;
  max-height: 42vh;
  padding-right: 0.15rem;
}

.wb-source-chunk {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0.4rem 0.45rem;
  border: 1px solid #d7e2f0;
  border-radius: 3px;
  background: #ffffff;
  color: #1f2937;
  cursor: grab;
  font: inherit;
  font-size: 0.8rem;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}
.wb-source-chunk:hover {
  border-color: #93c5fd;
  background: #f8fbff;
}
.wb-source-chunk:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.wb-source-chunk--selected {
  border-color: #1d4ed8;
  background: #dbeafe;
  color: #1e3a8a;
  box-shadow: inset 3px 0 0 #1d4ed8;
}
.wb-source-chunk--used {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.wb-source-raw {
  margin-top: 0.55rem;
  border-top: 1px solid var(--line);
  padding-top: 0.45rem;
}
.wb-source-raw summary {
  cursor: pointer;
  color: var(--subtle);
  font-size: 0.78rem;
  font-weight: 700;
}
.wb-source-raw .wb-source-text {
  margin-top: 0.45rem;
  min-height: 120px;
}

.wb-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 0.6rem;
  margin-top: 0.45rem;
}
.wb-form-grid label { display: flex; flex-direction: column; font-size: 0.8rem; color: var(--subtle); gap: 0.15rem; }
.wb-form-grid__full { grid-column: 1 / -1; }
.wb-inline-label { display: block; margin-bottom: 0.2rem; font-size: 0.8rem; color: var(--subtle); }

.form-control--sm {
  padding: 0.2rem 0.4rem;
  font-size: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  width: 100%;
}
.form-control--sm:focus { outline: 2px solid var(--accent); outline-offset: 0; }

.wb-exp-item { border: 1px solid var(--line); margin-top: 0.4rem; }
.wb-exp-item__summary {
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  background: #f8fafc;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}
.wb-exp-item__summary::-webkit-details-marker { display: none; }
.wb-exp-item__dates { font-size: 0.78rem; font-weight: 400; color: var(--subtle); }
.wb-exp-item__body { padding: 0.5rem; }

.wb-form-actions {
  padding-top: 0.75rem;
  display: flex;
  justify-content: flex-end;
}

.wb-phase-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  min-height: 1.7rem;
  align-items: center;
}

.table--dense th,
.table--dense td {
  padding: 0.3rem 0.5rem;
  font-size: 0.82rem;
}

/* ── 中央ペインタイトル ── */
.wb-center-title {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.5rem 0 0.35rem;
  border-bottom: 2px solid var(--accent, #2563eb);
  margin-bottom: 0.6rem;
}
.wb-center-title__main {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}
.wb-center-title__sub {
  font-size: 0.78rem;
  color: var(--subtle);
  letter-spacing: 0.02em;
}

/* ── 抽出ステータスバンド ── */
.wb-status-band {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.75rem;
  background: var(--surface2, #f8fafc);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.4rem 0.65rem;
  margin-bottom: 0.75rem;
  font-size: 0.78rem;
}
.wb-status-band__item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.wb-status-band__label { color: var(--subtle); }
.wb-status-band__value { display: flex; align-items: center; }

/* ── ソースタグ ── */
.wb-src-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.05rem 0.35rem;
  border-radius: 2px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.wb-src-tag--ok      { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.wb-src-tag--warn    { background: #fef9c3; color: #854d0e; border-color: #fde68a; }
.wb-src-tag--empty   { background: #f1f5f9; color: #94a3b8; border-color: #e2e8f0; font-style: italic; }
.wb-src-tag--extracted { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.wb-src-tag--manual  { background: #f5f3ff; color: #6d28d9; border-color: #ddd6fe; }
.wb-src-tag--mapped  { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.wb-src-tag--xs      { font-size: 0.67rem; padding: 0.02rem 0.25rem; }

/* ── 補正行 ── */
.corr-row {
  display: grid;
  grid-template-columns: 7rem auto 1fr;
  align-items: start;
  gap: 0.3rem 0.5rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--line);
}
.corr-row:last-child { border-bottom: none; }
.corr-row--full { grid-column: 1 / -1; grid-template-columns: 7rem auto 1fr; }
.corr-row--empty .corr-row__ctrl input,
.corr-row--empty .corr-row__ctrl textarea,
.corr-row--empty .corr-row__ctrl select {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: var(--subtle);
}
.corr-row__label {
  font-size: 0.8rem;
  color: var(--subtle);
  padding-top: 0.3rem;
  line-height: 1.2;
  white-space: nowrap;
}
.corr-row__src { padding-top: 0.28rem; }
.corr-row__ctrl { min-width: 0; }
.corr-row[data-pdf-import-mapping-target-field-value] {
  position: relative;
}
.corr-row[data-pdf-import-mapping-target-field-value]:hover {
  background: #f8fbff;
}
.wb-drop-target--over {
  background: #dbeafe;
  box-shadow: inset 0 0 0 2px #2563eb;
}
.corr-row--mapped {
  background: #f0fdf4;
}

/* ── 日付行（2列並び） ── */
.corr-row-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 0.5rem;
}

/* ── 自動転記なし状態 ── */
.wb-auto-transfer-none {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.5rem;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 3px;
  font-size: 0.82rem;
  color: var(--subtle);
}
.wb-auto-transfer-none__icon { font-weight: 700; color: #94a3b8; }

.wb-empty { color: var(--subtle); font-size: 0.82rem; padding: 0.4rem 0; }

.wb-review-list,
.wb-skill-list {
  display: grid;
  gap: 0.55rem;
}
.wb-review-item,
.wb-skill-item {
  min-width: 0;
  padding: 0.55rem 0;
  border-bottom: 1px solid #e4eaf2;
}
.wb-review-item:first-child,
.wb-skill-item:first-child {
  padding-top: 0;
}
.wb-review-item__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-width: 0;
}
.wb-review-item__category {
  min-width: 0;
  color: #1f2937;
  font-size: 0.78rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.wb-review-item__message {
  margin: 0.4rem 0 0;
  color: #1f2937;
  font-size: 0.84rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
  word-break: normal;
}
.wb-review-actions {
  display: flex;
  justify-content: flex-end;
  margin: 0.45rem 0 0.65rem;
}
.wb-review-actions form {
  margin: 0;
}
.wb-skill-item {
  display: grid;
  gap: 0.2rem;
}
.wb-skill-item__name {
  color: #1f2937;
  font-size: 0.84rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.wb-skill-item__meta {
  color: var(--subtle);
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

/* CSS-only radio tabs */
.wb-tabs { display: flex; flex-direction: column; }
.wb-tab__radio { display: none; }
.wb-tabs__nav { display: flex; border-bottom: 2px solid var(--line); }
.wb-tabs__label {
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--subtle);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}
#wb-tab-review:checked ~ .wb-tabs__nav label[for="wb-tab-review"],
#wb-tab-skills:checked ~ .wb-tabs__nav label[for="wb-tab-skills"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.wb-tabs__panel { display: none; padding-top: 0.5rem; }
#wb-tab-review:checked ~ #wb-panel-review,
#wb-tab-skills:checked ~ #wb-panel-skills { display: block; }


/* The same document is used for reading, editing, and PDF rendering. */
.document-toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 0;
  margin-bottom: 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.document-toolbar__identity { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.document-back { font-size: .8rem; color: var(--subtle); }
.document-toolbar__state { font-size: .75rem; color: var(--accent); padding: 4px 8px; background: var(--accent-soft); border-radius: 4px; }
.document-save-state { font-size: .8rem; color: var(--subtle); }
.document-hint { margin: 0 0 16px; color: var(--subtle); font-size: .8rem; }
.document-scroll { overflow-x: auto; padding-bottom: 4px; }
.document-scroll > .legacy-sheet-document { min-width: 1120px; }
.document-control { display: none; }
.is-editing .document-value { display: none; }
.is-editing .document-control { display: block; }
.document-workspace .document-input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  border: 0;
  border-radius: 2px;
  padding: 0;
  margin: 0;
  background: transparent;
  box-shadow: none;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  color: inherit;
}
.document-workspace textarea.document-input { resize: vertical; overflow: hidden; white-space: pre-wrap; }
.document-workspace .document-input:hover { background: #f1f6ff; }
.document-workspace .document-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; background: #f1f6ff; }
.document-workspace .document-input::placeholder { color: #7c8797; font-size: .9em; }
.document-workspace input[type=month].document-input { font-size: .7rem; }
.document-period { text-align: center; }
.document-period .document-input { text-align: center; }
.document-picker { position: relative; white-space: normal; }
.document-picker > summary { cursor: pointer; list-style: none; min-height: 1.28em; border-radius: 2px; }
.document-picker > summary::-webkit-details-marker { display: none; }
.document-picker > summary:hover, .document-picker[open] > summary { background: #f1f6ff; outline: 1px solid var(--accent); }
.document-picker > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.document-picker__panel {
  position: fixed;
  z-index: 30;
  top: 100%;
  left: 0;
  width: 320px;
  max-width: 80vw;
  max-height: 360px;
  overflow: auto;
  padding: 16px;
  text-align: left;
  font-size: .8rem;
  line-height: 1.5;
  font-weight: 400;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px #0f172a22;
}
.document-picker--phase .document-picker__panel { left: auto; right: 0; width: 200px; }
.document-picker__panel fieldset { border: 0; padding: 0; margin: 0 0 16px; }
.document-picker__panel legend { font-weight: 600; margin-bottom: 8px; }
.document-picker__panel label { display: flex; gap: 8px; align-items: center; margin: 6px 0; font: inherit; }
.document-picker__panel input[type=checkbox] { width: auto; accent-color: var(--accent); }
.document-picker__panel .button { margin-top: 12px; }
.document-version-options { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-left: 24px; color: var(--subtle); }
.document-work-fields { white-space: normal; }
.document-work-field + .document-work-field { margin-top: .35rem; }
.document-work-field strong { display: block; font-weight: 600; }
.document-work-field:has(strong) { margin-top: .65rem; }
.document-industry { display: flex; align-items: center; gap: 8px; color: var(--subtle); margin-top: 8px; font-size: .7rem; }
.document-industry > span { flex: 1; }
.document-settings { margin-top: 20px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.document-settings > summary { cursor: pointer; font-size: .875rem; font-weight: 600; }
.document-settings[open] > summary { margin-bottom: 16px; }
@media (max-width: 700px) {
  .document-toolbar { gap: 8px; }
  .document-toolbar__identity { width: 100%; }
  .document-toolbar .actions { gap: 8px; }
  .document-save-state { width: 100%; }
}
@media print {
  .document-toolbar, .document-hint, .document-settings, .document-control { display: none !important; }
  .document-value, .is-editing .document-value { display: inline !important; }
  .document-scroll { overflow: visible; padding: 0; }
  .document-scroll > .legacy-sheet-document { min-width: 0; }
}

.document-field { display: block; position: relative; white-space: normal; }
.document-field__value { display: block; white-space: pre-wrap; overflow-wrap: anywhere; min-height: 1.28em; }
.document-field__control { display: none; }
.is-editing .document-field:focus-within .document-field__value { visibility: hidden; }
.is-editing .document-field__control { display: block; position: absolute; inset: 0; opacity: 0; }
.is-editing .document-field:focus-within .document-field__control { opacity: 1; }
.is-editing .document-field:hover { background: #f1f6ff; outline: 1px solid var(--line); }
.document-workspace .document-field__control .document-input { height: 100%; resize: none; }
.document-workspace .document-input::placeholder { opacity: 0; }
.document-workspace .document-input:hover::placeholder, .document-workspace .document-input:focus::placeholder { opacity: 1; }
.document-scroll .legacy-sheet-table__multiline { white-space: normal; }
.document-work-field--empty { display: none; }
.legacy-work-lines:hover .document-work-field--empty, .legacy-work-lines:focus-within .document-work-field--empty { display: block; }
.document-work-field + .document-work-field { margin-top: 0; }
.document-work-field + .document-work-field:has(strong) { margin-top: .8rem; }
.document-work-field strong { font-weight: 600; margin-bottom: .18rem; }
.document-work-field + .document-work-field:not(:has(strong)) { margin-top: .22rem; padding-top: .22rem; border-top: 1px dotted #9ca3af; }
@media print {
  .document-field__control { display: none !important; }
  .document-field__value { visibility: visible !important; }
}

.document-history { margin-top: 20px; }
.document-history .version-rail { position: static; max-height: none; }
.document-history .version-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }

/* Keep the document's columns fixed while its settings are open. */
.app-shell-main:has(.document-workspace.is-editing) { max-width: 1600px; }
.document-editor-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.has-settings-open .document-editor-layout { grid-template-columns: minmax(0, 1fr) 300px; }
.document-sidebar { position: sticky; top: 92px; background: white; border: 1px solid var(--line); border-radius: 12px; max-height: calc(100dvh - 116px); overflow: auto; overscroll-behavior: contain; }
.document-sidebar[hidden], .document-sidebar-backdrop[hidden], .document-empty-summary[hidden], .document-empty-details[hidden] { display: none; }
.document-sidebar__header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.document-sidebar__header h2 { margin: 0; font-size: .875rem; }
.document-sidebar__body { padding: 20px 16px 16px; font-size: .8rem; }
.document-settings-section + .document-settings-section { margin-top: 24px; }
.document-settings-section > summary { cursor: pointer; font-weight: 600; margin-bottom: 16px; }
.document-settings-fields { display: grid; gap: 16px; }
.document-sidebar label { display: block; font-size: .8rem; }
.document-sidebar input, .document-sidebar select, .document-sidebar textarea { font-size: .8rem; min-width: 0; }
.document-sidebar__hint { color: var(--subtle); font-size: .75rem; margin: 0 0 16px; }
.document-listing-card { min-width: 0; border-bottom: 1px solid var(--line); }


.document-listing-card .document-listing-card__check { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; }
.document-listing-card input[type=checkbox] { appearance: none; position: relative; width: 32px; height: 20px; flex: 0 0 32px; margin: 0; padding: 0; border: 0; border-radius: 12px; background: var(--line); cursor: pointer; transition: background 120ms; }
.document-listing-card input[type=checkbox]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: white; box-shadow: 0 1px 2px #0f172a26; transition: transform 120ms; }
.document-listing-card input[type=checkbox]:checked { background: var(--accent); }
.document-listing-card input[type=checkbox]:checked::after { transform: translateX(12px); }
.document-add-row { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 20px; }
.document-add-row::before, .document-add-row::after { content: ""; flex: 1; height: 1px; background: var(--line); }

[data-new-experience-key] .document-work-field--empty { display: block; }
.document-sidebar-backdrop { display: none; }
@media (max-width: 899px) {
  .has-settings-open .document-editor-layout { grid-template-columns: minmax(0, 1fr); }
  .document-sidebar { position: fixed; inset: 0 0 0 auto; top: 0; width: min(360px, calc(100vw - 32px)); max-height: 100dvh; z-index: 51; border-radius: 12px 0 0 12px; }
  .document-sidebar__header { position: sticky; top: 0; z-index: 1; background: white; }
  .document-sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 50; border: 0; background: #0f172a66; padding: 0; }
}
@media print {
  .document-sidebar, .document-sidebar-backdrop, .document-add-row { display: none !important; }
  .has-settings-open .document-editor-layout { display: block; }
}

/* Editor chrome stays quiet; the report remains the main surface. */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.is-editing .document-toolbar { gap: 12px; padding: 10px 0; }
.is-editing .document-toolbar .actions { gap: 4px; }
.document-icon-button, .document-insert-button { display: inline-grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 9px; background: transparent; color: var(--subtle); cursor: pointer; text-decoration: none; transition: background 120ms, color 120ms; }
.document-icon-button:hover, .document-icon-button[aria-expanded=true], .document-insert-button:hover { background: var(--accent-soft); color: var(--accent); }
.document-icon-button:focus-visible, .document-insert-button:focus-visible, .document-drag-handle:focus-visible, .document-listing-card input[type=checkbox]:focus-visible, .document-removal-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.document-save-button { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; margin-left: 8px; padding: 8px 16px; border-radius: 9px; font-size: .8rem; }
.document-save-button svg { width: 16px; height: 16px; }
.is-editing .document-save-state { display: inline-flex; align-items: center; gap: 6px; margin-right: 10px; font-size: .75rem; }
.is-editing .document-save-state::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--line); }
.is-editing[data-document-editor-dirty-value=true] .document-save-state::before { background: var(--accent); }
.is-editing .document-toolbar__state { padding: 0; border-radius: 0; background: none; }
.document-tooltip { position: relative; }
.document-tooltip::after { content: attr(data-tooltip); position: absolute; z-index: 60; left: 50%; top: calc(100% + 7px); transform: translateX(-50%); width: max-content; max-width: 180px; padding: 6px 9px; border-radius: 6px; background: var(--text); color: white; font-size: .7rem; font-weight: 400; line-height: 1.4; white-space: normal; pointer-events: none; opacity: 0; visibility: hidden; }
.document-tooltip:hover::after, .document-tooltip:focus-visible::after { opacity: 1; visibility: visible; }
.document-sidebar .document-tooltip::after { left: auto; right: 0; transform: none; }
.document-settings-section > summary { list-style: none; display: flex; align-items: center; gap: 8px; font-weight: 600; }
.document-settings-section > summary::-webkit-details-marker { display: none; }
.document-settings-section > summary::before { content: ""; width: 5px; height: 5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform 120ms; }
.document-settings-section[open] > summary::before { transform: rotate(45deg); }
.document-sidebar .document-settings-fields input, .document-sidebar .document-settings-fields select, .document-sidebar .document-settings-fields textarea, .document-listing-card__options input[type=text] { margin-top: 6px; border-radius: 7px; padding: 9px 10px; background: var(--bg); }
.document-listing-card__header { display: flex; align-items: center; gap: 6px; min-height: 56px; }
.document-listing-card__header > strong { flex: 1; min-width: 0; font-size: .8rem; font-weight: 500; overflow-wrap: anywhere; }
.document-drag-handle { display: inline-grid; place-items: center; width: 26px; height: 36px; flex-shrink: 0; border: 0; border-radius: 6px; padding: 0; background: transparent; color: #9ca3af; cursor: grab; touch-action: none; user-select: none; }
.document-drag-handle svg { width: 16px; height: 18px; }
.document-drag-handle:hover, .document-drag-handle:focus-visible { color: var(--accent); background: var(--accent-soft); }
.document-drag-handle:active { cursor: grabbing; }
.document-listing-disclosure { width: 28px; height: 32px; }
.document-listing-disclosure svg { width: 16px; height: 16px; transition: transform 120ms; }
.document-listing-disclosure[aria-expanded=true] svg { transform: rotate(180deg); }
.document-listing-card__options { padding: 0 4px 18px 32px; }
.document-listing-card__options[hidden] { display: none; }
.document-listing-card.is-dragging { opacity: .35; background: var(--accent-soft); outline: 1px dashed var(--accent); outline-offset: -1px; }
.document-summary-row.is-dragging > td { background: var(--accent-soft); opacity: .4; }
.document-summary-row > .document-row-number { position: relative; }
.document-drag-handle--sheet { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
.document-summary-row > .document-row-number:hover .document-drag-handle--sheet, .document-drag-handle--sheet:focus-visible { opacity: 1; }
.document-summary-row > .document-row-number:hover .document-row-index, .document-summary-row > .document-row-number:focus-within .document-row-index { visibility: hidden; }
.document-sort-ghost { position: fixed; z-index: 80; display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--accent); border-radius: 9px; background: white; box-shadow: 0 12px 28px #0f172a26; color: var(--text); font-size: .8rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; pointer-events: none; }
.document-sort-ghost svg { flex: 0 0 16px; color: var(--accent); }
.document-insert-button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: white; }
.document-insert-button svg { width: 18px; height: 18px; }
@media (max-width: 700px) {
  .is-editing .document-toolbar .actions { width: 100%; justify-content: flex-end; }
  .is-editing .document-save-state { width: auto; margin-right: auto; font-size: .7rem; }
  .document-icon-button { width: 40px; height: 40px; }
  .document-drag-handle { width: 32px; min-height: 44px; }
  .document-drag-handle--sheet { width: 100%; min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .document-icon-button, .document-insert-button, .document-listing-disclosure svg, .document-settings-section > summary::before, .document-listing-card input[type=checkbox], .document-listing-card input[type=checkbox]::after { transition: none; }
}
@media print {
  .document-drag-handle, .document-sort-ghost { display: none !important; }
  .document-row-index { visibility: visible !important; }
}

.document-picker__empty { position: relative; }
.document-picker__empty:hover::after, .document-picker__empty:focus-visible::after { content: "+"; position: absolute; inset: 0; color: var(--accent); text-align: center; }

/* Destructive project actions belong to the inspector, with undo until Save. */
.document-listing-card__actions { display: flex; align-items: center; flex-shrink: 0; }
.document-removal-button, .document-restore-button { width: 28px; height: 32px; }
.document-removal-button svg, .document-restore-button svg { width: 16px; height: 16px; }
.document-removal-button:hover { background: #fff1f0; color: var(--danger); }
.document-drag-handle[hidden], .document-listing-card__actions[hidden], .document-restore-button[hidden], .document-removal-status[hidden], .document-summary-row[hidden], .legacy-experience-row[hidden] { display: none; }
.document-listing-card[data-document-removed=true] .document-listing-card__header { min-height: 44px; }
.document-listing-card[data-document-removed=true] strong { color: var(--subtle); text-decoration: line-through; }
.document-removal-status { margin: 0 0 12px; color: var(--subtle); font-size: .7rem; }
.document-removal-dialog { position: fixed; width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: white; color: var(--text); box-shadow: 0 24px 70px #0f172a33; }
.document-removal-dialog::backdrop { background: #0f172a66; backdrop-filter: blur(3px); }
.document-removal-dialog [hidden] { display: none; }
.document-removal-dialog__close { position: absolute; right: 12px; top: 12px; }
.document-removal-dialog__symbol { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-bottom: 16px; border-radius: 12px; background: #fff1f0; color: var(--danger); }
.document-removal-dialog h2 { margin: 0 0 12px; padding-right: 12px; font-size: 1rem; line-height: 1.5; }
.document-removal-dialog__project { margin: 0 0 16px; overflow-wrap: anywhere; font-size: .875rem; font-weight: 600; }
.document-removal-dialog #document-removal-description { font-size: .8rem; line-height: 1.7; color: var(--subtle); }
.document-removal-dialog__hint { margin-top: 12px; }
.document-removal-dialog__actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.document-removal-dialog__actions .button { font-size: .8rem; border-radius: 8px; }
.document-removal-dialog__actions .document-danger-button { background: var(--danger); color: white; border-color: var(--danger); }
@media (max-width: 700px) {
  .document-removal-dialog { padding: 24px; }
  .document-removal-button, .document-restore-button { width: 32px; height: 40px; }
}
@media print {
  .document-removal-dialog { display: none !important; }
}

body:has(.document-removal-dialog[open]) { overflow: hidden; }
