/* --------------------------------------------------------------------------
   アイデアノート - 画面の見た目

   ServerModule.CustomFiles に 'files/app.css' を登録してあるので、
   uniGUI(Ext JS) 側の CSS より後に読み込まれ、ここでの指定が勝つ。
   基調色 #2f6b4f（深い緑）は仮置き。
   -------------------------------------------------------------------------- */

/* ==== ログイン ============================================================= */
.login-title { font-size: 20px !important; font-weight: bold; color: #2f6b4f; }
.login-sub   { font-size: 13px !important; color: #555; }
.login-error { color: #c0392b !important; font-weight: bold; }

/* ==== ヘッダ =============================================================== */
.app-header { background: #2f6b4f !important; }
.app-header .x-autocontainer-innerCt { background: #2f6b4f; }
.app-title { font-size: 18px !important; font-weight: bold; color: #fff !important; }
.hdr-text  { color: #fff !important; }

/* ==== 左メニュー =========================================================== */
.nav-side { background: #f3f6f4; border-right: 1px solid #d6ded9; }
.nav { padding: 8px 0; font-size: 13px; }
.nav-ws { margin: 4px 12px 10px; padding: 6px 8px; border-radius: 4px; background: #e2ece6; color: #2f6b4f; font-weight: bold; }
.nav-head { margin: 16px 12px 4px; color: #7a8a80; font-size: 11px; font-weight: bold; letter-spacing: 0.1em; }
.nav-item { position: relative; padding: 9px 14px; cursor: pointer; border-left: 3px solid transparent; }
.nav-item:hover { background: #e4ede7; }
.nav-item.sel { background: #d6e6dc; border-left-color: #2f6b4f; font-weight: bold; }
.nav-item .x-fa { width: 22px; color: #2f6b4f; }
.badge { position: absolute; right: 10px; top: 8px; min-width: 18px; padding: 0 6px; border-radius: 9px; background: #d35400; color: #fff;
  font-size: 11px; line-height: 18px; text-align: center; font-weight: bold; }

/* ==== ページ共通 =========================================================== */
/* HTML の器（TUniHTMLFrame）。既定の Ext の背景色を消す */
.pane, .pane .x-panel-body, .pane .x-autocontainer-innerCt { background: #fff !important; }
.list .x-panel-body, .list .x-autocontainer-innerCt { background: #fbfcfb !important; }
.nav .x-panel-body, .nav .x-autocontainer-innerCt { background: #f3f6f4 !important; }
.toolbar { background: #fafbfa; border-bottom: 1px solid #e1e6e3; }
.page { padding: 14px 20px 30px; font-size: 13px; line-height: 1.6; color: #222; }
.page-title { margin: 6px 0 10px; font-size: 16px; font-weight: bold; color: #2f6b4f; }
.page h3 { margin: 18px 0 6px; font-size: 14px; color: #2f6b4f; border-bottom: 1px solid #e1e6e3; padding-bottom: 3px; }
.muted { color: #7f8c8d; }
.small { font-size: 12px; }
.err { color: #c0392b; }
.empty { padding: 30px 10px; color: #7f8c8d; text-align: center; line-height: 1.8; }
.dlg-strong { font-weight: bold; }

.chip { display: inline-block; padding: 0 8px; margin-right: 6px; border-radius: 10px; font-size: 11px; line-height: 18px;
  background: #ecf0f1; color: #555; white-space: nowrap; }
.chip.new { background: #fff3d6; color: #8a6100; }
.chip.run { background: #dbeafe; color: #1e4e8c; }
.chip.ok  { background: #dcf3e4; color: #1e6b3a; }
.chip.err { background: #fde2e1; color: #a12a20; }
.chip.gray { background: #ecf0f1; color: #7f8c8d; }
.tag { display: inline-block; margin: 0 4px 2px 0; padding: 0 7px; border-radius: 3px; background: #eef3f0; color: #4a6b58; font-size: 11px; }
.stars { color: #e08e0b; margin-right: 8px; letter-spacing: 1px; }
.cat { display: inline-block; margin-right: 8px; padding: 0 6px; border: 1px solid #c8d6cd; border-radius: 3px; font-size: 11px; color: #2f6b4f; }

.btn { display: inline-block; margin: 0 8px 6px 0; padding: 6px 14px; border-radius: 4px; border: 1px solid #c8d6cd; background: #fff;
  color: #2f6b4f !important; text-decoration: none; cursor: pointer; font-size: 13px; }
.btn:hover { background: #eef5f0; }
.btn.primary { background: #2f6b4f; border-color: #2f6b4f; color: #fff !important; }
.btn.primary:hover { background: #24563f; }
.btn.danger { color: #c0392b !important; border-color: #e6b8b3; }
.acts { margin: 10px 0 6px; }
.acts-cell { white-space: nowrap; }

table.grid { border-collapse: collapse; width: 100%; margin-bottom: 10px; }
table.grid th { background: #f1f5f2; color: #4a5a50; font-weight: normal; text-align: left; padding: 5px 8px; border-bottom: 1px solid #d6ded9; white-space: nowrap; }
table.grid td { padding: 6px 8px; border-bottom: 1px solid #eef1ef; vertical-align: top; }
table.grid tr.click { cursor: pointer; }
table.grid tr.click:hover td { background: #f3f8f5; }
table.grid.num td { text-align: right; white-space: nowrap; }
table.grid.num td.left { text-align: left; }
table.grid td.num { text-align: right; white-space: nowrap; }
table.kv th { text-align: left; color: #6b7b72; font-weight: normal; padding: 3px 14px 3px 0; vertical-align: top; white-space: nowrap; }
table.kv td { padding: 3px 0; }
.usage { color: #2f6b4f; }
.usage.warn { color: #b9770e; font-weight: bold; }
.usage.over { color: #c0392b; font-weight: bold; }
.queue-head { font-size: 12px; line-height: 26px; }
details { margin: 6px 0; padding: 6px 10px; border: 1px solid #e1e6e3; border-radius: 4px; }
summary { cursor: pointer; }
pre.skill-body { white-space: pre-wrap; background: #f8faf9; padding: 8px; border-radius: 4px; font-size: 12px; }
.pw { font-family: Consolas, monospace; font-size: 18px; font-weight: bold; background: #fff8dc; padding: 2px 8px; user-select: all; }

/* ==== 書く ================================================================= */
.write-top { background: #fafbfa; border-bottom: 1px solid #e1e6e3; }
.write-lead { font-weight: bold; color: #2f6b4f; }
.app-drop { outline: 3px dashed #2f6b4f; outline-offset: -6px; background: #eef5f0 !important; }
.pend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 30px; }
.pend-item { position: relative; display: inline-block; }
.pend-item img { height: 56px; border-radius: 4px; border: 1px solid #d6ded9; }
.pend-item a { position: absolute; right: -6px; top: -6px; width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 50%;
  background: #c0392b; color: #fff !important; text-decoration: none; font-size: 12px; }
.idea { margin: 0 0 10px; padding: 10px 12px; border: 1px solid #e1e6e3; border-radius: 6px; background: #fff; }
.idea.small { padding: 6px 10px; }
.idea-head { margin-bottom: 4px; }
.idea-head .del { float: right; color: #c0392b; font-size: 12px; }
.idea-body { font-size: 14px; }
.idea-note { margin-top: 4px; font-size: 12px; color: #4a6b58; }
.thumbs { margin-top: 6px; }
.thumb { height: 64px; margin: 0 6px 4px 0; border-radius: 4px; border: 1px solid #d6ded9; cursor: zoom-in; }
.thumb-none { display: inline-block; padding: 4px 8px; border: 1px solid #d6ded9; border-radius: 4px; cursor: pointer; }
.photo-full { text-align: center; padding: 10px; }
.photo-full img { max-width: 100%; }

/* ==== 一覧（カード・結果） ================================================= */
.list { background: #fbfcfb; }
.row { padding: 10px 14px; border-bottom: 1px solid #e8ece9; cursor: pointer; }
.row:hover { background: #f1f6f3; }
.row.sel { background: #dcebe2; }
.row-title { font-weight: bold; font-size: 13px; }
.row-sub { margin-top: 2px; font-size: 12px; }
.row-tags { margin-top: 2px; font-size: 11px; color: #7f8c8d; }

/* ==== カード・タスク・結果の中身 =========================================== */
.card-title { font-size: 18px; font-weight: bold; color: #1f3d2d; margin-bottom: 4px; }
.card-meta { margin-bottom: 6px; }
.card-detail p { margin: 4px 0; }
.card-detail ul { margin: 4px 0 4px 20px; padding: 0; }
.next { background: #fff8e6; padding: 8px 10px; border-left: 4px solid #e0a10b; }
.out-head { margin-bottom: 4px; }

/* Markdown を画面にしたもの */
.md { font-size: 14px; line-height: 1.75; max-width: 900px; }
.md h1 { font-size: 20px; margin: 18px 0 8px; color: #1f3d2d; }
.md h2 { font-size: 17px; margin: 18px 0 6px; color: #2f6b4f; border-bottom: 1px solid #d6ded9; padding-bottom: 2px; }
.md h3, .md h4, .md h5, .md h6 { font-size: 15px; margin: 14px 0 4px; color: #2f6b4f; border: 0; }
.md p { margin: 6px 0; }
.md ul, .md ol { margin: 4px 0 8px 22px; padding: 0; }
.md blockquote { margin: 6px 0; padding: 4px 12px; border-left: 4px solid #c8d6cd; color: #555; background: #f8faf9; }
.md pre { background: #f4f6f5; padding: 8px 10px; border-radius: 4px; overflow-x: auto; }
.md code { background: #f0f3f1; padding: 0 4px; border-radius: 3px; font-family: Consolas, monospace; font-size: 13px; }
.md pre code { background: none; padding: 0; }
.md table.md { border-collapse: collapse; margin: 8px 0; }
.md table.md th, .md table.md td { border: 1px solid #d6ded9; padding: 4px 8px; }
.md table.md th { background: #f1f5f2; }
.md hr { border: 0; border-top: 1px solid #d6ded9; margin: 14px 0; }

/* ==== スマホ =============================================================== */
.m-login-head { padding: 20px 16px 8px; }
.m-login-title { font-size: 22px; font-weight: bold; color: #2f6b4f; }
.m-login-sub { margin-top: 4px; color: #555; }
.m-login-error { padding: 0 16px; color: #c0392b; font-weight: bold; }
.m-field { margin: 0 12px; }

.m-head { background: #2f6b4f; color: #fff; }
.m-head-row { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 10px; }
.m-app { font-weight: bold; font-size: 16px; }
.m-back { color: #fff !important; text-decoration: none; font-size: 15px; }
.m-ws, .m-ws-name { flex: 1; min-width: 0; font-size: 13px; }
.m-ws { padding: 3px; border-radius: 4px; border: 0; }
.m-ws-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: right; }
.m-logout { color: #d9eadf !important; font-size: 12px; text-decoration: none; }
.m-tabs { display: flex; background: #24563f; }
.m-tab { flex: 1; text-align: center; padding: 12px 0 11px; color: #cfe3d6 !important; text-decoration: none; font-size: 14px; border-bottom: 3px solid transparent; }
.m-tab.sel { color: #fff !important; font-weight: bold; border-bottom-color: #f5c242; }
.m-page { padding: 10px 12px 40px; font-size: 14px; line-height: 1.6; }
.m-sec { margin-bottom: 10px; }
.m-title { margin: 12px 0 8px; font-size: 16px; font-weight: bold; color: #2f6b4f; }
.m-memo { width: 100%; box-sizing: border-box; height: 110px; padding: 8px; font-size: 16px; border: 1px solid #c8d6cd; border-radius: 6px; }
.m-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.m-row .btn { margin: 0; padding: 9px 14px; }
.m-form label { display: block; margin: 10px 0 4px; font-weight: bold; color: #4a5a50; font-size: 13px; }
.m-form input[type=text], .m-form textarea, .m-form select { width: 100%; box-sizing: border-box; padding: 8px; font-size: 16px;
  border: 1px solid #c8d6cd; border-radius: 6px; background: #fff; }
.m-checks { border: 1px solid #e1e6e3; border-radius: 6px; padding: 4px 8px; max-height: 220px; overflow-y: auto; }
.m-form label.chk { display: block; margin: 6px 0; font-weight: normal; color: #222; font-size: 14px; }
.btn.wide { display: block; margin-top: 16px; text-align: center; padding: 12px; font-size: 16px; }
.app-toast { position: fixed; left: 50%; top: 16px; transform: translateX(-50%); z-index: 99999; background: #333; color: #fff;
  padding: 10px 16px; border-radius: 6px; font-size: 14px; max-width: 90%; }

/* ---- 素材（2026-11-12） ---- */
.chip.mat { background: #efe6fb; color: #5b3a8c; }
.idea-title { font-weight: bold; color: #2f6b4f; margin: 2px 0; }
.idea-tags { margin-top: 4px; }
.url { margin: 4px 0; word-break: break-all; }
.url a { color: #1e4e8c; }
.files { margin: 6px 0; }
.file { display: inline-block; margin: 0 8px 4px 0; padding: 3px 10px; border: 1px solid #c8d6cd; border-radius: 4px;
        background: #fafcfb; color: #2f6b4f; text-decoration: none; font-size: 12px; }
.file:hover { background: #eef5f0; }
.pend-file { display: inline-block; margin: 0 8px 6px 0; padding: 4px 8px; border: 1px dashed #b9c9bf; border-radius: 4px;
             background: #fff; font-size: 12px; vertical-align: top; }
.pend-file a { margin-left: 6px; color: #c0392b; text-decoration: none; font-weight: bold; }
.tagcloud { padding: 10px 12px 6px; border-bottom: 1px solid #e1e6e3; line-height: 2; }
.tagcloud .tag { cursor: pointer; text-decoration: none; font-size: 12px; padding: 1px 8px; }
.tagcloud .tag:hover { background: #dce9e1; }
.tagcloud .tag.sel { background: #2f6b4f; color: #fff; }
.tagcloud .tag .n { margin-left: 4px; color: #8aa596; font-size: 10px; }
.tagcloud .tag.sel .n { color: #cfe3d7; }
.mat-cond { padding: 4px 12px; }
.m-in { display: block; width: 100%; box-sizing: border-box; margin: 6px 0; padding: 8px; font-size: 15px;
        border: 1px solid #c8d6cd; border-radius: 4px; }
.m-row .m-in { display: inline-block; width: 65%; margin-right: 6px; }

/* 固定の安全ルール（Skill 画面） */
.guard-box { margin: 0 0 12px; padding: 8px 12px; border: 1px solid #d9c8a0; border-radius: 4px; background: #fffaf0; }

/* ==== スマホ（レスポンシブ。2026-11-13。幅 768px 未満 = uAppTypes.MobileMaxWidth） ====================
   Touch の画面はやめ、PC と同じ画面で並べ方だけ変える（Main.ApplyShell・各ページの FMobile）。 */
/* 上のメニュー（横に並べ、はみ出したら横にスクロール） */
.m-strip-box, .m-strip-box .x-panel-body, .m-strip-box .x-autocontainer-innerCt { background: #f3f6f4 !important; }
.m-strip { display: flex; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; height: 46px;
           border-bottom: 1px solid #d6ded9; box-sizing: border-box; }
.m-tab { position: relative; flex: 0 0 auto; padding: 0 14px; line-height: 45px; font-size: 14px; color: #2f6b4f !important; cursor: pointer;
         white-space: nowrap; border-bottom: 3px solid transparent; }
.m-tab .x-fa { margin-right: 5px; color: #2f6b4f; }
.m-tab.sel { font-weight: bold; border-bottom-color: #2f6b4f; background: #e2ece6; }
.m-tab .badge { position: static; display: inline-block; margin-left: 4px; vertical-align: 1px; }
/* 中身の先頭の「← 一覧へ」 */
.m-back { position: sticky; top: 0; z-index: 2; padding: 10px 14px; background: #f3f6f4; border-bottom: 1px solid #d6ded9;
          color: #2f6b4f !important; font-size: 14px; font-weight: bold; cursor: pointer; }
@media (max-width: 767px) {
  .page { padding: 10px 12px 24px; font-size: 14px; }
  .page img { max-width: 100%; height: auto; }
  .btn { padding: 8px 14px; font-size: 14px; }
  .app-title { font-size: 16px !important; }
  /* 幅の広い表は、その表だけ横にスクロール */
  table.grid { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* 列を潰さない（狭すぎると 1 文字ずつ折り返して縦に長くなる）。はみ出した分は横にスクロール */
  table.grid td { min-width: 110px; max-width: 240px; }
  table.grid td.acts-cell, table.grid.num td { min-width: 0; }
  .queue-head { line-height: 1.5; font-size: 12px; }
}
/* ダイアログのチェックの一覧（長い名前は 1 行で切る。折り返すと次の行と重なる） */
.dlg-checks .x-form-cb-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dlg-checks .x-form-cb-wrap-inner { overflow: hidden; }

/* AI に頼む（uDlgTask）: 何をしてほしいかのチップと送るボタン */
.chip-btn.x-btn { border-radius: 16px; background: #fff; border: 1px solid #c8d6cd; }
.chip-btn.x-btn .x-btn-inner { color: #2f6b4f; font-weight: normal; }
.chip-btn.x-btn:hover { background: #eef5f0; }
.chip-btn.chip-on.x-btn { background: #2f6b4f; border-color: #2f6b4f; }
.chip-btn.chip-on.x-btn .x-btn-inner { color: #fff; font-weight: bold; }
.btn-send.x-btn { background: #2f6b4f; border-color: #2f6b4f; }
.btn-send.x-btn .x-btn-inner, .btn-send.x-btn .x-btn-icon-el { color: #fff; font-weight: bold; }
