/* Daily Entry — Wallet / Lesson タブ + Lesson 一括（cea-daily-lesson- プレフィックス） */

#cea-daily-entry-tab-shell {
  margin-top: 0;
  border: 0.5px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: #fff;
  overflow: hidden;
}

/* Recent Entries：上の白カードとの間隔を Bank「Recent Transactions」と同じ 20px に */
#page-entry #cea-daily-recent-entries-block {
  margin-top: 20px;
}

#cea-daily-entry-tab-shell #cea-daily-scan-wrap.cea-daily-scan-wrap {
  border: none;
  border-radius: 0;
}

/* Wallet / Lesson：ランキングタブと同様・等分・グリーン系グラデ下線 */
.cea-daily-entry-tablist {
  display: flex;
  gap: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-bottom: 2px solid #d5ebe0;
}

.cea-daily-entry-tab-btn {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 10px 8px 12px;
  font-size: 15px;
  font-weight: 700;
  color: #c5cdd6;
  background: transparent;
  border: none;
  border-radius: 0;
  cursor: pointer;
  position: relative;
  text-align: center;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

/* 下線バー：非選択は非表示。選択時はグリーン横グラデ */
.cea-daily-entry-tab-btn::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, #a5d6a7 0%, #43a047 48%, #2e7d52 100%);
  box-shadow: 0 1px 3px rgba(46, 125, 82, 0.22);
  opacity: 0;
  transition: opacity 0.15s;
}

.cea-daily-entry-tab-btn:hover:not(.cea-daily-entry-tab-btn--active) {
  color: #8aae98;
  background: transparent;
}

.cea-daily-entry-tab-btn--active {
  color: #2e7d52;
  background: transparent;
  box-shadow: none;
}

.cea-daily-entry-tab-btn--active::after {
  opacity: 1;
}

.cea-daily-entry-tab-btn--active:hover {
  color: #1b5e20;
  background: transparent;
}

.cea-daily-entry-tab-btn:focus-visible {
  outline: 2px solid #2e7d52;
  outline-offset: 2px;
}

.cea-daily-entry-tabpanel {
  padding-top: 4px;
}

.cea-daily-lesson-panel {
  padding-top: 8px;
}

.cea-daily-lesson-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 14px;
}

/* Date と GS Team を横並び（flex-end だと列高差で片方だけ下に寄り、ラベル・入力の縦位置がずれる） */
.cea-daily-lesson-toolbar-dt {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  width: 100%;
  gap: 14px;
  box-sizing: border-box;
}

#cea-daily-panel-lesson .cea-daily-lesson-toolbar-dt .form-group {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 8px;
}

#cea-daily-panel-lesson .cea-daily-lesson-toolbar .cea-ledger-date-field {
  margin-bottom: 0;
}

.cea-daily-lesson-field {
  margin-bottom: 0;
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
}

#cea-daily-panel-lesson .cea-daily-lesson-team-select {
  width: 100%;
  max-width: none;
  min-width: 0;
}

.cea-daily-lesson-date-field {
  margin-bottom: 0;
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  width: auto;
}

/* Date は列内いっぱい（高さは Wallet と同じ ledger-date 既定 40px） */
#cea-daily-panel-lesson .cea-daily-lesson-ledger-composite {
  width: 100%;
  max-width: none;
}

/* GS Team セレクトを Date と同じ 40px 外寸に */
#cea-daily-panel-lesson select#cea-daily-lesson-team.form-input {
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  box-sizing: border-box;
  padding: 10px 28px 10px 12px;
  font-size: 16px;
  line-height: 1.25;
}

@media (max-width: 480px) {
  #cea-daily-panel-lesson select#cea-daily-lesson-team.form-input {
    padding: 11px 28px 11px 12px;
  }
}

/* Type / Earth：ラベル行は横並び、下段でコントロールを同じ2列グリッドに揃える */
#cea-daily-panel-lesson .cea-daily-lesson-type-earth-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
  margin-bottom: 22px;
  padding-bottom: 4px;
  box-sizing: border-box;
}

/* Type | Earth を Date | GS Team（toolbar-dt）と同じ flex 比率・gap で縦ラインを揃える */
#cea-daily-panel-lesson .cea-daily-lesson-type-earth-label-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
}

#cea-daily-panel-lesson .cea-daily-lesson-type-earth-control-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
}

#cea-daily-panel-lesson .cea-daily-lesson-type-earth-label-cell {
  min-width: 0;
}

#cea-daily-panel-lesson .cea-daily-lesson-type-earth-label-cell:first-child,
#cea-daily-panel-lesson .cea-daily-lesson-type-earth-control-cell:first-child {
  flex: 1 1 0;
  min-width: 0;
}

#cea-daily-panel-lesson .cea-daily-lesson-type-earth-label-cell:last-child,
#cea-daily-panel-lesson .cea-daily-lesson-type-earth-control-cell:last-child {
  flex: 1 1 0;
  min-width: 0;
}

#cea-daily-panel-lesson .cea-daily-lesson-type-label,
#cea-daily-panel-lesson .cea-daily-lesson-earth-label {
  display: block;
  margin-bottom: 0 !important;
}

#cea-daily-panel-lesson .cea-daily-lesson-type-radios {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: -2px;
}

