:root {
  --navy: #082f5f;
  --navy-2: #0f4277;
  --teal: #0f9b8e;
  --teal-dark: #08776e;
  --teal-light: #e4f7f4;
  --bg: #edf5fb;
  --panel: #fbfdff;
  --line: #d6e2ed;
  --text: #1d2a3f;
  --muted: #66768c;
  --white: #fff;
  --warn: #f39800;
  --warn-bg: #fff5e6;
  --danger: #e25b55;
  --danger-bg: #fdeceb;
  --shadow: 0 18px 42px rgba(8, 47, 95, .18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #f7fbff 0%, var(--bg) 100%);
  color: var(--text);
  font-family: "Yu Gothic", "Meiryo", system-ui, sans-serif;
  letter-spacing: 0;
}

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

.app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.phone {
  width: min(100%, 414px);
  min-height: min(100vh - 36px, 874px);
  background: var(--white);
  border: 1px solid #bfd2e4;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.phone::before {
  content: "9:41";
  min-height: 22px;
  background: #073565;
  color: var(--white);
  display: flex;
  align-items: center;
  padding: 0 22px;
  font-size: 12px;
  font-weight: 900;
}

.topbar {
  min-height: 56px;
  background: #073565;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px 2px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset;
}

.brand {
  font-size: 23px;
  font-weight: 900;
  letter-spacing: .2px;
}

.user-chip {
  border: 0;
  background: rgba(255, 255, 255, .14);
  color: var(--white);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 800;
}

.worker-context-bar {
  min-height: 58px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 22px;
}

.worker-context-bar > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.worker-context-bar b {
  color: var(--navy);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worker-context-bar > div span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.worker-context-bar button,
.admin-context-bar button {
  border: 0;
  background: transparent;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.worker-context-bar button span,
.admin-context-bar button span {
  width: 20px;
  height: 20px;
  border: 1px solid currentColor;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.content {
  flex: 1;
  padding: 20px 22px 22px;
  overflow: auto;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(255, 255, 255, 1));
}

.footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  padding: 14px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  display: flex;
  gap: 12px;
  box-shadow: 0 -8px 18px rgba(8, 47, 95, .045);
}

.footer .button {
  flex: 1;
}

.hidden {
  display: none !important;
}

.login-panel {
  width: min(460px, calc(100% - 36px));
  margin: 34px auto 0;
  padding-top: 0;
}

.login-panel .button {
  width: 100%;
}

.login-support-actions {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  text-align: center;
}

.login-support-actions button {
  border: 0;
  background: transparent;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.login-support-actions span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.ticket-home {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ticket-day {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.schedule-view,
.history-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ticket-home-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ticket-home-head h1,
.ticket-home-head .sub {
  margin-bottom: 0;
}

.home-next-summary {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 13px;
  padding: 13px;
  box-shadow: 0 8px 18px rgba(8, 47, 95, .045);
}

.home-today-summary-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.home-today-summary-head h2 {
  color: var(--navy);
  font-size: 15px;
  margin: 0;
}

.home-today-summary-head span {
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
}

.home-next-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  border: 1px solid #d8e8f2;
  border-radius: 11px;
  background: linear-gradient(180deg, #f9fcff 0%, #f1f8fb 100%);
  padding: 11px 12px;
}

.home-next-body div,
.home-next-body b,
.home-next-body span {
  min-width: 0;
}

.home-next-body b,
.home-next-body span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-next-body b {
  color: var(--navy);
  font-size: 15px;
  font-weight: 900;
  margin-bottom: 3px;
}

.home-next-body span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.home-next-body em {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #edf2f7;
  color: var(--muted);
  padding: 5px 9px;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.home-next-body em.is-waiting {
  background: var(--warn-bg);
  color: #875900;
}

.home-next-body em.is-danger {
  background: var(--danger-bg);
  color: #8b2823;
}

.home-next-body em.is-done {
  background: var(--teal-light);
  color: var(--teal-dark);
}

.home-today-count-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
  padding: 14px;
  margin-bottom: 10px;
}

.home-today-count-card span,
.home-today-status span {
  display: block;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 8px;
}

.home-today-count-card strong {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--navy);
  font-size: 20px;
  font-weight: 900;
}

.home-today-count-card b {
  font-size: 40px;
  line-height: 1;
}

.home-today-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.home-today-status {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
}

.home-today-status strong {
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  gap: 5px;
  color: var(--teal-dark);
  font-size: 14px;
  font-weight: 900;
}

.home-today-status b {
  font-size: 24px;
  line-height: 1;
}

.home-today-status.is-waiting span,
.home-today-status.is-waiting strong {
  color: #d66f00;
}

.home-today-status.is-done span,
.home-today-status.is-done strong {
  color: var(--teal-dark);
}

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

.section-mini-head h2 {
  font-size: 16px;
  margin: 0;
}

.section-mini-head span {
  min-width: 42px;
  border-radius: 999px;
  background: var(--teal-light);
  color: var(--teal-dark);
  padding: 4px 9px;
  text-align: center;
  font-size: 11px;
  font-weight: 900;
}

.home-focus-section {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

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

.home-ticket-card {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 13px;
  padding: 13px;
  box-shadow: 0 10px 24px rgba(8, 47, 95, .055);
}

.home-ticket-card.is-waiting {
  border-color: #f1d994;
  background: linear-gradient(180deg, #fff 0%, #fffaf0 100%);
}

.home-ticket-card.is-danger {
  border-color: #f0b6b3;
  background: linear-gradient(180deg, #fff 0%, #fff6f5 100%);
}

.home-ticket-card.is-done {
  background: #f7fbfe;
}

.home-ticket-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.home-ticket-main h3 {
  margin: 2px 0 2px;
  font-size: 15px;
  line-height: 1.32;
}

.home-ticket-main p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.home-ticket-time {
  color: var(--navy);
  font-size: 11px;
  font-weight: 900;
}

.home-ticket-main em {
  display: block;
  flex: 0 0 auto;
  width: fit-content;
  border-radius: 999px;
  background: var(--teal-light);
  color: var(--teal-dark);
  padding: 4px 8px;
  font-style: normal;
  font-size: 10px;
  font-weight: 900;
}

.home-ticket-main em.is-waiting {
  background: var(--warn-bg);
  color: #75510c;
}

.home-ticket-main em.is-danger {
  background: var(--danger-bg);
  color: #8b2823;
}

.home-ticket-main em.is-done {
  background: #edf2f7;
  color: var(--muted);
}

.text-link-button {
  border: 0;
  background: transparent;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.app-screen-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.app-screen-head h1,
.app-screen-head .sub {
  margin-bottom: 0;
}

.app-back-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #eef6fb;
  color: var(--navy);
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
}

.app-back-button.small {
  width: 34px;
  height: 34px;
  font-size: 24px;
  flex: 0 0 auto;
}

.compact-button {
  min-height: 38px;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 12px;
  flex: 0 0 auto;
}

.ticket-month-nav {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
  margin: 2px 0 0;
}

.ticket-month-current {
  border: 0;
  background: transparent;
  border-radius: 0;
  padding: 0;
  text-align: center;
}

.ticket-month-current span {
  display: none;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  margin-bottom: 2px;
}

.ticket-month-current h2 {
  margin: 0;
  font-size: 23px;
  color: #111827;
  letter-spacing: 0;
}

.schedule-view .month-nav-button {
  width: 38px;
  height: 38px;
}

.schedule-view .month-nav-button span {
  font-size: 26px;
}

.mobile-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px 4px;
  padding: 4px 2px 0;
  will-change: transform, opacity;
}

.mobile-calendar.is-slide-next {
  animation: mobile-calendar-slide-next .28s cubic-bezier(.2, .75, .35, 1) both;
}

.mobile-calendar.is-slide-prev {
  animation: mobile-calendar-slide-prev .28s cubic-bezier(.2, .75, .35, 1) both;
}

@keyframes mobile-calendar-slide-next {
  from {
    opacity: .35;
    transform: translateX(24px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes mobile-calendar-slide-prev {
  from {
    opacity: .35;
    transform: translateX(-24px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.mobile-calendar-weekday {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-align: center;
  padding: 2px 0 4px;
}

.mobile-calendar-cell {
  min-height: 49px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  padding: 2px;
  overflow: hidden;
  cursor: pointer;
  text-align: center;
}

.mobile-calendar-cell.is-empty {
  border-color: transparent;
  background: transparent;
  cursor: default;
}

.mobile-calendar-cell.is-selected {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.mobile-calendar-day {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #111827;
  font-size: 14px;
  font-weight: 900;
  margin: 0 auto 4px;
  border-radius: 999px;
}

.mobile-calendar-cell.is-selected .mobile-calendar-day {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 8px 16px rgba(15, 155, 142, .22);
}

.mobile-calendar-items {
  min-height: 20px;
  display: grid;
  place-items: center;
  gap: 2px;
}

.mobile-calendar-ticket {
  display: block;
  width: min(62px, calc(100% + 16px));
  border: 0;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  padding: 3px 7px;
  margin: 0 auto;
  text-align: center;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.25;
  cursor: pointer;
  overflow: hidden;
}

.mobile-calendar-ticket span,
.mobile-calendar-ticket b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-calendar-ticket span {
  display: none;
}

.mobile-calendar-ticket.is-waiting {
  background: var(--warn);
  color: #fff;
}

.mobile-calendar-ticket.is-done {
  background: var(--teal);
  color: #fff;
}

.mobile-calendar-ticket.is-danger {
  background: var(--danger);
  color: #fff;
}

.mobile-calendar-ticket.is-count {
  width: 42px;
  background: var(--teal);
  font-size: 10px;
}

.mobile-calendar-dot {
  width: 6px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: var(--teal);
  padding: 0;
  cursor: pointer;
}

.mobile-calendar-dot.is-waiting {
  background: var(--warn);
}

.mobile-calendar-dot.is-done {
  background: var(--teal);
}

.mobile-calendar-dot.is-danger {
  background: var(--danger);
}

.mobile-calendar .calendar-more {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.ticket-agenda-panel {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 14px;
  padding: 12px;
}

.ticket-agenda-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.ticket-agenda-heading .sub {
  margin-bottom: 0;
}

.schedule-day-preview {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 13px;
  padding: 12px;
  box-shadow: 0 8px 18px rgba(8, 47, 95, .045);
}

.schedule-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.schedule-preview-head b,
.schedule-preview-head span,
.schedule-preview-empty b,
.schedule-preview-empty span {
  display: block;
}

.schedule-preview-head b,
.schedule-preview-empty b {
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 2px;
}

.schedule-preview-head span,
.schedule-preview-empty span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.schedule-preview-list {
  display: grid;
  gap: 7px;
}

.schedule-preview-ticket,
.schedule-preview-more {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f8fbfe;
  color: var(--text);
  min-height: 42px;
  padding: 8px 9px;
  text-align: left;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.schedule-preview-ticket span,
.schedule-preview-ticket b,
.schedule-preview-ticket em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-preview-ticket span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.schedule-preview-ticket b {
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
}

.schedule-preview-ticket em {
  border-radius: 999px;
  background: var(--teal-light);
  color: var(--teal-dark);
  padding: 3px 7px;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.schedule-preview-ticket.is-waiting {
  border-color: #f1d994;
  background: var(--warn-bg);
}

.schedule-preview-ticket.is-danger {
  border-color: #f0b6b3;
  background: var(--danger-bg);
}

.schedule-preview-ticket.is-done {
  background: #f7fbfe;
}

.schedule-preview-more {
  display: block;
  text-align: center;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
}

.schedule-preview-empty {
  display: grid;
  gap: 2px;
  border: 1px dashed #b8cde0;
  border-radius: 11px;
  background: #f8fbfe;
  padding: 12px;
}

.ticket-agenda {
  display: grid;
  gap: 8px;
  max-height: none;
  overflow: visible;
}

.ticket-agenda-item {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 11px;
  padding: 10px;
  text-align: left;
}

.ticket-agenda-item.is-focused {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 159, 143, .14);
}

.ticket-agenda-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.ticket-agenda-item b {
  display: block;
  color: var(--navy);
  font-size: 14px;
  line-height: 1.35;
  margin-bottom: 2px;
}

.ticket-agenda-item span,
.ticket-visit-grid dd {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.ticket-agenda-item em {
  display: block;
  flex: 0 0 auto;
  width: fit-content;
  border-radius: 999px;
  background: var(--teal-light);
  color: var(--teal-dark);
  padding: 2px 8px;
  font-style: normal;
  font-size: 10px;
  font-weight: 900;
}

.ticket-agenda-item em.is-waiting {
  background: var(--warn-bg);
  color: #75510c;
}

.ticket-agenda-item em.is-danger {
  background: var(--danger-bg);
  color: #8b2823;
}

.ticket-agenda-item em.is-done {
  background: #edf2f7;
  color: var(--muted);
}

.ticket-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 6px;
}

.ticket-card-meta span {
  border-radius: 999px;
  background: #edf5fa;
  color: var(--navy);
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 900;
}

.ticket-card-address {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  word-break: break-word;
}

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

.ticket-visit-grid div {
  min-width: 0;
}

.ticket-visit-grid .is-full {
  grid-column: 1 / -1;
}

.ticket-visit-grid dt {
  color: var(--navy);
  font-size: 10px;
  font-weight: 900;
  margin-bottom: 2px;
}

.ticket-visit-grid dd {
  margin: 0;
  word-break: break-word;
}

.ticket-card-actions {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 8px;
  margin-top: 9px;
}

.ticket-card-actions .mini-button,
.ticket-card-actions .ticket-report-button {
  display: inline-flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  justify-content: center;
  text-align: center;
  text-decoration: none;
}

.ticket-card-actions .ticket-report-button {
  box-shadow: 0 8px 18px rgba(15, 159, 143, .18);
}

.ticket-card-actions .ticket-report-button.secondary {
  box-shadow: none;
}

.ticket-card-actions.has-response .ticket-report-button {
  grid-column: 1 / -1;
}

.report-context-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  background: #f7fbfe;
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 14px;
}

.report-context-bar span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-align: right;
}

input[readonly],
textarea[readonly],
select:disabled {
  background: #f4f8fb;
  color: #536478;
  cursor: default;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  color: var(--navy);
  font-size: 22px;
  margin-bottom: 8px;
}

h2 {
  color: var(--navy);
  font-size: 20px;
  line-height: 1.28;
  margin-bottom: 4px;
}

h3 {
  color: var(--navy);
  font-size: 16px;
  margin-bottom: 10px;
}

.sub {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  margin-bottom: 16px;
}

.step-label {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 6px;
}

.progress {
  display: flex;
  gap: 0;
  align-items: center;
  margin: 18px 0 22px;
  padding: 0 2px;
}

.progress span {
  position: relative;
  height: 2px;
  flex: 1;
  border-radius: 0;
  background: #dce3ea;
}

.progress span::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #dce3ea;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 4px #fff;
}

.progress span.active {
  background: var(--teal);
}

.progress span.active::before {
  background: var(--teal);
}

.field {
  margin-bottom: 14px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

label {
  display: block;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 6px;
}

.field-label-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.field-label-row label {
  margin-bottom: 0;
}

.optional-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.form-hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.5;
}

.field-help {
  position: relative;
  flex: 0 0 auto;
}

.field-help summary {
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f6fbff;
  color: var(--navy);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.field-help summary::-webkit-details-marker {
  display: none;
}

.field-help[open] summary {
  border-color: var(--teal);
  background: var(--teal-light);
  color: var(--teal-dark);
}

.field-help div {
  position: absolute;
  right: 0;
  top: 30px;
  z-index: 10;
  width: min(312px, calc(100vw - 72px));
  border: 1px solid #b8d7ee;
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 14px 30px rgba(8, 47, 95, .16);
  padding: 12px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.65;
}

.required::after {
  content: " 必須";
  color: var(--danger);
  font-size: 10px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--text);
  border-radius: 12px;
  min-height: 48px;
  padding: 11px 12px;
  outline: none;
}

textarea {
  min-height: 76px;
  line-height: 1.6;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 159, 143, .12);
}

input.is-invalid {
  border-color: #e25b55;
  background: #fff8f8;
}

input.is-invalid:focus {
  border-color: #e25b55;
  box-shadow: 0 0 0 3px rgba(226, 91, 85, .14);
}

input.is-warning {
  border-color: #e8b24c;
  background: #fffaf0;
}

input.is-warning:focus {
  border-color: #e8b24c;
  box-shadow: 0 0 0 3px rgba(243, 152, 0, .14);
}

.field-feedback {
  margin-top: 6px;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.5;
}

.field-feedback.is-error {
  border: 1px solid #f0b6b3;
  background: var(--danger-bg);
  color: #8b2823;
}

.field-feedback.is-warning {
  border: 1px solid #f1d994;
  background: var(--warn-bg);
  color: #75510c;
  cursor: pointer;
}

.field-feedback.is-info,
.field-feedback.is-ok {
  border: 1px solid #bde5df;
  background: var(--teal-light);
  color: var(--teal-dark);
}

.button {
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  padding: 0 14px;
  background: linear-gradient(180deg, #12aa9d 0%, #07877b 100%);
  color: var(--white);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(15, 155, 142, .2);
}

.button:hover {
  background: linear-gradient(180deg, #0f9b8e 0%, #08776e 100%);
}

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

.button.secondary {
  color: var(--navy);
  background: linear-gradient(180deg, #fff 0%, #eef5fb 100%);
  border: 1px solid var(--line);
  box-shadow: none;
}

.button.danger {
  background: var(--danger);
}

.button.text {
  background: transparent;
  color: var(--navy);
  border: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--teal-light);
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
}

.notice {
  border: 1px solid #f1d994;
  background: var(--warn-bg);
  color: #75510c;
  border-radius: 13px;
  padding: 12px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.6;
  margin-bottom: 14px;
}

.notice.muted {
  border-color: var(--line);
  background: #f7fbff;
  color: var(--muted);
}

.ticket-select-list,
.response-panel {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 12px;
  padding: 12px;
  margin: 12px 0 16px;
}

.ticket-select-title {
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 8px;
}

.ticket-select-item {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 10px;
  padding: 10px;
  margin-top: 8px;
  text-align: left;
  cursor: pointer;
}

.ticket-select-item.active {
  border-color: var(--teal);
  background: var(--teal-light);
}

.ticket-select-item b,
.ticket-select-item span {
  display: block;
}

.ticket-select-item b {
  color: var(--navy);
  font-size: 13px;
  margin-bottom: 3px;
}

.ticket-select-item span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.conditional-panel {
  border: 1px solid var(--line);
  background: #f7fbfe;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
}

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

.report-type-toggle label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  padding: 0 12px;
  margin-bottom: 0;
  cursor: pointer;
}

.report-type-toggle input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--teal);
}

.report-type-toggle span {
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
}

.robot-workflow-panel {
  border: 1px solid #b8d7ee;
  background: #f8fcff;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
}

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

.robot-workflow-head b {
  color: var(--navy);
  font-size: 13px;
}

.error {
  border: 1px solid #f0b6b3;
  background: var(--danger-bg);
  color: #8b2823;
  border-radius: 12px;
  padding: 12px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.6;
  margin-bottom: 14px;
}

.info-message {
  border: 1px solid #9fd9d1;
  background: var(--teal-light);
  color: var(--teal-dark);
  border-radius: 12px;
  padding: 12px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.6;
  margin-bottom: 14px;
}

.upload-area {
  border: 1.5px dashed #bccbda;
  background: #f8fbfe;
  border-radius: 13px;
  min-height: 136px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--navy);
  font-weight: 900;
  margin-bottom: 12px;
  cursor: pointer;
}

.upload-area.compact {
  min-height: 96px;
  border-radius: 12px;
  margin-bottom: 8px;
  font-size: 13px;
}

.photo-slot-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.photo-slot-grid.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.photo-capture-board {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.photo-task-group {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 8px 18px rgba(8, 47, 95, .045);
}

.photo-task-group.is-required {
  border-color: #cfddeb;
  background: #fff;
}

.photo-task-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.photo-task-head b {
  display: block;
  color: var(--navy);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.4;
}

.photo-task-head span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.5;
  margin-top: 2px;
}

.photo-task-head em {
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  padding: 5px 8px;
  white-space: nowrap;
}

.photo-slot {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 13px;
  padding: 10px;
}

.photo-slot.is-complete {
  border-color: #8fd2c9;
  background: #f2fbf9;
}

.photo-slot.is-optional {
  background: #fbfdff;
}

.photo-slot-title {
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 8px;
}

.photo-source-actions {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: 6px;
  margin-bottom: 8px;
}

.photo-source-button {
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--navy);
  padding: 6px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
  cursor: pointer;
}

.photo-source-button.camera {
  border-color: var(--teal);
  background: var(--teal);
  color: var(--white);
  box-shadow: 0 6px 12px rgba(15, 155, 142, .16);
}

.photo-source-button:focus-visible {
  outline: 3px solid rgba(15, 155, 142, .2);
  outline-offset: 2px;
}

.photo-slot-meta {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.5;
}

.photo-slot.is-complete .photo-slot-meta {
  color: var(--teal-dark);
}

.rfid-toggle {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  background: #f8fbfe;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 0;
}

.rfid-toggle input {
  width: 22px;
  min-height: 22px;
  accent-color: var(--teal);
  flex: 0 0 auto;
}

.rfid-toggle b,
.rfid-toggle small {
  display: block;
}

.rfid-toggle b {
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
}

.rfid-toggle small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.5;
  margin-top: 2px;
}

.rfid-photo-section {
  margin-top: 12px;
}

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

.section-heading .sub {
  margin-bottom: 0;
}

.deployment-list,
.deployment-detail-list,
.schedule-day-list,
.schedule-summary-list,
.process-check-list {
  display: grid;
  gap: 12px;
}

.deployment-card,
.deployment-detail-item,
.schedule-day-card,
.schedule-summary-item,
.process-check-item {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 14px;
  padding: 12px;
}

.deployment-card-head,
.deployment-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.deployment-card-head strong,
.deployment-detail-head b {
  color: var(--navy);
  font-weight: 900;
}

.deployment-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.deployment-flags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fbfe;
  color: var(--muted);
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 900;
}

.deployment-assignment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.deployment-assignment-row select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--navy);
  padding: 7px 9px;
  font-size: 12px;
}

.dispatch-readiness {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 8px;
  padding: 14px 16px;
  background: #f8fbfe;
}

.dispatch-readiness > div:first-child {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.dispatch-readiness b {
  color: var(--navy);
  font-size: 15px;
}

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

.dispatch-readiness.is-ready {
  border-left-color: var(--teal);
  background: #f2fbf9;
}

.dispatch-readiness.is-blocked {
  border-left-color: #e5a21a;
  background: #fffaf0;
}

.readiness-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.readiness-checks span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--white);
  font-weight: 800;
}

.readiness-checks .done {
  border-color: #8fd3c8;
  color: var(--teal-dark);
}

.readiness-checks .waiting {
  border-color: #ecc77e;
  color: #945e00;
}

.audit-timeline {
  display: grid;
  border-top: 1px solid var(--line);
}

.audit-event {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(150px, 1fr) minmax(180px, 1.4fr);
  gap: 12px;
  align-items: center;
  min-height: 42px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.audit-event span,
.audit-event small {
  color: var(--muted);
}

.audit-event b {
  color: var(--navy);
}

.detail-disclosure {
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  overflow: hidden;
}

.detail-disclosure summary {
  cursor: pointer;
  list-style: none;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 15px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
}

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

.detail-disclosure summary::after {
  content: "+";
  color: var(--muted);
  font-size: 20px;
  font-weight: 500;
}

.detail-disclosure[open] summary::after {
  content: "-";
}

.detail-disclosure .summary {
  margin: 0;
  border-width: 1px 0 0;
  border-radius: 0;
}

@media (max-width: 760px) {
  .audit-event {
    grid-template-columns: 1fr;
    gap: 3px;
    padding: 9px 0;
  }
}

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

.skill-check-grid label {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.skill-check-grid label:has(input:checked) {
  border-color: #76c9bd;
  background: var(--teal-light);
  color: var(--teal-dark);
}

.skill-check-grid input {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--teal);
}

.compact-section {
  margin-top: 10px;
  padding-top: 12px;
}

.schedule-summary-item {
  display: grid;
  gap: 4px;
}

.schedule-summary-item b {
  color: var(--navy);
  font-weight: 900;
}

.schedule-summary-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.process-check-item {
  display: grid;
  grid-template-columns: auto minmax(140px, 1fr) 150px minmax(160px, 1.2fr);
  gap: 10px;
  align-items: center;
}

.process-check-item > span {
  display: grid;
  gap: 3px;
}

.process-check-item b {
  color: var(--navy);
  font-weight: 900;
}

.process-check-item em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.process-check-item.is-readonly {
  background: #f4f7fa;
  opacity: .72;
}

.photo-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.photo-list.single {
  grid-template-columns: 1fr;
  margin-bottom: 8px;
}

.photo-list img {
  width: 100%;
  height: 76px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #eef6fb;
}

.photo-list.single img {
  height: 118px;
}

@media (max-width: 390px) {
  .photo-slot-grid.two-col {
    grid-template-columns: 1fr;
  }
}

.check-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 13px;
  padding: 12px;
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 800;
}

.check-row input {
  width: 20px;
  min-height: 20px;
  accent-color: var(--teal);
  margin: 0;
  flex: 0 0 auto;
}

.route-card {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 8px 18px rgba(8, 47, 95, .045);
}

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

.route-title {
  color: var(--navy);
  font-size: 14px;
  font-weight: 900;
}

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

.mini-button {
  border: 0;
  border-radius: 999px;
  min-height: 26px;
  padding: 0 9px;
  color: var(--navy);
  background: #eef6fb;
  font-size: 11px;
  font-weight: 900;
}

.mini-button.delete {
  color: var(--danger);
  background: var(--danger-bg);
}

.signature-pad {
  width: 100%;
  height: 150px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  touch-action: none;
}

.signature-pad.is-disabled {
  opacity: .5;
  background: #edf2f7;
  touch-action: auto;
}

.customer-absence-block {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 14px;
}

.customer-absence-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fff 0%, #f8fbfe 100%);
  border-radius: 13px;
  padding: 12px;
  margin-bottom: 12px;
  cursor: pointer;
}

.customer-absence-toggle input {
  width: 22px;
  min-height: 22px;
  accent-color: var(--teal);
  flex: 0 0 auto;
}

.customer-absence-toggle span {
  display: grid;
  gap: 2px;
}

.customer-absence-toggle b {
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
}

.customer-absence-toggle small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.summary {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  overflow: hidden;
  margin-bottom: 14px;
}

.compact-summary {
  margin-top: 10px;
  margin-bottom: 0;
}

.summary-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.5;
}

.summary-row:last-child {
  border-bottom: 0;
}

.summary-row b {
  color: var(--navy);
}

.complete {
  text-align: center;
  padding: 44px 0;
}

.complete-mark {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  margin: 0 auto 24px;
  background: var(--teal-light);
  display: grid;
  place-items: center;
  color: var(--teal);
  font-size: 56px;
  font-weight: 900;
}

.receipt-no {
  color: var(--navy);
  font-size: 20px;
  font-weight: 900;
  margin: 16px 0 24px;
}

.complete-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.bottom-nav {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  padding: 8px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 18px rgba(8, 47, 95, .045);
}

.bottom-nav-button {
  min-width: 0;
  min-height: 54px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  cursor: pointer;
}

.bottom-nav-button span {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: inherit;
  font-size: 12px;
  font-weight: 900;
}

.bottom-nav-button svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.bottom-nav-button b {
  display: block;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
}

.bottom-nav-button.active {
  background: transparent;
  color: var(--teal-dark);
}

.bottom-nav-button.active span {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 8px 16px rgba(15, 155, 142, .22);
}

.history-segment {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 4px;
  gap: 4px;
}

.history-segment button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  min-height: 30px;
  font-size: 11px;
  font-weight: 900;
}

