*,
*::before,
*::after {
  box-sizing: border-box;
}

body.layout-body {
  margin: 0;
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", Meiryo, sans-serif;
  color: #1e293b;
  background: #f1f5f9;
  line-height: 1.6;
}

.layout-shell {
  display: flex;
  min-height: 100vh;
}

.layout-main-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-left: 240px;
}

.layout-main {
  flex: 1;
  padding: 1.5rem 2rem 2rem;
}

.layout-footer {
  padding: 0.75rem 2rem;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
}
.layout-footer__copy {
  margin: 0;
  font-size: 0.75rem;
  color: #64748b;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 240px;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
  background: #0f172a;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
}
.sidebar__brand {
  padding: 1.5rem 1.25rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar__brand-link {
  display: block;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.4;
}
.sidebar__brand-sub {
  margin: 0.375rem 0 0;
  font-size: 0.75rem;
  color: #cbd5e1;
  opacity: 0.8;
}
.sidebar__nav {
  flex: 1;
  padding: 1rem 0.75rem;
}
.sidebar__menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar__item + .sidebar__item {
  margin-top: 0.25rem;
}
.sidebar__link {
  display: block;
  padding: 0.625rem 0.875rem;
  border-radius: 0.375rem;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.sidebar__link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}
.sidebar__link--active {
  background: #1e40af;
  color: #ffffff;
}
.sidebar__link--active:hover {
  background: #1d4ed8;
}

.page-header {
  padding: 1.5rem 2rem 0;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}
.page-header__title {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.3;
}
.page-header__description {
  margin: 0.375rem 0 1.25rem;
  font-size: 0.875rem;
  color: #64748b;
}

.content-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 1.5rem;
}
.content-panel__heading {
  margin: 0 0 1.25rem;
  font-size: 1rem;
  font-weight: 600;
}
.content-panel__placeholder {
  margin: 0;
  color: #64748b;
  font-size: 0.9375rem;
}
.content-panel--spaced {
  margin-bottom: 1.5rem;
}

.menu-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.menu-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.menu-card:hover {
  border-color: #1e40af;
  box-shadow: 0 2px 8px rgba(30, 64, 175, 0.1);
}
.menu-card__title {
  font-size: 1rem;
  font-weight: 600;
  color: #1e40af;
}
.menu-card__description {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.5;
}

.import-form {
  display: grid;
  gap: 1.5rem;
}
.import-form__section {
  margin: 0;
  padding: 0;
  border: 0;
}
.import-form__label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
}
.import-form__file {
  display: block;
  width: 100%;
  font-size: 0.875rem;
}
.import-form__hint {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  color: #64748b;
}
.import-form__error {
  margin: 0.5rem 0 0;
  color: #dc2626;
  font-size: 0.8125rem;
}
.import-form__actions {
  display: flex;
  gap: 0.75rem;
}

.type-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}
@media (max-width: 900px) {
  .type-grid {
    flex-wrap: wrap;
  }
}

.type-card {
  display: block;
  flex: 1 1 0;
  min-width: 0;
  cursor: pointer;
}
.type-card__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.type-card__ui {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  min-height: 100%;
  padding: 0.7rem 0.65rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.type-card__radio {
  position: relative;
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  background: #fff;
  transition: border-color 0.15s, background 0.15s;
}
.type-card__radio::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.15s;
}
.type-card__name {
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.type-card:hover .type-card__ui {
  border-color: #93c5fd;
  background: #f8fbff;
}
.type-card__input:checked + .type-card__ui {
  border-color: #1e40af;
  background: #eff6ff;
  box-shadow: inset 0 0 0 1px #1e40af;
}
.type-card__input:checked + .type-card__ui .type-card__radio {
  border-color: #1e40af;
  background: #1e40af;
}
.type-card__input:checked + .type-card__ui .type-card__radio::after {
  transform: translate(-50%, -50%) scale(1);
}
.type-card__input:focus-visible + .type-card__ui {
  outline: 2px solid #1e40af;
  outline-offset: 2px;
}

.dropzone-grid {
  display: grid;
  gap: 1rem;
  margin-top: 0.85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 720px) {
  .dropzone-grid {
    grid-template-columns: 1fr;
  }
}

.dropzone {
  position: relative;
  display: block;
  min-height: 14rem;
  border: 2px dashed #cbd5e1;
  border-radius: 0.85rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.dropzone:hover {
  border-color: #1e40af;
  background: #eff6ff;
}
.dropzone--dragover {
  border-color: #1e40af;
  border-style: solid;
  background: #dbeafe;
  box-shadow: inset 0 0 0 1px #1e40af;
}
.dropzone--has-file {
  border-style: solid;
  border-color: #1e40af;
  background: #fff;
}
.dropzone__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.dropzone__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 14rem;
  padding: 1.25rem 1rem;
  text-align: center;
}
.dropzone__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e40af;
  font-size: 0.75rem;
  font-weight: 700;
}
.dropzone__icon {
  display: flex;
  color: #1e40af;
  margin: 0.35rem 0 0.1rem;
}
.dropzone__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
}
.dropzone__filename {
  max-width: 100%;
  font-size: 0.75rem;
  color: #64748b;
  word-break: break-all;
}
.dropzone__preview {
  max-width: 100%;
  max-height: 7rem;
  margin-top: 0.35rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.4rem;
}

