:root {
  --ink: #172121;
  --muted: #64706c;
  --line: #d9e2de;
  --bg: #f4f7f5;
  --panel: #ffffff;
  --emerald: #0f8b6f;
  --emerald-dark: #0b6d58;
  --emerald-soft: #e7f7f2;
  --yellow: #bc8d1f;
  --yellow-soft: #fff8df;
  --blue: #2369ad;
  --blue-soft: #eef6ff;
  --red: #c14435;
  --red-soft: #fff1ef;
  --slate: #243340;
  --slate-soft: #edf1f5;
  --shadow: 0 18px 42px rgba(18, 28, 28, 0.1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(15, 139, 111, 0.12), transparent 28rem),
    linear-gradient(180deg, #eef6f2 0%, var(--bg) 24rem);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "YuGothic", "Segoe UI", sans-serif;
}

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

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(15, 139, 111, 0.2);
  outline-offset: 2px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(217, 226, 222, 0.9);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.site-header__inner,
.main-shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--emerald-soft);
  color: var(--emerald);
  font-weight: 800;
}

.brand-copy p,
.brand-copy h1 {
  margin: 0;
}

.brand-copy p {
  color: var(--emerald-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.brand-copy h1 {
  font-size: 20px;
  line-height: 1.2;
}

.mode-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(100px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
}

.mode-toggle--single {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.mode-toggle button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.mode-toggle button:disabled {
  cursor: default;
}

.mode-toggle button.is-active {
  color: #fff;
  background: var(--emerald);
}

.main-shell {
  padding: 28px 0 40px;
}

.intro-band {
  display: block;
  margin-bottom: 24px;
}

.hero-panel,
.info-panel,
.screen-panel,
.summary-strip,
.inventory-panel,
.modal-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.hero-panel,
.info-panel,
.screen-panel,
.inventory-panel {
  padding: clamp(18px, 4vw, 28px);
}

.hero-panel h2,
.screen-panel h2,
.inventory-panel h2,
.modal-card h3 {
  margin: 0;
  line-height: 1.15;
}

.hero-panel p,
.info-panel p,
.hint-text,
.muted {
  color: var(--muted);
}

.hero-panel h2 {
  font-size: clamp(26px, 3.6vw, 36px);
  margin-bottom: 12px;
  letter-spacing: 0;
}

.hero-panel > p:last-of-type {
  max-width: 720px;
  margin: 0;
  font-size: 17px;
  line-height: 1.7;
}

.hero-meta,
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.hero-chip,
.status-chip,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.hero-chip {
  border: 1px solid rgba(15, 139, 111, 0.15);
  color: var(--emerald-dark);
  background: var(--emerald-soft);
  min-height: 30px;
  padding: 0 11px;
  font-size: 12px;
}

.info-panel {
  display: grid;
  gap: 14px;
}

.support-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.support-guide__item {
  display: grid;
  gap: 6px;
  border: 1px solid #dfe8e3;
  border-radius: 8px;
  padding: 12px 14px;
  background: #f8fbf9;
}

.support-guide__item strong {
  font-size: 14px;
}

.support-guide__item span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.info-block--warn {
  border: 1px solid rgba(188, 141, 31, 0.24);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff8df;
}

.info-block strong {
  display: block;
  margin-bottom: 6px;
}

.progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 24px;
  width: min(620px, 100%);
}

.progress-step {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: var(--muted);
  background: #e3eae6;
  font-size: 13px;
  font-weight: 800;
}

.progress-step.is-done {
  color: #fff;
  background: var(--emerald);
}

.progress-line {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: #dfe6e2;
}

.progress-line.is-done {
  background: var(--emerald);
}

.screen-panel {
  max-width: 900px;
  margin: 0 auto;
}

.service-panel,
.auth-panel {
  margin-bottom: 24px;
}

.screen-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.section-kicker {
  margin: 0 0 6px;
  color: var(--emerald-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.status-chip {
  border: 1px solid rgba(35, 105, 173, 0.16);
  color: var(--blue);
  background: var(--blue-soft);
}

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

.calendar-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-weight: 800;
}

.calendar-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.calendar-week div {
  padding-bottom: 6px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.calendar-day {
  min-height: 74px;
  border: 1px solid #dbe4e0;
  border-radius: 8px;
  padding: 8px 4px;
  color: var(--ink);
  background: #fff;
  transition: 150ms ease;
}

.calendar-day:hover {
  border-color: rgba(15, 139, 111, 0.4);
  background: #f4fcf9;
}

.calendar-day.is-empty {
  border-color: transparent;
  background: transparent;
  pointer-events: none;
}

.calendar-day.is-past {
  color: #b6bfbb;
  background: #f5f7f6;
  pointer-events: none;
}

.calendar-day.is-selected {
  border-color: var(--emerald);
  color: #fff;
  background: var(--emerald);
  box-shadow: 0 10px 24px rgba(15, 139, 111, 0.18);
}

.calendar-day.is-today:not(.is-selected) {
  border-width: 2px;
  border-color: var(--emerald);
  color: var(--emerald-dark);
}

.calendar-day small {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  opacity: 0.84;
}

.button-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
}

.button-row--end {
  justify-content: flex-end;
}

.btn,
.btn-ghost,
.btn-danger,
.btn-subtle {
  min-height: 46px;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 800;
}

.btn {
  border: 1px solid var(--emerald);
  color: #fff;
  background: var(--emerald);
}

.btn:hover {
  background: var(--emerald-dark);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-ghost {
  border: 1px solid #c2cdc8;
  color: var(--ink);
  background: #fff;
}

.btn-ghost.is-active {
  border-color: var(--emerald);
  color: #fff;
  background: var(--emerald);
}

.btn-subtle {
  border: 0;
  color: var(--muted);
  background: transparent;
}

.btn-danger {
  border: 1px solid rgba(193, 68, 53, 0.2);
  color: var(--red);
  background: #fff;
}

.btn-danger--soft {
  border-color: rgba(193, 68, 53, 0.12);
  background: var(--red-soft);
}

.plan-list {
  display: grid;
  gap: 14px;
}

.plan-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border: 2px solid #edf1ef;
  border-radius: 8px;
  padding: 18px;
  background: #fff;
  transition: 150ms ease;
}

.plan-card:hover {
  border-color: #bde0d3;
}

.plan-card.is-selected {
  border-color: var(--emerald);
  background: #f6fcfa;
}

.plan-card.is-disabled {
  opacity: 0.6;
  background: #f6f7f7;
}

.plan-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  font-size: 22px;
  font-weight: 800;
}

.plan-icon.plan-a {
  color: var(--yellow);
  background: var(--yellow-soft);
}

.plan-icon.plan-b {
  color: var(--blue);
  background: var(--blue-soft);
}

.plan-copy h3,
.plan-copy p {
  margin: 0;
}

.plan-copy h3 {
  margin-bottom: 6px;
}

.plan-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.pill {
  border: 1px solid rgba(36, 51, 64, 0.08);
  color: var(--muted);
  background: #f7f9f8;
}

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

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

.form-block + .form-block,
.confirm-block + .confirm-block {
  margin-top: 28px;
}

.block-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e4ebe7;
  font-size: 18px;
}

.block-title__mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: var(--emerald);
  background: var(--emerald-soft);
  font-size: 13px;
  font-weight: 800;
}

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

