.buyer-dashboard{
  width: 95%;
  margin: 0;
}

.wm-login-page, .wm-reset-page {
  max-width: 400px;
  margin: 60px auto;
  background: #f7f7f7;
  padding: 40px;
  border-radius: 8px;
}

.wm-login-page h2, .wm-reset-page h2 {
  margin-bottom: 15px;
  font-size: 22px;
  font-weight: 400;
  color: #333;
  text-align: center;
}

.wm-login-page .login-error,
.reset-success, .reset-error {
  margin: 10px 0;
  padding: 10px;
  border-radius: 5px;
}

.login-error, .reset-error {
  background: #fbeaea;
  color: #b00;
  border: 1px solid #e5b6b6;
}
.wm-login-page .login-submit{
      width: 100%;
    text-align: center;
}

.wm-login-page .login-submit .button-primary{
  background-color: #005847;
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 10px 50px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.3s;
    margin: 0 auto;
}
.reset-success {
  background: #e8f7e8;
  color: #278a2c;
  border: 1px solid #bde2b1;
}

input.input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-top: 5px;
}

.submit input {
  background: #BA7B00;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  transition: 0.2s;
}

.submit input:hover {
  background: #fff;
  color: #BA7B00;
  border: 1px solid #BA7B00;
}

.login-links, .back-login {
  margin-top: 20px;
  text-align: center;
}

.login-links a, .back-login a {
  color: #005847;
  text-decoration: none;
}

.login-links a:hover, .back-login a:hover {
  text-decoration: underline;
}

.buyer-request-form {
  max-width: 1120px;
  margin: 0 auto;
  background: #f8f8f8;
  padding: 60px 110px;
  box-sizing: border-box;
}

.buyer-request-form .form-title {
  font-size: 1.5rem;
  margin-bottom: 25px;
  text-align: left;
  color: #093D2C;
  font-weight: 600;
}

.buyer-request-form .form-group {
  margin-bottom: 30px;
}

.buyer-request-form label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 5px;
  color: #222;
}

.buyer-request-form input,
.buyer-request-form textarea {
  width: 100%;
  padding: 10px;
  border: none;
  border: 1px solid #ccc;
  background: #fff;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s;
}

.buyer-request-form input:focus,
.buyer-request-form textarea:focus {
  border-bottom: 1px solid #093D2C;
}

.buyer-request-form .required {
  color: #b00;
}

/* チェックボックス行の整列修正版 */
.buyer-request-form .form-group.checkbox {
  margin-top: 25px;
  width: 100%;
}

.buyer-request-form .form-group.checkbox label {
    width: 100%;
  display: flex;
  align-items: flex-start;
  flex-direction: row;
  gap: 8px;
  font-size: 0.9rem;
  color: #222;
  line-height: 1.5;
}

.buyer-request-form .form-group.checkbox input[type="checkbox"] {
width: auto;
  margin-top: 4px;
  flex-shrink: 0;
}

.buyer-request-form .form-group.checkbox a {
  color: #093D2C;
  text-decoration: underline;
}

.buyer-request-form .form-group.checkbox .required {
  color: #b00;
  margin-left: 4px;
}

.buyer-request-form .checkbox input {
  margin-right: 8px;
}

.buyer-request-form .form-submit {
  text-align: center;
  margin-top: 30px;
}

.buyer-request-form button {
font-family: 'Josefin Sans', sans-serif !important;
  background: #093D2C;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 8px 3rem;
  cursor: pointer;
  font-size: 1rem;
  transition: 0.3s;
}

.buyer-request-form button:hover {
  background: #135f44;
}

.order-list {
  margin-top: 2rem;
}
.order-table th, .order-table td {
  padding: 8px;
  border-bottom: 1px solid #ddd;
}
.order-table th {
  background: #f7f7f7;
}
.order-table a {
  color: #0073aa;
  text-decoration: none;
}
.order-table a:hover {
  text-decoration: underline;
}

/* PCは今まで通り */
.order-table {
  width: 100%;
  border-collapse: collapse;
}

/* SPだけ横スクロール */
@media (max-width: 1000px) {
  .table-scroll{
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* iOS慣性スクロール */
  }

  /* テーブル幅を確保（列が潰れないように） */
  .order-table{
    min-width: 1000px;   /* 列数に合わせて調整（8列ならこれくらい） */
    table-layout: auto;
  }

  /* 任意：スワイプを促す見た目 */
  .table-scroll::before{
    content: "← Swipe →";
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
  }
}
 
.buyer-info {
  border: 1px solid #ddd; /* 外枠 */
}

/* 行 */
.buyer-info__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* 行と行の間の横線 */
.buyer-info__row + .buyer-info__row {
  border-top: 1px solid #ddd;
}

/* セル */
.buyer-info__item {
  padding: 12px;
  display: flex;
  gap: 8px;
}

