@charset "UTF-8";
* {
  overflow-wrap: anywhere;
}

a {
  color: #222;
}

body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  background-color: #f4f7f6;
  color: #333;
  margin: 0;
  display: flex;
}

.layout-switcher {
  display: inline-flex;
  background: #eef2f5;
  padding: 4px;
  border-radius: 8px;
  gap: 4px;
}
.layout-switcher .switch-btn {
  border: none;
  background: transparent;
  padding: 6px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: #7f8c8d;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.layout-switcher .switch-btn.active {
  background: #fff;
  color: #3498db;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.layout-switcher .switch-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.5);
}

.management-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}
.management-header .header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

aside {
  width: 240px;
  background-color: #2c3e50;
  color: #ffffff;
  height: 100vh;
  padding: 20px;
  position: fixed;
  transition: all 0.3s ease;
  z-index: 1000;
}
aside #sidebar-toggle {
  position: absolute;
  right: -40px;
  top: 10px;
  background: #2c3e50;
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border-radius: 0 4px 4px 0;
  transition: background 0.3s;
}
aside #sidebar-toggle:hover {
  background: #34495e;
}
aside h1 {
  font-size: 1.5rem;
  margin-bottom: 30px;
}
aside nav ul {
  list-style: none;
  padding: 0;
}
aside nav ul li {
  margin-bottom: 15px;
}
aside nav ul li a {
  color: #bdc3c7;
  text-decoration: none;
  font-weight: 500;
  display: block;
  padding: 10px;
  border-radius: 4px;
  transition: 0.3s;
}
aside nav ul li a:hover, aside nav ul li a.active {
  background-color: #3498db;
  color: #ffffff;
}

main {
  margin-left: 280px;
  padding: 40px;
  width: calc(100% - 280px);
  min-width: 0;
  transition: margin-left 0.3s ease;
}

body.sidebar-collapsed aside {
  transform: translateX(-100%);
}
body.sidebar-collapsed main {
  margin-left: 40px;
  width: calc(100% - 40px);
}

.card {
  background: #ffffff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-size: 0.9rem;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.btn:active {
  transform: translateY(1px);
}
.btn-sm {
  padding: 4px 12px;
  font-size: 0.8rem;
}
.btn-primary {
  background-color: #3498db;
  color: #ffffff;
}
.btn-secondary {
  background-color: #4e34db;
  color: #ffffff;
}
.btn-type-edit {
  background: #34495e;
  color: #fff;
}
.btn-csv-export {
  background: #27ae60;
  color: #fff;
}
.btn-csv-import {
  background: #3498db;
  color: #fff;
}
.btn-csv-format {
  background: #f39c12;
  color: #fff;
}
.btn-cancel {
  background: #ccc;
  color: #333;
}
.btn-duplicate {
  background: #3498db;
  color: white;
}
.btn-delete {
  background: #e74c3c;
  color: white;
}
.btn-add-item {
  background: #2ecc71;
  color: white;
}
.btn-ai {
  background: #667eea;
  color: white;
}
.btn-ai:hover {
  filter: brightness(1.1);
}

.btn-ai-generate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3em 0.8em;
  border: none;
  border-radius: 4px;
  background: #667eea;
  color: white;
  font-size: 11px;
  font-weight: normal;
  text-transform: none;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.btn-ai-generate:hover {
  filter: brightness(1.1);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}
.btn-ai-generate:disabled {
  opacity: 0.7;
  cursor: wait;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
table th,
table td {
  padding: 12px;
  text-align: left;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  font-size: 0.85rem;
  color: #666;
}

.radio-group, .inline-radio-group,
.inline-checkbox-group,
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 5px 0;
}
.radio-group .radio-label, .inline-radio-group .radio-label, .inline-radio-group .inline-radio-label,
.inline-radio-group .inline-checkbox-label,
.inline-checkbox-group .radio-label,
.inline-checkbox-group .inline-radio-label,
.inline-checkbox-group .inline-checkbox-label,
.radio-group .checkbox-label,
.inline-radio-group .checkbox-label,
.inline-checkbox-group .checkbox-label,
.checkbox-group .radio-label,
.checkbox-group .checkbox-label {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #555;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  margin-bottom: 0px;
}
.radio-group .radio-label:hover, .inline-radio-group .radio-label:hover, .inline-radio-group .inline-radio-label:hover,
.inline-radio-group .inline-checkbox-label:hover,
.inline-checkbox-group .radio-label:hover,
.inline-checkbox-group .inline-radio-label:hover,
.inline-checkbox-group .inline-checkbox-label:hover,
.radio-group .checkbox-label:hover,
.inline-radio-group .checkbox-label:hover,
.inline-checkbox-group .checkbox-label:hover,
.checkbox-group .radio-label:hover,
.checkbox-group .checkbox-label:hover {
  border-color: #3498db;
  background-color: rgba(52, 152, 219, 0.05);
  color: #3498db;
}
.radio-group .radio-label input[type=radio], .inline-radio-group .radio-label input[type=radio], .inline-radio-group .inline-radio-label input[type=radio],
.inline-radio-group .inline-checkbox-label input[type=radio],
.inline-checkbox-group .radio-label input[type=radio],
.inline-checkbox-group .inline-radio-label input[type=radio],
.inline-checkbox-group .inline-checkbox-label input[type=radio],
.radio-group .radio-label input[type=checkbox],
.inline-radio-group .radio-label input[type=checkbox],
.inline-radio-group .inline-radio-label input[type=checkbox],
.inline-radio-group .inline-checkbox-label input[type=checkbox],
.inline-checkbox-group .radio-label input[type=checkbox],
.inline-checkbox-group .inline-radio-label input[type=checkbox],
.inline-checkbox-group .inline-checkbox-label input[type=checkbox],
.radio-group .checkbox-label input[type=radio],
.inline-radio-group .checkbox-label input[type=radio],
.inline-checkbox-group .checkbox-label input[type=radio],
.radio-group .checkbox-label input[type=checkbox],
.inline-radio-group .checkbox-label input[type=checkbox],
.inline-checkbox-group .checkbox-label input[type=checkbox],
.checkbox-group .radio-label input[type=radio],
.checkbox-group .radio-label input[type=checkbox],
.checkbox-group .checkbox-label input[type=radio],
.checkbox-group .checkbox-label input[type=checkbox] {
  display: none;
}
.radio-group .radio-label:has(input:checked), .inline-radio-group .radio-label:has(input:checked), .inline-radio-group .inline-radio-label:has(input:checked),
.inline-radio-group .inline-checkbox-label:has(input:checked),
.inline-checkbox-group .radio-label:has(input:checked),
.inline-checkbox-group .inline-radio-label:has(input:checked),
.inline-checkbox-group .inline-checkbox-label:has(input:checked),
.radio-group .checkbox-label:has(input:checked),
.inline-radio-group .checkbox-label:has(input:checked),
.inline-checkbox-group .checkbox-label:has(input:checked),
.checkbox-group .radio-label:has(input:checked),
.checkbox-group .checkbox-label:has(input:checked) {
  background-color: #3498db;
  border-color: #3498db;
  color: #fff;
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.25);
  transform: translateY(-1px);
}
.radio-group .radio-label:active, .inline-radio-group .radio-label:active, .inline-radio-group .inline-radio-label:active,
.inline-radio-group .inline-checkbox-label:active,
.inline-checkbox-group .radio-label:active,
.inline-checkbox-group .inline-radio-label:active,
.inline-checkbox-group .inline-checkbox-label:active,
.radio-group .checkbox-label:active,
.inline-radio-group .checkbox-label:active,
.inline-checkbox-group .checkbox-label:active,
.checkbox-group .radio-label:active,
.checkbox-group .checkbox-label:active {
  transform: scale(0.96);
}

