:root {
  color-scheme: light;
  --bg: #eef1f3;
  --panel: #fbfbfa;
  --panel-soft: #f4f5f4;
  --text: #202524;
  --muted: #707877;
  --line: #dfe4e2;
  --line-strong: #cbd3d0;
  --task-box-border: #aeb8b5;
  --focus: #397367;
  --focus-soft: rgba(57, 115, 103, 0.14);
  --danger: #b33a3a;
  --button: #1f2d2b;
  --button-hover: #2c3e3b;
  font-family:
    "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", "Source Han Sans SC",
    -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--text);
  font-family:
    "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", "Source Han Sans SC",
    -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body:has(.login-view:not(.hidden)) {
  background: #f5f5f3;
}

button,
input {
  font: inherit;
}

.desktop-frame {
  width: min(420px, calc(100vw - 32px));
  height: min(760px, calc(100vh - 32px));
  min-height: 680px;
  display: flex;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(37, 45, 43, 0.12);
}

.desktop-frame:has(.login-view:not(.hidden)) {
  height: auto;
  min-height: 0;
  background: #fffefd;
  border-color: #e8e6df;
  border-radius: 22px;
  box-shadow: 0 18px 42px rgba(48, 48, 43, 0.07);
}

body.browser-page-layout {
  display: block;
  background: var(--panel);
}

body.browser-page-layout .desktop-frame {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body:has(.platform-view:not(.hidden)),
body:has(.admin-view:not(.hidden)) {
  display: block;
  background: var(--panel);
  padding: 0;
}

body:has(.platform-view:not(.hidden)) .desktop-frame,
body:has(.admin-view:not(.hidden)) .desktop-frame {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.login-view,
.workspace-view {
  width: 100%;
  min-height: 0;
}

.login-view {
  display: flex;
  flex-direction: column;
  padding: 44px 38px 40px;
}

.app-header {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-top: 0;
}

.app-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #e5e3dd;
  border-radius: 13px;
  background: #ffffff;
  color: #315f55;
}

.brand-logo {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-logo-soft {
  opacity: 0.62;
}

.brand-logo-faint {
  opacity: 0.48;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 21px;
  font-weight: 650;
  line-height: 1.16;
  letter-spacing: 0;
  white-space: nowrap;
}

.app-header p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 40px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field-group label {
  color: #555b58;
  font-size: 13px;
  font-weight: 500;
}

.field-group input {
  width: 100%;
  height: 42px;
  border: 1px solid #e1e3dd;
  border-radius: 11px;
  background: #ffffff;
  padding: 0 12px;
  color: var(--text);
  outline: none;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease;
}

.field-group input::placeholder {
  font-family: inherit;
  color: #b8bcb8;
}

.field-group input:focus {
  border-color: #315f55;
  box-shadow: 0 0 0 3px rgba(49, 95, 85, 0.1);
}

.field-group.has-error input {
  border-color: var(--danger);
}

.field-error {
  min-height: 15px;
  color: var(--danger);
  font-size: 12px;
  line-height: 15px;
}

.check-row {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin-top: 0;
  color: #555b58;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.check-row input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #315f55;
}

.form-message {
  min-height: 18px;
  color: var(--danger);
  font-size: 12px;
  line-height: 18px;
}

.primary-button {
  height: 44px;
  margin-top: 0;
  border: 0;
  border-radius: 11px;
  background: #22342f;
  color: #ffffff;
  font-size: 14px;
  font-weight: 560;
  cursor: pointer;
  transition:
    background 140ms ease,
    transform 140ms ease;
}

.primary-button:hover {
  background: #2a4039;
}

.primary-button:disabled {
  background: #8d9a96;
  cursor: not-allowed;
}

.primary-button:active {
  transform: translateY(1px);
}

.server-settings {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #f0eee8;
  color: #747a76;
}

.server-settings summary {
  width: fit-content;
  color: #747a76;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  user-select: none;
}

.server-settings summary::marker {
  color: #a6aaa5;
  font-size: 10px;
}

.server-settings summary:focus-visible {
  color: #315f55;
}

.server-settings-panel {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 12px;
}

.server-settings-panel input {
  width: 100%;
  height: 40px;
  border: 1px solid #e4e4de;
  border-radius: 10px;
  background: #ffffff;
  padding: 0 12px;
  color: var(--text);
  outline: none;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.server-settings-panel input::placeholder {
  font-family: inherit;
  color: #b8bcb8;
}

.server-settings-panel input:focus {
  border-color: #315f55;
  box-shadow: 0 0 0 3px rgba(49, 95, 85, 0.1);
}

.workspace-view {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--panel);
}

.workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  gap: 18px;
  padding: 14px 20px 10px;
  border-bottom: 1px solid var(--line);
}

.session-heading {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.session-heading strong {
  color: var(--text);
  font-size: 17px;
  font-weight: 650;
}

.session-heading span {
  color: var(--muted);
  font-size: 12px;
}

.account-entry {
  flex: 0 0 auto;
}

.account-menu-button,
.floating-account-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: #ffffff;
  color: #3d4744;
  cursor: pointer;
}

.account-menu-button {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  padding: 0;
}

.account-menu-button:hover,
.floating-account-button:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.account-avatar {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--focus);
  color: #ffffff;
  font-size: 12px;
  font-weight: 680;
  line-height: 1;
}

