:root {
  /* ユニバーサルデザインカラー https://www3.dic-global.com/dic-graphics/navi/color/pdf/cud_guidebook.pdfs */
  /* アクセントカラー */
  --ud-accent-red: rgb(255, 75, 0);
  --ud-accent-yellow: rgb(255, 241, 0);
  --ud-accent-green: rgb(3, 175, 122);
  --ud-accent-blue: rgb(0, 90, 255);
  --ud-accent-skyblue: rgb(77, 196, 255);
  --ud-accent-pink: rgb(255, 129, 130);
  --ud-accent-orange: rgb(246, 170, 0);
  --ud-accent-purple: rgb(153, 0, 153);
  --ud-accent-brown: rgb(128, 64, 0);

  /* ベースカラー */
  --ud-base-light_pink: rgb(255, 202, 191);
  --ud-base-cream: rgb(255, 255, 128);
  --ud-base-light_yellowgreen: rgb(216, 242, 85);
  --ud-base-light_skyblue: rgb(191, 228, 255);
  --ud-base-beige: rgb(255, 202, 128);
  --ud-base-light_green: rgb(119, 217, 168);
  --ud-base-light_purple: rgb(201, 172, 230);

  /* 無彩色 */
  --ud-white: rgb(255, 255, 255);
  --ud-light_gray: rgb(200, 200, 203);
  --ud-gray: rgb(132, 145, 158);
  --ud-black: rgb(0, 0, 0);

  /* かわいいカラー */
  --icon-red:    hsl(0, 80%, 62%);
  --icon-yellow: hsl(50, 100%, 60%);
  --icon-green:  hsl(120, 60%, 65%);
  --icon-cyan:   hsl(180, 60%, 65%);
  --icon-blue:   hsl(240, 60%, 65%);
  --icon-pink:   hsl(300, 80%, 80%);
  --label-color: hsl(210, 10%, 40%);  /* やさしいグレー */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'M PLUS Rounded 1c', 'Noto Sans JP', 'Rounded Mplus 1c', 'Arial Rounded MT Bold', sans-serif;
  background-color: --ud-white;
  padding: 20px;
  color: #333;
}

button,
input,
select,
textarea,
label,
fieldset,
legend {
  font-family: inherit;
  font-weight: 400;
}

.container {
  max-width: 400px;
  margin: 0 auto;
  background: white;
  border-radius: 0 0 20px 20px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(120, 120, 120, 0.13);
  position: relative;
  overflow-x: auto;
}

.setting-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: #666;
  color: white;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.top-buttons-single {
  width: 100%;
  margin-bottom: 10px;
}
.top-buttons-single .order-btn {
  width: 100%;
  font-size: 1.2rem;
  height: 80px;
  border-radius: 18px;
}
.top-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}
.top-buttons .product-btn, .top-buttons .store-btn {
  flex: 1;
  height: 70px;
  font-size: 1rem;
  border-radius: 15px;
}

.order-btn, .product-btn {
  flex: 1;
  height: 80px;
  border: none;
  border-radius: 15px;
  font-size: 18px;
  font-weight: bold;
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(120,120,120,0.18);
  transition: transform 0.2s;
}