.inline-radio-group,
.inline-checkbox-group {
  display: inline-flex;
  padding: 0;
}
.inline-radio-group .inline-radio-label,
.inline-radio-group .inline-checkbox-label,
.inline-checkbox-group .inline-radio-label,
.inline-checkbox-group .inline-checkbox-label {
  padding: 4px 10px;
  font-size: 0.75rem;
}

input,
textarea,
select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  box-sizing: border-box;
}
input:focus,
textarea:focus,
select:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.u-flex {
  display: flex;
}

.u-items-center {
  align-items: center;
}

.u-justify-between {
  justify-content: space-between;
}

.u-flex-wrap {
  flex-wrap: wrap;
}

.u-gap-8 {
  gap: 8px;
}

.u-gap-10 {
  gap: 10px;
}

.u-gap-12 {
  gap: 12px;
}

.u-gap-15 {
  gap: 15px;
}

.u-gap-20 {
  gap: 20px;
}

.u-mb-0 {
  margin-bottom: 0 !important;
}

.u-mb-5 {
  margin-bottom: 5px;
}

.u-mb-15 {
  margin-bottom: 15px;
}

.u-mb-20 {
  margin-bottom: 20px;
}

.u-mb-25 {
  margin-bottom: 25px;
}

.u-cursor-pointer {
  cursor: pointer;
}

.u-display-none, #ai-create-section {
  display: none;
}

.u-mt-10 {
  margin-top: 10px;
}

.u-mt-15 {
  margin-top: 15px;
}

.u-mt-20, #ai-create-section {
  margin-top: 20px;
}

.u-mt-30, .entry-edit-actions {
  margin-top: 30px;
}

.u-mb-10 {
  margin-bottom: 10px;
}

.u-mb-15 {
  margin-bottom: 15px;
}

.u-mb-20 {
  margin-bottom: 20px;
}

.u-ml-10 {
  margin-left: 10px;
}

.u-p-10 {
  padding: 10px;
}

.u-p-20, #ai-create-section {
  padding: 20px;
}

.u-w-full {
  width: 100%;
}

.u-flex-1 {
  flex: 1;
}

.u-justify-end {
  justify-content: flex-end;
}

.u-h-100 {
  height: 100px;
}

.u-text-center {
  text-align: center;
}

.u-weight-bold {
  font-weight: bold;
}

.u-font-sm {
  font-size: 0.9em;
}

.u-font-xs {
  font-size: 0.8rem;
}

.u-color-sub {
  color: #666;
}

.u-color-accent {
  color: #3498db;
}

.u-border-dashed, #ai-create-section {
  border: 1px dashed #3498db;
}

.u-rounded-8, #ai-create-section {
  border-radius: 8px;
}

.u-bg-light-blue, #ai-create-section {
  background: #f0f9ff;
}

.u-white-space-nowrap {
  white-space: nowrap;
}

.u-overflow-x-auto {
  overflow-x: auto;
}

.form-group {
  margin-bottom: 20px;
}

.field-container {
  margin-bottom: 20px;
}
.field-container.is-detailed .field-row .field-header {
  flex-direction: column;
  align-items: stretch;
}
.field-container.is-detailed .field-row .drag-handle {
  padding-top: 0;
  margin-bottom: 10px;
  display: flex;
  justify-content: center;
  background: #f8f9fa;
  border-radius: 4px;
  padding: 4px;
}
.field-container.is-detailed .field-row .field-main {
  grid-template-columns: 1fr;
  gap: 12px;
}
.field-container.is-detailed .field-row .field-actions {
  padding-top: 15px;
  justify-content: flex-end;
  border-top: 1px solid #f1f1f1;
  margin-top: 10px;
}

.type-selector-wrapper {
  background: #f8f9fa;
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}
.type-selector-wrapper label {
  font-size: 1rem;
  color: #2c3e50;
  margin-bottom: 0px;
}

.segmented-control {
  display: inline-flex;
  background: #eee;
  padding: 4px;
  border-radius: 10px;
  position: relative;
  width: 100%;
  max-width: 500px;
}
.segmented-control input[type=radio] {
  display: none;
}
.segmented-control label {
  flex: 1;
  text-align: center;
  padding: 0.5em;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.7rem;
  color: #7f8c8d;
  transition: all 0.3s;
  border-radius: 8px;
  margin-bottom: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.segmented-control label svg {
  width: 20px;
  height: 20px;
}
.segmented-control input[type=radio]:checked + label {
  color: #fff;
  background: #3498db;
  box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

.template-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 24px;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  overflow: hidden;
}
.template-card:hover {
  border-color: #3498db;
  background: #f0f7ff;
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(52, 152, 219, 0.1);
}
.template-card:hover .template-icon {
  background: #3498db;
  color: #fff;
  transform: scale(1.1);
}
.template-card .template-icon {
  width: 54px;
  height: 54px;
  background: #f8f9fa;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3498db;
  transition: all 0.3s;
  flex-shrink: 0;
}
.template-card .template-icon svg {
  width: 28px;
  height: 28px;
}
.template-card .template-info {
  flex: 1;
}
.template-card .template-info h4 {
  margin: 0 0 4px 0;
  font-size: 1.1rem;
  color: #2c3e50;
}
.template-card .template-info p {
  margin: 0;
  font-size: 0.85rem;
  color: #7f8c8d;
}

.u-tooltip-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.u-tooltip-wrapper .u-tooltip-icon {
  width: 16px;
  height: 16px;
  background: #bdc3c7;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: help;
  transition: all 0.2s;
  margin-left: 8px;
}
.u-tooltip-wrapper .u-tooltip-icon:hover {
  background: #3498db;
}
.u-tooltip-wrapper .u-tooltip-icon:hover + .u-tooltip-content {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-10px);
}
.u-tooltip-wrapper .u-tooltip-content {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: #2c3e50;
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.u-tooltip-wrapper .u-tooltip-content::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #2c3e50;
}