.account-button-name {
  max-width: 86px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-caret {
  width: 0;
  height: 0;
  border-top: 4px solid #75807c;
  border-inline: 4px solid transparent;
}

.account-person-icon {
  position: relative;
  width: 19px;
  height: 19px;
  display: inline-block;
  flex: 0 0 auto;
  color: #3f796d;
}

.account-person-icon::before,
.account-person-icon::after {
  position: absolute;
  left: 50%;
  content: "";
  transform: translateX(-50%);
}

.account-person-icon::before {
  top: 2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.account-person-icon::after {
  bottom: 2px;
  width: 15px;
  height: 8px;
  border-radius: 10px 10px 5px 5px;
  background: currentColor;
}

.account-menu {
  position: fixed;
  z-index: 80;
  width: min(150px, calc(100vw - 28px));
  display: flex;
  flex-direction: column;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 16px 42px rgba(32, 37, 36, 0.14);
}

.account-menu-arrow {
  position: absolute;
  right: 21px;
  width: 16px;
  height: 16px;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  background: #ffffff;
  transform: rotate(45deg);
}

.account-menu.is-below .account-menu-arrow {
  top: -9px;
}

.account-menu.is-above .account-menu-arrow {
  bottom: -10px;
  transform: rotate(225deg);
}

.account-menu-head {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  padding: 22px 18px 16px;
}

.account-menu-head strong {
  max-width: 100%;
  overflow: hidden;
  color: #3a4441;
  font-size: 18px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-head span {
  color: #7a8581;
  font-size: 12px;
}

.account-menu-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border: 0;
  border-top: 1px solid var(--line);
  background: #ffffff;
  color: #3d4744;
  padding: 0 15px;
  text-align: left;
  font-size: 14px;
  font-weight: 520;
  line-height: 1;
  cursor: pointer;
}

.account-menu-item:first-of-type {
  border-top: 0;
}

.account-menu-item:hover {
  background: #eef3f5;
}

.account-menu-icon {
  width: 20px;
  display: inline-flex;
  justify-content: center;
  color: #76817d;
  font-size: 18px;
  font-weight: 650;
  line-height: 1;
}

.account-menu-context {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 18px 28px;
}

.account-menu-context p {
  display: flex;
  min-width: 0;
  justify-content: space-between;
  gap: 16px;
  color: #7a8581;
  font-size: 13px;
}

.account-menu-context strong {
  min-width: 0;
  overflow: hidden;
  color: #3d4744;
  font-size: 13px;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-modal-layer {
  position: absolute;
  inset: 0;
  z-index: 75;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(251, 251, 250, 0.72);
}

.account-modal {
  width: min(360px, 100%);
  display: flex;
  flex-direction: column;
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  padding: 20px;
  box-shadow: 0 18px 52px rgba(32, 37, 36, 0.14);
}

.account-modal h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 680;
}

.account-about-modal {
  position: relative;
  width: min(360px, 100%);
  min-height: 380px;
  max-height: calc(100% - 44px);
  aspect-ratio: auto;
  gap: 0;
  border-radius: 6px;
  padding: 34px 28px 24px;
}

.account-about-close {
  position: absolute;
  top: 24px;
  right: 18px;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #9aa3aa;
  cursor: pointer;
  font-size: 30px;
  font-weight: 420;
  line-height: 1;
}

.account-about-close:hover {
  color: #6f7981;
}

.account-about-product {
  min-width: 0;
  padding-right: 38px;
}

.account-about-product h3 {
  color: #4b5660;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.15;
}

.account-about-english,
.account-about-version,
.account-about-copyright {
  margin: 0;
}

.account-about-english {
  margin-top: 12px;
  color: #78838d;
  font-size: clamp(21px, 3vw, 23px);
  font-weight: 700;
  line-height: 1.2;
}

.account-about-version {
  margin-top: 18px;
  color: #5d6972;
  font-size: clamp(16px, 2.4vw, 17px);
  font-weight: 650;
  line-height: 1.3;
}

.account-about-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-top: 108px;
}

.account-about-link {
  border: 0;
  background: transparent;
  color: #008bf2;
  font-size: clamp(16px, 2.4vw, 17px);
  font-weight: 650;
  line-height: 1.35;
  text-decoration: underline;
}

.account-about-copyright {
  margin-top: 30px;
  color: #9aa5ad;
  font-size: clamp(15px, 2.2vw, 16px);
  font-weight: 560;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.account-profile-summary {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 10px;
}

.account-profile-summary .account-avatar {
  width: 36px;
  height: 36px;
  font-size: 16px;
}

.account-profile-summary strong,
.account-profile-summary span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-profile-summary strong {
  color: var(--text);
  font-size: 13px;
}

.account-profile-summary span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.account-modal label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #4f5a57;
  font-size: 13px;
}

.account-modal input {
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  outline: none;
  padding: 0 10px;
}

.account-modal input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px var(--focus-soft);
}

.account-modal-message {
  min-height: 17px;
  color: var(--danger);
  font-size: 12px;
  line-height: 17px;
}

.account-about-copy {
  color: #4f5a57;
  font-size: 14px;
  line-height: 1.7;
}

body.browser-page-layout .account-about-modal {
  width: min(660px, calc(100vw - 48px));
  min-height: 0;
  max-height: calc(100vh - 48px);
  aspect-ratio: 3 / 2;
  padding: 43px 38px 24px;
}

body.browser-page-layout .account-about-close {
  top: 31px;
  right: 38px;
}

body.browser-page-layout .account-about-product {
  padding-right: 56px;
}

body.browser-page-layout .account-about-product h3 {
  font-size: clamp(30px, 4vw, 38px);
}

body.browser-page-layout .account-about-links {
  margin-top: 132px;
}

body.browser-page-layout .account-about-copyright {
  margin-top: auto;
}

@media (max-width: 520px) {
  .account-about-modal {
    width: min(360px, 100%);
    max-height: calc(100vh - 44px);
    aspect-ratio: auto;
    min-height: 380px;
    padding: 34px 28px 24px;
  }

  .account-about-close {
    top: 24px;
    right: 18px;
  }

  .account-about-product {
    padding-right: 38px;
  }

  .account-about-links {
    margin-top: 108px;
  }

  .account-about-copyright {
    margin-top: 30px;
  }
}

@media (max-height: 560px) {
  .account-about-modal {
    min-height: 0;
  }

  .account-about-links {
    margin-top: 76px;
  }
}

.workspace-message {
  flex: 0 0 auto;
  margin: 0;
  border-bottom: 1px solid #f0ddd9;
  background: #fff8f6;
  color: var(--danger);
  padding: 8px 20px;
  font-size: 13px;
  line-height: 1.4;
}

.my-work-page {
  position: relative;
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.task-scroll {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 0 28px 12px;
}

.task-scroll::-webkit-scrollbar {
  width: 8px;
}

.task-scroll::-webkit-scrollbar-thumb {
  border: 2px solid var(--panel);
  border-radius: 999px;
  background: #cbd3d0;
}

.work-section {
  padding: 12px 0 10px;
  border-bottom: 1px solid var(--line);
}

.work-section:last-child {
  border-bottom: 0;
}

.work-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
}

.work-section h2 {
  min-width: 0;
  margin: 0;
  color: #26302d;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: 0;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.work-state-message {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fafafa;
  color: #9aa3a0;
  margin: 4px 0;
  padding: 9px 10px;
  font-size: 13px;
  line-height: 1.4;
}

.task-item {
  display: grid;
  grid-template-columns: 37px minmax(0, 1fr) 70px;
  align-items: start;
  gap: 7px;
  min-height: 30px;
  padding: 2px 0;
}

.task-control {
  width: 37px;
  height: 20px;
  display: inline-grid;
  grid-template-columns: 16px 19px;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--task-box-border);
  border-radius: 6px;
  background: #ffffff;
}

.task-check,
.fixed-template-mark,
.empty-check {
  width: 16px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-right: 1px solid var(--task-box-border);
  border-radius: 0;
  background: #ffffff;
}

.task-order-input,
.task-order-placeholder,
.fixed-order-input,
.fixed-order-placeholder {
  width: 19px;
  height: 18px;
  min-width: 19px;
  max-width: 19px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
}

.task-check {
  color: var(--focus);
  padding: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
  cursor: pointer;
}

.task-check:hover {
  background: #f7faf8;
}

.task-order-input,
.task-order-placeholder,
.fixed-order-input,
.fixed-order-placeholder {
  color: #4f5c58;
  appearance: textfield;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
}

.task-order-placeholder,
.fixed-order-placeholder {
  display: inline-block;
}

.task-order-input,
.fixed-order-input {
  outline: none;
}

.task-order-input::-webkit-inner-spin-button,
.task-order-input::-webkit-outer-spin-button,
.fixed-order-input::-webkit-inner-spin-button,
.fixed-order-input::-webkit-outer-spin-button {
  appearance: none;
  margin: 0;
}

