:root {
  --bg: #0b1726;
  --panel: #101c2b;
  --ink: #f7fafc;
  --muted: #9fb3c8;
  --brand: #5ec2ff;
  --accent: #9bffd6;
  --danger: #ff6b6b;
  --ok: #3ddc97;
  --card: #0f2030;
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  background: radial-gradient(1200px 800px at 10% -10%, #123, transparent), linear-gradient(180deg, #08121d, #0a1624 40%, #0b1726);
  color: var(--ink);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", sans-serif;
}

header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(8, 18, 29, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #14314d;
}
.wrap {
  max-width: 1100px;
  margin-inline: auto;
  padding: 18px;
}
h1 {
  font-size: 28px;
  letter-spacing: 0.02em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
h1 .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: conic-gradient(from 0deg at 50% 50%, var(--brand), var(--accent), var(--brand));
  box-shadow: 0 0 18px var(--brand);
}

main {
  max-width: 1100px;
  margin: 20px auto;
  padding: 18px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}
@media (max-width: 900px) {
  main {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--panel);
  border: 1px solid #14314d;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}
.card .head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #14314d;
  background: linear-gradient(180deg, #0f2030, #0e1d2c);
}
.card .head h2 {
  margin: 0;
  font-size: 18px;
}
.card .body {
  padding: 16px;
}

form .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 600px) {
  form .row {
    grid-template-columns: 1fr;
  }
}
label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
input,
select,
textarea {
  width: 100%;
  padding: 12px 12px;
  border: 1px solid #214462;
  background: #0b1c2c;
  color: var(--ink);
  border-radius: 12px;
  outline: none;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(94, 194, 255, 0.15);
}
textarea {
  min-height: 84px;
  resize: vertical;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}
.btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
button,
.btn {
  appearance: none;
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 600;
  color: #08121d;
  background: var(--brand);
  cursor: pointer;
}
.btn.secondary {
  background: #173553;
  color: var(--ink);
  border: 1px solid #214462;
}
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px dashed #214462;
}
.btn.danger {
  background: var(--danger);
  color: white;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #1e3a59;
  background: #0a1a29;
  color: var(--ink);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.grid {
  display: grid;
  gap: 14px;
}
.two {
  grid-template-columns: 1fr 1fr;
}
.three {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 800px) {
  .two,
  .three {
    grid-template-columns: 1fr;
  }
}

.avail {
  display: grid;
  gap: 12px;
}
.staff-lane {
  background: var(--card);
  border: 1px solid #173553;
  border-radius: 14px;
  padding: 12px;
}
.lane-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.slots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.slot {
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #214462;
  background: #0a1a29;
}
.slot.busy {
  opacity: 0.5;
  text-decoration: line-through;
}
.legend {
  display: flex;
  gap: 10px;
  align-items: center;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.resv {
  display: grid;
  grid-template-columns: 120px 1fr 1fr;
  gap: 10px;
  align-items: center;
  background: #0b1c2c;
  border: 1px solid #173553;
  border-radius: 12px;
  padding: 10px;
}
@media (max-width: 700px) {
  .resv {
    grid-template-columns: 1fr;
  }
}

.empty {
  border: 1px dashed #214462;
  border-radius: 12px;
  padding: 14px;
  color: var(--muted);
  text-align: center;
}

.badge {
  background: var(--ok);
  color: #082015;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 11px;
}
.danger-t {
  color: #ff8b8b;
}
.ok-t {
  color: #9bffd6;
}

/* dialog */
dialog {
  border: none;
  border-radius: 16px;
  max-width: 520px;
  width: 90vw;
  padding: 0;
  background: #0e1d2c;
  color: var(--ink);
}
dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
}
.modal-head {
  padding: 14px 16px;
  border-bottom: 1px solid #173553;
}
.modal-body {
  padding: 16px;
}
.modal-foot {
  padding: 12px 16px;
  border-top: 1px solid #173553;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

footer {
  max-width: 1100px;
  margin: 20px auto;
  padding: 0 18px 32px;
  color: var(--muted);
}

/* === inline calendar === */
.calendar {
  margin-top: 8px;
  background: var(--card);
  border: 1px solid #173553;
  border-radius: 12px;
  padding: 12px;
}
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.cal-title {
  font-weight: 700;
}
.cal-nav {
  background: #173553;
  color: var(--ink);
  border: 1px solid #214462;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cal-cell {
  border: 1px solid #214462;
  border-radius: 10px;
  padding: 8px 6px;
  min-height: 48px;
  background: #0a1a29;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  font-size: 12px;
  position: relative;
}
.cal-cell .dot {
  position: absolute;
  left: 6px;
  bottom: 6px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand);
  opacity: 0.9;
}
.cal-cell .dot.full {
  background: var(--danger);
}
.cal-cell.muted {
  color: var(--muted);
  opacity: 0.6;
}
.cal-cell.disabled {
  opacity: 0.4;
  pointer-events: none;
}
.cal-cell.today {
  outline: 2px solid var(--brand);
}
.cal-cell.selected {
  box-shadow: 0 0 0 2px var(--accent) inset;
}
.cal-weekday {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  padding: 4px 0 6px;
}
.cal-legend {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}
