/* Schedule table module styles. */
.schedule-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
  margin: 8px 0;
}

.schedule-toolbar label {
  width: 150px;
}

.schedule-toolbar-compact {
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.schedule-toolbar-compact > button,
.schedule-toolbar-compact > .schedule-compact-summary {
  flex: 0 0 auto;
}

.schedule-toolbar-compact #scheduleDateFilter {
  flex: 0 0 138px;
  width: 138px;
  min-width: 138px;
  max-width: 138px;
}

.schedule-compact-summary {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.schedule-overview-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 12px;
}

.schedule-overview-strip article {
  min-width: 0;
  min-height: 88px;
  padding: 12px;
  border: 1px solid rgba(17, 24, 39, 0.06);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.schedule-overview-strip span,
.schedule-overview-strip small {
  display: block;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-overview-strip strong {
  display: block;
  min-width: 0;
  margin: 5px 0 4px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-legend-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  padding: 6px 8px;
  border: 1px solid rgba(17, 24, 39, 0.06);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
}

.schedule-legend-compact {
  margin-top: 2px;
}

.schedule-legend-row span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
}

.legend-dot {
  display: inline-block;
  width: 16px;
  height: 9px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.legend-dot.is-schedule-normal,
.legend-dot.is-customer-normal {
  background: rgba(109, 168, 206, 0.58);
  border-color: rgba(69, 121, 161, 0.35);
}

.legend-dot.is-schedule-member,
.legend-dot.is-customer-member {
  background: rgba(232, 135, 155, 0.62);
  border-color: rgba(168, 74, 93, 0.34);
}

.legend-dot.is-schedule-trial,
.legend-dot.is-customer-trial {
  background: rgba(52, 185, 131, 0.58);
  border-color: rgba(35, 151, 101, 0.36);
}

.legend-dot.is-schedule-group {
  background: rgba(246, 176, 84, 0.72);
  border-color: rgba(191, 116, 45, 0.36);
}

.legend-dot.is-schedule-commercial {
  background: rgba(107, 114, 128, 0.42);
  border-color: rgba(55, 64, 78, 0.32);
}

.legend-dot.is-free {
  background: rgba(233, 248, 241, 0.92);
  border-color: rgba(52, 185, 131, 0.36);
}

.legend-dot.is-pending {
  background: var(--amber-soft);
  border-color: rgba(212, 129, 122, 0.58);
  border-style: dashed;
}

.legend-dot.is-locked {
  background: var(--green-soft);
  border-color: rgba(52, 185, 131, 0.46);
}

.legend-dot.is-manual {
  background: rgba(55, 64, 78, 0.12);
  border-color: rgba(55, 64, 78, 0.5);
}

.legend-dot.is-final {
  background: rgba(52, 185, 131, 0.18);
  border-color: rgba(52, 185, 131, 0.58);
}

.schedule-filter-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.56);
}

.schedule-control-drawer {
  margin-top: 10px;
  border: 1px solid rgba(17, 24, 39, 0.07);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.schedule-control-drawer summary {
  cursor: pointer;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.schedule-control-drawer .schedule-filter-bar,
.schedule-control-drawer .schedule-column-panel {
  margin: 0 10px 10px;
}

.schedule-toggle {
  align-self: end;
  min-height: 38px;
}

.schedule-column-panel {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid rgba(17, 24, 39, 0.07);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.56);
}

.schedule-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.schedule-column-head strong {
  color: var(--text);
}

.schedule-column-head span {
  color: var(--muted);
  font-size: 12px;
}

.schedule-column-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
}

.schedule-calendar {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(232, 135, 155, 0.2);
  border-radius: var(--radius-card);
  background: linear-gradient(135deg, rgba(255, 247, 250, 0.94), rgba(244, 250, 255, 0.94));
}

.schedule-calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.schedule-calendar-head strong {
  color: var(--text);
  font-size: 15px;
}

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

