/* ページを画面全体に調整 */
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 1200px;
}

/* ヘッダー */
.header_container {
  color: black;
  background: #9DC3E6;
  display: flex;
}

/* システム名（ヘッダー内） */
.header_title {
  margin-left: 1%;
  line-height: 1;
  font-size: 40px;
}

/* ログアウトボタン(ヘッダー内) */
.logout {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: large;
  font-weight: 500;
  color: white;
  background-color: #FF9900;
  border: none;
  border-radius: 9px;
  margin-left: auto;
  margin-top: auto;
  margin-bottom: auto;
  margin-right: 2%;
  text-decoration: none;
  height: 45px;
  width: 140px;
}

/* ボックス要素を中央にする用 */
.center {
  text-align: center;
  height: 300px;
  justify-content: center;
  align-items: center;
  margin: auto auto auto auto;

  display: grid;
  place-items: center;
}

/* ログインエラーメッセージ */
.login_error {
  color: red;
  text-align: center;
  width: calc(100% - 60px);

  position: absolute;
  top: 25px;
  left: 30px;
  margin: 0;
}

/* バリデーションエラー */
.form_area .error {
  color: red;
  font-size: 15px;
  margin-left: 5px;
}

/* エラー */
.error {
  color: red;
  font-size: 20px;
}

.errMsg {
  margin-left: 20px;
}

/* 戻る,一覧へリンク */
.return_link a {
  font-size: 20px;
}

/* ページタイトル */
h2 {
  font-size: 30px;
  margin-left: 20px;
}

/* 数値の入力欄の矢印を消す */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ログイン画面 */
/* ログイン情報入力エリア */
.container {
  text-align: center;
  border: solid 2px black;
  border-radius: 30px;
  margin: auto auto auto auto;
  width: 400px;
  height: 60%;
  font-size: 15px;

  position: relative;
  padding-top: 55px;
}


/* 入力欄位置調整 */
.login_form .form_area {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  margin-left: 35px;
}

/* ラベル位置調整 */
.login_form .form_area label {
  display: inline-block;
  width: 70px;
  padding: 10px;
  text-align: right;
  vertical-align: top;
}

/* テキスト入力欄 */
.login_form .form_area input {
  display: inline-block;
  width: 40%;
  line-height: 2;
  border: 2px solid black;

  flex-grow: 0;
}

/* ボタン */
button {
  font-size: large;
  font-weight: 500;
  color: white;
  background-color: #0070C0;
  border: none;
  border-radius: 9px;
  height: 45px;
  width: 120px;
  cursor: pointer;
}

/* メニュー画面 */
.link_area {
  font-size: 20px;
  margin-bottom: 20px;
  margin-left: 40px;
}


/* 一覧画面 */
/* 検索欄 */
.select_area {
  width: 90%;
  max-width: 850px;
  margin: 0 auto 0 auto;
}

.select_area .form_area_product {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  position: relative;
}

.select_area form {
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto;
  gap: 15px;
  align-items: center;
  font-size: 20px;
}

.select_area .form_area {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 0;
}

.form_area label,
.form_area_product label {
  width: 80px;
  text-align: right;
  flex-shrink: 0;
}

.form_area input,
.form_area_product input {
  flex-grow: 1;
  padding: 5px;
  border: 1px solid black;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 16px;
}

.balloon {
  display: none;
  position: absolute;
  padding: 10px;
  font-size: 16px;
  line-height: 1.6em;
  color: black;
  border-radius: 5px;
  background: #ffd966;
  width: auto;
}

.balloon:before {
  content: "";
  position: absolute;
  top: 100%;
  left: calc(50% - 10px);
  border: 10px solid transparent;
  border-top: 15px solid #ffd966;
}

.select_area button {
  padding: 6px 20px;
  border: none;
  font-weight: bold;
  cursor: pointer;
}

/* 一覧表示 */
.form_area_product:hover .balloon {
  display: inline-block;
  top: -100px;
  left: 30px;
}

.list_area {
  display: flex;
  flex-direction: column;
  width: 95%;
  max-width: 1800px;
  min-width: 1200px;
  margin: 20px auto 0 auto;
  flex-grow: 1;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 15px;
  font-size: 20px;
}

.table_area {
  width: 100%;
  flex-grow: 1;
}

.th-id,
.th-date,
.th-time,
.th-customer,
.th-totalAmount,
.th-product,
.th-price,
.th-amount,
.td-id,
.td-date,
.td-time,
.td-customer,
.td-totalAmount,
.td-product,
.td-price,
.td-amount,
.td-input-product,
.td-input-price,
.td-input-amount {
  border: solid 1px black;
  border-collapse: collapse;
}

/* th要素 */
.th-check {
  width: 2%;
}

