/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
  --cal-red: #F7616B;
  --cal-main: var(--cal-red);
  --cal-day: #57BEC6;
  --cal-eve: #F7AF00;
  --cal-nt: #364287;
  --cal-md: #2DAF75;
  --cal-dark1: #3B4047;
  --cal-dark2: #68686C;
  --cal-dark3: #A7A7AB;
  --cal-bg: #F5F5F5;
  --cal-border: #EAEAEA;
  --cal-c1: #9E69E2;
  --cal-c2: #6B4B4B;
  --cal-c3: #222222;
  --cal-dark-font: #2f2727;
  --cal-pink: #FFE8EC;
  --cal-title: #000000;
  --cal-sky: #CDE7EB;
  --cal-bg-pink: #FEFAFB;
  --cal-s: #6cca79;
  --cal-light-green: #E4F0E6;
  --cal-upload-border: #E7A6AD;
  --cal-upload-grid: rgba(247, 97, 107, 0.16);
  --cal-upload-bg: #FFFCFC;
  --cal-white: #ffffff;
  --cal-border-light: #eeeeee;
  --cal-bg-header: #ffffff;

  --color-main: var(--cal-main);
  --color-good: var(--cal-md);
  --color-good-bg: var(--cal-light-green);
  --color-upload-border: var(--cal-upload-border);
  --color-upload-grid: var(--cal-upload-grid);
  --color-upload-bg: var(--cal-upload-bg);
  --color-page: #F7F8FA;
  --color-surface: var(--cal-white);
  --color-header-surface: var(--cal-bg-header);
  --color-text: var(--cal-dark-font);
  --color-muted: var(--cal-dark2);
  --color-border: #E6E8EC;
  --color-border-light: #F0F1F3;
  --color-primary: var(--color-main);
  --color-primary-hover: var(--cal-red);
  --color-alert: var(--color-primary);
  --color-alert-bg: var(--cal-pink);
  --color-alert-border: var(--color-primary);
  --color-notice-bg: var(--cal-bg-pink);
  --color-notice-border: var(--cal-border-light);
  --color-shadow: rgba(15, 23, 42, 0.08);
  --color-shadow-soft: rgba(15, 23, 42, 0.05);
  --color-shadow-strong: rgba(15, 23, 42, 0.12);
  --surface-ring: 0 0 0 1px rgba(15, 23, 42, 0.06);
  --surface-shadow: var(--surface-ring), 0 14px 36px var(--color-shadow-soft);
  --surface-shadow-strong: var(--surface-ring), 0 18px 52px rgba(15, 23, 42, 0.09);
  --focus-ring: 0 0 0 4px rgba(247, 97, 107, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #ffffff;
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Apple SD Gothic Neo", "Noto Sans KR", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.app-header {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-header-surface);
}

.turbo-progress-bar {
  height: 10px;
  background: var(--color-main);
  box-shadow: 0 0 12px rgba(247, 97, 107, 0.34);
  z-index: 2147483647;
}

.app-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  gap: 20px;
  padding: 12px 0;
}

.app-header__primary {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 18px;
}

.app-header__brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 10px;
  color: var(--color-text);
  font-weight: 800;
  text-decoration: none;
}

.app-header__brand-logo {
  display: block;
  width: auto;
  height: 24px;
}

.app-header__brand-label {
  color: var(--cal-dark1);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}

.app-header__tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.app-header__language,
.app-header__identity {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
}

.app-header__language {
  position: relative;
  padding: 0;
}

.app-header__locale-dropdown {
  position: relative;
}

.app-header__locale-summary {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  gap: 6px;
  padding: 0 12px;
  cursor: pointer;
  list-style: none;
}

.app-header__locale-summary::-webkit-details-marker {
  display: none;
}

.app-header__locale-summary::marker {
  content: "";
}

.app-header__locale-summary::after {
  width: 7px;
  height: 7px;
  margin-left: 4px;
  border-right: 1.5px solid var(--color-muted);
  border-bottom: 1.5px solid var(--color-muted);
  content: "";
  transform: translateY(-2px) rotate(45deg);
}

.app-header__locale-dropdown[open] .app-header__locale-summary::after {
  transform: translateY(2px) rotate(225deg);
}

.app-header__locale-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  display: grid;
  min-width: 156px;
  gap: 4px;
  margin: 0;
  padding: 6px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
  box-shadow: 0 10px 24px var(--color-shadow);
  list-style: none;
}

.app-header__locale-menu li {
  margin: 0;
}

.app-header__locale-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 5px;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.app-header__locale-link:hover,
.app-header__locale-link.is-active {
  background: var(--color-notice-bg);
  color: var(--color-primary);
}

.app-header__tool-label {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 700;
}

.app-header__tool-value {
  color: var(--color-text);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.app-header__locale-summary .app-header__tool-value {
  color: var(--color-main);
}

.app-header__logout:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.app-header__tools form {
  margin: 0;
}

.auth-shell {
  display: grid;
  width: min(920px, calc(100% - 32px));
  min-height: calc(100vh - 180px);
  margin: 0 auto;
  padding: 56px 0;
  place-items: center;
}

.auth-panel {
  display: grid;
  width: min(560px, 100%);
  gap: 24px;
  padding: 32px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  box-shadow: 0 12px 32px var(--color-shadow);
  text-align: center;
}

.auth-panel__content {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.auth-panel__description,
.auth-panel__status {
  margin: 0;
  color: var(--color-muted);
}

.auth-panel h1 {
  margin: 0;
  color: var(--color-main);
  font-size: 28px;
  line-height: 1.25;
}

.auth-panel__actions {
  display: grid;
  gap: 10px;
}

.auth-panel__button {
  justify-content: center;
  width: 100%;
}

.button.auth-panel__button--apple {
  border-color: #1d1d1f;
  background: #ffffff;
  color: #1d1d1f;
  box-shadow: inset 4px 0 #1d1d1f;
}

.button.auth-panel__button--apple:hover:not(:disabled) {
  background: #f5f5f7;
  box-shadow: inset 4px 0 #1d1d1f;
}

.button.auth-panel__button--google {
  border-color: #b7dfc3;
  background: #f0f8f2;
  color: #137333;
  box-shadow: inset 4px 0 #34a853;
}

.button.auth-panel__button--google:hover:not(:disabled) {
  background: #e4f3e8;
  box-shadow: inset 4px 0 #34a853;
}

.button.auth-panel__button--facebook {
  border-color: #b8d3ff;
  background: #f0f6ff;
  color: #1877f2;
  box-shadow: inset 4px 0 #1877f2;
}

.button.auth-panel__button--facebook:hover:not(:disabled) {
  background: #e6f0ff;
  box-shadow: inset 4px 0 #1877f2;
}

.auth-panel__button.is-loading {
  cursor: wait;
  opacity: 0.76;
}

.button.auth-panel__cache-refresh {
  justify-self: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: var(--color-primary);
}

.button.auth-panel__cache-refresh:hover:not(:disabled) {
  background: transparent;
  color: var(--color-main);
}

.auth-panel__cache-refresh-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.button.auth-panel__cache-refresh.is-loading {
  cursor: wait;
  opacity: 0.76;
}

.auth-panel__status {
  min-height: 20px;
  font-size: 13px;
}

.auth-panel__status.is-loading {
  display: inline-flex;
  align-items: center;
  justify-self: center;
  width: max-content;
  min-width: 22px;
  color: transparent;
  font-size: 0;
}

.auth-panel__status.is-loading::before {
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: auth-spinner 0.75s linear infinite;
  content: "";
}

.auth-panel__status.is-error {
  padding: 10px 12px;
  border: 1px solid var(--color-alert-border);
  border-radius: 6px;
  background: var(--color-alert-bg);
  color: var(--color-alert);
  font-weight: 800;
  line-height: 1.5;
  white-space: pre-line;
}

@keyframes auth-spinner {
  to {
    transform: rotate(360deg);
  }
}

.app-shell {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.app-shell--wide {
  width: min(1120px, calc(100% - 32px));
}

.app-shell--upload-home {
  width: min(2000px, calc(100% - 32px));
}

.app-shell--roster-flow {
  width: min(2000px, calc(100% - 32px));
  padding-top: 14px;
}

.panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 24px;
}

.panel h2 {
  margin: 0 0 20px;
  font-size: 20px;
}

.panel h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.panel-heading h2 {
  margin: 0;
}

.workplace-subheader {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

.workplace-subheader__inner {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  width: min(1120px, calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
  gap: 28px;
  padding: 10px 0;
}

.workplace-subheader__title {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.workplace-subheader__title h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.workplace-status-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
}

.workplace-status-list div {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 0 14px;
  border-left: 1px solid var(--color-border);
}

.workplace-status-list div:first-child {
  padding-left: 0;
  border-left: 0;
}

.workplace-status-list dt {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 700;
}

.workplace-status-list dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--color-text);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-panel {
  border-top: 5px solid var(--cal-dark1);
  transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.app-shell--upload-home .upload-panel {
  max-width: 1120px;
  margin: 0 auto;
}

.upload-panel__heading {
  margin-bottom: 22px;
}

.upload-panel__heading h1 {
  font-size: 22px;
}

.upload-panel.is-dragging {
  border-color: var(--color-good);
  box-shadow: inset 0 0 0 2px var(--color-good);
}

.upload-form {
  display: grid;
  gap: 24px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-weight: 700;
}

.file-picker {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: stretch;
  justify-items: center;
  width: 100%;
  min-height: 232px;
  gap: 18px;
  padding: 38px 20px 28px;
  border: 2px dashed var(--color-upload-border);
  border-radius: 8px;
  background-color: var(--color-upload-bg);
  background-image:
    linear-gradient(var(--color-upload-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-upload-grid) 1px, transparent 1px);
  background-size: 48px 48px;
  text-align: center;
}

.file-picker__content {
  display: grid;
  align-content: center;
  justify-items: center;
  min-width: 0;
  gap: 6px;
}

.file-picker:focus-within {
  border-color: var(--color-primary);
  box-shadow: inset 0 0 0 2px var(--color-alert-bg);
}

.file-picker__input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-picker__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-muted);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.file-picker__filename {
  max-width: min(100%, 520px);
  min-width: 0;
  overflow: hidden;
  color: var(--color-text);
  font-size: 21px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: normal;
  word-break: keep-all;
}

.file-picker__actions {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  width: 100%;
}

.file-picker__submit {
  min-width: min(100%, 214px);
}

.upload-form .button--primary {
  max-width: 100%;
  min-height: 52px;
  padding: 0 22px;
  font-weight: 800;
  white-space: normal;
}

.upload-history {
  max-width: 1120px;
  margin: 28px auto 0;
  padding: 24px 28px 26px;
  border-top: 4px solid var(--cal-day);
  box-shadow: 0 14px 32px rgba(47, 39, 39, 0.06);
}

.upload-history__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 0;
  padding-right: 6px;
  cursor: pointer;
  list-style: none;
}

.upload-history__heading::-webkit-details-marker {
  display: none;
}

.upload-history__heading::after {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid #8a929d;
  border-bottom: 2px solid #8a929d;
  content: "";
  transform: translateY(-2px) rotate(45deg);
  transition: transform 160ms ease, border-color 160ms ease;
}

.upload-history__details[open] .upload-history__heading {
  margin-bottom: 18px;
}

.upload-history__details[open] .upload-history__heading::after {
  transform: translateY(2px) rotate(225deg);
}

.upload-history__content {
  min-width: 0;
}

.upload-history__toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.upload-history__title-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
  gap: 12px;
}

.upload-history__title-group h2 {
  margin: 0;
  color: var(--cal-dark1);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.2;
}

.upload-history__summary {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--color-page);
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.upload-history__refresh {
  flex: 0 0 auto;
  min-height: 38px;
  font-size: 13px;
}

.upload-history__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  padding: 8px;
  border: 1px solid var(--cal-dark3);
  border-radius: 8px;
  background: var(--color-surface);
}