.order-btn {
  background: linear-gradient(135deg, #E57373, #C44536);
}

.product-btn {
  background: linear-gradient(135deg, #FFB86B, #E09E3E);
  color: #5B3A0B;
}

.store-btn {
  width: 100%;
  height: 80px;
  border: none;
  border-radius: 15px;
  font-size: 18px;
  font-weight: bold;
  color: white;
  background: linear-gradient(135deg, #6C8CD5, #5B7DB1);
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(120,120,120,0.18);
  margin-bottom: 20px;
  transition: transform 0.2s;
}

.store-desc {
  font-size: 12px;
  font-weight: normal;
  opacity: 0.9;
}

.analytics {
  background: #f8f9fa;
  border-radius: 15px;
  padding: 20px;
  position: relative;
  padding-bottom: 0;
}

.analytics-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 16px;
}

.detail-btn-row {
    padding-top: 20px;
    display: flex;
    flex-direction: row-reverse;
}

.value {
  font-weight: bold;
  color: #5B7DB1;
}

.detail-btn {
  position: absolute;
  bottom: 15px;
  right: 0;
  background: #6C8CD5;
  color: white;
  border: none;
  border-radius: 20px;
  padding: 8px 15px;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(120,120,120,0.18);
  transition: transform 0.2s;
}

/* --- Material UI風リップルエフェクト --- */
.ripple {
  position: relative;
  overflow: hidden;
}
.ripple-effect {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple-animate 0.6s linear;
  background-color: rgba(255,255,255,0.4);
  pointer-events: none;
}
@keyframes ripple-animate {
  to {
    transform: scale(2.5);
    opacity: 0;
  }
}

.setting-btn:hover {
  transform: scale(1.1);
}

@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  .container {
    padding: 15px;
  }

  .order-btn, .product-btn, .store-btn {
    height: 70px;
    font-size: 16px;
  }
}

.header {
  width: 100%;
  max-width: 400px;
  margin: 30px auto 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f5f6fa;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 4px 20px rgba(120,120,120,0.13);
  padding: 0 20px;
  height: 60px;
  position: relative;
}

.header-title {
  font-size: 22px;
  font-weight: bold;
  color: #5B7DB1;
}

.hamburger-btn {
  background: #b0b8c1;
  color: white;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(120,120,120,0.13);
  transition: background 0.2s;
}

.hamburger-btn:hover {
  background: #5B7DB1;
}

.header-logo {
  height: 44px;
  margin: 0 0 0 2px;
  display: block;
}

.section-title {
  font-size: 1.6rem;
  font-weight: bold;
  margin-bottom: 18px;
  color: #333;
}

.add-connection-btn {
  background: #6C8CD5;
  color: #fff;
  border: none;
  border-radius: 18px;
  padding: 8px 20px;
  font-size: 1rem;
  font-weight: bold;
  margin: 6px 0 6px 0;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(120,120,120,0.10);
  transition: background 0.2s;
  display: inline-block;
  text-decoration: none;
}
.add-connection-btn:hover {
  background: #5B7DB1;
}

.connection-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
  margin-bottom: 10px;
}
.connection-table th, .connection-table td {
  padding: 6px 4px;
  text-align: center;
  font-size: 0.90rem;
  min-width: 48px;
}
.connection-table th {
  background: transparent; /* 下線感を消すため背景を透明に */
  color: #5B7DB1;
  font-weight: bold;
  border-radius: 0; /* 角丸をなくす */
  font-size: 0.92rem;
  border-bottom: none; /* 下線を消す */
}
.connection-table td {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(120,120,120,0.07);
  text-align: center;
  vertical-align: middle;
}
.status-connected {
  color: #6C8CD5;
  font-weight: bold;
}
.status-disconnected {
  color: #E57373;
  font-weight: bold;
}
.edit-btn, .delete-btn {
  background: #f5f6fa;
  color: #5B7DB1;
  border: none;
  border-radius: 14px;
  padding: 6px 16px;
  font-size: 0.95rem;
  font-weight: bold;
  margin-right: 4px;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(120,120,120,0.08);
  transition: background 0.2s, color 0.2s;
  margin: 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 1.1rem;
  padding: 0;
}
.edit-btn:hover {
  background: #6C8CD5;
  color: #fff;
}
.delete-btn:hover {
  background: #E57373;
  color: #fff;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  vertical-align: middle;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #e0e4ea;
  border-radius: 22px;
  transition: .3s;
}
.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(120,120,120,0.10);
  transition: .3s;
}
.toggle-switch input:checked + .slider {
  background: #6C8CD5;
}
.toggle-switch input:checked + .slider:before {
  transform: translateX(16px);
  background: #fff;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f5f6fa;
  color: #5B7DB1;
  border: none;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(120,120,120,0.08);
  transition: background 0.2s, color 0.2s;
  margin: 0 2px;
  padding: 0;
}
.icon-btn.edit-btn:hover {
  background: #6C8CD5;
  color: #fff;
}
.icon-btn.delete-btn:hover {
  background: #E57373;
  color: #fff;
}