.field,
.field-full {
  display: grid;
  gap: 8px;
}

.field.is-invalid input,
.field.is-invalid select,
.field-full.is-invalid input,
.field-full.is-invalid select {
  border-color: rgba(193, 68, 53, 0.45);
  background: #fff8f7;
}

.field-error {
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

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

.field label,
.field-full label {
  font-size: 14px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea,
.field-full input,
.field-full select,
.field-full textarea {
  min-height: 46px;
  width: 100%;
  border: 1px solid #cad5d0;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
}

.field textarea,
.field-full textarea {
  min-height: 160px;
  resize: vertical;
  line-height: 1.6;
}

.confirm-row--stack {
  align-items: flex-start;
}

.option-grid,
.counter-grid,
.radio-line,
.check-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.option-grid--size .option-card {
  min-width: 160px;
}

.option-card,
.radio-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  min-width: 140px;
  border: 1px solid #cad5d0;
  border-radius: 8px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  font-weight: 700;
}

.option-card.is-selected,
.radio-chip.is-selected {
  border-color: var(--emerald);
  color: var(--emerald-dark);
  background: var(--emerald-soft);
}

.power-switch {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(360px, 100%);
  min-width: min(360px, 100%);
  height: 54px;
  padding: 4px;
  border: 1px solid #cad5d0;
  border-radius: 999px;
  background: #eef3f1;
}

.power-switch::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 6px 14px rgba(23, 33, 33, 0.08);
  transition: transform 160ms ease;
}

