/* ================================================== */
/* 共通スタイル */
/* ================================================== */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #fafafa;
  color: #333333;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.logo-text {
  font-size: 18px;
  font-weight: 400;
  color: #444746;
}

.mobile-top-tabs {
  display: flex;
  justify-content: space-around;
  gap: 32px;
  border-bottom: 1px solid #e0e2e0;
  padding-bottom: 8px;
  margin: 64px 8px 8px 8px;
}

.mobile-top-tabs .tab-item {
  text-decoration: none;
  color: #444746;
  font-size: 14px;
  padding: 8px;
  padding-top: 0;
  position: relative;
}

.mobile-top-tabs .tab-item.active {
  color: #0b57d0;
  font-weight: 600;
}

.mobile-top-tabs .tab-item.active::after {
  content: '';
  position: absolute;
  bottom: -9px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: #0b57d0;
  border-radius: 3px 3px 0 0;
}

.mobile-fab-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: fixed;
  right: 16px;
  bottom: 90px;
  z-index: 900;
}

main {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100vh;
  margin-top: 64px;
  overflow-y: scroll;
  scrollbar-width: none;
  /* Firefox */
}

.mobile-top-tabs+main {
  margin-top: 0px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  color: #444746;
  font-size: 14px;
  margin-bottom: 2px;
}

.nav-item:hover {
  background-color: #e9eef6;
}

.nav-item.active {
  background-color: #c2e7ff;
  color: #001d35;
  font-weight: 600;
}

.section_content {
  flex: 1;
  background-color: #ffffff;
  padding: 8px;
  padding-bottom: 320px;
  display: flex;
  flex-direction: column;
}

.content-title {
  display: none;
  font-size: 22px;
  font-weight: 400;
  color: #1f1f1f;
}

.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.chip {
  background: none;
  border: 1px solid #747775;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  color: #444746;
}

.chip:hover {
  background-color: #f1f3f4;
}

.fab-btn {
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.18);
}

.fab-primary {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background-color: #d3e3fd;
  font-size: 28px;
  color: #041e49;
}




.entry_bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.entry_input {
  position: relative;
  flex: 1;
  width: 100%;
  padding: 12px;
  background-color: #fafafa;
  border: 1px solid #cdcdcd;
  border-radius: 19px;
  outline: none;
  transition: all 0.2s;
}

.entry_input:focus {
  border-color: #1e50a2;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.submit_btn {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 12px 24px;
  background-color: #1e50a2;
  color: #fafafa;
  border: none;
  border-radius: 19px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.submit_btn:has(> svg) {
  padding: 12px;
}

.submit_btn:hover {
  background-color: #1e50a2;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}




@media (min-width: 768px) {
  .mobile-top-tabs+main {
    margin-top: 64px;
  }

  main {
    flex-direction: row;
    margin-bottom: 0px;
  }

  .content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
  }

  .content-title {
    display: block;
  }

  .mobile-top-tabs,
  .mobile-fab-container {
    display: none;
  }
}





/* ================================================== */
/* includes/header.php */
/* ================================================== */
.drawer-overlay {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 900;
  width: 100%;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background-color: #f8fafd;
}

.header_left {
  width: auto;
}

.header_left .logo-link {
  display: none;
}

.header_center {
  padding: 0 8px;
}

.icon-btn {
  background: none;
  border: none;
  padding: 8px;
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #444746;
  text-decoration: none;
}

.icon-btn:hover {
  background-color: #e9eef6;
}

.header_right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mypage-btn {
  display: none;
}

@media (min-width: 768px) {
  .header {
    padding: 0 16px;
  }

  .header_left {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 240px;
  }

  #menu-toggle-btn {
    display: none;
  }

  .header_left .logo-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #444746;
  }

  .header_center {
    flex: 1;
    max-width: 720px;
    padding: 0 16px;
  }

  .mypage-btn {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444746;
    text-decoration: none;
  }

  .reload-btn {
    display: none;
  }
}

@media (min-width: 1200px) {}