.history-segment button.active {
  background: var(--teal-light);
  color: var(--teal-dark);
}

.empty-state.compact {
  padding: 16px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.6;
}

.admin-shell {
  min-height: 100vh;
  padding: 0;
  max-width: none;
  margin: 0 auto;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 520px;
  margin: 0 auto 18px;
  padding: 54px 18px 0;
}

.admin-brand-lockup {
  width: 100%;
}

.admin-company-logo {
  display: block;
  width: min(270px, 78vw);
  height: auto;
  margin-bottom: 20px;
}

.admin-brand-lockup h1 {
  margin-bottom: 6px;
}

body.admin-mode .admin-header {
  display: none;
}

body.admin-mode {
  font-family: "Noto Sans JP", "BIZ UDPGothic", "Yu Gothic", "Meiryo", sans-serif;
  font-size: 14px;
}

.admin-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 12px;
  background: #073565;
  border-right: 0;
  color: var(--white);
}

.sidebar-brand {
  padding: 0 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.sidebar-brand span {
  display: block;
}

.sidebar-company-logo {
  display: block;
  width: 100%;
  height: auto;
  box-sizing: border-box;
  padding: 13px 12px;
  border-radius: 6px;
  background: var(--white);
}

.sidebar-brand span {
  color: rgba(255, 255, 255, .88);
  font-size: 13px;
  font-weight: 800;
  margin: 9px 8px 0;
}

.sidebar-user {
  display: grid;
  gap: 3px;
  margin: -4px 4px 2px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
}

.sidebar-user b {
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.sidebar-user span {
  color: #9fe7dc;
  font-size: 12px;
  font-weight: 700;
}

.sidebar-user .sidebar-user-company {
  color: rgba(255, 255, 255, .72);
  font-size: 10px;
}

.admin-main {
  min-width: 0;
  padding: 16px 18px 24px;
}

.admin-context-bar {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  padding: 7px 12px;
}

.admin-context-bar > div {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.admin-context-bar b {
  color: var(--navy);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-context-bar > div span {
  border-left: 1px solid var(--line);
  color: var(--muted);
  padding-left: 9px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

#logout {
  margin-top: auto;
}

.admin-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 18px;
  align-items: start;
}

.admin-tabs {
  display: grid;
  gap: 8px;
}

.tab-button {
  width: 100%;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, .78);
  border-radius: 12px;
  min-height: 44px;
  padding: 0 12px;
  font-weight: 900;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border-radius: 7px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 700;
}

.tab-button > span {
  width: 22px;
  color: #b8d8ee;
  text-align: center;
  font-size: 16px;
  font-weight: 900;
}

.tab-button:hover {
  background: rgba(255, 255, 255, .1);
}

.tab-button.active {
  background: rgba(255, 255, 255, .14);
  color: var(--white);
  box-shadow: inset 4px 0 0 var(--teal);
}

.admin-view {
  margin-top: 12px;
}

.admin-ticket-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  gap: 12px;
  align-items: start;
}

.admin-ticket-dashboard .admin-view {
  margin-top: 0;
}

.admin-ticket-dashboard .ticket-filter-bar {
  grid-template-columns: minmax(160px, 1.15fr) minmax(100px, .62fr) minmax(108px, .66fr) minmax(125px, .76fr) minmax(100px, .62fr) minmax(100px, .62fr) minmax(68px, auto);
  gap: 8px;
  padding: 10px;
}

.admin-ticket-dashboard .ticket-filter-bar input,
.admin-ticket-dashboard .ticket-filter-bar select {
  min-height: 40px;
  padding: 8px 10px;
  font-size: 13px;
}

.admin-ticket-dashboard .ticket-filter-bar label {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 5px;
}

.admin-ticket-dashboard .ticket-filter-bar .button {
  min-height: 38px;
  padding: 0 10px;
}

.admin-mode .panel,
.admin-mode .admin-quick-filters,
.admin-mode .admin-todo-panel {
  border-radius: 8px;
}

.admin-mode .ticket-filter-bar,
.admin-mode .issue-table-wrap {
  border-radius: 7px;
}

.admin-mode .button {
  border-radius: 8px;
}

.admin-quick-filters {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 14px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  box-shadow: 0 8px 20px rgba(8, 47, 95, .045);
  margin-bottom: 10px;
}

.quick-filter-label {
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  padding: 0 8px 0 3px;
  white-space: nowrap;
}

.ticket-quick-filter {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--navy);
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 0 10px;
  cursor: pointer;
}