.field-row {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}
.field-row.sortable-ghost {
  opacity: 0.3;
  background: #f8f9fa;
  border: 1px dashed #3498db;
}
.field-row .field-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.field-row .drag-handle {
  cursor: move;
  color: #bdc3c7;
  padding-top: 32px;
  flex-shrink: 0;
  transition: color 0.2s;
}
.field-row .drag-handle:hover {
  color: #3498db;
}
.field-row .drag-handle svg {
  width: 20px;
  height: 20px;
}
.field-row .field-main {
  display: grid;
  grid-template-columns: 3fr 2fr 2fr;
  gap: 20px;
  flex-grow: 1;
}
.field-row .field-input-unit {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field-row .field-input-unit label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #95a5a6;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
}
.field-row .field-input-unit label .btn-ai-generate {
  margin-left: auto;
}
.field-row .field-input-unit input,
.field-row .field-input-unit select {
  background: #fcfcfc;
  border: 1px solid #e6e9eb;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 0.95rem;
}
.field-row .field-input-unit input:focus,
.field-row .field-input-unit select:focus {
  background: #fff;
}
.field-row .field-actions {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-shrink: 0;
}
.field-row .options-row {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #f1f1f1;
  animation: slideDown 0.3s ease-out;
}
.field-row .options-row .field-input-unit {
  width: 100%;
}
.field-row .validation-settings .pattern-checkboxes {
  display: flex !important;
  flex-wrap: wrap;
  gap: 5px;
}
.field-row .validation-settings .pattern-checkboxes label {
  display: flex !important;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  background: #fff;
  margin-bottom: 0;
  font-size: 0.85rem;
  font-weight: normal;
  color: #333;
  white-space: nowrap;
}
.field-row .validation-settings .required-switch {
  display: inline-flex !important;
  margin-bottom: 0;
}
.field-row .validation-settings > div:first-child {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
}
.field-row .validation-settings > div:first-child .field-input-unit {
  flex-direction: row !important;
  align-items: center;
  gap: 10px;
}
.field-row .validation-settings > div:first-child .field-input-unit label {
  white-space: nowrap;
  margin-bottom: 0;
}
.field-row .validation-settings > div:first-child .field-input-unit input[type=number] {
  width: 80px;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.data_type_edit .table_name {
  font-size: 2em;
  margin-bottom: 20px;
}
.data_type_edit .table_name .display-text {
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  border-bottom: 2px dashed transparent;
  transition: all 0.2s;
  display: inline-block;
}
.data_type_edit .table_name .display-text:hover {
  background-color: rgba(52, 152, 219, 0.05);
  border-bottom-color: #3498db;
}
.data_type_edit .table_name .display-text:empty::before {
  content: "無題のデータ型";
  color: #999;
}
.data_type_edit .table_name input {
  font-size: inherit;
  font-weight: bold;
  width: auto;
  min-width: 300px;
  display: none;
  border: 1px solid #3498db;
  padding: 4px 8px;
  border-radius: 4px;
  outline: none;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}
.data_type_edit .table_name.editing .display-text {
  display: none;
}
.data_type_edit .table_name.editing input {
  display: inline-block;
}

.data-entries-overhaul .spreadsheet-container {
  margin-top: 20px;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow-x: auto;
  background: #fff;
}
.data-entries-overhaul .spreadsheet {
  min-width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 0.9rem;
}
.data-entries-overhaul .spreadsheet th,
.data-entries-overhaul .spreadsheet td {
  border: 1px solid #ddd;
  padding: 0;
  height: 40px;
  vertical-align: middle;
}
.data-entries-overhaul .spreadsheet th {
  background-color: #f8f9fa;
  padding: 10px;
  font-weight: 600;
  color: #555;
  text-align: left;
  white-space: nowrap;
}
.data-entries-overhaul .spreadsheet .id-cell {
  background-color: #f8f9fa;
  color: #888;
  text-align: center;
  font-family: monospace;
  white-space: nowrap;
}
.data-entries-overhaul .spreadsheet .date-cell {
  padding: 0 10px;
  color: #888;
  font-size: 0.8rem;
  white-space: nowrap;
}
.data-entries-overhaul .spreadsheet td.editable {
  cursor: cell;
  position: relative;
}
.data-entries-overhaul .spreadsheet td.editable:hover {
  background-color: rgba(52, 152, 219, 0.03);
}
.data-entries-overhaul .spreadsheet td.editable .cell-content {
  padding: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  min-width: 100px;
  width: 100%;
  max-height: 3.5em;
  /* 2 lines + buffer */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
}
.data-entries-overhaul .spreadsheet .inline-input {
  width: 100%;
  height: 100%;
  border: 2px solid #3498db !important;
  padding: 10px;
  font-size: inherit;
  font-family: inherit;
  box-sizing: border-box;
  outline: none;
  border-radius: 0;
}
.data-entries-overhaul .spreadsheet textarea.inline-input {
  padding: 8px;
  resize: none;
}
.data-entries-overhaul .spreadsheet .new-row {
  background-color: #fffdf0;
}
.data-entries-overhaul .spreadsheet .new-row .new-entry-cell {
  padding: 0;
}
.data-entries-overhaul .spreadsheet .new-row .new-entry-cell input,
.data-entries-overhaul .spreadsheet .new-row .new-entry-cell textarea {
  border: none;
  background: transparent;
  width: 100%;
  height: 100%;
  padding: 10px;
  font-size: inherit;
  outline: none;
}
.data-entries-overhaul .spreadsheet .new-row .new-entry-cell input:focus,
.data-entries-overhaul .spreadsheet .new-row .new-entry-cell textarea:focus {
  background: #fff;
  box-shadow: inset 0 0 0 2px #3498db;
}
.data-entries-overhaul .spreadsheet .new-row #btn-create {
  margin: 5px;
  width: calc(100% - 10px);
}
.data-entries-overhaul .spreadsheet .op-cell {
  padding: 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  height: 100%;
  border: none !important;
}
.data-entries-overhaul .spreadsheet .edit-link,
.data-entries-overhaul .spreadsheet .delete-link {
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  display: block;
  white-space: nowrap;
}
.data-entries-overhaul .spreadsheet .edit-link:hover,
.data-entries-overhaul .spreadsheet .delete-link:hover {
  text-decoration: underline;
}
.data-entries-overhaul .spreadsheet .edit-link {
  color: #3498db;
}
.data-entries-overhaul .spreadsheet .delete-link {
  color: #e74c3c;
}
.data-entries-overhaul .detailed-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}
.data-entries-overhaul .detailed-container .entry-card {
  margin-bottom: 0;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  transition: all 0.2s;
}
.data-entries-overhaul .detailed-container .entry-card:hover {
  border-color: #3498db;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.data-entries-overhaul .detailed-container .entry-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
}
.data-entries-overhaul .detailed-container .entry-card .card-header .entry-id {
  font-weight: bold;
  color: #2c3e50;
}
.data-entries-overhaul .detailed-container .entry-card .card-header .entry-date {
  color: #95a5a6;
  font-size: 0.85rem;
}
.data-entries-overhaul .detailed-container .entry-card .card-header .card-actions {
  display: flex;
  gap: 10px;
}
.data-entries-overhaul .detailed-container .entry-card .card-body {
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.data-entries-overhaul .detailed-container .entry-card .card-body .card-field {
  padding: 15px 20px;
  border-bottom: 1px solid #f1f1f1;
  border-right: 1px solid #f1f1f1;
}
.data-entries-overhaul .detailed-container .entry-card .card-body .card-field:last-child {
  border-bottom: none;
}
.data-entries-overhaul .detailed-container .entry-card .card-body .card-field .field-label {
  font-size: 0.75rem;
  font-weight: bold;
  color: #95a5a6;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.data-entries-overhaul .detailed-container .entry-card .card-body .card-field .field-value {
  font-size: 0.95rem;
  color: #2c3e50;
  word-break: break-all;
}
.data-entries-overhaul .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  border-bottom: 2px solid #f8f9fa;
  padding-bottom: 15px;
  flex-wrap: wrap;
  gap: 20px;
}
.data-entries-overhaul .header-container .title-section {
  display: flex;
  align-items: center;
  gap: 20px;
}
.data-entries-overhaul .header-container .title-section h2 {
  margin: 0;
  color: #2c3e50;
}
.data-entries-overhaul .header-container .selector-wrapper {
  display: flex;
  gap: 10px;
  align-items: center;
  background: #f8f9fa;
  padding: 5px 15px;
  border-radius: 8px;
}
.data-entries-overhaul .header-container .selector-wrapper select {
  font-size: 1em;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  min-width: 220px;
}
.data-entries-overhaul .actions-container {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: 8px;
}
.data-entries-overhaul .import-form {
  display: none;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #eee;
}
.data-entries-overhaul .status-msg {
  padding: 10px 15px;
  border-radius: 4px;
  margin-bottom: 20px;
  border: 1px solid transparent;
}
.data-entries-overhaul .status-msg-success {
  background: #d4edda;
  color: #155724;
  border-color: #c3e6cb;
}
.data-entries-overhaul .status-msg-error {
  background: #f8d7da;
  color: #721c24;
  border-color: #f5c6cb;
}
.data-entries-overhaul .empty-state {
  text-align: center;
  padding: 50px;
  color: #999;
  border: 2px dashed #eee;
  border-radius: 8px;
}
.data-entries-overhaul .cell-image {
  max-width: 50px;
  max-height: 50px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}