.flash p {
  margin: 0;
}
.flash__list {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.875rem;
}
.flash--success {
  border-color: #86efac;
  background: #f0fdf4;
}
.flash--warning {
  border-color: #fcd34d;
  background: #fffbeb;
}

.toast-stack {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 40;
  display: grid;
  gap: 0.75rem;
  width: min(22rem, calc(100vw - 2rem));
  pointer-events: none;
}
.toast {
  padding: 0.875rem 1.15rem;
  border-radius: 0.5rem;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.5;
  animation: toast-in 0.35s ease-out;
}
.toast p {
  margin: 0;
}
.toast--success {
  background: #166534;
  color: #f0fdf4;
}
.toast--error {
  background: #991b1b;
  color: #fef2f2;
}
.toast--hide {
  animation: toast-out 0.4s ease-in forwards;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateY(-10px); }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.125rem;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.4;
}
.btn--primary {
  background: #1e40af;
  border-color: #1e40af;
  color: #fff;
}
.btn--primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}
.btn--secondary {
  background: #ffffff;
  color: #1e293b;
  border-color: #cbd5e1;
}
.btn--secondary:hover {
  background: #f8fafc;
}
.btn--danger {
  background: #ffffff;
  color: #b91c1c;
  border-color: #fecaca;
}
.btn--danger:hover {
  background: #fef2f2;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.data-table th,
.data-table td {
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}
.data-table th {
  color: #64748b;
  font-weight: 600;
}
.data-table a {
  color: #1e40af;
  text-decoration: none;
}
.data-table a:hover {
  text-decoration: underline;
}
.data-table__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  white-space: nowrap;
}
.data-table__delete {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: inherit;
  color: #b91c1c;
  cursor: pointer;
}
.data-table__delete:hover {
  text-decoration: underline;
}

.status {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.status--pending, .status--processing {
  background: #dbeafe;
  color: #1e40af;
}
.status--completed {
  background: #dcfce7;
  color: #166534;
}
.status--failed {
  background: #fee2e2;
  color: #991b1b;
}

.pagination-wrap {
  margin-top: 1rem;
}

.ocr-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  min-height: 16rem;
  padding: 2rem 1rem;
  text-align: center;
}
.ocr-loading__spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid #dbeafe;
  border-top-color: #1e40af;
  border-radius: 50%;
  animation: ocr-spin 0.8s linear infinite;
}
.ocr-loading__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}
.ocr-loading__hint {
  margin: 0;
  font-size: 0.8125rem;
  color: #64748b;
}
@keyframes ocr-spin {
  to { transform: rotate(360deg); }
}

.ocr-result {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.4fr);
}
@media (max-width: 960px) {
  .ocr-result {
    grid-template-columns: 1fr;
  }
}
.ocr-result__images {
  display: grid;
  gap: 1rem;
}
.ocr-result__image-block {
  display: grid;
  gap: 0.5rem;
}
.ocr-result__image-caption {
  margin: 0;
  font-size: 0.875rem;
  color: #64748b;
}
.ocr-result__image {
  max-width: 100%;
  height: auto;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
}
.ocr-result__text {
  margin: 0;
  padding: 1rem;
  background: #f1f5f9;
  border-radius: 0.375rem;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.875rem;
  line-height: 1.7;
}

.ocr-meta p {
  margin: 0 0 0.5rem;
}
.ocr-meta__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.ocr-fields {
  display: grid;
  gap: 1rem;
}
.ocr-fields__table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
}
.ocr-fields__table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}
.ocr-fields__table th,
.ocr-fields__table td {
  padding: 0.4rem 0.45rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  white-space: nowrap;
}
.ocr-fields__table th {
  background: #f8fafc;
  color: #64748b;
  font-weight: 700;
}
.ocr-fields__row-head {
  color: #64748b;
  font-weight: 600;
}
.ocr-fields__input {
  width: 7.5rem;
  padding: 0.35rem 0.4rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.3rem;
  font: inherit;
  background: #fff;
}
.ocr-fields__input:focus {
  outline: 2px solid #93c5fd;
  border-color: #1e40af;
}
.ocr-fields__remove {
  padding: 0.25rem 0.5rem;
  border: 1px solid #fecaca;
  border-radius: 0.3rem;
  background: #fef2f2;
  color: #991b1b;
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}
.ocr-fields__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (max-width: 768px) {
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
  }
  .layout-shell {
    flex-direction: column;
  }
  .layout-main-wrap {
    margin-left: 0;
  }
}

/*# sourceMappingURL=style.css.map */