.ticket-quick-filter span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ticket-quick-filter b {
  color: var(--navy);
  font-size: 14px;
  font-weight: 800;
}

.ticket-quick-filter.active {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 8px 16px rgba(8, 47, 95, .14);
}

.ticket-quick-filter.active span,
.ticket-quick-filter.active b {
  color: var(--white);
}

.ticket-quick-filter.is-danger b {
  color: var(--danger);
}

.ticket-quick-filter.is-waiting b {
  color: var(--warn);
}

.ticket-quick-filter.active.is-danger b,
.ticket-quick-filter.active.is-waiting b {
  color: var(--white);
}

.quick-risk-summary {
  min-height: 32px;
  border: 1px solid #bce5dd;
  border-radius: 999px;
  background: var(--teal-light);
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  margin-left: auto;
  padding: 0 12px;
  white-space: nowrap;
}

.quick-risk-summary span,
.quick-risk-summary small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.quick-risk-summary b {
  color: var(--teal-dark);
  font-size: 14px;
  font-weight: 900;
}

.quick-risk-summary.is-danger {
  border-color: #f0b6b3;
  background: var(--danger-bg);
}

.quick-risk-summary.is-danger b {
  color: var(--danger);
}

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(19, 47, 78, .06);
  overflow: hidden;
}