.data-entries-overhaul .image-field-wrapper {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  height: 32px;
  width: auto;
}
.data-entries-overhaul .image-field-wrapper .image-preview-img {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 2px;
  object-fit: cover;
  background: #eee;
}
.data-entries-overhaul .image-field-wrapper .image-buttons {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.data-entries-overhaul .image-field-wrapper .image-buttons .btn-sm {
  font-size: 0.7rem;
  padding: 2px 6px;
  white-space: nowrap;
  line-height: 1.2;
  height: 24px;
  display: flex;
  align-items: center;
}
.data-entries-overhaul .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  padding: 10px;
}
.data-entries-overhaul .gallery-grid .gallery-item {
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 4px;
  padding: 2px;
  transition: all 0.2s;
}
.data-entries-overhaul .gallery-grid .gallery-item:hover {
  background: #f0f0f0;
  border-color: #3498db;
}
.data-entries-overhaul .gallery-grid .gallery-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 2px;
  display: block;
}

.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}
.modal .modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 800px;
  border-radius: 8px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}
.modal .modal-content .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.modal .modal-content .modal-header h3 {
  margin: 0;
}
.modal .modal-content .modal-header .close-modal {
  cursor: pointer;
  font-size: 24px;
}
.modal .modal-panel {
  flex: 1;
  overflow-y: auto;
  max-height: 50vh;
  margin-top: 15px;
}
.modal .current-preview {
  position: relative;
  display: inline-block;
  margin-bottom: 20px;
  border: 1px solid #ddd;
  padding: 10px;
  border-radius: 8px;
  background: #f9f9f9;
  text-align: center;
}
.modal .current-preview p {
  margin: 0 0 10px 0;
  font-size: 0.8rem;
  color: #666;
}
.modal .current-preview .current-preview-image-wrap {
  position: relative;
  display: inline-block;
}
.modal .current-preview img {
  max-width: 150px;
  max-height: 150px;
  border-radius: 4px;
  display: block;
  margin: 0 auto;
}
.modal .current-preview .current-image-delete {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #dc3545;
  color: #fff;
  border: 2px solid #fff;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s;
  line-height: 1;
  padding: 0;
}
.modal .current-preview .current-image-delete:hover {
  background: #c82333;
  transform: scale(1.1);
}
.modal .tab-container {
  display: flex;
  gap: 10px;
  margin-bottom: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}
.modal .tab-container .btn {
  margin: 0;
  background: #eee;
  color: #333;
}
.modal .tab-container .btn.active {
  background: #3498db;
  color: #fff;
}
.modal .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  padding: 5px;
}
.modal .gallery-grid .gallery-item {
  position: relative;
  aspect-ratio: 1;
  background: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
}
.modal .gallery-grid .gallery-item:hover {
  border-color: #3498db;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.modal .gallery-grid .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.modal .gallery-grid .gallery-item .gallery-delete-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(220, 53, 69, 0.9);
  color: #fff;
  border: 1px solid #fff;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.modal .gallery-grid .gallery-item .gallery-delete-btn:hover {
  background: #dc3545;
}
.modal .gallery-grid .gallery-item:hover .gallery-delete-btn {
  opacity: 1;
}
.modal .drop-zone {
  border: 3px dashed #bbb;
  padding: 40px 20px;
  text-align: center;
  border-radius: 12px;
  transition: all 0.3s;
  background: #fcfcfc;
  margin: 10px 0;
  cursor: pointer;
}
.modal .drop-zone:hover, .modal .drop-zone.drag-over {
  background: #f0f9ff;
  border-color: #3498db;
  color: #3498db;
}
.modal .drop-zone p {
  margin: 15px 0 0 0;
  color: #666;
  font-weight: 600;
}
.modal .drop-zone .btn {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.zoom-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.zoom-modal img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border: 4px solid #fff;
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}
.zoom-modal .zoom-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  line-height: 1;
}

