: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;
}
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:block; padding:14px 26px; color:#fff; text-decoration:none; }
nav.main-nav li:first-child{ border-left:1px solid rgba(255,255,255,.3); }
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:none; border-radius:4px;
  padding:10px 20px; font-size:15px; cursor:pointer;
}
.btn:hover{ background:var(--brand-dark); }
.btn.outline{ background:#fff; color:var(--brand); border:2px solid var(--brand); }
.btn.outline:hover{ background:#f0fbff; }
.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; }

/* ===== ログイン ===== */
#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{ white-space:nowrap; padding:11px 12px !important; display:flex; flex-direction:column; align-items:flex-start; gap:8px; }
.td-date .date-link{ font-size:15px; }
.td-main{ display:inline-flex; align-items:center; gap:6px; }
.btn-copy{ flex-shrink:0; background:var(--brand); color:#fff; border:none; border-radius:3px; padding:5px 12px; font-size:12px; cursor:pointer; white-space:nowrap; }
.btn-copy:hover{ background:var(--brand-dark); }
.td-actions{ display:inline-flex; gap:6px; flex-shrink:0; align-items:center; }
.btn-del-sm{ background:#e53935; color:#fff; border:none; border-radius:3px; padding:5px 10px; font-size:12px; cursor:pointer; white-space:nowrap; }
.btn-del-sm:hover{ background:#c62828; }
.report-table{ width:100%; 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 !important; text-align:center; }
.soon{ color:#aaa; font-size:13px; padding:22px !important; text-align:center; }

/* ===== カレンダー ===== */
.cal-head{ display:flex; align-items:center; justify-content:center; gap:20px; margin:10px auto 16px; max-width:810px; }
.cal-head h3{ margin:0; font-size:24px; color:#222; min-width:170px; text-align:center; }
table.calendar{ width:100%; max-width:810px; 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:inline-block; margin-top:6px; background:var(--brand); color:#fff; font-size:12px; padding:2px 8px; border-radius:10px; }
.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.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 #ffe0b2; background:#fff7e6; 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:11px 14px; font-size:14px; }
}

/* ===== 現場管理日報フォーム ===== */
: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; }
.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:1px solid #ccc; min-height:120px; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; padding:6px; gap:6px; }
.img-slot img{ max-width:100%; max-height:80px; object-fit:cover; }
.img-slot input[type=file]{ font-size:11px; width:100%; }

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:104px; 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:12px; }

/* ===== G-POP 編集画面 ===== */
:root{ --gpop:#00a0e9; --gpop-dark:#0089c7; }
.gpop-titlebar{ background:var(--gpop); 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:var(--gpop); 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-container{ background:var(--gpop); padding:22px; border-radius:4px; margin-top:24px; }
.gpop-goal-head{ background:#0e5f86; 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; } }

/* ===== 運転日報 編集画面 ===== */
: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; }
.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{ width:100%; border:none; background:transparent; font-size:12px; text-align:center; box-sizing:border-box; padding:4px 2px; }
table.shukkan input:focus{ background:#fffde7; outline:1px solid #00a0e9; }
table.shukkan input.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{ background:#d8eefb; }
.grid input{ cursor:default; }
.grid input.editing{ cursor:text; background:#fff; }
.grid td.me-selected input:not(.editing){ background:#eaf4fd; }
.grid input.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:var(--genba); 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:var(--genba); 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:240px; 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{ height:120px; }
table.kz-tbl textarea.h2{ height:140px; }
.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-create, #view-gpop{ max-width:900px; 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:36px; 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:20px; }
.detail-card table.ro-kz{ margin-top:0; }
.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; } }

.gl-title{ font-size:16px; font-weight:bold; color:#333; margin:4px 0 12px; }
.gl-wrap{ overflow-x:visible; }
table.gl-table{ width:100%; border-collapse:collapse; font-size:12px; table-layout:fixed; }
table.gl-table > thead th{ background:#3a3a3a; color:#fff; padding:9px 6px; font-size:13px; border:1px solid #555; }
table.gl-table > tbody td{ border:1px solid #cfcfcf; vertical-align:top; padding:9px 8px; word-break:break-word; }
.gl-site{ color:var(--brand); font-weight:bold; font-size:14px; margin-bottom:6px; }
.gl-site-link{ cursor:pointer; text-decoration:underline; }
.gl-site-link:hover{ color:var(--brand-dark); }
.gl-gaiyou{ white-space:pre-wrap; font-size:11.5px; color:#444; margin-bottom:8px; line-height:1.5; }
.gl-bar{ background:#666; color:#fff; text-align:center; padding:6px; font-size:12px; }
.gl-flow{ border:1px solid #ccc; border-top:none; min-height:42px; padding:6px; white-space:pre-wrap; font-size:11.5px; }
.gl-rec{ font-weight:bold; margin-bottom:6px; }
.gl-lbl{ font-weight:bold; margin-top:7px; }
.gl-val{ white-space:pre-wrap; line-height:1.5; }
.gl-uten{ border:1px solid #ccc; padding:5px; min-height:18px; white-space:pre-wrap; }
table.gl-koutei{ width:100%; border-collapse:collapse; }
table.gl-koutei td{ border:1px solid #ccc; padding:6px; }
table.gl-koutei .kl{ background:#f3f3f3; width:84px; font-weight:bold; }
table.gl-money{ width:100%; border-collapse:collapse; margin-bottom:8px; }
table.gl-money th, table.gl-money td{ border:1px solid #ccc; padding:3px 5px; text-align:right; font-size:11px; }
table.gl-money th{ background:#f3f3f3; text-align:center; }
table.gl-money .ml{ background:#f3f3f3; text-align:center; font-weight:bold; }
.gl-imglbl{ font-weight:bold; margin:6px 0 4px; }
.gl-img{ width:74px; height:58px; object-fit:cover; border:1px solid #ccc; margin:2px; cursor:pointer; }

/* ===== 管理者専用 ===== */
#view-admin, #view-sysadmin, #view-mgmt{ max-width:1100px; margin:0 auto; }
.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:flex; gap:20px; align-items:flex-start; flex-wrap:wrap; }
.mgmt-unsub-panel{ flex:1; min-width:200px; max-width:360px; background:#fff3e0; border:1px solid #ffe0b2; border-radius:8px; padding:10px 14px; }
.mgmt-unsub-panel.ok{ background:#e8f5e9; border-color:#c8e6c9; }
.mgmt-unsub-panel .up-head{ font-weight:bold; color:#e65100; border-bottom:1px solid #ffe0b2; padding-bottom:6px; margin-bottom:6px; }
.mgmt-unsub-panel.ok .up-head{ color:#2e7d32; border-color:#c8e6c9; }
.mgmt-unsub-panel .up-list{ list-style:none; margin:0; padding:0; max-height:220px; overflow:auto; }
.mgmt-unsub-panel .up-list li{ padding:3px 0; font-size:14px; color:#e65100; }
.mgmt-unsub-panel .up-list li span{ color:#999; font-size:12px; }
.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; }