.panel-body {
  padding: 18px;
}

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

.panel-heading h2 {
  margin-bottom: 2px;
  font-size: 22px;
  font-weight: 800;
}

.panel-heading .sub {
  margin-bottom: 0;
  font-size: 13px;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.ticket-workspace {
  display: block;
}

.ticket-filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) minmax(150px, .8fr) minmax(180px, 1fr) minmax(140px, .8fr) minmax(140px, .8fr) auto;
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  background: #f7fbfe;
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 10px;
}

.insight-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.admin-focus-board {
  margin-bottom: 14px;
}

.admin-focus-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff 0%, #f7fbfe 100%);
  box-shadow: 0 10px 24px rgba(19, 47, 78, .07);
  padding: 14px;
}

.admin-focus-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-focus-head h2,
.admin-focus-head .sub {
  margin-bottom: 0;
}

.admin-focus-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.admin-focus-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-height: 150px;
}

.admin-focus-card span,
.admin-focus-card strong,
.admin-focus-card p {
  display: block;
}

.admin-focus-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.admin-focus-card strong {
  color: var(--navy);
  font-size: 24px;
  line-height: 1.15;
  margin-top: 4px;
}

.admin-focus-card p {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.55;
  margin: 7px 0 0;
  overflow-wrap: anywhere;
}

.admin-focus-card.is-info {
  border-color: #b9d4e8;
  background: #f4fbff;
}

.admin-focus-card.is-waiting {
  border-color: #f1d994;
  background: var(--warn-bg);
}