.image-preview-zoomable {
  cursor: zoom-in;
  max-width: 300px !important;
  max-height: 300px !important;
  width: auto !important;
  height: auto !important;
  border: 1px solid #ddd;
  padding: 4px;
  border-radius: 4px;
  background: #fff;
  transition: transform 0.2s;
}
.image-preview-zoomable:hover {
  transform: scale(1.02);
  border-color: #3498db;
}

.management-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.tutorial-link-item {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #ccc;
}
.tutorial-link-item a {
  color: #3498db;
  font-weight: bold;
  text-decoration: none;
}
.tutorial-link-item a:hover {
  text-decoration: underline;
}

.template_event_list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px 0;
  width: 100%;
}

.format_event {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  justify-content: center;
  align-items: stretch;
}
.format_event .template_event {
  max-width: 300px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex !important;
  flex-direction: column;
  width: 100%;
  page-break-inside: avoid;
}
.format_event .template_event .event_image {
  width: 100%;
  height: 180px;
  background-color: #f0f0f0;
  position: relative;
  overflow: hidden;
  margin-bottom: 0;
}
.format_event .template_event .event_image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.format_event .template_event .event_image::after {
  content: "EVENT";
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(52, 152, 219, 0.9);
  color: #fff;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: bold;
  border-radius: 4px;
}
.format_event .template_event .event_info {
  padding: 16px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.format_event .template_event .event_info .event_name {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 12px;
  color: #2c3e50;
  line-height: 1.4;
}
.format_event .template_event .event_info .event_date,
.format_event .template_event .event_info .event_address {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 6px;
  display: flex;
  align-items: flex-start;
}
.format_event .template_event .event_info .event_date::before,
.format_event .template_event .event_info .event_address::before {
  content: "🗓";
  margin-right: 6px;
  font-size: 0.9rem;
}
.format_event .template_event .event_info .event_address::before {
  content: "📍";
}

.embedded-form-wrapper {
  margin: 40px 0;
  padding: 30px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}
.embedded-form-wrapper h3 {
  margin-top: 0;
  margin-bottom: 25px;
  color: #2c3e50;
  font-size: 1.5rem;
  font-weight: 700;
  border-bottom: 2px solid #ffc107;
  padding-bottom: 10px;
  display: inline-block;
}
.embedded-form-wrapper .form-group {
  margin-bottom: 20px;
}
.embedded-form-wrapper .form-group .form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #34495e;
  font-size: 0.95rem;
}
.embedded-form-wrapper .field-input,
.embedded-form-wrapper .field-textarea,
.embedded-form-wrapper .field-select {
  width: 100%;
  padding: 12px;
  border: 1px solid #dcdde1;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s;
  background: #fcfcfc;
}
.embedded-form-wrapper .field-input:focus,
.embedded-form-wrapper .field-textarea:focus,
.embedded-form-wrapper .field-select:focus {
  border-color: #ffc107;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1);
  outline: none;
}
.embedded-form-wrapper .option-group {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 5px;
}
.embedded-form-wrapper .option-label {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  cursor: pointer;
  margin: 0;
  padding: 8px 16px;
  background: #f8f9fa;
  border-radius: 6px;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.embedded-form-wrapper .option-label:hover {
  background: #eef2f5;
  border-color: #dcdde1;
}
.embedded-form-wrapper .option-label input[type=radio],
.embedded-form-wrapper .option-label input[type=checkbox] {
  width: auto !important;
  margin: 0;
  cursor: pointer;
}
.embedded-form-wrapper .form-actions {
  margin-top: 30px;
  text-align: center;
}
.embedded-form-wrapper .form-actions .submit-btn {
  background: linear-gradient(135deg, #ffc107, #ffb300);
  color: #000;
  border: none;
  padding: 14px 40px;
  border-radius: 30px;
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}
.embedded-form-wrapper .form-actions .submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
  filter: brightness(1.05);
}
.embedded-form-wrapper .form-actions .submit-btn:active {
  transform: translateY(0);
}
.embedded-form-wrapper .form-actions .submit-btn:disabled {
  background: #eee;
  color: #999;
  box-shadow: none;
  cursor: not-allowed;
}
.embedded-form-wrapper .form-message {
  margin-top: 20px;
  padding: 15px;
  border-radius: 8px;
  display: none;
  font-weight: 500;
  text-align: center;
  animation: slideDown 0.3s ease-out;
}
.embedded-form-wrapper .form-message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}
.embedded-form-wrapper .form-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.layout-toggle-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.layout-toggle-label {
  font-size: 0.9rem;
  color: #666;
  font-weight: 500;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-switch .toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 26px;
}
.toggle-switch .toggle-slider::before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.toggle-switch input:checked + .toggle-slider {
  background-color: #3498db;
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(24px);
}

.submission-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.submission-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s;
}
.submission-card:hover {
  border-color: #3498db;
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.1);
}

.submission-card-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 12px 20px;
  color: #fff;
}

.submission-date {
  font-size: 0.9rem;
  font-weight: 500;
}

.submission-card-body {
  padding: 20px;
}

.submission-field {
  display: flex;
  padding: 10px 0;
  border-bottom: 1px solid #f1f1f1;
}
.submission-field:last-child {
  border-bottom: none;
}

.submission-field-label {
  flex: 0 0 150px;
  font-weight: 600;
  color: #666;
  font-size: 0.85rem;
}

.submission-field-value {
  flex: 1;
  color: #333;
}

.transposed-table th.transposed-header {
  background: #f8f9fa;
  font-weight: 600;
  color: #2c3e50;
  text-align: left;
  max-width: 100px;
  position: sticky;
  left: 0;
  z-index: 1;
}
.transposed-table td {
  min-width: 200px;
  vertical-align: top;
}
.transposed-table tr:nth-child(even) {
  background: #fafafa;
}