.th-id {
  width: 6%;
  background-color: #bdd7ee;
}

.th-date {
  width: 15%;
  background-color: #bdd7ee;
}

.th-time {
  width: 15%;
  background-color: #bdd7ee;
}

.th-customer {
  width: 47%;
  background-color: #bdd7ee;
}

.th-totalAmount {
  width: 15%;
  background-color: #bdd7ee;
}

/* td要素 */
.td-check {
  text-align: center;
}

.td-id,
.td-totalAmount,
.td-price,
.td-amount {
  text-align: right;
  padding-right: 10px;
}

.td-date,
.td-time,
.td-customer,
.td-product {
  text-align: left;
  padding-left: 10px;
}

/* ボタンエリア */
.double_button {
  display: flex;
  gap: 15px;
}

.button_area {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 20px 0;
  margin-top: auto;
}

.double_button button {
  padding: 6px 20px;
  border: none;
  font-weight: bold;
  cursor: pointer;
}

/* 変更ボタン */
.double_button button[name="update"] {
  background-color: #0070C0;
}

/* 削除ボタン */
.double_button button[name="delete"] {
  background-color: #ff5353;
}


/* 詳細画面 */
.detail_container {
  display: flex;
  flex-direction: column;
  width: 95%;
  height: 80%;
  max-width: 1800px;
  min-width: 1000px;
  margin: 10px auto 0 auto;
}

.sales_info_area {
  display: flex;
  justify-content: flex-start;
  gap: 40px;
  font-size: 20px;
  width: 100%;
}

.sales_info {
  margin-right: 20px;
}

.th-product {
  width: 50%;
  background-color: #bdd7ee;
}

.th-price,
.th-amount {
  width: 25%;
  background-color: #bdd7ee;
}

.detail_container .button_area {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  padding: 20px 0;
  margin-top: 15px;
}


/* 変更画面 */
/* 登録画面 */
.update_container,
.update_container form,
.insert_container,
.insert_container form {
  display: flex;
  flex-direction: column;
  width: 95%;
  height: 80%;
  max-width: 1800px;
  min-width: 1000px;
  margin: 10px auto 0 auto;
  flex-grow: 1;
}

.update_info_area,
.insert_info_area {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  width: 100%;
}

.update_info_area .form_area,
.insert_info_area .form_area {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.update_info_area label,
.insert_info_area label {
  width: 90px;
  text-align: right;
  font-size: 20px;
}

.update_info_area input[type="datetime-local"],
.insert_info_area input[type="datetime-local"] {
  width: 260px;
}

.update_info_area input[type="text"],
.insert_info_area input[type="text"] {
  width: 220px;
}

.update_info_area input,
.insert_info_area input {
  padding: 5px;
  border: 1px solid black;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 16px;
}

.update_table td input,
.insert_table td input {
  display: block;
  width: 100%;
  height: 100%;
  padding: 5px;
  font-size: 16px;
  border: solid 1px black;
  box-sizing: border-box;
  background-color: transparent;
}

.td-input-price input,
.td-input-amount input {
  text-align: right;
  padding-right: 10px;
}

.td-input-product input {
  text-align: left;
  padding-left: 10px;
}

.update_container .table_area,
.insert_container .table_area {
  width: 95%;
  flex-grow: 1;
}

.notice_text {
  font-size: 16px;
  color: black;
  margin-bottom: 20px;
}

.update_container .button_area,
.insert_container .button_area {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 20px 0;
  margin-top: auto;
}

.error_side_area {
  font-size: 20px;
  margin-left: 10px;
  white-space: nowrap;
}


/* 削除確認画面 */
.delete_container {
  display: flex;
  flex-direction: column;
  width: 95%;
  height: 80%;
  max-width: 1800px;
  min-width: 1000px;
  margin: 10px auto 0 auto;
  flex-grow: 1;
}

.delete_container .notice_text {
  font-size: 20px;
  margin-bottom: 15px;
}

.delete_form {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.delete_container .table_area {
  width: 95%;
  flex-grow: 1;
}

.delete_container .button_area {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 20px 0;
  margin-top: auto;
}

.delete_button button {
  background-color: #ff5353;
}


/* 削除結果画面 */
.deleteResult_container {
  display: flex;
  flex-direction: column;
  width: 95%;
  height: 80%;
  max-width: 1800px;
  min-width: 1000px;
  margin: 10px auto 0 auto;
  flex-grow: 1;
}

.deleteResult_container .delete_message,
.detail_container .insert_message,
.detail_container .update_message {
  font-size: 20px;
  margin-top: 10px;
  margin-bottom: 30px;
  color: black;
}

.deleteResult_container .button_area {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 20px 0;
  margin-top: auto;
}