

.login-body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f4f4f4;
  padding: 20px;
}

.container {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  margin: 20px auto;
}

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

.form-label {
  display: block;
  margin-bottom: 5px;
  color: #333;
}

.form-control,
.form-control-file {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
}

.submit-button {
  display: block;
  width: 100%;
  padding: 10px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.submit-button:hover {
  background-color: #0056b3;
}

.device-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.device-table th,
.device-table td {
  border-right: 1px solid #eaeaea;
  border-bottom: 1px solid #eaeaea;
  padding: 10px;
  text-align: left;
}

.device-table th:first-child,
.device-table td:first-child {
  border-left: 1px solid #eaeaea;
}

.device-table th {
  background-color: #3498db;
  color: white;
  font-weight: bold;
}

.device-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

.device-table tr:hover {
  background-color: #ecf0f1;
}

.footer {
  margin-top: 20px;
  text-align: center;
  color: #777;
}

.input_itap {
  padding: 20px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #000;
}

.divider:not(:empty)::before {
  margin-right: 0.5em;
}

.divider:not(:empty)::after {
  margin-left: 0.5em;
}

textarea#itapToken {
  background-color: #dff0ff;
}

textarea#decodeData {
  background-color: #e5ffe5;
}

.cache-status {
  color: red;
}

/* =========================
   ボタンUI改善
========================= */

/* 共通 */
button {
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}


/* ITAPトークンを復号化ボタン */
button#btn-dectypt {
    background-color: lightsalmon;
}

/* 状態取得ボタン */
.btn-status {
  background-color: #17a2b8; /* info */
  color: white;
}

.btn-status:hover {
  background-color: #138496;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* コマンド実行ボタン */
.btn-command {
  background-color: #28a745; /* success */
  color: white;
  margin: 2px 10px;
}

.btn-command:hover {
  background-color: #218838;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* 危険操作（lock / unlock 用に将来対応可） */
.btn-command.danger {
  background-color: #dc3545;
}

.btn-command.danger:hover {
  background-color: #c82333;
}

/* 入力付きコマンドの input */
input[type="text"], input[type="number"] {
  padding: 4px 6px;
  margin-right: 4px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

/* ===== コマンド表示を状態表示と揃える ===== */
.command-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.command-list li {
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.command-name {
  min-width: 70px;
  font-weight: bold;
}

.command-input {
  flex: 1;
  width: 11ch;          /* 255:255:255 がちょうど入る */
  min-width: 11ch;
  max-width: 11ch;
}



/* キャッシュ表示 */
.cache-status {
  font-weight: bold;
  margin-left: 6px;
}

input#ownerPassword {
    background-color: #fdfde8;
}

/* =========================
   スマホ対応（レスポンシブ）
========================= */
@media (max-width: 768px) {

  body.login-body {
    padding: 10px;
  }

  h1 {
    font-size: 20px;
  }

  h2 {
    font-size: 16px;
  }

  /* 入力欄をスマホ幅に */
  textarea,
  input[type="password"],
  input[type="text"],
  input[type="number"] {
    width: 100%;
    box-sizing: border-box;
  }

  /* D&Dを非表示 */
  #dropZone {
    display: none;
  }

  /* デバイステーブルを縦積みにする */
  .device-table,
  .device-table thead,
  .device-table tbody,
  .device-table th,
  .device-table td,
  .device-table tr {
    display: block;
    width: 100%;
  }

  .device-table tr {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
  }

  .device-table th {
    display: none; /* ヘッダ非表示 */
  }

  .device-table td {
    border: none;
    padding: 8px 10px;
  }

  /* 各セルにラベルを付ける */
  .device-table td:nth-child(1)::before { content: "Device ID"; }
  .device-table td:nth-child(2)::before { content: "Name"; }
  .device-table td:nth-child(3)::before { content: "Type"; }
  .device-table td:nth-child(4)::before { content: "Status"; }
  .device-table td:nth-child(5)::before { content: "Command"; }

  .device-table td::before {
    font-weight: bold;
    display: block;
    margin-bottom: 4px;
    color: #555;
  }

  /* ボタンを指で押しやすく */
  button {
    /* width: 100%; */
    margin: 6px 0;
    padding: 10px;
    font-size: 14px;
  }

  /* コマンド入力欄 */
  .btn-command + input,
  input[type="text"] {
    width: 100%;
    margin: 6px 0;
  }

  /* キャッシュ表示 */
  .cache-status {
    /* display: block; */
    margin-top: 4px;
  }
}

