@import url('https://fonts.googleapis.com/css2?family=M+PLUS+1p:wght@400;500;700&display=swap');

:root {
  --bg: #f6f2ea;
  --bg-accent: #efe7dc;
  --card: #fffaf4;
  --card-strong: #ffffff;
  --text: #111827;
  --muted: #4b5563;
  --border: rgba(17, 24, 39, 0.28);
  --ring: rgba(31, 122, 109, 0.35);
  --primary: #111827;
  --accent: #1f7a6d;
  --accent-strong: #175f56;
  --danger: #d64545;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 18px 35px rgba(17, 24, 39, 0.12);
  --shadow-soft: 0 6px 14px rgba(17, 24, 39, 0.1), 0 20px 50px rgba(17, 24, 39, 0.08);
  --font-sans: "M PLUS 1p", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  --font-display: "M PLUS 1p", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
}

* { box-sizing: border-box; }

a,
h1,
h2,
h3 {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: 0.01em;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background:
    radial-gradient(900px 700px at -10% -10%, rgba(255, 207, 151, 0.32), transparent 55%),
    radial-gradient(900px 700px at 110% -20%, rgba(140, 222, 210, 0.28), transparent 55%),
    linear-gradient(180deg, #f8f4ec 0%, #f2f6f8 100%);
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
  font-weight: 500;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(17, 24, 39, 0.08) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.25;
  pointer-events: none;
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: -10% 0 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), transparent 60%);
  pointer-events: none;
  z-index: -1;
}

a { color: inherit; text-decoration: none; }

label {
  color: #1f2937;
  font-weight: 600;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 20px;
  background: var(--text);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 100;
  transition: top 0.2s ease;
}

.skip-link:focus { top: 12px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(17, 24, 39, 0.12);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
}

.topbar-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1f7a6d, #0f172a);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

.brand-text {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-sub {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #64748b;
}

.nav {
  display: flex;
  gap: 18px;
  align-items: center;
}

.nav a {
  color: var(--muted);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.2s ease, border 0.2s ease, color 0.2s ease;
}

.nav.centered {
  margin: 0 auto;
}

.nav a.active {
  color: var(--text);
  background: rgba(31, 122, 109, 0.12);
  border-color: rgba(31, 122, 109, 0.35);
}

.nav a:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shortcuts-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}

kbd {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 11px;
}

.page {
  max-width: 1320px;
  margin: 28px auto 90px;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.page-header h1 {
  font-size: 26px;
}

.page-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.page-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status-pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(17, 24, 39, 0.12);
  font-size: 12px;
  color: var(--muted);
}

.status-pill.accent {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}

.card {
  background: linear-gradient(180deg, var(--card-strong) 0%, var(--card) 100%);
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 120% at 0% 0%, rgba(255, 255, 255, 0.6), transparent 55%);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

.card > * {
  position: relative;
  z-index: 1;
}

@keyframes bento-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.page > .page-header,
.page > .panel-header,
.page > .card,
.page > .alert {
  animation: bento-in 0.5s ease both;
}

.page > *:nth-child(1) { animation-delay: 0.02s; }
.page > *:nth-child(2) { animation-delay: 0.05s; }
.page > *:nth-child(3) { animation-delay: 0.08s; }
.page > *:nth-child(4) { animation-delay: 0.11s; }
.page > *:nth-child(5) { animation-delay: 0.14s; }
.page > *:nth-child(6) { animation-delay: 0.17s; }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.card-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.panel-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-soft);
}

.panel-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.panel-subtitle {
  color: var(--muted);
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 500;
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  min-width: 220px;
  max-width: 360px;
  padding: 10px 14px;
  border-radius: 12px;
  color: #f9fafb;
  background: #111827;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.24);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
  pointer-events: auto;
  animation: fadeUp 0.2s ease;
}

.toast.success {
  background: #065f46;
}

.toast.error {
  background: #991b1b;
}

.toast.warn {
  background: #92400e;
}

.toast.info {
  background: #1e293b;
}

.tabs-nav,
.subtabs-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  row-gap: 8px;
  align-items: center;
  border: 1px solid rgba(17, 24, 39, 0.12);
  padding: 6px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.tabs-nav {
  position: sticky;
  top: 60px;
  z-index: 5;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
}

.tab-btn {
  border: none;
  background: transparent;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
}

.tab-btn.active {
  color: var(--text);
  border-color: rgba(31, 122, 109, 0.35);
  background: rgba(31, 122, 109, 0.12);
}

.tab-btn:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

body[data-page="admin-manager"] {
  background:
    radial-gradient(1000px 420px at 0% -10%, #e8efff 0%, transparent 58%),
    radial-gradient(820px 380px at 100% -8%, #eaf6ef 0%, transparent 52%),
    #f8fafc;
  color: #0f172a;
  font-family: "Inter", "Noto Sans JP", "Segoe UI", sans-serif;
  font-weight: 500;
}

body[data-page="admin-manager"]::before,
body[data-page="admin-manager"]::after {
  display: none;
}

body[data-page="admin-manager"] .topbar {
  z-index: 30;
  padding: 12px 16px 10px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  box-shadow: none;
}

body[data-page="admin-manager"] .admin-topbar-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

body[data-page="admin-manager"] .topbar__left,
body[data-page="admin-manager"] .topbar__right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

body[data-page="admin-manager"] .topbar__brand {
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
}

body[data-page="admin-manager"] .topbar__title,
body[data-page="admin-manager"] .topbar__user {
  color: #64748b;
  font-size: 13px;
}

body[data-page="admin-manager"] .topbar__sep {
  color: #cbd5e1;
}

body[data-page="admin-manager"] .topbar__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

body[data-page="admin-manager"] .topbar__link:hover {
  background: #f8fafc;
}

body[data-page="admin-manager"] .topbar__icon-link {
  width: 34px;
  padding: 0;
}

body[data-page="admin-manager"] .topbar__icon-link img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

body[data-page="admin-manager"] .page.admin-page {
  width: min(1120px, 100%);
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 14px 28px;
  gap: 14px;
}

body[data-page="admin-manager"] .page.admin-page > .page-header,
body[data-page="admin-manager"] .page.admin-page > .panel-header,
body[data-page="admin-manager"] .page.admin-page > .card,
body[data-page="admin-manager"] .page.admin-page > .alert {
  animation: none;
}

body[data-page="admin-manager"] .page-header,
body[data-page="admin-manager"] .panel-header,
body[data-page="admin-manager"] .card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  backdrop-filter: none;
}

body[data-page="admin-manager"] .card::after {
  display: none;
}

body[data-page="admin-manager"] .page-header {
  padding: 16px 18px;
}

body[data-page="admin-manager"] .page-header h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

body[data-page="admin-manager"] .page-subtitle {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
}

body[data-page="admin-manager"] .admin-current-section {
  display: none;
}

body[data-page="admin-manager"] .admin-console-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body[data-page="admin-manager"] .admin-hero-kicker {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 700;
}

body[data-page="admin-manager"] .admin-hero-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
}