.task-order-input:focus,
.fixed-order-input:focus {
  box-shadow: none;
}

.task-control:focus-within {
  border-color: var(--focus);
  box-shadow: 0 0 0 2px var(--focus-soft);
}

.task-order-input:disabled,
.fixed-order-input:disabled {
  color: #8f9a96;
  cursor: default;
  opacity: 0.72;
}

.task-control-placeholder {
  opacity: 0;
  pointer-events: none;
}

.task-content {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 14px;
  line-height: 1.36;
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.task-title {
  word-break: break-word;
}

.task-content.is-editing {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}

.task-meta {
  color: #82908b;
  font-size: 12px;
  line-height: 1.2;
}

.task-item.is-completed .task-content {
  color: #9aa3a0;
  text-decoration: line-through;
}

.task-item.is-completed .task-meta {
  color: #a8b0ad;
}

.task-actions {
  width: 70px;
  min-width: 70px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 6px;
}

.inline-action {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #5f6b68;
  padding: 4px 2px;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}

.inline-action:hover {
  color: var(--focus);
}

.danger-action:hover {
  color: var(--danger);
}

.task-actions-placeholder,
.task-actions-status {
  color: #5f6b68;
  font-size: 12px;
  line-height: 1.4;
  user-select: none;
}

.task-actions-placeholder {
  pointer-events: none;
}

.task-actions-placeholder span {
  flex: 0 0 28px;
  width: 28px;
  padding: 4px 2px;
  text-align: center;
  white-space: nowrap;
}

.task-actions-status {
  justify-content: flex-end;
}

.task-actions-status span {
  padding: 4px 2px;
  font-weight: 600;
  white-space: nowrap;
}

.add-task-icon-button {
  width: 25px;
  height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  position: relative;
  border: 0;
  border-radius: 8px;
  background: #f1f6f4;
  color: #526d67;
  box-shadow: inset 0 0 0 1px rgba(84, 111, 104, 0.06);
  padding: 0;
  cursor: pointer;
  transition:
    background 140ms ease,
    box-shadow 140ms ease,
    color 140ms ease;
}

.add-task-icon {
  width: 10px;
  height: 10px;
  position: relative;
  display: block;
}

.add-task-icon::before,
.add-task-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 1.8px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.add-task-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.add-task-icon-button:hover {
  background: #e3efeb;
  color: #2f7468;
  box-shadow:
    inset 0 0 0 1px rgba(47, 116, 104, 0.16),
    0 1px 3px rgba(47, 116, 104, 0.1);
}

.add-task-icon-button:focus-visible {
  outline: 2px solid rgba(47, 116, 104, 0.28);
  outline-offset: 2px;
}

.add-task-icon-button:disabled {
  cursor: default;
  opacity: 0.45;
}

.add-inline {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 3px 0;
}

.empty-check {
  color: #aeb8b5;
  font-size: 20px;
  line-height: 1;
}

.add-task-input,
.inline-task-input {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  outline: none;
  padding: 0 10px;
}

.add-task-input:focus,
.inline-task-input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px var(--focus-soft);
}

.work-bottom {
  flex: 0 0 auto;
  padding: 5px 38px 12px 22px;
  border-top: 1px solid var(--line);
  background: rgba(251, 251, 250, 0.98);
}

.bottom-row {
  width: 100%;
  border: 0;
  background: transparent;
  color: #3b4643;
  padding: 6px 0 4px;
  text-align: left;
  font-size: 16px;
  font-weight: 620;
  line-height: 1.35;
  cursor: default;
}

#openTeamActivityButton,
#enterTeamWorkbenchButton {
  cursor: pointer;
}

.bottom-row-strong {
  color: var(--focus);
  font-weight: 620;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 1px 0 2px;
}

.activity-item {
  display: flex;
  min-width: 0;
  align-items: baseline;
  margin: 0;
  overflow: hidden;
  color: #68736f;
  font-size: 13px;
  line-height: 1.5;
  white-space: nowrap;
}

.activity-item-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-item .activity-actor {
  color: #3d4744;
  font-weight: 620;
}

.activity-item time {
  flex: 0 0 auto;
  margin-left: 8px;
  color: #9aa3a0;
  font-size: 12px;
}

.activity-task-type {
  margin-left: 5px;
  color: #87918e;
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  white-space: nowrap;
}

.activity-full-list {
  display: block;
  min-height: 0;
  height: 0;
  flex: 1 1 0;
  overflow-x: hidden;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  padding: 4px 18px 16px;
}

.activity-full-list::-webkit-scrollbar {
  width: 8px;
}

.activity-full-list::-webkit-scrollbar-thumb {
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #cbd3d0;
}

.activity-full-item {
  display: block;
  margin: 0;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  color: #68736f;
  padding: 10px 0;
  font-size: 13px;
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-full-item:last-child {
  border-bottom: 1px solid var(--line);
}

.activity-full-item span {
  color: #3d4744;
  font-weight: 620;
}

.activity-full-item time {
  margin-left: 6px;
  color: #9aa3a0;
  font-size: 12px;
}

.month-summary {
  margin: 0 0 6px;
  padding: 3px 0 8px;
  border-bottom: 1px solid var(--line);
  color: #66726e;
  font-size: 14px;
  line-height: 1.45;
}

.month-summary strong {
  color: var(--text);
  font-weight: 680;
}

#enterTeamWorkbenchButton {
  padding-bottom: 0;
}

.team-workbench-page {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  padding: 24px;
  background: rgba(32, 37, 36, 0.18);
}

body.browser-page-layout .team-workbench-page {
  position: static;
  inset: auto;
  align-items: stretch;
  justify-content: stretch;
  z-index: auto;
  min-height: 0;
  flex: 1;
  padding: 0;
  background: var(--panel);
}

.team-workbench-window {
  width: min(980px, calc(100vw - 48px));
  height: min(720px, calc(100vh - 48px));
  min-height: 560px;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 28px 90px rgba(32, 37, 36, 0.2);
}

body.browser-page-layout .team-workbench-window {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.team-workbench-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex: 0 0 auto;
  padding: 18px 72px 12px 24px;
  border-bottom: 1px solid var(--line);
}

.export-work-button {
  flex: 0 0 auto;
  margin-left: auto;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: #4f5a57;
  padding: 0 12px;
  font-size: 13px;
  cursor: pointer;
}

.export-work-button:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.team-title-block {
  min-width: 0;
}

.team-title-block h2 {
  margin: 0;
  color: var(--text);
  font-size: 21px;
  font-weight: 680;
  letter-spacing: 0;
}