.detailed-container.detailed-view {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.detailed-container.detailed-view .entry-card {
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s;
  background: #fff;
}
.detailed-container.detailed-view .entry-card:hover {
  border-color: #3498db;
  box-shadow: 0 4px 16px rgba(52, 152, 219, 0.12);
}
.detailed-container.detailed-view .entry-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: linear-gradient(135deg, #f8f9fa 0%, #eef1f5 100%);
  border-bottom: 1px solid #e0e0e0;
}
.detailed-container.detailed-view .entry-card .card-header .entry-id {
  font-weight: 700;
  color: #2c3e50;
  font-size: 0.9rem;
  margin-right: 15px;
}
.detailed-container.detailed-view .entry-card .card-header .entry-date {
  color: #95a5a6;
  font-size: 0.85rem;
}
.detailed-container.detailed-view .entry-card .card-header .card-actions {
  display: flex;
  gap: 10px;
  margin-left: auto;
  padding-left: 20px;
}
.detailed-container.detailed-view .entry-card .card-body {
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.detailed-container.detailed-view .entry-card .card-body .card-field {
  padding: 14px 20px;
  border-bottom: 1px solid #f1f1f1;
  border-right: 1px solid #f1f1f1;
  background: #fff;
  transition: background 0.2s;
}
.detailed-container.detailed-view .entry-card .card-body .card-field:hover {
  background: #fafbfc;
}
.detailed-container.detailed-view .entry-card .card-body .card-field:last-child {
  border-bottom: none;
}
.detailed-container.detailed-view .entry-card .card-body .card-field .field-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #95a5a6;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.detailed-container.detailed-view .entry-card .card-body .card-field .field-value {
  font-size: 0.95rem;
  color: #2c3e50;
  word-break: break-word;
  line-height: 1.5;
}
.detailed-container.detailed-view .entry-card .card-body .card-field .field-value:empty::before {
  content: "—";
  color: #ccc;
}

#listLayout table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}
#listLayout table thead th {
  background-color: #eef2f5;
  color: #34495e;
  font-weight: 600;
  padding: 12px 15px;
  border-bottom: 2px solid #dfe6e9;
  white-space: nowrap;
}
#listLayout table tbody tr {
  border-bottom: 1px solid #eee;
  transition: background 0.2s;
}
#listLayout table tbody tr td {
  padding: 12px 15px;
  color: #555;
  vertical-align: middle;
}
#listLayout table tbody tr:nth-child(even) {
  background-color: #f8fafc;
}
#listLayout table tbody tr:hover {
  background-color: #f1f9fe;
}

.submission-detail-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 10px;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
}
.submission-detail-table tr:nth-child(even) {
  background-color: #f8fafc;
}
.submission-detail-table tr th {
  background-color: #eef2f5;
  color: #34495e;
  font-weight: 600;
  padding: 15px 20px;
  border-bottom: 1px solid #e0e0e0;
}
.submission-detail-table tr td {
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  color: #333;
}
.submission-detail-table tr:last-child th,
.submission-detail-table tr:last-child td {
  border-bottom: none;
}

.template_score {
  margin: 20px 0;
  background-color: #111;
  padding: 15px;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  overflow-x: auto;
}
.template_score table {
  width: 100%;
  border-collapse: collapse;
  color: #ffffff;
  font-family: "Courier New", Courier, monospace;
  border: 2px solid #ffffff;
}
.template_score table th,
.template_score table td {
  border: 1px solid #ffffff;
  padding: 8px 4px;
  text-align: center;
  vertical-align: middle;
  font-size: 1.1rem;
  font-weight: bold;
}
.template_score table th {
  font-size: 0.7em;
  background-color: rgba(255, 255, 255, 0.0392156863);
  text-transform: uppercase;
}
.template_score table td {
  background-color: transparent;
}
.template_score table th:first-child,
.template_score table td:first-child {
  min-width: 120px;
  text-align: left;
  padding-left: 10px;
}

.articles table th:nth-child(1),
.data_types table th:nth-child(1) {
  width: 50px;
}

.data-sidebar .data-group {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
}
.data-sidebar .data-group-header {
  padding: 12px 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  user-select: none;
}
.data-sidebar .data-group-header .group-name {
  font-weight: bold;
  flex: 1;
  min-width: 0;
  outline: none;
  border: none;
  background: transparent;
  color: white;
  padding: 2px 4px;
  border-radius: 4px;
}
.data-sidebar .data-group-header .group-name:focus {
  background: rgba(255, 255, 255, 0.2);
}
.data-sidebar .data-group-header .group-name:empty::before {
  content: "グループ名を入力";
  opacity: 0.6;
}
.data-sidebar .data-group-header .group-toggle-icon {
  font-size: 0.8em;
  transition: transform 0.2s ease;
}
.data-sidebar .data-group-header .group-item-count {
  font-size: 0.85em;
  opacity: 0.8;
}
.data-sidebar .data-group-header .group-delete-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
}
.data-sidebar .data-group-header .group-delete-btn:hover {
  background: rgba(255, 255, 255, 0.4);
}
.data-sidebar .data-group-header:hover .group-delete-btn {
  opacity: 1;
}
.data-sidebar .data-group-body {
  background: #f8f9fa;
  padding: 10px;
}
.data-sidebar .data-group-body .data-type-opts,
.data-sidebar .data-group-body .form-item {
  margin-bottom: 10px;
}
.data-sidebar .data-group-body .data-type-opts:last-child,
.data-sidebar .data-group-body .form-item:last-child {
  margin-bottom: 0;
}
.data-sidebar .data-group.is-collapsed .data-group-body {
  display: none;
}
.data-sidebar .data-group.is-collapsed .group-toggle-icon {
  transform: rotate(-90deg);
}
.data-sidebar .data-group.is-drag-over {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.8), 0 4px 15px rgba(102, 126, 234, 0.5);
  transform: scale(1.02);
}
.data-sidebar .data-type-opts,
.data-sidebar .form-item {
  transition: all 0.2s ease;
}
.data-sidebar .data-type-opts.is-dragging,
.data-sidebar .form-item.is-dragging {
  opacity: 0.5;
  transform: scale(0.95);
}
.data-sidebar .data-type-opts.is-drag-over,
.data-sidebar .form-item.is-drag-over {
  border: 2px dashed #667eea !important;
  background: rgba(102, 126, 234, 0.1) !important;
  transform: scale(1.02);
}
.data-sidebar .drop-zone-indicator {
  height: 4px;
  background: #667eea;
  border-radius: 2px;
  margin: 5px 0;
  opacity: 0;
  transition: opacity 0.2s;
}
.data-sidebar .drop-zone-indicator.is-active {
  opacity: 1;
}

