@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/variable/pretendardvariable-dynamic-subset.css");

:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-raised: rgba(255, 255, 255, 0.94);
  --surface-soft: #f1f5f9;
  --ink: #111827;
  --muted: #5f6875;
  --faint: #8d96a3;
  --line: #dce3eb;
  --line-strong: #c4ceda;
  --navy: #062b65;
  --navy-deep: #041f4d;
  --teal: #008c86;
  --teal-deep: #00726d;
  --teal-soft: #e3f7f5;
  --blue-soft: #eaf0fb;
  --amber: #b45309;
  --amber-soft: #fff7ed;
  --red: #b42318;
  --red-soft: #fff1f1;
  --green: #047857;
  --green-soft: #ecfdf3;
  --focus-ring: rgba(0, 140, 134, 0.18);
  --card-border: rgba(196, 206, 218, 0.82);
  --shadow-xs: 0 1px 2px rgba(6, 43, 101, 0.05);
  --shadow-sm: 0 8px 24px rgba(6, 43, 101, 0.07);
  --shadow: 0 18px 44px rgba(6, 43, 101, 0.13);
  --shadow-strong: 0 22px 54px rgba(6, 43, 101, 0.18);
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 14px;
  --control-font: 14px;
  --control-weight: 760;
  --control-weight-strong: 820;
  --tap-target: 44px;
  --bottom-nav-height: 74px;
  --content-max: 430px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard Variable", "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
}

body:has(.modal-backdrop) {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  box-shadow: none;
}

button:not(:disabled):active {
  transform: translateY(1px);
}

:where(button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.app-shell {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
}

.launch-screen {
  width: 100%;
  max-width: var(--content-max);
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  margin: 0 auto;
  padding: calc(28px + var(--safe-top)) 18px calc(28px + var(--safe-bottom));
  background:
    linear-gradient(180deg, rgba(6, 43, 101, 0.08), rgba(255, 255, 255, 0) 44%),
    var(--bg);
}

.launch-panel {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 34px 18px;
  text-align: center;
}

.launch-icon {
  width: 78px;
  height: 78px;
  border-radius: 22px;
  box-shadow: 0 16px 34px rgba(6, 43, 101, 0.18);
}

.launch-copy {
  display: grid;
  gap: 6px;
}

.launch-copy span {
  color: var(--teal-deep);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
}

.launch-copy h1 {
  margin: 0;
  color: var(--navy);
  font-size: 24px;
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.launch-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}

.launch-progress {
  width: min(172px, 58vw);
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(196, 206, 218, 0.72);
}

.launch-progress span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.screen {
  --page-x: 16px;
  --page-y: 12px;
  width: 100%;
  max-width: var(--content-max);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  overflow-x: clip;
  padding: var(--page-y) var(--page-x) calc(var(--bottom-nav-height) + 18px + var(--safe-bottom));
}

.login-screen {
  display: flex;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  overflow-x: clip;
  overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(6, 43, 101, 0.06), rgba(255, 255, 255, 0) 34%),
    var(--bg);
  -webkit-overflow-scrolling: touch;
}

.login-panel {
  --login-x: 18px;
  width: 100%;
  max-width: 430px;
  overflow-x: clip;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 30px var(--login-x) 0;
  background: var(--surface);
}

.login-hero {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.brand-mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.update-access-mark {
  position: relative;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

.update-access-mark::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 2px solid rgba(0, 140, 134, 0);
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.92);
  transition: opacity 120ms ease, transform 120ms ease;
}

.update-access-mark.is-holding::after {
  opacity: 1;
  border-color: rgba(0, 140, 134, 0.72);
  transform: scale(1);
  animation: updateAccessHoldPulse 1000ms ease-in-out infinite;
}

