

/*


 */

/* ========================================
   1. 変数定義（デザインシステム & テーマ）
======================================== */
:root {
  /* メインカラー */
  --primary-color: #0875f5;
  --primary-hover: #0669dc;
  --primary-light: #eef6ff;

  /* セカンダリ・状態カラー */
  --success-color: #198754;
  --success-hover: #157347;
  --danger-color: #ef4444;
  --danger-hover: #dc2626;
  --warning-color: #ffb400;
  --secondary-color: #6c757d;
  --secondary-hover: #5c636a;

  /* テキストカラー（ライトモード） */
  --text-main: #1f2937;
  --text-sub: #6b7280;
  --text-muted: #9ca3af;

  /* 背景・ボーダー（ライトモード） */
  --bg-page: #f4f6f9;
  --bg-card: #ffffff;
  --bg-input: #ffffff;
  --bg-table-header: #e4f0ff;
  --border-color: #e5e7eb;
  --border-dark: #dcdfe6;

  /* 共通パーツ */
  --header-height: 64px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 18px rgba(0, 0, 0, 0.12);
}

/* ========================================
   2. リセット・共通スタイル
======================================== */
html,
body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: "Yu Gothic", "Meiryo", sans-serif;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.fs-7 {
  font-size: 0.85rem;
}

/* ========================================
   4. ログイン画面（全体デザイン統一版）
======================================== */
.login-page {
  min-height: 100vh;
  background: var(--bg-page);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.login-decoration {
  position: absolute;
  border-radius: 50%;
  background: var(--primary-light);
  opacity: 0.6;
  pointer-events: none;
}

.login-decoration-large {
  width: 230px;
  height: 230px;
  top: 45px;
  left: 130px;
}

.login-decoration-small {
  width: 150px;
  height: 150px;
  left: 295px;
  bottom: 80px;
}

.login-decoration-right {
  width: 350px;
  height: 350px;
  right: -80px;
  bottom: -120px;
}

.login-card {
  width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-md);
}

.login-card h1 {
  margin: 0;
  text-align: center;
  color: var(--text-main);
  font-size: 22px;
  font-weight: 700;
}

.login-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 36px;
  border: 1px solid var(--border-color);
}

.login-icon span {
  transform: translateY(-2px);
}

.login-subtitle {
  margin: 8px 0 28px;
  text-align: center;
  color: var(--text-sub);
  font-size: 14px;
}

.login-error {
  min-height: 70px;
  margin-bottom: 24px;
  padding: 12px 15px;
  box-sizing: border-box;
  border: 1px solid #f2b5b5;
  border-radius: var(--radius-lg);
  background: #ffe0e0;
  color: #a52c32;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  line-height: 1.5;
}

.error-icon {
  font-size: 18px;
}

.login-field {
  margin-bottom: 22px;
}

.login-field label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
}

.input-wrapper {
  height: 48px;
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-sizing: border-box;
  transition: all 0.2s;
}

.input-wrapper:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(8, 117, 245, 0.12);
}

.input-icon {
  width: 42px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-page);
  color: var(--text-sub);
  font-size: 16px;
  border-right: 1px solid var(--border-color);
  flex-shrink: 0;
}

.input-wrapper input {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  padding: 0 14px;
  font-size: 15px;
  color: var(--text-main);
  background: transparent;
  box-sizing: border-box;
}

.input-wrapper input::placeholder {
  color: var(--text-muted);
}

.login-submit {
  margin-top: 28px;
}

.login-submit input {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--primary-color);
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.2s;
}

.login-submit input:hover {
  background: var(--primary-hover);
}

.login-submit input:active {
  transform: translateY(0);
}

.login-links {
  margin-top: 23px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
}

.login-links a {
  color: var(--text-sub);
  font-size: 14px;
  text-decoration: none;
}

.login-links a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.login-footer {
  margin-top: 42px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* ========================================
   5. 作業報告書 ホーム画面・共通レイアウト
======================================== */
.work-report-page {
  min-height: 100vh;
  background: var(--bg-page);
}

.main-content {
  min-height: calc(100vh - var(--header-height));
  box-sizing: border-box;
}

.report-container {
  width: 912px;
  margin: 0 auto;
  padding-top: 17px;
}

.report-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.report-heading h1 {
  margin: 0;
  color: var(--text-main);
  font-size: 27px;
  font-weight: 700;
}

.new-report-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 93px;
  height: 32px;
  background: var(--success-color);
  color: white;
  border-radius: 5px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  transition: 0.2s;
}

.new-report-button:hover {
  background: var(--success-hover);
}

/* フィルターエリア */
.report-filter-area {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 13px;
}

.current-year {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.year-select {
  width: 128px;
  height: 31px;
  padding: 0 10px;
  border: 1px solid var(--border-dark);
  border-radius: 5px;
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 13px;
  outline: none;
}

.year-select:focus {
  border-color: var(--primary-color);
}

/* 一覧テーブル */
.report-table-wrapper {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: var(--bg-card);
}

.report-table thead {
  background: var(--bg-table-header);
}

.report-table th {
  height: 43px;
  padding: 0 15px;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  box-sizing: border-box;
}

/* 列幅指定 */
.month-column { width: 40%; }
.status-column { width: 11%; text-align: center !important; }
.date-column { width: 25%; }

.report-table td {
  height: 52px;
  padding: 0 15px;
  border-top: 1px solid var(--border-color);
  font-size: 14px;
  color: var(--text-main);
  box-sizing: border-box;
}

.report-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.report-month {
  font-weight: 600;
  color: var(--text-main);
}

.updated-date {
  color: var(--text-muted);
}

.empty-report {
  height: 100px !important;
  text-align: center;
  color: var(--text-muted);
}

/* ステータスバッジ */
.status-badge {
  display: inline-flex;
  min-width: 55px;
  height: 24px;
  padding: 0 8px;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  font-size: 12px;
  color: white;
  box-sizing: border-box;
}

.status-draft { background: var(--warning-color); color: #111; }
.status-submitted { background: var(--success-color); }
.status-not-created { background: var(--secondary-color); }
.status-default { background: var(--secondary-color); }

/* 操作ボタン群 */
.report-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.action-button {
  min-width: 59px;
  height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 12px;
  text-decoration: none;
  box-sizing: border-box;
  transition: 0.15s;
}

.edit-button {
  background: var(--primary-color);
  color: white;
}

.edit-button:hover {
  background: var(--primary-hover);
}

.confirm-button {
  background: var(--bg-card);
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.confirm-button:hover {
  background: var(--primary-light);
}

.excel-button {
  background: var(--success-color);
  color: white;
}

.excel-button:hover {
  background: var(--success-hover);
}

.print-button {
  background: var(--secondary-color);
  color: white;
}

.print-button:hover {
  background: var(--secondary-hover);
}

/* ========================================
   6. 作業報告書 新規作成（カード・モーダル）
======================================== */
.new-report-card {
  width: 600px;
  max-width: 90%;
  margin: 40px auto;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.new-report-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  background: var(--primary-color);
  color: white;
}

.new-report-card-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: bold;
}

.close-new-report {
  color: white;
  font-size: 28px;
  text-decoration: none;
  line-height: 1;
}

.close-new-report:hover {
  color: #ddd;
}

.new-report-card-body {
  padding: 30px;
}

.new-report-description {
  color: var(--text-sub);
  margin-bottom: 25px;
}

.new-report-select-area {
  display: flex;
  gap: 20px;
}

.select-group {
  flex: 1;
}

.select-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 8px;
  color: var(--text-main);
}

.new-report-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 30px;
}

/* モーダル */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.new-report-modal {
  width: 500px;
  max-width: 90%;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  animation: modalOpen 0.2s ease-out;
}

.new-report-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: var(--primary-color);
  color: white;
}

.new-report-modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: bold;
}

