body {
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
  padding: 5px;
  background-color: #ffffff;
  color: #333;
  font-size: 11px;
  margin: 0;
}
.hidden { display: none !important; }

/* ログイン画面用 */
#login-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  text-align: center;
  background: #f4f7f9;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
}
.login-card {
  background: white;
  padding: 40px;
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
.login-btn {
  padding: 15px 30px;
  font-size: 18px;
  cursor: pointer;
  background-color: #0052cc;
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: bold;
}

/* レイアウト構造 */
.layout-wrapper {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.sidebar {
  width: 155px;
  flex-shrink: 0;
  background-color: #f8f9fa;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.main-area {
  flex-grow: 1;
  min-width: 0; 
}

h3 {
  border-bottom: 1px solid #0052cc;
  padding-bottom: 2px;
  margin: 12px 0 6px 0;
  font-size: 12px;
  color: #0052cc;
  font-weight: normal;
}
h3:first-child { margin-top: 0; }

input[type="checkbox"] { display: none; }

input[type="text"], input[type="number"], input[type="date"], select {
  padding: 1px 4px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 11px;
  box-sizing: border-box;
  text-align: left;
  font-weight: normal;
  height: 22px;
  width: 100%;
  background-color: #fff;
}

/* 数値入力のスピンボタン（上下矢印）を隠す（スッキリさせるため） */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="date"] {
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  text-align: center;
  padding: 0;
}
input[type="date"]::-webkit-datetime-edit { display: flex; justify-content: center; padding-left: 2px; }
input[type="date"]::-webkit-datetime-edit-text { padding: 0 2px; color: #999; }

.copy-area { background-color: #fff9e6 !important; border: 1px dashed #ffa500 !important; }

.basic-info-vertical { display: flex; flex-direction: column; gap: 6px; }
.info-item { display: flex; flex-direction: column; gap: 1px; }
.info-item label { color: #555; font-size: 9px; }

.sidebar-action-area {
  display: flex;
  gap: 4px;
  margin-top: 15px;
}
.btn-main {
  flex: 1;
  height: 28px;
  font-size: 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: #fff;
  background-color: #0052cc;
}
.btn-sub {
  flex: 1;
  height: 28px;
  font-size: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  color: #666;
  background-color: #fff;
}
.btn-main:hover { background-color: #003d99; }
.btn-sub:hover { background-color: #f0f0f0; }

.row-flex { display: flex; gap: 2px; align-items: center; width: 100%; }
.row-flex input { text-align: center; padding: 1px; }

.course-zones-wrapper { display: flex; gap: 6px; justify-content: flex-start; }
.course-zone { flex: 0 0 auto; width: 225px; border: 1px solid #ddd; border-radius: 6px; padding: 6px; background-color: #fafafa; display: flex; flex-direction: column; gap: 5px; }
.course-title { width: 100%; text-align: center; padding: 4px 0; font-size: 12px; border-bottom: 2px solid #0052cc; color: #0052cc; margin-bottom: 2px; }
 
.option-area-fixed { height: 22px; display: flex; gap: 3px; justify-content: center; align-items: center; }
.opt-btn-label { display: inline-block; padding: 2px 4px; border: 1px solid #007bff; border-radius: 3px; background-color: #fff; color: #007bff; cursor: pointer; font-size: 9px; }
input:checked + .opt-btn-label { background-color: #007bff; color: #fff; }

.payment-block { background-color: #fff; border: 1px solid #eee; border-radius: 5px; padding: 4px 5px; min-height: 40px; display: flex; flex-direction: column; justify-content: center; }
.has-settings { min-height: 145px; }

.method-header { display: flex; align-items: center; justify-content: flex-start; gap: 4px; width: 100%; }
.pay-btn-label { display: flex; flex-direction: column; justify-content: center; align-items: center; border: 1px solid #17a2b8; border-radius: 4px; background-color: #fff; color: #17a2b8; cursor: pointer; width: 48px; min-height: 32px; font-size: 9px; flex-shrink: 0; line-height: 1.1; }
input:checked + .pay-btn-label { background-color: #17a2b8; color: #fff; }

/* 反映ボタンのスタイル */
.sync-btn-right {
  flex-shrink: 0;
  width: 28px;
  height: 22px;
  font-size: 8px;
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 3px;
  color: #666;
  cursor: pointer;
  padding: 0;
}
.sync-btn-right:hover { background-color: #e0e0e0; }

.payment-settings { display: flex; flex-direction: column; gap: 2px; font-size: 9px; margin-top: 4px; flex-grow: 0; }
.setting-row { display: flex; align-items: center; gap: 2px; }
.input-small { width: 35px !important; text-align: center !important; }
.input-system { background-color: #f8f8f8 !important; color: #d32f2f; font-weight: normal !important; text-align: right !important; padding-right: 4px !important; border: 1px solid #d32f2f !important; }
 
.tk-horizontal-layout { display: flex; gap: 4px; margin-top: 4px; align-items: flex-end; }
.tk-col { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.tk-label-mini { font-size: 8px; white-space: nowrap; line-height: 1; }

.select-tk { width: 100% !important; font-size: 9px; padding: 0 12px 0 2px !important; height: 22px; -webkit-appearance: none; appearance: none; background-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8"><path d="M0 2l4 4 4-4z" fill="gray"/></svg>'); background-repeat: no-repeat; background-position: calc(100% - 2px) center; }

.inline-result { font-size: 11px; color: #0052cc; text-align: right; width: 80px; flex-shrink: 0; }
.method-result { margin-top: 4px; padding: 4px; background-color: #f1f8ff; border-radius: 4px; font-size: 10px; color: #333; border: 1px solid #d0e0f0; }

.res-line { display: flex; justify-content: flex-start; align-items: baseline; margin-bottom: 1px; }
.res-label { color: #666; width: 65px; } 
.res-val { color: #0052cc; text-align: right; width: 95px; }
.res-total { border-top: 1px solid #c0d0e0; margin-top: 2px; padding-top: 2px; }
.res-total .res-label, .res-total .res-val { color: #d32f2f; }

.payment-block:has(input[type="checkbox"]:checked) { border-color: #17a2b8; background-color: #f0fbfc; }
.unit-text { font-size: 9px; color: #777; margin-left: 1px; }

/* 印刷（PDF出力）用の設定 */
@media print {
  .no-print, .sidebar-action-area, .sync-btn-right { display: none !important; }
  body { padding: 0; margin: 0; background-color: #fff; }
  .layout-wrapper { display: flex; }
  .sidebar { background: none; }
  .course-zone { page-break-inside: avoid; background-color: #fff; }
}