.mall-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: bold;
  color: #fff;
  margin: 0 auto;
  box-shadow: 0 1px 4px rgba(120,120,120,0.10);
}
.mall-icon.rakuten {
  background: linear-gradient(135deg, #e60012 60%, #b71c1c 100%);
}
.mall-icon.yahoo {
  background: linear-gradient(135deg, #ff0033 60%, #c62828 100%);
}
.mall-icon.amazon {
  background: linear-gradient(135deg, #ff9900 60%, #b46900 100%);
}
.mall-icon.futureshop {
  background: linear-gradient(135deg, #00b8b8 60%, #008080 100%);
}
.mall-icon.ebay {
  background: linear-gradient(135deg, #0064d2 60%, #222 100%);
}
.mall-icon.qoo10 {
  background: linear-gradient(135deg, #00b8e6 60%, #005577 100%);
}
.mall-icon.shopify {
  background: linear-gradient(135deg, #95bf47 60%, #5e8e3e 100%);
}

.order-status-bar {
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 8px;
  position: relative;
  max-width: 100vw;
  margin-left: auto;
  margin-right: auto;
}
.order-status-bar::after {
  content: '⇄';
  position: absolute;
  right: 8px;
  top: 8px;
  color: #b0b8c1;
  font-size: 1.1rem;
  opacity: 0.7;
  pointer-events: none;
  display: block;
}
.status-flow {
  display: flex;
  align-items: center;
  min-width: 540px;
}
.status-item {
  background: #e6eaff;
  border-radius: 18px;
  padding: 8px 10px 4px 10px;
  margin: 0 4px;
  font-size: 0.98rem;
  font-weight: bold;
  color: #5B7DB1;
  text-align: center;
  min-width: 60px;
  box-shadow: 0 2px 8px rgba(120,120,180,0.10);
  transition: background 0.2s, color 0.2s;
}
.status-item:hover {
  background: #d0d8f6;
  color: #3742fa;
}
.status-count {
  display: block;
  font-size: 0.95rem;
  font-weight: normal;
  color: #6C8CD5;
  margin-top: 4px;
}
.status-arrow {
  font-size: 1.3rem;
  color: #b0b8c1;
  margin: 0 4px;
}
.status-dash {
  font-size: 1.3rem;
  color: #b0b8c1;
  margin: 0 4px;
}
@media (max-width: 600px) {
  .status-flow {
    min-width: 650px;
  }
  .status-item {
    min-width: 48px;
    font-size: 0.92rem;
    padding: 6px 6px 2px 6px;
  }
}
.order-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
  margin-bottom: 10px;
}
.order-table th, .order-table td {
  padding: 10px 8px;
  text-align: center;
  font-size: 1.02rem;
}
.order-table th {
  background: #e6eaff;
  color: #5B7DB1;
  font-weight: bold;
  border-radius: 14px 14px 0 0;
}
.order-table td {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(120,120,180,0.08);
}
.order-table td .detail-btn.cute {
  margin: 0 auto;
  display: block;
  position: static;
}
.detail-btn.cute {
  background: linear-gradient(135deg, #6C8CD5, #5B7DB1);
  color: #fff;
  border-radius: 24px;
  font-size: 1.08rem;
  font-weight: bold;
  padding: 10px 28px;
  box-shadow: 0 4px 15px rgba(108, 140, 213, 0.3);
  border: none;
  transition: all 0.3s ease;
}
.detail-btn.cute:hover {
  background: linear-gradient(135deg, #5B7DB1, #4A6CA0);
  color: #fff;
  box-shadow: 0 6px 20px rgba(108, 140, 213, 0.4);
}

.order-card-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 10px;
}
.order-card {
  background: #fcfcfc;
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(120,120,180,0.10);
  padding: 18px 16px 12px 16px;
  margin-bottom: 16px;
  border: 2px solid #e6eaff;
}
.order-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.02rem;
  margin-bottom: 8px;
}
.order-label {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #7ec4fa;
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
}
.order-value {
  color: #333;
  font-size: 1.08rem;
  font-weight: bold;
}
.order-value.order-id {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: bottom;
}
.order-row.amount-row .order-value {
  color: #C44536;
  font-size: 1.12rem;
  font-weight: bold;
}
.order-row.status-row .order-value {
  background: #e6eaff;
  color: #5B7DB1;
  border-radius: 12px;
  padding: 2px 12px;
  font-size: 1.02rem;
  font-weight: bold;
  display: inline-block;
}
.order-detail-btn-row {
  justify-content: flex-end;
  margin-top: 8px;
}
.order-detail-btn-row .detail-btn.cute {
  margin: 0;
  position: static;
}

.order-search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  align-items: center;
  flex-wrap: wrap;
}
.order-search-input {
  border: none;
  border-radius: 16px;
  padding: 8px 14px;
  font-size: 1rem;
  background: #f5f6fa;
  color: #333;
  box-shadow: 0 1px 4px rgba(120,120,180,0.07);
  outline: none;
  width: 228px;
}
.order-search-status {
  border: none;
  border-radius: 16px;
  padding: 8px 12px;
  font-size: 1rem;
  background: #f5f6fa;
  color: #5B7DB1;
  box-shadow: 0 1px 4px rgba(120,120,180,0.07);
  outline: none;
}
.order-search-btn {
  background: #6C8CD5;
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 8px 20px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(120,120,180,0.13);
  transition: background 0.2s;
  width: 100%;
}
.order-search-btn:hover {
  background: #5B7DB1;
}

.order-btn i, .product-btn i, .store-btn i {
  font-size: 1.3em;
  margin-right: 8px;
  vertical-align: middle;
}
.store-btn i {
  margin-bottom: 2px;
}

.add-product-btn {
  background: #6C8CD5;
  color: #fff;
  border: none;
  border-radius: 18px;
  padding: 8px 20px;
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 18px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(120,120,180,0.13);
  transition: background 0.2s;
}
.add-product-btn i {
  margin-right: 8px;
}
.add-product-btn:hover {
  background: #5B7DB1;
}
.product-card-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 10px;
}
.product-card {
  background: #fcfcfc;
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(120,120,180,0.10);
  padding: 18px 16px 12px 16px;
  margin-bottom: 16px;
  border: 2px solid #e6eaff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.product-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.02rem;
  margin-bottom: 2px;
}
.product-label {
  color: #5B7DB1;
  font-weight: bold;
  font-size: 0.98rem;
  margin-right: 8px;
}
.product-value {
  color: #333;
  font-size: 1.02rem;
  word-break: break-all;
}
.product-detail-btn-row {
  justify-content: flex-end;
  margin-top: 8px;
}
.product-detail-btn-row .detail-btn.cute {
  margin: 0;
  position: static;
}

.status-item {
  white-space: nowrap;
  width: 85px;
  height: 60px;
  text-decoration: none;
}

.order-label i {
  margin-right: 6px;
  font-size: 1.25em;
  vertical-align: middle;
  text-align: center;
  width: 20px;
}

.product-card .product-row:nth-child(1) .order-label i, .order-card .order-row:nth-child(1) .order-label i { color: var(--icon-red); }
.product-card .product-row:nth-child(2) .order-label i, .order-card .order-row:nth-child(2) .order-label i { color: var(--icon-yellow); }
.product-card .product-row:nth-child(3) .order-label i, .order-card .order-row:nth-child(3) .order-label i { color: var(--icon-green); }
.product-card .product-row:nth-child(4) .order-label i, .order-card .order-row:nth-child(4) .order-label i { color: var(--icon-cyan); }
.product-card .product-row:nth-child(5) .order-label i, .order-card .order-row:nth-child(5) .order-label i { color: var(--icon-blue); }
.product-card .product-row:nth-child(6) .order-label i, .order-card .order-row:nth-child(6) .order-label i { color: var(--icon-pink); }


/* フォームスタイル */
.store-form {
  background: white;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(120,120,180,0.10);
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-weight: bold;
  color: #5B7DB1;
  margin-bottom: 8px;
  font-size: 1rem;
}

.required {
  color: #C44536;
}

.form-input, .form-select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e6eaff;
  border-radius: 12px;
  font-size: 1rem;
  background: #f8faff;
  color: #333;
  transition: border-color 0.3s ease;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: #6C8CD5;
  background: white;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 1rem;
  color: #333;
}

.checkbox-label input[type="checkbox"] {
  margin-right: 8px;
  width: 18px;
  height: 18px;
  accent-color: #6C8CD5;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e6eaff;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: linear-gradient(135deg, #6C8CD5, #5B7DB1);
  color: white;
  box-shadow: 0 4px 15px rgba(108, 140, 213, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #5B7DB1, #4A6CA0);
  box-shadow: 0 6px 20px rgba(108, 140, 213, 0.4);
}

.btn-secondary {
  background: #f5f6fa;
  color: #666;
  border: 2px solid #e0e0e0;
}

.btn-secondary:hover {
  background: #e8e9eb;
}

.alert-success {
  background: #e6ffe6;
  color: #388e3c;
  padding: 12px 18px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-weight: bold;
  border: 1px solid #b2dfdb;
}

.alert-danger {
  background: #ffe6e6;
  color: #c44536;
  padding: 12px 18px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-weight: bold;
  border: 1px solid #ffcdd2;
}

.menu-btn.top-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
  color: #6c3483;
  border: 2px solid #a084ca;
  border-radius: 12px;
  background: #f5f0ff;
  margin-bottom: 12px;
  padding: 12px 18px;
  font-size: 1.1rem;
  transition: background 0.2s, border-color 0.2s;
}
.menu-btn.top-btn:hover {
  background: #e1d7fa;
  border-color: #6c3483;
  color: #4b2067;
}
.menu-btn.top-btn i {
  color: #6c3483;
  font-size: 1.2em;
}
.menu-btn.pro-btn {
  background: #B388FF;
  color: #fff;
}
.menu-btn.logout-btn {
  background: #FF8A80;
  color: #fff;
}