.login-heading {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.login-title {
  max-width: 100%;
  margin: 0;
  color: var(--navy);
  font-size: 24px;
  font-weight: 900;
  line-height: 1.16;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.login-copy {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.form-stack {
  display: grid;
  gap: 0;
}

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

.choice-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.login-form-card .choice-field {
  gap: 0;
}

.login-form-card .choice-field > .field-label {
  display: inline-block;
  margin-bottom: 12px;
}

.field-label {
  color: var(--navy);
  font-size: 13px;
  font-weight: var(--control-weight);
  line-height: 1.25;
}

.field-label-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.field-label-row small {
  color: var(--faint);
  font-size: 11px;
  font-weight: 720;
  line-height: 1.2;
  white-space: nowrap;
}

.login-form-card {
  display: grid;
  gap: 14px;
  padding: 15px;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #fbfcff);
  box-shadow: var(--shadow-xs);
}

.login-existing-note {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 10px 11px;
  border: 1px solid rgba(0, 140, 134, 0.18);
  border-radius: 14px;
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.login-existing-note .icon {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  stroke-width: 2.4;
}

.login-existing-note span {
  min-width: 0;
  color: var(--teal-deep);
  font-size: 12px;
  font-weight: 740;
  line-height: 1.35;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.input::placeholder,
.textarea::placeholder,
.search-input::placeholder {
  color: #8a94a3;
  font-weight: 560;
}

.input,
.select {
  min-height: 50px;
  padding: 0 13px;
}

.select {
  appearance: none;
  overflow: hidden;
  padding-right: 42px;
  background-image:
    linear-gradient(45deg, transparent 50%, #6e7784 50%),
    linear-gradient(135deg, #6e7784 50%, transparent 50%);
  background-position:
    calc(100% - 19px) 50%,
    calc(100% - 13px) 50%;
  background-repeat: no-repeat;
  background-size: 6px 6px, 6px 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.textarea {
  min-height: 84px;
  padding: 12px 13px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.login-panel .field {
  scroll-margin-bottom: 180px;
}

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

.choice-pill {
  position: relative;
  min-width: 0;
}

.choice-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.choice-pill span,
.choice-pill-body {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: #263143;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.2;
  text-align: center;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    color 140ms ease;
}

.choice-pill-body.has-caption {
  flex-direction: column;
  gap: 2px;
  padding-top: 5px;
  padding-bottom: 5px;
}

.choice-pill-body b {
  display: block;
  max-width: 100%;
  overflow: hidden;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.choice-pill-body small {
  display: block;
  color: inherit;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.1;
}

.choice-pill.is-disabled {
  cursor: not-allowed;
}

.choice-pill.is-disabled .choice-pill-body {
  border-color: #e4e9f0;
  background: #f8fafc;
  color: var(--faint);
  box-shadow: none;
}

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

.duty-choice-grid .choice-pill span {
  min-height: 46px;
}

.choice-input:checked + span {
  border-color: rgba(0, 140, 134, 0.42);
  background: var(--teal-soft);
  color: var(--teal-deep);
  box-shadow: 0 0 0 2px rgba(0, 140, 134, 0.08);
  font-weight: 850;
}

.choice-input:focus-visible + span {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn,
.danger-confirm-btn,
.icon-btn,
.small-btn,
.tab-btn,
.bottom-nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap-target);
  border-radius: var(--radius);
  font-size: var(--control-font);
  font-weight: var(--control-weight);
  line-height: 1;
  letter-spacing: 0;
}

.primary-btn {
  width: 100%;
  min-height: 52px;
  background: var(--teal);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(0, 140, 134, 0.18);
  font-weight: var(--control-weight-strong);
}

.primary-btn:not(:disabled):hover {
  background: var(--teal-deep);
  box-shadow: 0 12px 26px rgba(0, 140, 134, 0.23);
}

.primary-btn:not(:disabled):active,
.secondary-btn:not(:disabled):active {
  transform: translateY(1px);
}

.secondary-btn {
  background: #ffffff;
  color: var(--navy);
  border: 1px solid var(--line-strong);
  font-weight: var(--control-weight-strong);
}

.secondary-btn:not(:disabled):hover,
.icon-btn:not(:disabled):hover,
.history-edit-btn:not(:disabled):hover {
  border-color: rgba(6, 43, 101, 0.28);
  background: #f8fafc;
}

.ghost-btn {
  min-height: var(--tap-target);
  background: transparent;
  color: var(--muted);
}

.ghost-btn:not(:disabled):hover {
  background: rgba(6, 43, 101, 0.06);
  color: var(--navy);
}

.login-actions {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 12px calc(var(--login-x) * -1) 0;
  padding: 10px var(--login-x) calc(18px + var(--safe-bottom));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0), #ffffff 24%),
    #ffffff;
}

.login-actions.has-secondary {
  grid-template-columns: minmax(92px, 0.72fr) minmax(0, 1fr);
}

.login-actions .primary-btn,
.login-actions .secondary-btn {
  min-height: 52px;
  border-radius: 14px;
}

.danger-btn {
  background: var(--red-soft);
  color: var(--red);
}

.danger-btn:not(:disabled):hover,
.history-delete-btn:not(:disabled):hover {
  background: #ffe5e5;
}

.danger-confirm-btn {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 15px;
  background: var(--red);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(218, 72, 72, 0.22);
  font-weight: var(--control-weight-strong);
}

.danger-confirm-btn .icon {
  width: 19px;
  height: 19px;
  stroke-width: 2.5;
}

.danger-confirm-btn:not(:disabled):hover {
  background: #bd3030;
  box-shadow: 0 14px 28px rgba(218, 72, 72, 0.28);
}

.danger-confirm-btn:not(:disabled):active {
  transform: translateY(1px);
}

.primary-btn.is-loading,
.secondary-btn.is-loading,
.danger-btn.is-loading,
.danger-confirm-btn.is-loading,
.ghost-btn.is-loading,
.small-btn.is-loading {
  cursor: progress;
  pointer-events: none;
}

.button-spinner {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 999px;
  opacity: 0.88;
  animation: busySpin 780ms linear infinite;
}

form.is-submitting {
  cursor: progress;
}

form.is-submitting :is(input, select, textarea):disabled {
  opacity: 0.72;
}

.small-btn {
  min-height: var(--tap-target);
  padding: 0 11px;
  background: var(--surface-soft);
  color: var(--navy);
  font-size: 13px;
}

.small-btn:not(:disabled):hover {
  background: #e7eef6;
}

.icon-btn {
  width: var(--tap-target);
  min-width: var(--tap-target);
  min-height: var(--tap-target);
  background: #ffffff;
  color: var(--navy);
  border: 1px solid var(--line);
}

.icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  gap: 10px;
  overflow-x: clip;
  margin: calc(var(--page-y) * -1) calc(var(--page-x) * -1) 0;
  padding: calc(var(--page-y) + var(--safe-top)) var(--page-x) 12px;
  border-bottom: 1px solid rgba(196, 206, 218, 0.54);
  background: rgba(245, 247, 251, 0.96);
  backdrop-filter: blur(18px);
}

.topbar-simple {
  padding-bottom: 12px;
}

.topbar-simple + #main-view {
  padding-top: 16px;
}

.topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
}

.brand-emblem {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.brand-emblem .icon {
  width: 28px;
  height: 28px;
}

.brand-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.app-title {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.app-title h1 {
  margin: 0;
  color: var(--navy);
  font-size: 17px;
  font-weight: var(--control-weight-strong);
  line-height: 1.16;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.app-title p {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #3d4a5c;
  font-size: 12px;
  font-weight: 560;
  line-height: 1.32;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-chip {
  width: 44px;
  max-width: 44px;
  min-height: 44px;
  padding: 0;
  position: relative;
  border: 0;
  background: transparent;
  color: var(--navy);
  box-shadow: none;
}

.profile-chip:not(:disabled):hover {
  background: rgba(6, 43, 101, 0.06);
}

.profile-chip span:not(.notify-badge) {
  display: none;
}

.profile-chip .icon {
  width: 25px;
  height: 25px;
}

.notify-badge {
  position: absolute;
  top: 4px;
  right: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--navy);
  color: #ffffff;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
}

.search-row {
  position: relative;
}

.search-row > .icon {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 22px;
  height: 22px;
  transform: translateY(-50%);
  color: #6e7784;
}

.search-input {
  width: 100%;
  min-height: 48px;
  padding: 0 15px 0 46px;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink);
  font-size: 16px;
  font-weight: 560;
  outline: none;
  box-shadow: var(--shadow-xs);
}

.search-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--focus-ring), 0 8px 22px rgba(6, 43, 101, 0.05);
}

.tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: #eef3f8;
}

.tab-btn {
  min-width: 0;
  min-height: 40px;
  border-radius: 10px;
  background: transparent;
  color: #394150;
  font-size: var(--control-font);
  font-weight: var(--control-weight);
  border-bottom: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab-btn:not(.active):hover {
  background: rgba(255, 255, 255, 0.72);
  color: var(--navy);
}

.tab-btn.active {
  color: var(--navy);
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(6, 43, 101, 0.08);
  font-weight: var(--control-weight-strong);
}

.status-strip {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 14px 0;
}

.stat {
  min-width: 0;
  min-height: 64px;
  display: grid;
  align-content: center;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: var(--surface-raised);
  padding: 12px 10px;
  box-shadow: var(--shadow-xs);
}

.stat strong {
  display: block;
  overflow: hidden;
  color: var(--navy);
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

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

.section-head > * {
  min-width: 0;
}

.section-head h2 {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  font-weight: var(--control-weight-strong);
  line-height: 1.25;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.section-head p {
  margin: 3px 0 0;
  color: var(--faint);
  font-size: 11px;
  font-weight: 680;
  line-height: 1.25;
}

.section-head > span,
.section-head > .sync-pill {
  flex: 0 1 auto;
  max-width: 48%;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-heading {
  align-items: center;
  margin-top: 0;
}

.inventory-heading > div {
  flex: 1 1 auto;
  min-width: 0;
}

.inventory-work-section {
  display: grid;
  gap: 0;
  margin: 10px 0 14px;
  padding: 0;
}

.inventory-list-section {
  display: grid;
  gap: 0;
}

.inventory-list-section .inventory-heading {
  margin-top: 0;
}

.inventory-work-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.inventory-work-card {
  width: 100%;
  min-height: 50px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: #ffffff;
  color: inherit;
  text-align: left;
  box-shadow: var(--shadow-xs);
}

.inventory-work-card:not(:disabled):hover,
.inventory-work-card:active {
  border-color: rgba(0, 140, 134, 0.28);
  background: #f8fbff;
}

.inventory-work-card > .icon {
  display: none;
}

.inventory-work-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--blue-soft);
  color: var(--navy);
}

.inventory-work-icon .icon {
  width: 18px;
  height: 18px;
  stroke-width: 2.45;
}

.inventory-work-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.inventory-work-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-work-copy small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.3;
}

.inventory-work-card.needs-attention {
  border-color: rgba(180, 83, 9, 0.28);
  background: linear-gradient(180deg, #ffffff, #fffdf8);
}

.inventory-work-card.needs-attention .inventory-work-icon {
  background: var(--amber-soft);
  color: var(--amber);
}

.add-heading {
  margin-top: 14px;
  align-items: flex-start;
  justify-content: flex-start;
}

.add-item-btn {
  flex: 0 0 auto;
  width: auto;
  min-width: 106px;
  max-width: 42%;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid rgba(0, 140, 134, 0.26);
  border-radius: 14px;
  background: #ffffff;
  color: var(--teal-deep);
  font-size: 13px;
  font-weight: var(--control-weight-strong);
  box-shadow: var(--shadow-xs);
}

.add-item-btn span {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.add-item-btn:not(:disabled):hover {
  border-color: rgba(0, 140, 134, 0.36);
  background: var(--teal-soft);
  color: var(--teal-deep);
  box-shadow: 0 8px 18px rgba(0, 140, 134, 0.12);
}

.add-item-btn:not(:disabled):active {
  background: var(--teal-soft);
  box-shadow: 0 4px 12px rgba(0, 140, 134, 0.1);
}

.add-item-btn .icon {
  width: 18px;
  height: 18px;
  padding: 2px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-deep);
  box-sizing: content-box;
  stroke-width: 2.8;
}

.inventory-table {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.inventory-table-head,
.item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 20px;
  grid-template-rows: auto auto;
  align-items: center;
}

.inventory-table-head > span,
.item-row > * {
  min-width: 0;
}

.inventory-table-head {
  display: none;
}

.inventory-table-head span:nth-child(2),
.inventory-table-head span:nth-child(3) {
  text-align: center;
}

.inventory-table-head span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-list,
.history-list {
  display: grid;
}

.inventory-list {
  gap: 10px;
}

.item-row,
.history-row,
.empty-state {
  width: 100%;
  background: #ffffff;
}

.item-row {
  min-height: 76px;
  gap: 4px 10px;
  padding: 13px 12px 13px 14px;
  text-align: left;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  color: inherit;
  box-shadow: var(--shadow-xs);
}

.inventory-list .item-row:last-child {
  border-bottom: 1px solid var(--card-border);
}

.item-row:active {
  background: #f8fbff;
  border-color: rgba(0, 140, 134, 0.26);
}

.item-row:not(:disabled):hover {
  background: #f8fbff;
}

.item-row:focus-visible,
.inventory-work-card:focus-visible,
.subview-back-btn:focus-visible,
.group-stock-row:focus-visible,
.shortage-main:focus-visible,
.report-insight-card:focus-visible,
.report-row:focus-visible,
.history-filter-bar button:focus-visible,
.history-mine-toggle:focus-visible,
.user-action-card:focus-visible,
.utility-card:focus-visible {
  outline-offset: -3px;
}

.item-main {
  min-width: 0;
  grid-column: 1;
  grid-row: 1 / span 2;
  padding-right: 8px;
}

.item-title-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.warehouse-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
}

.warehouse-dot.a {
  background: var(--teal);
}

.warehouse-dot.b {
  background: #2563eb;
}

.warehouse-dot.c {
  background: #7c3aed;
}

.warehouse-dot.group {
  width: 9px;
  height: 9px;
  background: var(--navy);
  box-shadow: 0 0 0 4px rgba(6, 43, 101, 0.08);
}

.item-name {
  min-width: 0;
  overflow: hidden;
  color: #111111;
  font-size: 15.5px;
  font-weight: var(--control-weight-strong);
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
  line-height: 1.25;
}

.item-meta span {
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 6px;
  background: #f3f6fa;
}

.item-note {
  color: var(--faint);
}

.quantity {
  min-width: 0;
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  text-align: right;
}

.quantity strong {
  display: block;
  color: var(--navy);
  font-size: 21px;
  font-weight: var(--control-weight-strong);
  line-height: 1;
}

.unit-cell {
  overflow: hidden;
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  color: #202734;
  font-size: 12px;
  font-weight: 680;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-chevron {
  display: flex;
  grid-column: 3;
  grid-row: 1 / span 2;
  justify-content: flex-end;
  align-self: center;
  color: #7d8794;
}

.item-chevron .icon {
  width: 18px;
  height: 18px;
}

.inventory-subview-head {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 14px 0 12px;
  padding: 12px;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.inventory-subview-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.inventory-subview-icon .icon {
  width: 21px;
  height: 21px;
  stroke-width: 2.45;
}

.inventory-subview-head > div {
  min-width: 0;
}

.inventory-subview-head span:not(.inventory-subview-icon) {
  color: var(--teal-deep);
  font-size: 11px;
  font-weight: 820;
  line-height: 1.2;
}

.inventory-subview-head h2 {
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--navy);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-subview-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.subview-back-btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--navy);
  font-size: 12px;
  font-weight: 780;
  white-space: nowrap;
}

.subview-back-btn .icon {
  width: 16px;
  height: 16px;
}

.subview-back-btn:not(:disabled):hover {
  border-color: var(--line-strong);
  background: #f8fafc;
}

.low .quantity strong,
.low .item-name {
  color: var(--red);
}

.watch .quantity strong,
.watch .item-name {
  color: var(--amber);
}

.low-pill,
.watch-pill,
.ok-pill,
.sync-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: var(--control-weight-strong);
}

.low-pill {
  background: var(--red-soft);
  color: var(--red);
}

.watch-pill {
  background: var(--amber-soft);
  color: var(--amber);
}

.ok-pill {
  background: var(--green-soft);
  color: var(--green);
}

.group-pill {
  flex: 0 0 auto;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--navy);
  font-size: 11px;
  font-weight: var(--control-weight);
}

.group-row .item-name {
  color: var(--navy);
}

.group-meta span {
  border-radius: 6px;
  background: #f3f6fa;
  padding: 3px 7px;
}

.group-row {
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.sync-pill {
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.sync-pill.local {
  background: var(--amber-soft);
  color: var(--amber);
}

.history-summary-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  grid-template-areas:
    "copy count"
    "copy label";
  gap: 4px 12px;
  align-items: center;
  margin: 4px 0 8px;
  padding: 14px;
  border: 1px solid rgba(196, 206, 218, 0.72);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: var(--shadow-xs);
}

.history-summary-card > div {
  grid-area: copy;
  min-width: 0;
}

.history-summary-card span {
  display: block;
  color: var(--teal-deep);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
}

.history-summary-card h2,
.history-summary-card p {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-summary-card h2 {
  margin: 5px 0 6px;
  color: var(--navy);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: 0;
}

.history-summary-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.history-summary-card > strong {
  grid-area: count;
  min-height: 50px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--teal-soft);
  color: var(--teal-deep);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.history-summary-card > small {
  grid-area: label;
  justify-self: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
  line-height: 1.2;
}

.history-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.history-stat {
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 11px;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.history-stat strong {
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.history-stat span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
  line-height: 1.2;
}

.history-section-head {
  align-items: center;
  margin-top: 16px;
  margin-bottom: 8px;
}

.history-section-head > div {
  min-width: 0;
}

.history-filter-panel {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}

.history-filter-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.history-filter-bar button {
  min-width: 0;
  min-height: 42px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
  padding: 5px 3px;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
}

.history-filter-bar button.active {
  background: var(--navy);
  color: #ffffff;
}

.history-filter-bar span,
.history-filter-bar strong {
  display: block;
  line-height: 1.1;
}

.history-filter-bar span {
  font-size: 12px;
  font-weight: 820;
}

.history-filter-bar strong {
  font-size: 11px;
  font-weight: 850;
  opacity: 0.86;
}

.history-mine-toggle {
  width: 100%;
  min-height: 46px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: #ffffff;
  color: var(--navy);
  text-align: left;
  box-shadow: var(--shadow-xs);
}

.history-mine-toggle.active {
  border-color: rgba(0, 140, 134, 0.34);
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.history-mine-toggle .icon {
  width: 19px;
  height: 19px;
}

.history-mine-toggle span {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 830;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-mine-toggle strong {
  min-width: 26px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--navy);
  font-size: 12px;
  font-weight: 860;
}

.history-mine-toggle.active strong {
  background: #ffffff;
  color: var(--teal-deep);
}

.history-list {
  gap: 8px;
}

.history-load-more {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 10px 0 4px;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: #ffffff;
  color: var(--navy);
  font-size: 13px;
  font-weight: 820;
  box-shadow: var(--shadow-xs);
}

.history-load-more .icon {
  width: 17px;
  height: 17px;
  transform: rotate(90deg);
}

.history-load-more:not(:disabled):hover,
.history-load-more:not(:disabled):active {
  border-color: rgba(0, 140, 134, 0.28);
  background: #f8fbff;
}

.log-list {
  gap: 10px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.history-row {
  width: 100%;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 13px 14px;
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  box-shadow: var(--shadow-xs);
}

.history-row:hover {
  background: #f9fbfd;
}

.history-row:last-child {
  border-bottom: 1px solid var(--card-border);
}

.history-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--blue-soft);
  color: var(--navy);
}

.history-icon .icon {
  width: 20px;
  height: 20px;
  stroke-width: 2.3;
}

.history-icon.in {
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.history-icon.out {
  background: #eaf0fb;
  color: var(--navy);
}

.history-icon.adjust {
  background: var(--amber-soft);
  color: var(--amber);
}

.history-content {
  min-width: 0;
}

.history-line {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.history-title {
  min-width: 0;
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 780;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-title-warehouse {
  flex: 0 0 auto;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  border-radius: 7px;
  background: #eef2f6;
  color: #394150;
  font-size: 11px;
  font-weight: 830;
  line-height: 1;
}

.history-title-warehouse.a {
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.history-title-warehouse.b {
  background: #eff6ff;
  color: #1d4ed8;
}

.history-title-warehouse.c {
  background: #f5f3ff;
  color: #6d28d9;
}

.history-title-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-action {
  flex: 0 0 auto;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 760;
}

.history-tags {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.history-action.in {
  background: var(--green-soft);
  color: var(--green);
}

.history-action.out {
  background: var(--red-soft);
  color: var(--red);
}

.history-action.adjust {
  background: var(--blue-soft);
  color: var(--navy);
}

.history-amount {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 14px;
  font-weight: 760;
  line-height: 1;
}

.warehouse-chip {
  flex: 0 0 auto;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 6px;
  background: #eef2f6;
  color: #394150;
  font-size: 12px;
  font-weight: 720;
}

.warehouse-chip.a {
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.warehouse-chip.b {
  background: #eff6ff;
  color: #1d4ed8;
}

.warehouse-chip.c {
  background: #f5f3ff;
  color: #6d28d9;
}

.history-meta {
  min-width: 0;
  overflow: hidden;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-time {
  color: #4b5563;
  font-size: 12px;
  font-weight: 560;
  line-height: 1.25;
  white-space: nowrap;
}

.history-side {
  min-width: 0;
  display: grid;
  justify-items: end;
  gap: 6px;
}

.history-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.history-edit-btn,
.history-delete-btn {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--navy);
  font-size: 11px;
  font-weight: 780;
}

.history-delete-btn {
  border-color: rgba(218, 72, 72, 0.28);
  background: var(--red-soft);
  color: var(--red);
}

.history-edit-btn .icon,
.history-delete-btn .icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.4;
}

.history-edit-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

.history-edit-summary strong {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-edit-summary > span:last-child {
  color: var(--navy);
  font-size: 14px;
  font-weight: 850;
  white-space: nowrap;
}

.log-edit-sheet {
  background: var(--bg);
}

.log-edit-sheet .sheet-header {
  border-bottom-color: rgba(196, 206, 218, 0.66);
  background: rgba(245, 247, 251, 0.98);
}

.log-edit-body {
  gap: 12px;
}

.log-edit-summary-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 15px;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.log-edit-summary-card::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 0;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: var(--navy);
}

.log-edit-summary-card.in::before {
  background: var(--teal);
}

.log-edit-summary-card.adjust::before {
  background: var(--amber);
}

.log-edit-summary-card.out::before {
  background: var(--red);
}

.log-edit-summary-copy {
  min-width: 0;
}

.log-edit-summary-copy > span {
  display: block;
  color: var(--teal-deep);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.1;
}

.log-edit-summary-copy h4 {
  margin: 4px 0 5px;
  overflow: hidden;
  color: var(--ink);
  font-size: 17px;
  font-weight: 880;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-edit-summary-copy p {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-edit-amount {
  min-width: 0;
  display: grid;
  justify-items: end;
  gap: 7px;
}

.log-edit-amount strong {
  color: var(--navy);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.log-edit-notice {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(180, 83, 9, 0.2);
  border-radius: 16px;
  background: var(--amber-soft);
  color: var(--amber);
}

.log-edit-notice > .icon {
  width: 20px;
  height: 20px;
  margin: 2px auto 0;
}

.log-edit-notice strong {
  display: block;
  color: #7c2d12;
  font-size: 13px;
  font-weight: 860;
  line-height: 1.25;
}

.log-edit-notice p {
  margin: 4px 0 0;
  color: #92400e;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.log-edit-form {
  gap: 0;
}

.log-edit-form-card {
  display: grid;
  gap: 13px;
  padding: 15px;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.log-edit-form-card .textarea {
  min-height: 88px;
}

.log-edit-actions {
  margin-top: 2px;
}

.log-delete-sheet {
  background: var(--bg);
}

.log-delete-sheet .sheet-header {
  border-bottom-color: rgba(196, 206, 218, 0.66);
  background: rgba(245, 247, 251, 0.98);
}

.log-delete-body {
  gap: 12px;
}

.log-delete-summary-card .log-edit-summary-copy > span {
  color: var(--red);
}

.log-delete-warning {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 13px;
  border: 1px solid rgba(218, 72, 72, 0.22);
  border-radius: 16px;
  background: var(--red-soft);
  color: var(--red);
}

.log-delete-warning > .icon {
  width: 21px;
  height: 21px;
  margin: 2px auto 0;
  stroke-width: 2.5;
}

.log-delete-warning strong {
  display: block;
  color: #922525;
  font-size: 13px;
  font-weight: 880;
  line-height: 1.28;
}

.log-delete-warning p {
  margin: 5px 0 0;
  color: #a23434;
  font-size: 12px;
  font-weight: 660;
  line-height: 1.38;
}

.log-delete-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.log-delete-detail-grid > div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.log-delete-detail-grid > .wide {
  grid-column: 1 / -1;
}

.log-delete-detail-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
  line-height: 1.1;
}

.log-delete-detail-grid strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 13px;
  font-weight: 820;
  line-height: 1.28;
}

.log-delete-actions {
  margin-top: 2px;
}

.history-heading {
  margin-top: 2px;
}

.history-more-link {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.history-more-link .icon {
  width: 15px;
  height: 15px;
}

.sheet-log-list {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.sheet-log-list .history-row {
  grid-template-columns: 36px minmax(0, 1fr) auto;
  padding: 11px 0;
  width: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.sheet-log-list .history-icon {
  width: 32px;
  height: 32px;
}

.sheet-log-list .history-title {
  font-size: 14px;
  font-weight: 720;
}

.sheet-log-list .history-time {
  font-size: 11px;
}

.group-stock-list {
  display: grid;
  gap: 8px;
}

.group-stock-row {
  position: relative;
  width: 100%;
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  color: inherit;
  text-align: left;
  box-shadow: var(--shadow-xs);
}

.group-stock-row:active {
  background: #f8fafc;
}

.group-stock-row:not(:disabled):hover {
  border-color: rgba(6, 43, 101, 0.18);
  background: #f8fbff;
}

.group-stock-main {
  min-width: 0;
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.group-stock-main strong {
  color: var(--navy);
  font-size: 17px;
  font-weight: 820;
  line-height: 1;
}

.group-stock-sub {
  min-width: 0;
  grid-column: 1;
  grid-row: 2;
  overflow: hidden;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-stock-row.low .group-stock-main strong {
  color: var(--red);
}

.group-stock-row.watch .group-stock-main strong {
  color: var(--amber);
}

.group-stock-row > .item-chevron {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
}

.report-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin: 8px 0 12px;
  padding: 16px 15px 15px 18px;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

.report-hero::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 0;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: var(--teal);
}

.report-hero-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.report-hero h2 {
  margin: 5px 0 8px;
  color: var(--navy);
  font-size: 25px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0;
}

.report-hero p {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: #3d4a5c;
  font-size: 11.5px;
  font-weight: 760;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-eyebrow {
  display: inline-flex;
  margin: 0;
  color: var(--teal-deep);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
}

.report-score {
  position: relative;
  z-index: 1;
  width: 78px;
  min-height: 68px;
  display: grid;
  align-content: center;
  place-items: center;
  justify-self: end;
  border-radius: 18px;
  background: var(--teal-soft);
}

.report-score strong {
  color: var(--teal-deep);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.report-score span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
  line-height: 1.2;
  white-space: nowrap;
}

.report-hero-actions {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.report-hero-actions .secondary-btn,
.report-hero-actions .ghost-btn {
  min-height: 44px;
  border-radius: 13px;
  font-size: 13px;
}

.report-hero-actions .ghost-btn {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--navy);
}

.report-hero-actions .icon {
  width: 18px;
  height: 18px;
}

.report-status-strip {
  gap: 6px;
  margin: 0 0 10px;
  padding: 8px;
  border: 1px solid var(--card-border);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.report-status-strip .stat {
  min-height: 58px;
  display: grid;
  align-content: center;
  padding: 10px 8px;
  border: 0;
  border-radius: 12px;
  background: #f6f8fb;
  box-shadow: none;
}

.report-status-strip .stat:nth-child(1) {
  background: var(--amber-soft);
}

.report-status-strip .stat:nth-child(2) {
  background: var(--blue-soft);
}

.report-status-strip .stat:nth-child(3) {
  background: var(--green-soft);
}

.report-status-strip .stat:nth-child(1) strong {
  color: var(--amber);
}

.report-status-strip .stat:nth-child(2) strong {
  color: var(--navy);
}

.report-status-strip .stat:nth-child(3) strong {
  color: var(--green);
}

.report-status-strip + .section-head {
  margin-top: 4px;
}

.report-insight-card {
  width: 100%;
  min-height: 76px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 18px;
  gap: 12px;
  align-items: center;
  margin: 0 0 18px;
  padding: 12px;
  border: 1px solid var(--card-border);
  border-radius: 18px;
  background: #ffffff;
  color: var(--navy);
  text-align: left;
  box-shadow: var(--shadow-xs);
}

.report-insight-card:not(article):not(:disabled):hover,
.report-insight-card:not(article):not(:disabled):active {
  border-color: rgba(0, 140, 134, 0.28);
  background: #f8fbff;
}

.report-insight-card.low {
  border-color: rgba(180, 35, 24, 0.24);
}

.report-insight-card.watch {
  border-color: rgba(180, 83, 9, 0.26);
}

.report-insight-card.calm {
  grid-template-columns: 42px minmax(0, 1fr);
}

.report-insight-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--blue-soft);
  color: var(--navy);
}

.report-insight-card.low .report-insight-icon {
  background: var(--red-soft);
  color: var(--red);
}

.report-insight-card.watch .report-insight-icon {
  background: var(--amber-soft);
  color: var(--amber);
}

.report-insight-card.calm .report-insight-icon {
  background: var(--green-soft);
  color: var(--green);
}

.report-insight-card > span {
  min-width: 0;
}

.report-insight-card small,
.report-insight-card strong,
.report-insight-card em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-insight-card small {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 820;
  line-height: 1.15;
}

.report-insight-card strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.2;
}

.report-insight-card em {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 650;
  line-height: 1.2;
}

.report-insight-card .icon {
  width: 21px;
  height: 21px;
}

.report-list {
  display: grid;
  gap: 10px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.report-list + .section-head {
  margin-top: 24px;
}

.report-row {
  width: 100%;
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 18px;
  gap: 12px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: #ffffff;
  color: var(--navy);
  text-align: left;
  box-shadow: var(--shadow-xs);
}

.report-row:not(:disabled):hover,
.report-row:not(:disabled):active {
  border-color: rgba(0, 140, 134, 0.26);
  background: #f8fbff;
}

.report-row:last-child {
  border-bottom: 1px solid var(--card-border);
}

.report-row strong,
.profile-panel h2 {
  display: block;
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 820;
  line-height: 1.25;
}

.report-row > div {
  min-width: 0;
}

.report-row span,
.profile-panel p {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-row b {
  color: var(--navy);
  font-size: 18px;
  font-weight: 850;
  white-space: nowrap;
}

.report-row b.danger {
  color: var(--red);
}

.report-row b.watch {
  color: var(--amber);
}

.report-row .icon {
  width: 18px;
  height: 18px;
  color: var(--faint);
}

.report-priority-head {
  align-items: center;
}

.report-filter {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.report-filter button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  white-space: nowrap;
}

.report-filter button.active {
  background: var(--navy);
  color: #ffffff;
}

.shortage-list,
.report-activity {
  display: grid;
  gap: 8px;
}

.shortage-list + .section-head {
  margin-top: 22px;
}

.shortage-row {
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.shortage-row.low {
  border-color: rgba(180, 35, 24, 0.26);
}

.shortage-row.watch {
  border-color: rgba(180, 83, 9, 0.28);
}

.shortage-main {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  padding: 12px 12px 10px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.shortage-main strong {
  min-width: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 820;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shortage-meta {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shortage-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 0 10px 10px;
}

.shortage-status button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.shortage-status button:not(.active):hover,
.reason-grid button:not(.active):hover,
.action-toggle button:not(.active):hover {
  border-color: var(--line-strong);
  background: #f8fafc;
  color: var(--navy);
}

.shortage-status button.active {
  border-color: rgba(0, 140, 134, 0.38);
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.activity-row {
  min-height: 64px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.activity-row strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-row span,
.activity-row time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.service-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin: 8px 0 12px;
  padding: 16px;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: var(--shadow-xs);
}

.service-hero > div:first-child {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.service-hero span {
  display: block;
  color: var(--teal-deep);
  font-size: 12px;
  font-weight: 860;
  line-height: 1.2;
}

.service-hero h2 {
  margin: 0;
  color: var(--navy);
  font-size: 24px;
  font-weight: 920;
  line-height: 1.12;
}

.service-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.42;
}

.service-hero .primary-btn {
  min-width: 116px;
  min-height: 50px;
  padding: 0 14px;
  border-radius: 15px;
  white-space: nowrap;
}

.service-hero-actions {
  display: grid;
  gap: 8px;
  min-width: 128px;
}

.service-hero-actions .secondary-btn {
  min-height: 48px;
  padding: 0 14px;
  border-radius: 15px;
  white-space: nowrap;
}

.service-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.service-stat-grid div {
  min-width: 0;
  min-height: 66px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.service-stat-grid strong {
  color: var(--ink);
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
}

.service-stat-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
  line-height: 1.2;
}

.service-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 10px;
  padding: 5px;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.service-mode-tabs button {
  min-height: 44px;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 860;
}

.service-mode-tabs button.active {
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.service-filter-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid var(--card-border);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.service-filter-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.field.compact {
  gap: 5px;
}

.field.compact .input,
.field.compact .select {
  min-height: 44px;
}

.service-filter-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: var(--bg);
}

.service-filter-bar button {
  min-width: 0;
  min-height: 44px;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 5px 6px;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
}

.service-filter-bar button.active {
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.service-filter-bar span {
  font-size: 12px;
  font-weight: 820;
  line-height: 1.1;
}

.service-filter-bar strong {
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.service-filter-clear {
  width: 100%;
  min-height: 46px;
  border-radius: 13px;
}

.service-summary-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 0;
  padding: 13px;
  border: 1px solid var(--card-border);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.service-summary-panel .section-head {
  margin: 0;
}

.service-summary-groups {
  display: grid;
  gap: 12px;
}

.service-summary-group {
  display: grid;
  gap: 7px;
}

.service-summary-group h3 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 860;
  line-height: 1.2;
}

.service-summary-list {
  display: grid;
  gap: 7px;
}

.service-summary-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 52px;
  padding: 9px 10px;
  border: 1px solid rgba(196, 206, 218, 0.62);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.88);
}

.service-summary-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--navy);
}

.service-summary-icon .icon {
  width: 18px;
  height: 18px;
}

.service-summary-row span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.service-summary-row strong,
.service-summary-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-summary-row strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 860;
  line-height: 1.2;
}

.service-summary-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
}

.service-summary-empty {
  margin: 0;
  padding: 9px 10px;
  border-radius: 12px;
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.service-list-head {
  margin: 2px 0 8px;
}

.service-summary-screen {
  display: grid;
  gap: 10px;
}

.service-report-export-btn {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
}

.service-review-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
  padding: 14px;
  border: 1px solid rgba(0, 140, 134, 0.2);
  border-radius: 16px;
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.service-review-card strong {
  display: block;
  color: var(--teal-deep);
  font-size: 13px;
  font-weight: 880;
  line-height: 1.25;
}

.service-review-card p {
  margin: 4px 0 0;
  color: #0f766e;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.42;
}

.service-list {
  display: grid;
  gap: 10px;
}

.service-row {
  width: 100%;
  min-width: 0;
  min-height: 84px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: #ffffff;
  color: inherit;
  text-align: left;
  box-shadow: var(--shadow-xs);
}

.service-row:hover,
.service-row:active {
  border-color: rgba(0, 140, 134, 0.24);
  background: #f9fbfd;
}

.service-row.is-stale {
  border-color: rgba(180, 83, 9, 0.3);
  background: #fffaf4;
}

.service-row-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--blue-soft);
  color: var(--navy);
}

.service-row-icon .icon {
  width: 21px;
  height: 21px;
  stroke-width: 2.35;
}

.service-row-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.service-row-main strong,
.service-row-main small,
.service-row-main em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-row-main strong {
  color: var(--ink);
  font-size: 14px;
  font-style: normal;
  font-weight: 840;
  line-height: 1.25;
}

.service-row-main small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.32;
}

.service-row-main em {
  color: var(--teal-deep);
  font-size: 12px;
  font-style: normal;
  font-weight: 760;
  line-height: 1.32;
}

.service-status {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--navy);
  font-size: 11px;
  font-weight: 860;
  line-height: 1;
  white-space: nowrap;
}

.service-status.pending {
  background: var(--amber-soft);
  color: var(--amber);
}

.service-status.approved {
  background: var(--green-soft);
  color: var(--green);
}

.service-status.partial {
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.service-status.rejected,
.service-status.canceled {
  background: var(--red-soft);
  color: var(--red);
}

.service-work-sheet,
.service-detail-sheet {
  background: var(--bg);
}

.service-work-sheet .sheet-header,
.service-detail-sheet .sheet-header {
  border-bottom-color: rgba(196, 206, 218, 0.66);
  background: rgba(245, 247, 251, 0.98);
}

.service-work-form-body,
.service-detail-body {
  gap: 14px;
}

.service-work-form {
  display: grid;
  gap: 14px;
}

.service-department-field {
  min-width: 0;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.service-department-field legend {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 790;
}

.service-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.service-participant-input-list {
  display: grid;
  gap: 12px;
}

.service-participant-input-row {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr) minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: #ffffff;
}

.service-participant-input-row .field {
  min-width: 0;
}

.service-participant-input-row.is-duplicate {
  border-color: rgba(217, 119, 6, 0.38);
  background: #fffbeb;
}

.service-remove-participant {
  width: 44px;
  min-height: 44px;
  border-radius: 13px;
  color: var(--red);
}

.service-add-participant-btn {
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
}

.service-participant-warning {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: -2px 0 0;
  padding: 9px 10px;
  border: 1px solid rgba(217, 119, 6, 0.22);
  border-radius: 13px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.35;
}

.service-participant-warning[hidden] {
  display: none;
}

.service-participant-warning .icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.service-detail-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.service-detail-summary div {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 13px;
  border: 1px solid var(--card-border);
  border-radius: 15px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.service-detail-summary .wide {
  grid-column: 1 / -1;
}

.service-detail-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.service-detail-summary strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 790;
  line-height: 1.45;
}

.service-detail-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.service-timeline-card {
  display: grid;
  gap: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.service-timeline-details > summary {
  list-style: none;
}

.service-timeline-details > summary::-webkit-details-marker {
  display: none;
}

.service-timeline-summary {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 10px;
  align-items: center;
  padding: 14px;
  cursor: pointer;
}

.service-timeline-summary span:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.service-timeline-summary strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 880;
  line-height: 1.2;
}

.service-timeline-summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.25;
}

.service-timeline-chevron {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--bg);
  color: var(--faint);
  transition: transform 140ms ease, color 140ms ease;
}

.service-timeline-chevron .icon {
  width: 17px;
  height: 17px;
}

.service-timeline-details[open] .service-timeline-chevron {
  color: var(--navy);
  transform: rotate(90deg);
}

.service-timeline-list {
  display: grid;
  gap: 8px;
  padding: 0 14px 14px;
}

.service-timeline-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(196, 206, 218, 0.62);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.88);
}

.service-timeline-dot {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--navy);
}

.service-timeline-item.done .service-timeline-dot {
  background: var(--green-soft);
  color: var(--green);
}

.service-timeline-dot .icon {
  width: 18px;
  height: 18px;
}

.service-timeline-item span:last-of-type {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.service-timeline-item strong,
.service-timeline-item small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-timeline-item strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 860;
  line-height: 1.2;
}

.service-timeline-item small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
}

.service-timeline-item time {
  grid-column: 2;
  margin-top: -2px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 680;
  line-height: 1.2;
}

.service-event-list {
  display: grid;
  gap: 8px;
  padding: 0 14px 14px;
}

.service-event-item {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 10px;
  border-radius: 13px;
  background: var(--bg);
}

.service-event-type {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--teal-deep);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.service-event-item span:last-of-type {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.service-event-item strong,
.service-event-item small,
.service-event-item em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-event-item strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 820;
}

.service-event-item small,
.service-event-item em,
.service-event-item time {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  font-style: normal;
}

.service-event-item time {
  grid-column: 2;
  color: var(--faint);
}

.service-flow-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(0, 140, 134, 0.18);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.service-flow-card.checked {
  border-color: rgba(0, 140, 134, 0.24);
  background: linear-gradient(180deg, #ffffff, #f4fbfa);
}

.service-flow-card.completed {
  border-color: rgba(22, 163, 74, 0.22);
  background: linear-gradient(180deg, #ffffff, #f4fbf7);
}

.service-flow-main {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.service-flow-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--amber-soft);
  color: var(--amber);
}

.service-flow-card.checked .service-flow-icon {
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.service-flow-card.completed .service-flow-icon {
  background: var(--green-soft);
  color: var(--green);
}

.service-flow-icon .icon {
  width: 21px;
  height: 21px;
  stroke-width: 2.5;
}

.service-flow-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.service-flow-copy small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
  line-height: 1.1;
}

.service-flow-copy strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.18;
}

.service-flow-copy em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 650;
  line-height: 1.42;
}

.service-flow-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.service-flow-meta span {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid rgba(196, 206, 218, 0.62);
  border-radius: 11px;
  background: rgba(248, 250, 252, 0.88);
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.15;
}

.service-flow-meta strong {
  color: var(--navy);
  font-size: 12px;
  font-weight: 890;
  white-space: nowrap;
}

.service-status-actions {
  display: grid;
  gap: 9px;
}

.service-status-actions.is-single {
  grid-template-columns: 1fr;
}

.service-status-actions.is-pair {
  grid-template-columns: 0.86fr 1.14fr;
}

.service-status-actions button,
.service-detail-actions button {
  min-height: 50px;
  border-radius: 14px;
}

.service-participant-head {
  margin: 6px 0 0;
}

.service-participant-list {
  display: grid;
  gap: 12px;
}

.service-participant-group {
  display: grid;
  gap: 9px;
}

.service-participant-group-head {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.service-participant-group-head strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 860;
}

.service-participant-group-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.service-participant-group-list {
  display: grid;
  gap: 9px;
}

.service-participant-card {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.service-participant-card.approved {
  border-color: rgba(22, 163, 74, 0.2);
}

.service-participant-card.rejected {
  border-color: rgba(220, 38, 38, 0.2);
}

.service-participant-main {
  min-width: 0;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.service-participant-main .profile-initial {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  font-size: 16px;
}

.service-participant-main div {
  min-width: 0;
}

.service-participant-main strong,
.service-participant-main small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-participant-main strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 840;
  line-height: 1.25;
}

.service-participant-main small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
}

.service-participant-main b {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 11px;
  font-weight: 880;
  line-height: 1;
  white-space: nowrap;
}

.service-participant-card.approved .service-participant-main b {
  background: var(--green-soft);
  color: var(--green);
}

.service-participant-card.rejected .service-participant-main b {
  background: var(--red-soft);
  color: var(--red);
}

.service-approval-meta {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.service-approval-meta.danger {
  color: var(--red);
}

.service-approval-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-top: 2px;
}

.service-approval-controls button {
  min-height: 46px;
  border-radius: 14px;
}

.service-template-sheet {
  background: var(--bg);
}

.service-template-sheet .sheet-header {
  border-bottom-color: rgba(196, 206, 218, 0.66);
  background: rgba(245, 247, 251, 0.98);
}

.service-template-body,
.service-template-form {
  display: grid;
  gap: 14px;
}

.service-template-new-btn {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
}

.service-template-list {
  display: grid;
  gap: 10px;
}

.service-template-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.service-template-row.inactive {
  background: rgba(248, 250, 252, 0.82);
  color: var(--muted);
}

.service-template-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--blue-soft);
  color: var(--navy);
}

.service-template-row.inactive .service-template-icon {
  background: var(--amber-soft);
  color: var(--amber);
}

.service-template-icon .icon {
  width: 20px;
  height: 20px;
}

.service-template-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.service-template-main strong,
.service-template-main small,
.service-template-main em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-template-main strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 840;
  line-height: 1.25;
}

.service-template-main small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.32;
}

.service-template-main em {
  color: var(--teal-deep);
  font-size: 12px;
  font-style: normal;
  font-weight: 760;
  line-height: 1.32;
}

.service-template-actions {
  display: flex;
  gap: 8px;
}

.service-template-actions .icon-btn {
  min-width: 44px;
  min-height: 44px;
}

.toggle-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: var(--bg);
}

.toggle-row span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.toggle-row strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 840;
}

.toggle-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.toggle-row input {
  width: 22px;
  height: 22px;
  accent-color: var(--teal);
}

.service-template-form-actions {
  padding-top: 2px;
}

.service-edit-reset-notice {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 11px;
  border: 1px solid rgba(180, 83, 9, 0.24);
  border-radius: 14px;
  background: var(--amber-soft);
  color: var(--amber);
}

.service-edit-reset-notice .icon {
  width: 22px;
  height: 22px;
}

.service-edit-reset-notice span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.service-edit-reset-notice strong {
  color: #92400e;
  font-size: 13px;
  font-weight: 860;
}

.service-edit-reset-notice small {
  color: #9a5a12;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.service-complete-sheet {
  background: var(--bg);
}

.service-complete-sheet .sheet-header {
  border-bottom-color: rgba(196, 206, 218, 0.66);
  background: rgba(245, 247, 251, 0.98);
}

.service-complete-body {
  display: grid;
  gap: 12px;
}

.service-complete-summary {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 13px;
  border: 1px solid rgba(0, 140, 134, 0.2);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.service-complete-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.service-complete-icon .icon {
  width: 21px;
  height: 21px;
}

.service-complete-summary div {
  min-width: 0;
}

.service-complete-summary strong,
.service-complete-summary p {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-complete-summary strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 880;
  line-height: 1.25;
}

.service-complete-summary p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
}

.service-complete-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.service-complete-grid div {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 11px;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: #ffffff;
}

.service-complete-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
  line-height: 1.2;
}

.service-complete-grid strong {
  color: var(--navy);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
}

.service-complete-actions {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 8px;
}

.service-complete-actions button {
  min-height: 50px;
  border-radius: 15px;
}

.calendar-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin: 8px 0 12px;
  padding: 16px;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: var(--shadow-xs);
}

