:root {
  --ink: #1c2230;
  --muted: #6a727d;
  --line: rgba(28, 34, 48, 0.08);
  --navy: #111827;
  --navy-strong: #0b1220;
  --gold: #1fb6a6;
  --copper: #2563eb;
  --emerald: #0f9f8c;
  --panel: rgba(255, 251, 245, 0.88);
  --shadow: 0 22px 60px rgba(65, 44, 14, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans JP", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(53, 194, 161, 0.18), transparent 24%),
    radial-gradient(circle at bottom right, rgba(60, 130, 246, 0.12), transparent 22%),
    linear-gradient(135deg, #eff5f7 0%, #fafcfd 52%, #eef4f7 100%);
}

button,
input,
select {
  font: inherit;
}

.page-wrap {
  min-height: 100vh;
}

.login-screen,
.main-content {
  padding: 24px;
}

.login-panel {
  min-height: 92vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  border-radius: 34px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(11, 18, 32, 0.98), rgba(17, 24, 39, 0.9));
  box-shadow: 0 36px 90px rgba(22, 17, 9, 0.22);
}

.login-copy {
  padding: 68px;
  color: #fffaf2;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-copy h1 {
  margin: 0;
  font-family: "Outfit", sans-serif;
  font-size: clamp(48px, 7vw, 88px);
  line-height: 0.94;
}

.login-copy p:last-child {
  max-width: 42ch;
  line-height: 1.85;
  color: rgba(255, 250, 242, 0.84);
}

.login-card,
.summary-card,
.panel,
.shortcut-card,
.inventory-card {
  border-radius: 26px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.52);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.login-card {
  margin: 28px;
  padding: 28px;
  display: grid;
  gap: 16px;
  align-content: center;
}

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

.brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #35c2a1, #2563eb);
  color: #fff8ef;
  font-family: "Outfit", sans-serif;
  font-weight: 800;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.login-copy .eyebrow {
  color: rgba(255, 250, 242, 0.7);
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 13px;
  color: var(--muted);
}

.field input,
.field select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(28, 34, 48, 0.12);
  background: rgba(255, 255, 255, 0.76);
  outline: none;
}

.field.inline {
  grid-template-columns: 70px 1fr;
  align-items: center;
}

.login-actions,
.search-layout,
.search-toolbar,
.action-strip,
.order-entry,
.tab-bar,
.order-switches,
.payment-switches {
  display: flex;
  gap: 12px;
  align-items: center;
}

.grow {
  flex: 1;
}

.primary-button,
.ghost-button,
.tab-chip,
.shortcut-card,
.mini-option,
.mini-cta,
.seat-action {
  border: 0;
  cursor: pointer;
}

.primary-button,
.ghost-button {
  padding: 14px 20px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.primary-button {
  background: linear-gradient(135deg, #0b1220, #123d92);
  color: #fff;
}

.primary-button.danger {
  background: linear-gradient(135deg, #67261e, #b24734);
}

.ghost-button {
  background: rgba(18, 61, 146, 0.08);
  color: #0f315f;
  border: 1px solid rgba(18, 61, 146, 0.16);
}

.primary-button:disabled,
.ghost-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.compact {
  padding: 11px 16px;
}

.full {
  width: 100%;
}

.screen,
.tab-screen,
.mode-screen {
  display: none;
  animation: rise 220ms ease;
}

.screen.is-visible,
.tab-screen.is-visible,
.mode-screen.is-visible {
  display: block;
}

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

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

.header-actions {
  display: flex;
  gap: 12px;
}

.hero-header h2,
.screen-header h3,
.panel h4 {
  margin: 0;
}

.screen-copy {
  max-width: 60ch;
  margin: 10px 0 0;
  line-height: 1.8;
  color: var(--muted);
}

.status-pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(29, 135, 112, 0.14);
  color: #146d5b;
}

.home-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.shortcut-card {
  padding: 22px 18px;
  text-align: left;
  color: #10213f;
  min-height: 144px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.92), rgba(236, 247, 255, 0.88)),
    linear-gradient(135deg, #9ddcff, #d5f0ff);
  border: 1px solid rgba(37, 99, 235, 0.12);
}

.shortcut-card strong {
  display: block;
  margin-bottom: 6px;
}

.shortcut-card span {
  font-size: 13px;
  color: rgba(16, 33, 63, 0.72);
}

.shortcut-card:nth-child(2n) {
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.94), rgba(234, 255, 250, 0.9)),
    linear-gradient(135deg, #b8f7e5, #dffff7);
}

.shortcut-card:nth-child(3n) {
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.94), rgba(243, 241, 255, 0.92)),
    linear-gradient(135deg, #cfe0ff, #eceeff);
}

.shortcut-card:nth-child(4n) {
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.95), rgba(255, 246, 231, 0.9)),
    linear-gradient(135deg, #ffe3b3, #fff3d8);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.summary-card {
  padding: 22px;
}

.summary-card span {
  color: var(--muted);
  font-size: 14px;
}

.summary-card strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 30px;
}

