/* Clover Earth — Bank Entry / Ranking（既存セレクタと重複しない cea- プレフィックス） */

.cea-nav-scroll {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.cea-nav-scroll .nav-btn,
.cea-nav-scroll .nav-btn-gear {
  flex: 1 0 52px;
  min-width: 52px;
}

#page-bank .cea-bank-entry-wrap {
  margin-top: 0;
}

.cea-bank-lead {
  font-size: 12px;
  color: var(--c-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}

#page-bank .cea-bank-tx-form {
  margin-bottom: 0;
}

/* Bank Entry: 高さは .btn-submit（16px 24px）と同一。Saving/Saved 時も寸法を揃える */
#page-bank #cea-bank-form-entry {
  box-sizing: border-box;
  min-height: 52px;
}

#page-bank #cea-bank-form-entry.cea-bank-form-entry--inline-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  padding: 16px 24px;
  min-height: 52px;
  white-space: nowrap;
}

#page-bank #cea-bank-form-entry.cea-bank-form-entry--save-green {
  background: linear-gradient(145deg, #2e7d52, #1b5e20);
  color: #fff;
  border: none;
  box-shadow: 0 2px 8px rgba(30, 90, 61, 0.35);
}

#page-bank #cea-bank-form-entry.cea-bank-form-entry--save-green:focus-visible {
  outline: 2px solid #a5d6a7;
  outline-offset: 2px;
}

@media (max-width: 480px) {
  #page-bank #cea-bank-form-entry,
  #page-bank #cea-bank-form-entry.cea-bank-form-entry--inline-status {
    min-height: 48px;
    padding: 14px 20px;
  }
}

/* マスタ照会が済むまで Type/Earth 等は disabled — 待機中であることを示す */
#cea-bank-form.cea-bank-tx-form--await-scan {
  opacity: 0.58;
  transition: opacity 0.18s ease;
}

#page-bank .cea-bank-required-mark {
  color: #c0392b;
  font-weight: 800;
  margin-left: 2px;
}

#page-bank .cea-bank-memo-label-row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 4px;
}

#page-bank .cea-bank-memo-optional {
  font-size: 10px;
  font-weight: 500;
  color: var(--c-hint);
  line-height: 1.35;
  letter-spacing: 0;
}

/* 正の Earth のみ: スピンの下半分（減算・下矢印）を隠し上向き相当のみ。Firefox 等では従来どおり両矢印＋ min=1 で 1 未満に下げられない */
#page-bank #cea-bank-earth.cea-bank-earth--positive-only::-webkit-inner-spin-button {
  clip-path: inset(0 0 50% 0);
  -webkit-clip-path: inset(0 0 50% 0);
}

.cea-scan-panel {
  margin-bottom: 16px;
}

#page-bank .cea-bank-scan-student-label {
  display: block;
  margin-bottom: 0 !important;
}

#page-bank .cea-bank-scan-code-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  margin-bottom: 12px;
}

#page-bank .cea-bank-scan-code-title {
  flex-shrink: 0;
}

#page-bank .cea-bank-scan-student-label .cea-bank-scan-code-hint {
  display: inline;
  font-size: 10px;
  font-weight: 500;
  color: var(--c-hint);
  line-height: 1.35;
  letter-spacing: 0;
  flex: 1 1 12rem;
  min-width: 0;
}

#page-bank .cea-bank-scan-code-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

#page-bank .cea-bank-scan-code-row .cea-bank-scan-code-input {
  flex: 1 1 auto;
  min-width: 0;
}

#page-bank .cea-bank-scan-enter-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-height: 44px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #2e7d52;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s, color 0.15s;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

#page-bank .cea-bank-scan-enter-btn:focus-visible {
  outline: 2px solid #2e7d52;
  outline-offset: 2px;
}

#page-bank .cea-bank-scan-enter-btn:not(:disabled):active {
  transform: scale(0.96);
  opacity: 0.85;
}

#page-bank .cea-bank-scan-enter-btn:disabled {
  cursor: not-allowed;
  color: #b0b8c0;
  opacity: 0.55;
}

.cea-bank-scan-resolve {
  margin-top: 12px;
  padding: 12px 14px;
  background: #fff0ec;
  border: 0.5px solid rgba(233, 150, 122, 0.45);
  border-radius: var(--radius-md);
}

.cea-bank-scan-resolve-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e17055;
  margin-bottom: 6px;
}

.cea-bank-scan-resolve-text {
  font-size: 14px;
  color: #1a2233;
  line-height: 1.5;
}