.calendar-hero > div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.calendar-hero span {
  color: var(--teal-deep);
  font-size: 12px;
  font-weight: 860;
  line-height: 1.2;
}

.calendar-hero h2 {
  margin: 0;
  overflow: hidden;
  color: var(--navy);
  font-size: 24px;
  font-weight: 920;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.42;
}

.calendar-hero-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.calendar-hero .primary-btn {
  width: auto;
  min-height: 50px;
  padding: 0 14px;
  border-radius: 15px;
  white-space: nowrap;
}

.calendar-hero .primary-btn {
  min-width: 112px;
}

.calendar-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.calendar-stat-grid div {
  min-width: 0;
  min-height: 64px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.calendar-stat-grid strong {
  color: var(--ink);
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
}

.calendar-stat-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
  line-height: 1.2;
}

.calendar-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--card-border);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.calendar-toolbar {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: center;
}

.calendar-toolbar strong {
  min-width: 0;
  overflow: hidden;
  color: var(--navy);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-today-btn {
  width: 100%;
  min-height: 44px;
  border-radius: 13px;
}

.calendar-filter-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: var(--bg);
}

.calendar-filter-bar button {
  min-width: 0;
  min-height: 44px;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 5px 3px;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
}

.calendar-filter-bar button.active {
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.calendar-filter-bar span,
.calendar-filter-bar strong {
  display: block;
  line-height: 1.1;
}

.calendar-filter-bar span {
  font-size: 11px;
  font-weight: 820;
}

.calendar-filter-bar strong {
  font-size: 11px;
  font-weight: 900;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.calendar-grid {
  display: grid;
  gap: 8px;
}

.calendar-weekdays span {
  min-height: 22px;
  display: grid;
  place-items: center;
  color: var(--faint);
  font-size: 11px;
  font-weight: 820;
  line-height: 1;
}

.calendar-week {
  display: grid;
  gap: 3px;
}

.calendar-week-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.calendar-day {
  min-width: 0;
  min-height: 56px;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 3px;
  padding: 7px 3px 5px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #f8fafc;
  color: var(--ink);
}

.calendar-day.is-empty {
  min-height: 56px;
  border: 0;
  background: transparent;
}

.calendar-day span {
  min-width: 24px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 840;
  line-height: 1;
}

.calendar-day i {
  min-height: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-style: normal;
}

.calendar-day i b {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--line-strong);
}

.calendar-day i b.leave {
  background: var(--teal);
}

.calendar-day i b.special {
  background: var(--amber);
}

.calendar-day i b.meeting {
  background: var(--navy);
}

.calendar-day-events {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 2px;
  font-style: normal;
}

.calendar-day-events b {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  display: block;
  padding: 3px 4px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 9px;
  font-weight: 850;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-day-events b.meeting {
  background: var(--blue-soft);
  color: var(--navy);
}

.calendar-day-events b.more {
  padding: 0;
  background: transparent;
  color: var(--faint);
  font-size: 10px;
}

.calendar-day.has-events {
  background: #ffffff;
  border-color: rgba(196, 206, 218, 0.78);
}

.calendar-day.today span {
  background: var(--blue-soft);
  color: var(--navy);
}

.calendar-day.selected {
  border-color: rgba(0, 140, 134, 0.34);
  background: var(--teal-soft);
  box-shadow: 0 0 0 2px rgba(0, 140, 134, 0.08);
}

.calendar-day.selected span {
  background: var(--teal);
  color: #ffffff;
}

.calendar-week-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-rows: 22px;
  gap: 3px 4px;
  min-width: 0;
}

.calendar-vacation-bar {
  min-width: 0;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 8px;
  border: 1px solid rgba(0, 140, 134, 0.2);
  border-radius: 999px;
  background: linear-gradient(180deg, #e7faf7, var(--teal-soft));
  color: var(--teal-deep);
  box-shadow: 0 3px 8px rgba(0, 140, 134, 0.08);
  text-align: left;
}

.calendar-vacation-bar::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  margin-right: 5px;
  border-radius: 999px;
  background: var(--teal);
}

.calendar-vacation-bar span {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-vacation-bar.start-1 { grid-column-start: 1; }
.calendar-vacation-bar.start-2 { grid-column-start: 2; }
.calendar-vacation-bar.start-3 { grid-column-start: 3; }
.calendar-vacation-bar.start-4 { grid-column-start: 4; }
.calendar-vacation-bar.start-5 { grid-column-start: 5; }
.calendar-vacation-bar.start-6 { grid-column-start: 6; }
.calendar-vacation-bar.start-7 { grid-column-start: 7; }
.calendar-vacation-bar.end-2 { grid-column-end: 2; }
.calendar-vacation-bar.end-3 { grid-column-end: 3; }
.calendar-vacation-bar.end-4 { grid-column-end: 4; }
.calendar-vacation-bar.end-5 { grid-column-end: 5; }
.calendar-vacation-bar.end-6 { grid-column-end: 6; }
.calendar-vacation-bar.end-7 { grid-column-end: 7; }
.calendar-vacation-bar.end-8 { grid-column-end: 8; }
.calendar-vacation-bar.lane-1 { grid-row: 1; }
.calendar-vacation-bar.lane-2 { grid-row: 2; }
.calendar-vacation-bar.lane-3 { grid-row: 3; }

.calendar-vacation-bar.continues-before {
  border-left-color: transparent;
  border-top-left-radius: 5px;
  border-bottom-left-radius: 5px;
}

.calendar-vacation-bar.continues-after {
  border-right-color: transparent;
  border-top-right-radius: 5px;
  border-bottom-right-radius: 5px;
}

.calendar-list-head {
  align-items: center;
  margin: 2px 0 8px;
}

.calendar-event-list {
  display: grid;
  gap: 10px;
}

.calendar-event-row {
  width: 100%;
  min-width: 0;
  min-height: 76px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: #ffffff;
  color: inherit;
  text-align: left;
  box-shadow: var(--shadow-xs);
}

.calendar-event-row:hover,
.calendar-event-row:active {
  border-color: rgba(0, 140, 134, 0.24);
  background: #f9fbfd;
}

.calendar-event-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--blue-soft);
  color: var(--navy);
}