.super-admin-note {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.department-workspace-row {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 38px;
  padding: 9px 24px 0;
}

.department-workspace-tabs {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
}

.department-workspace-label,
.department-workspace-tab {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: #53605c;
  padding: 7px 12px;
  font-size: 14px;
  white-space: nowrap;
}

.department-workspace-tab {
  cursor: pointer;
}

.department-workspace-tab:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.department-workspace-tab.is-active {
  border-color: #aebbb7;
  background: #f5f8f7;
  color: var(--text);
  font-weight: 650;
}

.team-task-range-filter {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin-left: auto;
}

.team-task-range-filter input {
  width: 126px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: #4f5a57;
  padding: 0 10px;
  font-size: 13px;
}

.team-task-range-filter input:focus {
  border-color: var(--line-strong);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(69, 118, 104, 0.12);
}

.team-task-range-button {
  flex: 0 0 auto;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: #4f5a57;
  padding: 0 12px;
  font-size: 13px;
  cursor: pointer;
}

.team-task-range-button:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.team-task-range-button.is-active {
  border-color: #aebbb7;
  background: #f5f8f7;
  color: var(--text);
  font-weight: 650;
}

.team-task-range-separator,
.team-task-range-message {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.team-task-range-message {
  color: #b42318;
}

.team-tabs-row {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 10px 24px 0;
}

.team-tabs {
  display: flex;
  flex: 0 0 auto;
  min-width: 0;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 0;
}

.team-tab-tools {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.team-tab-tools .team-task-range-filter,
.team-tab-tools .export-work-button {
  margin-left: 0;
}

.team-tab {
  flex: 0 0 auto;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #68736f;
  padding: 7px 12px;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
}

.team-tab:hover {
  color: var(--text);
}

.team-tab.is-active {
  border-color: var(--line-strong);
  background: #ffffff;
  color: var(--text);
  font-weight: 620;
}

.team-panel {
  position: relative;
  display: flex;
  min-height: 0;
  flex: 1;
}

.team-workspace-content {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.team-activity-workbench {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.team-activity-workbench-list {
  margin: 16px 24px 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0 2px 8px;
}

.team-activity-search {
  display: flex;
  align-items: center;
  gap: 6px;
}

.team-activity-search input {
  width: 200px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #ffffff;
  color: var(--text);
  padding: 0 11px;
  font-size: 13px;
  outline: none;
}

.team-activity-search input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px var(--focus-soft);
}

.team-activity-search button {
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #ffffff;
  color: var(--muted);
  padding: 0 11px;
  font-size: 13px;
  cursor: pointer;
}

.team-activity-search button[type="submit"] {
  border-color: var(--focus);
  background: var(--focus);
  color: #ffffff;
}

.team-activity-search-meta {
  width: 256px;
  margin-left: auto;
  color: var(--muted);
  padding-left: 12px;
  font-size: 12px;
  line-height: 1.4;
  text-align: left;
}

.team-activity-search-meta strong {
  color: var(--text);
  font-size: inherit;
  font-weight: 650;
}

.team-activity-summary {
  align-items: center;
}

.team-activity-load-more {
  display: block;
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--focus);
  padding: 12px 0 4px;
  font-size: 13px;
  cursor: pointer;
}

.team-activity-load-more:disabled {
  color: var(--muted);
  cursor: default;
}

.team-workspace-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex: 0 0 auto;
  padding: 10px 24px 0;
}

@media (max-width: 760px) {
  .team-tab-tools {
    width: 100%;
    overflow-x: auto;
  }

  .team-activity-search input {
    min-width: 0;
    width: 200px;
  }

  .team-activity-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .team-activity-search-meta {
    width: auto;
    margin-left: 0;
  }
}

.team-workspace-summary p {
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
}

.team-workspace-summary p:empty {
  display: none;
}

.team-workspace-summary span {
  display: block;
}

.team-workspace-summary p:not(:empty) + span {
  margin-top: 3px;
}

.team-tab-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

.team-tab-note strong {
  color: var(--text);
  font-size: inherit;
  font-weight: 650;
}

.team-board {
  display: flex;
  min-height: 0;
  flex: 1;
  gap: 14px;
  overflow-x: auto;
  padding: 16px 24px 24px;
}

.team-board::-webkit-scrollbar,
.member-column-scroll::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.team-board::-webkit-scrollbar-thumb,
.member-column-scroll::-webkit-scrollbar-thumb {
  border: 2px solid var(--panel);
  border-radius: 999px;
  background: #cbd3d0;
}

.member-column {
  display: flex;
  min-height: 0;
  flex: 0 0 340px;
  flex-direction: column;
  border-right: 1px solid var(--line);
  padding-right: 14px;
}

.member-column-header {
  flex: 0 0 auto;
  padding: 0 0 10px;
}

.member-column-header h3 {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 6px;
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}

.member-title-name {
  flex: 0 0 auto;
  color: var(--text);
  font: inherit;
}

.member-terminal-presence {
  flex: 0 0 auto;
  align-self: center;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #aeb8b5;
}

.member-terminal-presence.is-online {
  background: #16a34a;
}

.member-terminal-presence.is-loading {
  visibility: hidden;
}

.member-title-separator {
  flex: 0 0 auto;
  color: #9aa4a0;
  font-size: 14px;
  font-weight: 400;
}

.member-title-position {
  min-width: 0;
  overflow: hidden;
  color: #7f8985;
  font-size: 14px;
  font-weight: 400;
  text-overflow: ellipsis;
}

.member-column-scroll {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 8px;
}

.member-task-section {
  padding: 12px 0 14px;
  border-top: 1px solid var(--line);
}

.member-task-section:first-child {
  border-top: 0;
  padding-top: 0;
}

.member-task-section h4 {
  margin: 0 0 8px;
  color: #64706c;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0;
}

.fixed-section-heading {
  display: flex;
  min-height: 25px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.member-task-section .fixed-section-heading h4 {
  margin: 0;
}

.fixed-section-add-button {
  margin-right: 2px;
}

.member-task-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.team-task {
  display: grid;
  grid-template-columns: 37px minmax(0, 1fr);
  align-items: start;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 7px 8px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.team-task.is-pending {
  border-color: #cbd8d4;
}

.team-task.is-fixed {
  background: #f8faf8;
}

.team-task-control {
  cursor: default;
}

.team-task-status-mark {
  cursor: default;
  pointer-events: none;
}

.team-task-order-space {
  pointer-events: none;
}

.team-task-text {
  display: flex;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
}

.team-task-name {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-task-meta {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  color: #82908b;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-task.is-completed {
  border-color: #e2e7e5;
  background: #f5f6f5;
}

.team-task.is-completed .team-task-text {
  color: #9aa3a0;
}

.team-task.is-completed .team-task-name {
  text-decoration: line-through;
}

.team-task.is-completed .team-task-meta {
  color: #a8b0ad;
}

.team-empty-text {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fafafa;
  padding: 9px 10px;
  color: #9aa3a0;
  font-size: 13px;
}

.team-state-card {
  width: min(360px, 100%);
  align-self: flex-start;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  padding: 16px;
  color: var(--muted);
  font-size: 14px;
}

.team-state-card strong,
.team-state-card span {
  display: block;
}

.team-state-card strong {
  margin-bottom: 6px;
  color: var(--text);
}

.floating-task-tooltip {
  position: fixed;
  z-index: 100;
  max-width: 320px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: #2d3633;
  padding: 8px 10px;
  box-shadow: 0 12px 32px rgba(32, 37, 36, 0.16);
  font-size: 13px;
  line-height: 1.45;
  pointer-events: none;
  white-space: normal;
  word-break: break-word;
}

.fixed-work-panel {
  flex-direction: column;
}

.fixed-work-note {
  flex: 0 0 auto;
  margin: 10px 24px 0;
  padding: 0;
  white-space: pre-line;
}

.fixed-work-panel .team-board {
  min-height: 240px;
  padding-top: 16px;
}

.fixed-template-row {
  display: grid;
  grid-template-columns: 37px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 28px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.fixed-template-mark {
  color: transparent;
}

.fixed-template-content {
  min-width: 0;
  overflow: hidden;
}

.fixed-template-title {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fixed-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.team-placeholder {
  flex: 1;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
}

.export-modal-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(251, 251, 250, 0.72);
}

.export-modal {
  width: min(380px, 100%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  padding: 20px;
  box-shadow: 0 18px 52px rgba(32, 37, 36, 0.14);
}

.export-modal .hidden {
  display: none;
}

.export-modal h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 680;
}

.export-modal fieldset {
  display: flex;
  gap: 16px;
  margin: 0;
  border: 0;
  padding: 0;
}

.export-modal legend {
  width: 100%;
  margin-bottom: 8px;
  color: #4f5a57;
  font-size: 13px;
}

.export-date-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.export-date-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #4f5a57;
  font-size: 13px;
}

.export-date-grid input {
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  outline: none;
  padding: 0 10px;
}

.export-date-grid input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px var(--focus-soft);
}

.export-message {
  min-height: 17px;
  color: var(--danger);
  font-size: 12px;
  line-height: 17px;
}

.platform-view {
  position: relative;
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  background: var(--panel);
}

.platform-header {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(24px, 5vw, 72px) 20px;
  border-bottom: 1px solid var(--line);
}

.platform-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 26px;
  font-weight: 680;
}

.platform-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.platform-notice {
  margin: 16px clamp(24px, 5vw, 72px) 0;
  border: 1px solid #d8e4df;
  border-radius: 8px;
  background: #f2f7f5;
  color: #35675e;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.4;
}

.platform-notice.is-error {
  border-color: #ead5d0;
  background: #fff8f6;
  color: var(--danger);
}

.platform-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
  padding: 18px clamp(24px, 5vw, 72px) 0;
}

.platform-tab {
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #68736f;
  padding: 9px 16px;
  font-size: 14px;
  cursor: pointer;
}

.platform-tab:hover {
  color: var(--text);
}

.platform-tab.is-active {
  border-color: var(--line-strong);
  background: #ffffff;
  color: var(--text);
  font-weight: 620;
}

.platform-panel {
  position: relative;
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 24px clamp(24px, 5vw, 72px) 72px;
}

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

.platform-panel-title p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.platform-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.platform-panel-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 21px;
  font-weight: 680;
}

.platform-panel-header p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.platform-primary-button {
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: var(--button);
  color: #ffffff;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 620;
  cursor: pointer;
}

.platform-company-row {
  grid-template-columns:
    3rem
    minmax(220px, 2fr)
    minmax(160px, 1fr)
    4.5rem
    13rem;
}

.platform-admin-row {
  grid-template-columns:
    3rem
    minmax(140px, 1fr)
    minmax(140px, 1fr)
    4.5rem
    17rem;
}

.platform-company-row > span:first-child,
.platform-admin-row > span:first-child {
  justify-self: center;
  text-align: center;
  width: 100%;
}

.platform-admin-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 360px) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 20px;
}