.admin-focus-card.is-danger {
  border-color: #f0b6b3;
  background: var(--danger-bg);
}

.admin-focus-card.is-done {
  border-color: #bce5dd;
  background: var(--teal-light);
}

.admin-todo-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 8px 20px rgba(19, 47, 78, .055);
  overflow: hidden;
}

.admin-todo-head {
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--line);
}

.admin-todo-head h2 {
  margin: 0 0 4px;
  color: var(--navy);
  font-size: 18px;
}

.admin-risk-banner {
  margin: 10px 10px 0;
  border: 1px solid #bce5dd;
  border-radius: 10px;
  background: linear-gradient(135deg, #f3fffc 0%, #e4f7f4 100%);
  padding: 10px;
}

.admin-risk-banner.is-danger {
  border-color: #f0b6b3;
  background: linear-gradient(135deg, #fffafa 0%, var(--danger-bg) 100%);
}

.admin-risk-banner div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.admin-risk-banner span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.admin-risk-banner strong {
  color: var(--teal-dark);
  font-size: 22px;
  font-weight: 900;
}

.admin-risk-banner.is-danger strong {
  color: var(--danger);
}

.admin-risk-banner p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.55;
}

.admin-todo-list {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.admin-todo-empty {
  display: grid;
  gap: 3px;
  border: 1px dashed #b8cde0;
  border-radius: 10px;
  background: #f8fbfe;
  padding: 14px 12px;
}

.admin-todo-empty b {
  color: var(--navy);
  font-size: 12px;
}

.admin-todo-empty span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.admin-todo-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
  color: var(--text);
  padding: 10px;
  text-align: left;
  cursor: pointer;
}

.admin-todo-card:hover {
  box-shadow: 0 0 0 3px rgba(15, 159, 143, .1);
}

.admin-todo-card.is-danger {
  border-color: #f0b6b3;
  background: #fff8f8;
}

.admin-todo-card.is-waiting {
  border-color: #f1d994;
  background: #fffaf0;
}

.admin-todo-card.is-done {
  border-color: #bce5dd;
  background: var(--teal-light);
}

.todo-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 19px;
  border-radius: 999px;
  padding: 0 8px;
  margin-bottom: 6px;
  background: #e8f6f4;
  color: var(--teal-dark);
  font-size: 10px;
  font-weight: 900;
}

.todo-kicker.is-danger {
  background: var(--danger-bg);
  color: #9c2f2a;
}

.todo-kicker.is-waiting {
  background: var(--warn-bg);
  color: #8c5a00;
}

.admin-todo-card strong {
  display: block;
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 5px;
}

.admin-todo-card p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.55;
}

.insight-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
  padding: 9px 11px;
  box-shadow: none;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

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

.insight-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.insight-card strong {
  color: var(--navy);
  font-size: 17px;
  line-height: 1.2;
  margin-top: 0;
  text-align: right;
}

.insight-card.is-waiting {
  border-color: #f1d994;
  background: var(--warn-bg);
}

.insight-card.is-danger {
  border-color: #f0b6b3;
  background: var(--danger-bg);
}

.insight-card.is-done {
  border-color: #bce5dd;
  background: var(--teal-light);
}

.ticket-filter-bar .field {
  margin-bottom: 0;
}

.ticket-filter-bar input,
.ticket-filter-bar select {
  min-height: 40px;
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 13px;
}

.ticket-filter-bar .button {
  min-height: 40px;
}

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

.report-item {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
}

.report-item.active {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 159, 143, .12);
}

.report-item-title {
  color: var(--navy);
  font-weight: 900;
  margin-bottom: 4px;
}

.report-item-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.issue-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
}

.issue-table-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 8px;
}

.issue-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.issue-table-toolbar .issue-table-meta {
  margin: 0;
}

.issue-table-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.issue-table-toolbar select {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--navy);
  padding: 4px 28px 4px 8px;
  font-size: 11px;
  font-weight: 900;
}

.issue-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  font-size: 12px;
}

.admin-ticket-dashboard .issue-table {
  min-width: 760px;
  font-size: 13px;
}

#ticket-list .issue-table th,
#ticket-list .issue-table td {
  padding: 12px 14px;
  line-height: 1.55;
}

#ticket-list .issue-table th {
  font-size: 12px;
  font-weight: 700;
}

#ticket-list .table-link,
#ticket-list .table-stack b,
#ticket-list .issue-table td:nth-child(5) > b {
  font-size: 13px;
  font-weight: 700;
}

#ticket-list .issue-table td:nth-child(5) > b {
  color: var(--navy);
  font-size: 14px;
}

#ticket-list .issue-table td:nth-child(5) > span {
  font-size: 12px;
  line-height: 1.5;
}

#ticket-list .robot-type-badge {
  min-height: 23px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
}

.installer-table {
  min-width: 680px;
}

.contractor-ticket-table {
  min-width: 700px;
}

.issue-table th,
.issue-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: middle;
  line-height: 1.45;
  white-space: nowrap;
}

.issue-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #0b3b72;
  color: #fff;
  font-weight: 700;
}

.sort-header {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font: inherit;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.sort-header span {
  color: #bde5df;
  font-size: 10px;
}

.issue-table td:nth-child(5) {
  min-width: 260px;
  white-space: normal;
}

.issue-table td:nth-child(5) b,
.issue-table td:nth-child(5) span {
  display: block;
}

.issue-table td:nth-child(5) span {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.robot-type-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 4px 0 3px;
}

.issue-table td:nth-child(5) .robot-type-badge,
.robot-type-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 21px;
  border: 1px solid #b7cadc;
  border-radius: 5px;
  background: #eef3f8;
  color: var(--navy);
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.issue-table td:nth-child(5) .robot-type-badge.is-jilby,
.robot-type-badge.is-jilby {
  border-color: #8fd5cb;
  background: #e7f7f4;
  color: #076f65;
}

.issue-table td:nth-child(5) .robot-type-badge.is-broit,
.robot-type-badge.is-broit {
  border-color: #96cce8;
  background: #eaf6fc;
  color: #086493;
}

.issue-table td:nth-child(5) .robot-type-badge.is-whiz,
.robot-type-badge.is-whiz {
  border-color: #edc77d;
  background: #fff6e3;
  color: #875500;
}

.issue-table td:nth-child(5) .robot-type-badge.is-phantas,
.robot-type-badge.is-phantas {
  border-color: #b9afd9;
  background: #f2effa;
  color: #51427f;
}

.report-table td:nth-child(4),
.report-table td:nth-child(5),
.contractor-table td:nth-child(5) {
  min-width: 220px;
  white-space: normal;
}

.report-table td:nth-child(4) b,
.report-table td:nth-child(4) span,
.report-table td:nth-child(5) b,
.report-table td:nth-child(5) span {
  display: block;
}

.report-table td:nth-child(4) span,
.report-table td:nth-child(5) span {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.issue-table tbody tr {
  cursor: default;
}

.issue-table tbody tr:nth-child(even) {
  background: #fbfdff;
}

.issue-table tbody tr:hover,
.issue-table tbody tr.active {
  background: #edf7f5;
}

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

.contractor-table,
.report-table {
  min-width: 960px;
}

.availability-table {
  min-width: 900px;
}

.availability-table td:nth-child(4) {
  min-width: 260px;
  white-space: normal;
}

.availability-table td:nth-child(4) b,
.availability-table td:nth-child(4) span {
  display: block;
}

.availability-table td:nth-child(4) span {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.availability-toolbar {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbfd 100%);
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(280px, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 12px;
  margin-bottom: 12px;
}

.availability-month-nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
}

.availability-month-nav strong {
  color: var(--navy);
  font-size: 26px;
  font-weight: 900;
  text-align: center;
}

.availability-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
  padding-bottom: 10px;
}

.availability-calendar-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  padding: 10px;
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(8, 47, 95, .045);
}

.availability-week-board {
  min-width: 1180px;
  display: grid;
  gap: 0;
}

.availability-week-head,
.availability-week-row {
  display: grid;
  grid-template-columns: 176px repeat(7, minmax(128px, 1fr));
}

.availability-week-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7fbfd;
}

.availability-worker-head,
.availability-day-head-cell,
.availability-worker-cell,
.availability-week-cell {
  border-right: 1px solid #dbe8f2;
  border-bottom: 1px solid #dbe8f2;
}