.power-switch.is-off::before {
  transform: translateX(100%);
}

.power-switch__option {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  font-weight: 800;
}

.power-switch__option.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.power-switch__option.is-selected {
  color: var(--emerald-dark);
}

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

.site-grid--wide {
  grid-template-columns: repeat(8, minmax(88px, 1fr));
  overflow-x: auto;
}

.site-card {
  display: grid;
  gap: 6px;
  min-height: 76px;
  border: 1px solid #cad5d0;
  border-radius: 8px;
  padding: 12px;
  text-align: left;
  background: #fff;
}

.site-card strong {
  font-size: 24px;
  line-height: 1;
}

.site-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.site-card.is-selected {
  border-color: var(--emerald);
  background: var(--emerald-soft);
}

.site-card.is-disabled {
  color: #adb8b3;
  background: #f4f7f6;
}

.site-card.is-disabled span {
  color: #adb8b3;
}

.site-card--inventory {
  min-width: 88px;
}

.slot-visual {
  margin-bottom: 20px;
}

.slot-visual__title {
  margin: 0 0 12px;
  font-weight: 800;
}

.assign-panel {
  margin-bottom: 20px;
  border: 1px solid #eadca4;
  border-radius: 8px;
  padding: 14px;
  background: #fffaf0;
}

.assign-panel__title {
  margin: 0 0 12px;
  color: #7a5d12;
  font-weight: 800;
}

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

.assign-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid #efe5c3;
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.9);
}

.assign-item.is-active {
  border-color: var(--emerald);
  background: #f4fcf9;
}

.assign-item strong,
.assign-item span {
  display: block;
}

.assign-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.assign-picker {
  margin-top: 12px;
  border-top: 1px solid #efe5c3;
  padding-top: 12px;
}

.assign-picker__title {
  margin: 0 0 6px;
  font-weight: 800;
}

.assign-picker__actions {
  margin-top: 10px;
}

.btn-compact {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.radio-line label,
.check-line label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.check-line input[type="checkbox"],
.agree-row input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  border-radius: 4px;
  accent-color: var(--emerald);
}

.counter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.counter-card {
  border: 1px solid #e4ebe7;
  border-radius: 8px;
  padding: 14px 12px;
  text-align: center;
  background: #f7faf8;
}

.counter-card small {
  display: block;
  color: var(--muted);
  margin-bottom: 12px;
}

.counter-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.counter-control button {
  width: 32px;
  height: 32px;
  border: 1px solid #d4ddd8;
  border-radius: 999px;
  background: #fff;
}

.counter-value {
  min-width: 22px;
  font-size: 22px;
  font-weight: 800;
}

.note-box,
.alert-box,
.terms-box,
.confirm-warning {
  border-radius: 8px;
  padding: 16px;
}