.summary-card em {
  color: var(--muted);
  font-style: normal;
}

.tone-navy {
  border-top: 6px solid var(--navy);
}

.tone-copper {
  border-top: 6px solid var(--copper);
}

.tone-emerald {
  border-top: 6px solid var(--emerald);
}

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

.panel {
  grid-column: span 4;
  padding: 20px;
}

.panel.wide {
  grid-column: span 8;
}

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

.customer-preview,
.table-like,
.stack-item,
.seat-select,
.receipt-preview,
.formula-box,
.shift-graph,
.empty-state,
.free-layout-stage,
.report-box {
  background: rgba(255, 255, 255, 0.58);
  border-radius: 20px;
}

.customer-preview,
.table-like,
.receipt-preview,
.formula-box,
.empty-state,
.report-box {
  padding: 14px 16px;
}

.empty-state {
  color: var(--muted);
}

.preview-main {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.preview-main span {
  font-size: 13px;
  color: var(--muted);
}

.preview-grid,
.editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.preview-grid div,
.stack-item {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
}

.preview-grid span,
.stack-item span {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--muted);
}

.top-gap {
  margin-top: 14px;
}

.full-span {
  grid-column: 1 / -1;
}

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

.mini-option {
  padding: 12px 10px;
  border-radius: 14px;
  background: rgba(28, 34, 48, 0.06);
}

.mini-option.is-selected {
  background: rgba(29, 135, 112, 0.14);
  color: #146d5b;
}

.tab-bar,
.order-switches {
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tab-chip {
  padding: 11px 16px;
  border-radius: 999px;
  background: rgba(28, 34, 48, 0.06);
}

.tab-chip.is-current {
  background: linear-gradient(135deg, #111827, #123d92);
  color: #fff;
}

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

.seat-mini {
  padding: 14px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(28, 34, 48, 0.08);
}

.seat-mini.selected {
  background: rgba(37, 99, 235, 0.14);
}

.table-like.large {
  overflow-x: auto;
}

.table-row {
  display: grid;
  gap: 12px;
  align-items: center;
  padding: 12px 8px;
}

.table-row + .table-row {
  border-top: 1px solid var(--line);
}

.table-row.head {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.table-row.three {
  grid-template-columns: 1fr 1fr 0.8fr;
}

.table-row.four {
  grid-template-columns: 1.1fr 0.8fr 0.8fr 1fr;
}

.table-row.five {
  grid-template-columns: 1.2fr 0.7fr 0.8fr 0.9fr 0.9fr;
}

.table-row.seven {
  grid-template-columns: 1fr 0.7fr 0.7fr 0.7fr 1.2fr 0.9fr 0.8fr;
}

.table-row.ten {
  grid-template-columns: 0.5fr 0.7fr 0.8fr 1.2fr 0.7fr 0.9fr 0.9fr 0.6fr 0.7fr 0.7fr;
}

.mini-cta {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(31, 182, 166, 0.16);
}

#add-order-button {
  white-space: nowrap;
  font-size: 13px;
}

.table-row.is-clickable {
  cursor: pointer;
  transition: background 140ms ease;
}

.table-row.is-clickable:hover {
  background: rgba(37, 99, 235, 0.06);
}

.table-row.is-selected {
  background: rgba(31, 182, 166, 0.1);
}

.receipt-preview {
  min-height: 340px;
}

.receipt-paper {
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  border: 1px solid rgba(28, 34, 48, 0.08);
}

.receipt-paper h5 {
  margin: 0 0 12px;
  font-size: 18px;
}

.receipt-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(28, 34, 48, 0.12);
}

.receipt-total {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 2px solid rgba(28, 34, 48, 0.14);
  display: flex;
  justify-content: space-between;
  font-weight: 800;
}

.shift-graph {
  padding: 18px;
  overflow-x: auto;
}

.shift-axis {
  display: grid;
  grid-template-columns: 120px repeat(25, minmax(24px, 1fr));
  gap: 4px;
  align-items: center;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 11px;
}

.shift-axis span:first-child {
  opacity: 0;
}

.shift-legend {
  display: flex;
  gap: 18px;
  align-items: center;
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-right: 6px;
}

.legend-start {
  background: #111827;
}

.legend-active {
  background: #1fb6a6;
}

.legend-end {
  background: #2563eb;
}

.shift-grid {
  display: grid;
  gap: 10px;
}

.shift-row {
  display: grid;
  grid-template-columns: 120px repeat(24, minmax(24px, 1fr));
  gap: 8px;
  align-items: center;
}

.shift-name {
  font-weight: 700;
  font-size: 13px;
}

.shift-track {
  position: relative;
  height: 26px;
  border-radius: 999px;
  grid-column: 2 / -1;
  border: 1px solid rgba(17, 24, 39, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(245, 248, 251, 0.86));
  overflow: hidden;
}

.shift-bar {
  position: absolute;
  top: 3px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, #111827 0%, #123d92 55%, #1fb6a6 100%);
  box-shadow: 0 8px 22px rgba(18, 61, 146, 0.18);
}

.shift-time-labels {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
  pointer-events: none;
  color: rgba(17, 24, 39, 0.58);
  font-size: 10px;
}

.free-layout-stage {
  position: relative;
  min-height: 520px;
  padding: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.08)),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 39px,
      rgba(28, 34, 48, 0.05) 39px,
      rgba(28, 34, 48, 0.05) 40px
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 39px,
      rgba(28, 34, 48, 0.05) 39px,
      rgba(28, 34, 48, 0.05) 40px
    );
}