.upload-history__filter {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.upload-history__filter strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--cal-dark2);
  color: var(--color-surface);
  font-size: 13px;
}

.upload-history__filter.is-active {
  border-color: var(--cal-day);
  background: var(--color-surface);
  box-shadow: inset 0 0 0 1px var(--cal-day);
}

.upload-history__selection {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  margin-bottom: 14px;
  padding: 12px 24px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
}

.upload-history__select-all {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 800;
}

.upload-history input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--color-primary);
}

.upload-history__selected-count {
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 800;
}

.upload-history__hide-selected {
  min-height: 38px;
  color: #ad7f86;
  font-size: 13px;
}

.upload-history__list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.upload-history__item {
  display: grid;
  grid-template-columns: 24px minmax(220px, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 104px;
  padding: 16px 18px 16px 24px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
}

.upload-history [hidden] {
  display: none !important;
}

.upload-history__checkbox {
  justify-self: center;
}

.upload-history__body {
  min-width: 0;
}

.upload-history__body h3 {
  margin: 0 0 5px;
  overflow: hidden;
  color: var(--cal-dark1);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-history__body p {
  margin: 0;
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.upload-history__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.upload-history__status {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-page);
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.upload-history__status--analysis-failed {
  border-color: #f4cbd0;
  background: var(--color-alert-bg);
  color: #8f5960;
}

.upload-history__status--cancelled {
  border-color: var(--cal-dark3);
  background: var(--color-page);
  color: var(--color-muted);
}

.upload-history__status--hidden {
  border-color: var(--cal-dark3);
  background: var(--color-page);
  color: var(--color-muted);
}

.upload-history__status--deployed,
.upload-history__status--deployed-v1,
.upload-history__status--deployed-v2 {
  border-color: #74b985;
  background: #66ad78;
  color: var(--color-surface);
}

.upload-history__action {
  min-height: 38px;
  min-width: 108px;
  font-size: 13px;
}

.upload-history__footer {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.upload-history__show-all {
  width: min(100%, 440px);
  min-height: 46px;
  color: var(--color-text);
  font-size: 15px;
  font-weight: 800;
}

.upload-history__pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.upload-history__collapse-row {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.upload-history__page-button {
  min-width: 42px;
  min-height: 38px;
  padding: 0 12px;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 800;
}

.upload-history__page-button.is-active {
  border-color: var(--cal-day);
  box-shadow: inset 0 0 0 1px var(--cal-day);
}

.upload-history__collapse {
  min-width: 108px;
  min-height: 38px;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 800;
}

.select {
  min-height: 44px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
}

.select:disabled {
  opacity: 1;
}

.sheet-selector {
  margin-bottom: 24px;
}

.duty-type-subheader {
  --duty-control-height: 34px;
  --duty-group-label-width: 84px;
  --duty-input-width: 60px;

  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

.duty-type-subheader__inner {
  display: grid;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  gap: 8px;
  padding: 12px 0 14px;
}

.duty-type-subheader__title-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  align-items: center;
  min-height: 40px;
  gap: 18px;
}

.duty-type-subheader h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.upload-preflight-notice {
  width: min(1120px, 100%);
  margin: -14px auto 14px;
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--color-good-bg);
  color: var(--color-good);
  box-shadow: var(--surface-ring);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.duty-type-save-button {
  justify-self: end;
  min-height: 36px;
}

.duty-type-save-button.button--primary:not(:disabled),
.duty-type-save-button.button--primary:hover:not(:disabled) {
  background: var(--color-good);
  color: var(--color-surface);
}

.duty-type-row,
.duty-type-inline-group {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.duty-type-row--compact {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.duty-type-row h2,
.duty-type-inline-group h2 {
  display: flex;
  flex: 0 0 var(--duty-group-label-width);
  align-items: center;
  justify-content: center;
  width: var(--duty-group-label-width);
  min-height: var(--duty-control-height);
  margin: 0;
  min-width: 0;
  padding: 4px 8px;
  border: 0;
  border-radius: 8px;
  background: var(--cal-dark1);
  color: var(--color-surface);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-align: center;
  white-space: normal;
}

.duty-type-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.duty-type-card {
  --duty-color: var(--color-border);
  --duty-border-color: var(--color-border);

  width: calc(var(--duty-input-width) + 6px);
  min-width: 0;
  padding-left: 2px;
  border: 0;
  border-left: 4px solid var(--duty-color);
  border-radius: 8px;
  background: transparent;
}

.duty-type-card--day {
  --duty-color: var(--cal-day);
}

.duty-type-card--eve {
  --duty-color: var(--cal-eve);
}

.duty-type-card--nt {
  --duty-color: var(--cal-nt);
}

.duty-type-card--24h {
  --duty-color: var(--cal-red);
}

.duty-type-card--md {
  --duty-color: var(--cal-md);
}

.duty-type-card--s {
  --duty-color: var(--cal-s);
}

.duty-type-card--c1 {
  --duty-color: var(--cal-c1);
}

.duty-type-card--c2 {
  --duty-color: var(--cal-c2);
}

.duty-type-card--c3 {
  --duty-color: var(--cal-c3);
}

.duty-type-card--off {
  --duty-color: var(--cal-dark3);
}

.duty-type-card--r,
.duty-type-card--al,
.duty-type-card--vl,
.duty-type-card--hf {
  --duty-color: var(--cal-c3);
}

.duty-type-card--locked {
  --duty-color: var(--cal-dark3);

  background: transparent;
}

.duty-type-card--locked .duty-type-label-input {
  background: var(--color-border-light);
  color: var(--color-muted);
  cursor: not-allowed;
}

.duty-type-label-input {
  width: var(--duty-input-width);
  min-width: 0;
  height: var(--duty-control-height);
  padding: 0 10px;
  border: 1px solid var(--duty-border-color);
  border-radius: 6px;
  appearance: none;
  background: var(--color-surface);
  box-shadow: none;
  color: var(--color-text);
  font: inherit;
  font-size: 16px;
  font-weight: 800;
}

.duty-type-label-input:focus {
  border-color: var(--color-primary);
  outline: 2px solid var(--color-alert-bg);
  outline-offset: 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.button--primary {
  background: var(--color-primary);
  color: var(--color-surface);
}

.button--primary:hover {
  background: var(--color-primary-hover);
}

.button--secondary {
  border-color: var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
}

.detail-panel__details {
  interpolate-size: allow-keywords;
}

.detail-panel__details::details-content {
  overflow: clip;
  block-size: 0;
  opacity: 0;
  transform: translateY(-6px);
  transition:
    block-size 260ms ease,
    content-visibility 260ms ease allow-discrete,
    opacity 180ms ease,
    transform 220ms ease;
}

.detail-panel__details[open]::details-content {
  block-size: auto;
  opacity: 1;
  transform: translateY(0);
}

.detail-panel__heading {
  justify-content: flex-start;
  flex-wrap: wrap;
  cursor: pointer;
  list-style: none;
}

.detail-panel__heading::-webkit-details-marker {
  display: none;
}

.detail-panel__heading::after {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 2px solid var(--color-muted);
  border-bottom: 2px solid var(--color-muted);
  transform: rotate(45deg);
  transition:
    transform 180ms ease,
    border-color 180ms ease;
}

.detail-panel__details[open] .detail-panel__heading::after {
  transform: translateY(3px) rotate(225deg);
}

.detail-panel__notice {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--color-notice-border);
  border-radius: 6px;
  background: var(--color-good-bg);
  color: var(--color-good);
  font-size: 13px;
  font-weight: 700;
}

.detail-panel__notice--alert {
  border-color: rgba(247, 97, 107, 0.35);
  background: rgba(255, 232, 236, 0.55);
  color: #c84b55;
}

.detail-panel__compact-meta {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
  gap: 8px;
  margin: 0;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 800;
}

.detail-panel__compact-meta span {
  overflow: hidden;
  max-width: min(420px, 50vw);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-panel__compact-meta span + span::before {
  content: "/";
  margin-right: 8px;
  color: var(--color-border);
}

.progress-dashboard {
  margin-top: 20px;
}

.progress-dashboard__heading {
  align-items: flex-start;
}

.progress-dashboard__title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.progress-dashboard__title h2 {
  margin: 0;
}

.progress-dashboard__period {
  margin: 0;
  color: var(--color-good);
  font-size: 21px;
  font-weight: 900;
  line-height: 1.1;
}

.progress-dashboard__stop-form {
  display: inline-flex;
  margin: 0;
}

.progress-dashboard__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.progress-dashboard__deploy-form {
  display: inline-flex;
  margin: 0;
}

.progress-dashboard__stop-button:disabled,
.progress-dashboard__deploy-button:disabled {
  color: var(--color-main);
  cursor: not-allowed;
  opacity: 0.55;
}

.progress-steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  list-style: none;
  overflow: hidden;
}

.progress-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px;
  border-right: 1px solid var(--color-border);
  background: var(--color-surface);
}

.progress-step:nth-child(6n) {
  border-right: 0;
}

.progress-step__marker {
  width: 10px;
  height: 10px;
  border: 2px solid var(--color-border);
  border-radius: 999px;
}

.progress-step__label {
  min-width: 0;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 700;
}

.progress-step--completed {
  background: var(--color-good-bg);
}

.progress-step--completed .progress-step__marker {
  border-color: var(--color-good);
  background: var(--color-good);
}

.progress-step--pending .progress-step__marker {
  border-color: var(--cal-dark3);
  background: var(--color-surface);
}

.progress-step--cancelled .progress-step__marker {
  border-color: var(--color-alert);
  background: var(--color-alert-bg);
}

.progress-step--current .progress-step__marker {
  border-color: var(--color-primary);
  background: var(--color-primary);
  animation: progress-current-blink 2.2s ease-in-out infinite;
}

@keyframes progress-current-blink {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  .detail-panel__details::details-content,
  .detail-panel__heading::after,
  .progress-step--current .progress-step__marker {
    transition: none;
  }

  .progress-step--current .progress-step__marker {
    animation: none;
  }
}

.progress-content {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--color-border);
}

.progress-content__title {
  margin: 0 0 14px;
  font-size: 18px;
  line-height: 1.3;
}

.progress-content__list {
  display: grid;
  gap: 0;
  margin: 0;
}

.progress-content__row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border-light);
}

.progress-content__row:last-child {
  border-bottom: 0;
}

.progress-content__row dt {
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 800;
}

.progress-content__row dd {
  min-width: 0;
  margin: 0;
}

.progress-content__duty-summary {
  display: grid;
  gap: 10px;
}

.progress-content__duty-list,
.progress-content__changed-duties,
.progress-content__recommendations {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.progress-content__duty-list li {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 13px;
  font-weight: 800;
}

.progress-content__changed-duties li {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: 6px;
  background: var(--color-surface);
  font-size: 13px;
  font-weight: 800;
}

.progress-content__changed-duties strong {
  color: var(--color-muted);
}

.progress-content__flow {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-content__state {
  flex: 0 0 auto;
  min-width: 84px;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 800;
}

.progress-content__chunk-track {
  display: grid;
  position: relative;
  flex: 1 1 auto;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  min-height: 18px;
  min-width: 0;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--color-border-light);
  border-radius: 6px;
  background: var(--color-page);
  overflow: hidden;
}

.progress-content__chunk-track span {
  position: relative;
  z-index: 1;
  min-width: 0;
  border-radius: 4px;
  background: var(--color-border);
}

.progress-content__row--running .progress-content__chunk-track span {
  animation: progress-chunk-pass 1.15s ease-in-out infinite;
}

.progress-content__chunk-track--activity::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(47, 185, 136, 0.18) 48%, transparent 100%);
  content: "";
  transform: translateX(-100%);
  animation: progress-activity-sweep 1.6s ease-in-out infinite;
}

.progress-content__chunk-track--pulse {
  animation: progress-activity-pulse 0.75s ease-out;
}

.progress-content__row--ai .progress-content__chunk-track span:nth-child(3n + 1) {
  background: var(--cal-sky);
}

.progress-content__row--server .progress-content__chunk-track span:nth-child(4n + 1) {
  background: var(--color-good-bg);
}

.progress-content__chunk-text {
  display: block;
  grid-column: 1 / -1;
  min-width: 0;
  overflow: hidden;
  color: var(--color-text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  text-overflow: clip;
  white-space: nowrap;
  animation: progress-chunk-text-pass 0.5s ease-out;
}

.progress-content__chunk-track span:nth-child(2) {
  animation-delay: 80ms;
}

.progress-content__chunk-track span:nth-child(3) {
  animation-delay: 160ms;
}

.progress-content__chunk-track span:nth-child(4) {
  animation-delay: 240ms;
}

.progress-content__chunk-track span:nth-child(5) {
  animation-delay: 320ms;
}

.progress-content__chunk-track span:nth-child(6) {
  animation-delay: 400ms;
}

.progress-content__chunk-track span:nth-child(7) {
  animation-delay: 480ms;
}

.progress-content__chunk-track span:nth-child(8) {
  animation-delay: 560ms;
}

.progress-content__chunk-track span:nth-child(9) {
  animation-delay: 640ms;
}

.progress-content__chunk-track span:nth-child(10) {
  animation-delay: 720ms;
}

.progress-content__chunk-track span:nth-child(11) {
  animation-delay: 800ms;
}

.progress-content__chunk-track span:nth-child(12) {
  animation-delay: 880ms;
}

@keyframes progress-chunk-pass {
  0%,
  100% {
    opacity: 0.35;
    transform: scaleY(0.7);
  }

  45% {
    opacity: 1;
    transform: scaleY(1);
  }
}

@keyframes progress-activity-sweep {
  0% {
    transform: translateX(-100%);
  }

  55%,
  100% {
    transform: translateX(100%);
  }
}

@keyframes progress-activity-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(47, 185, 136, 0.22);
  }

  50% {
    box-shadow: 0 0 0 4px rgba(47, 185, 136, 0.12);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(47, 185, 136, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .progress-content__row--running .progress-content__chunk-track span,
  .progress-content__chunk-track--activity::before,
  .progress-content__chunk-track--pulse {
    animation: none;
  }
}

@keyframes progress-chunk-text-pass {
  0% {
    opacity: 0.45;
    transform: translateX(8px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.progress-content__chat {
  display: grid;
  min-height: 92px;
  gap: 6px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
  list-style: none;
}

.progress-content__chat-message {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  align-items: baseline;
  min-width: 0;
  gap: 10px;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 700;
}

.progress-content__chat-meta {
  display: inline-grid;
  grid-template-columns: minmax(36px, max-content) max-content;
  align-items: baseline;
  column-gap: 6px;
  min-width: 0;
  color: var(--color-muted);
  white-space: nowrap;
}

.progress-content__chat-meta strong {
  color: var(--color-text);
  white-space: nowrap;
}

.progress-content__chat-meta time {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.progress-content__chat-body {
  min-width: 0;
  overflow-wrap: anywhere;
}

.progress-content__text,
.progress-content__input {
  display: block;
  width: 100%;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.progress-content__text--muted {
  background: var(--color-page);
  color: var(--color-muted);
}

.progress-content__input {
  min-height: 62px;
  resize: none;
}

.progress-content__input::placeholder {
  color: var(--color-muted);
}

.progress-content__input:focus {
  border-color: var(--color-primary);
  outline: 2px solid var(--color-alert-bg);
  outline-offset: 0;
}

.progress-content__answer-form,
.progress-content__recommendation-form {
  margin: 0;
}

.progress-content__recommendation-empty {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.progress-content__answer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 8px;
  align-items: stretch;
}

.progress-content__submit {
  min-height: 62px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 800;
}

.progress-content__row--inactive dt {
  color: var(--cal-dark3);
}

.progress-content__recommendation {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.progress-content__recommendation:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.progress-content__recommendation--refresh {
  border-style: dashed;
}

.app-shell--roster-flow .detail-panel,
.app-shell--roster-flow .progress-dashboard {
  padding: 18px 22px 20px;
}

.app-shell--roster-flow .detail-panel {
  --detail-label-column: 122px;
}

.app-shell--roster-flow .detail-panel__heading,
.app-shell--roster-flow .progress-dashboard__heading {
  margin-bottom: 16px;
}

.app-shell--roster-flow .detail-panel--collapsed {
  padding-block: 14px;
}

.app-shell--roster-flow .detail-panel__details:not([open]) .detail-panel__heading {
  margin-bottom: 0;
}

.app-shell--roster-flow .detail-panel h1,
.app-shell--roster-flow .progress-dashboard__title h2 {
  color: var(--cal-dark1);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.2;
}

.app-shell--roster-flow .detail-panel__notice {
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.app-shell--roster-flow .detail-list {
  margin-bottom: 18px;
}

.app-shell--roster-flow .detail-list div {
  grid-template-columns: var(--detail-label-column) minmax(0, 1fr);
  gap: 14px;
  padding: 10px 0;
}

.app-shell--roster-flow .detail-list dt,
.app-shell--roster-flow .detail-list dd {
  font-size: 13px;
}

.app-shell--roster-flow .detail-list dt {
  font-weight: 800;
}

.app-shell--roster-flow .detail-list dd {
  overflow-wrap: anywhere;
  font-weight: 700;
}

.app-shell--roster-flow .status-badge {
  min-height: 26px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
}

.app-shell--roster-flow .sheet-selector {
  align-items: center;
  grid-template-columns: var(--detail-label-column) minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 0;
  padding: 10px 0 0;
}

.app-shell--roster-flow .sheet-selector label {
  font-size: 13px;
  font-weight: 800;
}

.app-shell--roster-flow .sheet-selector__control {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.app-shell--roster-flow .sheet-selector__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.app-shell--roster-flow .select {
  min-height: 40px;
  font-size: 13px;
}

.app-shell--roster-flow .sheet-selector .select {
  border-color: var(--cal-dark2);
}

.app-shell--roster-flow .sheet-selector__period {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.app-shell--roster-flow .sheet-selector__period-value {
  color: var(--cal-dark1);
}

.app-shell--roster-flow .sheet-selector__confirm {
  min-height: 40px;
  padding: 0 12px;
  white-space: nowrap;
}

.app-shell--roster-flow .sheet-selector__summary {
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
}

.app-shell--roster-flow .sheet-selector__summary summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 0 12px;
  color: var(--color-text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  list-style: none;
}

.app-shell--roster-flow .sheet-selector__summary summary::-webkit-details-marker {
  display: none;
}

.app-shell--roster-flow .sheet-selector__summary-count {
  color: var(--color-primary);
  font-size: 12px;
  white-space: nowrap;
}

.app-shell--roster-flow .sheet-selector__summary-count--confirmed {
  color: var(--color-good);
}

.app-shell--roster-flow .sheet-selector__summary-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0 12px 12px;
  border-top: 1px solid var(--color-border);
}

.app-shell--roster-flow .sheet-selector__summary-list div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  padding-top: 8px;
}

.app-shell--roster-flow .sheet-selector__summary-list dt,
.app-shell--roster-flow .sheet-selector__summary-list dd {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.app-shell--roster-flow .sheet-selector__summary-list dt {
  color: var(--color-muted);
  font-weight: 800;
}

.app-shell--roster-flow .sheet-selector__summary-list dd {
  color: var(--color-text);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.app-shell--roster-flow .sheet-selector__summary-reason dd {
  white-space: pre-wrap;
}

.app-shell--roster-flow .actions .button,
.app-shell--roster-flow .progress-dashboard__stop-button,
.app-shell--roster-flow .progress-dashboard__deploy-button {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 800;
}

.app-shell--roster-flow .progress-dashboard__heading {
  align-items: center;
}

.app-shell--roster-flow .progress-step {
  min-height: 40px;
  gap: 7px;
  padding: 8px 10px;
}

.app-shell--roster-flow .progress-step__marker {
  width: 9px;
  height: 9px;
}

.app-shell--roster-flow .progress-step__label {
  font-size: 12px;
  font-weight: 800;
}

.app-shell--roster-flow .progress-content {
  margin-top: 18px;
  padding-top: 16px;
}

.app-shell--roster-flow .progress-content__title {
  margin: 0;
  font-size: 17px;
}

.app-shell--roster-flow .progress-content__row {
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 14px;
  padding: 9px 0;
}

.app-shell--roster-flow .progress-content__row dt,
.app-shell--roster-flow .progress-content__state {
  font-size: 12px;
}

.app-shell--roster-flow .progress-content__state {
  min-width: 76px;
}

.app-shell--roster-flow .progress-content__chunk-track {
  min-height: 16px;
}

.app-shell--roster-flow .progress-content__duty-list li,
.app-shell--roster-flow .progress-content__changed-duties li {
  min-height: 28px;
  font-size: 12px;
}

.app-shell--roster-flow .progress-content__chat {
  min-height: 78px;
  gap: 5px;
  padding: 9px 12px;
}

.app-shell--roster-flow .progress-content__chat-message {
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 8px;
  font-size: 12px;
}

.app-shell--roster-flow .progress-content__chat-meta time {
  font-size: 11px;
}

.app-shell--roster-flow .progress-content__text,
.app-shell--roster-flow .progress-content__input {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 12px;
}

.app-shell--roster-flow .progress-content__input {
  min-height: 54px;
  border-color: var(--cal-day);
}

.app-shell--roster-flow .progress-content__input:focus {
  border-color: var(--cal-day);
  outline-color: var(--cal-sky);
}

.app-shell--roster-flow .progress-content__submit {
  min-height: 54px;
  font-size: 12px;
}

.app-shell--roster-flow .progress-content__recommendation {
  min-height: 32px;
  font-size: 12px;
}

.roster-preview {
  --roster-name-column: 82px;
  --roster-day-column: 30px;
  --roster-day-column-min: 28px;
  --roster-day-column-max: 40px;

  scroll-margin-top: 96px;
  margin-top: 28px;
  padding: 22px 24px 24px;
  overflow: visible;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 252, 253, 0.98)),
    var(--color-surface);
}

.roster-preview__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.roster-preview__title-group {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  min-width: 0;
}

.roster-preview__title-group h2 {
  margin: 0;
  color: var(--cal-dark1);
  font-size: 23px;
  font-weight: 900;
  line-height: 1.2;
}

.roster-preview__period {
  display: inline-flex;
  align-items: center;
  margin: 0;
  color: var(--color-good);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.1;
}

.roster-preview__filters {
  display: flex;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.roster-preview__filter {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.02);
  color: var(--cal-dark1);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

.roster-preview__filter-input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--color-good);
  cursor: pointer;
}

.roster-preview__top-scroll {
  margin-bottom: 10px;
}

.roster-preview__table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #e3e8ef;
  border-radius: 16px;
  background: var(--color-surface);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #aeb8c2 #eef3f2;
}

.roster-preview__top-scroll,
.roster-preview__bottom-scroll {
  position: sticky;
  z-index: 5;
  display: flex;
  align-items: center;
  max-width: 100%;
  min-height: 20px;
  padding: 3px;
  border: 1px solid #e8edf3;
  border-radius: 999px;
  background: #eef3f2;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.02);
  cursor: pointer;
  touch-action: none;
  user-select: none;
}

.roster-preview__top-scroll {
  top: 8px;
}

.roster-preview__bottom-scroll {
  bottom: 8px;
  margin-top: 10px;
}

.roster-preview__top-scroll.is-dragging,
.roster-preview__bottom-scroll.is-dragging {
  cursor: grabbing;
}

.roster-preview__scroll-track {
  position: relative;
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: #eef3f2;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.roster-preview__scroll-thumb {
  position: absolute;
  top: 2px;
  left: 0;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #aeb8c2;
  box-shadow: 0 2px 6px rgba(47, 54, 62, 0.12);
  cursor: grab;
}

.roster-preview__top-scroll.is-dragging .roster-preview__scroll-thumb,
.roster-preview__bottom-scroll.is-dragging .roster-preview__scroll-thumb {
  cursor: grabbing;
}

.roster-preview__table-wrap {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 14px 28px rgba(15, 23, 42, 0.04);
}

.roster-preview__top-scroll:focus,
.roster-preview__bottom-scroll:focus,
.roster-preview__table-wrap:focus {
  outline: 2px solid var(--color-alert-bg);
  outline-offset: 3px;
}

.roster-preview__table-wrap::-webkit-scrollbar {
  height: 14px;
}

.roster-preview__table-wrap::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #eef3f2;
}

.roster-preview__table-wrap::-webkit-scrollbar-thumb {
  border: 2px solid #eef3f2;
  border-radius: 999px;
  background: #aeb8c2;
}

.roster-preview__table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.roster-preview__table th,
.roster-preview__table td {
  border-right: 1px solid #e8edf2;
  border-bottom: 1px solid #e8edf2;
}

.roster-preview__table tr > :last-child {
  border-right: 0;
}

.roster-preview__table tbody tr:last-child > * {
  border-bottom: 0;
}

.roster-preview__name-heading,
.roster-preview__person {
  position: sticky;
  left: 0;
  z-index: 2;
  width: var(--roster-name-column);
  min-width: var(--roster-name-column);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 10px 0 18px -18px rgba(15, 23, 42, 0.32);
}

.roster-preview__name-heading {
  z-index: 4;
  height: 52px;
  padding: 0 11px;
  background: linear-gradient(180deg, #f9fbfc, #f2f6f7);
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 900;
  text-align: left;
}

.roster-preview__day-heading {
  height: 52px;
  width: var(--roster-day-column);
  padding: 7px 1px 8px;
  background: linear-gradient(180deg, #f9fbfc, #f2f6f7);
  color: var(--cal-dark1);
  text-align: center;
  vertical-align: top;
}

.roster-preview__day-heading--weekend {
  background: linear-gradient(180deg, #fff8f9, #f7fbfc);
}

.roster-preview__day-heading--week-boundary,
.roster-preview__cell--week-boundary {
  border-left: 3px solid #dce3eb;
}

.roster-preview__date,
.roster-preview__weekday {
  display: block;
  line-height: 1.1;
}

.roster-preview__date {
  font-size: 18px;
  font-weight: 900;
}

.roster-preview__weekday {
  margin-top: 4px;
  color: #858b95;
  font-size: 10.5px;
  font-weight: 900;
}

.roster-preview__weekday--sun {
  color: #b45c62;
}

.roster-preview__weekday--sat {
  color: #4d919c;
}

.roster-preview__person {
  height: 46px;
  padding: 0 11px;
  text-align: left;
  vertical-align: middle;
}

.roster-preview__name {
  display: block;
  color: var(--color-text);
  font-size: 14.5px;
  font-weight: 900;
  line-height: 1.15;
}

.roster-preview__staff-row--group-boundary > * {
  border-top: 3px solid #dce3eb;
}

.roster-preview__staff-row:hover > * {
  background-color: #f8fbfb;
}

.roster-preview__cell {
  --roster-duty-bg: #fbfbfc;
  --roster-duty-color: #6f7481;

  width: var(--roster-day-column);
  height: 46px;
  padding: 3px 2px;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0)),
    var(--roster-duty-bg);
  color: var(--roster-duty-color);
  text-align: center;
  vertical-align: middle;
}

.roster-preview__cell--weekend {
  background:
    linear-gradient(rgba(255, 232, 236, 0.28), rgba(255, 232, 236, 0.28)),
    var(--roster-duty-bg);
}

.roster-preview__cell--day {
  --roster-duty-bg: #f4fcfe;
  --roster-duty-color: #2f6670;
}

.roster-preview__cell--eve {
  --roster-duty-bg: #fff9e8;
  --roster-duty-color: #6a4610;
}

.roster-preview__cell--nt {
  --roster-duty-bg: #f5f7ff;
  --roster-duty-color: #252b6f;
}

.roster-preview__cell--24h {
  --roster-duty-bg: #fff5f6;
  --roster-duty-color: #934046;
}

.roster-preview__cell--md {
  --roster-duty-bg: #f4fbf6;
  --roster-duty-color: #3d7451;
}

.roster-preview__cell--s {
  --roster-duty-bg: #f5fcf6;
  --roster-duty-color: #347b3d;
}

.roster-preview__cell--c1 {
  --roster-duty-bg: #faf7ff;
  --roster-duty-color: #68459a;
}

.roster-preview__cell--c2 {
  --roster-duty-bg: #fbf7f7;
  --roster-duty-color: #5b4040;
}

.roster-preview__cell--c3 {
  --roster-duty-bg: #f4f4f5;
  --roster-duty-color: #2f3338;
}

.roster-preview__cell--r {
  --roster-duty-bg: #fff7fb;
  --roster-duty-color: #8d4d68;
}

.roster-preview__cell--al,
.roster-preview__cell--vl,
.roster-preview__cell--hf {
  --roster-duty-bg: #fff7fb;
  --roster-duty-color: #8d4d68;
}

.roster-preview__cell--off {
  --roster-duty-bg: #fbfbfc;
  --roster-duty-color: #707581;
}

.roster-preview__duty-code {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  min-height: 36px;
  padding-bottom: 9px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
  overflow: hidden;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-overflow: clip;
  white-space: nowrap;
}

.roster-preview__duty-code::after {
  position: absolute;
  bottom: 5px;
  left: 50%;
  width: 16px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  content: "";
  opacity: 0.28;
  transform: translateX(-50%);
}

.roster-preview:has(.roster-preview__filter-input:checked) .roster-preview__cell--hideable .roster-preview__duty-code {
  visibility: hidden;
}

.detail-list {
  display: grid;
  gap: 0;
  margin: 0 0 24px;
}

.detail-list div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
}

.detail-list dt {
  color: var(--color-muted);
  font-weight: 700;
}

.detail-list dd {
  margin: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  background: var(--color-notice-bg);
  color: var(--color-alert);
  font-weight: 700;
}

.status-badge--good {
  border: 1px solid var(--color-border-light);
  background: var(--color-surface);
  color: var(--color-good);
}

.status-badge--muted {
  background: var(--color-notice-bg);
  color: var(--color-muted);
}

.form-errors,
.flash--alert {
  border: 1px solid var(--color-alert-border);
  background: var(--color-alert-bg);
  color: var(--color-alert);
}

.form-errors {
  border-radius: 8px;
  padding: 14px 16px;
}

.form-errors p {
  margin: 0 0 8px;
  font-weight: 700;
}

.form-errors ul {
  margin: 0;
  padding-left: 20px;
}

.flash {
  width: min(920px, calc(100% - 32px));
  margin: 16px auto 0;
  border-radius: 8px;
  padding: 12px 16px;
}

.flash--inline {
  width: 100%;
  margin: 16px 0 0;
}

.flash--notice {
  border: 1px solid var(--color-notice-border);
  background: var(--color-good-bg);
  color: var(--color-good);
}

.flash--success {
  border: 1px solid var(--color-notice-border);
  background: var(--color-good-bg);
  color: var(--color-good);
}

.app-header {
  position: sticky;
  top: 0;
  border-bottom: 0;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
}

.app-header__inner,
.workplace-subheader__inner,
.duty-type-subheader__inner {
  width: min(1120px, calc(100% - 32px));
}

.app-header__inner {
  min-height: 78px;
}

.app-header__brand {
  gap: 12px;
}

.app-header__brand-logo {
  height: 26px;
}

.app-header__brand-label {
  color: var(--cal-dark1);
  font-size: 15px;
  letter-spacing: -0.01em;
}

.app-header__primary {
  flex: 1 1 auto;
}

.app-header__tools {
  min-width: 0;
}

.app-header__usage-frame {
  display: block;
  flex: 0 1 170px;
  width: clamp(124px, 14vw, 170px);
  min-width: 124px;
}

.app-header__usage-card {
  --weekly-usage-accent: #177a52;
  --weekly-usage-progress: #177a52;
  --weekly-usage-surface: #f1faf5;

  display: grid;
  min-height: 42px;
  gap: 6px;
  padding: 7px 10px 8px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--weekly-usage-accent) 22%, white);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--weekly-usage-surface), #ffffff 76%);
  box-shadow: 0 5px 16px rgba(15, 23, 42, 0.05);
}

.app-header__usage-card.is-warning {
  --weekly-usage-accent: #855700;
  --weekly-usage-progress: #855700;
  --weekly-usage-surface: #fff8e6;
}

.app-header__usage-card.is-critical,
.app-header__usage-card.is-reached,
.app-header__usage-card.is-unaccounted {
  --weekly-usage-accent: #b42332;
  --weekly-usage-progress: #b42332;
  --weekly-usage-surface: #fff0f2;
}

.app-header__usage-card.is-unavailable,
.app-header__usage-card.is-loading {
  --weekly-usage-accent: #6b7079;
  --weekly-usage-progress: #6b7079;
  --weekly-usage-surface: #f6f7f8;
}

.app-header__usage-heading {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.app-header__usage-title {
  min-width: 0;
  overflow: hidden;
  color: #555b64;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-header__usage-percentage {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--weekly-usage-accent);
  font-size: 14px;
  font-weight: 950;
  line-height: 1;
}

.app-header__usage-progress {
  display: block;
  width: 100%;
  height: 5px;
  overflow: hidden;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: #e6e8eb;
}

.app-header__usage-progress::-webkit-progress-bar {
  border-radius: 999px;
  background: #e6e8eb;
}

.app-header__usage-progress::-webkit-progress-value {
  border-radius: 999px;
  background: var(--weekly-usage-progress);
  transition: width 180ms ease;
}

.app-header__usage-progress::-moz-progress-bar {
  border-radius: 999px;
  background: var(--weekly-usage-progress);
}

.app-header__usage-progress.is-placeholder {
  opacity: 0.72;
}

@media (prefers-reduced-motion: reduce) {
  .app-header__usage-progress::-webkit-progress-value {
    transition: none;
  }
}

.app-header__language,
.app-header__identity {
  min-height: 42px;
  border-color: transparent;
  border-radius: 12px;
  box-shadow: var(--surface-ring);
}

.app-header__identity {
  padding: 0 14px;
}

.app-header__locale-summary {
  min-height: 42px;
  padding: 0 16px;
}

.app-header__tool-label {
  color: #7b7f88;
  font-size: 11px;
  font-weight: 800;
}

.app-header__tool-value {
  font-size: 14px;
  font-weight: 800;
}

.app-header__locale-menu {
  border: 0;
  border-radius: 12px;
  box-shadow: var(--surface-shadow-strong);
}

.app-header__locale-link {
  min-height: 34px;
  border-radius: 9px;
}

.app-shell--upload-home {
  padding: 42px 0 72px;
}

.panel {
  border: 0;
  border-radius: 18px;
  box-shadow: var(--surface-shadow);
}

.button {
  border-radius: 10px;
  transition:
    background-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.button:not(:disabled):hover {
  transform: translateY(-1px);
}

.button--primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--color-primary), #ff7d86);
  box-shadow: 0 10px 24px rgba(247, 97, 107, 0.22);
}

.button--primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #f34f5b, #ff717c);
  box-shadow: 0 14px 30px rgba(247, 97, 107, 0.26);
}

.button--secondary {
  border-color: transparent;
  box-shadow: var(--surface-ring);
}

.button--secondary:hover:not(:disabled) {
  background: #fbfcfd;
  box-shadow: var(--surface-ring), 0 8px 18px rgba(15, 23, 42, 0.06);
}

.button:focus-visible,
.app-header__locale-summary:focus-visible,
.app-header__locale-link:focus-visible,
.duty-type-label-input:focus-visible,
.file-picker__input:focus-visible + .file-picker__content,
.upload-history__heading:focus-visible,
.upload-history input[type="checkbox"]:focus-visible {
  outline: 0;
  box-shadow: var(--focus-ring), var(--surface-ring);
}

.workplace-subheader,
.duty-type-subheader {
  border-bottom: 0;
  background: transparent;
}

.workplace-subheader__inner {
  grid-template-columns: max-content minmax(0, 1fr);
  min-height: 54px;
  gap: 18px;
  padding: 8px 0;
}

.workplace-subheader__title h2,
.duty-type-subheader h1 {
  color: var(--cal-dark1);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.workplace-status-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.workplace-status-list div {
  display: inline-flex;
  align-items: baseline;
  max-width: 100%;
  min-height: 34px;
  gap: 8px;
  padding: 6px 12px;
  border-left: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--surface-ring);
}

.workplace-status-list div:first-child {
  padding-left: 12px;
}

.workplace-status-list dt {
  color: #737780;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.workplace-status-list dd {
  color: var(--cal-dark1);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.duty-type-subheader {
  padding-bottom: 0;
}

.duty-type-subheader {
  --duty-control-height: 40px;
  --duty-group-label-width: 112px;
  --duty-input-width: 70px;
}

.duty-type-subheader__inner {
  gap: 14px;
  padding: 18px 0 10px;
}

.duty-type-subheader__title-row {
  grid-template-columns: max-content max-content max-content;
  justify-content: start;
  min-height: 46px;
  column-gap: 16px;
  row-gap: 10px;
}

.upload-preflight-notice {
  margin: -34px auto 14px;
  padding: 14px 20px;
  border-radius: 16px;
  background: rgba(45, 175, 117, 0.1);
  color: #1f9a64;
  font-size: 17px;
  font-weight: 900;
  text-align: center;
}

.duty-type-save-button {
  justify-self: start;
  min-height: 42px;
  padding: 0 20px;
}

.duty-type-save-button.button--primary:not(:disabled),
.duty-type-save-button.button--primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--color-good), #77c990);
  box-shadow: 0 10px 22px rgba(45, 175, 117, 0.2);
  color: var(--color-surface);
}

.duty-type-save-button.button--primary:disabled {
  border-color: var(--color-border);
  background: var(--color-border-light);
  box-shadow: none;
  color: var(--color-muted);
}

.duty-type-row,
.duty-type-inline-group {
  gap: 14px;
}

.duty-type-row h2,
.duty-type-inline-group h2 {
  min-height: var(--duty-control-height);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cal-dark1), #59616b);
  box-shadow: 0 8px 18px rgba(59, 64, 71, 0.14);
  font-size: 17px;
}

.duty-type-grid {
  gap: 10px;
}

.duty-type-card {
  position: relative;
  width: var(--duty-input-width);
  padding-left: 0;
  border-left: 0;
}

.duty-type-card::before {
  position: absolute;
  right: 14px;
  bottom: 5px;
  left: 14px;
  z-index: 1;
  height: 3px;
  border-radius: 999px;
  background: var(--duty-color);
  content: "";
  opacity: 0.75;
}

.duty-type-card--locked::before {
  opacity: 0.55;
}

.duty-type-label-input {
  width: var(--duty-input-width);
  height: var(--duty-control-height);
  border-color: transparent;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--surface-ring);
  font-size: 15px;
  font-weight: 900;
  text-align: center;
  transition:
    box-shadow 160ms ease,
    transform 160ms ease,
    background-color 160ms ease;
}