.calendar-event-icon .icon {
  width: 21px;
  height: 21px;
  stroke-width: 2.35;
}

.calendar-event-row.leave .calendar-event-icon,
.calendar-event-icon.leave {
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.calendar-event-row.special .calendar-event-icon,
.calendar-event-icon.special {
  background: var(--amber-soft);
  color: var(--amber);
}

.calendar-event-row.meeting .calendar-event-icon,
.calendar-event-icon.meeting {
  background: var(--blue-soft);
  color: var(--navy);
}

.calendar-event-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.calendar-event-main strong,
.calendar-event-main small,
.calendar-event-main em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event-main strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 840;
  line-height: 1.25;
}

.calendar-event-main small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.32;
}

.calendar-event-main em {
  color: var(--teal-deep);
  font-size: 12px;
  font-style: normal;
  font-weight: 760;
  line-height: 1.32;
}

.calendar-event-badge {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--navy);
  font-size: 11px;
  font-weight: 860;
  line-height: 1;
  white-space: nowrap;
}

.calendar-event-row.leave .calendar-event-badge {
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.calendar-event-row.special .calendar-event-badge {
  background: var(--amber-soft);
  color: var(--amber);
}

.calendar-event-row.meeting .calendar-event-badge {
  background: var(--blue-soft);
  color: var(--navy);
}

.calendar-event-sheet,
.calendar-detail-sheet,
.calendar-delete-sheet {
  background: var(--bg);
}

.calendar-event-sheet .sheet-header,
.calendar-detail-sheet .sheet-header,
.calendar-delete-sheet .sheet-header {
  border-bottom-color: rgba(196, 206, 218, 0.66);
  background: rgba(245, 247, 251, 0.98);
}

.calendar-event-form-body,
.calendar-detail-body {
  gap: 14px;
}

.calendar-event-form {
  display: grid;
  gap: 14px;
}

.calendar-type-field {
  min-width: 0;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.calendar-type-field legend {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 790;
}

.calendar-type-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.calendar-vacation-title-hint {
  display: none;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.calendar-event-form.is-vacation .calendar-vacation-title-hint {
  display: block;
}

.calendar-event-form.is-vacation .calendar-vacation-hidden {
  display: none;
}

.calendar-detail-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.calendar-detail-summary div {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: #ffffff;
}

.calendar-detail-summary .wide {
  grid-column: 1 / -1;
}

.calendar-detail-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
  line-height: 1.2;
}

.calendar-detail-summary strong {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.calendar-permission-note {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--card-border);
  border-radius: 15px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.calendar-permission-note > span:first-child {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--surface-soft);
  color: var(--navy);
}

.calendar-permission-note.allowed > span:first-child {
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.calendar-permission-note.locked > span:first-child {
  background: var(--amber-soft);
  color: var(--amber);
}

.calendar-permission-note > span:last-child {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.calendar-permission-note strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
}

.calendar-permission-note small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.calendar-detail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.calendar-detail-actions.copy-only {
  grid-template-columns: 1fr;
}

.calendar-delete-action {
  grid-column: 1 / -1;
}

.calendar-detail-actions button {
  min-height: 50px;
  border-radius: 15px;
}

.calendar-delete-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.calendar-delete-card span:last-child {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.calendar-delete-card strong,
.calendar-delete-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-delete-card strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 840;
  line-height: 1.25;
}

.calendar-delete-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
}

.calendar-delete-actions {
  margin-top: 10px;
}

.profile-panel {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 18px 0 14px;
  padding: 14px;
  border: 1px solid var(--card-border);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.profile-avatar {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--blue-soft);
  color: var(--navy);
}

.profile-avatar .icon {
  width: 27px;
  height: 27px;
}

.utility-card {
  width: 100%;
  min-height: 60px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 20px;
  gap: 10px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: #ffffff;
  color: var(--navy);
  text-align: left;
  box-shadow: var(--shadow-xs);
}

.utility-card:not(:disabled):hover {
  border-color: rgba(6, 43, 101, 0.18);
  background: #f8fbff;
}

.utility-card span {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-profile-card {
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  margin: 6px 0 12px;
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.profile-initial {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--navy);
  color: #ffffff;
  font-size: 23px;
  font-weight: 880;
  line-height: 1;
}

.profile-summary {
  min-width: 0;
}

.profile-role-pill {
  width: fit-content;
  max-width: 100%;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 7px;
  padding: 0 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-deep);
  font-size: 11px;
  font-weight: 860;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.user-info-cell {
  min-width: 0;
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.user-info-cell span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
  line-height: 1.15;
}

.user-info-cell strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 820;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.permission-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid rgba(196, 206, 218, 0.82);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.permission-card.allowed {
  border-color: rgba(0, 140, 134, 0.26);
  background: linear-gradient(180deg, #ffffff, #f6fcfb);
}

.permission-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--blue-soft);
  color: var(--navy);
}

.permission-card.allowed .permission-icon {
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.permission-icon .icon {
  width: 22px;
  height: 22px;
}

.permission-card strong,
.permission-card p {
  min-width: 0;
  margin: 0;
}

.permission-card strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.25;
}

.permission-card p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.user-section-head {
  margin-top: 18px;
}

.user-action-list {
  display: grid;
  gap: 8px;
}

.user-action-card {
  width: 100%;
  min-height: 66px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 18px;
  gap: 11px;
  align-items: center;
  padding: 10px 13px;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: #ffffff;
  color: var(--navy);
  text-align: left;
  box-shadow: var(--shadow-xs);
}

.user-action-card:not(:disabled):hover {
  border-color: rgba(0, 140, 134, 0.28);
  background: #f8fbff;
}

.user-action-card:not(:disabled):active {
  transform: translateY(1px);
  border-color: rgba(0, 140, 134, 0.34);
  background: #f4fbfb;
}

.user-action-card.danger {
  color: var(--amber);
}

.user-action-card.danger:not(:disabled):hover,
.user-action-card.danger:not(:disabled):active {
  border-color: rgba(180, 83, 9, 0.28);
  background: #fffaf3;
}

.user-action-card > span {
  min-width: 0;
}

.user-action-card strong,
.user-action-card small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-action-card strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 830;
  line-height: 1.25;
}

.user-action-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
}

