/* モバイルファースト */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Hiragino Sans', 'Meiryo', sans-serif;
  margin: 0;
  background: #f5f5f5;
}

/* ─── ログイン ─── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a237e;
}

.login-box {
  background: white;
  border-radius: 12px;
  padding: 32px;
  width: 340px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}

/* ─── ヘッダー ─── */
.header {
  background: #1a237e;
  color: white;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* ─── 車両カード ─── */
.vehicle-card {
  background: white;
  margin: 12px;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ─── イベントボタン ─── */
.btn-event {
  width: 100%;
  height: 72px;
  font-size: 18px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  margin-bottom: 8px;
  transition: all 0.2s;
  letter-spacing: 0.05em;
  -webkit-tap-highlight-color: transparent;
}

.btn-event:active { transform: scale(0.97); opacity: 0.9; }

.btn-work-start    { background: #388e3c; }
.btn-pickup        { background: #1565c0; }
.btn-pickup-dep    { background: #0d47a1; }
.btn-loading       { background: #1976d2; }
.btn-delivery      { background: #e65100; }
.btn-delivery-dep  { background: #bf360c; }
.btn-break         { background: #f9a825; color: #333; }
.btn-work-end      { background: #c62828; }

/* 押済み */
.btn-pressed {
  background: #9e9e9e !important;
  opacity: 0.6;
  pointer-events: none;
}
.btn-pressed::after { content: " ✓"; }

/* 次に押すボタン */
.btn-next {
  animation: pulse 1.2s infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.4); }
  50%      { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
}

/* ─── メーター・メモ入力 ─── */
.input-area {
  background: white;
  margin: 0 12px 8px;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.input-area input {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 8px;
}
.input-area input:last-child { margin-bottom: 0; }

/* ─── 宵積み ─── */
.yozumi-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 16px;
  background: white;
  margin: 0 12px 8px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ─── トースト ─── */
#toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: white;
  padding: 12px 24px;
  border-radius: 24px;
  display: none;
  z-index: 1000;
  font-size: 16px;
  transition: opacity 0.4s;
  white-space: nowrap;
  max-width: 90vw;
  text-align: center;
}

/* ─── 日報プレビュー ─── */
.preview-card {
  background: white;
  margin: 12px;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.preview-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
  color: #1a237e;
  border-bottom: 2px solid #1a237e;
  padding-bottom: 8px;
}
.preview-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
}
.preview-label { color: #666; min-width: 100px; }
.preview-value { font-weight: 500; text-align: right; }

/* ─── 管理画面 ─── */
.admin-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px;
}

.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  background: white;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  font-size: 13px;
}

th {
  background: #1a237e;
  color: white;
  padding: 12px 8px;
  text-align: left;
  font-size: 13px;
  white-space: nowrap;
}

td {
  padding: 10px 8px;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
}

tr.unfinished { background: #fffde7; }
tr.unfinished:hover { background: #fff9c4; }

/* ─── バッジ ─── */
.badge {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  color: white;
  white-space: nowrap;
}
.badge-green  { background: #388e3c; }
.badge-blue   { background: #1565c0; }
.badge-orange { background: #e65100; }
.badge-yellow { background: #f9a825; color: #333; }
.badge-red    { background: #c62828; }

/* 何回でも押せるボタン：1回以上使用済み */
.btn-multi-used::after {
  content: " ✓";
  font-size: 15px;
  font-weight: bold;
}

/* 最後に押したボタン: 暗く＋白枠 */
.btn-active-now {
  filter: brightness(0.65) saturate(1.2);
  outline: 4px solid rgba(255,255,255,0.95);
  outline-offset: -4px;
}

/* 今は押せないボタン */
.btn-disabled {
  background: #b0b0b0 !important;
  color: #fff !important;
  opacity: 0.55;
  cursor: not-allowed;
}