.duty-type-label-input:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--surface-ring), 0 8px 18px rgba(15, 23, 42, 0.06);
}

.duty-type-label-input:focus {
  border-color: transparent;
  outline: 0;
  box-shadow: var(--focus-ring), 0 0 0 1px var(--color-primary);
}

.duty-type-card--locked .duty-type-label-input {
  background: #f0f1f3;
  color: #777b84;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05);
}

.upload-panel {
  position: relative;
  overflow: hidden;
  padding: 34px 40px 40px;
  border-top: 0;
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.upload-panel::before,
.upload-history::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 5px;
  content: "";
}

.upload-panel::before {
  background: linear-gradient(90deg, var(--cal-red), #ff9aa2 45%, #ffd6da);
}

.upload-panel__heading h1,
.upload-history__title-group h2 {
  color: var(--cal-dark1);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.upload-panel.is-dragging {
  box-shadow: var(--surface-shadow-strong), 0 0 0 4px rgba(45, 175, 117, 0.12);
}

.file-picker {
  min-height: 276px;
  gap: 20px;
  padding: 42px 24px 32px;
  border: 1px dashed rgba(247, 97, 107, 0.42);
  border-radius: 20px;
  background-color: rgba(255, 252, 252, 0.82);
  background-image:
    linear-gradient(rgba(247, 97, 107, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247, 97, 107, 0.09) 1px, transparent 1px),
    radial-gradient(circle at 50% 20%, rgba(247, 97, 107, 0.11), transparent 34%);
  background-size: 48px 48px, 48px 48px, 100% 100%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.84);
  transition: border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.file-picker__content::before {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin-bottom: 4px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(247, 97, 107, 0.12), rgba(247, 97, 107, 0.04));
  box-shadow: var(--surface-ring);
  color: var(--color-primary);
  content: "↑";
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  transition: background-color 120ms ease, box-shadow 120ms ease, color 120ms ease, transform 120ms ease;
}

.file-picker:focus-within {
  border-color: rgba(247, 97, 107, 0.72);
  box-shadow: var(--focus-ring), inset 0 0 0 1px rgba(255, 255, 255, 0.84);
}

.file-picker__filename {
  color: var(--cal-dark1);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.file-picker__button {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--surface-ring);
  color: #737780;
  font-size: 14px;
  transition: background-color 120ms ease, box-shadow 120ms ease, color 120ms ease, transform 120ms ease;
}

.file-picker__submit {
  min-width: min(100%, 240px);
  border-radius: 14px;
}

.upload-panel.is-dragging {
  border-color: var(--color-main);
  box-shadow: var(--surface-shadow-strong), 0 0 0 8px rgba(247, 97, 107, 0.18), 0 18px 60px rgba(247, 97, 107, 0.22);
}

.upload-panel.is-dragging .file-picker {
  border: 4px solid var(--color-main);
  background-color: #fff0f2;
  box-shadow:
    0 0 0 8px rgba(247, 97, 107, 0.16),
    0 24px 70px rgba(247, 97, 107, 0.26),
    inset 0 0 0 2px rgba(255, 255, 255, 0.9);
  transform: translateY(-3px) scale(1.01);
}

.upload-panel.is-dragging .file-picker__content::before {
  background: var(--color-main);
  box-shadow: 0 14px 34px rgba(247, 97, 107, 0.42);
  color: var(--cal-white);
  transform: scale(1.18);
}

.upload-panel.is-dragging .file-picker__filename {
  color: var(--color-main);
}

.upload-panel.is-dragging .file-picker__button {
  background: var(--color-main);
  box-shadow: 0 10px 28px rgba(247, 97, 107, 0.28);
  color: var(--cal-white);
  transform: translateY(-1px);
}

.upload-history {
  position: relative;
  overflow: hidden;
  padding: 32px;
  border-top: 0;
  border-radius: 20px;
  box-shadow: var(--surface-shadow-strong);
}

.upload-history::before {
  background: linear-gradient(90deg, var(--cal-day), #91d9df 45%, #d9f3f6);
}

.upload-history__details[open] .upload-history__heading {
  margin-bottom: 22px;
}

.upload-history__flash {
  margin: 0 0 16px;
  border-radius: 14px;
}

.upload-history__summary {
  min-height: 32px;
  padding: 0 13px;
  background: #f4f5f7;
  color: #686d76;
  font-weight: 900;
}

.upload-history__filters {
  gap: 6px;
  margin-bottom: 16px;
  padding: 6px;
  border: 0;
  border-radius: 15px;
  background: #f5f7f9;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.upload-history__filter {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  font-weight: 900;
}

.upload-history__filter strong {
  background: #707782;
}

.upload-history__filter.is-active {
  border-color: transparent;
  background: #ffffff;
  box-shadow: var(--surface-ring), 0 8px 20px rgba(15, 23, 42, 0.06);
}

.upload-history__filter.is-active strong {
  background: var(--cal-day);
}

.upload-history__selection {
  min-height: 68px;
  margin-bottom: 18px;
  border: 0;
  border-radius: 16px;
  background: #fbfcfd;
  box-shadow: var(--surface-ring);
}

.upload-history__item {
  min-height: 108px;
  border: 0;
  border-radius: 17px;
  box-shadow: var(--surface-ring);
  transition:
    box-shadow 160ms ease,
    transform 160ms ease,
    background-color 160ms ease;
}

.upload-history__item:hover {
  background: #fffefe;
  box-shadow: var(--surface-ring), 0 14px 28px rgba(15, 23, 42, 0.07);
  transform: translateY(-1px);
}

.upload-history__body h3 {
  color: var(--cal-dark1);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.upload-history__body p {
  color: #6f747d;
  font-weight: 800;
}

.upload-history__status {
  min-height: 34px;
  border: 0;
  background: #f3f4f6;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05);
  color: #696e78;
}

.upload-history__status--deployed,
.upload-history__status--deployed-v1,
.upload-history__status--deployed-v2 {
  background: rgba(45, 175, 117, 0.12);
  color: #248958;
}

.upload-history__action {
  min-height: 42px;
  min-width: 116px;
}

.upload-history__show-all {
  min-height: 50px;
  border-radius: 14px;
}

.progress-dashboard {
  overflow: hidden;
}

.progress-dashboard__heading {
  align-items: center;
}

.progress-dashboard__actions {
  align-self: start;
}

.progress-dashboard__stop-button {
  background: #ffffff;
  color: #414751;
}

.progress-steps {
  gap: 6px;
  border: 0;
  border-radius: 14px;
  background: #f4f6f8;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
  overflow: visible;
}

.progress-step {
  grid-template-columns: 18px minmax(0, 1fr);
  min-height: 44px;
  padding: 9px 12px;
  border-right: 0;
  border-radius: 12px;
  background: transparent;
}

.progress-step__marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1.5px solid #c9ced6;
  background: #ffffff;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.progress-step__label {
  color: #525965;
  font-size: 12px;
  font-weight: 900;
}

.progress-step--completed {
  background: rgba(45, 175, 117, 0.1);
}

.progress-step--completed .progress-step__marker {
  border-color: var(--color-good);
  background: var(--color-good);
}

.progress-step--completed .progress-step__marker::before {
  content: "✓";
}

.progress-step--current {
  background: #ffffff;
  box-shadow: var(--surface-ring), 0 8px 20px rgba(15, 23, 42, 0.06);
}

.progress-step--current .progress-step__marker {
  border-color: var(--color-good);
  background: var(--color-good);
  animation: progress-current-blink 2.2s ease-in-out infinite;
}

.progress-step--pending .progress-step__marker {
  border-color: #c9ced6;
  background: #ffffff;
}

.progress-step--cancelled .progress-step__marker {
  border-color: var(--color-alert);
  background: var(--color-alert);
}

.progress-dashboard__deploy-card {
  display: grid;
  grid-template-columns: minmax(300px, 0.42fr) minmax(0, 0.58fr);
  align-items: stretch;
  gap: 28px;
  margin-top: 16px;
  padding: 26px 28px;
  overflow: visible;
  border-radius: 20px;
  background:
    radial-gradient(circle at 24% 0%, rgba(45, 175, 117, 0.2), transparent 44%),
    linear-gradient(135deg, rgba(45, 175, 117, 0.16), rgba(87, 190, 198, 0.12)),
    #ffffff;
  box-shadow: var(--surface-ring), 0 20px 44px rgba(45, 175, 117, 0.16);
  text-align: left;
}

.progress-dashboard__deploy-card::before {
  display: none;
}

.progress-dashboard__deploy-action {
  display: grid;
  justify-items: start;
  align-content: start;
  gap: 16px;
  height: 100%;
  min-width: 0;
}

.progress-dashboard__deploy-context {
  display: grid;
  align-items: center;
  justify-content: start;
  justify-items: start;
  gap: 0;
  min-width: 0;
}

.progress-dashboard__deploy-eyebrow {
  display: none;
}

.progress-dashboard__deploy-title {
  margin: 0;
  color: var(--cal-dark1);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0;
}

.progress-dashboard__deploy-form {
  display: flex;
  width: 100%;
  margin-top: auto;
  justify-content: center;
}

.progress-dashboard__deploy-button.button--primary {
  width: 100%;
  min-height: 56px;
  padding: 0 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-good), #69c987);
  box-shadow: 0 16px 34px rgba(45, 175, 117, 0.28);
  font-size: 16px;
  font-weight: 900;
  transition:
    background 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease,
    transform 160ms ease;
}

.progress-dashboard__deploy-button.button--primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #1f8f5d, #49b875);
  box-shadow:
    0 0 0 7px rgba(45, 175, 117, 0.14),
    0 24px 48px rgba(45, 175, 117, 0.42);
  filter: saturate(1.08);
  transform: translateY(-4px) scale(1.03);
}