.cea-bank-scan-resolve-row {
  margin-bottom: 4px;
}

.cea-bank-scan-resolve-row:last-child {
  margin-bottom: 0;
}

.cea-bank-scan-resolve-k {
  font-size: 12px;
  font-weight: 400;
  color: var(--c-hint);
}

.cea-bank-scan-resolve-v {
  font-size: 14px;
  font-weight: 700;
  color: #1a2233;
}

.cea-bank-scan-resolve-row--err .cea-bank-scan-resolve-v {
  color: var(--c-warn);
}

.cea-bank-feedback {
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
  min-height: 1.2em;
}

.cea-bank-feedback.cea-bank-ok {
  color: #2e7d52;
}

.cea-bank-feedback.cea-bank-err {
  color: var(--c-warn);
}

/* スキャン行エラー（空・形式・未登録）：受付 PIN 文言と同サイズ 8px */
.cea-bank-feedback.cea-bank-err.cea-bank-err--scan-inline {
  font-size: 8px;
  line-height: 1.25;
  font-weight: 700;
}

/* Entry 送信中・成功（Saving / Saved）：緑・太字 */
.cea-bank-feedback.cea-entry-save-flow-msg {
  color: #2e7d52;
  font-weight: 800;
}

#page-bank .cea-bank-form-msg-below-entry {
  margin-top: 12px;
  text-align: left;
}

#page-bank .cea-bank-form-msg-below-entry.cea-entry-save-flow-msg {
  text-align: center;
}

/* Daily Entry 保存メッセージ（Bank の Entry 下と同じ位置・中央） */
#page-entry .cea-daily-scan-msg.cea-entry-save-flow-msg {
  margin-top: 12px;
  text-align: center;
}

.cea-bank-out-fields[hidden] {
  display: none !important;
}

.cea-rank-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 14px;
}

.cea-rank-filters .form-group {
  margin-bottom: 0;
  min-width: 120px;
  flex: 1 1 120px;
}

.cea-rank-table-num {
  text-align: right;
  font-weight: 700;
  color: #1a5fa8;
}

/* —— 受付武装（PIN） —— */
/* ロック（グレー）・武装後（緑の単色グラデ）で外枠の高さを同一にする */
.cea-reception-banner {
  --cea-reception-banner-outer-h: 100px;
  border-radius: var(--radius-lg);
  padding: 9px 14px;
  margin-bottom: 14px;
  border: 1.5px solid transparent;
  box-sizing: border-box;
  width: 100%;
  height: var(--cea-reception-banner-outer-h);
  min-height: var(--cea-reception-banner-outer-h);
  max-height: var(--cea-reception-banner-outer-h);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cea-reception-banner--locked {
  background: linear-gradient(135deg, #5c6a7a 0%, #3d4a5c 100%);
  border-color: rgba(0, 0, 0, 0.12);
  color: #fff;
}

.cea-reception-banner--armed {
  /* スキャン停止中（ロック）と同じく 135deg・0%→100% の2点配分。色相は緑のみ */
  background: linear-gradient(135deg, #4a9d6f 0%, #1e5a3d 100%);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.cea-reception-banner-inner {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 0;
  overflow: hidden;
}

/* リード（文言）とトレイル（カウントダウン・PIN・ボタン） */
.cea-reception-banner-main-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  flex: 0 1 auto;
  min-height: 0;
}

.cea-reception-banner-lead {
  flex: 1 1 200px;
  min-width: 0;
}

.cea-reception-banner-lead-texts {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.cea-reception-status-primary {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
}

.cea-reception-banner--locked .cea-reception-status-primary {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.98;
}

.cea-reception-banner--armed .cea-reception-status-primary {
  font-weight: 700;
  letter-spacing: 0;
  opacity: 1;
}

.cea-reception-status-subtitle {
  margin: 0;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.02em;
  opacity: 0.78;
}

.cea-reception-banner--armed .cea-reception-status-subtitle {
  opacity: 0.92;
}

.cea-reception-banner--armed .cea-reception-status-subtitle .cea-reception-status-subtitle-staffname {
  color: #fff9c4;
  font-weight: 700;
  font-size: 12px;
}

#cea-reception-status-subtitle[hidden],
#cea-daily-reception-substrip[hidden] {
  display: none !important;
}

.cea-reception-banner-lead .cea-reception-sub:not([hidden]) {
  margin-top: 5px;
  margin-bottom: 0;
}

.cea-reception-banner-trail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px 10px;
  flex: 1 1 220px;
  min-width: 0;
}

.cea-reception-banner-trail .cea-reception-countdown:not([hidden]) {
  flex: 1 1 160px;
  min-width: 0;
  text-align: right;
  line-height: 1.35;
}

.cea-reception-banner-ctl-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  flex: 0 0 auto;
  min-width: 0;
  max-width: 100%;
}