.availability-worker-head,
.availability-day-head-cell {
  min-height: 48px;
  padding: 10px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.availability-worker-head {
  justify-content: flex-start;
}

.availability-worker-cell {
  min-height: 116px;
  padding: 12px 10px;
  background: #f9fcff;
  display: grid;
  gap: 4px;
  align-content: start;
}

.availability-worker-cell b,
.availability-worker-cell span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.availability-worker-cell b {
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
}

.availability-worker-cell span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.availability-week-cell {
  min-height: 116px;
  padding: 7px;
  background: #ffffff;
  display: grid;
  gap: 6px;
  align-content: start;
}

.availability-week-cell.can-add {
  background: repeating-linear-gradient(
    135deg,
    #fbfdff,
    #fbfdff 8px,
    #f5f9fc 8px,
    #f5f9fc 16px
  );
}

.availability-add-cell {
  width: 100%;
  min-height: 64px;
  border: 1px dashed #bdd2e5;
  border-radius: 10px;
  background: rgba(248, 251, 254, .82);
  color: #52677e;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  display: grid;
  gap: 3px;
  place-items: center;
}

.availability-add-cell:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
  background: var(--teal-light);
}

.availability-add-cell span,
.availability-add-cell small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.availability-add-cell small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.availability-add-cell:hover small {
  color: var(--teal-dark);
}

.availability-slot-chip {
  border: 1px solid #cbe3dd;
  border-left: 5px solid var(--teal);
  border-radius: 10px;
  background: #ecfbf8;
  padding: 7px;
  display: grid;
  gap: 4px;
  box-shadow: 0 4px 10px rgba(8, 47, 95, .05);
}

.availability-slot-chip.is-limited {
  border-color: #f3d487;
  border-left-color: var(--warn);
  background: #fff8e7;
}

.availability-slot-chip.is-full {
  border-color: #f4b6b0;
  border-left-color: var(--danger);
  background: var(--danger-bg);
}

.availability-slot-chip div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.availability-slot-chip b,
.availability-slot-chip span,
.availability-slot-chip small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.availability-slot-chip b {
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
}

.availability-slot-chip span {
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 900;
}

.availability-slot-chip.is-limited span {
  color: #a26300;
}

.availability-slot-chip.is-full span {
  color: var(--danger);
}

.availability-slot-chip small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.availability-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(118px, 1fr));
  gap: 6px;
}

.availability-calendar-wrap.is-slide-next .availability-calendar-grid {
  animation: slideMonthNext .28s ease;
}

.availability-calendar-wrap.is-slide-prev .availability-calendar-grid {
  animation: slideMonthPrev .28s ease;
}

.availability-day {
  min-height: 132px;
  border: 1px solid #d6e4ef;
  border-radius: 10px;
  background: #fbfdff;
  padding: 8px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 6px;
}

.availability-day.is-empty {
  border-style: dashed;
  background: #f5f8fb;
}

.availability-day.has-slots {
  background: #ffffff;
}

.availability-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.availability-day-head b {
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
}

.availability-add-day {
  width: 26px;
  height: 26px;
  border: 1px solid #c8dbe9;
  border-radius: 999px;
  background: var(--white);
  color: var(--teal-dark);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.availability-day-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.availability-day-summary span {
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.4;
}

.availability-day-summary .is-free {
  color: var(--teal-dark);
  background: var(--teal-light);
}

.availability-day-summary .is-waiting {
  color: #9b6400;
  background: #fff3d4;
}

.availability-day-summary .is-done {
  color: var(--navy);
  background: #e8f0f8;
}

.availability-empty-day {
  color: #9aaabb;
  font-size: 11px;
  font-weight: 800;
  margin: 0;
}

.availability-day-slots {
  display: grid;
  gap: 4px;
  align-content: start;
}

.availability-slot-card {
  border-left: 3px solid var(--teal);
  border-radius: 7px;
  background: #edf9f7;
  padding: 5px 6px;
  display: grid;
  gap: 1px;
}

.availability-slot-card.is-waiting {
  border-left-color: var(--warn);
  background: #fff8e8;
}

.availability-slot-card.is-done {
  border-left-color: var(--navy);
  background: #eef5fb;
}

.availability-slot-card.is-danger {
  border-left-color: var(--danger);
  background: var(--danger-bg);
}

.availability-slot-card span,
.availability-slot-card b,
.availability-slot-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.availability-slot-card span {
  color: var(--navy);
  font-size: 11px;
  font-weight: 900;
}

.availability-slot-card b {
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 900;
}

.availability-slot-card small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.slot-capacity-stack {
  display: grid;
  gap: 3px;
}

.slot-capacity-stack small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.candidate-slot-list {
  display: grid;
  gap: 8px;
}

.candidate-slot-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.candidate-slot-item span,
.candidate-slot-item small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.candidate-slot-item b {
  display: block;
  color: var(--navy);
  font-size: 14px;
  font-weight: 900;
  margin: 2px 0;
}

.table-stack {
  display: grid;
  gap: 4px;
}

.table-stack span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  white-space: normal;
}

.table-stack b {
  color: var(--navy);
  margin-right: 4px;
}

.muted-cell {
  color: var(--muted);
}

.table-link {
  border: 0;
  background: transparent;
  color: #086c86;
  font-size: 12px;
  font-weight: 900;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.pagination-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.pagination-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.pagination-button {
  min-width: 34px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--navy);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.pagination-button.active {
  border-color: var(--teal);
  background: var(--teal);
  color: var(--white);
}

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

.pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #edf2f7;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.status-pill.is-waiting {
  background: var(--warn-bg);
  color: #75510c;
}

.status-pill.is-done {
  background: var(--teal-light);
  color: var(--teal-dark);
}

.status-pill.is-danger {
  background: var(--danger-bg);
  color: #8b2823;
}

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

.contractor-hierarchy {
  display: grid;
  grid-template-columns: minmax(340px, .78fr) minmax(460px, 1.22fr);
  gap: 12px;
  align-items: start;
}

.contractor-master-panel,
.contractor-detail-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
  padding: 12px;
}

.contractor-section-head,
.contractor-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.contractor-section-head h3,
.contractor-detail-head h3 {
  color: var(--navy);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.25;
  margin: 0 0 4px;
}

.contractor-section-head .sub,
.contractor-detail-head .sub {
  margin: 0;
}

.contractor-detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.contractor-section-head > span {
  min-width: 52px;
  border-radius: 999px;
  background: var(--teal-light);
  color: var(--teal-dark);
  padding: 5px 9px;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

.contractor-list-filter {
  margin-bottom: 9px;
}

.contractor-list-filter input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfdff;
  color: var(--text);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
}

.contractor-list-filter input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 159, 143, .13);
}

.contractor-company-list {
  display: grid;
  gap: 7px;
  max-height: 560px;
  overflow: auto;
  padding-right: 2px;
}

