﻿:root {
  --ink: #17202a;
  --muted: #64748b;
  --line: #cbd5e1;
  --paper: #f8fafc;
  --panel: #ffffff;
  --accent: #166534;
  --accent-2: #0f766e;
  --danger: #b91c1c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Yu Gothic", "Meiryo", system-ui, sans-serif;
  background: var(--paper);
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 38px;
  border: 1px solid #134e4a;
  border-radius: 6px;
  background: var(--accent-2);
  color: white;
  padding: 0 14px;
  cursor: pointer;
}

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

.hidden {
  display: none !important;
}

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

.login-panel {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  display: grid;
  gap: 18px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
}

.login-panel h1,
.pane-heading h2 {
  margin: 0;
}

label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-weight: 700;
}

input,
select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  background: white;
}

.error-text {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.topbar,
.bottom-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  background: white;
  border-bottom: 1px solid var(--line);
}

.bottom-actions {
  min-height: 42px;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.date-control,
.top-actions,
.pane-heading,
.staff-toolbar,
.total-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

#displayDate {
  font-weight: 800;
}

.icon-button {
  width: 38px;
  padding: 0;
  display: grid;
  place-items: center;
}

.workspace {
  display: grid;
  gap: 14px;
  padding: 16px;
  min-height: 0;
}

.source-pane,
.report-pane {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.source-pane {
  width: min(33vw, 620px);
  min-width: 360px;
  justify-self: center;
}

.inline-actions {
  display: flex;
  justify-content: center;
}

.pane-heading {
  justify-content: space-between;
}

.pane-heading h2 {
  font-size: 18px;
}

.file-button {
  min-height: 38px;
  border: 1px solid #134e4a;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  padding: 8px 14px;
  cursor: pointer;
  text-align: center;
}

.file-button input {
  display: none;
}

.file-button.wide {
  width: 100%;
}

.upload-empty {
  border: 2px dashed #94a3b8;
  border-radius: 8px;
  min-height: 180px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: white;
  text-align: center;
  padding: 18px;
}

.source-image {
  width: 100%;
  max-height: 42vh;
  object-fit: contain;
  background: white;
  border: 1px solid var(--line);
}

.shift-preview {
  max-height: 72vh;
}

.report-scroll {
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  min-height: 520px;
}

.room-report-wrap {
  width: 100%;
  overflow: hidden;
}

.room-report {
  width: 1320px;
  padding: 24px;
  background: white;
  transform-origin: top left;
}

.report-head {
  display: grid;
  grid-template-columns: 220px 420px 1fr;
  align-items: start;
  gap: 24px;
  margin-bottom: 18px;
}

.mini-table,
.room-table {
  border-collapse: collapse;
  width: 100%;
}

.mini-table td,
.mini-table th,
.room-table td,
.room-table th {
  border: 1px solid #111827;
}

.mini-table th {
  height: 22px;
  font-weight: 700;
}

.mini-table td {
  height: 40px;
  font-size: 22px;
  font-weight: 800;
  text-align: center;
}

.report-title {
  text-align: center;
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: .04em;
  align-self: end;
}

.report-date {
  justify-self: end;
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 700;
}

.room-table th {
  height: 26px;
  font-size: 20px;
}

.room-cell {
  width: 54px;
  height: 34px;
  padding: 0 4px;
  text-align: center;
  vertical-align: middle;
  line-height: 1;
}

.mark-cell {
  width: 78px;
  height: 34px;
  padding: 0 4px;
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
  line-height: 1.15;
}

.room-type {
  display: block;
  font-size: 12px;
  font-weight: 700;
}

.room-number {
  display: block;
  font-size: 20px;
  font-family: Georgia, serif;
}

.single {
  color: #e05261;
}

.semi {
  color: #0ea5c6;
}

.twin,
.japanese {
  color: #111827;
}

dialog {
  border: 0;
  padding: 0;
  border-radius: 8px;
  width: min(980px, calc(100vw - 32px));
}

dialog::backdrop {
  background: rgba(15, 23, 42, .45);
}

.dialog-card {
  padding: 18px;
  display: grid;
  gap: 14px;
  background: white;
}

.condition-card,
.master-card {
  max-height: calc(100vh - 48px);
  overflow: auto;
}

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

.summary-item {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #f8fafc;
}

.summary-item span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.summary-item strong {
  font-size: 34px;
}

.staff-toolbar {
  justify-content: flex-start;
}

.staff-toolbar input {
  width: min(300px, 100%);
}

.staff-list,
.master-list {
  display: grid;
  gap: 8px;
}

.staff-row {
  display: grid;
  grid-template-columns: 190px 90px 120px 160px 160px 1fr 40px;
  gap: 8px;
  align-items: center;
}


.master-row {
  display: grid;
  grid-template-columns: 190px 90px 120px 1fr 1fr 40px;
  gap: 8px;
  align-items: center;
}

.master-row button {
  background: #475569;
  border-color: #334155;
}
.staff-row button {
  background: #475569;
  border-color: #334155;
}

.total-row {
  justify-content: flex-end;
  font-size: 18px;
}

@media (max-width: 900px) {
  .source-pane {
    width: 100%;
    min-width: 0;
  }

  .summary-grid,
  .staff-row,
  .master-row {
    grid-template-columns: 1fr;
  }
}





.top-actions {
  flex-wrap: nowrap;
  justify-content: flex-end;
  min-width: 0;
}

.master-trigger {
  min-width: 46px;
  min-height: 46px;
  font-size: 22px;
  position: relative;
  z-index: 2;
}

.staff-header {
  display: grid;
  grid-template-columns: 190px 90px 120px 160px 160px 1fr 40px;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 0 2px;
}

@media (max-width: 900px) {
  .topbar {
    align-items: flex-start;
    gap: 8px;
    padding: 10px;
  }

  .date-control {
    flex-wrap: wrap;
  }

  .top-actions {
    gap: 6px;
    flex-shrink: 0;
  }

  .top-actions button {
    padding: 0 9px;
    min-height: 44px;
  }

  .master-trigger {
    width: 46px;
    padding: 0;
  }

  .staff-header {
    display: none;
  }

  .staff-row input[data-field="name"]::before,
  .staff-row input[data-field="rooms"]::before {
    content: "";
  }
}