.schedule-weekdays span {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.schedule-day {
  display: grid;
  align-content: start;
  min-height: 82px;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(17, 24, 39, 0.07);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.schedule-day:hover {
  border-color: rgba(109, 168, 206, 0.5);
  box-shadow: 0 10px 24px rgba(109, 168, 206, 0.12);
}

.schedule-day strong {
  font-size: 15px;
}

.schedule-day span,
.schedule-day small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.schedule-day.is-empty {
  min-height: 82px;
  border: 1px dashed rgba(17, 24, 39, 0.06);
  background: rgba(255, 255, 255, 0.36);
}

.schedule-day.is-today:not(.is-selected) {
  border-color: rgba(17, 24, 39, 0.1);
}

.schedule-day.is-level-light {
  border-color: rgba(109, 168, 206, 0.22);
}

.schedule-day.is-level-busy {
  border-color: rgba(232, 135, 155, 0.42);
}

.schedule-day.is-level-full {
  border-color: rgba(168, 74, 93, 0.52);
  background: rgba(255, 244, 247, 0.92);
}

.schedule-day.is-selected {
  border-color: rgba(109, 168, 206, 0.76);
  background: linear-gradient(135deg, rgba(244, 250, 255, 0.98), rgba(255, 255, 255, 0.96));
  box-shadow: inset 0 0 0 2px rgba(109, 168, 206, 0.18), 0 14px 30px rgba(69, 121, 161, 0.14);
}

.schedule-day.is-selected strong {
  color: #2f6f9f;
}

.schedule-matrix-wrap {
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.86);
}

.schedule-matrix {
  width: 100%;
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.schedule-matrix th,
.schedule-matrix td {
  width: auto;
  min-width: 0;
  height: 24px;
  padding: 2px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  overflow: hidden;
  text-overflow: clip;
  white-space: normal;
}

.schedule-matrix td {
  position: relative;
  transform-origin: center;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
}

.schedule-matrix tbody td:hover,
.schedule-matrix tbody td:focus-within {
  z-index: 4;
  transform: scale(1.025);
  box-shadow: 0 6px 16px rgba(69, 121, 161, 0.14);
}

.schedule-matrix td.is-free {
  background: rgba(233, 248, 241, 0.72);
}

.schedule-matrix td.is-filtered-out {
  background: rgba(255, 255, 255, 0.42);
}

.schedule-matrix thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(250, 252, 255, 0.96);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.15;
}

.schedule-matrix .time-col {
  position: sticky;
  left: 0;
  z-index: 3;
  width: 46px;
  min-width: 46px;
  background: rgba(250, 252, 255, 0.98);
  color: var(--muted);
  font-size: 10px;
  text-align: center;
  white-space: nowrap;
}

.schedule-matrix td.is-occupied {
  padding: 0;
  cursor: pointer;
}

.schedule-empty {
  display: block;
  width: 100%;
  min-height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--subtle);
  font-size: 11px;
  line-height: 20px;
  text-align: center;
  cursor: pointer;
}

.schedule-empty.is-available {
  color: var(--green);
  font-weight: 850;
}

.schedule-empty-actions {
  display: grid;
  gap: 2px;
  min-height: 20px;
}

.schedule-empty-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.schedule-matrix td:hover .schedule-empty-buttons,
.schedule-matrix td:focus-within .schedule-empty-buttons,
.schedule-matrix td.is-free .schedule-empty-buttons {
  opacity: 1;
  transform: translateY(0);
}