#cea-daily-panel-lesson .cea-daily-lesson-type-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  color: #4a6080;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#cea-daily-panel-lesson .cea-daily-lesson-type-radio {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: #2e7d52;
  cursor: pointer;
}

#cea-daily-panel-lesson .cea-daily-lesson-earth-amt-btns {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.cea-daily-lesson-table-wrap {
  overflow-x: auto;
  margin-top: 6px;
  margin-bottom: 12px;
  border: 0.5px solid var(--c-border);
  border-radius: var(--radius-md);
}

.cea-daily-lesson-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 10px;
}

.cea-daily-lesson-table th,
.cea-daily-lesson-table td {
  text-align: left;
  vertical-align: middle;
}

/* Bank 直近取引・Daily 直近エントリーと同系のヘッダー */
.cea-daily-lesson-table th {
  padding: 2px 5px;
  line-height: 1.2;
  font-size: 9px;
  font-weight: 700;
  color: var(--c-hint);
  background: #f0f6fc;
  border-bottom: 0.5px solid var(--c-border);
  white-space: nowrap;
}

/* 本文は Bank 取引テーブル tbody に合わせる */
.cea-daily-lesson-table td {
  padding: 2px 5px;
  line-height: 1.15;
  font-size: 10px;
  font-weight: 400;
  border-bottom: 0.5px solid #e4eff8;
  color: #1a2233;
}

.cea-daily-lesson-th-check {
  width: 48px;
  max-width: 48px;
  text-align: center;
  padding-left: 6px;
  padding-right: 6px;
}

/* ヘッダー・行のチェックボックスを同じ外寸に（端末ごとのデフォルト差を抑える） */
.cea-daily-lesson-checkbox {
  width: 15px;
  height: 15px;
  min-width: 15px;
  min-height: 15px;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  vertical-align: middle;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: #1a5fa8;
}

/* Date / Campus / Name / Type は同幅、チェックのみ固定（colgroup と併用） */
#cea-daily-lesson-table col.cea-daily-lesson-col-date,
#cea-daily-lesson-table col.cea-daily-lesson-col-campus,
#cea-daily-lesson-table col.cea-daily-lesson-col-name,
#cea-daily-lesson-table col.cea-daily-lesson-col-type {
  width: calc((100% - 48px) / 4);
}

#cea-daily-lesson-table col.cea-daily-lesson-col-check {
  width: 48px;
}

.cea-daily-lesson-th-date,
.cea-daily-lesson-th-campus,
.cea-daily-lesson-th-name,
.cea-daily-lesson-th-type {
  width: auto;
}

.cea-daily-lesson-td-check {
  text-align: center;
  width: 48px;
  max-width: 48px;
  padding-left: 6px;
  padding-right: 6px;
}

.cea-daily-lesson-row-date {
  font-variant-numeric: tabular-nums;
  color: var(--c-muted);
  white-space: nowrap;
}

.cea-daily-lesson-td-name,
.cea-daily-lesson-td-campus,
.cea-daily-lesson-td-type {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cea-daily-lesson-td-campus {
  color: var(--c-muted);
}

.cea-daily-lesson-table tbody tr:last-child td {
  border-bottom: none;
}

/* 空状態：Recent の「拠点または担当を選ぶと…」と同じ .cea-recent-wallet-status-row（cea-daily-scan.css） */
#cea-daily-panel-lesson #cea-daily-lesson-empty.cea-recent-wallet-status-row {
  margin: 0;
  border-top: 0.5px solid var(--c-border);
}

/* Recent 用 flex が [hidden] を打ち消す端末対策 */
#cea-daily-lesson-empty[hidden] {
  display: none !important;
}

.cea-daily-lesson-actions {
  margin-top: 8px;
  margin-bottom: 4px;
}

/* 一括Entry は Wallet Entry と同じ .cea-daily-scan-confirm（cea-daily-scan.css） */

.cea-daily-lesson-msg.cea-bank-feedback--err {
  color: #c62828;
}

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

/*
 * 列間は Date / Campus / Name / Type で均等、チェック列のみ固定幅。
 * 字サイズ・ヘッダー色は Bank / Daily 直近リストと揃え、左右パディングだけやや広め。
 */
#cea-daily-lesson-table thead th,
#cea-daily-lesson-table tbody td {
  padding-top: 2px;
  padding-bottom: 2px;
  padding-right: 10px;
  padding-left: 10px;
}

#cea-daily-lesson-table thead th.cea-daily-lesson-th-check,
#cea-daily-lesson-table tbody td.cea-daily-lesson-td-check {
  padding-left: 6px;
  padding-right: 6px;
}

/* Daily 白枠：index の .entry-form（後勝ちの padding / margin-bottom）を詰める */
#page-entry #cea-daily-scan-wrap.entry-form {
  padding: 12px 14px 10px;
  margin-bottom: 10px;
}

#page-entry #cea-daily-scan-wrap .cea-section-desc-ja {
  margin-bottom: 6px;
}

#page-entry #cea-daily-panel-wallet .form-group.cea-daily-ledger-date-field {
  margin-bottom: 12px;
}

#page-entry #cea-daily-panel-lesson .cea-daily-lesson-toolbar .form-group.cea-daily-lesson-date-field {
  margin-bottom: 8px;
}