.platform-admin-toolbar label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #4f5a57;
  font-size: 13px;
}

.platform-admin-toolbar select,
.platform-modal select,
.platform-modal input {
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  outline: none;
  padding: 0 10px;
}

.platform-admin-toolbar select:focus,
.platform-modal select:focus,
.platform-modal input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px var(--focus-soft);
}

.org-tree {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.org-company {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.org-company:first-child {
  border-top: 0;
  padding-top: 0;
}

.org-node-line {
  display: flex;
  min-height: 30px;
  align-items: center;
  gap: 8px;
  color: #3d4744;
  font-size: 14px;
}

.org-company-name,
.org-name {
  color: var(--text);
  font-weight: 650;
}

.org-code {
  color: #87918e;
  font-size: 12px;
}

.status-pill {
  border: 1px solid #d8c8c8;
  border-radius: 999px;
  color: #9a4545;
  padding: 2px 7px;
  font-size: 12px;
}

.org-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-left: auto;
}

.org-departments {
  margin-top: 6px;
  padding-left: 14px;
}

.org-department {
  padding: 4px 0;
}

.org-branch {
  color: #9aa3a0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.org-manager {
  margin-left: 24px;
  color: #68736f;
  font-size: 13px;
  line-height: 1.8;
}

.business-entry {
  width: min(360px, 100%);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.business-entry label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #4f5a57;
  font-size: 13px;
}

.business-entry select {
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  outline: none;
  padding: 0 10px;
}

.business-entry select:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px var(--focus-soft);
}

.platform-modal-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(251, 251, 250, 0.72);
}

.platform-modal {
  width: min(380px, 100%);
  max-height: min(640px, calc(100% - 44px));
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  padding: 20px;
  box-shadow: 0 18px 52px rgba(32, 37, 36, 0.14);
}

.platform-modal h3 {
  margin: 0 0 2px;
  color: var(--text);
  font-size: 18px;
  font-weight: 680;
}

.platform-modal label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #4f5a57;
  font-size: 13px;
}

.platform-manager-modal {
  overflow: hidden;
}

.platform-modal-scroll {
  min-height: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding-right: 4px;
}

.platform-modal::-webkit-scrollbar,
.platform-modal-scroll::-webkit-scrollbar {
  width: 8px;
}

.platform-modal::-webkit-scrollbar-thumb,
.platform-modal-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #c8d0cd;
}

.danger-copy {
  color: #9f3434;
  font-size: 15px;
  font-weight: 680;
}

.manager-member-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.manager-member-list span {
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: #596461;
  padding: 3px 8px;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manager-checkbox-group {
  display: grid;
  gap: 8px;
  margin: 0;
  border: 0;
  padding: 0;
}

.manager-checkbox-group legend {
  margin-bottom: 2px;
  color: #4f5a57;
  font-size: 13px;
}

.checkbox-row {
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
  min-height: 24px;
}

.checkbox-row input {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  accent-color: var(--focus);
}

.checkbox-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inline-field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.admin-view {
  position: relative;
  min-height: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  background: var(--panel);
}

.admin-header {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 24px 12px;
  border-bottom: 1px solid var(--line);
}

.admin-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 21px;
  font-weight: 680;
}

.admin-header p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.admin-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  padding: 12px 24px 0;
  border-bottom: 1px solid transparent;
}

.admin-tab {
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #68736f;
  padding: 7px 12px;
  font-size: 14px;
  cursor: pointer;
}

.admin-tab:hover {
  color: var(--text);
}

.admin-tab.is-active {
  border-color: var(--line-strong);
  background: #ffffff;
  color: var(--text);
  font-weight: 620;
}