.schedule-empty-buttons button {
  min-height: 18px;
  padding: 1px 5px;
  border: 1px solid rgba(109, 168, 206, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.schedule-empty-buttons span {
  display: inline-flex;
  min-height: 18px;
  align-items: center;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.schedule-empty-dialog {
  width: min(420px, calc(100vw - 36px));
}

.schedule-block {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 24px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 4px;
  border: 0;
  border-radius: 0;
  background: rgba(109, 168, 206, 0.58);
  box-shadow: none;
  color: var(--text);
  text-align: center;
  cursor: pointer;
}

.schedule-block.is-schedule-normal,
.schedule-continuation.is-schedule-normal,
.schedule-block.is-customer-normal,
.schedule-continuation.is-customer-normal {
  background: rgba(109, 168, 206, 0.72);
}

.schedule-block.is-schedule-member,
.schedule-continuation.is-schedule-member,
.schedule-block.is-customer-member,
.schedule-continuation.is-customer-member {
  background: rgba(232, 135, 155, 0.74);
}

.schedule-block.is-schedule-trial,
.schedule-continuation.is-schedule-trial,
.schedule-block.is-customer-trial,
.schedule-continuation.is-customer-trial {
  background: rgba(52, 185, 131, 0.72);
}

.schedule-block.is-schedule-group,
.schedule-continuation.is-schedule-group {
  background: rgba(246, 176, 84, 0.78);
}

.schedule-block.is-schedule-commercial,
.schedule-continuation.is-schedule-commercial {
  background: rgba(107, 114, 128, 0.46);
}

.schedule-block.is-pending,
.schedule-continuation.is-pending {
  opacity: 0.58;
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0 5px, transparent 5px 10px);
}

.schedule-block.is-manual-lock,
.schedule-continuation.is-manual-lock {
  background: rgba(55, 64, 78, 0.58);
}

.schedule-block.is-final-paid,
.schedule-continuation.is-final-paid {
  box-shadow: none;
}

.schedule-block.is-done {
  opacity: 0.72;
}

.schedule-block.is-cancel {
  opacity: 0.45;
}

.schedule-stack-note {
  display: inline-flex;
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 1;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  margin: 0 0 2px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #3c6384;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  text-align: center;
}

.schedule-stack-note.is-conflict {
  background: rgba(201, 91, 91, 0.13);
  color: #b23b3b;
}

.schedule-block-label {
  display: block;
  width: 100%;
  min-width: 0;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  color: rgba(37, 49, 65, 0.82);
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.28);
  white-space: nowrap;
}

.schedule-block-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.schedule-block-tags b {
  display: inline-flex;
  max-width: 100%;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--text);
  font-size: 9px;
  font-weight: 850;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
  .schedule-matrix td {
    transition: none;
  }

  .schedule-matrix tbody td:hover,
  .schedule-matrix tbody td:focus-within {
    transform: none;
  }
}

.schedule-continuation {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 24px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 4px;
  border: 0;
  border-radius: 0;
  background: rgba(109, 168, 206, 0.72);
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  text-align: center;
}

.schedule-continuation.is-pending {
  opacity: 0.58;
}

.schedule-stack-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.schedule-stack-row {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.schedule-stack-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.schedule-stack-row span {
  color: var(--muted);
  font-size: 12px;
}

.schedule-stack-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
  margin: 0;
}

.schedule-stack-detail-grid div {
  min-width: 0;
}

.schedule-stack-detail-grid dt,
.schedule-stack-detail-grid dd {
  margin: 0;
  min-width: 0;
}

.schedule-stack-detail-grid dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.schedule-stack-detail-grid dd {
  color: var(--text);
  font-size: 12px;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.schedule-staging-summary {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(57, 125, 170, 0.16);
  border-radius: 8px;
  background: rgba(238, 247, 253, 0.72);
}

.schedule-staging-summary.is-none {
  grid-template-columns: auto minmax(0, 1fr);
  background: rgba(17, 24, 39, 0.035);
}

.schedule-staging-thumb,
.admin-image-loading-frame.schedule-staging-thumb {
  width: 54px;
  height: 64px;
  min-height: 64px;
  overflow: hidden;
  border-radius: 7px;
  object-fit: cover;
}

.schedule-staging-thumb-empty {
  display: grid;
  place-items: center;
  background: rgba(57, 125, 170, 0.1);
  color: var(--blue-strong);
  font-weight: 900;
}

.schedule-staging-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

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

.schedule-staging-main strong {
  color: var(--text);
  font-size: 13px;
}

.schedule-staging-main small {
  color: var(--muted);
  font-size: 11px;
}

.schedule-staging-status {
  color: var(--blue-strong) !important;
  font-size: 10px !important;
  font-weight: 900;
}

.schedule-staging-summary.is-none .schedule-staging-status {
  color: var(--muted) !important;
}

.order-staging-readonly-dialog {
  width: min(760px, calc(100vw - 32px));
  max-width: 760px;
  max-height: min(860px, calc(100vh - 32px));
  padding: 0;
  overflow: hidden;
}

.order-staging-readonly-dialog > form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: inherit;
}