.contractor-company-row {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
  color: var(--text);
  padding: 10px 11px;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 4px;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.contractor-company-row:hover,
.contractor-company-row.active {
  border-color: rgba(15, 159, 143, .42);
  background: #f7fdfb;
  box-shadow: inset 4px 0 0 var(--teal);
}

.company-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.company-row-main b {
  color: var(--navy);
  font-size: 14px;
  font-weight: 900;
}

.company-row-main em {
  min-width: 38px;
  border-radius: 999px;
  background: #edf2f7;
  color: var(--muted);
  font-style: normal;
  text-align: center;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 900;
}

.contractor-company-row span:not(.company-row-main) {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.eyebrow {
  display: block;
  color: var(--teal-dark);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 6px;
}

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

.contractor-profile-grid div {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  padding: 10px;
  min-width: 0;
}

.contractor-profile-grid span,
.contractor-profile-grid b {
  display: block;
}

.contractor-profile-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  margin-bottom: 5px;
}

.contractor-profile-grid b {
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.installer-table {
  min-width: 640px;
  font-size: 11px;
}

.installer-table th,
.installer-table td {
  padding: 7px 8px;
}

.installer-table td:nth-child(5) {
  min-width: 130px;
  white-space: normal;
}

.installer-skill-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.contractor-ticket-section {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 14px;
}

.contractor-ticket-table {
  min-width: 720px;
}

.contractor-ticket-table td:nth-child(4) {
  min-width: 220px;
  white-space: normal;
}

.contractor-ticket-table td:nth-child(4) b,
.contractor-ticket-table td:nth-child(4) span {
  display: block;
}

.contractor-ticket-table td:nth-child(4) span {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.contractor-ticket-note {
  margin: 10px 0 0;
}

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

.installer-row {
  display: grid;
  grid-template-columns: minmax(92px, .35fr) 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  padding: 10px;
  font-size: 12px;
}

.installer-row b {
  color: var(--navy);
}

.installer-row span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.contractor-card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

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

.site-admin-grid.secondary {
  align-items: stretch;
}

.site-admin-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
  padding: 12px;
  min-width: 0;
}

.site-user-table {
  min-width: 560px;
}

.site-admin-note {
  margin-top: 10px;
  margin-bottom: 0;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid #b8d8e7;
  border-radius: 999px;
  background: #eef8fb;
  color: var(--navy);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.permission-matrix-card {
  margin-top: 12px;
}

.admin-disclosure {
  align-self: start;
}

.admin-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
}

.admin-disclosure > summary::-webkit-details-marker {
  display: none;
}

.admin-disclosure > summary::after {
  content: "+";
  color: var(--teal-dark);
  font-size: 20px;
  line-height: 1;
}

.admin-disclosure[open] > summary::after {
  content: "−";
}

.admin-disclosure > summary b {
  font-size: 14px;
}

.admin-disclosure > summary span {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.admin-disclosure[open] > summary {
  margin-bottom: 12px;
}

.disclosure-note {
  margin: -4px 0 10px;
}

.permission-matrix {
  min-width: 1040px;
}

.permission-matrix th:not(:first-child),
.permission-matrix .permission-cell {
  text-align: center;
}

.permission-matrix .permission-cell {
  color: var(--navy);
  font-weight: 900;
  white-space: nowrap;
}

.reset-request-list,
.role-policy-list {
  display: grid;
  gap: 8px;
}

.reset-request-row,
.role-policy-list div {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  padding: 10px;
}

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

.reset-request-row b,
.reset-request-row span,
.role-policy-list b,
.role-policy-list span {
  display: block;
}

.reset-request-row b,
.role-policy-list b {
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.reset-request-row span:not(.status-pill),
.role-policy-list span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.5;
  margin-top: 2px;
}

.role-note {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7fbfe;
  padding: 12px;
  margin-bottom: 14px;
}

.role-note b,
.role-note span {
  display: block;
}

.role-note b {
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 4px;
}

.role-note span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.6;
}

.qa-page {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.qa-hero {
  min-height: 152px;
  display: grid;
  place-items: center;
  padding: 32px 24px 28px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f8fbfe 0%, #ffffff 100%);
}

.qa-eyebrow {
  margin: 0 0 8px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.qa-hero h2 {
  margin: 0;
  color: var(--navy);
  font-size: 28px;
  font-weight: 900;
}

.qa-hero p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.7;
}

.qa-category-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.qa-category-nav a {
  padding: 16px 12px;
  text-align: center;
  color: var(--navy);
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  border-right: 1px solid var(--line);
}

.qa-category-nav a:last-child {
  border-right: 0;
}

.qa-category-nav a:hover {
  background: #f7fbff;
  color: var(--teal-dark);
}

.qa-list {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 34px 40px;
}

.qa-section {
  scroll-margin-top: 24px;
  margin-bottom: 36px;
}

.qa-section:last-child {
  margin-bottom: 0;
}

.qa-section h3 {
  margin: 0;
  padding: 18px 0 24px;
  color: var(--navy);
  text-align: center;
  font-size: 20px;
  font-weight: 900;
}

.qa-item {
  border-top: 1px solid #8190a0;
}

.qa-item:last-child {
  border-bottom: 1px solid #8190a0;
}

.qa-item summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 88px 24px;
  align-items: center;
  gap: 8px;
  min-height: 62px;
  color: #0c2944;
}

.qa-item summary::-webkit-details-marker {
  display: none;
}

.qa-item summary span,
.qa-answer span {
  color: #7a858f;
  font-size: 22px;
  font-weight: 500;
  text-align: center;
}

.qa-item summary b {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.7;
}

.qa-item summary em {
  color: #0d1720;
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
  text-align: right;
}

.qa-item summary em::before {
  content: "開く";
}

.qa-item summary::after {
  content: "+";
  color: #7a858f;
  font-size: 24px;
  font-weight: 300;
  text-align: center;
}

.qa-item[open] summary em::before {
  content: "閉じる";
}

.qa-item[open] summary::after {
  content: "−";
}

.qa-answer {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px;
  padding: 0 112px 24px 0;
}

.qa-answer p {
  margin: 0;
  color: #0d1720;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.9;
}

.empty-state {
  border: 1px dashed #b6c9dc;
  border-radius: 14px;
  background: #f7fbfe;
  padding: 24px;
  text-align: center;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.metric {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: var(--panel);
  box-shadow: 0 8px 18px rgba(19, 47, 78, .04);
  position: relative;
  overflow: hidden;
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #b6c9dc;
}

.metric.is-info::before {
  background: var(--navy-2);
}

.metric.is-waiting::before {
  background: var(--warn);
}

.metric.is-done::before {
  background: var(--teal);
}

.metric.is-report::before {
  background: #7a8fa6;
}

.metric small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.metric strong {
  display: block;
  color: var(--navy);
  font-size: 20px;
  margin-top: 4px;
}

.detail-section {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 14px;
}

.detail-section.is-danger {
  border: 1px solid #f0b6b3;
  background: var(--danger-bg);
  border-radius: 14px;
  padding: 14px;
}

.detail-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: -2px 0 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.detail-hero h2 {
  margin-bottom: 4px;
}

.detail-hero .sub {
  margin-bottom: 0;
}

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

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 240px));
  gap: 10px;
  justify-content: start;
}

.image-card {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  color: var(--navy);
  text-decoration: none;
  cursor: pointer;
}

.image-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.image-caption {
  display: block;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.4;
  margin-top: 5px;
}

.image-unavailable {
  display: none;
  aspect-ratio: 4 / 3;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #f7fafc;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.image-card.is-error img {
  display: none;
}

.image-card.is-error .image-unavailable {
  display: grid;
}

.photo-category-list {
  display: grid;
  gap: 18px;
}

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

.photo-category:first-child {
  padding-top: 0;
  border-top: 0;
}

.photo-category-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.photo-category-head h4,
.photo-category-head p {
  margin: 0;
}

.photo-category-head h4 {
  color: var(--navy);
  font-size: 14px;
}

.photo-category-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.photo-category-head > b,
.photo-total-count {
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
}

.empty-photo-state {
  display: grid;
  gap: 5px;
  place-items: center;
  min-height: 130px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #f8fbfe;
  text-align: center;
}

.empty-photo-state b {
  color: var(--navy);
}

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

.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 22, 42, .82);
}

.photo-viewer-panel {
  width: min(1120px, 100%);
  max-height: calc(100vh - 40px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-radius: 8px;
  overflow: hidden;
  background: #071c31;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .42);
}

.photo-viewer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 54px;
  padding: 0 12px 0 18px;
  background: var(--white);
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
}

.photo-viewer-head > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.photo-viewer-head a {
  color: #087b91;
  font-size: 12px;
}

.photo-viewer-stage {
  position: relative;
  min-height: min(72vh, 760px);
  display: grid;
  place-items: center;
  padding: 18px 64px;
}

.photo-viewer-stage img {
  max-width: 100%;
  max-height: calc(100vh - 130px);
  object-fit: contain;
}

.photo-viewer-nav {
  position: absolute;
  top: 50%;
  width: 42px;
  height: 54px;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 8px;
  background: rgba(255, 255, 255, .12);
  color: var(--white);
  font-size: 32px;
  cursor: pointer;
}

.photo-viewer-nav.is-prev { left: 12px; }
.photo-viewer-nav.is-next { right: 12px; }

@media (max-width: 640px) {
  .image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-viewer { padding: 0; }
  .photo-viewer-panel { max-height: 100vh; min-height: 100vh; border-radius: 0; }
  .photo-viewer-stage { padding: 12px 48px; }
  .photo-viewer-head a { display: none; }
}

.signature-image {
  max-width: 280px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
}

body.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 54, 87, .48);
  backdrop-filter: blur(2px);
}

.modal-dialog {
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: var(--white);
  border: 1px solid rgba(216, 228, 239, .92);
  border-radius: 18px;
  box-shadow: 0 26px 72px rgba(12, 31, 52, .34);
}

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

.modal-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 14px;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin-bottom: 0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.ticket-create-mode {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f7fa;
}

.ticket-create-mode button {
  flex: 1;
  min-height: 38px;
  padding: 8px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.ticket-create-mode button:hover {
  color: var(--navy);
}

.ticket-create-mode button.active {
  background: var(--white);
  color: var(--navy);
  box-shadow: 0 1px 4px rgba(17, 54, 87, .14);
}

.icon-button {
  width: 40px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--navy);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.status-row {
  display: flex;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
  flex-wrap: wrap;
}

.status-row .field {
  min-width: 180px;
  flex: 1;
}

.admin-next-action {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7fbfe;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.admin-next-action b,
.admin-next-action span {
  display: block;
}

.admin-next-action b {
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
}

.admin-next-action span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.6;
  margin-top: 3px;
}

.admin-next-action.is-waiting {
  border-color: #f1d994;
  background: var(--warn-bg);
}

.admin-next-action.is-done {
  border-color: #bce5dd;
  background: var(--teal-light);
}

.report-close-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.calendar-month-nav {
  width: min(100%, 720px);
  margin: 4px auto 10px;
  display: grid;
  grid-template-columns: 58px minmax(220px, 420px) 58px;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.month-nav-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff 0%, #f1f7fb 100%);
  color: var(--navy);
  box-shadow: 0 8px 18px rgba(8, 47, 95, .08);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.month-nav-button span {
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-2px);
}

.month-nav-button:hover {
  border-color: rgba(15, 159, 143, .45);
  box-shadow: 0 14px 30px rgba(15, 159, 143, .16);
  transform: translateY(-1px);
}

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

.calendar-month-current {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff 0%, #f4fbff 100%);
  box-shadow: 0 14px 30px rgba(19, 47, 78, .08);
  padding: 12px 22px 14px;
  text-align: center;
}

.calendar-month-current span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 2px;
}