.group-name-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
}
.group-name-modal .modal-content {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  min-width: 320px;
  animation: slideUp 0.2s ease;
}
.group-name-modal .modal-content h3 {
  margin: 0 0 20px;
  color: #333;
}
.group-name-modal .modal-content input {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  margin-bottom: 20px;
  box-sizing: border-box;
}
.group-name-modal .modal-content input:focus {
  border-color: #667eea;
  outline: none;
}
.group-name-modal .modal-content .modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.group-name-modal .modal-content .modal-actions button {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}
.group-name-modal .modal-content .modal-actions button.btn-primary {
  background: #667eea;
  color: white;
}
.group-name-modal .modal-content .modal-actions button.btn-primary:hover {
  background: #5a6fd6;
}
.group-name-modal .modal-content .modal-actions button.btn-cancel {
  background: #e0e0e0;
  color: #666;
}
.group-name-modal .modal-content .modal-actions button.btn-cancel:hover {
  background: #d0d0d0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
#dataItemsContainer .notice {
  color: #666;
  font-size: 0.7rem;
  margin: 1em 0;
}

/* Article Template: default */
.template_default {
  display: block;
  font-family: sans-serif;
  line-height: 1.6;
  max-width: 800px;
  margin: 40px auto;
  padding: 20px;
  background: #fdfdfd;
  color: #333;
}
.template_default h1 {
  border-bottom: 2px solid #2c3e50;
  padding-bottom: 10px;
}
.template_default .content {
  margin-top: 30px;
}
.template_default .content img {
  max-width: 100%;
  height: auto;
  display: block;
}
.template_default .content img.img-fluid.w-100 {
  width: 100%;
}
.template_default .content img.img-fluid.w-50 {
  width: 50%;
}
.template_default .content img.img-fluid.w-25 {
  width: 25%;
}
.template_default .content .alignleft {
  float: left;
  margin: 0 20px 20px 0;
}
.template_default .content .alignright {
  float: right;
  margin: 0 0 20px 20px;
}
.template_default .content .aligncenter {
  display: block;
  margin: 20px auto;
}
.template_default .content::after {
  content: "";
  display: table;
  clear: both;
}
.template_default .meta {
  color: #666;
  font-size: 0.9rem;
}
.template_default .form-message {
  padding: 10px;
  margin-top: 10px;
  border-radius: 4px;
}
.template_default .form-message.error {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}
.template_default .form-message.success {
  color: #155724;
  background-color: #d4edda;
  border-color: #c3e6cb;
}

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
}

.toast {
  background: #ffffff;
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  min-width: 200px;
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border-left: 5px solid #3498db;
}
.toast.show {
  transform: translateX(0);
}
.toast.success {
  border-left-color: #2ecc71;
}
.toast.error {
  border-left-color: #e74c3c;
}
.toast.info {
  border-left-color: #3498db;
}

.save-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(2px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  color: #2c3e50;
  font-weight: bold;
}
.save-overlay .spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
.template_template_1 {
  display: block;
  font-family: sans-serif;
  line-height: 1.6;
  max-width: 800px;
  margin: 40px auto;
  padding: 20px;
  background: #baffb2;
  color: #333;
}
.template_template_1 h1 {
  border-bottom: 2px solid #2c3e50;
  padding-bottom: 10px;
}
.template_template_1 .content {
  margin-top: 30px;
}
.template_template_1 .content img {
  max-width: 100%;
  height: auto;
  display: block;
}
.template_template_1 .content img.img-fluid.w-100 {
  width: 100%;
}
.template_template_1 .content img.img-fluid.w-50 {
  width: 50%;
}
.template_template_1 .content img.img-fluid.w-25 {
  width: 25%;
}
.template_template_1 .content .alignleft {
  float: left;
  margin: 0 20px 20px 0;
}
.template_template_1 .content .alignright {
  float: right;
  margin: 0 0 20px 20px;
}
.template_template_1 .content .aligncenter {
  display: block;
  margin: 20px auto;
}
.template_template_1 .content::after {
  content: "";
  display: table;
  clear: both;
}
.template_template_1 .meta {
  color: #666;
  font-size: 0.9rem;
}
.template_template_1 .form-message {
  padding: 10px;
  margin-top: 10px;
  border-radius: 4px;
}
.template_template_1 .form-message.error {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}
.template_template_1 .form-message.success {
  color: #155724;
  background-color: #d4edda;
  border-color: #c3e6cb;
}

.options-editor {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fcfcfc;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #eee;
  margin-top: 8px;
}
.options-editor .options-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 32px;
}
.options-editor .options-chips .option-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: #fff;
  border: 1px solid #dcdfe6;
  border-radius: 20px;
  font-size: 0.85rem;
  color: #606266;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  transition: all 0.2s;
  cursor: move;
}
.options-editor .options-chips .option-chip:hover {
  border-color: #409eff;
  color: #409eff;
  background: #f0f7ff;
}
.options-editor .options-chips .option-chip .remove-option {
  cursor: pointer;
  color: #909399;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  transition: all 0.2s;
}
.options-editor .options-chips .option-chip .remove-option:hover {
  background: #f56c6c;
  color: #fff;
}
.options-editor .options-chips .option-chip.sortable-ghost {
  opacity: 0.4;
  background: #ebf5ff;
}
.options-editor .option-input-group {
  display: flex;
  gap: 8px;
}
.options-editor .option-input-group input.new-option-input {
  flex: 1;
  padding: 8px 12px;
  font-size: 0.9rem;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
}
.options-editor .option-input-group input.new-option-input:focus {
  border-color: #409eff;
  outline: none;
}
.options-editor .option-input-group .btn-add-option {
  background: #409eff;
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: all 0.2s;
}
.options-editor .option-input-group .btn-add-option:hover {
  background: #66b1ff;
  box-shadow: 0 2px 8px rgba(64, 158, 255, 0.4);
}