.note-box {
  border: 1px solid rgba(15, 139, 111, 0.18);
  background: #f4fcf9;
}

.alert-box,
.confirm-warning {
  border: 1px solid rgba(193, 68, 53, 0.16);
  background: var(--red-soft);
}

.terms-box {
  border: 1px solid #d7e0db;
  background: #f8fbf9;
}

.terms-scroll {
  height: 140px;
  overflow-y: auto;
  border: 1px solid #d6dfda;
  border-radius: 8px;
  padding: 14px;
  color: var(--muted);
  background: #fff;
  font-size: 13px;
  line-height: 1.7;
}

.agree-row {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.agree-row label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.error-banner {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  border: 1px solid rgba(193, 68, 53, 0.18);
  border-radius: 8px;
  padding: 14px 16px;
  color: var(--red);
  background: var(--red-soft);
}

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

.confirm-row {
  display: grid;
  gap: 4px;
}

.confirm-row strong {
  color: var(--muted);
  font-size: 13px;
}

.price-box {
  border-radius: 8px;
  padding: 16px;
  background: #f7faf8;
}

.price-line,
.price-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.price-line + .price-line {
  margin-top: 10px;
}

.price-total {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #dde5e1;
  font-size: 22px;
  font-weight: 800;
}

.done-panel {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.done-mark {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  margin: 0 auto 20px;
  border-radius: 999px;
  color: var(--emerald);
  background: var(--emerald-soft);
  font-size: 42px;
  font-weight: 800;
}

.done-ticket {
  width: min(420px, 100%);
  margin: 24px auto 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #f8fbf9;
  text-align: left;
}

.done-ticket p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
}

.done-ticket strong {
  display: block;
  margin-bottom: 14px;
  font-size: 20px;
}

.done-links {
  display: grid;
  gap: 6px;
  width: min(560px, 100%);
  margin: 18px auto 0;
  border: 1px solid #d7e3ee;
  border-radius: 8px;
  padding: 14px 16px;
  background: #f7fbff;
  text-align: left;
}

.done-links p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.done-links a {
  color: var(--blue);
  font-weight: 700;
  word-break: break-all;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 20px;
  background: var(--line);
}

.admin-alert {
  margin-bottom: 20px;
  border: 1px solid rgba(188, 141, 31, 0.24);
  border-radius: 8px;
  padding: 12px 14px;
  color: #7a5d12;
  background: #fff8df;
  font-weight: 800;
}

.summary-card {
  padding: 18px 20px;
  background: #fff;
}

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

.summary-card p {
  color: var(--muted);
  font-size: 13px;
}

.summary-card strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
  line-height: 1.1;
}

.summary-card small {
  color: var(--muted);
}

.summary-card--emerald {
  border-left: 4px solid var(--emerald);
}

.summary-card--blue {
  border-left: 4px solid var(--blue);
}

.summary-card--amber {
  border-left: 4px solid var(--yellow);
}

.pricing-panel {
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: #f8fbfa;
}

.notification-panel {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: #fcfefd;
}

.support-result {
  margin-top: 18px;
}

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

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

.toolbar-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #cad5d0;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.toolbar-check input {
  margin: 0;
}

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