.cea-reception-banner-ctl-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.cea-reception-signin-cluster {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 0;
}

.cea-reception-pin-col {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
}

/* PIN 行には Sign out を置かない。武装時のみ表示し hidden 時はレイアウトから除外 */
#cea-disarm-btn[hidden],
#cea-daily-disarm-btn[hidden] {
  display: none !important;
}

.cea-reception-sub {
  font-size: 12px;
  line-height: 1.5;
  opacity: 0.95;
  margin-bottom: 10px;
}

.cea-reception-countdown {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 0;
  opacity: 0.92;
  line-height: 1.3;
}

/* 受付カウントダウン内「(無操作ロックN分)」のみ小さめ */
.cea-reception-countdown .cea-reception-countdown-idle-sub {
  font-size: 0.72em;
  font-weight: 600;
  opacity: 0.88;
  white-space: nowrap;
}

.cea-reception-btn {
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}

.cea-reception-btn:active {
  transform: scale(0.98);
}

.cea-reception-btn-arm {
  background: #fff;
  color: #1a5fa8;
}

.cea-reception-btn-signin {
  height: 36px;
  min-height: 36px;
  min-width: 5.25rem;
  box-sizing: border-box;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-size: 12px;
}

/* ロック時: Signing in… / 未登録PIN とも小型フォント・窄幅固定 */
.cea-reception-banner--locked .cea-reception-btn-signin {
  height: 30px;
  min-height: 30px;
  width: 6rem;
  min-width: 6rem;
  max-width: 6rem;
  padding: 0 1px;
  font-size: 9px;
  flex-shrink: 0;
}

.cea-reception-banner--locked .cea-reception-btn-signin.cea-reception-btn-signin--err {
  color: #b71c1c;
  background: #ffebee;
  box-shadow: inset 0 0 0 1px #ef9a9a;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0;
}

/* Sign in と同じ 30px 高・6rem 幅（受付バナー専用） */
.cea-reception-btn-signout {
  height: 30px;
  min-height: 30px;
  width: 6rem;
  min-width: 6rem;
  max-width: 6rem;
  box-sizing: border-box;
  padding: 0 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-size: 9px;
  font-weight: 700;
  flex-shrink: 0;
}

.cea-bank-gate--locked {
  opacity: 0.55;
  pointer-events: none;
  filter: grayscale(0.15);
}

.cea-bank-gate--armed {
  opacity: 1;
  pointer-events: auto;
  filter: none;
}

/* バナー内 Sign in：PIN + ボタン（モーダルなし） */
#cea-bank-reception-signin-wrap[hidden],
#cea-daily-reception-signin-wrap[hidden] {
  display: none !important;
}

/* PIN をバナー色に馴染む枠で囲む（白塗りつぶしは使わない） */
.cea-reception-inline-signin-pin-shell {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  min-height: 36px;
  padding: 0 7px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.cea-reception-banner--locked .cea-reception-inline-signin-pin-shell:focus-within {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.14);
}

.cea-reception-banner--locked .cea-reception-inline-signin-pin-shell {
  min-height: 30px;
  padding: 0 5px;
  justify-content: center;
  align-self: center;
}

.cea-reception-inline-signin-pin.form-input {
  width: 4.75rem;
  min-width: 0;
  max-width: 76px;
  height: 32px;
  min-height: 32px;
  max-height: 32px;
  padding: 0 3px;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.2;
  border: none;
  border-radius: 6px;
  box-sizing: border-box;
  background: transparent;
  color: #fff;
  box-shadow: none;
  outline: none;
}

.cea-reception-inline-signin-pin.form-input:focus {
  outline: none;
  box-shadow: none;
}

/* グローバル .form-input:focus の白背景を上書き（ロック時バナー内のみ） */
.cea-reception-banner--locked .cea-reception-inline-signin-pin.form-input {
  height: 26px;
  min-height: 26px;
  max-height: 26px;
  font-size: 11px;
  text-align: center;
}

.cea-reception-banner--locked .cea-reception-inline-signin-pin.form-input:focus {
  background: transparent;
  border-color: transparent;
  color: #fff;
}