.data-entries-overhaul {
  /* カラムリサイズ機能 */
  /* 新規登録行の入力欄デザイン */
  /* 画像フィールドの調整 */
  /* 行追加ボタンの改善 */
  /* 画像ボタンの調整 */
  /* 検索バーの調整 */
  /* インライン編集用のスタイル */
  /* 画像モーダルの統合 */
  /* アップロード中の進行状況（簡易） */
}
.data-entries-overhaul .status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: bold;
  cursor: pointer;
  display: inline-block;
  transition: all 0.2s;
  border: none;
}
.data-entries-overhaul .status-badge.status-published {
  background-color: #e8f5e9;
  color: #2e7d32;
}
.data-entries-overhaul .status-badge.status-pending {
  background-color: #fff3e0;
  color: #ef6c00;
}
.data-entries-overhaul .status-badge.status-draft {
  background-color: #f5f5f5;
  color: #757575;
}
.data-entries-overhaul .status-badge:hover {
  opacity: 0.8;
  transform: scale(1.05);
}
.data-entries-overhaul tr.status-pending-row {
  background-color: #fffaf0;
}
.data-entries-overhaul .spreadsheet th {
  position: relative;
}
.data-entries-overhaul .spreadsheet th .resize-handle {
  position: absolute;
  right: 0;
  top: 0;
  width: 5px;
  height: 100%;
  cursor: col-resize;
  background: transparent;
  z-index: 10;
}
.data-entries-overhaul .spreadsheet th .resize-handle:hover, .data-entries-overhaul .spreadsheet th .resize-handle.resizing {
  background: #3498db;
}
.data-entries-overhaul .spreadsheet.resizing {
  cursor: col-resize;
  user-select: none;
}
.data-entries-overhaul .spreadsheet.resizing td,
.data-entries-overhaul .spreadsheet.resizing th {
  user-select: none;
}
.data-entries-overhaul .spreadsheet td {
  min-height: 54px !important;
  padding: 12px 10px !important;
  vertical-align: middle;
  box-sizing: border-box;
  border-bottom: 1px solid #edf2f7;
}
.data-entries-overhaul .spreadsheet td[data-type=image] {
  min-width: 170px !important;
  width: 170px !important;
}
.data-entries-overhaul .spreadsheet td .cell-content {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.data-entries-overhaul .spreadsheet td.editing {
  overflow: visible;
  z-index: 100;
  position: relative;
}
.data-entries-overhaul .spreadsheet th {
  background-color: #f1f5f9;
  color: #475569;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 12px 10px;
  text-align: left;
  border-bottom: 2px solid #e2e8f0;
}
.data-entries-overhaul .new-row {
  background-color: #f8fafc !important;
}
.data-entries-overhaul .new-row .new-entry-cell {
  padding: 15px 12px !important;
}
.data-entries-overhaul .new-row .new-entry-cell input,
.data-entries-overhaul .new-row .new-entry-cell select,
.data-entries-overhaul .new-row .new-entry-cell textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.9rem;
  background-color: #fff;
  transition: all 0.2s;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}
.data-entries-overhaul .new-row .new-entry-cell input:focus,
.data-entries-overhaul .new-row .new-entry-cell select:focus,
.data-entries-overhaul .new-row .new-entry-cell textarea:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
  background-color: #fff;
  outline: none;
}
.data-entries-overhaul .new-row .new-entry-cell textarea {
  height: 80px;
  resize: vertical;
  padding-top: 10px;
}
.data-entries-overhaul .new-row .new-entry-cell .radio-group, .data-entries-overhaul .new-row .new-entry-cell .inline-radio-group,
.data-entries-overhaul .new-row .new-entry-cell .inline-checkbox-group,
.data-entries-overhaul .new-row .new-entry-cell .checkbox-group {
  padding: 10px 5px !important;
  gap: 12px !important;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.data-entries-overhaul .image-field-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 5px 0;
}
.data-entries-overhaul .btn-add-item {
  background-color: #2ecc71 !important;
  color: white !important;
  font-weight: 600 !important;
  padding: 6px 16px !important;
  border-radius: 6px !important;
  border: none !important;
  box-shadow: 0 2px 4px rgba(46, 204, 113, 0.2) !important;
  transition: all 0.2s !important;
  cursor: pointer !important;
}
.data-entries-overhaul .btn-add-item:hover {
  background-color: #27ae60 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 8px rgba(46, 204, 113, 0.3) !important;
}
.data-entries-overhaul .image-buttons {
  display: flex;
  gap: 6px;
}
.data-entries-overhaul .search-box-wrapper {
  position: relative;
  width: 100%;
  margin: 5px 0;
}
.data-entries-overhaul .search-box-wrapper .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}
.data-entries-overhaul .search-box-wrapper .search-input {
  width: 100% !important;
  padding-left: 38px !important;
  border-radius: 20px !important;
  border: 1px solid #e2e8f0 !important;
  transition: all 0.2s;
}
.data-entries-overhaul .search-box-wrapper .search-input:focus {
  border-color: #3498db !important;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1) !important;
}
.data-entries-overhaul .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  padding-bottom: 20px;
  border-bottom: 1px solid #edf2f7;
  margin-bottom: 20px;
}
.data-entries-overhaul .title-section {
  display: flex;
  align-items: center;
  gap: 20px;
}
.data-entries-overhaul .inline-checkbox-group,
.data-entries-overhaul .inline-radio-group {
  position: absolute;
  top: 0;
  left: 0;
  min-width: 200px;
  background: white;
  border: 1px solid #3498db;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  padding: 12px;
  z-index: 1000;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  white-space: normal;
}
.data-entries-overhaul .inline-checkbox-options,
.data-entries-overhaul .inline-radio-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
}
.data-entries-overhaul .inline-checkbox-label,
.data-entries-overhaul .inline-radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 5px 10px;
  background: #f1f5f9;
  border-radius: 4px;
  transition: all 0.2s;
  font-size: 0.85rem;
  color: #334155;
  border: 1px solid #e2e8f0;
}
.data-entries-overhaul .inline-checkbox-label:hover,
.data-entries-overhaul .inline-radio-label:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}
.data-entries-overhaul .inline-checkbox-label input,
.data-entries-overhaul .inline-radio-label input {
  margin: 0;
}
.data-entries-overhaul .btn-inline-save {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: bold;
  transition: background 0.2s;
  align-self: flex-end;
}
.data-entries-overhaul .btn-inline-save:hover {
  background-color: #2980b9;
}
.data-entries-overhaul .modal-content {
  max-width: 800px;
  width: 90%;
}
.data-entries-overhaul .modal-panel {
  display: block !important;
  margin-bottom: 20px;
}
.data-entries-overhaul .gallery-grid {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #eee;
  padding: 10px;
  border-radius: 8px;
  background: #fdfdfd;
}
.data-entries-overhaul .tab-container {
  display: none !important;
}
.data-entries-overhaul #panel-upload {
  border-bottom: 1px solid #eee;
  padding-bottom: 20px;
  margin-bottom: 20px;
}
.data-entries-overhaul .upload-progress {
  font-size: 0.85rem;
  color: #3498db;
  margin-top: 10px;
  font-weight: bold;
}/*# sourceMappingURL=style.css.map */