/* 共通設定 */
* {
    box-sizing: border-box;
  }
  
  html, body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, 
                 "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
    color: #222;
  }
  
  a {
    color: inherit;
  }
  
  /* 中央寄せカード（ログイン画面など） */
  .centered {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    background: #f6f7f9;
  }
  
  .card {
    width: min(420px, 92vw);
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.07);
  }
  
  .card h1 {
    margin: 0 0 16px;
    font-size: 1.4rem;
  }
  
  label {
    display: block;
    font-size: .9rem;
    margin: 10px 0 6px;
  }
  
  label.inline {
    display: inline-flex;     /* 横並び */
    align-items: center;      /* 縦の位置をそろえる */
    gap: 4px;                 /* テキストとチェックの間隔 */
    white-space: nowrap;      /* 改行禁止 */
  }
  
  label.inline input[type="checkbox"] {
    width: 16px;              /* 小さめに */
    height: 16px;
  }
  
  

  input, select, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
  }
  
  /* ボタン */
  button {
    appearance: none;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    background: #ff7f50;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
  }
  
  button.ghost {
    background: #eef0f4;
    color: #333;
  }
  
  button:hover {
    filter: brightness(.98);
  }
  
  .msg {
    color: #d33;
    margin-top: 8px;
    min-height: 1.2em;
  }
  
  /* トップバー */
  .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fff;
    position: sticky;
    top: 0;
    border-bottom: 1px solid #eee;
  }
  
  .topbar h1 {
    font-size: 1.2rem;
    margin: 0;
  }
  
  /* コンテナとツールバー */
  .container {
    padding: 16px;
  }
  
  .toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
  }
  
  .toolbar input {
    flex: 1 1 240px;
  }
  
  /* テーブル */
  .table-wrap {
    overflow: auto;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
  }
  
  .table {
    width: 100%;
    border-collapse: collapse;
  }
  
  .table th, .table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
  }
  
  .table th {
    background: #fafbfc;
    font-weight: 700;
  }
  
  /* ダイアログ（モーダル） */
  .dialog {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(0,0,0,.3);
    padding: 16px;
  }
  
  .dialog.hidden {
    display: none;
  }
  
  .dialog-body {
    width: min(720px, 94vw);
    background: #fff;
    padding: 16px;
    border-radius: 12px;
  
    /* ここから追加：縦スクロール可能にする */
    max-height: 80vh;       /* 高さを画面の80%に制限 */
    overflow-y: auto;       /* 内容が長い場合に縦スクロール */
  }
  
  .dialog-body h3 {
    margin: 0 0 10px;
  }
  
  .dialog-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 12px;
  }
  