.user-action-card .icon {
  width: 21px;
  height: 21px;
}

.duty-capacity-sheet {
  background: var(--bg);
}

.duty-capacity-sheet .sheet-header {
  border-bottom-color: rgba(196, 206, 218, 0.66);
  background: rgba(245, 247, 251, 0.98);
}

.duty-capacity-body {
  gap: 12px;
}

.duty-capacity-summary {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(0, 140, 134, 0.22);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f6fcfb);
  box-shadow: var(--shadow-xs);
}

.duty-capacity-summary strong,
.duty-capacity-summary p {
  margin: 0;
}

.duty-capacity-summary strong {
  display: block;
  color: var(--ink);
  font-size: 22px;
  font-weight: 880;
  line-height: 1.1;
}

.duty-capacity-summary p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.35;
}

.duty-capacity-form {
  display: grid;
  gap: 10px;
}

.duty-capacity-row {
  padding: 12px;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.duty-capacity-row header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.duty-capacity-row strong,
.duty-capacity-row span {
  min-width: 0;
}

.duty-capacity-row header strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.25;
}

.duty-capacity-row header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.25;
  text-align: right;
}

.duty-capacity-input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.duty-capacity-input-grid.single {
  grid-template-columns: 1fr;
}

.duty-capacity-input {
  gap: 6px;
}