/* ================================================== */
/* includes/sidebar.php */
/* ================================================== */
.side-nav {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100%;
  z-index: 1000;
  padding: 8px 12px;
  background-color: #f8fafd;
  transition: left 0.3s ease;
  border-radius: 0 16px 16px 0;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
}

.side-nav.open {
  left: 0;
}

.nav-header {
  display: block;
  padding: 20px 16px;
  font-size: 20px;
  font-weight: 500;
  border-bottom: 1px solid #e0e2e0;
  margin-bottom: 8px;
}

.nav-header .logo-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #444746;
}

.nav-btn {
  display: none;
  padding: 8px 0 16px 4px;
}

.nav-menu {
  flex: 1;
  overflow-y: auto;
}

.nav-block+.nav-block {
  border-top: 1px solid #e0e2e0;
  padding-top: 8px;
  margin-top: 8px;
}

.nav-info {
  padding: 16px 12px;
}

@media (min-width: 768px) {
  .side-nav {
    position: static;
    left: auto;
    width: 256px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .nav-header {
    display: none;
  }

  .nav-btn {
    display: block;
  }

  .btn-create {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background-color: #ffffff;
    border: none;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: box-shadow 0.2s;
  }

  .btn-create:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    background-color: #f0f4f9;
  }
}

@media (min-width: 1200px) {}





/* ================================================== */
/* includes/bottom_nav.php */
/* ================================================== */
.bottom-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 64px;
  background-color: #f1f4f9;
  border-top: 1px solid #e0e2e0;
  z-index: 950;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #444746;
  font-size: 11px;
  gap: 4px;
}

.bottom-nav-icon {
  padding: 4px 16px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bottom-nav-item.active {
  color: #1f1f1f;
  font-weight: 600;
}

.bottom-nav-item.active .bottom-nav-icon {
  background-color: #c2e7ff;
  color: #001d35;
}

@media (min-width: 768px) {
  .bottom-nav {
    display: none;
  }
}

@media (min-width: 1200px) {}





/* ================================================== */
/* toolhub/index.php */
/* ================================================== */
.tool-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.tool-grid+.tool-grid {
  border-top: 1px solid #e0e2e0;
  margin-top: 16px;
  padding-top: 16px;
}

.tool-card.owner {
  background-color: #c1e4e9;
}

.tool-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid #e0e2e0;
  border-radius: 8px;
  min-height: 80px;
  background-color: #f3f3f2;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.tool-card:hover {
  background-color: #f0f4f9;
  border-color: #c2e7ff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.tool-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
  margin-right: 12px;
}

.tool-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #ffffff;
  border-radius: 8px;
  color: #444746;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.tool-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tool-title {
  font-size: 15px;
  font-weight: 500;
  color: #1f1f1f;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tool-meta {
  font-size: 12px;
  color: #747775;
}

@media (min-width: 768px) {
  .tool-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
  }

  .tool-card {
    border-radius: 12px;
    padding: 16px;
  }

  .tool-card-header {
    margin-bottom: 12px;
  }
}

@media (min-width: 1200px) {}





/* ================================================== */
/* toolhub/mypage/index.php */
/* ================================================== */
.mypage-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  max-width: 600px;
  margin-right: auto;
  padding: 16px 0;
}

.profile-card {
  width: 100%;
  background-color: #ffffff;
  border: 1px solid #e0e2e0;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 16px;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: #c2e7ff;
  color: #001d35;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 600;
  flex-shrink: 0;
  text-transform: uppercase;
}

.profile-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-name {
  font-size: 20px;
  font-weight: 600;
  color: #1f1f1f;
  margin: 0;
}

.role-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  width: fit-content;
  background-color: #e9eef6;
  color: #444746;
}

.role-badge.role-owner {
  background-color: #c1e4e9;
  color: #004d56;
}

.profile-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-label {
  font-size: 12px;
  color: #747775;
}

.detail-value {
  font-size: 15px;
  color: #1f1f1f;
  word-break: break-all;
}