.modal-close-button {
  border: none;
  background: transparent;
  color: white;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.modal-close-button:hover {
  opacity: 0.7;
}

.new-report-modal-body {
  padding: 30px;
}

.modal-description {
  margin-bottom: 25px;
  color: var(--text-sub);
}

.modal-form-group {
  margin-bottom: 20px;
}

.modal-form-group label {
  display: block;
  margin-bottom: 7px;
  font-weight: bold;
  color: var(--text-main);
}

.modal-form-group select {
  width: 100%;
  height: 45px;
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  padding: 0 10px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 30px;
}

@keyframes modalOpen {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ========================================
   7. 作業報告書 編集ページ
======================================== */
.report-edit-page {
  min-height: calc(100vh - var(--header-height));
  background-color: var(--bg-page);
  padding-bottom: 60px;
}

.report-edit-page .card {
  border: none;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--bg-card);
}

.report-edit-page .card-header {
  padding: 12px 18px;
}

/* 戻るボタン */
.btn-back {
  background-color: var(--bg-card);
  border: 1px solid var(--border-dark);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: all 0.2s;
}

.btn-back:hover {
  background-color: var(--primary-light);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.page-title {
  color: var(--text-main);
  font-size: 22px;
}

/* 基本情報カード */
.info-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color) !important;
  padding: 12px 20px;
  margin-bottom: 20px;
}

.info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-label {
  font-size: 13px;
  color: var(--text-sub);
  font-weight: 500;
  white-space: nowrap;
}

.info-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
}

.info-divider {
  width: 1px;
  height: 16px;
  background-color: var(--border-color);
}

/* 編集用テーブル */
.table-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color) !important;
  background: var(--bg-card);
  overflow: hidden;
}

.report-edit-page .report-table th {
  vertical-align: middle;
  white-space: nowrap;
}

.report-edit-page .report-table thead th {
  background-color: var(--bg-table-header) !important;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 700;
  padding: 10px;
  border-bottom: 1px solid var(--border-color) !important;
}

.report-edit-page .report-table td {
  vertical-align: middle;
  padding: 6px 8px !important;
  border-bottom: 1px solid var(--border-color);
}

/* フォーム入力要素 */
.input-clean {
  border: 1px solid var(--border-dark) !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  color: var(--text-main) !important;
  background-color: var(--bg-input) !important;
  transition: all 0.15s ease-in-out;
}

.input-clean:hover {
  border-color: var(--primary-color) !important;
}

.input-clean:focus {
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 3px rgba(8, 117, 245, 0.12) !important;
}

.custom-textarea {
  resize: vertical;
  min-height: 34px;
  min-width: 180px;
  padding: 6px 10px !important;
}

.report-table input[type="time"] {
  min-width: 100px;
}

/* 列幅指定 */
.day-column { width: 60px; }
.weekday-column { width: 60px; }
.time-column { width: 110px; }
.break-column { width: 110px; }
.work-hour-column { width: 100px; }
.content-column { min-width: 250px; }
.note-column { min-width: 180px; }

/* 日付・文字表現 */
.weekday-text { color: var(--text-sub); font-weight: 500; }
.sunday { color: #f87171; font-weight: 700; }
.saturday { color: #60a5fa; font-weight: 700; }
.work-hours { color: var(--text-sub) !important; font-weight: 600; font-size: 13px; white-space: nowrap; }
.bg-light-row { background-color: rgba(0, 0, 0, 0.02); }

/* 集計サマリー */
.summary-card {
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.btn-submit {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 2px 6px rgba(8, 117, 245, 0.25);
  padding: 8px 24px;
}

.btn-submit:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-cancel {
  padding: 8px 20px;
}

/* プレビュー表示 */
.report-preview {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  overflow: hidden;
}

.preview-title {
  padding: 10px 15px;
  background: var(--bg-table-header);
  color: var(--text-main);
  font-size: 14px;
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
}

.preview-content {
  display: flex;
  align-items: center;
  padding: 18px;
}

.preview-icon {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  border-radius: var(--radius-md);
  background: var(--primary-color);
  font-size: 22px;
  color: white;
}

.preview-report-name { font-size: 18px; font-weight: 700; color: var(--text-main); }
.preview-description { margin-top: 4px; color: var(--text-sub); font-size: 13px; }

/* ========================================
   8. 管理者画面 (Admin UI) 専用スタイル
======================================== */
.admin-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 15px;
}

.admin-header-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 12px;
}

.admin-header-title h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-header-title .admin-badge {
  background-color: var(--danger-color);
  color: white;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
  vertical-align: middle;
}

.admin-search-panel {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.admin-search-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  align-items: end;
}

.admin-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
}

.admin-table-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  background-color: var(--bg-table-header);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 700;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
  color: var(--text-main);
}

.admin-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.04);
}

/* ユーザー属性バッジ */
.role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: bold;
}

.role-admin { background-color: rgba(239, 68, 68, 0.2); color: #fca5a5; }
.role-user { background-color: rgba(59, 130, 246, 0.2); color: #93c5fd; }

/* 承認ステータス */
.status-pending { background-color: var(--warning-color); color: #111; }
.status-approved { background-color: var(--success-color); color: white; }
.status-rejected { background-color: var(--danger-color); color: white; }

/* 管理者アクションボタン */
.admin-btn {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  transition: all 0.15s;
}

.admin-btn-primary { background: var(--primary-color); color: white; }
.admin-btn-primary:hover { background: var(--primary-hover); }

.admin-btn-danger { background: var(--danger-color); color: white; }
.admin-btn-danger:hover { background: var(--danger-hover); }

.admin-btn-outline { background: var(--bg-card); border: 1px solid var(--border-dark); color: var(--text-main); }
.admin-btn-outline:hover { background: var(--primary-light); }

/* サマリーカード・ダッシュボード集計 */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.admin-stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.admin-stat-card .stat-title {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 6px;
}

.admin-stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-main);
}

/* ========================================
   9. レスポンシブ対応
======================================== */
@media (max-width: 950px) {
  .report-container {
    width: calc(100% - 30px);
  }
}

@media (max-width: 768px) {
  .info-bar {
    flex-wrap: wrap;
    gap: 12px 20px;
  }

  .info-divider {
    display: none;
  }

  .report-edit-page {
    overflow-x: auto;
  }

  .report-edit-page .report-table {
    min-width: 1100px;
  }
}

@media (max-width: 700px) {
  .report-container {
    width: calc(100% - 20px);
  }

  .report-table-wrapper {
    overflow-x: auto;
  }

  .report-table {
    min-width: 700px;
  }
}
  

@media (max-width: 600px) {
  .login-page {
    padding: 20px;
  }

  .login-card {
    width: 100%;
    min-height: auto;
    border-radius: var(--radius-lg);
    padding: 30px 20px;
  }

  .login-decoration-large,
  .login-decoration-small,
  .login-decoration-right {
    display: none;
  }

  .login-card h1 {
    font-size: 20px;
  }

  .login-links {
    flex-direction: column;
    align-items: center;
  }

  .new-report-select-area {
    flex-direction: column;
  }

  .new-report-card {
    width: 95%;
  }

  .admin-search-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================================================
   アカウント設定
================================================== */

.account-page {
  min-height: calc(100vh - 64px);

  padding: 40px 24px 60px;

  background: #f6f8fb;
}

.account-container {
  width: 100%;
  max-width: 850px;

  margin: 0 auto;
}


/* ==================================================
   ページヘッダー
================================================== */

.account-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 28px;
}

.account-page-header h1 {
  margin: 0;

  color: #1f2937;

  font-size: 28px;
  font-weight: 700;
}

.account-page-header p {
  margin: 7px 0 0;

  color: #6b7280;

  font-size: 14px;
}

.account-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 9px 14px;

  background: #ffffff;

  border: 1px solid #e5e7eb;
  border-radius: 8px;

  color: #4b5563;

  font-size: 13px;
  font-weight: 600;

  text-decoration: none;

  transition: 0.2s ease;
}

.account-back-link:hover {
  background: #f9fafb;

  border-color: #d1d5db;

  transform: translateY(-1px);
}


/* ==================================================
   メインカード
================================================== */

.account-card {
  overflow: hidden;

  background: #ffffff;

  border: 1px solid #e5e7eb;
  border-radius: 14px;

  box-shadow:
    0 2px 8px rgba(15, 23, 42, 0.04);
}