.cea-reception-banner--locked .cea-reception-inline-signin-pin.form-input::placeholder {
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
}

.cea-reception-banner--locked .cea-reception-inline-signin-pin.form-input::-webkit-input-placeholder {
  text-align: center;
}

#cea-bank-reception-arm-msg[hidden],
#cea-daily-reception-arm-msg[hidden] {
  display: none !important;
}

/* PIN 入力欄の直下（エラー時は赤字） */
.cea-reception-pin-below-msg {
  margin: 0;
  padding: 0;
  min-height: 0;
  font-size: 10px;
  line-height: 1.3;
  font-weight: 600;
  text-align: left;
  max-width: 11.5rem;
  word-break: break-word;
}

.cea-reception-pin-below-msg:empty {
  display: none;
}

.cea-reception-banner--locked .cea-reception-pin-below-msg.cea-bank-err {
  color: #e53935;
  font-weight: 700;
  display: block;
}

/* Bank 直近の取引（行間・字サイズは Daily 直近エントリーに合わせる） */
#page-bank .cea-bank-tx-table-wrap table.cea-bank-tx-table {
  width: 100%;
  table-layout: fixed;
  font-size: 10px;
  border-collapse: collapse;
}

#page-bank .cea-bank-tx-table thead th {
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
  padding: 2px 5px;
  vertical-align: middle;
  color: var(--c-hint);
  background: #f0f6fc;
  border-bottom: 0.5px solid var(--c-border);
}

#page-bank .cea-bank-tx-table tbody td {
  font-size: 10px;
  font-weight: 400;
  line-height: 1.15;
  padding: 2px 5px;
  vertical-align: middle;
  border-bottom: 0.5px solid #e4eff8;
  word-break: break-word;
}

/* Date/Time は日時が切れないようやや広め、他列でバランス */
#page-bank .cea-bank-tx-table .cea-bank-tx-th-datetime,
#page-bank .cea-bank-tx-table .cea-bank-tx-td-datetime {
  width: 22%;
  min-width: 5.5rem;
}

#page-bank .cea-bank-tx-table .cea-bank-tx-td-datetime {
  word-break: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--c-muted);
}

#page-bank .cea-bank-tx-table .cea-bank-tx-th-campus,
#page-bank .cea-bank-tx-table .cea-bank-tx-td-campus {
  width: 15%;
}

#page-bank .cea-bank-tx-table .cea-bank-tx-td-campus {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--c-muted);
}

#page-bank .cea-bank-tx-table .cea-bank-tx-th-student,
#page-bank .cea-bank-tx-table .cea-bank-tx-td-student {
  width: 15%;
}

#page-bank .cea-bank-tx-table .cea-bank-tx-td-student {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-bank .cea-bank-tx-table .cea-bank-tx-th-type,
#page-bank .cea-bank-tx-table .cea-bank-tx-td-type {
  width: 18%;
}

#page-bank .cea-bank-tx-table .cea-bank-tx-th-earth,
#page-bank .cea-bank-tx-table .cea-bank-tx-td-earth {
  width: 7%;
  text-align: left;
  padding-left: 2px;
  padding-right: 6px;
  font-variant-numeric: tabular-nums;
}

#page-bank .cea-bank-tx-table .cea-bank-tx-th-staff,
#page-bank .cea-bank-tx-table .cea-bank-tx-td-staff {
  width: 15%;
}

#page-bank .cea-bank-tx-table .cea-bank-tx-td-staff {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--c-muted);
}

#page-bank .cea-bank-tx-table .cea-bank-tx-th-del,
#page-bank .cea-bank-tx-table .cea-bank-tx-td-del {
  width: 8%;
  min-width: 1.5rem;
  max-width: 2.5rem;
  padding: 2px 4px 2px 6px;
  box-sizing: border-box;
  text-align: right;
  vertical-align: middle;
}

#page-bank .cea-bank-tx-table .cea-bank-tx-td-del {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

#page-bank .cea-bank-tx-del-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--c-muted);
  cursor: pointer;
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
}

#page-bank .cea-bank-tx-del-btn .cea-bank-tx-trash-svg {
  width: 13px;
  height: 13px;
  display: block;
  flex-shrink: 0;
  overflow: visible;
  vertical-align: middle;
}

#page-bank .cea-bank-tx-del-btn:hover:not(:disabled) {
  background: rgba(192, 57, 43, 0.08);
  color: var(--c-warn);
}

#page-bank .cea-bank-tx-del-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