.calendar-month-current h3 {
  margin: 0;
  color: var(--navy);
  font-size: 28px;
  font-weight: 900;
  line-height: 1.15;
}

.calendar-mode-toggle {
  width: fit-content;
  margin: 0 auto 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7fbfe;
  padding: 4px;
  display: flex;
  gap: 4px;
}

.calendar-mode-toggle button {
  min-width: 58px;
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.calendar-mode-toggle button.active {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 8px 18px rgba(8, 47, 95, .12);
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--teal-light);
}

.legend-dot.is-waiting {
  background: var(--warn-bg);
  box-shadow: inset 0 0 0 1px rgba(117, 81, 12, .18);
}

.legend-dot.is-danger {
  background: var(--danger-bg);
  box-shadow: inset 0 0 0 1px rgba(139, 40, 35, .18);
}

.legend-dot.is-done {
  background: #edf2f7;
  box-shadow: inset 0 0 0 1px rgba(104, 123, 142, .18);
}

.calendar-layout {
  display: block;
  overflow-x: auto;
  padding-bottom: 2px;
  will-change: transform, opacity;
}

.calendar-layout.is-slide-next {
  animation: calendar-slide-next .28s cubic-bezier(.2, .75, .35, 1) both;
}

.calendar-layout.is-slide-prev {
  animation: calendar-slide-prev .28s cubic-bezier(.2, .75, .35, 1) both;
}

@keyframes calendar-slide-next {
  from {
    opacity: .35;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes calendar-slide-prev {
  from {
    opacity: .35;
    transform: translateX(-30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

.calendar-weekday {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.calendar-cell {
  height: 104px;
  min-height: 104px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 8px;
  overflow: hidden;
}

.calendar-cell.is-empty {
  background: transparent;
  border-color: transparent;
}

.calendar-day {
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 5px;
}

.calendar-ticket {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 7px;
  background: var(--teal-light);
  color: var(--navy);
  padding: 4px 6px;
  margin-bottom: 4px;
  text-align: left;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.35;
  cursor: pointer;
}

.calendar-ticket.is-waiting {
  background: var(--warn-bg);
  color: #75510c;
}

.calendar-ticket.is-done {
  background: #edf2f7;
  color: var(--muted);
}

.calendar-ticket.is-danger {
  background: var(--danger-bg);
  color: #8b2823;
}

.calendar-more {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.3;
  padding: 1px 6px;
}

.calendar-week-grid {
  min-width: 1040px;
  display: grid;
  grid-template-columns: 76px repeat(7, minmax(122px, 1fr));
  gap: 6px;
}

.calendar-week-time-head,
.calendar-week-day-head,
.calendar-week-time,
.calendar-week-cell {
  border: 1px solid var(--line);
  background: #fbfdff;
}

.calendar-week-time-head,
.calendar-week-day-head {
  min-height: 38px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.calendar-week-time {
  min-height: 68px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
}

.calendar-week-cell {
  min-height: 68px;
  border-radius: 8px;
  padding: 6px;
}

.calendar-week-cell.has-ticket {
  background: #fff;
}

.calendar-week-ticket {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: var(--teal-light);
  color: var(--navy);
  padding: 7px 8px;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 3px 0 0 var(--teal);
}

.calendar-week-ticket + .calendar-week-ticket {
  margin-top: 6px;
}

.calendar-week-ticket span,
.calendar-week-ticket b,
.calendar-week-ticket em {
  display: block;
}

.calendar-week-ticket span {
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 900;
}

.calendar-week-ticket b {
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.calendar-week-ticket em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.4;
  margin-top: 4px;
}

.calendar-week-ticket.is-waiting {
  background: var(--warn-bg);
  box-shadow: inset 3px 0 0 var(--warn);
}

.calendar-week-ticket.is-danger {
  background: var(--danger-bg);
  box-shadow: inset 3px 0 0 var(--danger);
}

.calendar-week-ticket.is-done {
  background: #edf2f7;
  box-shadow: inset 3px 0 0 #9eb1c4;
}

.calendar-week-more {
  margin-top: 6px;
  border-radius: 7px;
  background: #f1f7fb;
}

.calendar-agenda {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
  margin-top: 14px;
  padding: 12px;
  max-height: 300px;
  overflow: auto;
}

.agenda-head {
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
  padding-bottom: 8px;
}

.agenda-head h3,
.agenda-head .sub {
  margin-bottom: 0;
}

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

.agenda-item {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--text);
  padding: 9px 10px;
  text-align: left;
  cursor: pointer;
}

.agenda-item:hover {
  border-color: #b6c9dc;
  background: #f7fbfe;
}

.agenda-item span,
.agenda-item b,
.agenda-item em {
  display: block;
}

.agenda-item span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.agenda-item b {
  color: var(--navy);
  font-size: 13px;
  margin-top: 3px;
}

.agenda-item em {
  width: fit-content;
  margin-top: 7px;
  border-radius: 999px;
  background: var(--teal-light);
  color: var(--teal-dark);
  padding: 2px 8px;
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
}

.agenda-item em.is-waiting {
  background: var(--warn-bg);
  color: #75510c;
}

.agenda-item em.is-danger {
  background: var(--danger-bg);
  color: #8b2823;
}

.agenda-item em.is-done {
  background: #edf2f7;
  color: var(--muted);
}

@media (max-width: 1120px) {
  .admin-ticket-dashboard {
    grid-template-columns: 1fr;
  }

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

  .ticket-filter-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ticket-filter-bar .button {
    width: 100%;
  }

  .calendar-layout {
    grid-template-columns: 1fr;
  }

  .calendar-agenda {
    max-height: none;
  }

  .contractor-hierarchy {
    grid-template-columns: 1fr;
  }

  .contractor-company-list {
    max-height: 360px;
  }

  .site-admin-grid {
    grid-template-columns: 1fr;
  }

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

  .qa-category-nav a {
    border-bottom: 1px solid var(--line);
  }

  .qa-list {
    padding: 22px 18px 32px;
  }

  .qa-item summary {
    grid-template-columns: 34px minmax(0, 1fr) 56px 18px;
    min-height: 58px;
  }

  .qa-item summary span,
  .qa-answer span {
    font-size: 18px;
  }

  .qa-item summary b {
    font-size: 13px;
  }

  .qa-answer {
    grid-template-columns: 34px minmax(0, 1fr);
    padding: 0 0 20px;
  }

  .qa-answer p {
    font-size: 13px;
  }
}

@media (max-width: 860px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
    padding: 12px;
  }

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

  #logout {
    margin-top: 0;
  }

  .admin-main {
    padding: 12px;
  }

  .ticket-workspace {
    grid-template-columns: 1fr;
  }

  .admin-quick-filters {
    align-items: stretch;
  }

  .ticket-quick-filter {
    flex: 1 1 132px;
    justify-content: center;
  }

  .ticket-filter-bar {
    grid-template-columns: 1fr 1fr;
  }

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

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

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

  .contractor-profile-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .calendar-month-nav {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    gap: 8px;
    margin-top: 10px;
  }

  .month-nav-button {
    width: 46px;
    height: 46px;
  }

  .month-nav-button span {
    font-size: 30px;
  }

  .calendar-month-current {
    border-radius: 14px;
    padding: 10px 12px 12px;
  }

  .calendar-month-current h3 {
    font-size: 22px;
  }

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

  .calendar-weekday,
  .calendar-cell.is-empty {
    display: none;
  }

  .calendar-cell {
    height: auto;
    min-height: auto;
  }

  .calendar-layout {
    display: block;
  }

  .calendar-agenda {
    margin-top: 12px;
  }

  .process-check-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .process-check-item .process-date,
  .process-check-item .process-memo {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .calendar-month-current h3 {
    font-size: 20px;
  }

  .app-shell {
    padding: 0;
  }

  .phone {
    min-height: 100vh;
    border-radius: 0;
    border: 0;
  }

  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .panel-heading,
  .detail-hero,
  .section-heading,
  .panel-actions,
  .modal-actions {
    flex-direction: column;
  }

  .panel-heading .button,
  .detail-actions,
  .detail-actions .button,
  .section-heading .button,
  .panel-actions .button,
  .modal-actions .button {
    width: 100%;
  }

  .installer-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .modal-backdrop {
    padding: 12px;
  }

  .admin-shell {
    padding: 12px;
  }

  body.admin-mode .admin-shell {
    padding: 0;
  }

  .admin-tabs,
  .ticket-filter-bar,
  .admin-focus-grid,
  .insight-strip {
    grid-template-columns: 1fr;
  }
}