.profile-actions {
  margin-top: 8px;
  border-top: 1px solid #f0f0f0;
  padding-top: 16px;
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  background-color: #fff1f0;
  color: #d93025;
  border: 1px solid #fce8e6;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s, border-color 0.2s;
  width: 100%;
}

.btn-logout svg {
  fill: #d93025;
}

.btn-logout:hover {
  background-color: #fce8e6;
  border-color: #fad2cf;
}

@media (max-width: 768px) {
  .mypage-grid {
    padding: 0;
  }

  .profile-card {
    border-radius: 12px;
    padding: 16px;
  }

  .profile-avatar {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }

  .profile-name {
    font-size: 18px;
  }
}





/* ================================================== */
/* toolhub/console/index.php */
/* ================================================== */
.console-grid {
  width: 100%;
  border: 1px solid #e2e8f0;
  scrollbar-width: none;
  overflow: auto;
}

.console-grid::-webkit-scrollbar {
  display: none;
}

.console-table {
  width: 100%;
  text-align: left;
  font-size: 0.75rem;
  border-collapse: collapse;
}

.console-table thead tr {
  background-color: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.console-table th {
  padding: 0.75rem;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
  min-width: 150px;
  border-right: 1px solid #e2e8f0;
  background-color: #f1f5f9;
}

.console-table th:last-child {
  border-right: none;
}

.console-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.15s ease;
}

.console-table tbody tr:hover {
  background-color: #f8fafc;
}