/* ==================================================
   カードヘッダー
================================================== */

.account-card-header {
  display: flex;
  align-items: center;

  padding: 24px 28px;

  border-bottom: 1px solid #e5e7eb;
}

.account-profile-icon {
  width: 46px;
  height: 46px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin-right: 13px;

  background: #eff6ff;

  border-radius: 10px;

  color: #2563eb;
}

.account-profile-icon svg {
  width: 24px;
  height: 24px;
}

.account-card-header h2 {
  margin: 0;

  color: #1f2937;

  font-size: 17px;
  font-weight: 700;
}

.account-card-header p {
  margin: 4px 0 0;

  color: #9ca3af;

  font-size: 12px;
}


/* ==================================================
   フォーム
================================================== */

.account-form-body {
  padding: 28px;
}

.account-form-group {
  margin-bottom: 22px;
}

.account-form-group label {
  display: block;

  margin-bottom: 7px;

  color: #374151;

  font-size: 13px;
  font-weight: 600;
}

.account-form-input {
  width: 100%;
  height: 42px;

  box-sizing: border-box;

  padding: 0 13px;

  background: #ffffff;

  border: 1px solid #d1d5db;
  border-radius: 8px;

  color: #374151;

  font-size: 13px;

  outline: none;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.account-form-input:hover {
  border-color: #9ca3af;
}

.account-form-input:focus {
  border-color: #3b82f6;

  box-shadow:
    0 0 0 3px rgba(59, 130, 246, 0.12);
}

.account-form-input::placeholder {
  color: #c1c5cc;
}

.account-form-help {
  margin: 5px 0 0;

  color: #9ca3af;

  font-size: 11px;

  line-height: 1.5;
}


/* ==================================================
   エラー
================================================== */

.account-card .alert {
  margin: 24px 28px 0;

  padding: 15px 17px;

  background: #fef2f2;

  border: 1px solid #fecaca;
  border-radius: 8px;

  color: #b91c1c;

  font-size: 12px;
}

.account-card .alert ul {
  margin: 0;

  padding-left: 18px;
}


/* ==================================================
   メールアドレス変更確認
================================================== */

.account-form-warning {
  margin: 7px 0 0;

  padding: 9px 11px;

  background: #fffbeb;

  border: 1px solid #fde68a;
  border-radius: 7px;

  color: #92400e;

  font-size: 11px;

  line-height: 1.5;
}


/* ==================================================
   セクション
================================================== */

.account-section-divider {
  height: 1px;

  margin: 30px 0;

  background: #e5e7eb;
}

.account-section-title {
  margin-bottom: 22px;
}

.account-section-title h3 {
  margin: 0;

  color: #1f2937;

  font-size: 15px;
  font-weight: 700;
}

.account-section-title p {
  margin: 5px 0 0;

  color: #9ca3af;

  font-size: 11px;
}


/* ==================================================
   注意事項
================================================== */

.account-notice {
  display: flex;
  align-items: flex-start;

  margin-top: 28px;

  padding: 16px 18px;

  background: #f8fafc;

  border: 1px solid #e5e7eb;

  border-radius: 10px;
}

.account-notice-icon {
  width: 30px;
  height: 30px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin-right: 11px;

  background: #eff6ff;

  border-radius: 50%;

  color: #2563eb;

  flex-shrink: 0;
}

.account-notice-icon svg {
  width: 17px;
  height: 17px;
}

.account-notice strong {
  display: block;

  margin-bottom: 3px;

  color: #374151;

  font-size: 12px;
}

.account-notice p {
  margin: 0;

  color: #9ca3af;

  font-size: 11px;

  line-height: 1.6;
}


/* ==================================================
   フォームフッター
================================================== */

.account-form-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;

  gap: 10px;

  padding: 20px 28px;

  background: #fafafa;

  border-top: 1px solid #e5e7eb;
}

.account-cancel-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 40px;

  padding: 0 18px;

  background: #ffffff;

  border: 1px solid #d1d5db;
  border-radius: 8px;

  color: #4b5563;

  font-size: 13px;
  font-weight: 600;

  text-decoration: none;

  transition: 0.2s;
}

.account-cancel-button:hover {
  background: #f3f4f6;

  border-color: #cbd5e1;
}

.account-submit-button {
  height: 40px;

  padding: 0 22px;

  background: #2563eb;

  border: none;
  border-radius: 8px;

  color: #ffffff;

  font-size: 13px;
  font-weight: 600;

  cursor: pointer;

  transition: 0.2s;
}

.account-submit-button:hover {
  background: #1d4ed8;

  box-shadow:
    0 4px 10px rgba(37, 99, 235, 0.18);
}

.account-submit-button:active {
  transform: translateY(1px);
}


/* ==================================================
   アカウント削除
================================================== */

.account-danger-card {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;

  margin-top: 20px;

  padding: 20px 22px;

  background: #ffffff;

  border: 1px solid #fee2e2;
  border-radius: 12px;
}

.account-danger-content {
  display: flex;
  align-items: center;

  min-width: 0;
}

.account-danger-icon {
  width: 38px;
  height: 38px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin-right: 12px;

  background: #fff1f2;

  border-radius: 9px;

  color: #dc3545;

  flex-shrink: 0;
}

.account-danger-icon svg {
  width: 19px;
  height: 19px;
}

.account-danger-content h3 {
  margin: 0;

  color: #374151;

  font-size: 13px;
  font-weight: 700;
}

.account-danger-content p {
  margin: 4px 0 0;

  color: #9ca3af;

  font-size: 11px;
}

.account-danger-button {
  flex-shrink: 0;

  height: 38px;

  padding: 0 15px;

  background: #ffffff;

  border: 1px solid #fca5a5;
  border-radius: 8px;

  color: #dc3545;

  font-size: 12px;
  font-weight: 600;

  cursor: pointer;

  transition: 0.2s;
}

.account-danger-button:hover {
  background: #fff1f2;

  border-color: #f87171;
}


/* ==================================================
   スマホ
================================================== */

@media (max-width: 600px) {

  .account-page {
    padding: 24px 12px 40px;
  }

  .account-page-header {
    flex-direction: column;
    align-items: stretch;

    gap: 15px;
  }

  .account-page-header h1 {
    font-size: 23px;
  }

  .account-page-header p {
    font-size: 13px;

    line-height: 1.6;
  }

  .account-back-link {
    justify-content: center;
  }

  .account-card-header {
    padding: 20px;
  }

  .account-form-body {
    padding: 22px 20px;
  }

  .account-form-footer {
    padding: 16px 20px;

    flex-direction: column-reverse;
  }

  .account-cancel-button,
  .account-submit-button {
    width: 100%;
  }

  .account-danger-card {
    align-items: stretch;

    flex-direction: column;
  }

  .account-danger-button {
    width: 100%;
  }
}