.progress-dashboard__deploy-button.button--primary:active:not(:disabled) {
  box-shadow:
    0 0 0 4px rgba(45, 175, 117, 0.12),
    0 14px 28px rgba(45, 175, 117, 0.3);
  transform: translateY(-1px) scale(0.99);
}

.publish-summary {
  display: grid;
  align-self: stretch;
  min-width: 0;
}

.publish-summary__section h4 {
  margin: 0;
  color: var(--cal-dark1);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: 0;
}

.publish-summary__metrics {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.publish-summary__metrics div {
  display: grid;
  gap: 4px;
  min-width: 0;
  min-height: 74px;
  padding: 12px 14px;
  border: 1px solid rgba(45, 175, 117, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.publish-summary__metrics dt {
  overflow: hidden;
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.publish-summary__metrics dd {
  margin: 0;
  color: var(--cal-dark1);
  font-size: 21px;
  font-weight: 900;
  line-height: 1;
}

.publish-summary__sections {
  display: grid;
  grid-template-columns: minmax(210px, 0.9fr) minmax(260px, 1.1fr);
  align-items: start;
  gap: 20px;
  min-width: 0;
}

.publish-summary__section {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.publish-summary__label-list,
.publish-summary__cell-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.publish-summary__label-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 12px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--color-text);
  font-size: 13px;
  font-weight: 800;
}

.publish-summary__label-duty,
.publish-summary__label-flow {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.publish-summary__label-duty {
  color: var(--color-muted);
}

.publish-summary__label-flow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  justify-content: flex-end;
  color: var(--cal-dark1);
  font-weight: 900;
}

.publish-summary__label-flow strong {
  color: var(--cal-dark1);
  font-weight: 900;
}

.publish-summary__cell-list li {
  display: grid;
  grid-template-columns: minmax(54px, 0.72fr) minmax(80px, 1fr) minmax(34px, auto);
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--color-text);
  font-size: 12px;
  font-weight: 800;
}

.publish-summary__cell-name {
  display: grid;
  min-width: 0;
}

.publish-summary__cell-name strong,
.publish-summary__cell-name small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.publish-summary__cell-name strong {
  color: var(--cal-dark1);
  font-size: 12px;
  font-weight: 900;
}

.publish-summary__cell-name small {
  color: var(--color-muted);
  font-size: 10px;
  font-weight: 800;
}

.publish-summary__cell-bar {
  position: relative;
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(45, 175, 117, 0.12);
}

.publish-summary__cell-bar::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--cell-share);
  min-width: 6px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--color-good), #57bec6);
  content: "";
}