.table-actions .btn-ghost,
.table-actions .btn-danger {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.toolbar input,
.toolbar select {
  min-height: 42px;
  border: 1px solid #cad5d0;
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
}

.currency-input {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  border: 1px solid #cad5d0;
  border-radius: 8px;
  background: #fff;
}

.currency-input input {
  min-height: 46px;
  border: 0;
  padding: 10px 12px;
  background: transparent;
}

.currency-input span {
  padding: 0 12px;
  color: var(--muted);
  font-weight: 700;
}

.dashboard-table-wrap,
.inventory-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.inventory-calendar {
  display: grid;
  gap: 24px;
}

.inventory-calendar-nav {
  margin-bottom: 16px;
  align-items: center;
}

.inventory-calendar-caption {
  margin: 0;
  font-size: 18px;
}

.inventory-month {
  border: 1px solid #d8e2dd;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(25, 40, 36, 0.06);
}

.inventory-month__head {
  padding: 16px 18px;
  border-bottom: 1px solid #dce6e1;
  background: linear-gradient(180deg, #f6fbf8 0%, #eef6f2 100%);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0;
}

.inventory-month__body {
  overflow-x: hidden;
  overflow-y: hidden;
}

.inventory-weekdays {
  gap: 0;
  padding: 0;
  background: #f8fbf9;
  border-bottom: 1px solid #e1e8e4;
}

.inventory-month__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  background: #e3ebe7;
  padding: 1px;
}

.inventory-day {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 184px;
  padding: 8px;
  background: #fcfefd;
}

.inventory-day--empty {
  background: #f6faf8;
}

.inventory-day--out-of-range {
  background: #f6faf8;
  opacity: 0.62;
}

.inventory-day--out-of-range .inventory-day__plans,
.inventory-day--out-of-range .inventory-day__alert {
  visibility: hidden;
}

.inventory-day--weekend .inventory-day__date strong,
.inventory-day--weekend .inventory-day__date span {
  color: var(--red);
}

.inventory-day__date {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 8px;
  border-radius: 8px;
  background: #f2f7f4;
}

.inventory-day__date strong {
  font-size: 17px;
  line-height: 1;
}

.inventory-day__date span {
  color: #52605c;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.inventory-day__plans {
  display: grid;
  gap: 8px;
  flex: 1;
  align-content: start;
}

.inventory-day__alert {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 7px 8px;
  color: #7a5d12;
  background: #fff8df;
  font-size: 11px;
  font-weight: 800;
  text-align: left;
  line-height: 1.4;
}

.inventory-plan-card {
  display: grid;
  gap: 6px;
  border: 1px solid #dde6e1;
  border-radius: 8px;
  padding: 6px;
  background: #ffffff;
}

.inventory-plan-card.plan-a {
  border-color: #ebdda8;
  background: linear-gradient(180deg, #fffdf6 0%, #fffaf0 100%);
}

.inventory-plan-card.plan-b {
  border-color: #d7e5f6;
  background: linear-gradient(180deg, #f8fbff 0%, #f3f8ff 100%);
}

.inventory-plan-card__head {
  display: grid;
  gap: 4px;
  font-size: 10px;
  font-weight: 800;
}

.inventory-plan-card__name {
  display: block;
  width: 100%;
  padding: 1px 2px 0;
  color: #31413d;
  line-height: 1.15;
  text-align: center;
  word-break: keep-all;
}

.inventory-link {
  border: 1px solid #d7e3ee;
  border-radius: 999px;
  min-height: 22px;
  padding: 0 7px;
  justify-self: end;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.92);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
  align-self: start;
}

.inventory-plan-card__stock {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  border-radius: 8px;
  padding: 6px 8px;
  border: 1px solid #e5ece8;
  background: rgba(255, 255, 255, 0.95);
  font-weight: 800;
}

.inventory-plan-card__stock span:first-child,
.inventory-plan-card__stock span:last-child {
  color: var(--muted);
  font-size: 11px;
}

.inventory-plan-card__stock strong {
  margin-left: auto;
  font-size: 18px;
  line-height: 1;
}

.inventory-plan-card__stock.is-full {
  color: var(--red);
  border-color: rgba(193, 68, 53, 0.18);
  background: #fff7f6;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: #44504d;
  background: #f3f7f5;
  font-size: 13px;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.plan-badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.plan-badge.plan-a {
  color: #946d0f;
  background: var(--yellow-soft);
}

.plan-badge.plan-b {
  color: var(--blue);
  background: var(--blue-soft);
}

.status-badge.ok {
  color: var(--emerald-dark);
  background: var(--emerald-soft);
}

.status-badge.cancel {
  color: var(--muted);
  background: #eff3f1;
}

.inventory-table {
  min-width: 720px;
}

.inventory-table th,
.inventory-table td {
  text-align: center;
}

.inventory-date {
  min-width: 110px;
  color: var(--ink);
  background: #f6faf8;
  font-weight: 700;
}

.inventory-date.is-weekend {
  color: var(--red);
}

.remaining-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  border-radius: 8px;
  padding: 8px 10px;
  background: #f7faf8;
  font-weight: 800;
}

.remaining-chip strong {
  font-size: 24px;
}

.remaining-chip.is-full {
  color: var(--red);
  background: var(--red-soft);
}

.remaining-chip button {
  border: 0;
  padding: 0;
  background: transparent;
}

.sales-toggle {
  width: 100%;
  min-height: 28px;
  margin-top: 0;
  border: 1px solid #d3ddd8;
  border-radius: 8px;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 800;
  background: #fff;
}

.sales-toggle.is-blocked {
  border-color: rgba(193, 68, 53, 0.18);
  color: var(--red);
  background: var(--red-soft);
}

.sales-toggle.is-full {
  border-color: rgba(193, 68, 53, 0.18);
  color: var(--red);
  background: #fff7f6;
}

@media (max-width: 960px) {
  .inventory-day {
    min-height: 176px;
    padding: 7px;
  }
}

.empty-panel {
  padding: 32px 20px;
  border: 1px dashed #cad6d0;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  background: #f8fbfa;
}

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

.history-item {
  border: 1px solid #dfe8e3;
  border-radius: 8px;
  padding: 12px 14px;
  background: #fbfdfc;
}

.history-item__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.history-item__head strong {
  font-size: 14px;
}

.history-item__head span,
.history-item__meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(30, 44, 52, 0.48);
}

.modal-card {
  width: min(760px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.modal-card--small {
  width: min(640px, 100%);
}

.modal-head,
.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-head {
  padding-inline: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e5ece8;
}

.modal-body {
  padding: 20px 24px;
}

.modal-foot {
  padding-inline: 24px;
  padding-top: 16px;
  border-top: 1px solid #e5ece8;
}

.close-btn {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 24px;
}

.close-btn:hover {
  background: #eef3f1;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  max-width: min(360px, calc(100% - 40px));
  border-radius: 8px;
  padding: 12px 14px;
  color: #fff;
  background: var(--slate);
  box-shadow: var(--shadow);
}

@media (max-width: 900px) {
  .intro-band,
  .summary-strip,
  .confirm-grid,
  .counter-grid,
  .support-guide {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header__inner,
  .screen-head,
  .toolbar,
  .button-row,
  .modal-head,
  .modal-foot {
    display: grid;
  }

  .mode-toggle,
  .toolbar-actions,
  .toolbar-check,
  .toolbar input,
  .toolbar select,
  .btn,
  .btn-ghost,
  .btn-subtle,
  .btn-danger {
    width: 100%;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

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

  .site-grid--wide {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
  }

  .inventory-month__grid {
    min-width: 760px;
  }

  .plan-card {
    grid-template-columns: 1fr;
  }

  .site-header__inner,
  .main-shell {
    width: min(100%, calc(100% - 20px));
  }

  .modal {
    padding: 14px;
  }

  .modal-head,
  .modal-body,
  .modal-foot {
    padding-inline: 16px;
  }
}

@media print {
  @page {
    size: A4 landscape;
    margin: 10mm;
  }

  .site-header,
  .toolbar,
  .modal-foot,
  .close-btn,
  .toast,
  .inventory-day__alert,
  .sales-toggle,
  .inventory-link {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .modal,
  .modal-card,
  .screen-panel,
  .inventory-panel {
    box-shadow: none;
    border: 0;
    background: #fff;
  }

  .modal {
    position: static;
    padding: 0;
    background: #fff;
  }

  .modal-body {
    padding: 0;
  }
}