/* 縦線（左列だけ） */
.buyer-info__item:not(.full):nth-child(1) {
  border-right: 1px solid #ddd;
}

/* 横幅いっぱい */
.buyer-info__item.full {
  grid-column: 1 / -1;
  border-right: none;
}

.label {
  font-weight: 600;
  white-space: nowrap;
}

.value {
  word-break: break-word;
}

/* ===== SP ===== */
@media (max-width: 768px) {
  .buyer-info__row {
    grid-template-columns: 1fr;
  }

  .buyer-info__item {
    border-right: none;
  }

  /* SPでは項目ごとに横線 */
  .buyer-info__item + .buyer-info__item {
    border-top: 1px solid #eee;
  }
    .buyer-info__row > .buyer-info__item {
    border-right: 0 !important;
  }
}

.order-info {
  border: 1px solid #ddd;
}

.order-info__row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-bottom: 1px solid #ddd;
}

.order-info__row:last-child {
  border-bottom: none;
}

.order-info__item {
  display: flex;
  gap: 16px;
  padding: 12px 16px;
  border-right: 1px solid #ddd;
}

.order-info__item:last-child {
  border-right: none;
}

.order-info__item.full {
  grid-column: 1 / -1;
  border-right: none;
}

.order-info .label {
  min-width: 160px;
  font-weight: bold;
  color: #555;
}

.order-info .value {
  color: #222;
  word-break: break-word;
}

/* SP */
@media (max-width: 768px) {
  .order-info__row {
    grid-template-columns: 1fr;
  }

  .order-info__item {
    border-right: none;
    border-bottom: 1px solid #eee;
  }

  .order-info__item:last-child {
    border-bottom: none;
  }

  .order-info .label {
    min-width: auto;
  }
}

 .order-title{
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 18px;
}

.order-sheet{
  border: 1px solid #ddd;
  background: #fff;
}

/* 1行＝4カラム（ラベル/値/ラベル/値） */
.order-row{
  display: grid;
  grid-template-columns: 260px 1fr 260px 1fr;
}

.cell{
  padding: 18px 22px;
  border-right: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  font-size: 1rem;
  line-height: 1.5;
}

/* 行末の右罫線を消す */
.order-row .cell:nth-child(4),
.order-row .cell:last-child{
  border-right: none;
}

/* 最終行の下罫線を消す（見た目の統一用） */
.order-sheet .order-row:last-child .cell{
  border-bottom: none;
}

/* 左側の見出しセル */
.cell.th{
  background: #f3f3f3;
  font-weight: 700;
  color: #333;
}

/* 値セル */
.cell.td{
  background: #fff;
  color: #111;
}

/* 右側を結合（3カラム分） */
.span-3{
  grid-column: 2 / 5;
  border-right: none;
}


/* SP：1カラム（ラベル→値）にする */
@media (max-width: 860px){
  .order-row{
    grid-template-columns: 1fr;
  }
  .cell{
    border-right: none;
    padding: 14px 16px;
  }
  .span-3{
    grid-column: auto;
  }
}

  .order-documents { margin-top: 40px; }
      .doc-section-title {
          margin-top: 30px;
          margin-bottom: 10px;
          font-size: 20px;
          border-bottom: 1px solid #ccc;
          padding-bottom: 5px;
          font-weight: bold;
      }
      .wgm-doc-row {
          display:flex;
          gap:20px;
          align-items:center;
          margin-bottom:12px;
          font-size:16px;
      }
      .doc-name { font-weight:bold; min-width:180px; display:inline-block; }
      .doc-status { color:#555; min-width:80px; display:inline-block; }
      .doc-link {
          padding:5px 12px;
          background:#efefef;
          border:1px solid #666;
          text-decoration:none;
          border-radius:4px;
      }
      .doc-link.disabled {
          opacity:0.4;
          pointer-events:none;
      }
      @media (max-width: 860px){
    .order-documents { box-sizing: border-box;}
      .wgm-doc-row {
          display:flex;
          gap:10px;
          align-items:center;
          margin-bottom:12px;
          font-size:1rem;
          padding: 0 0.5rem;
          box-sizing: border-box;
      }
      .doc-name { font-weight:bold; min-width:160px; display:inline-block; }
      .doc-status { color:#555; min-width:60px; display:inline-block; }
      .doc-link {
          padding:5px 12px;
          background:#efefef;
          border:1px solid #666;
          text-decoration:none;
          border-radius:4px;
      }
      }

      .back-link{
        padding: 2rem 0;
      }

      .logout-btn {
  display: inline-block;
  padding: 0.25rem 1rem;
  background: #ddd;
  color: #000;
  text-decoration: none!important;
  border-radius: 4px;
  font-size: 14px;
  margin-top: 1rem;
}

.logout-btn:hover {
  background: #999;
}