:root{
  --brand:#00a0e9;
  --brand-dark:#0089c7;
  --sat:#e1f5fe;
  --sun:#ffebee;
}
*{box-sizing:border-box;}
body{
  margin:0; padding:0;
  font-family:"Helvetica Neue",Arial,"Hiragino Kaku Gothic ProN","Hiragino Sans",Meiryo,sans-serif;
  background:#fff; color:#333;
}

/* ===== ヘッダー / ナビ ===== */
.logo-container{ text-align:center; padding:22px 0 12px; }
.logo-container .logo{
  font-size:32px; font-weight:bold; color:var(--brand);
  letter-spacing:1px; cursor:pointer; text-decoration:none; display:inline-block;
}
.logo-container .logo-co, .logo-container .logo-sys{ display:inline; font-size:28px; }
nav.main-nav{ background:var(--brand); margin-bottom:25px; }
nav.main-nav ul{
  list-style:none; margin:0; padding:0;
  display:flex; flex-wrap:wrap; justify-content:center;
}
nav.main-nav li{
  padding:0; font-size:16px; color:#fff; text-align:center;
  cursor:pointer; border-right:1px solid rgba(255,255,255,.3);
}
nav.main-nav li a{ display:flex; align-items:center; justify-content:center; height:40px; padding:14px 26px; color:#fff; text-decoration:none; line-height:1; }
nav.main-nav li:first-child{ border-left:1px solid rgba(255,255,255,.3); }
/* アルコールチェックは使用頻度が低いため、2行表示＋小さめ文字で幅を節約 */
nav.main-nav li.nav-alcohol a{
  font-size:12.5px; line-height:1.35; white-space:normal;
  text-align:center; padding-left:14px; padding-right:14px;
}
.sp-nav-drawer li.nav-alcohol br{ display:none; }
nav.main-nav li:hover{ background:var(--brand-dark); }

.user-bar{
  text-align:right; font-size:13px; color:#555;
  padding:0 2% 8px; margin-bottom:8px;
}
.user-bar b{ color:var(--brand); }

/* ===== 共通 ===== */
#contents{ padding:0 24px 60px; max-width:1280px; margin:0 auto; }
.notice-text{ text-align:center; font-size:14px; color:#555; margin-bottom:25px; }
h2.page-title{ font-size:24px; color:#222; border-bottom:3px solid var(--brand); padding-bottom:8px; }

.btn{
  background:var(--brand); color:#fff; border:2px solid var(--brand); border-radius:4px;
  padding:10px 20px; font-size:15px; cursor:pointer;
}
.btn:hover{ background:var(--brand-dark); border-color:var(--brand-dark); }
.btn.outline{ background:#fff; color:var(--brand); border-color:var(--brand); }
.btn.outline:hover{ background:#f0fbff; border-color:var(--brand); }
.btn-neutral{
  background:#f4f4f4; color:#333; border:1px solid #ccc; border-radius:4px;
  padding:5px 16px; font-size:14px; cursor:pointer;
}
.btn-neutral:hover{ background:#eaeaea; }
.btn-back{ background:#f4f4f4; color:#333; border:1px solid #ccc; border-radius:4px; padding:8px 18px; font-size:14px; cursor:pointer; }
.detail-day-nav{
  display:flex; align-items:center; justify-content:center; gap:16px;
  margin:-6px 0 14px; flex-wrap:wrap;
}
.detail-day-nav[hidden]{ display:none !important; }
.detail-day-label{ font-size:17px; font-weight:bold; color:#222; min-width:190px; text-align:center; }
.btn-day-nav{
  background:#f4f4f4; color:#333; border:1px solid #ccc; border-radius:4px;
  padding:8px 16px; font-size:14px; cursor:pointer; white-space:nowrap;
}
.btn-day-nav:hover{ background:#e8e8e8; border-color:#999; }

/* ===== ログイン ===== */
#view-login{ max-width:380px; margin:40px auto; }
#view-login .box{ border:1px solid #e0e0e0; border-radius:8px; padding:30px; box-shadow:0 2px 10px rgba(0,0,0,.05); }
#view-login h2{ text-align:center; color:var(--brand); }
.form-group{ margin-bottom:16px; }
.form-group label{ display:block; font-size:13px; margin-bottom:5px; color:#555; }
.form-group input{ width:100%; padding:11px; border:1px solid #ccc; border-radius:6px; font-size:16px; }
.err{ color:#e53935; font-size:13px; margin-bottom:10px; min-height:1em; }

/* ===== トップ：5カラム ===== */
.grid-container{ display:grid; grid-template-columns:1.3fr 1.3fr 1.3fr 1fr 1fr; gap:14px; }
.column-box{ min-width:0; overflow:hidden; }
.column-title{ font-size:20px; font-weight:bold; color:#222; margin-bottom:8px; height:26px; line-height:26px; white-space:nowrap; overflow:hidden; }
.column-box .btn-neutral{ margin-bottom:0; }
.td-date{ padding:8px 10px !important; overflow:visible; min-width:0; }
.td-date-row{ white-space:nowrap; display:flex; flex-direction:row; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:4px 6px; min-width:0; }
.td-date-row .date-link{ font-size:13.5px; }
.dm-group{ display:flex; align-items:baseline; gap:4px; white-space:nowrap; }
.btn-copy{ flex-shrink:0; background:var(--brand); color:#fff; border:none; border-radius:3px; padding:4px 10px; font-size:11.5px; cursor:pointer; white-space:nowrap; }
.btn-copy:hover{ background:var(--brand-dark); }
.td-actions{ display:inline-flex; gap:4px; flex-shrink:0; align-items:center; }
.btn-del-sm{ background:#f4f4f4; color:#666; border:1px solid #ccc; border-radius:3px; padding:4px 8px; font-size:11.5px; cursor:pointer; white-space:nowrap; }
.btn-del-sm:hover{ background:#e6e6e6; border-color:#999; color:#333; }
.report-table{ width:100%; table-layout:fixed; border-collapse:collapse; margin-top:10px; }
.report-table th,.report-table td{ border:1px solid #ddd; padding:9px 10px; font-size:14px; vertical-align:middle; }
.report-table th{ background:#fff; font-weight:normal; text-align:left; }
.report-table tr.header-row th{ font-weight:bold; color:#333; }
.date-link{ color:var(--brand); text-decoration:none; cursor:pointer; }
.date-link:hover{ text-decoration:underline; }
.empty-message{ color:#999; font-size:14px; padding:22px 10px !important; text-align:center !important; white-space:normal !important; line-height:1.5; vertical-align:middle; }
.soon{ color:#aaa; font-size:13px; padding:22px 10px !important; text-align:center !important; white-space:normal !important; line-height:1.5; }

@media (min-width:701px){
  nav.main-nav li{ font-size:17px; }
  nav.main-nav li a{ height:44px; padding:15px 28px; }

  #contents:has(.grid-container){
    max-width:1340px; width:100%;
    padding-left:20px; padding-right:20px;
    box-sizing:border-box;
  }
  #contents:has(.grid-container) .notice-text{ font-size:14.5px; margin-bottom:22px; }
  #contents:has(.grid-container) .grid-container{
    gap:16px;
    grid-template-columns:1.3fr 1.3fr 1.3fr 1fr 1.2fr;
  }
  #contents:has(.grid-container) .column-box{ overflow:visible; }
  #contents:has(.grid-container) .column-title{ font-size:22px; height:28px; line-height:28px; margin-bottom:8px; }
  #contents:has(.grid-container) .btn-neutral{ padding:6px 16px; font-size:15px; }
  #contents:has(.grid-container) .report-table{ margin-top:10px; }
  #contents:has(.grid-container) .report-table th,
  #contents:has(.grid-container) .report-table td{ padding:8px 6px; font-size:15px; white-space:nowrap; }
  #contents:has(.grid-container) .report-table tr.header-row th{ font-size:15px; }
  #contents:has(.grid-container) .td-date{ padding:8px 6px !important; overflow:visible; min-width:0; }
  #contents:has(.grid-container) .td-date-row{
    display:grid; align-items:center; width:100%; min-width:0; gap:6px 8px;
  }
  #contents:has(.grid-container) .td-date-row:not(.month-row){
    grid-template-columns:minmax(0,1fr) auto;
  }
  #contents:has(.grid-container) .td-date-row.month-row:not(.month-row-unten){
    grid-template-columns:auto auto;
    gap:6px 10px;
  }
  #contents:has(.grid-container) .td-date-row.month-row-unten{
    grid-template-columns:auto 52px auto;
    gap:6px 8px;
    padding-right:8px;
  }
  #contents:has(.grid-container) .td-date-row.month-row-unten .km-total{
    text-align:right; min-width:52px; box-sizing:border-box;
  }
  #contents:has(.grid-container) .td-date-row.month-row-unten .td-actions{ justify-self:start; flex-shrink:0; }
  #contents:has(.grid-container) .td-date-row:not(.month-row) .dm-group{ min-width:0; overflow:hidden; }
  #contents:has(.grid-container) .td-date-row:not(.month-row) .date-link{
    display:block; font-size:15px; white-space:nowrap; min-width:0;
    overflow:hidden; text-overflow:ellipsis;
  }
  #contents:has(.grid-container) .td-date-row.month-row .dm-group{ min-width:auto; overflow:visible; }
  #contents:has(.grid-container) .td-date-row.month-row .date-link{
    display:inline; font-size:15px; white-space:nowrap; min-width:auto;
    overflow:visible; text-overflow:clip;
  }
  #contents:has(.grid-container) .td-actions{
    flex-shrink:0; margin-left:0; padding-left:0; gap:8px; justify-self:end;
  }
  #contents:has(.grid-container) .td-date-row.month-row .td-actions{ justify-self:start; }
  #contents:has(.grid-container) .btn-copy{ padding:3px 8px; font-size:12.5px; }
  #contents:has(.grid-container) .btn-del-sm{ padding:3px 8px; font-size:12.5px; }
  #contents:has(.grid-container) .empty-message,
  #contents:has(.grid-container) .soon{ font-size:15px; padding:20px 8px !important; text-align:center !important; white-space:normal !important; }
  #contents:has(.grid-container) .km-total{ font-size:13px; }
}

/* ===== カレンダー ===== */
.cal-topbar{ display:flex; align-items:center; justify-content:flex-start; gap:16px; max-width:1200px; margin:0 auto 16px; border-bottom:3px solid var(--brand); padding-bottom:8px; }
.cal-topbar .page-title{ border-bottom:none; padding-bottom:0; margin:0; }
.cal-topbar #cal-new{ flex-shrink:0; }
.cal-head{ display:flex; align-items:center; justify-content:center; gap:20px; margin:10px auto 16px; max-width:1200px; }
.cal-head h3{ margin:0; font-size:24px; color:#222; min-width:170px; text-align:center; }
table.calendar{ width:100%; max-width:1200px; margin:0 auto; border-collapse:collapse; table-layout:fixed; }
table.calendar th{ padding:8px; font-size:14px; border:1px solid #e0e0e0; background:#f7fbfe; }
table.calendar th.sun{ color:#e53935; }
table.calendar th.sat{ color:#1e88e5; }
table.calendar td{ height:80px; border:1px solid #e0e0e0; vertical-align:top; padding:6px 7px; }
table.calendar th{ font-size:15px; }
table.calendar td.sun{ background:var(--sun); }
table.calendar td.sat{ background:var(--sat); }
table.calendar td.empty{ background:#fafafa; }
table.calendar td.has-data{ cursor:pointer; }
table.calendar td.has-data:hover{ outline:2px solid var(--brand); outline-offset:-2px; }
.cal-daynum{ font-size:18px; font-weight:bold; color:#444; }
.cal-badge{
  display:block; margin-top:4px; color:var(--brand); font-size:11.5px; font-weight:bold;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; line-height:1.2;
  letter-spacing:-0.02em;
}
@media (min-width:701px){
  .cal-badge{ font-size:12px; }
}
.cal-holiday{ font-size:10px; color:#e53935; margin-top:2px; line-height:1.2; }
.cal-pto-name{ font-size:10px; color:#b8860b; margin-top:2px; line-height:1.2; }
table.calendar td.cal-pto{ background:#fffde0; }
table.calendar td.cal-today{ background:#fff9c4; }
table.shukkan tr.row-pto td{ background:#fffde0; }
table.mgmt-tbl tr.mrow-pto > td, table.mgmt-edit tr.mrow-pto > td{ background:#fffde0; }
.msg-banner{ border:1px solid #ddd; background:#fff; border-radius:8px; padding:12px 16px; margin-bottom:16px; font-size:15px; line-height:1.6; }
.msg-banner:empty{ display:none; }
.cal-sites{ list-style:none; margin:4px 0 0; padding-left:2px; text-align:left; font-size:11px; color:var(--brand); line-height:1.45; }
.cal-sites li{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ===== 社員一覧 ===== */
.emp-table{ width:100%; border-collapse:collapse; margin:10px auto 0; max-width:460px; }
.emp-table th,.emp-table td{ border:1px solid #ddd; padding:10px 12px; font-size:14px; text-align:left; }
.emp-table th{ background:var(--brand); color:#fff; }

/* ===== 日報詳細 ===== */
.report-card{ border:1px solid #e0e0e0; border-radius:8px; padding:18px 20px; margin-bottom:20px; box-shadow:0 1px 4px rgba(0,0,0,.04); }
.report-card .rc-head{ font-size:16px; font-weight:bold; color:var(--brand); border-bottom:1px solid #eee; padding-bottom:8px; margin-bottom:12px; }
.report-card .rc-row{ display:flex; gap:12px; padding:7px 0; border-bottom:1px dashed #eee; }
.report-card .rc-label{ width:200px; flex-shrink:0; font-size:13px; color:#777; font-weight:bold; }
.report-card .rc-value{ flex:1; font-size:14px; white-space:pre-wrap; word-break:break-word; }

/* ===== 作成フォーム ===== */
.create-form{ max-width:760px; }
.create-form .form-group input,.create-form .form-group textarea{
  width:100%; padding:10px; border:1px solid #ccc; border-radius:6px; font-size:15px; font-family:inherit;
}
.create-form textarea{ min-height:64px; resize:vertical; }
.create-form .meta{ display:flex; gap:16px; flex-wrap:wrap; }
.create-form .meta .form-group{ flex:1; min-width:180px; }

/* ===== ローディング ===== */
#loading{ position:fixed; inset:0; background:rgba(255,255,255,.7); display:none; align-items:center; justify-content:center; z-index:9999; }
#loading.show{ display:flex; }
.spinner{ width:48px; height:48px; border:5px solid #b3e5fc; border-top-color:var(--brand); border-radius:50%; animation:spin 1s linear infinite; }
@keyframes spin{ to{ transform:rotate(360deg); } }

@media (max-width:900px){
  .grid-container{ grid-template-columns:1fr 1fr; }
  .report-card .rc-row{ flex-direction:column; gap:2px; }
  .report-card .rc-label{ width:auto; }
}
@media (max-width:560px){
  .grid-container{ grid-template-columns:1fr; }
  nav.main-nav li a{ padding:14px 14px; font-size:14px; height:34px; }
  .td-date-row{ justify-content:space-between; gap:4px 10px; }
  .column-box{ padding-left:16px; }
  .column-box .report-table{ width:100%; max-width:100%; table-layout:fixed; margin:10px 0 0; }
  .column-box .btn-neutral{ padding:4px 10px; font-size:12.5px; }
}

/* ===== 現場管理日報フォーム ===== */
:root{ --genba:#00a0e9; --genba-dark:#0089c7; }
.genba-wrap{ background:#eef6fb; padding:0; }
.genba-top{ display:flex; gap:18px; align-items:flex-start; }
.genba-left{ flex:1; min-width:0; }
.genba-right{ width:340px; flex-shrink:0; }
.genba-bottom{ display:flex; gap:18px; align-items:flex-start; margin-top:24px; }
.genba-bottom > div:first-child{ width:300px; flex-shrink:0; }
.genba-bottom > div:last-child{ flex:1; min-width:0; }

table.genba-tbl{ width:100%; border-collapse:collapse; }
table.genba-tbl td{ border:2px solid #eef6fb; vertical-align:middle; }
table.genba-tbl td.lbl{
  width:90px; background:var(--genba); color:#fff; font-size:14px; font-weight:bold;
  text-align:center; padding:8px 4px; line-height:1.3;
}
table.genba-tbl td.val{ background:#eef6fb; padding:6px 8px; }
.genba-plain{ font-size:15px; color:#333; padding:4px 2px; }
.genba-tbl input[type=text], .genba-tbl input[type=date], .genba-tbl textarea, .genba-tbl select{
  width:100%; padding:7px 8px; border:1px solid #b8b8b8; border-radius:2px;
  font-size:14px; font-family:inherit; box-sizing:border-box; background:#fff;
}
.genba-tbl input.short{ width:240px; }
#g-buffer.buffer-green{ background:#43a047; color:#fff; font-weight:bold; }
#g-buffer.buffer-yellow{ background:#f2c200; color:#333; font-weight:bold; }
#g-buffer.buffer-red{ background:#e53935; color:#fff; font-weight:bold; }
.genba-tbl textarea{ resize:vertical; }
.genba-tbl textarea.h-s{ height:64px; }
.genba-tbl textarea.h-m{ height:96px; }
.genba-tbl textarea.h-l{ height:120px; }
.genba-note{ color:#5b7c8d; font-size:12.5px; margin:0 0 6px; }
.genba-template{ height:210px; }

.genba-bar{ background:var(--genba); color:#fff; font-size:15px; font-weight:bold; padding:9px 12px; }
.genba-panel{ background:#eef6fb; padding:10px; margin-bottom:18px; }
.genba-panel textarea{ width:100%; height:120px; border:1px solid #b8b8b8; border-radius:2px; box-sizing:border-box; padding:8px; font-family:inherit; font-size:14px; resize:vertical; }
.img-grid{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.img-slot{ background:#fff; border:2px dashed #ccc; border-radius:6px; min-height:120px; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; padding:6px; gap:6px; position:relative; transition:background .15s,border-color .15s; }
.img-slot.drag-over{ background:#eef6fb; border-color:var(--brand); }
.img-slot.has-image{ border-style:solid; }
.img-slot img{ display:none; max-width:100%; max-height:80px; object-fit:cover; }
.img-slot.has-image img{ display:block; }
.img-drop-hint{ font-size:11px; color:#999; text-align:center; line-height:1.4; pointer-events:none; }
.img-slot.has-image .img-drop-hint{ display:none; }
.img-slot input[type=file]{ font-size:11px; width:100%; cursor:pointer; }
.img-remove-btn{ display:none; position:absolute; top:4px; right:4px; width:22px; height:22px; border-radius:50%; border:none; background:rgba(0,0,0,.55); color:#fff; font-size:14px; line-height:1; cursor:pointer; z-index:2; padding:0; }
.img-remove-btn:hover{ background:rgba(0,0,0,.75); }
.img-slot.has-image .img-remove-btn{ display:block; }

table.money{ width:100%; border-collapse:collapse; }
table.money th, table.money td{ border:2px solid #eef6fb; text-align:center; padding:6px; font-size:13px; }
table.money th{ background:var(--genba); color:#fff; font-weight:bold; }
table.money td.row-lbl{ background:var(--genba); color:#fff; font-weight:bold; width:70px; }
table.money input{ width:100%; max-width:160px; box-sizing:border-box; text-align:right; padding:6px 6px; border:1px solid #b8b8b8; border-radius:2px; font-size:13px; }
table.money input[readonly]{ background:#f0f0f0; color:#555; }
.money-btns button{ background:#fff; border:1px solid #fff; color:var(--genba); font-size:12px; padding:2px 8px; margin:0 1px; border-radius:3px; cursor:pointer; font-weight:bold; }
.money-btns button:hover{ background:#fbe9dc; }
.genba-hint{ color:#666; font-size:12.5px; margin-top:8px; }
.section-h{ font-size:18px; color:#333; margin:0 0 10px; }
.btn-genba{ background:var(--genba); color:#fff; border:none; border-radius:4px; padding:11px 30px; font-size:15px; cursor:pointer; }
.btn-genba:hover{ background:var(--genba-dark); }

@media (max-width:900px){
  .genba-top, .genba-bottom{ flex-direction:column; }
  .genba-right, .genba-bottom > div:first-child, .genba-bottom > div:last-child{ width:100%; }
}

.km-total{ color:#888; font-size:11px; white-space:nowrap; }

/* ===== G-POP 編集画面（業務改善日報と同じ淡い水色） ===== */
:root{ --gpop:#4fa8d8; --gpop-dark:#3d96c4; }
.gpop-titlebar{ background:#4fa8d8; color:#fff; font-size:20px; font-weight:bold; padding:16px 22px; border-radius:3px; }
table.gpop-meta{ width:100%; border-collapse:collapse; margin-top:14px; }
table.gpop-meta td{ border:2px solid #fff; vertical-align:middle; }
table.gpop-meta td.lbl{ width:130px; background:#4fa8d8; color:#fff; font-weight:bold; font-size:14px; padding:11px 14px; }
table.gpop-meta td.val{ background:#eef6fb; padding:9px 14px; }
table.gpop-meta .rec{ color:#333; font-size:14px; }
table.gpop-meta input[type=date]{ padding:7px 8px; border:1px solid #b8b8b8; border-radius:2px; font-size:14px; }
.gpop-date-cell{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.gpop-date-cell input[type=month],
.gpop-date-cell select{ padding:7px 8px; border:1px solid #b8b8b8; border-radius:2px; font-size:14px; background:#fff; }
.gpop-date-legacy-label{ font-size:14px; color:#333; }

.gpop-container{ background:#4fa8d8; padding:22px; border-radius:4px; margin-top:24px; }
.gpop-goal-head{ background:#2d7a9a; color:#fff; font-size:20px; font-weight:bold; padding:14px 20px; border-radius:3px 3px 0 0; }
.gpop-goal-body{ background:#fff; padding:14px; border-radius:0 0 3px 3px; margin-bottom:22px; }
.gpop-goal-body textarea{ width:100%; height:170px; border:none; resize:vertical; font-family:inherit; font-size:14px; box-sizing:border-box; outline:none; color:#1b4f72; }

.gpop-grid{ display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.gpop-card{ background:#fff; border-radius:3px; overflow:hidden; }
.gpop-card-head{ background:#eef6fb; padding:12px 18px; }
.gpop-card-head .t{ font-size:20px; font-weight:bold; color:#222; }
.gpop-card-head .s{ font-size:13px; color:#555; margin-top:2px; }
.gpop-card textarea{ width:100%; height:170px; border:none; resize:vertical; font-family:inherit; font-size:14px; box-sizing:border-box; padding:14px 18px; outline:none; color:#1b4f72; }

.gpop-submit-wrap{ text-align:center; margin-top:26px; }
.btn-gpop{ background:var(--gpop); color:#fff; border:none; border-radius:3px; padding:13px 90px; font-size:16px; letter-spacing:4px; cursor:pointer; }
.btn-gpop:hover{ background:var(--gpop-dark); }

@media (max-width:760px){ .gpop-grid{ grid-template-columns:1fr; } }

/* ===== G-POP / 業務改善日報 一覧表示（共通） ===== */
.gpop-list-title, .gyoumu-list-title{ font-size:16px; font-weight:bold; color:#333; margin:4px 0 12px; }
.gpop-list-empty-msg, .gyoumu-list-empty-msg{ color:#999; font-size:14px; }
.gpop-list-wrap, .gyoumu-list-wrap{
  border:none; background:#eef2f6;
  padding:14px 12px;
  display:flex; flex-direction:column;
}
.gpop-list-wrap{ gap:16px; }
.gyoumu-list-wrap{ gap:16px; }
.gpop-list-block, .gyoumu-list-block{
  display:flex;
  border:1px solid #888;
  border-radius:4px;
  background:#fff;
  box-shadow:0 2px 8px rgba(0,0,0,.07);
  min-height:100px;
  overflow:hidden;
}
.gpop-list-name, .gyoumu-list-name{
  width:46px; flex-shrink:0; background:#b8dff5;
  border-right:2px solid #7eb8dc;
  display:flex; align-items:center; justify-content:center;
  padding:10px 6px; box-sizing:border-box;
}
.gpop-list-name span, .gyoumu-list-name span,
.gpop-list-name a.report-list-name-link, .gyoumu-list-name a.report-list-name-link{
  writing-mode:vertical-rl; text-orientation:mixed;
  font-size:14px; font-weight:bold; color:#222;
  letter-spacing:1px; line-height:1.35; text-align:center;
}
.gpop-list-name a.report-list-name-link, .gyoumu-list-name a.report-list-name-link{
  text-decoration:underline; text-underline-offset:2px;
}
.gpop-list-name a.report-list-name-link:hover, .gyoumu-list-name a.report-list-name-link:hover{ color:#004a75; }
.gpop-list-block-empty, .gyoumu-list-block-empty{ opacity:.92; }
.gpop-list-block-empty .gpop-list-name,
.gyoumu-list-block-empty .gyoumu-list-name{ background:#e8e8e8; border-right-color:#bbb; }
.gpop-list-block-empty .gpop-list-val.gpop-list-empty,
.gyoumu-list-block-empty .gpop-list-val.gpop-list-empty{ color:#aaa; font-style:italic; }

/* 業務改善日報・G-POP：所属グループ（名前の左・スクロール追尾） */
.report-list-busho-group{
  display:flex;
  flex-direction:row;
  align-items:flex-start;
  gap:0;
  min-width:0;
}
.report-list-busho-stripe{
  position:sticky;
  top:8px;
  align-self:flex-start;
  width:auto;
  min-width:28px;
  flex-shrink:0;
  box-sizing:border-box;
  background:transparent;
  border:none;
  display:flex;
  justify-content:center;
  padding:4px 10px 4px 2px;
  z-index:2;
}
.report-list-busho-stripe-empty{ min-width:0; padding:0; }
.report-list-busho-text{
  writing-mode:vertical-rl;
  text-orientation:mixed;
  font-size:17px;
  font-weight:bold;
  color:#666;
  letter-spacing:3px;
  line-height:1.2;
  text-align:center;
}
.report-list-busho-group-inner{
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:16px;
}
.report-list-busho-group .gyoumu-list-block,
.report-list-busho-group .gpop-list-block{
  border:1px solid #888;
  border-radius:4px;
  box-shadow:0 2px 8px rgba(0,0,0,.07);
  background:#fff;
  overflow:clip;
}
/* 名前欄もスクロール追尾（overflow:hidden だと sticky が効かないため clip に） */
.report-list-busho-group .gyoumu-list-name,
.report-list-busho-group .gpop-list-name{
  position:sticky;
  top:8px;
  z-index:1;
  align-self:stretch;
}

/* ===== G-POP 一覧 ===== */
.gpop-list-busho{ display:block; font-size:11px; font-weight:normal; color:#555; margin-top:4px; }
.gpop-list-main{ flex:1; min-width:0; display:flex; flex-direction:column; }
.gpop-list-goal-wrap{ border-bottom:1px solid #b8b8b8; }
.gpop-list-hd{
  background:#ececec; border-bottom:1px solid #b8b8b8;
  padding:7px 12px; line-height:1.4;
}
.gpop-list-hd-goal{ font-weight:bold; font-size:14px; color:#222; }
.gpop-list-hd .t{ font-weight:bold; font-size:14px; color:#222; margin-right:4px; }
.gpop-list-hd .s{ font-size:12px; color:#444; font-weight:normal; }
.gpop-list-val{
  padding:10px 14px; font-size:13px; line-height:1.6;
  white-space:pre-wrap; word-break:break-word; color:#222;
  min-height:44px; background:#fff;
}
.gpop-list-val.gpop-list-empty{ min-height:32px; }
.gpop-list-grid{ display:grid; grid-template-columns:1fr 1fr; flex:1; }
.gpop-list-cell{
  border-right:1px solid #b8b8b8;
  display:flex; flex-direction:column; min-width:0;
}
.gpop-list-cell:nth-child(2n){ border-right:none; }
.gpop-list-cell:nth-child(-n+2){ border-bottom:1px solid #b8b8b8; }
.gpop-list-cell .gpop-list-val{ flex:1; }
.gpop-list-inline .gpop-list-main{ border:none; }

#contents.contents-report-list{
  max-width:1220px; width:100%; margin:0 auto;
  padding-left:16px; padding-right:16px;
  box-sizing:border-box;
}
#contents.contents-gyoumu-list{
  max-width:1440px; width:100%; margin:0 auto;
  padding-left:12px; padding-right:12px;
  box-sizing:border-box;
}

@media (min-width:701px){
  .gpop-list-wrap{ padding:16px 14px; gap:18px; }
  .gyoumu-list-wrap{ padding:16px 14px; gap:18px; }
  .gpop-list-title, .gyoumu-list-title{ font-size:17px; margin-bottom:14px; }
  .gpop-list-name, .gyoumu-list-name{ width:52px; }
  .report-list-busho-stripe{ padding:4px 12px 4px 4px; }
  .report-list-busho-text{ font-size:20px; letter-spacing:4px; }
  .gpop-list-name span, .gyoumu-list-name span{ font-size:15px; }
  .gpop-list-hd{ padding:8px 14px; }
  .gpop-list-hd-goal{ font-size:15px; }
  .gpop-list-hd .t{ font-size:15px; }
  .gpop-list-hd .s{ font-size:13px; }
  .gpop-list-val{ padding:12px 16px; font-size:14px; min-height:52px; }
  #contents.contents-report-list .gpop-list-wrap{ width:100%; }
  #contents.contents-gyoumu-list .gyoumu-list-wrap{ width:100%; }
}

@media (max-width:760px){
  .gpop-list-block, .gyoumu-list-block{ flex-direction:column; width:100%; box-sizing:border-box; }
  .gpop-list-main, .gyoumu-list-main{ width:100%; box-sizing:border-box; }
  .gpop-list-name, .gyoumu-list-name{
    width:100%; border-right:none; border-bottom:1px solid #b8b8b8;
    padding:8px 12px; justify-content:flex-start; box-sizing:border-box;
  }
  .gpop-list-name span, .gyoumu-list-name span,
  .gpop-list-name a.report-list-name-link, .gyoumu-list-name a.report-list-name-link{ writing-mode:horizontal-tb; text-align:left; }
  .gpop-list-busho{ display:inline; margin-top:0; margin-left:8px; }
  .report-list-busho-group{
    flex-direction:column;
    gap:0;
  }
  .report-list-busho-stripe{
    position:sticky;
    top:0;
    width:100%;
    padding:6px 12px;
    justify-content:center;
    background:#eef2f6;
    border-bottom:1px solid #ccc;
  }
  .report-list-busho-text{
    writing-mode:horizontal-tb;
    letter-spacing:6px;
    font-size:16px;
    color:#666;
  }
  .report-list-busho-group-inner{ gap:14px; width:100%; box-sizing:border-box; }
  /* スマホ：所属バーの下に名前を追尾 */
  .report-list-busho-group .gyoumu-list-name,
  .report-list-busho-group .gpop-list-name{
    top:32px; /* 所属バーの高さ分 */
  }
  .gpop-list-grid{ grid-template-columns:1fr; }
  .gpop-list-cell{ border-right:none !important; border-bottom:1px solid #b8b8b8; }
  .gpop-list-cell:last-child{ border-bottom:none; }
  .gpop-list-cell:nth-child(-n+2){ border-bottom:1px solid #b8b8b8; }
}

/* ===== 業務改善日報 一覧（G-POPと同じセル構造） ===== */
.gyoumu-list-main{ flex:1; min-width:0; display:flex; flex-direction:column; }
.gyoumu-list-grid3 .gpop-list-cell{
  border-right:none;
}
.gyoumu-list-left-top > .gpop-list-cell{
  border-bottom:none;
}
.gyoumu-list-grid3 .gpop-list-cell .gpop-list-val{
  flex:0 1 auto;
}
.gyoumu-list-grid3{
  display:grid;
  flex:1; min-width:0;
  grid-template-columns:1fr 1fr;
  grid-template-rows:auto 1fr;
}
.gyoumu-list-left-top{
  grid-column:1; grid-row:1;
  display:grid;
  grid-template-columns:1fr minmax(100px, 200px);
  border-right:1px solid #b8b8b8;
  border-bottom:1px solid #b8b8b8;
  min-width:0;
}
.gyoumu-list-left-top > .gpop-list-cell:first-child{ border-right:1px solid #b8b8b8; }
.gyoumu-list-col-left{
  grid-column:1; grid-row:2;
  border-right:1px solid #b8b8b8;
  display:flex; flex-direction:column; min-width:0;
}
.gyoumu-list-col-right{
  grid-column:2; grid-row:1 / 3;
  display:flex; flex-direction:column; min-width:0;
  border-left:1px solid #b8b8b8;
  margin-left:-1px;
}
.gyoumu-list-col-left > .gyoumu-list-horenso-bottom{
  margin-top:auto;
  flex-shrink:0;
}
.gyoumu-list-col-left > .gpop-list-cell,
.gyoumu-list-col-right > .gpop-list-cell,
.gyoumu-list-col-left > .gyoumu-list-row2,
.gyoumu-list-col-left > .gyoumu-list-urgent-pair{
  border-right:none;
  border-bottom:1px solid #b8b8b8;
}
.gyoumu-list-col-left > :last-child,
.gyoumu-list-col-right > :last-child{
  border-bottom:none;
}
.gyoumu-list-urgent-pair{
  display:grid;
  grid-template-rows:1fr 1fr;
  min-height:140px;
  flex:1;
}
.gyoumu-list-urgent-pair > .gpop-list-cell{
  border-right:none;
  border-bottom:1px solid #b8b8b8;
  min-height:0;
}
.gyoumu-list-urgent-pair > .gpop-list-cell:last-child{ border-bottom:none; }
.gyoumu-list-urgent-pair > .gpop-list-cell .gpop-list-val{
  flex:1;
  min-height:52px;
}
.gyoumu-list-row2{
  display:grid;
  grid-template-columns:1fr minmax(100px, 200px);
}
.gyoumu-list-row2 > .gpop-list-cell{
  border-bottom:none; min-width:0;
  border-right:1px solid #b8b8b8;
}
.gyoumu-list-row2 > .gpop-list-cell:last-child{ border-right:none; }
.gyoumu-list-inline .gyoumu-list-main{ border:none; }

@media (max-width:760px){
  .gyoumu-list-grid3 .gpop-list-cell{
    border:none !important;
  }
  .gyoumu-list-grid3{
    grid-template-columns:1fr;
    grid-template-rows:auto;
  }
  .gyoumu-list-left-top,
  .gyoumu-list-col-left,
  .gyoumu-list-col-right{
    grid-column:1; grid-row:auto;
    border-left:none;
    margin-left:0;
  }
  .gyoumu-list-left-top{
    border-right:none;
    grid-template-columns:1fr;
  }
  .gyoumu-list-left-top > .gpop-list-cell:first-child{
    border-right:none;
    border-bottom:1px solid #b8b8b8;
  }
  .gyoumu-list-left-top,
  .gyoumu-list-col-left{ border-bottom:1px solid #b8b8b8; }
  .gyoumu-list-col-left > .gpop-list-cell,
  .gyoumu-list-col-left > .gyoumu-list-row2,
  .gyoumu-list-col-left > .gyoumu-list-urgent-pair,
  .gyoumu-list-col-right > .gpop-list-cell{
    border-bottom:1px solid #b8b8b8;
  }
  .gyoumu-list-col-left > .gyoumu-list-horenso-bottom{ margin-top:0; }
  .gyoumu-list-urgent-pair{ min-height:120px; flex:none; }
  .gyoumu-list-urgent-pair > .gpop-list-cell .gpop-list-val{ min-height:44px; }
  .gyoumu-list-col-left > :last-child,
  .gyoumu-list-col-right > :last-child{ border-bottom:none; }
  .gyoumu-list-row2{ grid-template-columns:1fr; }
  .gyoumu-list-row2 > .gpop-list-cell{
    border-right:none;
    border-bottom:1px solid #b8b8b8;
  }
  .gyoumu-list-row2 > .gpop-list-cell:last-child{ border-bottom:none; }
}

/* ===== 運転日報 編集画面 ===== */
:root{ --unten:#00a0e9; --unten-dark:#0089c7; --u-sat:#e1f5fe; --u-sun:#ffebee; }
.unten-bar1{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:14px; }
.unten-total{ font-size:15px; font-weight:bold; color:#555; text-align:center; flex:1; }
.unten-total b{ color:var(--unten); font-size:20px; }
.unten-bar2{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:18px; }
.unten-month{ font-size:22px; font-weight:bold; color:var(--unten); text-align:center; flex:1; }
.btn-unten{ background:var(--unten); color:#fff; border:none; border-radius:6px; padding:11px 26px; font-size:15px; font-weight:bold; cursor:pointer; }
.btn-unten:hover{ background:var(--unten-dark); }
.btn-unten-o{ background:#fff; color:var(--unten); border:2px solid var(--unten); border-radius:6px; padding:11px 30px; font-size:15px; font-weight:bold; cursor:pointer; }
.btn-unten-o:hover{ background:#e0f7fb; }

.uday{ display:flex; align-items:center; gap:10px; background:#fff; border:1px solid #e0e0e0; border-radius:8px; padding:8px; margin-bottom:8px; }
.uday.sat{ background:var(--u-sat); }
.uday.sun{ background:var(--u-sun); }
.uday-head{ width:90px; flex-shrink:0; font-size:13px; font-weight:bold; color:#555; text-align:center; }
.uday-inputs{ flex:1; display:flex; gap:6px; }
.uday-inputs input{ padding:9px 8px; font-size:14px; border:1px solid #ccc; border-radius:4px; box-sizing:border-box; }
.u-memo{ flex:1; min-width:0; }
.u-km{ width:90px; flex-shrink:0; text-align:right; }
.u-remarks{ width:140px; flex-shrink:0; }
.u-clear{ flex-shrink:0; padding:9px 14px; background:#f5f5f5; color:#666; border:1px solid #ccc; border-radius:4px; font-size:13px; cursor:pointer; }
.u-clear:hover{ background:#e0e0e0; }

@media (max-width:600px){
  .uday{ flex-direction:column; align-items:stretch; }
  .uday-head{ width:100%; text-align:left; }
  .uday-inputs{ flex-wrap:wrap; }
  .u-memo{ flex:1 1 100%; }
  .u-remarks{ flex:1; width:auto; min-width:60px; }
}

/* ===== 出勤簿 登録画面 ===== */
.shukkan-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:16px; }
.shukkan-period{ font-size:20px; font-weight:bold; color:#0089c7; text-align:center; flex:1; }
.shukkan-period small{ display:block; font-size:13px; color:#777; font-weight:normal; margin-top:2px; }
.auto-save-status{ display:block; font-size:11px; font-weight:normal; color:#888; min-height:14px; margin-top:2px; }
.auto-save-status-saving{ color:#0089c7; }
.auto-save-status-saved{ color:#2e7d32; }
.auto-save-status-error{ color:#c62828; }
.unten-auto-save-status{ text-align:center; font-size:11px; color:#888; min-height:14px; margin:-10px 0 14px; }
.btn-shukkan{ background:#00a0e9; color:#fff; border:none; border-radius:6px; padding:11px 26px; font-size:15px; font-weight:bold; cursor:pointer; }
.btn-shukkan:hover{ background:#0089c7; }
.btn-shukkan-o{ background:#fff; color:#00a0e9; border:2px solid #00a0e9; border-radius:6px; padding:11px 24px; font-size:15px; font-weight:bold; cursor:pointer; }
.btn-shukkan-o:hover{ background:#eaf6fd; }

.shukkan-scroll{ overflow-x:auto; }
table.shukkan{ width:100%; border-collapse:collapse; font-size:12px; min-width:880px; }
#view-unten .shukkan-scroll{ overflow-x:visible; }
#view-unten table.shukkan{ min-width:0; }
table.shukkan th, table.shukkan td{ border:1px solid #bdbdbd; padding:2px 3px; text-align:center; }
table.shukkan thead th{ background:#e6f4fc; font-weight:bold; white-space:nowrap; padding:6px 4px; }
table.shukkan input, table.shukkan textarea.grid-field{
  width:100%; border:none; background:transparent; font-size:12px; text-align:center;
  box-sizing:border-box; padding:4px 2px; font-family:inherit;
}
table.shukkan textarea.grid-field{ resize:none; overflow:hidden; vertical-align:top; line-height:1.35; }
table.shukkan input:focus, table.shukkan textarea.grid-field:focus{ background:#fffde7; outline:1px solid #00a0e9; }
table.shukkan input.txt-l, table.shukkan textarea.grid-field.txt-l{ text-align:left; }
table.shukkan .ex td{ background:#fafafa; color:#777; }
table.shukkan td.day-sat, table.shukkan td.dow-sat{ color:#1e88e5; font-weight:bold; }
table.shukkan td.day-sun, table.shukkan td.dow-sun{ color:#e53935; font-weight:bold; }
table.shukkan tr.row-sat td{ background:#f1f8fe; }
table.shukkan tr.row-sun td{ background:#fdf0f0; }
table.shukkan tfoot td{ background:#f0f0f0; font-weight:bold; }
table.shukkan tfoot .unit{ font-size:11px; color:#777; font-weight:normal; }
table.shukkan td{ position:relative; }
table.shukkan input.fill-target, table.shukkan textarea.grid-field.fill-target{ background:#d8eefb; }
.grid input, .grid textarea.grid-field{ cursor:default; }
.grid input.editing, .grid textarea.grid-field.editing{ cursor:text; background:#fff; }
.grid td.me-selected input:not(.editing),
.grid td.me-selected textarea.grid-field:not(.editing){ background:#eaf4fd; }
.grid input.range-sel, .grid textarea.grid-field.range-sel{ background:#cfe8fb !important; }
#fill-handle{ position:fixed; width:9px; height:9px; background:#00a0e9; border:1px solid #fff;
  box-shadow:0 0 0 1px #0089c7; cursor:crosshair; display:none; z-index:5000; }

/* ===== 業務改善日報 編集画面 ===== */
.kz-wrap{ background:#eef6fb; padding:16px; }
.kz-titlebar{ background:#4fa8d8; color:#fff; font-size:20px; font-weight:bold; padding:15px 22px; }
table.kz-tbl{ width:100%; border-collapse:collapse; margin-top:14px; }
table.kz-tbl td{ border:3px solid #fff; vertical-align:middle; }
table.kz-tbl td.lbl{ width:170px; background:#4fa8d8; color:#fff; font-size:13.5px; font-weight:bold; text-align:center; padding:12px 8px; line-height:1.45; }
table.kz-tbl td.val{ background:#eef6fb; padding:12px 14px; }
.kz-plain{ font-size:15px; color:#333; }
table.kz-tbl input[type=date]{ padding:8px 10px; border:1px solid #b8b8b8; border-radius:2px; font-size:15px; background:#fff; }
.kz-two{ display:flex; gap:14px; align-items:flex-start; }
.kz-two .wide{ flex:1; min-width:0; }
.kz-two .narrow{ width:310px; flex-shrink:0; }
.kz-sub{ font-size:13px; color:#333; margin:0 0 6px; }
table.kz-tbl textarea{ width:100%; border:1px solid #b8b8b8; border-radius:2px; box-sizing:border-box; padding:10px; font-family:inherit; font-size:14px; resize:vertical; background:#fff; }
table.kz-tbl textarea.h1{ min-height:144px; }
table.kz-tbl textarea.h2{ min-height:168px; }
.kz-submit-wrap{ text-align:center; margin-top:26px; }
.btn-kz{ background:var(--brand); color:#fff; border:none; border-radius:3px; padding:13px 80px; font-size:16px; letter-spacing:4px; cursor:pointer; }
.btn-kz:hover{ background:var(--brand-dark); }

@media (max-width:760px){
  .kz-two{ flex-direction:column; }
  .kz-two .narrow{ width:100%; }
  table.kz-tbl td.lbl{ width:110px; font-size:12.5px; }
}

/* ===== 各編集画面の横幅を抑えてスマートに ===== */
#view-gpop{ max-width:900px; margin:0 auto; }
#view-create{ max-width:1170px; margin:0 auto; }
#view-unten{ max-width:1040px; margin:0 auto; }
#view-genba{ max-width:1080px; margin:0 auto; }
#view-shukkan{ max-width:1040px; margin:0 auto; }
#view-detail, #view-employees, #view-pw-change{ max-width:820px; margin:0 auto; }
#view-detail{ max-width:1180px; }

.detail-card{ margin-bottom:24px; }
.detail-card .ro-box{ background:#fff; border:1px solid #d8d8d8; border-radius:3px; padding:8px 10px; min-height:56px; white-space:pre-wrap; word-break:break-word; font-size:14px; }
.detail-card .ro-plain{ white-space:pre-wrap; word-break:break-word; font-size:14px; color:#1b4f72; min-height:44px; }
.detail-card table.ro-kz{ margin-top:0; }
/* 一覧画面（読み取り専用）・入力画面と統一した淡いブルー系の配色にする */
.detail-card table.kz-tbl td.lbl{ background:#4fa8d8; }
.detail-card .gpop-container{ background:#4fa8d8; }
.detail-card .gpop-goal-head{ background:#2d7a9a; }
.detail-card .gpop-card-head{ background:#eaf4fb; }
.kz-2col{ display:flex; gap:16px; align-items:flex-start; }
.kz-2col .kz-col{ flex:1; min-width:0; }
@media(max-width:760px){ .kz-2col{ flex-direction:column; align-items:stretch; } }

.gl-title{ font-size:14px; font-weight:bold; color:#333; margin:4px 0 10px; }
.gl-wrap{ overflow-x:visible; }
table.gl-table{ width:100%; border-collapse:collapse; font-size:10px; table-layout:fixed; }
table.gl-table > thead th{ background:#3a3a3a; color:#fff; padding:8px 5px; font-size:11px; border:1px solid #555; }
table.gl-table > tbody td{ border:1px solid #cfcfcf; vertical-align:top; padding:8px 7px; word-break:break-word; }
.gl-site{ color:#333; font-weight:bold; font-size:12px; margin-bottom:5px; }
.gl-site-link{ cursor:pointer; text-decoration:underline; text-underline-offset:2px; }
.gl-site-link:hover{ color:#111; }
.gl-edit-link{ margin-bottom:6px; }
.gl-edit-link a{ font-size:10.5px; color:var(--genba); text-decoration:underline; text-underline-offset:2px; }
.gl-edit-link a:hover{ color:#111; }
.gl-gaiyou{ white-space:pre-wrap; font-size:10px; color:#444; margin-bottom:6px; line-height:1.45; }
.gl-bar{ background:#666; color:#fff; text-align:center; padding:5px; font-size:10px; }
.gl-flow{ border:1px solid #ccc; border-top:none; min-height:38px; padding:5px; white-space:pre-wrap; font-size:10px; }
.gl-rec{ font-weight:bold; margin-bottom:5px; }
.gl-work-meta{
  display:grid;
  grid-template-columns:repeat(6, max-content);
  width:fit-content;
  max-width:100%;
  border:1px solid #ccc;
  margin-bottom:6px;
}
.gl-work-meta > .gl-lbl,
.gl-work-meta > .gl-val{
  border-bottom:none;
  border-right:1px solid #ccc;
  width:auto;
}
.gl-work-meta > .gl-val:last-child{ border-right:none; }
.gl-work-left,
.gl-work-right{
  border:1px solid #ccc;
}
.gl-field{
  display:grid;
  grid-template-columns:max-content minmax(0, 1fr);
  border:none;
  border-bottom:1px solid #ccc;
  margin-top:0;
}
.gl-field:last-child{ border-bottom:none; }
.gl-td-money > .gl-field{
  border:1px solid #ccc;
  margin-top:8px;
}
.gl-lbl{
  background:#ececec;
  font-weight:bold;
  padding:4px 6px;
  border-right:1px solid #ccc;
  margin:0;
  line-height:1.4;
  white-space:nowrap;
  width:6.8em;
  box-sizing:border-box;
}
.gl-val{
  background:#fff;
  padding:4px 6px;
  white-space:pre-wrap;
  line-height:1.45;
  min-height:1.4em;
}
.gl-uten{ border:none; padding:0; min-height:0; white-space:pre-wrap; }
table.gl-koutei{ width:100%; border-collapse:collapse; }
table.gl-koutei td{ border:1px solid #ccc; padding:5px; }
table.gl-koutei .kl{ background:#ececec; width:84px; font-weight:bold; text-align:left; }
table.gl-money{ width:100%; border-collapse:collapse; margin-bottom:6px; }
table.gl-money th, table.gl-money td{ border:1px solid #ccc; padding:2px 4px; text-align:right; font-size:9px; }
table.gl-money th{ background:#ececec; text-align:center; }
table.gl-money .ml{ background:#ececec; text-align:left; font-weight:bold; }
.gl-imgs{ line-height:0; }
.gl-img{ width:74px; height:58px; object-fit:cover; border:1px solid #ccc; margin:2px; cursor:pointer; }

@media (min-width:701px){
  .gl-title{ font-size:15px; }
  table.gl-table{ font-size:13px; }
  table.gl-table > thead th{ font-size:14px; padding:9px 7px; }
  table.gl-table > tbody td{ padding:9px 9px; }
  .gl-site{ font-size:15px; }
  .gl-gaiyou{ font-size:12px; }
  .gl-bar{ font-size:11px; padding:6px; }
  .gl-flow{ font-size:12px; }
  table.gl-koutei td{ font-size:12px; }
  table.gl-koutei .kl{ width:94px; }
  .gl-lbl{ width:7em; padding:5px 7px; }
  .gl-val{ padding:5px 7px; }
  table.gl-money th, table.gl-money td{ font-size:12px; padding:3px 5px; }
  #contents.contents-genba-list{
    max-width:none; width:100%;
    padding-left:8px; padding-right:8px;
    box-sizing:border-box;
  }
  #contents.contents-genba-list .gl-wrap{ width:100%; }
  #contents.contents-genba-list table.gl-table{
    border-collapse:separate;
    border-spacing:0 12px;
  }
  #contents.contents-genba-list table.gl-table > tbody > tr.gl-site-card > td{
    border:1px solid #b8b8b8;
    border-top:2px solid #555;
    background:#fff;
  }
  #contents.contents-genba-list table.gl-table > tbody > tr.gl-site-card > td.gl-td-site{
    border-left:3px solid var(--brand);
  }
}

/* ===== 管理者専用 ===== */
#view-admin, #view-sysadmin, #view-mgmt{ max-width:1280px; margin:0 auto; }
#view-mgmt .mgmt-controls{ width:100%; }
.admin-menu{ display:flex; gap:18px; flex-wrap:wrap; margin-top:22px; }
.admin-menu a{ text-decoration:none; }
.msg-edit-wrap{ max-width:760px; }
.msg-toolbar{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; background:#f3f3f3; border:1px solid #ddd; border-bottom:none; border-radius:6px 6px 0 0; padding:8px 10px; font-size:13px; }
.mt-btn{ background:#fff; border:1px solid #ccc; border-radius:4px; width:30px; height:28px; cursor:pointer; }
.mt-btn-wide{ width:auto; padding:0 12px; }
.mt-sel{ padding:4px; border:1px solid #ccc; border-radius:4px; }
.msg-editor{ min-height:140px; border:1px solid #ddd; border-radius:0 0 6px 6px; padding:14px; font-size:15px; line-height:1.6; outline:none; background:#fff; }
.admin-big{ padding:28px 44px; font-size:18px; }
.sys-wrap{ display:flex; gap:24px; align-items:flex-start; flex-wrap:wrap; }
.sys-list{ flex:1; min-width:340px; }
.sys-table{ width:100%; border-collapse:collapse; }
.sys-table th, .sys-table td{ border:1px solid #ddd; padding:8px 10px; font-size:14px; text-align:left; }
.sys-table th{ background:var(--brand); color:#fff; }
.sys-form{ width:300px; flex-shrink:0; background:#eef6fb; border:1px solid #d6e9f5; border-radius:8px; padding:16px; }
.sys-form .form-group{ margin-bottom:10px; }
.sys-form label{ display:block; font-size:13px; margin-bottom:4px; color:#555; }
.sys-form input, .sys-form select{ width:100%; padding:8px; border:1px solid #ccc; border-radius:5px; font-size:14px; box-sizing:border-box; }
.btn-mini{ background:#f4f4f4; border:1px solid #ccc; border-radius:4px; padding:2px 8px; font-size:12px; cursor:pointer; margin-left:4px; }
.btn-sm{ padding:3px 10px; font-size:12px; border:none; border-radius:4px; cursor:pointer; color:#fff; }
.btn-edit{ background:var(--brand); }
.btn-del{ background:#e53935; margin-left:4px; }
.btn-move{ background:#888; padding:2px 6px; margin:0 1px; }
.sys-table tr[draggable]{ cursor:grab; }
.sys-table td.drag-handle{ text-align:center; color:#999; cursor:grab; font-size:16px; user-select:none; }
.sys-table tr.drag-over td{ border-top:2px solid var(--brand); }
.mgmt-emp-list{ border:1px solid #ddd; border-radius:6px; padding:10px 14px; max-height:220px; overflow:auto; max-width:460px; }
.mgmt-emp-list label{ display:block; font-size:14px; padding:4px 0; cursor:pointer; }
.mgmt-emp-list input{ margin-right:8px; }
.mgmt-select-row{
  display:grid;
  grid-template-columns:minmax(260px, 420px) minmax(0, 1fr);
  gap:24px;
  align-items:start;
  width:100%;
}
.mgmt-emps{ min-width:0; }
.mgmt-unsub-panel{
  min-width:0;
  width:100%;
  background:#fff;
  border:1px solid #d8d8d8;
  border-left:4px solid #ef6c00;
  border-radius:6px;
  padding:0;
  box-sizing:border-box;
}
.mgmt-unsub-panel.ok{ border-left-color:#43a047; }
.mgmt-unsub-panel .up-head{
  font-weight:bold;
  font-size:15px;
  color:#333;
  background:#f5f5f5;
  border-bottom:1px solid #e0e0e0;
  padding:10px 14px;
  margin:0;
}
.mgmt-unsub-panel.ok .up-head{ background:#f1f8f4; border-bottom-color:#c8e6c9; color:#2e7d32; }
.mgmt-unsub-panel .up-list{
  list-style:none;
  margin:0;
  padding:12px 14px;
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(120px, 1fr));
  gap:8px 12px;
  max-height:none;
  overflow:visible;
}
.mgmt-unsub-panel .up-list li{
  padding:7px 10px;
  font-size:14px;
  color:#333;
  background:#fafafa;
  border:1px solid #e8e8e8;
  border-radius:4px;
  line-height:1.35;
}
.mgmt-unsub-panel.ok .up-body{
  padding:12px 14px;
  font-size:14px;
  color:#2e7d32;
}
@media (max-width:760px){
  .mgmt-select-row{ grid-template-columns:1fr; gap:16px; }
  .mgmt-emp-list{ max-width:none; width:100%; }
  .mgmt-unsub-panel .up-list{ grid-template-columns:repeat(auto-fill, minmax(100px, 1fr)); }
}
.mgmt-saveall-btn{ position:fixed; right:24px; bottom:24px; z-index:6000; background:var(--brand); color:#fff; border:none;
  border-radius:30px; padding:14px 30px; font-size:16px; font-weight:bold; cursor:pointer; box-shadow:0 4px 14px rgba(0,0,0,.25); }
.mgmt-saveall-btn:hover{ background:var(--brand-dark); }
.mgmt-saveall-btn:disabled{ opacity:.7; cursor:default; }
.mgmt-emp-block{ margin-bottom:30px; }
.mgmt-emp-head{ font-size:16px; font-weight:bold; background:#eef6fb; padding:8px 12px; border-left:5px solid var(--brand); margin-bottom:8px; }
table.mgmt-tbl{ width:100%; border-collapse:collapse; font-size:12px; }
table.mgmt-tbl th, table.mgmt-tbl td{ border:1px solid #bbb; padding:4px 6px; text-align:center; }
table.mgmt-tbl th{ background:#eef6fb; }
table.mgmt-tbl td.l{ text-align:left; }
table.mgmt-tbl td.sun{ color:#e53935; } table.mgmt-tbl td.sat{ color:#1e88e5; }

/* 印刷専用 */
#print-area{ display:none; }
.print-head{ font-size:15px; font-weight:bold; margin-bottom:6px; }
@media print {
  body > *{ display:none !important; }
  #print-area{ display:block !important; }
  .print-page{ page-break-after:always; padding:0; }
  .print-page:last-child{ page-break-after:auto; }
  table.mgmt-tbl{ font-size:11px; }
  @page{ size:A4 portrait; margin:12mm; }
}
table.mgmt-edit input.me{ width:100%; border:1px solid #cfcfcf; border-radius:2px; padding:4px 5px; font-size:12px; box-sizing:border-box; text-align:center; background:transparent; }
table.mgmt-tbl tr.mrow-sun > td, table.mgmt-edit tr.mrow-sun > td{ background:#fdf0f0; }
table.mgmt-tbl tr.mrow-sat > td, table.mgmt-edit tr.mrow-sat > td{ background:#f1f8fe; }
table.mgmt-edit input.me:focus{ background:#fffde7; outline:2px solid var(--brand); }
table.mgmt-edit td{ padding:2px 3px; }
.me-selected{ outline:2px solid var(--brand) !important; outline-offset:-2px; background:#e8f4fd; }

/* ===== ページ共通レイアウト補助 ===== */
.page-wrap{ animation:none; }
.toast{ position:fixed; bottom:24px; left:50%; transform:translateX(-50%); background:#333; color:#fff; padding:12px 22px; border-radius:6px; font-size:14px; z-index:9998; opacity:0; pointer-events:none; transition:opacity .2s; }
.toast.show{ opacity:1; }

/* =====================================================================
   スマホ画面専用レイアウト（PC表示は一切変更しない。max-width:700px のみ）
   ===================================================================== */
.mobile-only{ display:none; }

@media (max-width:700px){
  .desktop-only{ display:none !important; }

  /* ---- カレンダー画面：前月／翌月ボタンが折り返さないように ---- */
  .cal-head{ gap:8px; }
  .cal-head #cal-prev, .cal-head #cal-next{ flex-shrink:0; white-space:nowrap; padding:8px 10px; font-size:13px; }
  .cal-head h3{ min-width:0; font-size:19px; }
  table.calendar td{ padding:4px 2px; }
  .cal-daynum{ font-size:15px; }
  .cal-badge{ font-size:10.5px; margin-top:3px; letter-spacing:-0.03em; }
  .cal-holiday, .cal-pto-name{ font-size:9px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .mobile-only{ display:block; }

  /* ---- 前日／翌日ナビ：折り返さず一行に収める ---- */
  .detail-day-nav{ gap:6px; flex-wrap:nowrap; }
  .detail-day-label{ min-width:0; font-size:14px; }
  .btn-day-nav{ flex-shrink:0; padding:7px 10px; font-size:12.5px; }

  /* ---- ヘッダーロゴ：ロゴ＋ハンバーガーを横並びにする ---- */
  .logo-container{
    display:flex; align-items:center; justify-content:space-between;
    padding:10px 14px;
  }
  .logo-container .logo{ font-size:16px; letter-spacing:0; line-height:1.3; white-space:nowrap; }
  .logo-container .logo-co, .logo-container .logo-sys{ font-size:16px; }
  .hamburger-btn{ border-left:1px solid #7fd4f5 !important; padding-left:14px !important; }

  /* ---- ハンバーガーメニュー（スマホ用） ---- */
  .hamburger-btn{ display:flex !important; }
  nav.main-nav{ display:none !important; }

  /* ---- 運転日報・出勤簿：1画面に収めるためヘッダーとコンテンツを圧縮 ---- */
  body:has(#view-unten) .user-bar,
  body:has(#view-shukkan) .user-bar{ display:none; }
  body:has(#view-unten) .logo-container,
  body:has(#view-shukkan) .logo-container{ padding:5px 14px; }
  body:has(#view-unten) #contents,
  body:has(#view-shukkan) #contents{ padding-bottom:6px; }
  body:has(#view-unten) .mday-page-header,
  body:has(#view-shukkan) .mday-page-header{ padding:4px 14px; font-size:15px; letter-spacing:2px; margin-bottom:6px; }
  body:has(#view-unten) .mday-total-bar,
  body:has(#view-shukkan) .mday-total-bar{ padding:4px 10px; margin-bottom:6px; }
  body:has(#view-unten) .mday-datebar,
  body:has(#view-shukkan) .mday-datebar{ margin-bottom:2px; }
  body:has(#view-unten) .mday-actions,
  body:has(#view-shukkan) .mday-actions{ margin-bottom:4px; }
  body:has(#view-unten) .mitem,
  body:has(#view-shukkan) .mitem{ padding:4px 0; }
  body:has(#view-unten) .mday-submit,
  body:has(#view-shukkan) .mday-submit{ padding:9px; margin-bottom:6px; }

  /* ---- トップページ：項目名の左に水色の縦棒 ---- */
  .column-title{ border-left:4px solid var(--brand); padding-left:8px; }
  /* ---- トップページ：日付行の幅を内容に合わせ、削除ボタン右端を揃える ---- */
  #contents:has(.grid-container) .column-box .report-table{
    width:fit-content; max-width:100%; table-layout:auto;
  }
  #contents:has(.grid-container) .report-table th.td-date{
    padding-right:6px !important;
  }
  #contents:has(.grid-container) .td-date-row{
    display:grid; align-items:center; width:100%; min-width:0;
    gap:6px 8px; white-space:nowrap;
  }
  #contents:has(.grid-container) .td-date-row:not(.month-row){
    grid-template-columns:minmax(0,1fr) auto;
  }
  #contents:has(.grid-container) .td-date-row:not(.month-row) .date-link{
    min-width:0; overflow:hidden; text-overflow:ellipsis;
  }
  #contents:has(.grid-container) .td-date-row.month-row:not(.month-row-unten){
    grid-template-columns:minmax(0,1fr) auto;
  }
  #contents:has(.grid-container) .td-date-row.month-row-unten{
    grid-template-columns:minmax(0,1fr) auto auto;
  }
  #contents:has(.grid-container) .td-date-row .td-actions{
    justify-self:end; margin-left:0; padding-left:0;
  }
  #contents:has(.grid-container) .td-date-row.month-row-unten .km-total{
    justify-self:end; text-align:right; min-width:3.2em;
  }
  #contents:has(.grid-container) .btn-del-sm{
    min-width:40px; text-align:center; box-sizing:border-box;
  }

  /* ---- 全体：横幅をギリギリまで使う ---- */
  #contents{ padding-left:2px; padding-right:2px; }
  .report-card{ padding:8px 4px; margin-bottom:10px; }
  .detail-card .rc-head{ padding-left:2px; padding-right:2px; }

  /* ---- 業務改善日報：入力画面・一覧画面（項目名を上部表示にして横幅を活かす） ---- */
  table.kz-tbl, table.kz-tbl tbody, table.kz-tbl tr{ display:block; width:100%; }
  table.kz-tbl tr{ margin-bottom:6px; }
  table.kz-tbl td{ display:block; width:100%; box-sizing:border-box; border:none; }
  table.kz-tbl td.lbl{ width:100%; text-align:left; padding:6px 4px; white-space:nowrap; font-size:13px; }
  table.kz-tbl td.val{ padding:4px 2px 10px; }
  /* 「業務・実績」「本日の成果」ラベルを非表示にし、kz-subを青ラベル化 */
  tr.row-gyoumu-main > td.lbl,
  tr.row-gyoumu-achievement > td.lbl{ display:none; }
  tr.row-gyoumu-main .kz-sub,
  tr.row-gyoumu-achievement .kz-sub{
    display:block; width:100%; background:#4fa8d8; color:#fff;
    font-size:13px; font-weight:bold; padding:6px 4px; margin:0 0 4px;
  }
  tr.row-gyoumu-main .wide,
  tr.row-gyoumu-main .narrow,
  tr.row-gyoumu-achievement .wide,
  tr.row-gyoumu-achievement .narrow{ width:100%; }
  tr.row-gyoumu-main .wide textarea,
  tr.row-gyoumu-achievement .wide textarea{ width:100%; }
  .kz-wrap{ padding:0; }
  .kz-titlebar{ padding:13px 14px; font-size:17px; }
  .detail-card .ro-box{ padding:5px 6px; }

  /* ---- 現場管理日報：一覧画面（1現場＝1カード、工程・金の動きは2列） ---- */
  .gl-wrap{ overflow-x:visible; }
  table.gl-table{ display:block; width:100%; box-sizing:border-box; }
  table.gl-table > thead{ display:none; }
  table.gl-table > tbody{ display:block; width:100%; }
  table.gl-table > tbody > tr.gl-site-card{ display:block; width:100%; box-sizing:border-box;
    margin-bottom:14px; border:1px solid #888; border-radius:4px;
    overflow:hidden; background:#fff; box-shadow:0 1px 4px rgba(0,0,0,.08);
  }
  table.gl-table > tbody > tr.gl-site-card:last-child{ margin-bottom:8px; }
  table.gl-table > tbody > tr.gl-site-card > td{ display:block; width:100%; box-sizing:border-box; border:none; border-bottom:1px solid #d6eaf5; padding:12px 10px; }
  table.gl-table > tbody > tr.gl-site-card > td.gl-td-site{
    border-bottom:1px solid #b8b8b8; padding:10px 12px;
    border-left:3px solid var(--brand);
  }
  table.gl-table > tbody > tr.gl-site-card > td.gl-td-site .gl-site{ font-size:16px; margin-bottom:4px; }
  table.gl-table > tbody > tr.gl-site-card > td.gl-td-work{ border-bottom:1px solid #e2e2e2; }
  table.gl-table > tbody > tr.gl-site-card > td.gl-td-koutei,
  table.gl-table > tbody > tr.gl-site-card > td.gl-td-money{
    display:inline-block; vertical-align:top; box-sizing:border-box;
    border-bottom:none; padding:8px 4px;
  }
  /* 工程表の項目名の余白を詰め、その分「金の動き」表（数字）を広く */
  table.gl-table > tbody > tr.gl-site-card > td.gl-td-koutei{ width:30%; }
  table.gl-table > tbody > tr.gl-site-card > td.gl-td-money{ width:70%; overflow-x:auto; }
  /* 内側の工程表・金の動き表は通常の表レイアウトを維持 */
  table.gl-table table.gl-koutei,
  table.gl-table table.gl-money{ display:table; width:100%; border-collapse:collapse; table-layout:fixed; }
  table.gl-table table.gl-koutei tbody,
  table.gl-table table.gl-money thead,
  table.gl-table table.gl-money tbody{ display:table-row-group; }
  table.gl-table table.gl-koutei tr,
  table.gl-table table.gl-money tr{ display:table-row; }
  table.gl-table table.gl-koutei td,
  table.gl-table table.gl-money th,
  table.gl-table table.gl-money td{ display:table-cell; width:auto; vertical-align:middle; }
  .gl-work-2col{ display:flex; gap:6px; margin-top:0; }
  .gl-work-meta{ margin-bottom:5px; grid-template-columns:repeat(6, max-content); width:fit-content; max-width:100%; }
  .gl-work-meta > .gl-lbl,
  .gl-work-meta > .gl-val{ border-bottom:none; }
  .gl-work-left, .gl-work-right{ flex:1; min-width:0; border:1px solid #ccc; }
  .gl-field{
    grid-template-columns:max-content minmax(0, 1fr);
    border:none;
    border-bottom:1px solid #ccc;
  }
  .gl-field:last-child{ border-bottom:none; }
  .gl-lbl{ width:auto; min-width:5.2em; font-size:11px; padding:3px 4px; }
  .gl-val{ font-size:11px; padding:3px 4px; }
  /* 作業内容の左右ボックスは、列内の最長項目名（雨天時の対応／資材及び数量＝6文字）に右端を揃える */
  .gl-work-left .gl-lbl, .gl-work-right .gl-lbl{ width:7em; min-width:0; }
  .gl-td-money > .gl-field{
    border:1px solid #ccc;
    margin-top:6px;
  }
  /* 項目名セルは文字幅ぴったりに縮める（auto レイアウト + nowrap） */
  .gl-td-koutei table.gl-koutei{ table-layout:auto; }
  .gl-td-koutei .kl{ width:1%; white-space:nowrap; font-size:7px; padding:1px 1px; line-height:1.05; text-align:left; }
  .gl-td-koutei .kv{ width:auto; font-size:7px; padding:1px 1px; }
  .gl-td-koutei table.gl-koutei td{ padding:1px 0; }
  /* 金額の数字は改行させない（最優先）。項目名は「工事原価」幅ぴったりに */
  .gl-td-money table.gl-money{ table-layout:auto; }
  .gl-td-money table.gl-money th,
  .gl-td-money table.gl-money td{ font-size:8px; padding:2px 1px; line-height:1.2; text-align:right; white-space:nowrap; }
  .gl-td-money table.gl-money th{ font-size:7px; line-height:1.15; text-align:center; }
  .gl-td-money table.gl-money .ml{ font-size:8px; text-align:left; padding:2px 1px; width:1%; white-space:nowrap; }
}

/* ---- 運転日報・出勤簿：スマホ用の1日ずつの入力カード ---- */
.mday-wrap{ max-width:440px; margin:0 auto; padding:0 10px; box-sizing:border-box; touch-action:pan-y; }
.mday-page-header{ background:var(--brand); color:#fff; font-size:18px; font-weight:bold; letter-spacing:3px; padding:9px 16px; border-radius:6px; margin-bottom:8px; text-align:center; }
.mday-total-bar{ background:#eef6fb; color:#0089c7; font-weight:bold; font-size:13px; padding:6px 10px; border-radius:8px; margin-bottom:8px; text-align:center; }
.mday-datebar{ display:flex; align-items:center; gap:8px; margin-bottom:4px; }
.mday-nav{ flex-shrink:0; width:40px; height:40px; border:1px solid #ccc; background:#f7f7f7; border-radius:8px; font-size:18px; color:#333; cursor:pointer; }
.mday-nav:active{ background:#e6e6e6; }
.mday-date-wrap{ flex:1; display:flex; align-items:center; justify-content:center; gap:8px; background:#fff; border:1px solid #ccc; border-radius:8px; padding:6px 10px; min-width:0; }
.mday-date-wrap input[type=date]{ border:none; font-size:15px; flex:0 1 auto; min-width:0; background:transparent; }
.mday-dow{ font-size:13px; font-weight:bold; color:#333; white-space:nowrap; }
.mday-dow-sun{ color:#e53935; }
.mday-dow-sat{ color:#1e88e5; }
.mday-date-wrap input[type=date].mday-date-sun{ color:#e53935; }
.mday-date-wrap input[type=date].mday-date-sat{ color:#1e88e5; }
.mday-holiday{ text-align:center; font-size:11px; color:#e53935; min-height:14px; margin-bottom:4px; }
.mday-actions{ display:flex; gap:8px; margin-bottom:8px; }
.btn-sm-o{ flex:1; background:#fff; border:1px solid #999; color:#555; border-radius:8px; padding:7px; font-size:12.5px; cursor:pointer; }
.btn-sm-o:active{ background:#eee; }
.mday-card{ background:#fff; border:1px solid #e0e0e0; border-radius:10px; padding:0 12px; margin-bottom:12px; }
.mitem{ display:flex; align-items:center; gap:10px; padding:7px 0; border-bottom:1px solid #eee; }
.mitem:last-child{ border-bottom:none; }
.mlbl{ flex:0 0 5.6em; font-size:12.5px; font-weight:bold; color:#333; line-height:1.25; }
.mctrl{ flex:1; min-width:0; }
.mctrl input, .mctrl textarea{ width:100%; box-sizing:border-box; border:1px solid #ccc; border-radius:7px; padding:7px 9px; font-size:15px; font-family:inherit; }
.mctrl textarea.grid-field{ resize:none; overflow:hidden; }
.mctrl textarea:not(.grid-field){ resize:vertical; }
.mctrl-range{ display:flex; align-items:center; gap:6px; }
.mctrl-range input[type=time]{ flex:1; min-width:0; box-sizing:border-box; border:1px solid #ccc; border-radius:7px; padding:7px 6px; font-size:15px; font-family:inherit; }
.mtr-sep{ flex-shrink:0; color:#666; font-size:13px; }
.mctrl-unit{ display:flex; align-items:center; gap:6px; }
.mctrl-unit input{ flex:1; min-width:0; }
.mctrl-unit .unit-suffix{ flex-shrink:0; color:#666; font-size:14px; }
.mday-submit{ display:block; width:100%; background:var(--brand); color:#fff; border:none; border-radius:10px; padding:13px; font-size:15px; font-weight:bold; cursor:pointer; margin-bottom:16px; }
.mday-submit:active{ background:var(--brand-dark); }

/* ===== アプリ内確認ダイアログ ===== */
.app-confirm-overlay{
  position:fixed; inset:0; background:rgba(0,0,0,.45);
  display:none; align-items:center; justify-content:center;
  z-index:10000; padding:20px; box-sizing:border-box;
}
.app-confirm-overlay.show{ display:flex; }
.app-confirm-box{
  background:#fff; border-radius:8px; padding:24px 22px 20px;
  max-width:360px; width:100%; box-shadow:0 8px 32px rgba(0,0,0,.2);
}
.app-confirm-msg{
  margin:0 0 22px; font-size:16px; line-height:1.6; color:#222;
  text-align:center; white-space:pre-wrap;
}
.app-confirm-actions{
  display:flex; gap:10px; justify-content:center; flex-wrap:wrap;
}
.app-confirm-actions .app-confirm-cancel,
.app-confirm-actions .app-confirm-ok{
  min-width:120px; padding:11px 20px; font-size:15px; letter-spacing:0;
}

/* ===== ライトボックス ===== */
#_lb-overlay{
  position:fixed; inset:0; background:rgba(0,0,0,.92);
  display:none; align-items:center; justify-content:center;
  z-index:10000;
}
#_lb-overlay.show{ display:flex; }
.lb-img-wrap{
  display:flex; flex-direction:column; align-items:center;
  max-width:90vw; max-height:90vh;
}
#_lb-img{
  max-width:90vw; max-height:82vh; object-fit:contain;
  border-radius:4px; display:block;
}
.lb-counter{
  color:rgba(255,255,255,.7); font-size:14px; margin-top:10px; text-align:center;
}
.lb-close{
  position:fixed; top:14px; right:16px; width:42px; height:42px;
  background:rgba(255,255,255,.18); border:none; border-radius:50%;
  color:#fff; font-size:24px; cursor:pointer; line-height:1; padding:0;
  display:flex; align-items:center; justify-content:center; z-index:10001;
  transition:background .15s;
}
.lb-close:hover{ background:rgba(255,255,255,.35); }
.lb-nav{
  background:none; border:none; color:rgba(255,255,255,.8); font-size:72px;
  cursor:pointer; padding:0 20px; line-height:1; user-select:none;
  flex-shrink:0; transition:color .15s;
}
.lb-nav:hover{ color:#fff; }
@media(max-width:600px){
  .lb-nav{ font-size:48px; padding:0 10px; }
}

/* ===== ハンバーガーボタン ===== */
.hamburger-btn{
  display:none; flex-direction:column; justify-content:center; align-items:center;
  gap:5px; padding:8px 10px; background:none; border:none; cursor:pointer;
  flex-shrink:0; min-width:44px; min-height:44px;
}
.hamburger-btn span{
  display:block; width:24px; height:2px; background:var(--brand); border-radius:2px;
  transition:transform .25s, opacity .25s;
}
.hamburger-btn.open span:nth-child(1){ transform:translateY(7px) rotate(45deg); }
.hamburger-btn.open span:nth-child(2){ opacity:0; }
.hamburger-btn.open span:nth-child(3){ transform:translateY(-7px) rotate(-45deg); }

/* ===== スマホ用スライドインドロワー ===== */
.sp-nav-overlay{
  display:none; position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:5000;
}
.sp-nav-overlay.open{ display:block; }
.sp-nav-drawer{
  position:fixed; top:0; right:-320px; width:280px; max-width:85vw;
  height:100%; background:#fff; z-index:5001;
  transition:right .3s ease; overflow-y:auto;
  box-shadow:-4px 0 24px rgba(0,0,0,.25);
}
.sp-nav-drawer.open{ right:0; }
.sp-nav-head{
  background:var(--brand); display:flex; align-items:center; justify-content:flex-end;
  padding:4px 8px; min-height:44px;
}
.sp-nav-close{
  background:none; border:none; color:#fff; font-size:28px; cursor:pointer;
  padding:4px 10px; line-height:1;
}
.sp-nav-close:hover{ opacity:.8; }
.sp-nav-drawer ul{
  list-style:none; margin:0; padding:0;
}
.sp-nav-drawer li{
  border-bottom:1px solid #eee;
}
.sp-nav-drawer li a{
  display:block; padding:15px 20px; color:#333; text-decoration:none; font-size:15px;
}
.sp-nav-drawer li a:hover{ background:#f0f8ff; color:var(--brand); }
.sp-nav-drawer li.active a{ color:var(--brand); font-weight:bold; background:#f0f8ff; }

/* ===== 月次提出（出勤簿・運転日報） ===== */
.submitted-banner{
  background:#fff; border:1px solid #ddd; color:#555;
  border-radius:8px; padding:10px 14px; font-size:14px; font-weight:bold;
  margin:0 0 14px; line-height:1.5;
}
.btn-shukkan:disabled, .btn-unten:disabled, .mday-submit:disabled{
  background:#bbb; color:#fff; cursor:default;
}
.btn-shukkan:disabled:hover, .btn-unten:disabled:hover{ background:#bbb; }
.shukkan input:disabled, .shukkan textarea:disabled,
.mday-card input:disabled, .mday-card textarea:disabled{
  background:#f2f2f2; color:#666; -webkit-text-fill-color:#666; opacity:1;
}
.btn-sm-o:disabled{ opacity:.45; cursor:default; }

/* 管理者画面：提出状況バッジ・差し戻し */
.mgmt-sub-status{ margin-left:12px; font-weight:normal; white-space:nowrap; }
.sub-badge{
  display:inline-block; font-size:12px; font-weight:bold;
  border-radius:12px; padding:2px 10px; vertical-align:middle;
}
.sub-ok{ background:#e6f4ea; color:#2e7d32; border:1px solid #a5d6a7; }
.sub-none{ background:#fdecea; color:#c62828; border:1px solid #ef9a9a; }
.btn-unsubmit{
  margin-left:8px; background:#fff; color:#c62828; border:1px solid #c62828;
  border-radius:5px; padding:3px 12px; font-size:12px; font-weight:bold; cursor:pointer;
  vertical-align:middle;
}
.btn-unsubmit:hover{ background:#fdecea; }

/* ===== グリッド内の選択セル（宿泊・食事など 〇/空欄） ===== */
table.shukkan select.grid-select, table.mgmt-tbl select.grid-select{
  width:100%; border:none; background:transparent; font-size:12px;
  text-align:center; text-align-last:center; padding:3px 0; font-family:inherit; cursor:pointer;
  box-sizing:border-box; appearance:none; -webkit-appearance:none;
}
table.shukkan select.grid-select:focus, table.mgmt-tbl select.grid-select:focus{ background:#fffde7; outline:1px solid #00a0e9; }
.grid select.grid-select.range-sel{ background:#cfe8fb !important; }
.grid td.me-selected select.grid-select{ background:#eaf4fd; }
table.shukkan select.grid-select.fill-target, table.mgmt-tbl select.grid-select.fill-target{ background:#d8eefb; }
.mctrl select{
  width:100%; box-sizing:border-box; border:1px solid #ccc; border-radius:7px;
  padding:7px 9px; font-size:15px; font-family:inherit; background:#fff;
}

/* ===== 統合認証システム（IDP）用の上書き ===== */
/* 日報システム（水色）と一目で区別できるよう、IDPは紺色を基調にする */
:root{
  --brand:#1f3c88;
  --brand-dark:#162d68;
}
.idp-note{
  font-size:13px; color:#666; line-height:1.7; margin:14px 0 0;
}
.idp-target{
  background:#eef2fb; border:1px solid #ccd6ee; border-radius:6px;
  padding:10px 12px; margin-bottom:16px; font-size:13px; color:#33415c;
}
.idp-target b{ color:var(--brand); }
.idp-secret{
  background:#fffbe6; border:1px solid #f0d98a; border-radius:6px;
  padding:12px; margin:12px 0; font-size:13px; line-height:1.8; word-break:break-all;
}
.idp-secret code{
  display:block; background:#fff; border:1px solid #e0d0a0; border-radius:4px;
  padding:8px; margin-top:6px; font-family:Consolas,Menlo,monospace; font-size:12px;
}
.idp-card{
  border:1px solid #e0e0e0; border-radius:8px; padding:16px; margin-bottom:14px; background:#fff;
}
.idp-card h3{ margin:0 0 10px; color:var(--brand); font-size:16px; }
.idp-card dl{ margin:0; font-size:13px; }
.idp-card dt{ color:#888; margin-top:8px; }
.idp-card dd{ margin:2px 0 0; word-break:break-all; font-family:Consolas,Menlo,monospace; }
.badge-off{ background:#eee; color:#888; border-radius:10px; padding:1px 8px; font-size:11px; }
.badge-on{ background:#e8f5e9; color:#2e7d32; border-radius:10px; padding:1px 8px; font-size:11px; }