.duty-capacity-input .field-label-row small {
  color: var(--teal-deep);
  font-weight: 820;
}

.duty-capacity-input .input {
  min-height: 44px;
  text-align: center;
}

.duty-capacity-actions {
  margin-top: 2px;
}

.update-manage-sheet {
  min-height: min(640px, calc(100dvh - 14px));
  background: #ffffff;
}

.update-manage-sheet .sheet-header {
  border-bottom-color: rgba(196, 206, 218, 0.66);
  background: #ffffff;
}

.update-manage-body,
.update-manage-form {
  display: grid;
  gap: 12px;
}

.update-manage-summary {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(196, 206, 218, 0.62);
  border-radius: 14px;
  background: #f8fbff;
}

.update-manage-summary strong,
.update-manage-summary p {
  display: block;
  min-width: 0;
}

.update-manage-summary strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.25;
}

.update-manage-summary p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.update-required-toggle {
  min-height: 56px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: #ffffff;
}

.update-required-toggle input {
  width: 20px;
  height: 20px;
  accent-color: var(--teal);
}

.update-required-toggle span,
.update-required-toggle strong,
.update-required-toggle small {
  min-width: 0;
}

.update-required-toggle strong,
.update-required-toggle small {
  display: block;
}

.update-required-toggle strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 820;
  line-height: 1.25;
}

.update-required-toggle small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.32;
}

.update-manage-actions {
  margin-top: 2px;
}

.update-manage-clear {
  display: grid;
}

.update-manage-clear .danger-btn {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(180, 35, 24, 0.18);
  border-radius: 14px;
  font-size: 14px;
  font-weight: 820;
}

.update-manage-clear .danger-btn .icon {
  width: 18px;
  height: 18px;
  stroke-width: 2.45;
}

.version-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--card-border);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f9fbfd);
  box-shadow: var(--shadow-xs);
}

.version-card + .history-list {
  margin-top: 10px;
}

.version-hero {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.version-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.version-icon.ready {
  background: var(--blue-soft);
  color: var(--navy);
}

.version-icon.working {
  background: var(--amber-soft);
  color: var(--amber);
}

.version-icon.error {
  background: var(--red-soft);
  color: var(--red);
}

.version-icon .icon {
  width: 22px;
  height: 22px;
}

.version-title {
  min-width: 0;
}

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

.version-title strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 850;
  line-height: 1.2;
}

.version-title span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.version-badge {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.version-badge.ready {
  background: var(--blue-soft);
  color: var(--navy);
}

.version-badge.working {
  background: var(--amber-soft);
  color: var(--amber);
}

.version-badge.error {
  background: var(--red-soft);
  color: var(--red);
}

.version-state {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(196, 206, 218, 0.62);
  border-radius: 12px;
  background: #ffffff;
}

.version-state > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.version-state span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
  line-height: 1.15;
}

.version-state strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.version-state > div:first-child strong {
  white-space: normal;
}

.program-menu {
  display: grid;
  gap: 8px;
  padding-top: 2px;
}

.program-row {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: #ffffff;
  color: var(--navy);
  text-align: left;
}

.program-row:not(:disabled):hover {
  border-color: rgba(0, 140, 134, 0.28);
  background: #f8fbff;
}

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

.program-row strong,
.program-row small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.program-row strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 820;
}

.program-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
}

.version-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.refresh-sheet {
  min-height: min(560px, calc(100dvh - 14px));
  background: #ffffff;
}

.refresh-sheet .sheet-header {
  border-bottom-color: rgba(196, 206, 218, 0.66);
  background: #ffffff;
}

.refresh-body {
  background: #ffffff;
  gap: 12px;
}

.refresh-summary-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 15px;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.refresh-summary-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.refresh-summary-icon .icon {
  width: 22px;
  height: 22px;
  stroke-width: 2.5;
  transform: translateY(0);
}

.refresh-summary-label {
  display: block;
  color: var(--teal-deep);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.1;
}

.refresh-summary-card strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 900;
  line-height: 1.1;
}

.refresh-summary-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.35;
}

.refresh-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.refresh-info-grid > div {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  grid-template-areas:
    "icon label"
    "icon value";
  column-gap: 10px;
  row-gap: 4px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.refresh-info-icon {
  grid-area: icon;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--navy);
}

.refresh-info-grid > div:nth-child(2) .refresh-info-icon {
  background: var(--green-soft);
  color: var(--green);
}

.refresh-info-icon .icon {
  width: 20px;
  height: 20px;
  stroke-width: 2.4;
}

.refresh-info-label {
  grid-area: label;
  align-self: end;
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
  line-height: 1.1;
}

.refresh-info-grid strong {
  grid-area: value;
  align-self: start;
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 840;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.refresh-notice {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 13px;
  border: 1px solid rgba(180, 83, 9, 0.2);
  border-radius: 16px;
  background: var(--amber-soft);
  color: var(--amber);
}

.refresh-notice > .icon {
  width: 21px;
  height: 21px;
  margin: 2px auto 0;
  stroke-width: 2.5;
}

.refresh-notice strong {
  display: block;
  color: #7c2d12;
  font-size: 13px;
  font-weight: 880;
  line-height: 1.28;
}

.refresh-notice p {
  margin: 5px 0 0;
  color: #92400e;
  font-size: 12px;
  font-weight: 660;
  line-height: 1.38;
}

.refresh-actions {
  grid-template-columns: 1fr;
  margin-top: 2px;
}

.profile-reset-sheet {
  background: var(--bg);
}

.profile-reset-sheet .sheet-header {
  border-bottom-color: rgba(196, 206, 218, 0.66);
  background: rgba(245, 247, 251, 0.98);
}

.profile-reset-body {
  gap: 12px;
}

.profile-reset-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 15px;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.profile-reset-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--red-soft);
  color: var(--red);
}

.profile-reset-icon .icon {
  width: 22px;
  height: 22px;
  stroke-width: 2.4;
}

.profile-reset-label {
  display: block;
  color: var(--red);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.1;
}

.profile-reset-card strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.15;
}

.profile-reset-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.35;
}

.profile-reset-notice {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 13px;
  border: 1px solid rgba(0, 140, 134, 0.2);
  border-radius: 16px;
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.profile-reset-notice > .icon {
  width: 21px;
  height: 21px;
  margin: 2px auto 0;
  stroke-width: 2.5;
}

.profile-reset-notice strong {
  display: block;
  color: var(--teal-deep);
  font-size: 13px;
  font-weight: 880;
  line-height: 1.28;
}

.profile-reset-notice p {
  margin: 5px 0 0;
  color: #0f766e;
  font-size: 12px;
  font-weight: 660;
  line-height: 1.38;
}

.profile-reset-actions {
  margin-top: 2px;
}

.install-guide-body {
  gap: 12px;
}

.install-guide-summary {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(0, 140, 134, 0.2);
  border-radius: 16px;
  background: #f8fbff;
  box-shadow: var(--shadow-xs);
}

.install-guide-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.install-guide-icon .icon {
  width: 21px;
  height: 21px;
  stroke-width: 2.4;
}

.install-guide-summary strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 880;
  line-height: 1.28;
}

.install-guide-summary p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 660;
  line-height: 1.4;
}

.install-guide-steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: install-step;
}

.install-guide-steps li {
  counter-increment: install-step;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid rgba(196, 206, 218, 0.72);
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.38;
}

.install-guide-steps li::before {
  content: counter(install-step);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
}

.install-guide-note {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 13px;
  border: 1px solid rgba(0, 140, 134, 0.2);
  border-radius: 16px;
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.install-guide-note > .icon {
  width: 21px;
  height: 21px;
  margin: 2px auto 0;
  stroke-width: 2.5;
}

.install-guide-note strong {
  display: block;
  color: var(--teal-deep);
  font-size: 13px;
  font-weight: 880;
  line-height: 1.28;
}

.install-guide-note p {
  margin: 5px 0 0;
  color: #0f766e;
  font-size: 12px;
  font-weight: 660;
  line-height: 1.38;
}

.install-guide-actions {
  margin-top: 2px;
}

.modal-backdrop.exit-confirm-backdrop {
  z-index: 90;
}

body:has(.exit-confirm-backdrop) .bottom-nav {
  visibility: hidden;
  pointer-events: none;
}

.exit-confirm-sheet .sheet-header {
  border-bottom-color: rgba(196, 206, 218, 0.66);
  background: rgba(245, 247, 251, 0.98);
}

.exit-confirm-body {
  gap: 12px;
}

.exit-confirm-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 15px;
  border: 1px solid rgba(190, 18, 60, 0.16);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.exit-confirm-card.web {
  border-color: rgba(0, 140, 134, 0.2);
  background: #f8fbff;
}

.exit-confirm-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--red-soft);
  color: var(--red);
}

.exit-confirm-card.web .exit-confirm-icon {
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.exit-confirm-icon .icon {
  width: 22px;
  height: 22px;
  stroke-width: 2.4;
}

.exit-confirm-card strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exit-confirm-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.35;
}

.exit-confirm-actions {
  margin-top: 2px;
}

.version-actions .secondary-btn,
.version-actions .primary-btn {
  width: 100%;
  min-height: 46px;
  border-radius: 13px;
  font-size: 13px;
}

.version-actions .icon {
  width: 18px;
  height: 18px;
}