.layout-table {
  position: absolute;
  width: 140px;
  min-height: 124px;
  padding: 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(28, 34, 48, 0.1);
  box-shadow: var(--shadow);
  cursor: grab;
}

.layout-table.occupied {
  border-color: rgba(200, 110, 75, 0.4);
}

.layout-table h5 {
  margin: 0 0 6px;
}

.layout-table p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.seat-action {
  width: 100%;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(18, 61, 146, 0.12);
}

.layout-table.is-selected {
  box-shadow: 0 0 0 2px rgba(18, 61, 146, 0.25), var(--shadow);
}

.seat-meta {
  display: flex;
  gap: 8px;
  margin: 8px 0 10px;
  flex-wrap: wrap;
}

.seat-chip {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.06);
  color: var(--muted);
  font-size: 11px;
}

.daily-report-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.report-box.large {
  grid-column: span 2;
}

.report-box h4 {
  margin: 0 0 12px;
}

.report-lines {
  display: grid;
  gap: 8px;
}

.report-lines div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.report-memo {
  min-height: 120px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  line-height: 1.8;
}

.inventory-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.inventory-add-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 0.7fr 1.2fr auto;
  gap: 12px;
  align-items: end;
}

.inventory-card {
  padding: 18px;
}

.inventory-card h4 {
  margin: 0 0 10px;
}

.inventory-card p {
  margin: 0 0 14px;
  color: var(--muted);
}

.inventory-card .eyebrow {
  margin-bottom: 8px;
}

.inventory-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.inventory-note {
  min-height: 36px;
  color: var(--muted);
  font-size: 13px;
}

.inventory-order-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
  margin: 12px 0;
}

.inventory-order-grid .field input {
  padding: 10px 12px;
}

.inventory-summary-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.payment-switches {
  flex-wrap: wrap;
}

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

.inventory-actions button {
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(28, 34, 48, 0.06);
  cursor: pointer;
}

.inventory-card.optims {
  border-top: 6px solid #123d92;
}

.modal-shell {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(11, 18, 32, 0.54);
  z-index: 50;
}

.modal-shell.is-open {
  display: grid;
}

.modal-card {
  width: min(820px, 100%);
  max-height: 80vh;
  overflow: auto;
  padding: 26px;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 248, 255, 0.98)),
    linear-gradient(135deg, #e4f0ff, #f4fffd);
  box-shadow: 0 32px 80px rgba(11, 18, 32, 0.28);
}

.modal-meta {
  margin-bottom: 12px;
  color: var(--muted);
}

.modal-copy {
  margin-bottom: 16px;
  color: var(--muted);
}

.order-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.order-picker-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(18, 61, 146, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(238, 247, 255, 0.9)),
    linear-gradient(135deg, #f4fbff, #ecfff9);
  box-shadow: 0 16px 36px rgba(18, 61, 146, 0.08);
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.order-picker-card:hover {
  transform: translateY(-2px);
  border-color: rgba(18, 61, 146, 0.24);
  box-shadow: 0 22px 42px rgba(18, 61, 146, 0.14);
}

.order-picker-card .eyebrow {
  margin-bottom: 10px;
}

.order-picker-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
  color: #10213f;
}

.order-picker-price {
  font-size: 24px;
  font-weight: 800;
  color: #123d92;
}

.order-picker-note {
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.order-picker-card button {
  width: 100%;
}

@media (max-width: 1180px) {
  .login-panel,
  .home-shortcuts,
  .summary-grid,
  .inventory-board,
  .daily-report-layout,
  .order-picker-grid {
    grid-template-columns: 1fr;
  }

  .panel,
  .panel.wide {
    grid-column: span 12;
  }
}

@media (max-width: 760px) {
  .login-screen,
  .main-content {
    padding: 16px;
  }

  .login-copy,
  .login-card {
    padding: 22px;
    margin: 16px;
  }

  .screen-header,
  .header-actions,
  .search-layout,
  .search-toolbar,
  .action-strip,
  .order-entry {
    flex-direction: column;
    align-items: stretch;
  }

  .inventory-add-grid {
    grid-template-columns: 1fr;
  }

  .preview-grid,
  .editor-grid,
  .headcount-grid,
  .seat-select,
  .daily-report-layout,
  .shift-axis,
  .shift-row {
    grid-template-columns: 1fr;
  }

  .shift-row,
  .table-row,
  .table-row.three,
  .table-row.four,
  .table-row.five,
  .table-row.seven,
  .table-row.ten {
    grid-template-columns: 1fr;
  }
}