body[data-page="admin-manager"] .admin-hero-desc {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

body[data-page="admin-manager"] .tabs-nav[data-tab-group="admin"] {
  position: static;
  top: auto;
  z-index: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 7px;
}

body[data-page="admin-manager"] .tabs-nav[data-tab-group="admin"] .tab-btn {
  height: 38px;
  padding: 0 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
}

body[data-page="admin-manager"] .tabs-nav[data-tab-group="admin"] .tab-btn:hover {
  background: #f8fafc;
}

body[data-page="admin-manager"] .tabs-nav[data-tab-group="admin"] .tab-btn.active {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
}

body[data-page="admin-manager"] .admin-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

body[data-page="admin-manager"] .admin-overview-item {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  padding: 12px;
}

body[data-page="admin-manager"] .admin-overview-label {
  margin: 0;
  font-size: 12px;
  color: #64748b;
}

body[data-page="admin-manager"] .admin-overview-value {
  margin-top: 4px;
  font-size: 22px;
  line-height: 1.1;
  font-weight: 700;
  color: #0f172a;
}

body[data-page="admin-manager"] .admin-overview-sub {
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
}

body[data-page="admin-manager"] .card-header {
  margin-bottom: 10px;
}

body[data-page="admin-manager"] .card-subtitle,
body[data-page="admin-manager"] .panel-subtitle,
body[data-page="admin-manager"] .subtle {
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
}

body[data-page="admin-manager"] .split-layout {
  gap: 14px;
}

body[data-page="admin-manager"] .admin-section[data-tab-name="menu"] .split-layout {
  /* メニューカードの 2 列グリッドを維持し、後段の 12 列指定を防ぐ。 */
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body[data-page="admin-manager"] .admin-section[data-tab-name="menu"] .split-layout > * {
  grid-column: auto !important;
}

body[data-page="admin-manager"] .btn {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
}

body[data-page="admin-manager"] .btn.small {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

body[data-page="admin-manager"] .btn:hover {
  background: #f8fafc;
  border-color: #dbe3ef;
  box-shadow: none;
  transform: none;
}

body[data-page="admin-manager"] .btn.primary {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
}

body[data-page="admin-manager"] .btn.primary:hover {
  background: #1e293b;
  border-color: #1e293b;
}

body[data-page="admin-manager"] .btn.ghost {
  background: #fff;
  color: #334155;
  border-color: #e2e8f0;
}

body[data-page="admin-manager"] .btn.danger {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #ffffff;
}

body[data-page="admin-manager"] .btn.danger:hover {
  background: #991b1b;
  border-color: #991b1b;
}

body[data-page="admin-manager"] .input,
body[data-page="admin-manager"] select,
body[data-page="admin-manager"] textarea {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  box-shadow: none;
}

body[data-page="admin-manager"] .input,
body[data-page="admin-manager"] select {
  min-height: 42px;
  padding: 0 12px;
}

body[data-page="admin-manager"] textarea,
body[data-page="admin-manager"] textarea.input {
  min-height: 120px;
  padding: 10px 12px;
}

body[data-page="admin-manager"] .input:focus-visible,
body[data-page="admin-manager"] select:focus-visible,
body[data-page="admin-manager"] textarea:focus-visible {
  outline: 0;
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.2);
}

body[data-page="admin-manager"] .table-wrap {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

body[data-page="admin-manager"] .table th {
  color: #475569;
  background: #f8fafc;
  border-bottom-color: #e2e8f0;
}

body[data-page="admin-manager"] .table td {
  border-bottom-color: #e2e8f0;
}

body[data-page="admin-manager"] .table tbody tr:hover td {
  background: #f8fafc;
}

body[data-page="admin-manager"] .list-item {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
  transform: none;
}

body[data-page="admin-manager"] .list-item:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  box-shadow: none;
  transform: none;
}

body[data-page="admin-manager"] .notice {
  border: 1px solid #dbeafe;
  background: #f8fbff;
  color: #1e3a8a;
}

@media (max-width: 768px) {
  body[data-page="admin-manager"] .admin-topbar-inner {
    align-items: flex-start;
    gap: 8px;
  }

  body[data-page="admin-manager"] .topbar__right {
    width: 100%;
    flex-wrap: wrap;
  }

  body[data-page="admin-manager"] .page.admin-page {
    padding: 16px 10px 24px;
  }

  body[data-page="admin-manager"] .tabs-nav[data-tab-group="admin"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="admin-manager"] .admin-section[data-tab-name="menu"] .split-layout {
    grid-template-columns: 1fr;
  }
}

.tab-panel {
  display: none;
  animation: fadeUp 0.2s ease;
}

.tab-panel.active { display: block; }

.tab-panels {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.two-column-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  align-items: start;
}

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

.main-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.split-layout {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.split-layout > * {
  grid-column: span 6;
}

.bento-span-4 { grid-column: span 4; }
.bento-span-5 { grid-column: span 5; }
.bento-span-6 { grid-column: span 6; }
.bento-span-7 { grid-column: span 7; }
.bento-span-8 { grid-column: span 8; }
.bento-span-9 { grid-column: span 9; }
.bento-span-12 { grid-column: span 12; }

.split-card {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 16px;
  align-items: start;
}

.split-pane {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.full-width { width: 100%; }

.search-field {
  display: flex;
  gap: 8px;
  align-items: center;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.subtle {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.btn {
  padding: 8px 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(17, 24, 39, 0.16);
  background: #fff;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.small {
  padding: 6px 10px;
  font-size: 12px;
}

.btn:hover {
  background: rgba(31, 122, 109, 0.08);
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.12);
  transform: translateY(-1px);
}

.btn.primary {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.btn.primary:hover {
  background: #0b111d;
  border-color: #0b111d;
}

.btn.accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn.accent:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.btn.danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn.danger:hover {
  background: #b93434;
  border-color: #b93434;
}

.btn.ghost {
  background: transparent;
  color: var(--text);
  border-color: rgba(17, 24, 39, 0.18);
}

.btn.ghost:hover {
  background: rgba(31, 122, 109, 0.08);
  border-color: rgba(31, 122, 109, 0.35);
}

.btn:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.btn.is-busy {
  opacity: 0.6;
  cursor: progress;
}

.btn.is-disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
  transform: none;
}

.icon-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn img {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
}

.input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid rgba(17, 24, 39, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-size: 14px;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.input.mono,
textarea.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12.5px;
  letter-spacing: 0.1px;
}

.mcp-console #mcpResponseOutput {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.24);
}

.input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
  border-color: var(--accent);
}

.input::placeholder,
textarea::placeholder {
  color: #64748b;
}

.search-input { min-width: 260px; }
.status-select { min-width: 160px; }

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.form-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.booking-multi .section-title {
  margin-top: 4px;
}

.multi-override-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 110px 110px 44px;
  gap: 8px;
  align-items: center;
}

.multi-override-row .btn {
  padding: 6px 8px;
  font-size: 12px;
}

.usage-config {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: #f8fafc;
}

.usage-config-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.usage-config-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.usage-config-row {
  display: grid;
  grid-template-columns: minmax(80px, 1.1fr) 64px minmax(140px, 1.4fr) 44px;
  gap: 8px;
  align-items: center;
}

.usage-config-row.fixed {
  grid-template-columns: minmax(140px, 1.2fr) 110px 110px 44px;
}

.usage-config-row.override {
  grid-template-columns: 150px minmax(140px, 1.1fr) 110px 110px 44px;
}

.usage-config-title {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.color-input {
  padding: 0;
  height: 36px;
  width: 56px;
  border-radius: 10px;
}

.usage-config-note {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}

.form-fields {
  display: grid;
  gap: 12px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted);
  background: #fff;
}

.badge.danger {
  background: #fee2e2;
  border-color: #f87171;
  color: #b91c1c;
  font-weight: 600;
}

.notice {
  background: rgba(31, 122, 109, 0.08);
  border: 1px dashed rgba(17, 24, 39, 0.18);
  padding: 12px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 13px;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list-item {
  padding: 10px 12px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: var(--radius);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.9);
  display: block;
  transition: border 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.list-item:hover {
  border-color: rgba(31, 122, 109, 0.45);
  background: rgba(31, 122, 109, 0.08);
  box-shadow: 0 6px 14px rgba(17, 24, 39, 0.12);
  transform: translateY(-1px);
}

.list-item.selected {
  border-color: rgba(31, 122, 109, 0.6);
  box-shadow: 0 0 0 2px rgba(31, 122, 109, 0.18);
}

.list-item.passive { cursor: default; }
.list-item.passive:hover {
  border-color: rgba(17, 24, 39, 0.12);
  background: rgba(255, 255, 255, 0.9);
  transform: none;
  box-shadow: none;
}

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

.label-row .calendar-label-pill {
  font-size: 12px;
  padding: 4px 8px;
}

.label-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.list-item strong {
  display: block;
  font-size: 14px;
}

.list-item span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.booking-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.booking-no {
  font-variant-numeric: tabular-nums;
  background: var(--bg-accent);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--muted);
}

.booking-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.pms-day-list-card .scrollable {
  max-height: 360px;
}

.pms-editor-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.log-list .list-item {
  cursor: default;
  background: #f8fafc;
}

.scrollable {
  max-height: 360px;
  overflow: auto;
}

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

.month-label {
  font-weight: 700;
  font-size: 16px;
}

.calendar-quick-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.calendar-quick-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.calendar-jump {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calendar-jump .input[type="date"] {
  min-width: 148px;
  padding-top: 7px;
  padding-bottom: 7px;
}

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

.calendar-grid.square {
  gap: 0;
  border: 1.5px solid rgba(17, 24, 39, 0.4);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.85);
}

.calendar-grid.square .calendar-cell {
  border-radius: 0;
  border: 0;
  border-right: 1.5px solid rgba(17, 24, 39, 0.35);
  border-bottom: 1.5px solid rgba(17, 24, 39, 0.35);
  padding: 4px;
}

.calendar-grid.square .calendar-cell:hover {
  background: rgba(31, 122, 109, 0.06);
}

.calendar-grid.square .calendar-cell:nth-child(7n) { border-right: 0; }
.calendar-grid.square .calendar-cell:nth-last-child(-n + 7) { border-bottom: 0; }

.calendar-cell {
  min-height: 80px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: var(--radius);
  padding: 6px;
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.calendar-cell:hover {
  border-color: rgba(31, 122, 109, 0.5);
  background: rgba(31, 122, 109, 0.08);
  box-shadow: 0 6px 16px rgba(17, 24, 39, 0.12);
  transform: translateY(-1px);
}

.calendar-cell.dim { color: #94a3b8; }

.calendar-cell.selected {
  border-color: rgba(31, 122, 109, 0.6);
  box-shadow: 0 0 0 2px rgba(31, 122, 109, 0.2);
}

.calendar-cell.over-capacity {
  border-color: #dc2626;
  background: #fef2f2;
  box-shadow: inset 0 0 0 2px #dc2626;
}

.calendar-cell.over-capacity:hover {
  border-color: #b91c1c;
  background: #fee2e2;
  box-shadow: inset 0 0 0 2px #b91c1c;
}

.calendar-grid.square .calendar-cell.over-capacity {
  background: #fef2f2;
}

.calendar-cell .day-number {
  font-weight: 600;
  font-size: 13px;
}

.calendar-cell.weekday-sun .day-number { color: #dc2626; }
.calendar-cell.weekday-sat .day-number { color: #2563eb; }

.calendar-cell .count {
  align-self: flex-start;
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.02em;
}

.calendar-cell.inline {
  min-height: 110px;
  height: 110px;
  overflow: hidden;
}

.calendar-cell-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.calendar-labels {
  height: 18px;
  border-bottom: 1px solid rgba(17, 24, 39, 0.25);
  display: flex;
  align-items: stretch;
  gap: 2px;
  padding: 0 2px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.calendar-label-pill {
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 2px;
  border: 1px solid rgba(15, 23, 42, 0.2);
  font-size: 11px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.calendar-day-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.calendar-bookings {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  color: var(--text);
  max-height: 88px;
  overflow: hidden;
}

.calendar-booking {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(31, 122, 109, 0.12);
  border: 1px solid rgba(31, 122, 109, 0.2);
  overflow: hidden;
  text-overflow: clip;
}

.calendar-booking-time {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
}

.calendar-booking-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.calendar-bookings.text .calendar-booking {
  background: transparent;
  border: none;
  padding: 0;
}

.calendar-bookings.text .calendar-booking-time {
  font-weight: 600;
  color: #475569;
}

.calendar-bookings.text .calendar-booking-title {
  color: #0f172a;
}

.calendar-more {
  font-size: 10px;
  color: var(--muted);
  padding-left: 4px;
}

.summary-card { border-style: dashed; }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

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

.summary-label { font-size: 11px; color: var(--muted); }
.summary-value { font-size: 14px; font-weight: 600; margin-top: 4px; }

.inventory-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.inventory-status-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inventory-status-text {
  min-height: 46px;
  font-size: 13px;
  line-height: 1.7;
}

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

.inventory-guide-item {
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.inventory-guide-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.inventory-guide-copy {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.6;
  color: #475569;
}

.inventory-summary-card .summary-item {
  min-height: 88px;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.inventory-summary-card .summary-value {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.inventory-quick-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(239, 246, 255, 0.98) 100%);
}

.inventory-quick-row {
  gap: 10px;
}

.disclosure {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
  background: #fff;
}

.disclosure summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
  list-style: none;
}

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

.disclosure[open] summary {
  color: var(--text);
  margin-bottom: 8px;
}

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

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

.stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alert {
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  background: rgba(255, 247, 237, 0.9);
  color: #9a3412;
  box-shadow: var(--shadow-soft);
}

.alert.error {
  background: rgba(254, 242, 242, 0.95);
  border-color: rgba(248, 113, 113, 0.35);
  color: #991b1b;
}

.alert-title {
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hidden { display: none; }

.dev-placeholder {
  font-size: 12px;
  color: var(--muted);
  padding: 10px 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-accent);
  margin: 8px 0;
}

body.dev-mode .dev-placeholder { display: none; }
body:not(.dev-mode) .dev-only { display: none; }

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

.table th,
.table td {
  border-bottom: 1px solid var(--border);
  padding: 8px 6px;
  text-align: left;
  font-size: 13px;
}

.inventory-controls .input[type="month"] {
  width: 160px;
}

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

.stock-bento-btn {
  display: flex;
  flex-direction: column;
  gap: 8px;
  grid-column: span 3;
  width: 100%;
  min-height: 156px;
  padding: 12px 14px;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: #0f172a;
  cursor: pointer;
  text-align: left;
  transition: border-color .12s ease, box-shadow .12s ease, background .12s ease, transform .12s ease;
}

.stock-bento-btn.is-item {
  grid-column: span 4;
}

.stock-bento-btn.is-category {
  grid-column: span 8;
}

.stock-bento-btn:hover {
  border-color: #94a3b8;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.07);
  transform: translateY(-1px);
}

.stock-bento-btn.is-active {
  border-color: #0f172a;
  background: #0f172a;
  color: #fff;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.14);
}

.stock-bento-btn.is-disabled,
.stock-bento-btn:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  box-shadow: none;
  background: #f8fafc;
  transform: none;
}

.stock-bento-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stock-bento-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.75);
}

.stock-bento-cta {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

.stock-bento-btn.is-active .stock-bento-pill {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.09);
}

.stock-bento-btn.is-active .stock-bento-cta {
  color: #cbd5e1;
}

.stock-bento-title {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
}

.stock-bento-metric {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}

.stock-bento-desc {
  font-size: 12px;
  line-height: 1.4;
  color: #334155;
}

.stock-bento-meta {
  margin-top: auto;
  font-size: 11px;
  color: #64748b;
}

.stock-bento-btn.is-active .stock-bento-desc,
.stock-bento-btn.is-active .stock-bento-meta {
  color: #dbeafe;
}

.stock-bento-hint {
  margin: 10px 0 0;
}

.stock-bento-detail {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #f8fafc;
}

.stock-action-panel {
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.stock-action-panel + .stock-action-panel {
  margin-top: 10px;
}

.stock-action-panel-head {
  margin-bottom: 10px;
}

.stock-action-panel-head h3 {
  margin: 0;
}

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

.stock-action-form .input {
  width: 100%;
  min-width: 0;
}

.stock-form-span-all {
  grid-column: 1 / -1;
}

.stock-op-hint {
  margin-bottom: 0;
}

.stock-category-chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stock-chip-btn {
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  min-height: 36px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.stock-chip-btn:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.stock-chip-btn.is-active {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

.inventory-items-table tbody tr.selected td {
  background: #eff6ff;
}

.inventory-items-table th.num,
.inventory-items-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.inventory-items-table td.diff.pos {
  color: #166534;
  font-weight: 700;
}

.inventory-items-table td.diff.neg {
  color: #b91c1c;
  font-weight: 700;
}

.inventory-summary-a4 {
  max-width: 980px;
  margin: 0 auto 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.inventory-summary-a4-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 8px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.inventory-summary-a4-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.inventory-summary-a4-period {
  font-size: 12px;
  color: #475569;
}

.inventory-summary-a4-empty {
  margin: 10px 14px 0;
  padding: 8px 10px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  font-size: 12px;
  color: #334155;
  background: #f8fafc;
}

.inventory-summary-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 10px 14px 8px;
}

.inventory-summary-kpi {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  background: #f8fafc;
}

.inventory-summary-kpi-label {
  font-size: 11px;
  color: #64748b;
}

.inventory-summary-kpi-value {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
}

.inventory-summary-kpi-value.pos { color: #166534; }
.inventory-summary-kpi-value.neg { color: #b91c1c; }

.inventory-compare-table {
  table-layout: fixed;
}

.inventory-compare-table th,
.inventory-compare-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 13px;
}

.inventory-compare-table th {
  background: #f8fafc;
  font-weight: 700;
}

.inventory-compare-table th.num,
.inventory-compare-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.inventory-compare-table td.diff.pos {
  color: #166534;
  font-weight: 700;
}

.inventory-compare-table td.diff.neg {
  color: #b91c1c;
  font-weight: 700;
}

.inventory-compare-table tr.is-key-row td {
  background: #f8fafc;
  font-weight: 700;
}

.inventory-items-table td.warn {
  color: #b91c1c;
  font-weight: 600;
}

@media (max-width: 980px) {
  .inventory-summary-a4 {
    max-width: 100%;
  }
  .inventory-summary-kpis {
    grid-template-columns: 1fr;
  }
  .stock-bento-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .stock-bento-btn {
    grid-column: span 3;
  }
  .stock-bento-btn.is-item,
  .stock-bento-btn.is-category {
    grid-column: span 6;
  }
}

@media (max-width: 720px) {
  .stock-action-form {
    grid-template-columns: 1fr;
  }

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

  .stock-bento-btn {
    grid-column: span 1;
    min-height: 132px;
    padding: 12px 10px;
  }

  .stock-bento-btn.is-item,
  .stock-bento-btn.is-category {
    grid-column: span 2;
  }

  .stock-bento-title {
    font-size: 14px;
  }

  .stock-bento-metric {
    font-size: 20px;
  }

  .stock-bento-desc {
    font-size: 11px;
  }
}

@media (max-width: 520px) {
  .stock-bento-grid {
    grid-template-columns: 1fr;
  }

  .stock-bento-btn {
    grid-column: span 1;
    min-height: 118px;
  }

  .stock-bento-btn.is-item,
  .stock-bento-btn.is-category {
    grid-column: span 1;
  }
}

.inventory-xlsx-status {
  margin-bottom: 8px;
}

.inventory-xlsx-status.error {
  color: #b91c1c;
  font-weight: 600;
}

.inventory-xlsx-container {
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.inventory-xlsx-container .pxs-root {
  font-size: 13px;
}

.inventory-xlsx-container .pxs-grid-wrap {
  height: min(72vh, 680px);
  max-height: min(72vh, 680px);
  overflow: auto;
  --pxs-scale: 1;
}

.inventory-xlsx-container .pxs-grid {
  width: max-content;
  min-width: 100%;
  transform: scale(var(--pxs-scale, 1));
  transform-origin: top left;
  border-collapse: separate;
  border-spacing: 0;
}

.inventory-xlsx-container .pxs-grid th,
.inventory-xlsx-container .pxs-grid td {
  border: 1px solid #dbe3ef !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
  white-space: nowrap !important;
  padding: 6px 8px !important;
}

.inventory-xlsx-container .pxs-grid thead th,
.inventory-xlsx-container .pxs-grid tbody th {
  background: #f8fafc;
}

.inventory-xlsx-container .pxs-grid td {
  background: #fff;
}

.line-item {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.9fr 0.7fr 0.7fr 0.9fr 0.9fr auto;
  gap: 6px;
  align-items: center;
}

.line-item .input {
  padding: 7px 8px;
  font-size: 12px;
}

.stage-tracker {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px;
  background: var(--bg-accent);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.stage-tracker::before {
  content: "";
  position: absolute;
  top: 54px;
  left: 6%;
  right: 6%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.stage {
  flex: 1;
  text-align: center;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.stage-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--border);
  margin-bottom: 10px;
  font-size: 20px;
}

.stage-done .stage-icon-wrapper {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}

.stage-in_progress .stage-icon-wrapper {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.stage-blocked .stage-icon-wrapper {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

.stage-not_started .stage-icon-wrapper { color: #94a3b8; }

.stage-name {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--text);
}

.stage-progress-bar {
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  overflow: hidden;
  margin: 0 auto;
  max-width: 80%;
}

.stage-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}

.stage-blockers-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: #dc2626;
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  margin-top: 6px;
}

.stage-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  backdrop-filter: blur(6px);
}

.modal-overlay.top {
  align-items: flex-start;
}

.modal-overlay.hidden {
  display: none;
}

.modal {
  background: rgba(255, 255, 255, 0.98);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(17, 24, 39, 0.12);
  box-shadow: var(--shadow);
  max-width: 640px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
}

.modal.top {
  margin-top: 12px;
  max-height: calc(100vh - 40px);
}

.modal.large {
  max-width: min(1100px, 96vw);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(17, 24, 39, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 20px;
}

.modal-body { padding: 24px; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.modal-divider {
  height: 1px;
  background: var(--border);
  margin: 18px 0;
}

.usage-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.usage-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}

.usage-header h4 {
  margin: 0;
  font-size: 15px;
}

.usage-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.usage-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
}

.usage-dot::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dot-color, #94a3b8);
}

.usage-dot.breakfast::before { background: #fbbf24; }
.usage-dot.lunch::before { background: #22c55e; }
.usage-dot.dinner::before { background: #f87171; }
.usage-dot.other::before { background: #60a5fa; }

.usage-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.usage-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.usage-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}

.usage-row-name {
  font-weight: 600;
  color: var(--text);
}

.usage-bar {
  position: relative;
  height: 32px;
  border-radius: 8px;
  border: none;
  --usage-hours: 16;
  background-image:
    linear-gradient(
      to bottom,
      transparent calc(50% - 3px),
      rgba(148, 163, 184, 0.7) calc(50% - 3px),
      rgba(148, 163, 184, 0.7) calc(50% + 3px),
      transparent calc(50% + 3px),
      transparent 100%
    ),
    radial-gradient(
      circle at center,
      rgba(148, 163, 184, 0.75) 0 3px,
      transparent 3px
    );
  background-size: 100% 100%, calc(100% / var(--usage-hours)) 100%;
  background-repeat: no-repeat, repeat;
  background-position: 0 0, 0 50%;
  overflow: hidden;
}

.usage-slot {
  position: absolute;
  top: 4px;
  border-radius: 8px;
  padding: 4px 6px;
  font-size: 12px;
  color: #0f172a;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 2px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: var(--slot-color, #bfdbfe);
}

.usage-slot span { line-height: 1.2; }

.usage-slot.overlap { background: #e2e8f0; }

.usage-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.usage-time-stack {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  color: rgba(15, 23, 42, 0.75);
  font-variant-numeric: tabular-nums;
}

.usage-time {
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.gantt-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gantt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.gantt-header h4 {
  margin: 0;
  font-size: 15px;
}

.gantt {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  padding: 14px;
  background: #f8fafc;
  overflow-x: auto;
}

.gantt-axis,
.gantt-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: center;
}

.gantt-axis-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.gantt-axis-scale {
  position: relative;
  height: 30px;
  min-width: 640px;
  border-radius: 8px;
  background-color: #fff;
  border-bottom: 1px solid rgba(15, 23, 42, 0.18);
  background-image: linear-gradient(
    to right,
    rgba(15, 23, 42, 0.1) 1px,
    transparent 1px
  );
  background-size: calc(100% / var(--gantt-hours, 12)) 100%;
  background-repeat: repeat;
}

.gantt-axis-hour {
  position: absolute;
  top: 2px;
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.gantt-row-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gantt-row-track {
  position: relative;
  height: 60px;
  min-width: 640px;
  border-radius: 8px;
  background-color: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background-image: linear-gradient(
    to right,
    rgba(15, 23, 42, 0.06) 1px,
    transparent 1px
  );
  background-size: calc(100% / var(--gantt-hours, 12)) 100%;
  background-repeat: repeat;
  overflow: hidden;
}

.gantt-row-track::before {
  content: none;
}

.gantt-bar {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 8px;
  padding: 4px 12px;
  font-size: 13px;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: var(--bar-color, #bfdbfe);
  overflow: hidden;
  white-space: nowrap;
}

.gantt-bar-title {
  overflow: hidden;
  text-overflow: ellipsis;
}

.gantt-bar-badge {
  font-size: 10px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.1);
}

body[data-page="pms"] .gantt-sub {
  display: block;
  font-size: 11px;
  color: #64748b;
}

body[data-page="pms"] .gantt-grid-wrap {
  overflow-x: auto;
  border: 1px solid rgba(17, 24, 39, 0.16);
  border-radius: 10px;
  background: #fff;
}

body[data-page="pms"] .gantt-grid-head,
body[data-page="pms"] .gantt-grid-row {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
}

body[data-page="pms"] .gantt-grid-label-head {
  border-right: 1px solid rgba(17, 24, 39, 0.16);
  border-bottom: 1px solid rgba(17, 24, 39, 0.16);
  background: #f8fafc;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}

body[data-page="pms"] .gantt-grid-time-head {
  --cols: 10;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(12px, 1fr));
  border-bottom: 1px solid rgba(17, 24, 39, 0.16);
}

body[data-page="pms"] .gantt-col-head {
  min-height: 26px;
  border-right: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 10px;
  line-height: 1;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  overflow: visible;
  padding: 0 2px;
}

body[data-page="pms"] .gantt-col-head.is-hour {
  color: #334155;
  font-weight: 700;
}

body[data-page="pms"] .gantt-grid-body {
  display: grid;
}

body[data-page="pms"] .gantt-grid-label {
  border-right: 1px solid rgba(17, 24, 39, 0.16);
  border-bottom: 1px solid rgba(17, 24, 39, 0.16);
  padding: 8px 10px;
  font-size: 12px;
  color: #0f172a;
  line-height: 1.35;
  background: #fff;
}

body[data-page="pms"] .gantt-grid-track {
  --cols: 10;
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(12px, 1fr));
  border-bottom: 1px solid rgba(17, 24, 39, 0.16);
}

body[data-page="pms"] .gantt-cell {
  min-height: 30px;
  border-right: 1px solid #e2e8f0;
  background: #f8fafc;
}

body[data-page="pms"] .gantt-cell.is-fill {
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

body[data-page="pms"] .gantt-fill-staff { background: #334155; }
body[data-page="pms"] .gantt-fill-breakfast { background: #0ea5e9; }
body[data-page="pms"] .gantt-fill-banquet { background: #1d4ed8; }
body[data-page="pms"] .gantt-fill-lunch { background: #0f766e; }
body[data-page="pms"] .gantt-fill-dinner { background: #7c3aed; }
body[data-page="pms"] .gantt-fill-catering { background: #c2410c; }
body[data-page="pms"] .gantt-fill-meeting { background: #475569; }
body[data-page="pms"] .gantt-fill-other { background: #0f172a; }

body[data-page="pms"] .gantt-unset-note {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 11px;
  background: rgba(248, 250, 252, 0.92);
}

.gantt-edit-note {
  font-size: 12px;
  color: var(--muted);
}

.gantt-edit-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gantt-mode-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

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

.gantt-mode-btn.active {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
}

.gantt-field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gantt-field {
  display: none;
  align-items: center;
  gap: 6px;
}

.gantt-edit-list[data-mode="dial"] .gantt-field[data-mode="dial"],
.gantt-edit-list[data-mode="direct"] .gantt-field[data-mode="direct"],
.gantt-edit-list[data-mode="drag"] .gantt-field[data-mode="drag"] {
  display: flex;
}

.gantt-dial-time,
.gantt-dial-date {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.gantt-dial-select {
  min-width: 72px;
}

.gantt-drag-field {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gantt-drag-range {
  min-width: 120px;
}

.gantt-drag-label {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.gantt-edit-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.3fr 1fr 0.9fr 0.9fr 0.7fr;
  gap: 8px;
  align-items: center;
}

.gantt-edit-row .input[type="color"] {
  padding: 0;
  min-height: 36px;
}

.gantt-edit-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 720px) {
  .calendar-labels {
    height: 14px;
    font-size: 9px;
  }
  .calendar-label-pill {
    font-size: 9px;
    padding: 0 4px;
  }
  .label-row .calendar-label-pill {
    font-size: 11px;
    padding: 3px 6px;
  }
  .usage-name {
    font-size: 9px;
    line-height: 1.25;
  }
  .usage-time-stack { font-size: 8px; }
  .usage-time-stack.wrap .usage-time {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
  .usage-time-stack.no-wrap .usage-time {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
  }
  .gantt-axis,
  .gantt-row {
    grid-template-columns: 1fr;
  }
  .gantt-row-label,
  .gantt-axis-label {
    font-size: 12px;
  }
  .gantt-row-track,
  .gantt-axis-scale {
    min-width: 560px;
  }
  body[data-page="pms"] .gantt-grid-head,
  body[data-page="pms"] .gantt-grid-row {
    grid-template-columns: minmax(88px, 116px) 1fr;
  }
  body[data-page="pms"] .gantt-grid-label-head,
  body[data-page="pms"] .gantt-grid-label {
    padding: 6px 8px;
    font-size: 11px;
  }
  body[data-page="pms"] .gantt-grid-time-head,
  body[data-page="pms"] .gantt-grid-track {
    grid-template-columns: repeat(var(--cols), minmax(10px, 1fr));
  }
  body[data-page="pms"] .gantt-col-head {
    font-size: 9px;
    padding: 0 1px;
  }
  body[data-page="pms"] .gantt-cell {
    min-height: 24px;
  }
  body[data-page="pms"] .gantt-grid-wrap.is-compact .gantt-col-head {
    letter-spacing: 0.1px;
  }
  .gantt-edit-row {
    grid-template-columns: 1fr 1fr;
  }
}

.usage-dot::before {
  border-radius: 999px !important;
}
.usage-slot.breakfast { background: #fde68a; }
.usage-slot.lunch { background: #bbf7d0; }
.usage-slot.dinner { background: #fecaca; }
.usage-slot.other { background: #bfdbfe; }

@media (max-width: 720px) {
  .modal.large {
    max-width: 96vw;
  }
  .usage-bar {
    height: 30px;
  }
}

.blocker-list,
.action-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.blocker-item {
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
}

.blocker-item.severity-error { background: #fef2f2; border-color: #fecaca; }
.blocker-item.severity-warning { background: #fffbeb; border-color: #fed7aa; }
.blocker-item.severity-info { background: #eff6ff; border-color: #bfdbfe; }

.blocker-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.blocker-icon { font-size: 18px; }
.blocker-icon.severity-error { color: #dc2626; }
.blocker-icon.severity-warning { color: #d97706; }
.blocker-icon.severity-info { color: #2563eb; }

.blocker-message {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.blocker-hint {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
  padding-left: 26px;
}

.action-btn {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s ease, border 0.2s ease;
}

.action-btn:hover { background: var(--bg-accent); border-color: var(--accent); }

.action-btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.action-btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }

.action-icon { font-size: 18px; }

.editor-area {
  min-height: 180px;
  resize: vertical;
  font-family: var(--font-sans);
}

.preview-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--bg-accent);
  color: var(--muted);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preview-box strong { color: var(--text); font-weight: 600; }

.preview-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.preview-list li,
.preview-text { word-break: break-word; }

.preview-text {
  white-space: pre-wrap;
  color: var(--muted);
}

.plan-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1100px) {
  .two-column-layout { grid-template-columns: 1fr; }
  .split-card { grid-template-columns: 1fr; }
  .split-layout { grid-template-columns: 1fr; }
  .split-layout > * { grid-column: 1 / -1; }
  .bento-span-4,
  .bento-span-5,
  .bento-span-6,
  .bento-span-7,
  .bento-span-8,
  .bento-span-9,
  .bento-span-12 { grid-column: 1 / -1; }
  .tabs-nav { position: static; }
}

@media (max-width: 768px) {
  .topbar-inner { flex-direction: column; align-items: flex-start; }
  .nav { width: 100%; justify-content: space-between; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .search-field { width: 100%; flex-direction: column; align-items: stretch; }
  .calendar-quick-row { align-items: stretch; }
  .calendar-jump { width: 100%; display: grid; grid-template-columns: 1fr auto; }
  .calendar-cell { min-height: 64px; }
  .stage-tracker {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }

  .stage-tracker::before { display: none; }

  .stage {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    width: 100%;
    padding: 12px;
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--border);
  }

  .stage-icon-wrapper {
    width: 44px;
    height: 44px;
    font-size: 18px;
    flex-shrink: 0;
  }

  .stage-progress-bar { max-width: 100%; }

  .line-item { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  body[data-page="pms"] .page {
    max-width: 100%;
    padding: 0;
  }
  body[data-page="pms-booking"] .page {
    max-width: 100%;
    padding: 0;
  }
  body[data-page="pms"] .calendar-card {
    border-radius: 0;
    padding: 0;
    border-left: 0;
    border-right: 0;
  }
  body[data-page="pms"] .calendar-header {
    padding: 12px 12px 0;
  }
  body[data-page="pms"] .calendar-grid.square {
    border-left: 0;
    border-right: 0;
  }
  body[data-page="pms"] .calendar-grid.square .calendar-cell {
    padding: 4px;
    min-height: 92px;
  }
  body[data-page="pms"] .calendar-bookings {
    font-size: 10px;
  }
  .xlsx-container {
    border-radius: 0;
    overflow: visible;
  }
  body[data-page="pms-booking"] .xlsx-container {
    border-radius: 0;
    overflow: visible;
  }
  body[data-page="pms-booking"] .pxs-grid-wrap {
    max-height: none !important;
    overflow: visible !important;
    --pxs-scale: 1;
  }
  body[data-page="pms-booking"] .pxs-grid {
    width: max-content;
    transform: scale(var(--pxs-scale, 1));
    transform-origin: top left;
  }
  body[data-page="pms-booking"] .xlsx-stage-card {
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    background: transparent;
  }
  body[data-page="pms-booking"] .xlsx-stage-card .card-header {
    padding: 12px 12px 0;
  }
  body[data-page="pms-booking"] .xlsx-stage-card .split-card {
    padding: 0 0 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

*,
*::before,
*::after {
  border-radius: 3px !important;
}

.xlsx-container {
  min-height: 520px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.xlsx-stage-card {
  padding: 10px;
}

.xlsx-stage-card .card-header {
  margin-bottom: 6px;
  align-items: flex-start;
}

.xlsx-stage-card .card-header h3 {
  font-size: 16px;
  margin: 0;
}

.xlsx-stage-card .card-subtitle {
  display: none;
}

.xlsx-stage-card .card-actions .btn {
  padding: 6px 10px;
  font-size: 12px;
}

.xlsx-stage-card .split-card {
  grid-template-columns: minmax(0, 1fr) 300px;
}

.xlsx-stage-card .split-pane {
  min-width: 260px;
}

body.xlsx-fullscreen-open {
  overflow: hidden;
}

.xlsx-stage-card.xlsx-fullscreen {
  position: fixed;
  inset: 12px;
  z-index: 1000;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
  padding: 12px;
  overflow: hidden;
}

.xlsx-stage-card.xlsx-fullscreen .split-card {
  height: calc(100vh - 120px);
  grid-template-columns: 1fr;
}

.xlsx-stage-card.xlsx-fullscreen .xlsx-container {
  height: 100%;
  min-height: 0;
}

.xlsx-stage-card.xlsx-fullscreen .split-pane + .split-pane {
  display: none;
}

.xlsx-stage-card .stack .row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.xlsx-stage-card .stack .row .btn {
  padding: 6px 8px;
  font-size: 12px;
}

.xlsx-stage-card .stack .row input[type="text"],
.xlsx-stage-card .stack .row input[type="number"] {
  flex: 1;
  min-width: 140px;
}

.pxs-toolbar input[type="file"] {
  display: none;
}

.pxs-toolbar .pxs-btn {
  display: none;
}

@media (max-width: 900px) {
  .xlsx-stage-card .split-card {
    grid-template-columns: 1fr;
  }
  .xlsx-stage-card .split-pane {
    min-width: 0;
  }
  .xlsx-container {
    min-height: 360px;
  }
}

/* 管理マネージャーのレイアウト再構成。 */
body[data-page="admin-manager"] {
  margin: 0 !important;
  font-family: "Inter", "Noto Sans JP", "Segoe UI", sans-serif !important;
  color: #0f172a !important;
  background:
    radial-gradient(1000px 420px at 0% -10%, #e8efff 0%, transparent 58%),
    radial-gradient(820px 380px at 100% -8%, #eaf6ef 0%, transparent 52%),
    #f8fafc !important;
}

body[data-page="admin-manager"]::before,
body[data-page="admin-manager"]::after {
  display: none !important;
}

body[data-page="admin-manager"] .topbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 20 !important;
  padding: 12px 16px 10px !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.85) !important;
  background: rgba(255, 255, 255, 0.86) !important;
  backdrop-filter: blur(10px) !important;
  box-shadow: none !important;
}

body[data-page="admin-manager"] .admin-topbar-inner {
  width: min(1120px, 100%) !important;
  margin: 0 auto !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}

body[data-page="admin-manager"] .topbar__left,
body[data-page="admin-manager"] .topbar__right {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0 !important;
}

body[data-page="admin-manager"] .topbar__brand {
  text-decoration: none !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em !important;
}

body[data-page="admin-manager"] .topbar__sep {
  color: #cbd5e1 !important;
}

body[data-page="admin-manager"] .topbar__title,
body[data-page="admin-manager"] .topbar__user {
  color: #64748b !important;
  font-size: 13px !important;
}

body[data-page="admin-manager"] .topbar__link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 34px !important;
  padding: 0 10px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #334155 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  text-decoration: none !important;
}

body[data-page="admin-manager"] .topbar__link:hover {
  background: #f8fafc !important;
}

body[data-page="admin-manager"] .topbar__icon-link {
  width: 34px !important;
  padding: 0 !important;
}

body[data-page="admin-manager"] .topbar__icon-link img {
  width: 18px !important;
  height: 18px !important;
  object-fit: contain !important;
}

body[data-page="admin-manager"] .container.admin-page {
  width: min(1120px, 100%) !important;
  margin: 0 auto !important;
  padding: 22px 14px 28px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
}

body[data-page="admin-manager"] .card,
body[data-page="admin-manager"] .panel-header,
body[data-page="admin-manager"] .alert {
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;
  padding: 18px !important;
}

body[data-page="admin-manager"] .card::after {
  display: none !important;
}

body[data-page="admin-manager"] .admin-hero {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}

body[data-page="admin-manager"] .admin-kicker {
  margin: 0 !important;
  font-size: 12px !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: #64748b !important;
  font-weight: 700 !important;
}

body[data-page="admin-manager"] .admin-title {
  margin: 0 !important;
  font-size: 24px !important;
}

body[data-page="admin-manager"] .admin-desc {
  margin: 0 !important;
  color: #64748b !important;
  font-size: 13px !important;
}

body[data-page="admin-manager"] .stats-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important;
  gap: 10px !important;
  margin-top: 10px !important;
}

body[data-page="admin-manager"] .stat-card {
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  background: #f8fafc !important;
  padding: 12px !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

body[data-page="admin-manager"] .stat-label {
  margin: 0 !important;
  font-size: 12px !important;
  color: #64748b !important;
}

body[data-page="admin-manager"] .stat-value {
  margin: 4px 0 0 !important;
  font-size: 22px !important;
  line-height: 1.1 !important;
  font-weight: 700 !important;
  color: #0f172a !important;
}

body[data-page="admin-manager"] .stat-value.is-long {
  font-size: 14px !important;
  line-height: 1.35 !important;
  font-weight: 600 !important;
  white-space: normal !important;
  word-break: break-all !important;
}

body[data-page="admin-manager"] .stat-sub {
  margin: 4px 0 0 !important;
  font-size: 12px !important;
  color: #64748b !important;
}

body[data-page="admin-manager"] #adminOverviewUpdated {
  color: #64748b !important;
  font-size: 12px !important;
}

body[data-page="admin-manager"] .admin-tabs {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)) !important;
  grid-auto-rows: 38px !important;
  gap: 7px !important;
  margin-top: 12px !important;
  border: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

body[data-page="admin-manager"] .adm-tab-btn {
  appearance: none !important;
  border: 1px solid #e2e8f0 !important;
  background: #fff !important;
  color: #334155 !important;
  border-radius: 10px !important;
  padding: 0 10px !important;
  height: 38px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  cursor: pointer !important;
}

body[data-page="admin-manager"] .adm-tab-btn:hover {
  background: #f1f5f9 !important;
}

body[data-page="admin-manager"] .adm-tab-btn.active {
  background: #0f172a !important;
  border-color: #0f172a !important;
  color: #fff !important;
}

body[data-page="admin-manager"] .adm-tab-panel {
  display: none !important;
  flex-direction: column !important;
  gap: 14px !important;
}

body[data-page="admin-manager"] .adm-tab-panel.active {
  display: flex !important;
}

body[data-page="admin-manager"] .panel-header {
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  margin-bottom: 2px !important;
}

body[data-page="admin-manager"] .section-title {
  margin: 0 !important;
  font-size: 18px !important;
}

body[data-page="admin-manager"] .panel-subtitle,
body[data-page="admin-manager"] .card-subtitle {
  margin: 4px 0 0 !important;
  color: #64748b !important;
  font-size: 12px !important;
}

body[data-page="admin-manager"] .split-layout {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

body[data-page="admin-manager"] .split-layout > * {
  grid-column: span 6 !important;
}

body[data-page="admin-manager"] .split-layout > .bento-span-4 {
  grid-column: span 4 !important;
}

body[data-page="admin-manager"] .split-layout > .bento-span-5 {
  grid-column: span 5 !important;
}

body[data-page="admin-manager"] .split-layout > .bento-span-6 {
  grid-column: span 6 !important;
}

body[data-page="admin-manager"] .split-layout > .bento-span-7 {
  grid-column: span 7 !important;
}

body[data-page="admin-manager"] .split-layout > .bento-span-8 {
  grid-column: span 8 !important;
}

body[data-page="admin-manager"] .split-layout > .bento-span-9 {
  grid-column: span 9 !important;
}

body[data-page="admin-manager"] .split-layout > .bento-span-12 {
  grid-column: span 12 !important;
}

body[data-page="admin-manager"] .split-layout > .card:not([class*="bento-span-"]) {
  grid-column: span 12 !important;
}

body[data-page="admin-manager"] .split-card {
  grid-template-columns: 1fr 1fr !important;
  gap: 14px !important;
}

body[data-page="admin-manager"] .btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 40px !important;
  padding: 0 14px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #0f172a !important;
  text-decoration: none !important;
  cursor: pointer !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  box-shadow: none !important;
  transform: none !important;
}

body[data-page="admin-manager"] .btn:hover {
  background: #f8fafc !important;
}

body[data-page="admin-manager"] .btn.primary {
  background: #0f172a !important;
  border-color: #0f172a !important;
  color: #fff !important;
}

body[data-page="admin-manager"] .btn.primary:hover {
  background: #1e293b !important;
  border-color: #1e293b !important;
}

body[data-page="admin-manager"] .input,
body[data-page="admin-manager"] select,
body[data-page="admin-manager"] textarea,
body[data-page="admin-manager"] input[type="file"] {
  width: 100% !important;
  min-height: 42px !important;
  padding: 0 12px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  color: #0f172a !important;
  background: #fff !important;
  outline: none !important;
  box-shadow: none !important;
}

body[data-page="admin-manager"] textarea,
body[data-page="admin-manager"] textarea.input {
  min-height: 120px !important;
  padding: 10px 12px !important;
}

body[data-page="admin-manager"] .input:focus,
body[data-page="admin-manager"] select:focus,
body[data-page="admin-manager"] textarea:focus,
body[data-page="admin-manager"] input[type="file"]:focus {
  border-color: #94a3b8 !important;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.2) !important;
}

body[data-page="admin-manager"] .table-wrap {
  width: 100% !important;
  overflow: auto !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
}

body[data-page="admin-manager"] .table {
  width: 100% !important;
  min-width: 700px !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  font-size: 13px !important;
}

body[data-page="admin-manager"] .table th,
body[data-page="admin-manager"] .table td {
  border-bottom: 1px solid #e2e8f0 !important;
  padding: 10px !important;
  vertical-align: top !important;
}

body[data-page="admin-manager"] .table th {
  position: sticky !important;
  top: 0 !important;
  z-index: 1 !important;
  text-align: left !important;
  color: #475569 !important;
  font-weight: 600 !important;
  background: #f8fafc !important;
}

body[data-page="admin-manager"] .table tbody tr:hover td {
  background: #f8fafc !important;
}

body[data-page="admin-manager"] .hint {
  color: #64748b !important;
  font-size: 12px !important;
}

body[data-page="admin-manager"] .user-section-layout #userList.list {
  gap: 0 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  background: #fff !important;
  overflow: auto !important;
}

body[data-page="admin-manager"] .user-section-layout #userList .list-item {
  border: 0 !important;
  border-bottom: 1px solid #e2e8f0 !important;
  border-radius: 0 !important;
  padding: 12px !important;
  background: #fff !important;
}

body[data-page="admin-manager"] .user-section-layout #userList .list-item:last-child {
  border-bottom: 0 !important;
}

body[data-page="admin-manager"] .user-section-layout #userList .list-item.selected {
  background: #f8fafc !important;
  box-shadow: inset 3px 0 0 #0f172a !important;
}

@media (max-width: 900px) {
  body[data-page="admin-manager"] .split-card {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  body[data-page="admin-manager"] .container.admin-page {
    padding: 16px 10px 24px !important;
  }
  body[data-page="admin-manager"] .admin-topbar-inner {
    align-items: flex-start !important;
    gap: 8px !important;
  }
  body[data-page="admin-manager"] .topbar__right {
    width: 100% !important;
    flex-wrap: wrap !important;
  }

  body[data-page="admin-manager"] .split-layout {
    grid-template-columns: 1fr !important;
  }

  body[data-page="admin-manager"] .split-layout > * {
    grid-column: 1 / -1 !important;
  }
}

/* PMS のカレンダーレイアウト。 */
body[data-page="pms"] {
  background:
    radial-gradient(1000px 420px at 0% -10%, #e8efff 0%, transparent 58%),
    radial-gradient(820px 380px at 100% -8%, #eaf6ef 0%, transparent 52%),
    #f8fafc !important;
  color: #0f172a !important;
  font-family: "Inter", "Noto Sans JP", "Segoe UI", sans-serif !important;
}

body[data-page="pms"]::before,
body[data-page="pms"]::after {
  display: none !important;
}

body[data-page="pms"] .topbar.pms-topbar,
body[data-page="pms-booking"] .topbar.pms-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 12px 16px 10px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  box-shadow: none;
  display: grid;
  gap: 9px;
}

body[data-page="pms"] .pms-topbar-main,
body[data-page="pms-booking"] .pms-topbar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

body[data-page="pms"] .pms-brand,
body[data-page="pms-booking"] .pms-brand {
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
}

body[data-page="pms"] .pms-topbar-userbox,
body[data-page="pms-booking"] .pms-topbar-userbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

body[data-page="pms"] .pms-topbar-user,
body[data-page="pms-booking"] .pms-topbar-user {
  font-size: 13px;
  color: #64748b;
}

body[data-page="pms"] .pms-topbar-chip,
body[data-page="pms-booking"] .pms-topbar-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #e2e8f0;
  border-radius: 999px !important;
  background: #fff;
  color: #334155;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

body[data-page="pms"] .pms-topbar-chip:hover,
body[data-page="pms-booking"] .pms-topbar-chip:hover {
  background: #f8fafc;
}

body[data-page="pms"] .pms-tabs-wrap,
body[data-page="pms-booking"] .pms-tabs-wrap {
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  overflow: hidden;
}

body[data-page="pms"] .pms-tabs-summary,
body[data-page="pms-booking"] .pms-tabs-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 0 14px;
  cursor: pointer;
  user-select: none;
}

body[data-page="pms"] .pms-tabs-summary::-webkit-details-marker,
body[data-page="pms-booking"] .pms-tabs-summary::-webkit-details-marker {
  display: none;
}

body[data-page="pms"] .pms-tabs-summary::after,
body[data-page="pms-booking"] .pms-tabs-summary::after {
  content: "開く";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  background: #fff;
}

body[data-page="pms"] .pms-tabs-wrap[open] .pms-tabs-summary::after,
body[data-page="pms-booking"] .pms-tabs-wrap[open] .pms-tabs-summary::after {
  content: "閉じる";
}

body[data-page="pms"] .pms-tabs-summary-label,
body[data-page="pms-booking"] .pms-tabs-summary-label {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}

body[data-page="pms"] .pms-tabs-summary-current,
body[data-page="pms-booking"] .pms-tabs-summary-current {
  flex: 1 1 auto;
  min-width: 0;
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-page="pms"] .pms-tabs-wrap[open] .pms-tabs-summary,
body[data-page="pms-booking"] .pms-tabs-wrap[open] .pms-tabs-summary {
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
}

body[data-page="pms"] .pms-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  grid-auto-rows: 38px;
  gap: 7px;
  padding: 10px;
}

body[data-page="pms-booking"] .pms-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  grid-auto-rows: 38px;
  gap: 7px;
  padding: 10px;
}

body[data-page="pms"] .pms-tab,
body[data-page="pms-booking"] .pms-tab {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px !important;
  background: #fff;
  color: #334155;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

body[data-page="pms"] .pms-tab-form,
body[data-page="pms-booking"] .pms-tab-form {
  margin: 0;
}

body[data-page="pms"] .pms-tab:hover,
body[data-page="pms-booking"] .pms-tab:hover {
  background: #f8fafc;
}

body[data-page="pms"] .pms-tab.is-active,
body[data-page="pms-booking"] .pms-tab.is-active {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

body[data-page="pms"] .pms-topbar-actions,
body[data-page="pms-booking"] .pms-topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

body[data-page="pms"] .container.pms-container {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 22px 14px 28px;
  display: block;
}

body[data-page="pms"] .card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  padding: 18px;
}

body[data-page="pms"] .card::after {
  display: none;
}

body[data-page="pms"] .card h2 {
  margin: 0 0 10px;
  font-size: 34px;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

body[data-page="pms"] .row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 8px 0;
  flex-wrap: wrap;
}

body[data-page="pms"] .pms-module-toolbar .input[type="month"],
body[data-page="pms"] .pms-module-toolbar .input[type="date"] {
  min-width: 160px;
}

body[data-page="pms"] .pms-module-status {
  margin: 4px 0 10px;
}

body[data-page="pms"] .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px !important;
  background: #fff;
  color: #0f172a;
  text-decoration: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  box-shadow: none;
  transform: none;
}

body[data-page="pms"] .btn:hover {
  background: #f8fafc;
  box-shadow: none;
  transform: none;
}

body[data-page="pms"] .btn.btn-primary,
body[data-page="pms"] .btn-primary {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

body[data-page="pms"] .btn.btn-primary:hover,
body[data-page="pms"] .btn-primary:hover {
  background: #1e293b;
  border-color: #1e293b;
}

body[data-page="pms"] .input {
  min-width: 180px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px !important;
  background: #fff;
}

body[data-page="pms"] .search-input {
  min-width: 320px;
}

body[data-page="pms"] .pms-jump-input {
  min-width: 150px;
  max-width: 170px;
}

body[data-page="pms"] .cal-title {
  min-width: 220px;
  text-align: center;
  font-weight: 700;
  font-size: 30px;
}

body[data-page="pms"] .cal-toolbar {
  display: grid;
  gap: 10px;
  margin-bottom: 8px;
}

body[data-page="pms"] .cal-switch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-page="pms"] .cal-view-switch,
body[data-page="pms"] .cal-cell-switch {
  display: inline-flex;
  gap: 6px;
}

body[data-page="pms"] .cal-view-switch .btn.is-active,
body[data-page="pms"] .cal-cell-switch .btn.is-active {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

body[data-page="pms"] .cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

body[data-page="pms"] .cal-grid.is-week {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
}

body[data-page="pms"] .cal-grid.is-week .cal-cell.is-week-top {
  grid-column: span 4;
}

body[data-page="pms"] .cal-grid.is-week .cal-cell.is-week-bottom {
  grid-column: span 3;
}

body[data-page="pms"] .cal-grid.is-week .cal-cell {
  min-height: 150px;
  padding: 10px;
}

body[data-page="pms"] .cal-grid:not(.is-week) .cal-cell {
  height: 116px;
  min-height: 116px;
  max-height: 116px;
  overflow: hidden;
}

body[data-page="pms"] .cal-dow {
  text-align: center;
  font-size: 13px;
  color: #64748b;
  padding: 7px 0;
  font-weight: 700;
}

body[data-page="pms"] .cal-dow.is-sun {
  color: #dc2626;
}

body[data-page="pms"] .cal-dow.is-sat {
  color: #2563eb;
}

body[data-page="pms"] .cal-cell {
  border: 1px solid #e2e8f0;
  border-radius: 12px !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  min-height: 116px;
  text-align: left;
  padding: 8px;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease;
}

body[data-page="pms"] .cal-cell:hover {
  border-color: #94a3b8;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

body[data-page="pms"] .cal-cell.is-selected {
  border-color: #0f172a;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.14);
}

body[data-page="pms"] .cal-cell.over-capacity {
  border-color: #dc2626;
  background: #fef2f2;
  box-shadow: inset 0 0 0 2px #dc2626;
}

body[data-page="pms"] .cal-cell.is-outside .cal-day {
  color: #94a3b8;
}

body[data-page="pms"] .cal-day {
  font-weight: 700;
  font-size: 14px;
}

body[data-page="pms"] .cal-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px !important;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 700;
  width: fit-content;
  border: 1px solid transparent;
  white-space: nowrap;
}

body[data-page="pms"] .cal-chip.events {
  background: #eef6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

body[data-page="pms"] .is-tappable {
  cursor: pointer;
}

body[data-page="pms"] .calendar-cell-header {
  gap: 4px;
}

body[data-page="pms"] .calendar-labels {
  height: 18px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 2px;
}

body[data-page="pms"] .calendar-label-pill {
  border-radius: 6px !important;
}

body[data-page="pms"] .box {
  border: 1px solid #e2e8f0;
  background: #fafcff;
  border-radius: 12px !important;
  padding: 12px;
  margin-top: 12px;
}

body[data-page="pms"] .box h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

body[data-page="pms"] .pms-day-row {
  margin: 0 0 10px;
}

body[data-page="pms"] #pmsDayList .list-item {
  border: 1px solid #e2e8f0;
  border-radius: 10px !important;
  background: #fff;
}

body[data-page="pms"] #pmsDayList .list-item:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

body[data-page="pms"] #pmsDayModal {
  padding: 0;
  background: rgba(15, 23, 42, 0.5);
}

body[data-page="pms"] #pmsDayModal .pms-day-modal {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  border-radius: 0 !important;
  border: 0;
  box-shadow: none;
}

body[data-page="pms"] #pmsDayModal .modal-header {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #fff;
}

body[data-page="pms"] #pmsDayModal .modal-body {
  height: calc(100vh - 84px);
  overflow-y: auto;
  padding: 18px 24px 28px;
}

body[data-page="pms"] #pmsDayModal .gantt,
body[data-page="pms"] #pmsDayModal .usage-board,
body[data-page="pms"] #pmsDayModal #pmsDayModalList {
  border: 1px solid #e2e8f0;
  border-radius: 10px !important;
  background: #f8fafc;
  padding: 10px;
}

body[data-page="pms"] .hint {
  color: #64748b;
  font-size: 12px;
}

@media (max-width: 900px) {
  body[data-page="pms"] .search-input {
    min-width: 220px;
  }

  body[data-page="pms"] .pms-tabs,
  body[data-page="pms-booking"] .pms-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 759px) {
  body[data-page="pms"] .container.pms-container {
    padding: 10px 8px 22px;
  }

  body[data-page="pms"] .pms-topbar,
  body[data-page="pms-booking"] .pms-topbar {
    padding: 10px 10px 8px;
  }

  body[data-page="pms"] .pms-topbar-actions,
  body[data-page="pms-booking"] .pms-topbar-actions {
    justify-content: flex-start;
  }

  body[data-page="pms"] .cal-title {
    min-width: 0;
    font-size: 16px;
  }

  body[data-page="pms"] .cal-grid.is-week {
    gap: 8px;
  }

  body[data-page="pms"] .cal-grid.is-week .cal-cell {
    min-height: 132px;
    padding: 8px;
  }

  body[data-page="pms"] .cal-grid:not(.is-week) .cal-cell {
    height: 98px;
    min-height: 98px;
    max-height: 98px;
  }

  body[data-page="pms"] .pms-tabs,
  body[data-page="pms-booking"] .pms-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="pms"] #pmsDayModal .modal-body {
    height: calc(100vh - 72px);
    padding: 12px;
  }
}

/* 運用画面と管理画面の共通テーマ。 */
body[data-page="pms"],
body[data-page="admin-manager"] {
  color: var(--text) !important;
  background:
    radial-gradient(900px 700px at -10% -10%, rgba(255, 207, 151, 0.32), transparent 55%),
    radial-gradient(900px 700px at 110% -20%, rgba(140, 222, 210, 0.28), transparent 55%),
    linear-gradient(180deg, #f8f4ec 0%, #f2f6f8 100%) !important;
  font-family: var(--font-sans) !important;
}

body[data-page="pms"] .topbar,
body[data-page="admin-manager"] .topbar {
  background: rgba(255, 255, 255, 0.78) !important;
  border-bottom: 1px solid rgba(17, 24, 39, 0.12) !important;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08) !important;
  backdrop-filter: blur(16px) !important;
}

body[data-page="pms"] .card,
body[data-page="pms"] .panel-header,
body[data-page="pms"] .alert,
body[data-page="pms"] .box,
body[data-page="admin-manager"] .card,
body[data-page="admin-manager"] .panel-header,
body[data-page="admin-manager"] .alert {
  border: 1px solid rgba(17, 24, 39, 0.14) !important;
  border-radius: var(--radius-lg) !important;
  background: rgba(255, 255, 255, 0.9) !important;
  box-shadow: var(--shadow-soft) !important;
}

body[data-page="pms"] .btn,
body[data-page="admin-manager"] .btn {
  border: 1px solid rgba(17, 24, 39, 0.16) !important;
  border-radius: var(--radius) !important;
  background: #fff !important;
  color: var(--text) !important;
  box-shadow: none !important;
}

body[data-page="pms"] .btn:hover,
body[data-page="admin-manager"] .btn:hover {
  background: rgba(31, 122, 109, 0.08) !important;
  border-color: rgba(31, 122, 109, 0.35) !important;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.12) !important;
}

body[data-page="pms"] .btn.primary,
body[data-page="pms"] .btn.btn-primary,
body[data-page="pms"] .btn-primary,
body[data-page="admin-manager"] .btn.primary {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
}

body[data-page="pms"] .btn.primary:hover,
body[data-page="pms"] .btn.btn-primary:hover,
body[data-page="pms"] .btn-primary:hover,
body[data-page="admin-manager"] .btn.primary:hover {
  background: var(--accent-strong) !important;
  border-color: var(--accent-strong) !important;
}

body[data-page="pms"] .btn.ghost,
body[data-page="admin-manager"] .btn.ghost {
  background: transparent !important;
  border-color: rgba(17, 24, 39, 0.18) !important;
  color: var(--text) !important;
}

body[data-page="pms"] .input,
body[data-page="pms"] select,
body[data-page="pms"] textarea,
body[data-page="pms"] input[type="file"],
body[data-page="admin-manager"] .input,
body[data-page="admin-manager"] select,
body[data-page="admin-manager"] textarea,
body[data-page="admin-manager"] input[type="file"] {
  border: 1.5px solid rgba(17, 24, 39, 0.16) !important;
  border-radius: var(--radius) !important;
  background: rgba(255, 255, 255, 0.9) !important;
  color: var(--text) !important;
  box-shadow: none !important;
}

body[data-page="pms"] .input:focus,
body[data-page="pms"] select:focus,
body[data-page="pms"] textarea:focus,
body[data-page="pms"] input[type="file"]:focus,
body[data-page="admin-manager"] .input:focus,
body[data-page="admin-manager"] select:focus,
body[data-page="admin-manager"] textarea:focus,
body[data-page="admin-manager"] input[type="file"]:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(31, 122, 109, 0.16) !important;
}

body[data-page="pms"] .pms-tab,
body[data-page="pms-booking"] .pms-tab,
body[data-page="admin-manager"] .adm-tab-btn {
  border: 1px solid rgba(17, 24, 39, 0.14) !important;
  background: rgba(255, 255, 255, 0.94) !important;
  color: var(--text) !important;
}

body[data-page="pms"] .pms-tab:hover,
body[data-page="pms-booking"] .pms-tab:hover,
body[data-page="admin-manager"] .adm-tab-btn:hover {
  border-color: rgba(31, 122, 109, 0.35) !important;
  background: rgba(31, 122, 109, 0.08) !important;
}

body[data-page="pms"] .pms-tab.is-active,
body[data-page="pms-booking"] .pms-tab.is-active,
body[data-page="admin-manager"] .adm-tab-btn.active {
  border-color: rgba(31, 122, 109, 0.48) !important;
  background: rgba(31, 122, 109, 0.16) !important;
  color: #0f4d45 !important;
  box-shadow: inset 0 0 0 1px rgba(31, 122, 109, 0.2) !important;
}

body[data-page="pms"] .pms-topbar-chip,
body[data-page="pms-booking"] .pms-topbar-chip {
  border-color: rgba(17, 24, 39, 0.16) !important;
  background: rgba(255, 255, 255, 0.94) !important;
  color: var(--text) !important;
}

body[data-page="pms"] .pms-topbar-chip:hover,
body[data-page="pms-booking"] .pms-topbar-chip:hover {
  border-color: rgba(31, 122, 109, 0.35) !important;
  background: rgba(31, 122, 109, 0.08) !important;
}

body[data-page="pms"] .cal-view-switch .btn.is-active,
body[data-page="pms"] .cal-cell-switch .btn.is-active {
  background: rgba(31, 122, 109, 0.16) !important;
  border-color: rgba(31, 122, 109, 0.48) !important;
  color: #0f4d45 !important;
}

.pms-menus-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  align-items: start;
}

.pms-menus-list,
.pms-menus-editor {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.menu-booking-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menu-booking-row {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  padding: 14px 16px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  color: var(--text);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.menu-booking-row:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 122, 109, 0.28);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.menu-booking-row.is-active {
  border-color: rgba(31, 122, 109, 0.44);
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.92), rgba(240, 253, 250, 0.92));
  box-shadow: 0 16px 30px rgba(31, 122, 109, 0.12);
}

.menu-summary-grid {
  margin-bottom: 14px;
}

.menu-category-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.menu-category-card {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: rgba(255, 255, 255, 0.9);
}

.menu-category-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}

.menu-category-amount {
  margin-top: 6px;
  font-size: 20px;
  font-weight: 700;
  color: #0f4d45;
}

.menu-section-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.menu-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.menu-item-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.menu-item-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 255, 0.96));
}

.menu-item-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

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

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

.menu-item-note,
.menu-plan-notes {
  width: 100%;
}

.menu-item-totals {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.menu-ingredient-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menu-ingredient-row {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) 90px 90px 110px 82px;
  align-items: center;
}

.menu-legacy-box {
  margin-top: 12px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.8);
  padding: 10px 12px;
}

.menu-legacy-box summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
}

.menu-legacy-text {
  margin: 10px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--muted);
}

@media (max-width: 980px) {
  .pms-menus-layout {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 640px) {
  .menu-item-grid,
  .menu-ingredient-row {
    grid-template-columns: 1fr;
  }
}