.main-header {
  position: sticky; /* スクロール時に画面上部に固定 */
  top: 0;           /* 上端に張り付く位置 */
  z-index: 1000;    /* コンテンツより前面に表示 */
  
  /* 背景色と影（スクロール時に下のコンテンツが透けないように指定） */
  background-color: #ffffff; 
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ========================================
   フォームエラーメッセージ
======================================== */

.form-error-box {
  margin-bottom: 24px;
  padding: 18px 20px;

  border: 1px solid rgba(220, 53, 69, 0.35);
  border-radius: 12px;

  background: rgba(220, 53, 69, 0.07);

  color: var(--text-color, #333);

  animation: errorMessageAppear 0.25s ease-out;
}

.form-error-header {
  display: flex;
  align-items: center;
  gap: 12px;

  margin-bottom: 12px;
}

.form-error-icon {
  flex: 0 0 auto;

  width: 34px;
  height: 34px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: #dc3545;
  color: #fff;

  font-size: 18px;
  font-weight: 700;
}

.form-error-header h3 {
  margin: 0 0 3px;

  font-size: 15px;
  font-weight: 700;

  color: #c82333;
}

.form-error-header p {
  margin: 0;

  font-size: 13px;

  color: #777;
}

.form-error-list {
  margin: 0;
  padding: 12px 14px;

  list-style: none;

  border-radius: 8px;

  background: rgba(220, 53, 69, 0.05);
}

.form-error-list li {
  display: flex;
  align-items: flex-start;

  gap: 4px;

  margin: 5px 0;

  font-size: 14px;
  line-height: 1.6;

  color: #555;
}

.form-error-bullet {
  flex-shrink: 0;

  color: #dc3545;
  font-weight: 700;
}


/* 表示アニメーション */

@keyframes errorMessageAppear {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   承認通知アイコン
======================================== */

.approval-notification:hover {
  background: var(--primary-light);
  color: var(--primary-color);
}

.notification-icon {
  width: 22px;
  height: 22px;
}yy

/* ========================================
   承認一覧画面
======================================== */

.approvals-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 24px 48px;
}

.approvals-page h1 {
  margin: 0 0 24px;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
}

/* 承認カード */
.approval-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

/* 一覧のカードタイトル */
.approvals-page .approval-card h2 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

/* カード内の情報 */
.approval-card p {
  margin: 8px 0;
  color: var(--text-sub);
  font-size: 14px;
}

/* 状態 */
.approval-card p:last-of-type {
  color: var(--warning-color);
  font-weight: 600;
}

/* 確認するボタン */
.approval-card a {
  display: inline-block;
  margin-top: 14px;
  padding: 9px 18px;

  background: var(--primary-color);
  color: #ffffff;

  border-radius: var(--radius-md);

  font-size: 13px;
  font-weight: 600;
  text-decoration: none;

  transition: 0.2s ease;
}

.approval-card a:hover {
  background: var(--primary-hover);
}


/* ========================================
   承認詳細画面
======================================== */

.approval-detail-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 24px 48px;
}

.approval-detail-page h1 {
  margin: 0 0 24px;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
}

/* 詳細カード */
.approval-detail-page .approval-card {
  padding: 28px;
}

/* 詳細タイトル */
.approval-detail-page .approval-card h2 {
  margin: 0 0 20px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
}

/* 詳細情報 */
.approval-detail-page .approval-card p {
  margin: 12px 0;
  font-size: 14px;
  color: var(--text-sub);
}

/* 承認状態 */
.approval-detail-page .approval-card p:nth-of-type(2) {
  font-weight: 600;
}

/* 区切り線 */
.approval-detail-page .approval-card hr {
  margin: 24px 0;
  border: none;
  border-top: 1px solid var(--border-color);
}

/* 作業報告書を確認する */
.approval-detail-page .approval-card > a {
  display: inline-block;
  margin-bottom: 24px;

  color: var(--primary-color);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.approval-detail-page .approval-card > a:hover {
  text-decoration: underline;
}


/* ========================================
   承認・差し戻しボタン
======================================== */

.approval-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

/* button_to が作るフォーム */
.approval-actions form {
  margin: 0;
}

/* ボタン共通 */
.approval-actions button {
  min-width: 120px;
  padding: 11px 20px;

  border: none;
  border-radius: var(--radius-md);

  font-size: 14px;
  font-weight: 600;

  cursor: pointer;
  transition: 0.2s ease;
}

/* 承認する */
.approval-actions form:first-child button {
  background: var(--success-color);
  color: #ffffff;
}

.approval-actions form:first-child button:hover {
  background: var(--success-hover);
}

/* 差し戻す */
.approval-actions form:last-child button {
  background: var(--danger-color);
  color: #ffffff;
}

.approval-actions form:last-child button:hover {
  background: var(--danger-hover);
}


/* ========================================
   承認画面 スマホ対応
======================================== */

@media (max-width: 700px) {

  .approvals-page,
  .approval-detail-page {
    padding: 24px 16px 40px;
  }

  .approvals-page h1,
  .approval-detail-page h1 {
    font-size: 21px;
  }

  .approval-card {
    padding: 18px;
  }

  .approval-detail-page .approval-card {
    padding: 20px;
  }

  .approval-actions {
    flex-direction: column;
  }

  .approval-actions button {
    width: 100%;
  }

}

.btn-approval-show {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 8px 14px;

  background: var(--primary-color);
  color: #ffffff;

  border-radius: var(--radius-md);

  font-size: 13px;
  font-weight: 600;
  text-decoration: none;

  transition: 0.2s ease;
}

/* ========================================
   承認画面：作業報告書確認ボタン
======================================== */

.approval-report-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 11px 18px;

  background: var(--primary-light);
  color: var(--primary-color);

  border: 1px solid var(--primary-color);
  border-radius: var(--radius-md);

  font-size: 14px;
  font-weight: 600;
  text-decoration: none;

  transition: 0.2s ease;
}

.approval-report-button svg {
  flex-shrink: 0;
}

.approval-report-button:hover {
  background: var(--primary-color);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.approval-report-button:active {
  transform: translateY(0);
}
/* 作業報告書を確認するボタン */
.approval-report-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 11px 18px;

  background: var(--primary-color) !important;
  color: #ffffff !important;

  border: 1px solid var(--primary-color);
  border-radius: var(--radius-md);

  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;

  transition: 0.2s ease;
}

.approval-report-button svg {
  color: #ffffff !important;
  flex-shrink: 0;
}

.approval-report-button:hover {
  background: var(--primary-hover) !important;
  color: #ffffff !important;

  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.approval-report-button:hover svg {
  color: #ffffff !important;
}

.approval-report-button:active {
  transform: translateY(0);
}

/* ========================================
   承認待ち一覧
======================================== */
.ap-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 28px 24px 48px;
  box-sizing: border-box;
  color: #1c2533;
}

.ap-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.ap-head h1 { margin: 0; font-size: 24px; font-weight: 700; }
.ap-count {
  padding: 4px 12px;
  background: #fff1d6;
  border-radius: 999px;
  color: #8a4b00;
  font-size: 13px;
  font-weight: 700;
}

.ap-list { display: flex; flex-direction: column; gap: 10px; }

.ap-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(20, 50, 100, 0.06);
  color: inherit;
  text-decoration: none;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.ap-item:hover {
  box-shadow: 0 4px 14px rgba(20, 50, 100, 0.12);
  transform: translateY(-1px);
}
.ap-item:focus-visible { outline: 2px solid #0b5cd5; outline-offset: 2px; }

.ap-avatar {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e8f1fe;
  border-radius: 50%;
  color: #0b5cd5;
  font-size: 16px;
  font-weight: 700;
}

.ap-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 14px;
}
.ap-name  { font-size: 16px; }
.ap-month { color: #344256; font-size: 15px; font-weight: 700; }
.ap-date  { flex-basis: 100%; color: #566176; font-size: 12px; }

.ap-go {
  flex-shrink: 0;
  height: 40px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  background: #0b5cd5;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.ap-item:hover .ap-go { background: #08408f; }

.ap-empty {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 56px 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(20, 50, 100, 0.06);
  color: #566176;
  font-size: 13px;
  text-align: center;
}
.ap-empty b { color: #344256; font-size: 15px; }

@media (max-width: 600px) {
  .ap-page { padding: 20px 12px 40px; }
  .ap-head h1 { font-size: 20px; }
  .ap-item { flex-wrap: wrap; padding: 14px 16px; }
  .ap-go { width: 100%; justify-content: center; height: 44px; }
}
/* ========================================
   作業報告書 編集画面(日別リスト + 入力パネル)
======================================== */

.day-editor {
  --de-primary: #0b5cd5;
  --de-border: #d5dce8;
  --de-muted: #566176;

  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 32px 100px;
  box-sizing: border-box;
  color: #1c2533;
}

.de-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(20, 50, 100, 0.06);
}

/* ---------- 上部 ---------- */
.de-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-bottom: 16px;
}
.de-top-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.de-back {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid var(--de-border);
  border-radius: 8px;
  color: #3d4a5c;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.de-back:hover { background: #f5f8fc; }
.de-title { margin: 0; font-size: 22px; font-weight: 700; }
.de-status {
  padding: 4px 12px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-size: 12px;
  font-weight: 700;
}
.de-status.is-draft { background: #fff1d6; color: #8a4b00; }
.de-stats {
  display: flex;
  gap: 20px;
  color: var(--de-muted);
  font-size: 13px;
}
.de-stats b {
  margin: 0 2px;
  color: #1c2533;
  font-size: 18px;
}

/* ---------- 2カラム ---------- */
.de-body {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 16px;
  align-items: start;
}

/* ---------- 日別リスト ---------- */
.de-list {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 180px);
  overflow: hidden;
}
.de-list-title {
  padding: 14px 16px;
  border-bottom: 1px solid #e5e9f0;
  font-size: 14px;
  font-weight: 700;
}
.de-list-items { overflow-y: auto; }

.de-day {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  box-sizing: border-box;
  background: #fff;
  border: 0;
  border-top: 1px solid #eef1f6;
  border-left: 4px solid transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.de-day:first-child { border-top: 0; }
.de-day:hover { background: #f6f9ff; }
.de-day.is-off { background: #f6f8fb; }
.de-day.is-selected {
  background: #e8f1fe;
  border-left-color: var(--de-primary);
}
.de-day:focus-visible {
  outline: 2px solid var(--de-primary);
  outline-offset: -2px;
}

.de-day-label {
  display: flex;
  align-items: baseline;
  gap: 2px;
  width: 56px;
  font-weight: 700;
}
.de-day-wd { margin-left: 6px; }
.de-day.is-sun .de-day-label { color: #d12f3a; }
.de-day.is-sat .de-day-label { color: var(--de-primary); }

.de-day-summary {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: #6b7689;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.de-day.is-filled .de-day-summary { color: var(--de-muted); }
.de-day.is-selected .de-day-summary { color: var(--de-primary); font-weight: 700; }

.de-day-hours {
  width: 40px;
  font-size: 13px;
  text-align: right;
}
.de-today-badge {
  padding: 2px 8px;
  background: var(--de-primary);
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
}
.de-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  background: #d5dce8;
  border-radius: 50%;
}
.de-day.is-filled .de-dot { background: #0e7a4f; }

/* ---------- 入力パネル ---------- */
.de-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px 28px;
}
.de-panel[hidden] { display: none; }

.de-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.de-panel-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.de-panel-date { font-size: 26px; font-weight: 700; }
.de-panel-hours { color: var(--de-muted); font-size: 13px; }
.de-panel-hours b { color: #0e7a4f; font-size: 20px; }

.de-nav-btns { display: flex; gap: 8px; }
.de-nav-btn {
  height: 40px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid var(--de-border);
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.de-nav-btn:hover { background: #f5f8fc; }

.de-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.de-chip {
  flex-shrink: 0;
  height: 40px;
  padding: 0 16px;
  background: #f2f7ff;
  border: 1px solid #c9d8f2;
  border-radius: 20px;
  color: var(--de-primary);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.de-chip:hover { background: #e4eeff; }
.de-chip.is-plain {
  background: #fff;
  border-color: var(--de-border);
  color: #3d4a5c;
}

.de-times {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.de-label {
  display: block;
  margin-bottom: 6px;
  color: var(--de-muted);
  font-size: 12px;
  font-weight: 700;
}
.de-input,
.de-textarea {
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid var(--de-border);
  border-radius: 10px;
  color: #1c2533;
  font: inherit;
}
.de-input { height: 48px; padding: 0 14px; font-size: 18px; }
.de-input-sm { height: 44px; font-size: 15px; }
.de-textarea {
  min-height: 140px;
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.6;
  resize: vertical;
}
.de-input:hover,
.de-textarea:hover { border-color: var(--de-primary); }
.de-input:focus,
.de-textarea:focus {
  outline: none;
  border-color: var(--de-primary);
  box-shadow: 0 0 0 3px rgba(11, 92, 213, 0.15);
}

/* ---------- 下部の固定バー ---------- */
.de-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid #e5e9f0;
  box-shadow: 0 -2px 8px rgba(20, 50, 100, 0.06);
}
.de-footer-inner {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  max-width: 1200px;
  margin: 0 auto;
}
.de-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 28px;
  box-sizing: border-box;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.de-btn-ghost { background: #fff; border: 1px solid var(--de-border); color: #3d4a5c; }
.de-btn-ghost:hover { background: #f5f8fc; }
.de-btn-primary { padding: 0 36px; background: var(--de-primary); border: 0; color: #fff; }
.de-btn-primary:hover { background: #08408f; }

/* ========================================
   スマホ:日別リスト → 上部の日付ストリップ
======================================== */
@media (max-width: 760px) {
  .day-editor { padding: 12px 12px 100px; }
  .de-title { font-size: 18px; }
  .de-stats { gap: 14px; }

  .de-body { display: block; }

  .de-list {
    position: sticky;
    top: 64px;
    z-index: 20;
    max-height: none;
    margin: 0 -12px 12px;
    overflow: visible;
    border-radius: 0;
  }
  .de-list-title { display: none; }
  .de-list-items {
    display: flex;
    padding: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
  }

  .de-day {
    flex: 0 0 52px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    min-height: 0;
    padding: 8px 0;
    border: 0;
    border-radius: 12px;
    scroll-snap-align: center;
  }
  .de-day:first-child { border-top: 0; }
  .de-day.is-selected { background: var(--de-primary); }
  .de-day.is-today { box-shadow: inset 0 0 0 2px #bcd4fb; }

  .de-day-label {
    flex-direction: column-reverse;
    align-items: center;
    gap: 2px;
    width: auto;
  }
  .de-day-num { font-size: 17px; }
  .de-day-unit,
  .de-day-summary,
  .de-day-hours,
  .de-today-badge { display: none; }
  .de-day-wd { margin: 0; font-size: 11px; font-weight: 500; }

  .de-day.is-selected .de-day-label { color: #fff; }
  .de-day.is-selected .de-dot { background: #fff; }

  .de-panel { padding: 16px; gap: 16px; }
  .de-panel-date { font-size: 22px; }

  .de-quick {
    flex-wrap: nowrap;
    margin: 0 -16px;
    padding: 0 16px;
    overflow-x: auto;
  }

  .de-times { grid-template-columns: 1fr 1fr; gap: 12px; }
  .de-input { height: 52px; font-size: 20px; }
  .de-input-sm { height: 48px; font-size: 16px; }
  .de-textarea { min-height: 110px; font-size: 16px; }

  .de-footer-inner { justify-content: stretch; }
  .de-btn { flex: 1; height: 52px; padding: 0; }
  .de-btn-primary { flex: 1.4; }
}

/* 祝日バッジ */
.de-holiday-badge {
  padding: 3px 10px;
  background: #fde8ea;
  border-radius: 999px;
  color: #b4232f;
  font-size: 12px;
  font-weight: 700;
}

/* 祝日名(「休み」と区別する) */
.de-day-summary.is-holiday-name {
  color: #b4232f;
}
.de-day.is-selected .de-day-summary.is-holiday-name {
  color: var(--de-primary);   /* 選択中は、他の日と同じ青にそろえる */
}

/* ==================================================
   作業報告書 共通スタイル
   ================================================== */

.report-edit-page,
.report-show-page {
  padding: 20px;
  padding-bottom: 90px !important;
}

.report-table th,
.report-table td {
  vertical-align: middle;
}

.header-action-bar {
  flex-wrap: wrap;
  gap: 10px;
}

.info-card {
  width: 100%;
}


/* ==================================================
   テーブル
   ================================================== */

.table-card,
.table-responsive,
.table-scroll-container {
  overflow: visible !important;
}

.report-table thead {
  position: sticky !important;
  top: 40px !important;
  z-index: 1000 !important;
}

.report-table thead th {
  position: sticky !important;
  top: 40px !important;
  z-index: 1001 !important;
  background-color: #f8fafc !important;
  box-shadow:
    inset 0 -1px 0 #cbd5e1,
    inset 0 1px 0 #cbd5e1 !important;
}

.report-table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
}


/* ==================================================
   今日
   ================================================== */

tr.today-row,
tr.today-row > td {
  background-color: #e3f2fd !important;
}

tr.today-row > td {
  border-top: 2px solid #90caf9 !important;
  border-bottom: 2px solid #90caf9 !important;
}

tr.today-row > td:first-child {
  border-left: 4px solid #1976d2 !important;
}

.today-badge {
  font-size: 0.7rem;
  padding: 0.2em 0.5em;
  margin-left: 4px;
  vertical-align: middle;
}


/* ==================================================
   曜日・休日
   ================================================== */

.text-red {
  color: #dc3545 !important;
  font-weight: bold;
}

.text-blue {
  color: #0d6efd !important;
  font-weight: bold;
}

.bg-red,
.bg-red > td {
  background-color: #fde8e8 !important;
}

.bg-blue,
.bg-blue > td {
  background-color: #e7f1ff !important;
}


/* ==================================================
   固定フッター
   ================================================== */

.fixed-footer-bar {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100vw !important;
  max-width: 100% !important;

  background-color: #ffffff !important;
  border-top: 1px solid #e2e8f0;

  box-shadow:
    0 -4px 20px rgba(0, 0, 0, 0.08) !important;

  z-index: 9999 !important;
  padding-left: 24px !important;
}

.summary-wrapper {
  display: flex !important;
  align-items: center !important;
  gap: 24px !important;
  white-space: nowrap !important;
}

.summary-card-item {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.summary-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
}

.summary-badge {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.bg-light-gray {
  background-color: #f1f5f9;
  color: #334155;
}

.bg-light-primary {
  background-color: #eff6ff;
  color: #2563eb;
}

.bg-light-danger {
  background-color: #fef2f2;
  color: #dc2626;
}


/* ==================================================
   ボタン
   ================================================== */

.action-buttons {
  white-space: nowrap !important;
  margin-left: 32px !important;
}

.btn-custom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  padding: 8px 20px;
  font-size: 0.875rem;
  font-weight: 600;

  border-radius: 8px;
  text-decoration: none;

  transition: all 0.2s ease-in-out;
  cursor: pointer;
  border: none;
}

.btn-cancel-custom {
  background-color: #f8fafc;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

.btn-cancel-custom:hover {
  background-color: #f1f5f9;
  color: #334155;
  border-color: #94a3b8;
}

.btn-edit-custom {
  background-color: #f8fafc;
  color: #3b82f6;
  border: 1px solid #93c5fd;
}

.btn-edit-custom:hover {
  background-color: #eff6ff;
  color: #1d4ed8;
  border-color: #3b82f6;
}

.btn-submit-custom {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.btn-submit-custom:hover {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
  color: #ffffff;
}

.btn-submit-custom:active {
  transform: translateY(0);
}
/* ========================================
   作業報告書 閲覧画面(.report-view)
   ※ .de-* は day_editor.css を再利用
======================================== */

/* 状態バッジ・ボタンの追加バリエーション */
.de-status.is-submitted { background: #e0ecff; color: #1d4ed8; }

.de-btn-danger {
  background: #fff;
  border: 1px solid #f2b5b5;
  color: #c62833;
}
.de-btn-danger:hover { background: #fff1f2; }

.rv-btn-excel {
  background: #fff;
  border: 1px solid #9fd3b6;
  color: #14663a;
}
.rv-btn-excel:hover { background: #eefaf3; }

/* button_to が作る form をバーの中で崩さない */
.de-footer-inner form { display: flex; margin: 0; }

/* ---------- 基本情報・お知らせ ---------- */
.rv-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  margin-bottom: 16px;
  color: var(--de-muted);
  font-size: 13px;
}
.rv-meta b { color: #1c2533; }

.rv-notice {
  margin-bottom: 16px;
  padding: 12px 16px;
  background: #eef5ff;
  border: 1px solid #c9d8f2;
  border-radius: 10px;
  color: #1d4ed8;
  font-size: 14px;
  font-weight: 700;
}

/* ---------- 一覧(PC) ---------- */
.rv-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(20, 50, 100, 0.06);
}

.rv-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

.rv-table th {
  position: sticky;
  top: 64px;               /* ヘッダーの高さ */
  z-index: 5;
  height: 44px;
  padding: 0 12px;
  background: #e8f1fe;
  color: #344256;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}
.rv-table th:first-child { border-radius: 12px 0 0 0; }
.rv-table th:last-child  { border-radius: 0 12px 0 0; }

.rv-c-day  { width: 56px; }
.rv-c-wd   { width: 56px; }
.rv-c-time { width: 84px; text-align: center !important; }
.rv-c-note { width: 200px; }

.rv-table td {
  padding: 10px 12px;
  border-top: 1px solid #eef1f6;
  vertical-align: top;
}

.rv-day,
.rv-wd { font-weight: 700; }
.rv-time { text-align: center; }
.rv-hours { font-weight: 700; }

.rv-content,
.rv-note {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
}

.rv-dim { color: #b0b8c6; }
.rv-range { display: none; }

.rv-row.is-sun td { background: #fff8f8; }
.rv-row.is-sat td { background: #f6faff; }
.rv-row.is-sun .rv-day, .rv-row.is-sun .rv-wd { color: #d12f3a; }
.rv-row.is-sat .rv-day, .rv-row.is-sat .rv-wd { color: var(--de-primary); }

.rv-row.is-today td { background: #e8f1fe; }
.rv-row.is-today .rv-day { box-shadow: inset 4px 0 0 var(--de-primary); }

.rv-row.is-blank td { padding-top: 7px; padding-bottom: 7px; }

.rv-hol {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 8px;
  background: #fde8ea;
  border-radius: 999px;
  color: #b4232f;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- スマホ:1日 = 1枚のカード ---------- */
@media (max-width: 760px) {
  .rv-card { background: transparent; box-shadow: none; }

  .rv-table,
  .rv-table tbody { display: block; }

  .rv-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .rv-table .rv-row {
    display: grid;
    grid-template-columns: 26px 26px 1fr auto;
    grid-template-areas:
      "day wd range hours"
      "content content content content"
      "note note note note";
    column-gap: 6px;
    row-gap: 8px;
    align-items: baseline;
    margin-bottom: 8px;
    padding: 12px 14px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(20, 50, 100, 0.06);
  }
  .rv-table .rv-row.is-blank { padding-top: 8px; padding-bottom: 8px; }
  .rv-table .rv-row.is-today { background: #e8f1fe; }
  .rv-table .rv-row.is-sun   { background: #fff8f8; }
  .rv-table .rv-row.is-sat   { background: #f6faff; }
  .rv-row.is-today .rv-day { box-shadow: none; }

  .rv-table .rv-row td {
    display: block;
    padding: 0;
    background: transparent !important;
    border: 0;
  }

  .rv-day { grid-area: day; font-size: 17px; }
  .rv-wd  { grid-area: wd; }
  .rv-range {
    display: block;
    grid-area: range;
    color: #344256;
    font-size: 14px;
  }
  .rv-sub {
    margin-left: 6px;
    color: var(--de-muted);
    font-size: 11px;
  }
  .rv-hours   { grid-area: hours; font-size: 15px; }
  .rv-content { grid-area: content; font-size: 14px; }
  .rv-note {
    grid-area: note;
    justify-self: start;
    padding: 2px 10px !important;
    background: #f1f5f9 !important;
    border-radius: 999px;
    color: #344256;
    font-size: 12px;
  }

  /* PC用の個別セルは隠す */
  .rv-start, .rv-end, .rv-break, .rv-ot { display: none !important; }
  .rv-hide { display: none !important; }
}
/* ========================================
  作業報告書 一覧ページ
  （ダッシュボードと統一したデザイントークン）
======================================== */

.work-report-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #eaf3ff 0%, #dceeff 100%);
  font-family: "Yu Gothic", sans-serif;
  color: #333;
  box-sizing: border-box;
}

/* シェアードレイアウト（header + sidebar）を使う場合に合わせる想定の余白 */
.work-report-page .report-container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px 32px 40px;
  box-sizing: border-box;
}

/* ---------- タイトル部分 ---------- */
.report-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.report-heading h1 {
  margin: 0;
  color: #1f2937;
  font-size: 24px;
  font-weight: 800;
}

.new-report-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 20px;
  background: #0875f5;
  color: #fff;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(8, 117, 245, 0.25);
  transition: 0.2s;
}

.new-report-button:hover {
  background: #0669dc;
}

.year-form {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* ---------- 年度フィルター ---------- */
.report-filter-area {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.current-year {
  font-size: 15px;
  font-weight: 700;
  color: #1f2937;
}

.year-select {
  width: 140px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  background: #ffffff;
  color: #4b5563;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  transition: 0.15s;
}

.year-select:hover {
  border-color: #b3d8ff;
}

.year-select:focus {
  border-color: #0875f5;
  box-shadow: 0 0 0 3px rgba(8, 117, 245, 0.12);
}

/* ---------- 一覧テーブルカード ---------- */
.report-table-wrapper {
  background: #ffffff;
  border-radius: 12px;
  overflow: visible;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: #ffffff;
}

.report-table thead {
  background: #f3f6fa;
}

.report-table th {
  height: 46px;
  padding: 0 16px;
  color: #4b5563;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  box-sizing: border-box;
}

.reports-actions {
  text-align: center;
}

/* 列幅 */
.month-column {
  width: 25%;
}

.status-column {
  width: 14%;
  text-align: center !important;
}

.date-column {
  width: 21%;
}

.action-column {
  width: 40%;
  text-align: center !important;
}

.report-table td {
  height: 58px;
  padding: 0 16px;
  border-top: 1px solid #eef0f3;
  font-size: 14px;
  color: #333;
  box-sizing: border-box;
}

.report-table tbody tr:hover {
  background: #fafcff;
}

.report-month {
  font-weight: 700;
  color: #1f2937;
}

.updated-date {
  color: #94a3b8;
  font-size: 13px;
}

.empty-report {
  height: 120px !important;
  text-align: center;
  color: #9ca3af;
}

/* ---------- ステータスバッジ ---------- */
.status-badge {
  display: inline-flex;
  min-width: 68px;
  height: 26px;
  padding: 0 10px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  box-sizing: border-box;
}

.status-draft {
  background: #ffedd5;
  color: #d97706;
}

.status-submitted {
  background: #d9f7e4;
  color: #198754;
}

.status-not-created {
  background: #eef0f3;
  color: #6b7280;
}

.status-default {
  background: #e5e7eb;
  color: #4b5563;
}

/* ---------- 操作ボタン群 ---------- */
.report-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: nowrap;
  text-align: center;
}

.report-actions form {
  display: inline-block;
  margin: 0;
}

.report-actions button,
.report-actions input[type="submit"] {
  cursor: pointer;
}

.action-button {
  min-width: 56px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  box-sizing: border-box;
  transition: 0.15s;
  border: 1px solid transparent;
}

.edit-button {
  background: #0875f5;
  color: #ffffff;
}

.edit-button:hover {
  background: #0669dc;
}

.show-button {
  background: #6C757D;
  color: #ffffff;
  border-color: #0875f5;
}
.show-button:hover {
  background: #575f6a;
}
.submit-button {
  background: #10b981;
  color: #ffffff;
}

.submit-button:hover {
  background: #059669;
}

.confirm-button {
  background: #ffffff;
  color: #0875f5;
  border-color: #0875f5;
}

.confirm-button:hover {
  background: #eef6ff;
}

.excel-button {
  background: #198754;
  color: #ffffff;
}

.excel-button:hover {
  background: #157347;
}

.print-button {
  background: #6b7280;
  color: #ffffff;
}

.print-button:hover {
  background: #575f6a;
}

.delete-button {
  background: #ffffff;
  color: #dc3545;
  border-color: #f2b5b5;
}

.delete-button:hover {
  background: #fdeaea;
}

/* ---------- 新規作成モーダル（アニメーション対応） ---------- */
.modal-overlay {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.45);
  z-index: 9999;
  align-items: center;
  justify-content: center;

  /* 開閉アニメーションの設定 */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.new-report-modal {
  width: 460px;
  max-width: 90%;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  overflow: hidden;

  /* モーダル本体のフェード・拡大アニメーション設定 */
  transform: scale(0.92) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .new-report-modal {
  transform: scale(1) translateY(0);
}

.new-report-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: #0875f5;
  color: #ffffff;
}

.new-report-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.modal-close-button {
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  opacity: 0.9;
}

.modal-close-button:hover {
  opacity: 1;
}

.new-report-modal-body {
  padding: 28px;
}

.modal-description {
  margin: 0 0 22px;
  color: #6b7280;
  font-size: 14px;
}

.modal-form-group {
  margin-bottom: 18px;
}

.modal-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: #1f2937;
  font-size: 14px;
}

.modal-form-group select,
.modal-form-group .form-select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #dcdfe6;
  border-radius: 8px;
  font-size: 14px;
  color: #333;
  background: #ffffff;
  box-sizing: border-box;
  transition: 0.15s;
}

.modal-form-group select:focus,
.modal-form-group .form-select:focus {
  border-color: #0875f5;
  outline: none;
  box-shadow: 0 0 0 3px rgba(8, 117, 245, 0.12);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 26px;
}

.modal-actions .btn-secondary {
  height: 40px;
  padding: 0 20px;
  background: #ffffff;
  color: #4b5563;
  border: 1px solid #dcdfe6;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.15s;
}

.modal-actions .btn-secondary:hover {
  background: #f5f7fa;
}

.modal-actions .btn-primary {
  height: 40px;
  padding: 0 24px;
  background: #0875f5;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(8, 117, 245, 0.25);
  transition: 0.2s;
}

.modal-actions .btn-primary:hover {
  background: #0669dc;
}

/* ---------- レスポンシブ対応 ---------- */
@media (max-width: 950px) {
  .work-report-page .report-container {
    padding: 20px 16px 30px;
  }
}

@media (max-width: 700px) {
  .report-heading h1 {
    font-size: 20px;
  }

  .report-table-wrapper {
    overflow-x: auto;
  }

  .report-table {
    min-width: 780px;
  }

  .new-report-modal {
    width: 92%;
  }
}
/* ========================================
   その他操作メニュー
======================================== */

/* 操作欄 */
.report-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: nowrap;
}

/* Railsのbutton_toによって生成されるform */
.report-actions form {
  display: inline-flex;
  margin: 0;
}

/* ボタン共通 */
.report-actions button,
.report-actions input[type="submit"] {
  cursor: pointer;
}


/* ---------- 3点メニューボタン ---------- */

.report-more-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.more-menu-button {
  width: 32px;
  height: 32px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0;

  background: #ffffff;
  color: #64748b;

  border: 1px solid #d9dee7;
  border-radius: 7px;

  cursor: pointer;

  font-size: 22px;
  font-weight: 700;
  line-height: 1;

  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.more-menu-button:hover {
  background: #f5f8fc;
  border-color: #b8c2d1;
  color: #334155;
}

.more-menu-button:focus {
  outline: none;
  border-color: #0875f5;
  box-shadow: 0 0 0 3px rgba(8, 117, 245, 0.12);
}


/* ---------- ドロップダウン ---------- */

.more-menu-dropdown {
  position: absolute;

  top: calc(100% + 7px);
  right: 0;

  width: 170px;

  padding: 6px;

  background: #ffffff;

  border: 1px solid #e5e7eb;
  border-radius: 10px;

  box-shadow:
    0 10px 30px rgba(15, 23, 42, 0.14),
    0 2px 8px rgba(15, 23, 42, 0.06);

  z-index: 1000;

  /* 初期状態 */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px) scale(0.97);

  transform-origin: top right;

  transition:
    opacity 0.15s ease,
    visibility 0.15s ease,
    transform 0.15s ease;
}


/* 開いた状態 */
.report-more-menu.is-open .more-menu-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* ---------- メニュー項目 ---------- */

.more-menu-item {
  width: 100%;
  min-height: 38px;

  display: flex;
  align-items: center;

  gap: 10px;

  padding: 0 11px;

  box-sizing: border-box;

  background: transparent;

  border: none;
  border-radius: 7px;

  color: #374151;

  font-family: inherit;
  font-size: 13px;
  font-weight: 600;

  text-decoration: none;

  cursor: pointer;

  text-align: left;

  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.more-menu-item:hover {
  background: #f3f6fa;
  color: #1f2937;
}


/* アイコン */
.more-menu-icon {
  width: 20px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: #64748b;

  font-size: 14px;
}


/* 区切り線 */
.more-menu-divider {
  height: 1px;

  margin: 5px 4px;

  background: #edf0f3;
}


/* ---------- 削除 ---------- */

.more-menu-delete {
  color: #dc3545;
}

.more-menu-delete .more-menu-icon {
  color: #dc3545;
}

.more-menu-delete:hover {
  background: #fff1f2;
  color: #dc3545;
}


/* ---------- メニュー内のform ---------- */

.more-menu-dropdown form {
  width: 100%;
  margin: 0;
}


/* ---------- テーブルからメニューが切れないようにする ---------- */

.report-table-wrapper {
  overflow: visible;
}

.report-table {
  overflow: visible;
}

.report-table tbody,
.report-table tr,
.report-table td {
  overflow: visible;
}


/* ---------- レスポンシブ ---------- */

@media (max-width: 700px) {

  .more-menu-dropdown {
    right: 0;
    width: 160px;
  }

  .more-menu-button {
    width: 34px;
    height: 34px;
  }

}
/* ========================================
   報告書行クリック
======================================== */

.report-row {
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}

.report-row:hover {
  background: #f7fbff !important;
}

.report-row:active {
  background: #eef6ff !important;
}


/* 操作ボタン周辺は通常の操作感を維持 */
.report-row .report-actions {
  cursor: default;
}


/* キーボード操作用 */
.report-row:focus {
  outline: none;
}

.report-row:focus-visible {
  outline: 2px solid #0875f5;
  outline-offset: -2px;
}

/* 列幅の調整 */
.month-column {
  width: 30%; /* 25% → 30% に拡大 */
}

.status-column {
  width: 18%; /* 14% → 18% に拡大 */
  text-align: center !important;
}

.date-column {
  width: 27%; /* 21% → 27% に拡大 */
}

.action-column {
  width: 25%; /* 40% → 25% に縮小して余白を詰める */
  text-align: left !important; /* right → left に変更 */
}

/* ---------- エラーメッセージ ---------- */

.report-alert {
  margin-bottom: 16px;
  padding: 12px 16px;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  color: #dc2626;
  font-size: 14px;
  font-weight: 600;
  box-sizing: border-box;
}
/* 提出取消ボタン */
.cancel-submission-button {
  background: #fff;
  color: #dc3545;
  border: 1px solid #f2b5b5;
}

.cancel-submission-button:hover {
  background: #fff1f2;
  color: #dc3545;
}
/* ========================================
   ホーム画面リデザイン
======================================== */

/* あいさつ */
.report-greeting {
  margin-bottom: 20px;
}
.report-greeting h1 {
  margin: 0;
  color: #1f2937;
  font-size: 24px;
  font-weight: 800;
}
.report-greeting p {
  margin: 6px 0 0;
  color: #566176;
  font-size: 14px;
}

/* 今月の報告書カード */
.current-report-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
  padding: 24px 28px;
  background: #ffffff;
  border: 1px solid #cfe2fb;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}
.current-report-label {
  color: #0875f5;
  font-size: 12px;
  font-weight: 700;
}
.current-report-main {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0 6px;
}
.current-report-month {
  color: #1f2937;
  font-size: 28px;
  font-weight: 800;
}
.current-report-meta {
  color: #566176;
  font-size: 13px;
}
.current-report-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}
.current-report-actions form {
  display: inline-flex;
  margin: 0;
}

/* カード内の大きいボタン */
.hero-button {
  min-width: 120px;
  height: 44px;
  padding: 0 24px;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
}
/* 白文字との文字コントラストを確保するため、提出ボタンは少し濃い緑に */
.current-report-actions .submit-button { background: #0e7a4f; }
.current-report-actions .submit-button:hover { background: #0b6642; }

/* 件数サマリー */
.report-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.summary-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 22px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}
.summary-label {
  color: #566176;
  font-size: 13px;
  font-weight: 600;
}
.summary-value {
  color: #1f2937;
  font-size: 28px;
  font-weight: 800;
}
.summary-value small {
  margin-left: 4px;
  font-size: 14px;
  font-weight: 500;
}

/* 一覧カードの上部ヘッダー */
.report-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #ffffff;
  border-radius: 12px 12px 0 0;
}
.report-table-header h2 {
  margin: 0;
  color: #1f2937;
  font-size: 17px;
  font-weight: 800;
}
.report-table-header .year-form {
  gap: 12px;
}

@media (max-width: 700px) {
  .current-report-card {
    flex-direction: column;
    align-items: stretch;
  }
  .current-report-actions .hero-button {
    flex: 1;
  }
  .report-summary {
    grid-template-columns: 1fr;
  }
}
/* ========================================
   スマホ:一覧テーブル → カード表示
======================================== */
@media (max-width: 700px) {

  .work-report-page .report-container {
    padding: 16px 12px 100px;   /* 下は「新規作成」ボタンの分を空ける */
  }

  /* ---------- 今月の報告書カード ---------- */
  .current-report-card {
    gap: 16px;
    margin-bottom: 16px;
    padding: 20px;
  }
  .current-report-month { font-size: 24px; }

  /* ---------- 一覧まわり ---------- */
  .report-table-wrapper {
    background: transparent;
    box-shadow: none;
    overflow: visible;          /* ⋮メニューが切れないように */
  }

  .report-table-header {
    padding: 0 4px 12px;
    background: transparent;
    border-radius: 0;
  }
  .report-table-header h2 { font-size: 15px; }
  .report-table-header .year-form { gap: 0; }
  .year-select { height: 40px; }

  /* 新規作成:右下に浮かぶボタン */
  .report-table-header .new-report-button {
    position: fixed;
    right: 16px;
    bottom: 20px;
    z-index: 50;
    height: 52px;
    padding: 0 22px;
    border-radius: 26px;
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(8, 117, 245, 0.35);
  }

  /* ---------- テーブルをカードに変換 ---------- */
  .report-table,
  .report-table tbody {
    display: block;
    min-width: 0;
    background: transparent;
  }

  /* 見出し行は画面上では隠す(スクリーンリーダーには残す) */
  .report-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .report-table .report-row {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "month   status"
      "date    date"
      "actions actions";
    align-items: center;
    row-gap: 6px;
    margin-bottom: 12px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e3e8ef;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(20, 50, 100, 0.06);
  }

  .report-table .report-row > td {
    display: block;
    height: auto;
    padding: 0;
    border: 0;
  }

  .report-table .report-row > .report-month { grid-area: month; font-size: 18px; }
  .report-table .report-row > td:nth-child(2) { grid-area: status; }
  .report-table .report-row > .updated-date  { grid-area: date; font-size: 12px; }
  .report-table .report-row > .reports-actions {
    grid-area: actions;
    margin-top: 10px;
  }

  .updated-date::before { content: "最終更新 "; }

  /* ---------- 操作ボタン ---------- */
  .report-table .report-actions {
    justify-content: stretch;
    gap: 8px;
  }
  .report-table .report-actions form { flex: 1; }
  .report-table .report-actions .action-button {
    flex: 1;
    width: 100%;
    height: 44px;
    font-size: 14px;
  }
  .report-table .more-menu-button {
    width: 44px;
    height: 44px;
  }

  /* 報告書が1件もないとき */
  .report-table tr:not(.report-row) {
    display: block;
    background: #ffffff;
    border-radius: 12px;
  }
  .report-table .empty-report {
    display: block;
    height: auto !important;
    padding: 32px 16px;
  }
}