.admin-notice {
  margin: 12px 24px 0;
  border: 1px solid #d8e4df;
  border-radius: 8px;
  background: #f2f7f5;
  color: #35675e;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.4;
}

.admin-notice.is-error {
  border-color: #ead5d0;
  background: #fff8f6;
  color: var(--danger);
}

.admin-panel {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 18px 24px 64px;
}

.admin-panel-title {
  margin-bottom: 16px;
}

.admin-panel-title h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 680;
}

.admin-panel-title p,
.admin-auth-note {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.admin-create-bar,
.admin-auth-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.admin-member-create {
  grid-template-columns:
    minmax(96px, 1fr)
    minmax(96px, 1fr)
    minmax(116px, 1fr)
    minmax(128px, 1fr)
    minmax(116px, 1fr)
    minmax(116px, 1fr)
    auto;
}

.admin-auth-form {
  grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) auto;
}

.admin-create-bar input,
.admin-create-bar select,
.admin-auth-form select,
.admin-modal input,
.admin-modal select {
  min-width: 0;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  outline: none;
  padding: 0 10px;
}

.admin-create-bar input:focus,
.admin-create-bar select:focus,
.admin-auth-form select:focus,
.admin-modal input:focus,
.admin-modal select:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px var(--focus-soft);
}

.admin-checkbox-field {
  gap: 8px;
}

.admin-checkbox-field small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.admin-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 10px;
}

.admin-checkbox-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
}

.admin-checkbox-option input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--focus);
}

.admin-checkbox-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-list {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.admin-row {
  display: grid;
  align-items: center;
  column-gap: 14px;
  min-height: 42px;
  width: max-content;
  min-width: 100%;
  border-top: 1px solid var(--line);
  color: #3d4744;
  font-size: 14px;
}

.admin-row:first-child {
  border-top: 0;
}

.admin-row-head {
  min-height: 36px;
  color: #76817d;
  font-size: 12px;
  font-weight: 650;
}

.admin-department-row {
  grid-template-columns: 3rem minmax(160px, 1fr) 4.5rem 9rem 16rem;
}

.admin-member-row {
  grid-template-columns:
    3rem
    112px
    112px
    112px
    112px
    224px
    14rem
    6rem;
}

.admin-coordinator-row {
  grid-template-columns:
    minmax(7rem, 1fr)
    minmax(7rem, 1fr)
    minmax(8rem, 1fr)
    4.5rem
    5rem;
}

.admin-manager-row {
  grid-template-columns:
    minmax(7rem, 1fr)
    minmax(7rem, 1fr)
    minmax(8rem, 1fr)
    4.5rem
    5rem;
}

.admin-row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-index {
  justify-self: center;
  color: #87918e;
}

.admin-department-row > span:first-child,
.admin-member-row > span:first-child {
  justify-self: center;
  text-align: center;
  width: 100%;
}

.admin-main-text {
  color: var(--text);
  font-weight: 620;
}

.admin-muted {
  color: var(--muted);
  font-size: 12px;
}

.admin-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}

.inline-action.is-danger {
  color: #a94242;
}

.admin-status {
  width: fit-content;
  border: 1px solid #e1d5d2;
  border-radius: 999px;
  color: #9f3434;
  padding: 2px 7px;
  font-size: 12px;
}

.admin-status.is-active {
  border-color: #c9ddd6;
  color: #35675e;
}

.admin-empty {
  padding: 18px 0;
  color: var(--muted);
  font-size: 14px;
}

.admin-auth-grid {
  display: grid;
  gap: 26px;
}

.admin-auth-block {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.admin-auth-block:first-child {
  border-top: 0;
  padding-top: 0;
}

.admin-auth-block h3 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 17px;
  font-weight: 680;
}

.admin-auth-block .admin-auth-note + .admin-auth-form {
  margin-top: 12px;
}

.admin-modal-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(251, 251, 250, 0.72);
}

.admin-modal {
  width: min(440px, 100%);
  max-height: min(640px, calc(100% - 44px));
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  padding: 20px;
  box-shadow: 0 18px 52px rgba(32, 37, 36, 0.14);
}

.admin-risk-modal {
  width: min(520px, 100%);
}

.admin-risk-copy,
.admin-risk-list,
.admin-countdown {
  margin: 0;
  color: #5f6966;
  font-size: 13px;
  line-height: 1.6;
}

.admin-risk-copy {
  color: var(--text);
  font-weight: 620;
}

.admin-risk-list {
  border-left: 3px solid #ead5d0;
  padding-left: 12px;
}

.admin-risk-list p {
  margin: 0;
}

.admin-countdown {
  color: #9f3434;
  font-weight: 650;
}

.admin-modal h3 {
  margin: 0 0 2px;
  color: var(--text);
  font-size: 18px;
  font-weight: 680;
}

.admin-modal label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #4f5a57;
  font-size: 13px;
}

.platform-primary-button:disabled,
.secondary-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.modal-danger-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.team-management-page {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 24px 24px;
}

.team-management-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

.team-management-summary p {
  margin: 0;
}

.member-list {
  --member-index-column: 2.25rem;
  --member-short-column: 112px;
  --member-position-column: 168px;
  --member-role-column: 4.75rem;
  --member-action-column: 10.25rem;
  --member-version-column: 6rem;

  width: max-content;
  max-width: 100%;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  padding-bottom: 8px;
}

.member-row {
  display: grid;
  grid-template-columns:
    var(--member-index-column)
    var(--member-short-column)
    var(--member-short-column)
    var(--member-position-column)
    var(--member-action-column)
    var(--member-version-column);
  align-items: center;
  column-gap: 14px;
  min-height: 42px;
  width: max-content;
  border-top: 1px solid var(--line);
  color: #3d4744;
  font-size: 14px;
}

.member-row:first-child {
  border-top: 0;
}

.member-row-head {
  min-height: 36px;
  color: #76817d;
  font-size: 12px;
  font-weight: 650;
}

.member-row-no-actions {
  grid-template-columns:
    var(--member-index-column)
    var(--member-short-column)
    var(--member-short-column)
    var(--member-position-column)
    var(--member-version-column);
}

.member-row > span {
  min-width: 0;
}

.member-row > :first-child {
  width: 100%;
  justify-self: center;
  text-align: center;
}

.member-version {
  width: 100%;
  justify-self: center;
  text-align: center;
}

.member-row:not(.member-row-head) .member-version {
  color: #5f6b68;
  font-size: 12px;
  font-weight: 400;
}

.member-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #87918e;
  text-align: center;
}