.publish-summary__cell-count {
  color: var(--cal-dark1);
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

.publish-summary__empty {
  margin: 0;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.progress-content {
  margin-top: 18px;
  padding-top: 18px;
}

.progress-content__details {
  interpolate-size: allow-keywords;
}

.progress-content__details[open] {
  overflow: hidden;
  border-radius: 16px;
  background: #fbfcfd;
  box-shadow: var(--surface-ring);
}

.progress-content__summary {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 14px;
  cursor: pointer;
  list-style: none;
}

.progress-content__summary::-webkit-details-marker {
  display: none;
}

.progress-content__summary::after {
  grid-column: 3;
  align-self: center;
  justify-self: end;
  width: 8px;
  height: 8px;
  border-right: 2px solid #8a929d;
  border-bottom: 2px solid #8a929d;
  content: "";
  transform: translateY(-2px) rotate(45deg);
  transition: transform 160ms ease, border-color 160ms ease;
}

.progress-content__details[open] .progress-content__summary {
  min-height: 54px;
  margin-bottom: 0;
  padding: 0 18px;
  border-bottom: 1px solid var(--color-border-light);
  background: #fbfcfd;
  box-shadow: none;
}

.progress-content__details[open] .progress-content__summary::after {
  transform: translateY(2px) rotate(225deg);
}

.progress-content__title {
  min-width: 0;
  margin: 0;
  line-height: 1;
}

.progress-content__summary-meta {
  display: inline-flex;
  align-items: center;
  align-self: center;
  flex-wrap: wrap;
  min-width: 0;
  gap: 8px;
  color: #6f7682;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.progress-content__summary-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-content__summary-meta span + span::before {
  content: "/";
  margin-right: 8px;
  color: #c5cbd3;
}

.progress-content__details[open] .progress-content__summary-meta {
  display: none;
}

.progress-content--collapsed-default {
  margin-top: 16px;
  padding-top: 14px;
}

.progress-content--collapsed-default .progress-content__summary {
  min-height: 54px;
  padding: 0 16px;
  border-radius: 16px;
  background: #fbfcfd;
  box-shadow: var(--surface-ring);
}

.progress-content--collapsed-default .progress-content__details[open] .progress-content__summary {
  border-radius: 0;
}

.progress-content__list {
  overflow: hidden;
  border-radius: 16px;
  background: #fbfcfd;
  box-shadow: var(--surface-ring);
}

.progress-content__details[open] .progress-content__list {
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.progress-content__list .progress-content__row {
  padding: 12px 18px;
}

.app-shell--roster-flow .progress-content__list .progress-content__row {
  padding: 10px 18px;
}

.progress-content__row {
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: start;
  padding: 12px 14px;
  border-bottom-color: rgba(15, 23, 42, 0.06);
}

.progress-content__row dt {
  color: #7a808a;
  font-size: 12px;
}

.progress-content__text,
.progress-content__input,
.progress-content__chat {
  border-color: transparent;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.progress-content__input:disabled {
  border-color: transparent;
  background: #f7f8fa;
  color: #69717d;
  opacity: 1;
}

.progress-content__chat {
  background: #ffffff;
}

.progress-content__chat-message {
  grid-template-columns: 120px minmax(0, 1fr);
}

.progress-content__chat-meta {
  color: #6f7682;
}

.progress-content__chat-body {
  color: #303640;
}

.progress-content__row--inactive {
  background: rgba(244, 246, 248, 0.68);
}

.app-shell--roster-flow .sheet-selector {
  padding-top: 0;
}

.app-shell--roster-flow .sheet-selector__details {
  grid-column: 1 / -1;
  overflow: hidden;
  border-radius: 16px;
  background: #fbfcfd;
  box-shadow: var(--surface-ring);
}

.app-shell--roster-flow .sheet-selector__details[open] {
  background: #ffffff;
}

.app-shell--roster-flow .sheet-selector__heading {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) auto;
  align-items: center;
  min-height: 46px;
  gap: 12px;
  padding: 0 14px;
  color: var(--cal-dark1);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  list-style: none;
}

.app-shell--roster-flow .sheet-selector__heading::-webkit-details-marker {
  display: none;
}

.app-shell--roster-flow .sheet-selector__heading::after {
  width: 7px;
  height: 7px;
  border-right: 2px solid #8a929d;
  border-bottom: 2px solid #8a929d;
  content: "";
  transform: translateY(-2px) rotate(45deg);
  transition: transform 160ms ease, border-color 160ms ease;
}

.app-shell--roster-flow .sheet-selector__details[open] .sheet-selector__heading::after {
  transform: translateY(2px) rotate(225deg);
}

.app-shell--roster-flow .sheet-selector__heading-label {
  color: #4a515b;
}

.app-shell--roster-flow .sheet-selector__heading-meta {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
  color: #6f7682;
  font-size: 12px;
  font-weight: 800;
}

.app-shell--roster-flow .sheet-selector__heading-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell--roster-flow .sheet-selector__heading-meta span + span::before {
  content: "/";
  margin-right: 8px;
  color: #c5cbd3;
}

.app-shell--roster-flow .sheet-selector__details-body {
  display: grid;
  gap: 8px;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.app-shell--roster-flow .sheet-selector__details-body > label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.app-shell--roster-flow .sheet-selector .select {
  border-color: #d8dee7;
  background-color: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  color: var(--cal-dark1);
}

.app-shell--roster-flow .sheet-selector .select:focus {
  border-color: var(--cal-day);
  outline: 3px solid rgba(87, 190, 198, 0.16);
  outline-offset: 0;
}

@media (max-width: 900px) {
  .progress-dashboard__deploy-card {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 18px;
  }

  .progress-dashboard__deploy-action {
    justify-items: start;
    text-align: left;
  }

  .progress-dashboard__deploy-context,
  .progress-dashboard__deploy-form {
    justify-content: start;
    justify-items: start;
  }

  .publish-summary__metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .publish-summary__sections {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .app-header__inner {
    align-items: flex-start;
    width: min(100% - 24px, 1120px);
    flex-direction: column;
    gap: 12px;
  }

  .app-header__primary {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .app-header__brand-label {
    display: none;
  }

  .app-header__usage-frame {
    width: min(132px, calc(100vw - 167px));
    min-width: 104px;
    flex-basis: 132px;
  }

  .app-header__usage-card {
    padding-inline: 8px;
  }

  .app-header__tools {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    gap: 8px;
  }

  .app-header__language,
  .app-header__identity,
  .app-header__tools form,
  .app-header__logout,
  .app-header__locale-dropdown,
  .app-header__locale-summary {
    width: 100%;
  }

  .app-header__identity,
  .app-header__locale-summary,
  .app-header__logout {
    justify-content: center;
    min-height: 40px;
    padding-inline: 10px;
  }

  .app-header__locale-menu {
    width: 100%;
    min-width: 0;
  }

  .app-shell {
    width: min(100% - 24px, 920px);
    padding: 24px 0 32px;
  }

  .app-shell--wide {
    width: min(100% - 24px, 1120px);
  }

  .app-shell--upload-home {
    width: min(100% - 24px, 2000px);
  }

  .app-shell--roster-flow {
    width: min(100% - 24px, 2000px);
    padding-top: 12px;
  }

  .duty-type-subheader__title-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .upload-preflight-notice {
    margin: -28px auto 12px;
    font-size: 15px;
  }

  .duty-type-save-button {
    justify-self: stretch;
  }

  .panel {
    padding: 18px;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .progress-dashboard__heading {
    gap: 10px;
  }

  .progress-dashboard__actions,
  .progress-dashboard__stop-form,
  .progress-dashboard__deploy-form,
  .progress-dashboard__stop-button,
  .progress-dashboard__deploy-button {
    width: 100%;
  }

  .progress-dashboard__deploy-card {
    padding: 20px 16px;
  }

  .progress-dashboard__deploy-action {
    justify-items: stretch;
  }

  .publish-summary__metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .publish-summary__cell-list li {
    grid-template-columns: minmax(48px, 0.7fr) minmax(62px, 1fr) minmax(30px, auto);
  }

  .progress-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .progress-step {
    border-bottom: 1px solid var(--color-border);
  }

  .progress-step:nth-child(6n) {
    border-right: 1px solid var(--color-border);
  }

  .progress-step:nth-child(2n) {
    border-right: 0;
  }

  .progress-step:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .progress-content__row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .progress-content__flow {
    align-items: center;
    flex-direction: row;
    gap: 8px;
  }

  .progress-content__state {
    min-width: 84px;
  }

  .progress-content__chat-message {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .progress-content__chat-meta {
    white-space: nowrap;
  }

  .progress-content__summary {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 4px;
  }

  .progress-content__summary::after {
    grid-column: 2;
    grid-row: 1;
  }

  .progress-content__summary-meta {
    grid-column: 1 / -1;
    grid-row: 2;
    column-gap: 10px;
    row-gap: 6px;
  }

  .progress-content__summary-meta span + span::before {
    content: "";
    margin-right: 0;
  }

  .progress-content--collapsed-default .progress-content__summary {
    min-height: 0;
    padding: 12px 14px;
  }

  .progress-content__answer-row {
    grid-template-columns: 1fr;
  }

  .progress-content__submit {
    min-height: 38px;
    width: 100%;
  }

  .app-shell--roster-flow .detail-panel,
  .app-shell--roster-flow .progress-dashboard {
    padding: 18px;
  }

  .app-shell--roster-flow .detail-panel__heading,
  .app-shell--roster-flow .progress-dashboard__heading {
    align-items: flex-start;
  }

  .app-shell--roster-flow .progress-dashboard__actions,
  .app-shell--roster-flow .progress-dashboard__stop-form,
  .app-shell--roster-flow .progress-dashboard__deploy-form,
  .app-shell--roster-flow .progress-dashboard__stop-button,
  .app-shell--roster-flow .progress-dashboard__deploy-button {
    width: 100%;
  }

  .app-shell--roster-flow .detail-list div,
  .app-shell--roster-flow .sheet-selector,
  .app-shell--roster-flow .progress-content__row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .app-shell--roster-flow .sheet-selector__form,
  .app-shell--roster-flow .sheet-selector__summary-list div {
    grid-template-columns: 1fr;
  }

  .app-shell--roster-flow .sheet-selector__confirm {
    width: 100%;
  }

  .app-shell--roster-flow .progress-content__flow {
    align-items: center;
    flex-direction: row;
    gap: 8px;
  }

  .app-shell--roster-flow .progress-content__state {
    min-width: 84px;
  }

  .app-shell--roster-flow .progress-content__chat-message {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .app-shell--roster-flow .progress-content__chat-meta {
    white-space: nowrap;
  }

  .upload-history {
    padding: 20px 16px;
  }

  .upload-history__heading {
    align-items: center;
    flex-direction: row;
  }

  .upload-history__refresh {
    width: 100%;
  }

  .upload-history__filters {
    display: grid;
    grid-template-columns: 1fr;
  }

  .upload-history__filter {
    justify-content: space-between;
  }

  .upload-history__selection {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 14px;
  }

  .upload-history__hide-selected {
    width: 100%;
  }

  .upload-history__item {
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: flex-start;
    min-height: 0;
    gap: 12px;
    padding: 16px 14px;
  }

  .upload-history__actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-left: 36px;
  }

  .upload-history__body h3 {
    white-space: normal;
  }

  .upload-history__action {
    flex: 1 1 132px;
    min-width: 0;
  }

  .upload-history__show-all {
    font-size: 15px;
  }

  .upload-history__pagination {
    justify-content: flex-start;
  }

  .upload-history__collapse-row {
    justify-content: flex-start;
  }

  .upload-history__page-button {
    flex: 1 1 48px;
  }

  .upload-history__collapse {
    flex: 1 1 132px;
  }

  .roster-preview {
    padding: 18px;
  }

  .roster-preview__heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
  }

  .roster-preview__filters {
    justify-content: flex-start;
    width: 100%;
  }

  .roster-preview__title-group {
    gap: 8px;
  }

  .roster-preview__title-group h2 {
    font-size: 22px;
  }

  .progress-dashboard__period,
  .roster-preview__period {
    font-size: 20px;
  }

  .roster-preview__period {
    font-size: 18px;
  }

  .workplace-subheader__inner {
    width: min(100% - 24px, 1120px);
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px 0;
  }

  .workplace-status-list {
    display: flex;
    gap: 8px;
  }

  .workplace-status-list div {
    min-height: 34px;
    padding: 6px 10px;
    border-bottom: 0;
    border-left: 0;
  }

  .workplace-status-list div:first-child {
    padding-left: 10px;
  }

  .workplace-status-list div:last-child {
    border-bottom: 0;
  }

  .workplace-status-list dt,
  .workplace-status-list dd {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .detail-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* Compact upload home: restored information architecture with the current visual language. */
.app-shell--upload-home {
  width: min(1120px, calc(100% - 32px));
  padding: 22px 0 44px;
}

.workplace-subheader {
  border-bottom: 1px solid #eceef1;
  background: #ffffff;
}

.workplace-subheader__inner {
  grid-template-columns: max-content minmax(0, 1fr);
  min-height: 56px;
  gap: 18px;
  padding: 8px 0;
}

.workplace-subheader__title h2 {
  color: #252a32;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0;
}

.workplace-status-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.workplace-status-list div,
.workplace-status-list div:first-child {
  display: inline-flex;
  align-items: baseline;
  min-height: 34px;
  gap: 8px;
  padding: 6px 11px;
  border: 1px solid #e4e7eb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.workplace-status-list dt {
  color: #747983;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.workplace-status-list dd {
  color: #252a32;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
}

.duty-type-subheader {
  --duty-control-height: 34px;
  --duty-group-label-width: 54px;
  --duty-input-width: 48px;

  padding: 8px 0 10px;
  border-bottom: 1px solid #eceef1;
  background: #ffffff;
}

.duty-type-subheader__inner {
  display: grid;
  width: min(1120px, calc(100% - 32px));
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid #e7eaee;
  border-left: 5px solid var(--cal-day);
  border-radius: 8px;
  background: #fffafb;
  box-shadow: 0 8px 24px rgba(32, 38, 48, 0.05);
}

.duty-type-subheader__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  gap: 16px;
}

.duty-type-subheader__title-row > div {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  min-width: 0;
  gap: 5px 14px;
}

.duty-type-subheader h1 {
  margin: 0;
  color: #17191d;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.2;
}

.duty-type-subheader__title-row span {
  color: #626872;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.duty-type-subheader__groups {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.duty-type-inline-group {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
}

.duty-type-inline-group h2 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 var(--duty-group-label-width);
  width: var(--duty-group-label-width);
  min-width: var(--duty-group-label-width);
  min-height: 34px;
  margin: 0;
  padding: 0 8px;
  border-radius: 8px;
  background: #30353f;
  box-shadow: none;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.2;
}

.duty-type-grid {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.duty-type-card {
  width: 48px;
  padding: 0;
  border: 0;
  background: transparent;
}

.duty-type-card::before {
  display: none;
}

.duty-type-label-input {
  width: 48px;
  height: 34px;
  border: 1px solid #dfe3e8;
  border-bottom: 2px solid var(--duty-color);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
  color: #252a32;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-align: center;
}

.duty-type-label-input:hover:not(:disabled) {
  transform: none;
  box-shadow: 0 4px 12px rgba(32, 38, 48, 0.08);
}

.duty-type-label-input:focus {
  border-color: var(--cal-day);
  outline: 3px solid rgba(87, 190, 198, 0.2);
  box-shadow: none;
}

.duty-type-card--locked .duty-type-label-input {
  background: #eceef1;
  color: #767c86;
  box-shadow: none;
}

.duty-type-save-button {
  flex: 0 0 auto;
  justify-self: auto;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  letter-spacing: 0;
}

.duty-type-save-button.button--primary:not(:disabled),
.duty-type-save-button.button--primary:hover:not(:disabled) {
  border-color: var(--cal-red);
  background: var(--cal-red);
  box-shadow: none;
  color: #ffffff;
}

.duty-type-save-button.button--primary:disabled {
  border-color: #dfe3e8;
  background: #eceef1;
  box-shadow: none;
  color: #858b95;
}

.app-shell--upload-home .upload-panel {
  position: relative;
  max-width: none;
  margin: 0;
  overflow: hidden;
  padding: 28px 32px 32px;
  border: 1px solid #e7eaee;
  border-left: 6px solid var(--cal-red);
  border-radius: 8px;
  background: #fffafb;
  box-shadow: 0 12px 34px rgba(32, 38, 48, 0.06);
}

.app-shell--upload-home .upload-panel::before {
  display: none;
}

.upload-panel__heading {
  display: block;
  margin-bottom: 22px;
}

.upload-panel__heading h1 {
  margin: 0;
  color: #17191d;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.2;
}

.upload-panel__heading p:last-child {
  margin: 9px 0 0;
  color: #565c66;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}

.app-shell--upload-home .upload-form {
  display: grid;
  gap: 18px;
  margin: 0;
}

.app-shell--upload-home .file-picker {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: stretch;
  justify-items: center;
  width: 100%;
  min-height: 286px;
  gap: 20px;
  padding: 40px 24px 30px;
  border: 2px dashed rgba(247, 97, 107, 0.48);
  border-radius: 8px;
  background: #ffffff;
  background-image: none;
  box-shadow: inset 0 0 0 1px rgba(247, 97, 107, 0.04);
  text-align: center;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.app-shell--upload-home .file-picker__content {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
}

.app-shell--upload-home .file-picker__content::before {
  display: none;
}

.app-shell--upload-home .file-picker__filename {
  max-width: min(100%, 620px);
  color: var(--cal-red);
  font-size: 27px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.3;
  white-space: normal;
}

.app-shell--upload-home .file-picker__button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #e4e7eb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
  color: #656b75;
  font-size: 14px;
  font-weight: 800;
}

.app-shell--upload-home .file-picker__actions {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  width: 100%;
}

.app-shell--upload-home .file-picker__submit {
  min-width: min(100%, 250px);
  min-height: 52px;
  border: 1px solid var(--cal-red);
  border-radius: 8px;
  background: var(--cal-red);
  box-shadow: none;
  color: #ffffff;
  letter-spacing: 0;
}

.app-shell--upload-home .file-picker__submit:hover:not(:disabled) {
  background: #ef5360;
  box-shadow: 0 8px 20px rgba(247, 97, 107, 0.2);
  transform: none;
}

.upload-terms-notice {
  margin: 0;
  color: #656b75;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
}

.upload-terms-notice a,
.upload-legal-footer a {
  color: #3f6670;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.upload-terms-notice a:hover,
.upload-legal-footer a:hover {
  color: var(--cal-red);
}

.upload-legal-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto 32px;
  padding: 18px 0 0;
  border-top: 1px solid #e7eaee;
}

.upload-legal-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 24px;
  font-size: 13px;
  line-height: 1.5;
}

.app-shell--upload-home .file-picker:focus-within {
  border-color: var(--cal-red);
  box-shadow: 0 0 0 4px rgba(247, 97, 107, 0.12);
}

.app-shell--upload-home .upload-panel.is-dragging {
  border-color: var(--cal-red);
  box-shadow: 0 0 0 5px rgba(247, 97, 107, 0.13), 0 16px 40px rgba(32, 38, 48, 0.08);
}

.app-shell--upload-home .upload-panel.is-dragging .file-picker {
  border: 3px solid var(--cal-red);
  background: #fff3f4;
  box-shadow: 0 0 0 5px rgba(247, 97, 107, 0.13);
  transform: none;
}

.app-shell--upload-home .upload-panel.is-dragging .file-picker__filename {
  color: #df3f4d;
}

.app-shell--upload-home .upload-history {
  position: relative;
  max-width: none;
  margin: 16px 0 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid #e7eaee;
  border-left: 6px solid var(--cal-day);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(32, 38, 48, 0.05);
}

.app-shell--upload-home .upload-history::before {
  display: none;
}

.app-shell--upload-home .upload-history__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 16px;
  margin: 0;
  padding: 18px 22px;
  cursor: pointer;
  list-style-position: inside;
}

.app-shell--upload-home .upload-history__heading::after {
  display: none;
}

.app-shell--upload-home .upload-history__heading::-webkit-details-marker {
  display: none;
}

.app-shell--upload-home .upload-history__title-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.app-shell--upload-home .upload-history__title-group h2 {
  margin: 0;
  color: #20242b;
  font-size: 23px;
  font-weight: 900;
  letter-spacing: 0;
}

.app-shell--upload-home .upload-history__summary {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #d6eaec;
  border-radius: 8px;
  background: #eef8f9;
  color: #2b858c;
  font-size: 12px;
  font-weight: 900;
}

.app-shell--upload-home .upload-history__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  background: #ffffff;
  color: #545b65;
  font-size: 13px;
  font-weight: 900;
}

.app-shell--upload-home .upload-history__toggle-close {
  display: none;
}

.app-shell--upload-home .upload-history__details[open] .upload-history__toggle-open {
  display: none;
}

.app-shell--upload-home .upload-history__details[open] .upload-history__toggle-close {
  display: inline;
}

.app-shell--upload-home .upload-history__details[open] .upload-history__heading {
  margin: 0;
  border-bottom: 1px solid #e7eaee;
  background: #fffafb;
}

.app-shell--upload-home .upload-history__content {
  padding: 20px 22px 24px;
}

.app-shell--upload-home .upload-history__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.app-shell--upload-home .upload-history__filter {
  min-height: 40px;
  gap: 9px;
  padding: 0 11px;
  border: 1px solid #e0e4e8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
  color: #484e58;
  font-size: 13px;
  font-weight: 900;
}

.app-shell--upload-home .upload-history__filter strong {
  min-width: 23px;
  min-height: 22px;
  border-radius: 6px;
  background: #747b86;
  color: #ffffff;
}

.app-shell--upload-home .upload-history__filter.is-active {
  border-color: var(--cal-day);
  background: #eef8f9;
  box-shadow: none;
  color: #24747a;
}

.app-shell--upload-home .upload-history__filter.is-active strong {
  background: var(--cal-day);
}

.app-shell--upload-home .upload-history__selection {
  min-height: 58px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border: 1px solid #e4e7eb;
  border-radius: 8px;
  background: #f8f9fa;
  box-shadow: none;
}

.app-shell--upload-home .upload-history__list {
  gap: 10px;
}

.app-shell--upload-home .upload-history__item {
  min-height: 96px;
  padding: 15px;
  border: 1px solid #e4e7eb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.app-shell--upload-home .upload-history__item:hover {
  background: #fffafb;
  box-shadow: 0 6px 16px rgba(32, 38, 48, 0.06);
  transform: none;
}

.app-shell--upload-home .upload-history__item--selectable {
  grid-template-columns: 24px minmax(0, 1fr) auto;
}

.app-shell--upload-home .upload-history__body h3 {
  color: #20242b;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0;
}

.app-shell--upload-home .upload-history__body p {
  color: #6b717b;
  font-size: 13px;
  font-weight: 700;
}

.app-shell--upload-home .upload-history__status {
  min-height: 34px;
  border: 1px solid #e0e4e8;
  border-radius: 8px;
  background: #f4f5f7;
  box-shadow: none;
}

.app-shell--upload-home .upload-history__action,
.app-shell--upload-home .upload-history__hide-selected,
.app-shell--upload-home .upload-history__show-all,
.app-shell--upload-home .upload-history__page-button,
.app-shell--upload-home .upload-history__collapse {
  border-radius: 8px;
  box-shadow: none;
  letter-spacing: 0;
}

.app-shell--upload-home .upload-history__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  margin: 0;
  padding: 22px;
  border: 1px solid #e4e7eb;
  border-radius: 8px;
  background: #f8f9fa;
  color: #69707a;
  font-weight: 800;
  text-align: center;
}

@media (max-width: 640px) {
  .app-shell--upload-home {
    width: min(100% - 24px, 1120px);
    padding: 16px 0 32px;
  }

  .workplace-subheader__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    padding: 10px 0;
  }

  .workplace-status-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workplace-status-list div,
  .workplace-status-list div:first-child {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .duty-type-subheader {
    padding: 8px 0 10px;
  }

  .duty-type-subheader__inner {
    width: min(100% - 24px, 1120px);
    padding: 12px;
  }

  .duty-type-subheader__title-row > div {
    display: grid;
    gap: 5px;
  }

  .duty-type-subheader__title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
  }

  .duty-type-subheader__title-row span {
    font-size: 13px;
  }

  .duty-type-save-button {
    align-self: start;
    min-height: 36px;
    padding: 0 10px;
  }

  .duty-type-subheader__groups {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 8px;
  }

  .duty-type-inline-group {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .duty-type-inline-group--work {
    grid-column: auto;
  }

  .duty-type-inline-group h2 {
    width: 54px;
    min-width: 54px;
  }

  .duty-type-card,
  .duty-type-label-input {
    width: 48px;
  }

  .app-shell--upload-home .upload-panel {
    padding: 24px 18px 20px;
    border-left-width: 4px;
  }

  .upload-panel__heading h1 {
    font-size: 26px;
  }

  .upload-panel__heading p:last-child {
    font-size: 14px;
  }

  .app-shell--upload-home .file-picker {
    min-height: 260px;
    padding: 30px 16px 22px;
  }

  .app-shell--upload-home .file-picker__filename {
    font-size: 22px;
  }

  .app-shell--upload-home .file-picker__submit {
    width: 100%;
    min-width: 0;
  }

  .app-shell--upload-home .upload-history {
    border-left-width: 4px;
  }

  .app-shell--upload-home .upload-history__heading {
    min-height: 70px;
    padding: 16px;
  }

  .app-shell--upload-home .upload-history__title-group h2 {
    font-size: 21px;
  }

  .app-shell--upload-home .upload-history__content {
    padding: 16px;
  }

  .app-shell--upload-home .upload-history__filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .app-shell--upload-home .upload-history__filter {
    min-width: 0;
    padding: 0 7px;
  }

  .app-shell--upload-home .upload-history__selection {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-shell--upload-home .upload-history__hide-selected {
    width: 100%;
  }

  .app-shell--upload-home .upload-history__item,
  .app-shell--upload-home .upload-history__item--selectable {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-shell--upload-home .upload-history__checkbox {
    justify-self: start;
  }

  .app-shell--upload-home .upload-history__actions {
    padding-left: 0;
  }

  .app-shell--upload-home .upload-history__action,
  .app-shell--upload-home .upload-history__status {
    flex: 1 1 132px;
  }
}

.legal-page {
  padding-top: 40px;
}

.legal-page__panel {
  display: grid;
  gap: 28px;
}

.legal-page__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.legal-page__header h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.25;
}

.legal-page__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 10px 0 0;
  color: var(--color-muted);
  font-size: 14px;
}

.legal-language {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-page);
}

.legal-language__link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 7px;
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.legal-language__link:hover,
.legal-language__link:focus-visible,
.legal-language__link.is-active {
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--surface-ring);
}

.legal-language__link:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.legal-page__language-prompt {
  margin: 0;
  padding: 28px;
  border: 1px solid var(--color-border-light);
  border-radius: 10px;
  background: var(--color-page);
  color: var(--color-muted);
  text-align: center;
}

.legal-document {
  max-width: 820px;
  color: var(--color-text);
  line-height: 1.75;
}

.legal-document h1 {
  margin: 0 0 28px;
  font-size: 30px;
  line-height: 1.3;
}

.legal-document h2 {
  margin: 38px 0 14px;
  font-size: 21px;
  line-height: 1.4;
}

.legal-document p,
.legal-document ol,
.legal-document ul {
  margin: 0 0 16px;
}

.legal-document li + li {
  margin-top: 8px;
}

.legal-document a {
  color: var(--color-primary);
  overflow-wrap: anywhere;
}

.legal-table-wrap {
  overflow-x: auto;
}

.legal-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  border: 1px solid var(--color-border);
}

.legal-table caption {
  padding: 0 0 12px;
  font-size: 16px;
  font-weight: 800;
  text-align: left;
}

.legal-table th,
.legal-table td {
  padding: 16px;
  border: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}

.legal-table th {
  background: var(--color-page);
  font-size: 14px;
}

@media (max-width: 720px) {
  .legal-page {
    padding-top: 24px;
  }

  .legal-page__panel {
    padding: 20px;
  }

  .legal-page__header {
    display: grid;
  }

  .legal-language {
    justify-self: start;
  }

  .legal-document h1 {
    font-size: 26px;
  }
}