.empty-state {
  padding: 28px 16px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 6px;
  color: var(--navy);
  font-size: 15px;
  font-weight: 900;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 25;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 7px 10px calc(7px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(18px);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
}

.bottom-nav button {
  min-width: 0;
  min-height: 56px;
  background: transparent;
  color: #5d6673;
  flex-direction: column;
  gap: 3px;
  font-size: 10px;
  font-weight: 620;
  border-radius: 14px;
  white-space: nowrap;
}

.bottom-nav button span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.1;
}

.bottom-nav button:not(.active):hover {
  color: var(--navy);
  background: rgba(6, 43, 101, 0.05);
}

.bottom-nav button .icon {
  width: 23px;
  height: 23px;
}

.bottom-nav button.active {
  background: rgba(227, 247, 245, 0.92);
  color: var(--navy);
  border-radius: 14px;
  font-weight: var(--control-weight);
}

.bottom-nav button.active .icon {
  stroke-width: 2.8;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(15, 23, 42, 0.32);
  padding: 0;
  overscroll-behavior: contain;
}

.sheet {
  position: relative;
  width: min(100%, var(--content-max));
  max-height: calc(100vh - 14px);
  max-height: calc(100dvh - 14px);
  overflow: auto;
  border-radius: 18px 18px 0 0;
  background: #ffffff;
  box-shadow: 0 -16px 36px rgba(15, 23, 42, 0.16);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  transform: translateY(var(--sheet-drag-y, 0));
  transition: transform 180ms ease;
}

.sheet::before {
  display: none;
}

.sheet-drag-handle {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  height: 24px;
  padding-top: 10px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.sheet-drag-handle::before {
  content: "";
  display: block;
  width: 42px;
  height: 5px;
  border-radius: 999px;
  background: #c8cdd4;
  transition: background-color 140ms ease, width 140ms ease;
}

.sheet.is-dragging {
  transition: none;
}

.sheet.is-dragging .sheet-drag-handle {
  cursor: grabbing;
}

.sheet.is-dragging .sheet-drag-handle::before {
  width: 52px;
  background: var(--teal);
}

.sheet[data-sheet-dismiss] .sheet-header {
  touch-action: none;
}

.sheet-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
}

.sheet-title {
  min-width: 0;
}

.sheet-title h3 {
  margin: 0;
  color: #111111;
  font-size: 19px;
  font-weight: 840;
  line-height: 1.2;
  letter-spacing: 0;
}

.sheet-title p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.35;
}

.sheet-body {
  padding: 12px 16px calc(22px + var(--safe-bottom));
  display: grid;
  gap: 12px;
}

.item-sheet {
  background: var(--bg);
}

.item-sheet .sheet-header {
  border-bottom-color: rgba(196, 206, 218, 0.66);
  background: rgba(245, 247, 251, 0.98);
}

.item-sheet-body {
  gap: 12px;
  padding-bottom: calc(18px + var(--safe-bottom));
}

.sheet-kicker {
  display: block;
  margin: 0 0 4px;
  color: var(--teal-deep);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.1;
}

.sheet-kicker.danger {
  color: var(--red);
}

.item-stock-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 13px;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #fbfcff);
  box-shadow: var(--shadow-xs);
}

.item-stock-card::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 0;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: var(--teal);
}

.item-stock-card.low::before {
  background: var(--red);
}

.item-stock-card.watch::before {
  background: var(--amber);
}

.item-stock-main,
.item-stock-side {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.item-stock-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.item-stock-main strong {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: var(--navy);
  font-size: 26px;
  font-weight: 920;
  line-height: 1;
  letter-spacing: 0;
}

.item-stock-main strong span {
  color: #263244;
  font-size: 14px;
  font-weight: 820;
}

.item-stock-side {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.item-stock-side small,
.item-stock-side em {
  max-width: 96px;
  overflow: hidden;
  font-size: 11px;
  font-weight: 720;
  line-height: 1.25;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-stock-side small {
  color: var(--muted);
}

.item-stock-side em {
  color: var(--faint);
  font-style: normal;
}

.item-sheet-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.item-sheet-tags span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0 9px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  line-height: 1;
  box-shadow: inset 0 0 0 1px var(--line);
}

.stock-workflow-card {
  display: grid;
  gap: 13px;
  padding: 15px;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.sheet-section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sheet-section-title h4 {
  margin: 0;
  color: var(--navy);
  font-size: 15px;
  font-weight: 860;
  line-height: 1.25;
}

.sheet-section-title p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
}

.release-notes {
  gap: 10px;
}

.release-card {
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--card-border);
  border-radius: 15px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.release-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.release-card strong {
  color: var(--teal-deep);
  font-size: 13px;
  font-weight: 900;
}

.release-card time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  white-space: nowrap;
}

.release-card h4 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.25;
}

.release-card ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 17px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #ffffff;
}

.detail-cell {
  min-width: 0;
  padding: 10px;
  background: #ffffff;
  border-right: 1px solid var(--line);
}

.detail-cell:last-child {
  border-right: 0;
}

.detail-cell span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.detail-cell strong {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  color: var(--navy);
  font-size: 17px;
  font-weight: 820;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-toggle {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border-radius: 15px;
  background: var(--surface-soft);
}

.action-toggle button {
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #5d6673;
  font-size: 14px;
  font-weight: 790;
}

.action-toggle button span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-toggle button.active {
  color: var(--navy);
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.stock-form {
  gap: 13px;
}

.quantity-control {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  gap: 8px;
  align-items: center;
}

.quantity-control .input {
  min-height: 52px;
  border-radius: 15px;
  text-align: center;
  font-size: 23px;
  font-weight: 860;
}

.qty-step {
  min-height: 52px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #ffffff;
  color: var(--navy);
  box-shadow: var(--shadow-xs);
}

.qty-step .icon {
  width: 20px;
  height: 20px;
  stroke-width: 2.6;
}

.qty-step:not(:disabled):hover {
  border-color: rgba(6, 43, 101, 0.22);
  background: #f8fbff;
}

.sheet-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: 10px;
}

.sheet-actions.single {
  grid-template-columns: 1fr;
}

.stock-form .sheet-actions {
  margin-top: 2px;
  padding-top: 2px;
}

.sheet-actions .primary-btn,
.sheet-actions .secondary-btn,
.sheet-actions .danger-confirm-btn {
  width: 100%;
  min-height: 52px;
  border-radius: 15px;
}

.sheet .textarea {
  min-height: 70px;
}

.compact-info {
  padding: 10px 12px;
  text-align: left;
}

.reason-panel {
  display: grid;
  gap: 8px;
}

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

.reason-grid button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 780;
}

.reason-grid button.active {
  border-color: rgba(6, 43, 101, 0.36);
  background: var(--blue-soft);
  color: var(--navy);
}

.settings-panel {
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.settings-panel summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 14px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 820;
  cursor: pointer;
  list-style: none;
}

.settings-panel summary::-webkit-details-marker {
  display: none;
}

.settings-panel summary span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.settings-panel summary .icon {
  width: 19px;
  height: 19px;
  color: var(--navy);
}

.settings-panel summary b {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 14px 14px;
}

.settings-help {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 620;
  line-height: 1.4;
}

.update-bar {
  position: fixed;
  right: 13px;
  bottom: calc(76px + var(--safe-bottom));
  left: 13px;
  z-index: 72;
  width: min(calc(100% - 26px), 388px);
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 30px;
  gap: 8px;
  align-items: center;
  margin: 0 auto;
  padding: 9px 10px 9px 12px;
  border: 1px solid rgba(0, 140, 134, 0.28);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(0, 92, 87, 0.18);
}

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

.update-bar strong {
  color: var(--teal-deep);
  font-size: 13px;
  font-weight: 880;
}

.update-bar span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.update-bar button {
  min-height: 34px;
  border-radius: 7px;
  background: var(--teal);
  color: #ffffff;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 820;
}

.update-bar button:disabled {
  opacity: 0.72;
}

.update-bar .update-close {
  width: 30px;
  min-height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  background: var(--surface-soft);
  color: var(--muted);
}

.update-bar .update-close .icon {
  width: 16px;
  height: 16px;
}

.update-bar + .undo-bar {
  bottom: calc(142px + var(--safe-bottom));
}

.update-bar ~ .toast {
  bottom: calc(138px + var(--safe-bottom));
}

.undo-bar {
  position: fixed;
  right: 13px;
  bottom: calc(76px + var(--safe-bottom));
  left: 13px;
  z-index: 70;
  width: min(calc(100% - 26px), 388px);
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 30px;
  gap: 8px;
  align-items: center;
  margin: 0 auto;
  padding: 9px 10px 9px 12px;
  border: 1px solid rgba(6, 43, 101, 0.16);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(6, 43, 101, 0.2);
}

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

.undo-bar strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 840;
}

.undo-bar span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.undo-bar button {
  min-height: 34px;
  border-radius: 7px;
  background: var(--navy);
  color: #ffffff;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 820;
}

.undo-bar .undo-close {
  width: 30px;
  min-height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  background: var(--surface-soft);
  color: var(--muted);
}

.undo-bar .undo-close .icon {
  width: 16px;
  height: 16px;
}

.undo-bar + .toast {
  bottom: calc(138px + var(--safe-bottom));
}

.screen:has(.add-form) ~ .toast {
  bottom: calc(var(--bottom-nav-height) + 92px + var(--safe-bottom));
}

.app-busy-overlay {
  position: fixed;
  inset: 0;
  z-index: 74;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.2);
  backdrop-filter: blur(3px);
}

.app-busy-card {
  width: min(calc(100% - 28px), 292px);
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 18px 16px 16px;
  border: 1px solid rgba(196, 206, 218, 0.8);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  text-align: center;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.2);
}

.busy-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(0, 140, 134, 0.18);
  border-top-color: var(--teal);
  border-radius: 999px;
  animation: busySpin 780ms linear infinite;
}

.app-busy-card strong {
  color: var(--navy);
  font-size: 15px;
  font-weight: 880;
  line-height: 1.25;
}

.app-busy-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.35;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: calc(76px + var(--safe-bottom));
  left: 16px;
  z-index: 80;
  max-width: 398px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  background: #111827;
  color: #ffffff;
  padding: 13px 14px;
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 760;
}

@keyframes busySpin {
  to {
    transform: rotate(360deg);
  }
}