.console-table td {
  padding: 0.75rem;
  color: #475569;
  border-right: 1px solid #f1f5f9;
  white-space: nowrap;
  max-width: 20rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.console-table td:last-child {
  border-right: none;
}

.console-empty {
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.console-empty-icon {
  font-size: 2.25rem;
  color: #e2e8f0;
  margin-bottom: 0.5rem;
  display: block;
}

.console-empty-text {
  color: #94a3b8;
  font-weight: 700;
  font-size: 0.875rem;
}

.console-form-container {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
}

.console-form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.console-form-label {
  font-size: 12px;
  color: #94a3b8;
  margin-left: 8px;
}

.console-select {
  padding: 12px;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  outline: none;
  min-width: 140px;
  color: #1f1f1f;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.console-select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.console-table-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.console-table-empty {
  font-size: 12px;
  color: #94a3b8;
  padding: 8px;
}

.console-table-btn {
  text-align: center;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  background-color: #f1f5f9;
  color: #64748b;
  transition: all 0.2s ease;
}

.console-table-btn:hover {
  background-color: #e2e8f0;
}

.console-table-btn.active {
  background-color: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

@media (min-width: 768px) {
  .console-form-container {
    width: auto;
  }
}


/* ================================================== */
/* toolhub/price-master/index.php */
/* ================================================== */

.hidden {
  display: none !important;
}

.overflow-hidden {
  overflow: hidden !important;
}

.main-content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 8px 4px 96px 4px;
  height: 100%;
  overflow-y: auto;
  scrollbar-width: none;
}

.main-content-area::-webkit-scrollbar {
  display: none;
}

.content-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-actions {
  display: flex;
  gap: 8px;
  margin-right: 12px;
}

.cart-btn {
  position: relative;
  padding: 8px 12px;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  color: #475569;
  text-decoration: none;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.cart-btn:hover {
  background-color: #f8fafc;
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  width: 20px;
  height: 20px;
  background-color: #f43f5e;
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
}

/* 新規追加入力バー（旧検索フォーム位置に配置） */
.add-product-bar {
  display: flex;
  gap: 8px;
}

.add-input-wrapper {
  position: relative;
  flex: 1;
}

.add-input-field {
  width: 100%;
  padding: 8px 16px;
  background-color: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
}

.add-input-field:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.add-submit-btn {
  background-color: #2563eb;
  color: #ffffff;
  padding: 8px 20px;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
}

.add-submit-btn:hover {
  background-color: #1d4ed8;
}

/* カテゴリ絞り込み */
.category-filter-box {
  background-color: #ffffff;
}

.category-filter-title {
  padding: 8px 0;
  color: #64748b;
  font-size: 14px;
  font-weight: bold;
}

.category-filter-wrapper {
  overflow: hidden;
  transition: all 0.3s;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding-bottom: 12px;
}

.category-btn {
  text-align: center;
  padding: 8px 0;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 12px;
  font-weight: bold;
  text-decoration: none;
  background-color: #f1f5f9;
  color: #64748b;
  transition: all 0.2s;
}

.category-btn-all {
  grid-column: span 4 / span 4;
}

.category-btn.active {
  background-color: #2563eb;
  color: #ffffff;
}

/* 商品カードグリッド */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 8px;
  padding-bottom: 192px;
  padding-left: 4px;
  padding-right: 4px;
}

@media (min-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* 商品カード */
.product-card {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.product-image-container {
  position: relative;
  border-radius: 6px;
  aspect-ratio: 4 / 3;
  background-color: #f1f5f9;
  overflow: hidden;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  font-size: 48px;
}

.product-body {
  padding: 4px;
  display: flex;
  flex-direction: column;
}

.product-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.product-category-badge {
  font-size: 10px;
  font-weight: 900;
  color: #3b82f6;
  background-color: #eff6ff;
  padding: 2px 8px;
  border-radius: 8px;
  letter-spacing: 0.05em;
}

.cart-action-form {
  display: inline;
}

.add-cart-btn {
  width: 28px;
  height: 28px;
  background-color: #f1f5f9;
  color: #475569;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.2s;
}

.add-cart-btn:hover {
  background-color: #2563eb;
  color: #ffffff;
}

.product-title {
  font-size: 18px;
  font-weight: 900;
  color: #0f172a;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-capacity {
  flex: 1;
  font-size: 11px;
  color: #94a3b8;
  font-weight: bold;
  text-align: right;
}

.product-store {
  flex: 1;
  font-size: 14px;
  color: #525252;
}

.product-price-box {
  text-align: right;
}

.product-price {
  font-size: 24px;
  font-weight: 900;
  color: #0f172a;
}

.product-unit-price {
  font-size: 14px;
  color: #64748b;
  margin-left: 4px;
}

.product-footer-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
}

.btn-edit-product {
  padding: 4px 16px;
  background-color: #ffffff;
  color: #475569;
  border: 1px solid #cbd5e1;
  font-size: 12px;
  font-weight: 900;
  border-radius: 12px;
  cursor: pointer;
}

.btn-calc-compare {
  padding: 4px 8px;
  background-color: #ffffff;
  color: #475569;
  border: none;
  font-weight: 900;
  border-radius: 12px;
  cursor: pointer;
}

.btn-calc-compare i {
  font-size: 20px;
}

/* モーダル共通要素 */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}

.modal-content-container {
  position: absolute;
  bottom: 0;
  width: 100%;
  background-color: #ffffff;
  border-top-left-radius: 2.5rem;
  border-top-right-radius: 2.5rem;
  overflow: hidden;
  transition: all 0.3s;
}

.modal-header {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-icon-wrapper {
  width: 40px;
  height: 40px;
  background-color: #fefce8;
  color: #eab308;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.modal-title {
  font-size: 20px;
  font-weight: 900;
  color: #0f172a;
}

.modal-subtitle {
  font-size: 12px;
  color: #94a3b8;
  font-weight: bold;
  margin-top: 2px;
}

.modal-close-btn {
  width: 40px;
  height: 40px;
  background-color: #f1f5f9;
  color: #94a3b8;
  border: none;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  transition: background-color 0.2s;
}

.modal-close-btn:hover {
  background-color: #e2e8f0;
}

/* モーダル内フォーム */
.modal-form {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 4px;
  row-gap: 16px;
  padding: 0 16px 40px 16px;
  max-height: 75vh;
  overflow-y: auto;
}

.modal-form::-webkit-scrollbar {
  display: none;
}

.col-span-1 {
  grid-column: span 1 / span 1;
}

.col-span-2 {
  grid-column: span 2 / span 2;
}

.col-span-4 {
  grid-column: span 4 / span 4;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 900;
  color: #94a3b8;
  letter-spacing: 0.1em;
  margin-left: 4px;
}

.form-label.required {
  color: #fb7185;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 12px;
  background-color: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-weight: bold;
  outline: none;
  font-size: 14px;
}

.form-select {
  text-align: center;
  appearance: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* 画像プレビュー */
.image-preview-container {
  width: 100%;
  aspect-ratio: 16 / 6;
  background-color: #f1f5f9;
  border-radius: 16px;
  border: 1px dashed #cbd5e1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  overflow: hidden;
  position: relative;
}

.preview-placeholder-icon {
  font-size: 30px;
}

.preview-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-upload-action {
  margin-top: 8px;
}

.btn-image-upload {
  width: 100%;
  padding: 12px;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-image-upload:hover {
  background-color: #f8fafc;
}

/* ラジオボタンカスタマイズ */
.category-radio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.category-radio-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.radio-input {
  display: none;
}

.radio-label-text {
  font-size: 12px;
  font-weight: bold;
  color: #64748b;
}

.radio-input:checked+.radio-label-text {
  color: #2563eb;
}

.category-radio-card:has(.radio-input:checked) {
  border-color: #3b82f6;
  background-color: #eff6ff;
}

/* アクションボタン */
.btn-delete-product {
  grid-column: span 1 / span 1;
  padding: 8px 0;
  margin: 0 8px;
  color: #f43f5e;
  font-weight: 900;
  font-size: 12px;
  background-color: #fff1f2;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background-color 0.2s;
}

.btn-delete-product:hover {
  background-color: #ffe4e6;
}

.btn-save-product {
  grid-column: span 2 / span 2;
  grid-column-start: 3;
  padding: 12px 0;
  background-color: #0f172a;
  color: #ffffff;
  font-weight: 900;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

.btn-save-product:hover {
  background-color: #1e293b;
}

.btn-save-product:active {
  transform: scale(0.95);
}





/* ================================================== */
/* toolhub/kaden/index.php */
/* ================================================== */
.kaden-grids {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  row-gap: 36px;
  column-gap: 16px;
}

.grid-header {
  padding: 16px;
  background: #666666;
  color: #fafafa;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.grids-title {
  font-weight: bold;
}

.grid-body {
  display: grid;
  gap: 8px;
  padding: 8px;
}

.kaden-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: #fafafa;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
}

.card-summary {
  list-style: none;
  padding: 16px;
  padding-bottom: 8px;
  cursor: pointer;
  user-select: none;
  position: relative;
  outline: none;
  display: grid;
  grid-template-columns: 3fr 2fr;
  grid-template-rows: 2fr 1fr;
  align-items: center;
  background-color: #f3f3f3;
}

.card-summary::-webkit-details-marker {
  display: none;
}

.summary-title,
.summary-info {
  display: grid;
  gap: 16px;
}

.summary-maker,
.summary-model {
  padding: 8px 0;
}

.maker-badge {
  display: inline-block;
  font-size: 16px;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 16px;
  background-color: #e0e7ff;
  color: #3730a3;
}

.summary-model {
  font-weight: bold;
}

.info-label {
  font-size: 12px;
  color: #64748b;
}

.info-main,
.info-date {
  font-size: 20px;
  font-weight: bold;
  color: #0f172a;
}

.info-discount {
  font-size: 12px;
  color: #ef4444;
  font-weight: bold;
  margin-left: 8px;
}

.toggle-indicator {
  grid-column-start: 1;
  grid-column-end: 3;
  grid-row-start: 2;
  grid-row-end: 3;
  font-weight: bold;
  color: #2563eb;
  text-align: center;
  font-size: 14px;
}

.card-body {
  padding: 16px;
  background-color: #ffffff;
}

.card-info {
  display: grid;
  gap: 8px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.info-row dt {
  color: #64748b;
}

.text-discount {
  color: #ef4444;
}

.card-actions {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 8px;
}

.btn-sm {
  font-size: 12px;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #0f172a;
  cursor: pointer;
  flex: 1;
  text-align: center;
}