/*
 * 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 hero */

.app-shell-main:has(> .auth-hero) {
  max-width: none;
  padding: 0;
}

.app-shell-main-auth {
  min-height: 100dvh;
}

.auth-hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 4rem 2rem;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    #0c1322;
  background-size: 48px 48px;
  overflow: hidden;
}

.auth-hero::before {
  content: "";
  position: absolute;
  top: 7rem;
  right: -8rem;
  width: 34rem;
  height: 34rem;
  background: #f97316;
  clip-path: polygon(16% 0, 100% 18%, 74% 100%, 0 82%);
  opacity: 0.12;
  transform: rotate(-8deg);
}

.auth-hero::after {
  content: "";
  position: absolute;
  left: -10rem;
  bottom: -14rem;
  width: 34rem;
  height: 34rem;
  border: 1px solid rgba(143, 180, 216, 0.18);
  transform: rotate(18deg);
}

.auth-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(400px, 520px);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 6rem);
  width: min(1320px, 100%);
}

.auth-hero__copy {
  min-width: 0;
}

.auth-hero__brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 2.5rem;
  padding: 0.75rem 0.95rem;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 14px;
  box-shadow: 8px 8px 0 rgba(249, 115, 22, 0.18);
}

.auth-hero__logo {
  display: block;
  width: 136px;
  height: auto;
  max-width: 80vw;
}

.auth-hero__product-name {
  display: none;
}

.auth-hero__eyebrow {
  margin: 0 0 0.9rem;
  color: #f97316;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.auth-hero__heading {
  margin: 0 0 1.1rem;
  font-size: clamp(2.4rem, 4.9vw, 4.7rem);
  font-weight: 800;
  color: #eef2fa;
  line-height: 1.02;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.auth-hero__sub {
  max-width: 39rem;
  margin: 0;
  color: #9db0cc;
  font-size: 1.02rem;
  line-height: 1.85;
}

.auth-hero__panel {
  position: relative;
  width: 100%;
}

.auth-sheet-preview {
  position: absolute;
  top: -4.5rem;
  right: 2.25rem;
  width: min(440px, calc(100% - 1.5rem));
  padding: 1rem;
  background: #111c30;
  border: 1px solid #1e2d47;
  border-top: 3px solid #f97316;
  box-shadow: 12px 12px 0 rgba(249, 115, 22, 0.16);
  transform: rotate(-2.4deg);
}

.auth-sheet-preview__title {
  margin-bottom: 0.7rem;
  color: #cdd8ec;
  font-size: 0.88rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.04em;
}

.auth-sheet-preview__grid {
  display: grid;
  grid-template-columns: 4.5rem 1fr 4.5rem 1fr;
  border-top: 1px solid #2a3a54;
  border-left: 1px solid #2a3a54;
  color: transparent;
}

.auth-sheet-preview__grid span {
  min-height: 1.6rem;
  border-right: 1px solid #2a3a54;
  border-bottom: 1px solid #2a3a54;
}

.auth-sheet-preview__head {
  background: #1b2d48;
}

.auth-sheet-preview__wide {
  grid-column: span 3;
}

.auth-sheet-preview__lines {
  min-height: 4.6rem;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 1.45rem,
      rgba(100, 130, 180, 0.18) 1.45rem,
      rgba(100, 130, 180, 0.18) calc(1.45rem + 1px)
    );
}

.auth-hero__card {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  margin-left: auto;
  padding: 2.4rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.5);
}

.auth-hero__card::before {
  content: "";
  display: block;
  width: 3.75rem;
  height: 0.35rem;
  margin-bottom: 1.4rem;
  background: #f97316;
  border-radius: 999px;
}

.auth-hero__card-title {
  margin: 0 0 0.35rem;
  color: #0f172a;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.auth-hero__card-sub {
  margin: 0 0 1.5rem;
  color: #5f6b7a;
  font-size: 0.95rem;
}

.auth-hero__cta {
  margin-bottom: 1rem;
}

.auth-google-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  min-height: 48px;
  padding: 0.8rem 1rem;
  background: #fff;
  border: 1px solid #747775;
  border-radius: 4px;
  color: #1f1f1f;
  font-family: "Roboto", Arial, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 200ms ease, box-shadow 200ms ease, transform 150ms ease;
}

.auth-google-button:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.2), 0 4px 8px rgba(60, 64, 67, 0.1);
  color: #1f1f1f;
  text-decoration: none;
}

.auth-google-button:focus-visible {
  outline: 3px solid rgba(3, 105, 161, 0.28);
  outline-offset: 3px;
}

.auth-google-button:active {
  transform: translateY(0);
  box-shadow: none;
  background: #f1f3f4;
}

@media (prefers-reduced-motion: reduce) {
  .auth-google-button {
    transition: none;
  }
  .auth-google-button:hover {
    transform: none;
  }
}

.auth-google-button__icon {
  flex-shrink: 0;
}

.auth-hero__note {
  margin: 0;
  font-size: 0.8rem;
  color: #64748b;
}

.auth-feature-strip {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 2.25rem;
}

.auth-feature-strip__item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: #b8cff0;
  font-size: 0.82rem;
  font-weight: 500;
}

@media (max-width: 760px) {
  .auth-hero {
    padding: 2rem 1rem 2.75rem;
  }

  .auth-hero__inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .auth-hero__logo {
    width: 126px;
  }

  .auth-hero__heading {
    font-size: 2.25rem;
  }

  .auth-hero__panel {
    display: flex;
    flex-direction: column;
  }

  .auth-sheet-preview {
    position: relative;
    top: auto;
    right: auto;
    order: 2;
    width: 100%;
    margin-top: 1rem;
    transform: none;
    box-shadow: 6px 6px 0 rgba(249, 115, 22, 0.15);
  }

  .auth-hero__card {
    padding: 1.75rem 1.25rem 1.5rem;
    width: 100%;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  }

  .auth-feature-strip {
    gap: 0.4rem;
  }
}

/* End sign-in hero */

@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: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.75rem 1.25rem;
}

.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 form {
  margin: 0;
}

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

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

/* ── 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; }