.form-card {
  display: grid;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.add-form {
  display: grid;
  gap: 12px;
  padding-bottom: calc(86px + var(--safe-bottom));
}

.add-item-sheet {
  background: var(--bg);
}

.add-item-sheet .sheet-header {
  border-bottom-color: rgba(196, 206, 218, 0.66);
  background: rgba(245, 247, 251, 0.98);
}

.add-sheet-body {
  gap: 12px;
}

.add-item-sheet .add-heading {
  display: none;
}

.add-item-sheet .add-form {
  padding-bottom: 0;
}

.add-form-panel {
  display: grid;
  gap: 14px;
  padding: 15px;
  border: 1px solid var(--card-border);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #fbfcff);
  box-shadow: var(--shadow-xs);
}

.add-panel-head {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.add-panel-head h3,
.add-panel-head strong {
  display: block;
  margin: 0;
  overflow: hidden;
  color: var(--navy);
  font-size: 15px;
  font-weight: 860;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.add-panel-head p,
.add-panel-head small {
  display: block;
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.add-panel-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.add-panel-icon.muted {
  background: var(--surface-soft);
  color: var(--navy);
}

.add-panel-icon .icon {
  width: 21px;
  height: 21px;
  stroke-width: 2.4;
}

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

.add-details {
  padding: 0;
  gap: 0;
}

.add-details > summary {
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  gap: 10px;
  padding: 14px 15px;
  cursor: pointer;
  list-style: none;
}

.add-details > summary::-webkit-details-marker {
  display: none;
}

.add-details-chevron {
  display: grid;
  place-items: center;
  color: var(--faint);
  transition: transform 140ms ease, color 140ms ease;
}

.add-details-chevron .icon {
  width: 18px;
  height: 18px;
}

.add-details[open] .add-details-chevron {
  color: var(--navy);
  transform: rotate(90deg);
}

.add-details-grid {
  padding: 0 15px 15px;
}

.add-form-actions {
  position: fixed;
  right: auto;
  bottom: calc(var(--bottom-nav-height) + 8px + var(--safe-bottom));
  left: 50%;
  z-index: 12;
  width: min(100%, var(--content-max));
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 10px;
  padding: 10px var(--page-x) calc(10px + var(--safe-bottom));
  border-top: 1px solid rgba(196, 206, 218, 0.66);
  background:
    linear-gradient(180deg, rgba(245, 247, 251, 0), rgba(245, 247, 251, 0.96) 30%),
    rgba(245, 247, 251, 0.96);
  backdrop-filter: blur(14px);
  transform: translateX(-50%);
}

.add-item-sheet .add-form-actions,
.service-work-sheet .service-work-actions,
.calendar-event-sheet .calendar-event-actions {
  position: sticky;
  right: auto;
  bottom: calc(-22px - var(--safe-bottom));
  left: auto;
  z-index: 3;
  width: auto;
  margin: 2px -16px calc(-22px - var(--safe-bottom));
  padding: 10px 16px calc(12px + var(--safe-bottom));
  transform: none;
}

.add-form-actions .secondary-btn,
.add-form-actions .primary-btn {
  width: 100%;
  min-height: 52px;
  border-radius: 15px;
}

.add-form .field {
  scroll-margin-bottom: calc(var(--bottom-nav-height) + 98px + var(--safe-bottom));
}

.span-2 {
  grid-column: 1 / -1;
}

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

.utility-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (min-width: 760px) {
  body {
    background: linear-gradient(180deg, #eaf0f7, #f7f9fc);
  }

  .login-screen {
    align-items: center;
    padding: 32px;
  }

  .login-panel {
    --login-x: 34px;
    min-height: auto;
    border: 1px solid rgba(196, 206, 218, 0.72);
    border-radius: var(--radius-lg);
    padding: 44px var(--login-x) 0;
    box-shadow: var(--shadow-sm);
  }

  .screen {
    --page-x: 16px;
    --page-y: 12px;
    max-width: var(--content-max);
    box-shadow: 0 0 0 1px rgba(196, 206, 218, 0.65);
  }

  .login-panel {
    box-shadow: var(--shadow-sm);
  }

  .topbar {
    gap: 14px;
    border-right: 1px solid rgba(196, 206, 218, 0.55);
    border-left: 1px solid rgba(196, 206, 218, 0.55);
  }

  .brand-emblem {
    width: 48px;
    height: 48px;
  }

  .app-title h1 {
    font-size: 22px;
  }

  .app-title p {
    font-size: 13px;
  }

  .search-input {
    min-height: 48px;
  }

  .status-strip {
    gap: 12px;
    padding-top: 18px;
  }

  .stat {
    padding: 16px;
  }

  .stat strong {
    font-size: 24px;
  }

  .stat span {
    font-size: 12px;
  }

  .section-head h2 {
    font-size: 19px;
  }

  .inventory-list {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .item-row {
    min-height: 86px;
    grid-template-columns: minmax(0, 1fr) auto 20px;
    padding: 15px 14px 15px 16px;
  }

  .inventory-table-head {
    display: none;
  }

  .item-name {
    font-size: 16px;
  }

  .item-meta {
    font-size: 12px;
  }

  .quantity strong {
    font-size: 20px;
  }

  .history-row {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 14px 18px;
  }

  .report-hero {
    grid-template-columns: minmax(0, 1fr) 90px;
    padding: 20px 22px 20px 24px;
  }

  .report-hero h2 {
    font-size: 30px;
  }

  .report-score {
    width: 90px;
    min-height: 72px;
  }

  .report-score strong {
    font-size: 28px;
  }

  .report-status-strip {
    gap: 8px;
    padding: 10px;
  }

  .form-card {
    padding: 20px;
  }

  .bottom-nav {
    bottom: 16px;
    width: min(calc(100% - 48px), var(--content-max));
    max-width: var(--content-max);
    padding: 8px;
    border: 1px solid rgba(196, 206, 218, 0.88);
    border-radius: var(--radius-lg);
    box-shadow: 0 14px 36px rgba(6, 43, 101, 0.14);
  }

  .bottom-nav button {
    min-height: 54px;
    border-radius: var(--radius);
    font-size: 11px;
  }

  .modal-backdrop {
    align-items: center;
    padding: 24px;
  }

  .sheet {
    width: min(var(--content-max), calc(100vw - 48px));
    max-height: min(760px, calc(100vh - 48px));
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-strong);
  }

  .group-sheet,
  .log-edit-sheet {
    width: min(var(--content-max), calc(100vw - 48px));
  }

  .sheet::before,
  .sheet-drag-handle {
    display: none;
  }

  .sheet-header {
    padding: 18px 20px 14px;
  }

  .sheet-body {
    padding: 16px 20px 20px;
    gap: 14px;
  }

  .add-item-sheet .add-form-actions,
  .service-work-sheet .service-work-actions {
    margin-right: -20px;
    margin-left: -20px;
    padding-right: 20px;
    padding-left: 20px;
  }

  .undo-bar {
    bottom: calc(96px + var(--safe-bottom));
    width: min(calc(100% - 48px), 520px);
  }

  .toast {
    bottom: calc(96px + var(--safe-bottom));
  }
}

@media (min-width: 1024px) {
  .screen {
    --page-x: 16px;
    --page-y: 12px;
    max-width: var(--content-max);
    padding-bottom: calc(104px + var(--safe-bottom));
  }

  .topbar {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 10px;
  }

  .topbar-row {
    grid-column: auto;
  }

  .search-row {
    grid-column: auto;
  }

  .tabs {
    grid-column: auto;
  }

  .inventory-heading {
    margin-top: 24px;
  }

  .inventory-table-head,
  .item-row {
    grid-template-columns: minmax(0, 1fr) auto 20px;
  }

  .history-line {
    gap: 9px;
  }

  .report-list {
    display: grid;
    grid-template-columns: 1fr;
  }

  .report-row {
    min-height: 68px;
    border-right: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
  }

  .report-row:last-child {
    border-right: 1px solid var(--card-border);
  }
}

@media (max-width: 360px) {
  .screen {
    --page-x: 12px;
  }

  .login-panel {
    --login-x: 16px;
    padding-top: 26px;
  }

  .login-hero {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 12px;
  }

  .brand-mark {
    width: 50px;
    height: 50px;
  }

  .login-title {
    font-size: 25px;
  }

  .login-form-card {
    padding: 13px;
  }

  .topbar {
    margin-right: calc(var(--page-x) * -1);
    margin-left: calc(var(--page-x) * -1);
    padding-right: var(--page-x);
    padding-left: var(--page-x);
  }

  .app-title h1 {
    font-size: 16px;
  }

  .login-title {
    font-size: 22px;
  }

  .launch-copy h1 {
    font-size: 23px;
  }

  .inventory-subview-head {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    padding: 10px;
  }

  .inventory-subview-icon {
    width: 38px;
    height: 38px;
  }

  .inventory-subview-head p {
    display: none;
  }

  .profile-chip span:not(.notify-badge) {
    display: none;
  }

  .add-item-btn {
    width: auto;
    min-width: 106px;
    max-width: none;
    padding: 0 12px;
  }

  .add-item-btn span {
    display: inline;
  }

  .inventory-table-head,
  .item-row {
    grid-template-columns: minmax(0, 1fr) auto 18px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .item-name {
    font-size: 15px;
  }

  .quantity strong {
    font-size: 18px;
  }

  .report-hero {
    grid-template-columns: 1fr;
  }

  .report-score {
    width: 100%;
    min-height: 52px;
    grid-template-columns: auto auto;
    justify-content: space-between;
    padding: 0 14px;
  }

  .report-score span {
    margin-top: 0;
  }

  .report-filter button {
    padding: 0 8px;
    font-size: 11px;
  }

  .history-summary-card {
    grid-template-columns: minmax(0, 1fr) 56px;
    padding: 14px;
  }

  .history-summary-card h2 {
    font-size: 19px;
  }

  .history-summary-card > strong {
    min-height: 50px;
    font-size: 23px;
  }

  .history-filter-bar {
    gap: 4px;
    padding: 4px;
  }

  .history-filter-bar span {
    font-size: 11px;
  }

  .shortage-status button {
    font-size: 11px;
  }

  .user-profile-card {
    grid-template-columns: 52px minmax(0, 1fr);
    padding: 14px;
  }

  .profile-initial {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    font-size: 21px;
  }

  .user-info-grid {
    grid-template-columns: 1fr;
  }

  .user-action-card small {
    white-space: normal;
  }
}

@media (max-width: 340px) {
  .add-item-btn {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    padding: 0;
  }

  .add-item-btn span {
    display: none;
  }
}

@media (max-width: 420px) {
  .field-grid {
    grid-template-columns: 1fr;
  }

  .bottom-nav {
    padding-right: 8px;
    padding-left: 8px;
  }

  .sheet-header {
    padding-right: 14px;
    padding-left: 14px;
  }

  .sheet-body {
    padding-right: 14px;
    padding-left: 14px;
  }

  .add-item-sheet .add-form-actions,
  .service-work-sheet .service-work-actions,
  .calendar-event-sheet .calendar-event-actions {
    margin-right: -14px;
    margin-left: -14px;
    padding-right: 14px;
    padding-left: 14px;
  }

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

  .history-row,
  .sheet-log-list .history-row {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .history-time,
  .sheet-log-list .history-time {
    color: var(--faint);
  }

  .history-side {
    grid-column: 2;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    justify-items: start;
    margin-top: -5px;
  }

  .history-actions {
    justify-content: flex-start;
  }

  .history-line {
    gap: 6px;
  }

  .log-delete-summary-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .service-hero {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 15px;
  }

  .service-hero .primary-btn {
    width: 100%;
  }

  .service-hero-actions {
    width: 100%;
  }

  .service-hero-actions .secondary-btn {
    width: 100%;
  }

  .calendar-hero {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 15px;
  }

  .calendar-hero-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .calendar-hero .primary-btn {
    width: 100%;
  }

  .service-choice-grid,
  .service-filter-fields,
  .service-participant-input-row,
  .calendar-type-grid,
  .service-approval-controls,
  .calendar-detail-actions,
  .service-detail-actions,
  .service-status-actions.is-pair,
  .service-complete-grid,
  .service-complete-actions {
    grid-template-columns: 1fr;
  }

  .service-flow-meta {
    grid-template-columns: 1fr;
  }

  .service-row {
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: start;
  }

  .calendar-event-row {
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: start;
  }

  .service-row-icon {
    margin-top: 2px;
  }

  .calendar-event-icon {
    margin-top: 2px;
  }

  .service-status {
    grid-column: 2;
    justify-self: start;
    margin-top: 2px;
  }

  .calendar-event-badge {
    grid-column: 2;
    justify-self: start;
    margin-top: 2px;
  }

  .service-row-main small,
  .service-row-main em,
  .calendar-event-main small,
  .calendar-event-main em,
  .service-template-main small,
  .service-template-main em,
  .service-event-item small,
  .service-event-item em {
    white-space: normal;
  }

  .service-flow-main {
    align-items: start;
  }

  .service-participant-main {
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: start;
  }

  .service-participant-main b {
    grid-column: 2;
    justify-self: start;
    margin-top: -2px;
  }

  .service-template-row {
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: start;
  }

  .service-template-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-template-actions .icon-btn {
    width: 100%;
  }

  .service-remove-participant {
    width: 100%;
  }

  .log-delete-summary-card .log-edit-amount {
    grid-column: 2;
    justify-items: start;
  }

  .log-delete-detail-grid,
  .log-delete-actions {
    grid-template-columns: 1fr;
  }

  .refresh-info-grid,
  .refresh-actions,
  .profile-reset-actions {
    grid-template-columns: 1fr;
  }

  .history-action {
    padding: 0 7px;
  }

  .history-amount {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .modal-backdrop {
    animation: fadeIn 130ms ease-out;
  }

  .sheet {
    animation: slideUp 180ms ease-out;
  }

  .toast {
    animation: toastIn 180ms ease-out;
  }

  .launch-progress span {
    animation: launchProgress 1150ms ease-in-out infinite;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(18px); opacity: 0.7; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes toastIn {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes launchProgress {
  0% { transform: translateX(-120%); }
  54% { transform: translateX(78%); }
  100% { transform: translateX(230%); }
}

@keyframes updateAccessHoldPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(0, 140, 134, 0.18);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(0, 140, 134, 0.08);
  }
}