.member-text,
.member-nickname {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-nickname {
  color: var(--text);
  font-weight: 620;
}

.member-role {
  overflow: hidden;
  color: #5d6865;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}

.member-actions .inline-action {
  padding-inline: 0;
  font-size: 12px;
}

.add-member-button {
  margin-top: 14px;
  border: 0;
  background: transparent;
  color: var(--focus);
  padding: 6px 0;
  font-size: 14px;
  font-weight: 620;
  cursor: pointer;
}

.member-modal-backdrop {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(251, 251, 250, 0.72);
}

.member-modal {
  width: min(360px, 100%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  padding: 20px;
  box-shadow: 0 18px 52px rgba(32, 37, 36, 0.14);
}

.member-modal h3 {
  margin: 0 0 2px;
  color: var(--text);
  font-size: 18px;
  font-weight: 680;
}

.member-modal label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #4f5a57;
  font-size: 13px;
}

.member-modal input[type="text"],
.member-modal input[type="password"] {
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  outline: none;
  padding: 0 10px;
}

.member-modal input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px var(--focus-soft);
}

.member-modal fieldset {
  display: flex;
  gap: 14px;
  margin: 0;
  border: 0;
  padding: 0;
}

.member-modal legend {
  width: 100%;
  margin-bottom: 6px;
  color: #4f5a57;
  font-size: 13px;
}

.radio-row {
  flex-direction: row !important;
  align-items: center;
  gap: 7px !important;
}

.radio-row input {
  accent-color: var(--focus);
}

.member-modal-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.member-modal-message {
  min-height: 17px;
  color: var(--danger);
  font-size: 12px;
  line-height: 17px;
}

.member-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 2px;
}

.secondary-button,
.modal-primary-button,
.modal-danger-button {
  height: 34px;
  border-radius: 9px;
  padding: 0 13px;
  font-size: 13px;
  cursor: pointer;
}

.secondary-button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: #596461;
}

.modal-primary-button {
  border: 0;
  background: var(--button);
  color: #ffffff;
  font-weight: 620;
}

.modal-danger-button {
  border: 0;
  background: #9f3434;
  color: #ffffff;
  font-weight: 620;
}

.member-confirm-modal {
  gap: 14px;
}

.member-risk-modal {
  width: min(520px, 100%);
}

.workspace-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding: 0 34px 72px;
}

.eyebrow {
  color: var(--focus);
  font-size: 13px;
  font-weight: 650;
}

h2 {
  margin-top: 12px;
  font-size: 30px;
  font-weight: 680;
  letter-spacing: 0;
}

.muted {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.profile-line {
  margin-top: 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
  color: #3f4745;
  font-size: 14px;
  line-height: 1.6;
}

.floating-account-button {
  position: absolute;
  right: 17px;
  bottom: 21px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  padding: 0;
}

body.browser-page-layout .floating-account-button {
  top: 17px;
  right: 24px;
  bottom: auto;
  z-index: 30;
}

.workspace-header:not(.hidden) ~ .floating-account-button {
  display: none;
}

.hidden {
  display: none;
}

body.browser-page-layout .hidden {
  display: none;
}

@media (max-width: 760px) {
  .platform-header,
  .admin-header {
    flex-direction: column;
    align-items: stretch;
    padding-inline: 16px;
  }

  .platform-tabs,
  .admin-tabs {
    overflow-x: auto;
    padding-inline: 16px;
  }

  .platform-admin-toolbar,
  .admin-create-bar,
  .admin-member-create,
  .admin-auth-form {
    grid-template-columns: 1fr;
  }

  .platform-panel,
  .admin-panel {
    padding-inline: 16px;
  }

  .platform-notice,
  .admin-notice {
    margin-inline: 16px;
  }

  .platform-panel-title {
    align-items: stretch;
    flex-direction: column;
  }

  .platform-panel-title .platform-primary-button {
    width: fit-content;
  }
}

@media (max-height: 720px) {
  body {
    place-items: start center;
    padding: 16px 0;
  }

  body:has(.platform-view:not(.hidden)),
  body:has(.admin-view:not(.hidden)) {
    padding: 0;
  }

  .desktop-frame {
    height: calc(100vh - 32px);
    min-height: calc(100vh - 32px);
  }

  body:has(.platform-view:not(.hidden)) .desktop-frame,
  body:has(.admin-view:not(.hidden)) .desktop-frame {
    height: 100vh;
    min-height: 100vh;
  }

  .desktop-frame:has(.login-view:not(.hidden)) {
    height: auto;
    min-height: 0;
  }

  .login-form {
    margin-top: 34px;
  }

  .task-scroll {
    padding-inline: 24px;
  }
}
.procedure-modal-layer,
.procedure-image-viewer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(28, 35, 33, 0.32);
}

.procedure-modal-layer.hidden,
.procedure-image-viewer.hidden {
  display: none;
}

.procedure-modal {
  position: relative;
  width: min(980px, 100%);
  max-height: min(760px, calc(100vh - 44px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(32, 37, 36, 0.22);
}

#procedureModalContent {
  display: flex;
  min-height: 0;
  max-height: inherit;
  flex-direction: column;
}

.procedure-modal-header,
.procedure-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 34px 14px;
  border-bottom: 1px solid var(--line);
}

.procedure-modal-header {
  position: static;
  padding: 14px 34px 13px;
  border-bottom: 1px solid var(--line);
}

.procedure-modal-footer {
  min-height: 67px;
  padding: 13px 34px;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.procedure-steps-heading span {
  color: #7a8581;
  font-size: 12px;
}

.procedure-modal h3 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 680;
  line-height: 1.25;
  letter-spacing: -0.2px;
}

.procedure-modal-close,
.procedure-image-close {
  border: 0;
  background: transparent;
  color: #68736f;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

.procedure-modal-body {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  padding: 17px 34px 16px;
}

.procedure-content-field {
  display: grid;
  gap: 7px;
}

.procedure-content-field > span,
.procedure-steps-heading strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 680;
  line-height: 1.4;
}

.procedure-content-field > small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.procedure-content-field input,
.procedure-step-card textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font: inherit;
  outline: none;
  padding: 0 14px;
}

.procedure-content-field input {
  height: 41px;
  font-size: 14px;
}

.procedure-content-field input:focus,
.procedure-step-card textarea:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px var(--focus-soft);
}

.procedure-readonly-title {
  color: var(--text);
  font-size: 19px;
  font-weight: 680;
}

.procedure-steps-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 17px 0 0;
  color: var(--text);
}

.procedure-steps-helper {
  margin: 5px 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.procedure-step-list {
  display: grid;
  gap: 12px;
}

.procedure-step-item {
  position: relative;
  min-width: 0;
  padding-left: 76px;
}

.procedure-step-item:not(:last-child)::before {
  position: absolute;
  z-index: 0;
  top: 32px;
  bottom: -12px;
  left: 30px;
  width: 1px;
  background: var(--line-strong);
  content: "";
}

.procedure-step-card {
  position: relative;
  border: 1px solid #d4dedb;
  border-radius: 12px;
  background: #f7f9f8;
  padding: 6px 13px 12px 12px;
}

.procedure-step-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 12px;
}

.procedure-step-label {
  position: absolute;
  z-index: 1;
  top: 0;
  left: -76px;
  display: flex;
  width: 62px;
  height: 32px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  border: 1px solid #ccd8d4;
  border-radius: 999px;
  background: #f1f5f3;
  color: #526c63;
  font-size: 14px;
  font-weight: 680;
  line-height: 1;
  white-space: nowrap;
}