.order-staging-readonly-content {
  display: grid;
  gap: 12px;
  padding: 14px;
  overflow: auto;
}

.order-staging-readonly-overview {
  display: grid;
  gap: 3px;
}

.order-staging-readonly-overview span,
.order-staging-readonly-overview small {
  color: var(--muted);
  font-size: 11px;
}

.order-staging-readonly-overview strong {
  color: var(--text);
  font-size: 17px;
}

.order-staging-readonly-scene {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.order-staging-readonly-scene h3,
.order-staging-readonly-scene p {
  margin: 0;
}

.order-staging-readonly-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
}

.order-staging-readonly-image,
.admin-image-loading-frame.order-staging-readonly-image {
  width: 100%;
  height: 160px;
  min-height: 160px;
  overflow: hidden;
  border-radius: 7px;
  object-fit: cover;
}

.order-staging-readonly-image-empty,
.order-staging-readonly-empty {
  color: var(--muted);
  font-size: 12px;
}

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

.order-staging-readonly-grid div {
  min-width: 0;
}

.order-staging-readonly-grid dt,
.order-staging-readonly-grid dd {
  margin: 0;
}

.order-staging-readonly-grid dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.order-staging-readonly-grid dd {
  margin-top: 2px;
  color: var(--text);
  font-size: 12px;
  font-weight: 760;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .schedule-staging-summary {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .schedule-staging-summary > button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .schedule-staging-thumb,
  .admin-image-loading-frame.schedule-staging-thumb {
    width: 48px;
    height: 58px;
    min-height: 58px;
  }

  .order-staging-readonly-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .order-staging-readonly-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .order-staging-readonly-images {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.schedule-stack-remark {
  margin: 0;
  padding: 7px 8px;
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.035);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.schedule-table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.schedule-table-wrap.compact {
  max-height: 320px;
}

.schedule-summary-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  table-layout: fixed;
}

.schedule-summary-table th,
.schedule-summary-table td {
  padding: 9px 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  vertical-align: middle;
}

.schedule-summary-table th {
  background: #f7f9fb;
  color: var(--muted);
  font-weight: 850;
}

.schedule-summary-table tbody tr:hover {
  background: linear-gradient(90deg, rgba(255, 241, 245, 0.68), rgba(240, 242, 255, 0.46));
}

.schedule-summary-table strong {
  color: var(--ink);
  font-weight: 850;
}

.schedule-summary-table .inline-actions {
  margin-top: 0;
  flex-wrap: nowrap;
}

.schedule-usage-status {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-strong);
  font-size: 11px;
  font-weight: 850;
}

.schedule-usage-bar {
  display: block;
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.06);
}

.schedule-usage-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pink), var(--blue));
}

.schedule-subhead {
  margin: 16px 0 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
}

.studio-usage-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 20px 20px;
}

.studio-usage-card {
  display: grid;
  gap: 6px;
  min-height: 96px;
  padding: 13px;
  border: 1px solid rgba(17, 24, 39, 0.07);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.82);
}

.studio-usage-card strong {
  font-size: 14px;
}

.studio-usage-card span {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-strong);
  font-size: 11px;
  font-weight: 850;
}

.studio-usage-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