.procedure-step-actions {
  display: flex;
  min-height: 34px;
  box-sizing: border-box;
  align-items: flex-start;
  justify-content: flex-end;
  width: auto;
  gap: 13px;
  margin-left: 6px;
  padding-top: 4px;
  padding-left: 3px;
}

.procedure-step-actions button,
.procedure-add-step,
.procedure-secondary-button,
.procedure-primary-button,
.procedure-image-toolbar button,
.procedure-image-toolbar a {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: #53615c;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  padding: 7px 10px;
  text-decoration: none;
}

.procedure-step-actions button {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #74807c;
  font-size: 12px;
  padding: 0;
}

.procedure-step-actions .danger-action {
  color: #9a625b;
}

.procedure-delete-confirm-text {
  color: #7a8581;
  font-size: 12px;
}

.procedure-step-card textarea {
  grid-column: 1 / 2;
  grid-row: 1;
  width: 100%;
  height: 34px;
  min-height: 34px;
  max-height: 180px;
  overflow-y: auto;
  border: 0;
  box-sizing: border-box;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  padding: 2px 0;
  resize: none;
}

.procedure-step-card textarea:focus {
  border-color: transparent;
  box-shadow: none;
  background: transparent;
}

.procedure-step-content {
  grid-column: 1 / 2;
  grid-row: 1;
  margin: 0;
  border-radius: 0;
  background: transparent;
  white-space: pre-wrap;
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
  padding: 2px 0;
}

.procedure-image-grid {
  display: flex;
  grid-column: 1 / 2;
  grid-row: 2;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 9px;
  margin-top: 8px;
}

.procedure-step-card.is-readonly .procedure-image-grid {
  margin-top: 11px;
}

.procedure-step-card.is-readonly .procedure-image-card,
.procedure-step-card.is-readonly .procedure-thumbnail-button {
  width: 180px;
}

.procedure-step-card.is-readonly .procedure-thumbnail-button {
  height: 104px;
}

.procedure-image-card {
  position: relative;
  width: 108px;
}

.procedure-thumbnail-button {
  display: block;
  width: 108px;
  height: 56px;
  overflow: hidden;
  border: 1px solid #c8d3cf;
  border-radius: 8px;
  background: #edf2f0;
  cursor: zoom-in;
  padding: 0;
}

.procedure-thumbnail-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.procedure-thumbnail-button img:not([src]) {
  opacity: 0;
}

.procedure-thumbnail-button img.is-unavailable {
  opacity: 0.25;
}

.procedure-image-remove {
  position: absolute;
  top: 4px;
  right: 6px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(56, 65, 62, 0.84);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  padding: 0;
}

.procedure-image-delete-confirm {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid #d8dfdc;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: #68746f;
  font-size: 11px;
}

.procedure-image-delete-confirm > div {
  display: flex;
  gap: 9px;
}

.procedure-image-delete-confirm button {
  border: 0;
  background: transparent;
  color: #68746f;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.procedure-image-delete-confirm .danger-action {
  color: #9a625b;
}

.procedure-upload-tile {
  display: flex;
  width: 108px;
  height: 56px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  border: 1px dashed #bccbc6;
  border-radius: 8px;
  background: #fff;
  color: #4d625a;
  cursor: pointer;
  font-size: 12px;
  text-align: center;
}

.procedure-upload-tile:hover,
.procedure-upload-tile:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px var(--focus-soft);
  outline: none;
}

.procedure-upload-tile small {
  color: #7c8884;
  font-size: 10px;
}

.procedure-upload-tile input {
  display: none;
}

.procedure-add-step {
  width: 100%;
  height: 36px;
  margin-left: 0;
  margin-top: 14px;
  border-style: dashed;
  padding-block: 0;
  font-size: 14px;
}

.procedure-empty-state,
.procedure-empty-add {
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  color: #7b8682;
  padding: 18px;
  text-align: center;
}

.procedure-empty-add {
  display: flex;
  width: 100%;
  align-items: center;
  flex-direction: column;
  gap: 5px;
  background: #fbfcfb;
  cursor: pointer;
  font: inherit;
}

.procedure-empty-add strong {
  color: #53615c;
  font-size: 14px;
}

.procedure-empty-add span {
  color: var(--muted);
  font-size: 12px;
}

.procedure-empty-add:hover {
  border-color: var(--focus);
  background: #f8fbfa;
}

.procedure-unsaved-state {
  color: #9d7543;
  font-size: 12px;
  opacity: 0;
}

.procedure-unsaved-state::before {
  margin-right: 7px;
  color: #d3a05f;
  content: "●";
}

.procedure-unsaved-state.is-visible {
  opacity: 1;
}

.procedure-footer-actions {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

.procedure-secondary-button,
.procedure-primary-button {
  min-width: 72px;
  height: 39px;
  padding: 0 14px;
  font-size: 14px;
}

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

.procedure-primary-button:disabled {
  cursor: wait;
  opacity: 0.58;
}

@media (max-width: 640px) {
  .procedure-modal-layer {
    padding: 10px;
  }

  .procedure-modal {
    max-height: calc(100vh - 20px);
  }

  .procedure-modal-header,
  .procedure-modal-footer {
    padding-inline: 16px;
  }

  .procedure-modal-body {
    padding-inline: 16px;
  }

  .procedure-step-main {
    grid-template-columns: 1fr auto;
    gap: 7px 10px;
  }

  .procedure-step-item {
    padding-top: 38px;
    padding-left: 0;
  }

  .procedure-step-item:not(:last-child)::before {
    display: none;
  }

  .procedure-step-label {
    top: -38px;
    left: 0;
  }

  .procedure-step-actions {
    min-height: 24px;
    gap: 10px;
  }

  .procedure-step-card textarea,
  .procedure-step-content {
    grid-column: 1 / 2;
    grid-row: 1;
  }

  .procedure-step-content {
    margin-top: 0;
  }

  .procedure-image-grid {
    grid-column: 1 / -1;
    grid-row: 2;
  }

}

.fixed-template-title {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: default;
  font: inherit;
  padding: 0;
  text-align: left;
}

.fixed-template-title.has-procedure {
  cursor: pointer;
}

.procedure-image-viewer {
  z-index: 90;
  background: rgba(18, 23, 22, 0.84);
}

.procedure-image-stage {
  width: min(92vw, 1200px);
  height: min(78vh, 760px);
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}

.procedure-image-stage:active {
  cursor: grabbing;
}

.procedure-image-stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: center;
  will-change: transform;
  -webkit-user-drag: none;
  user-select: none;
}

.procedure-image-close {
  position: absolute;
  top: 22px;
  right: 28px;
  z-index: 2;
  color: #fff;
  font-size: 32px;
}

.procedure-image-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 42px;
  height: 58px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  cursor: pointer;
  font-size: 40px;
  line-height: 1;
}

.procedure-image-prev { left: 24px; }
.procedure-image-next { right: 24px; }

.procedure-image-toolbar {
  position: absolute;
  bottom: 24px;
  display: flex;
  gap: 8px;
}

.procedure-image-toolbar button,
.procedure-image-toolbar a {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
