@charset "utf-8";
/* ============================================================
 * Listoru 企業データベース - モダンUI デザインシステム
 * STEP1: ブランド変数 / トークン / 共通コンポーネント
 * すべて .lst- 名前空間配下に閉じ、既存CSSと干渉しないようにする
 * ============================================================ */

:root {
	/* ブランドカラー（ロゴ準拠：ネイビー→ブルー） */
	--lst-navy:        #15264a;
	--lst-navy-2:      #27457e;
	--lst-blue:        #2f5fa6;
	--lst-blue-light:  #3a6fc0;
	--lst-grad:        linear-gradient(110deg, #15264a 0%, #27457e 55%, #3a6fc0 100%);

	/* 面・背景 */
	--lst-bg:          #f4f6fb;
	--lst-surface:     #ffffff;
	--lst-surface-2:   #f3f7fd;

	/* テキスト */
	--lst-text:        #15264a;
	--lst-text-2:      #3a4a68;
	--lst-text-3:      #5a6a88;
	--lst-text-muted:  #9aa6bd;

	/* 罫線 */
	--lst-border:      rgba(20, 40, 77, 0.08);
	--lst-border-2:    rgba(20, 40, 77, 0.15);

	/* セマンティック */
	--lst-success-bg:  #e1f3ec; --lst-success-fg: #0f6e56;
	--lst-warning-bg:  #fbeed9; --lst-warning-fg: #ba7517;
	--lst-danger-bg:   #faece7; --lst-danger-fg:  #993c1d; --lst-danger-bd: #f0c4b3;
	--lst-info-bg:     #e7edf8; --lst-info-fg:    #2f5fa6;

	/* 角丸 */
	--lst-r-sm: 8px;
	--lst-r-md: 10px;
	--lst-r-lg: 14px;
	--lst-r-xl: 16px;

	--lst-font: "Noto Sans JP", "Hiragino Sans", "ヒラギノ角ゴシック", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
}

/* ---- アプリ全体レイアウト（サイドバー + メイン） ---- */
.lst-app {
	display: flex;
	min-height: 100vh;
	background: var(--lst-bg);
	font-family: var(--lst-font);
	color: var(--lst-text);
	-webkit-font-smoothing: antialiased;
}
.lst-app *,
.lst-app *::before,
.lst-app *::after { box-sizing: border-box; }

/* ---- サイドバー ---- */
.lst-sidebar {
	width: 220px;
	flex-shrink: 0;
	background: var(--lst-surface);
	border-right: 0.5px solid var(--lst-border);
	padding: 18px 14px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	position: sticky;
	top: 0;
	height: 100vh;
	overflow-y: auto;   /* メニューが画面より高いときサイドバー内をスクロール（下が切れない） */
}
.lst-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 4px 6px 18px;
}
.lst-brand img, .lst-brand svg { width: 32px; height: 32px; flex-shrink: 0; }
.lst-brand .lst-brand-name { font-size: 15px; font-weight: 700; color: var(--lst-navy); line-height: 1.1; }
.lst-brand .lst-brand-sub  { font-size: 10px; color: var(--lst-text-muted); letter-spacing: 1px; }

/* フルロゴ（マーク＋ワードマーク入り画像）を使う場合。
   β版バッジはロゴの右横ではなく下に置くため、この箇所だけ縦並びにする */
.lst-brand-full { flex-direction: column; justify-content: center; gap: 6px; padding: 6px 6px 16px; }
.lst-brand-full img { width: 176px; height: auto; }
.lst-brand-beta {
	display: inline-block;
	padding: 1px 9px;
	border-radius: 10px;
	background: linear-gradient(110deg,#2f5fa6,#4b82d6);
	color: #fff;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: .04em;
}

.lst-nav { display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.lst-nav a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 12px;
	border-radius: var(--lst-r-md);
	color: var(--lst-text-3);
	font-size: 13px;
	text-decoration: none;
	transition: background .15s, color .15s;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.lst-nav a:hover { background: var(--lst-surface-2); color: var(--lst-text); text-decoration: none; }
.lst-nav a.is-active { background: var(--lst-navy); color: #fff; }
.lst-nav a .ti, .lst-nav a i { font-size: 18px; flex: 0 0 auto; }
/* もっと見る（折りたたみ） */
.lst-nav-more { margin: 2px 0; }
.lst-nav-more > summary {
	list-style: none; cursor: pointer;
	display: flex; align-items: center; gap: 10px;
	padding: 9px 12px; border-radius: var(--lst-r-md);
	color: var(--lst-text-muted); font-size: 12.5px; font-weight: 500;
	user-select: none; white-space: nowrap;
}
.lst-nav-more > summary::-webkit-details-marker { display: none; }
.lst-nav-more > summary::after { content: "\ea5f"; font-family: "tabler-icons"; margin-left: auto; font-size: 15px; transition: transform .15s; }
.lst-nav-more[open] > summary::after { transform: rotate(180deg); }
.lst-nav-more > summary:hover { background: var(--lst-surface-2); color: var(--lst-text); }
.lst-nav-more > summary .ti { font-size: 18px; }
.lst-nav-more > a { margin-left: 6px; }

.lst-sidebar-foot {
	margin-top: auto;
	border-top: 0.5px solid var(--lst-border);
	padding-top: 12px;
	display: flex;
	align-items: center;
	gap: 10px;
}
.lst-avatar {
	width: 32px; height: 32px; border-radius: 50%;
	background: var(--lst-info-bg); color: var(--lst-navy);
	display: flex; align-items: center; justify-content: center;
	font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.lst-sidebar-foot .lst-u-name { font-size: 12.5px; color: var(--lst-text); }
.lst-sidebar-foot .lst-u-role { font-size: 10.5px; color: var(--lst-text-muted); }
.lst-logout { margin-left: auto; color: var(--lst-text-muted); font-size: 16px; }
.lst-logout:hover { color: var(--lst-danger-fg); }

.lst-logout-btn {
	display: flex; align-items: center; justify-content: center; gap: 8px;
	margin-top: 10px; padding: 10px 12px;
	border-radius: var(--lst-r-md);
	border: 0.5px solid var(--lst-border-2);
	background: var(--lst-surface);
	color: var(--lst-text-2);
	font-size: 13px; text-decoration: none;
	transition: background .15s, color .15s, border-color .15s;
}
.lst-logout-btn:hover { background: var(--lst-danger-bg); color: var(--lst-danger-fg); border-color: var(--lst-danger-bd); text-decoration: none; }
.lst-logout-btn .ti { font-size: 17px; }

/* ---- メイン ---- */
.lst-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lst-content { padding: 16px 18px 24px; display: flex; flex-direction: column; gap: 14px; }

/* ---- ウェルカムバナー ---- */
.lst-banner {
	border-radius: var(--lst-r-xl);
	background: var(--lst-grad);
	padding: 18px 22px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}
.lst-banner > div { min-width: 0; }   /* flex子要素を縮ませ、長い説明文が切れず折り返すように */
.lst-banner-title { font-size: 19px; font-weight: 700; color: #fff; }
.lst-banner-sub   { font-size: 12.5px; color: #c3d3ef; margin-top: 3px; overflow-wrap: anywhere; }
.lst-banner-tools { display: flex; gap: 10px; align-items: center; }
.lst-banner-search {
	display: flex; align-items: center; gap: 8px;
	background: rgba(255,255,255,0.15);
	border-radius: var(--lst-r-md);
	padding: 8px 12px; min-width: 200px;
}
.lst-banner-search input {
	background: transparent; border: none; outline: none;
	color: #fff; font-size: 13px; width: 100%; font-family: inherit;
}
.lst-banner-search input::placeholder { color: #d4e0f5; }
.lst-banner-search .ti { color: #d4e0f5; font-size: 17px; }
.lst-banner-icon {
	width: 38px; height: 38px; border-radius: var(--lst-r-md);
	background: rgba(255,255,255,0.15); color: #fff;
	display: flex; align-items: center; justify-content: center;
	font-size: 18px; cursor: pointer;
}
.lst-banner-btn {
	display: inline-flex; align-items: center; gap: 6px;
	font-family: var(--lst-font); font-size: 13px; font-weight: 500;
	color: #fff; background: rgba(255,255,255,0.15);
	border: 0.5px solid rgba(255,255,255,0.3); border-radius: var(--lst-r-md);
	padding: 9px 14px; cursor: pointer; white-space: nowrap;
	transition: background .15s;
}
.lst-banner-btn:hover { background: rgba(255,255,255,0.28); }
.lst-banner-btn .ti { font-size: 17px; }
.lst-banner-select {
	font-family: var(--lst-font); font-size: 13px;
	color: #fff; background: rgba(255,255,255,0.15);
	border: 0.5px solid rgba(255,255,255,0.3); border-radius: var(--lst-r-md);
	padding: 9px 12px; cursor: pointer; white-space: nowrap;
}
.lst-banner-select option { color: #15264a; }

/* ---- サマリーカード ---- */
.lst-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.lst-card {
	border-radius: var(--lst-r-lg);
	background: var(--lst-surface);
	border: 0.5px solid var(--lst-border);
	padding: 14px 16px;
}
.lst-card-head { display: flex; justify-content: space-between; align-items: center; }
.lst-card-label { font-size: 12px; color: var(--lst-text-muted); }
.lst-card-ico {
	width: 28px; height: 28px; border-radius: var(--lst-r-sm);
	display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.lst-card-val { font-size: 24px; font-weight: 700; color: var(--lst-navy); margin-top: 6px; }
.lst-card-note { font-size: 11px; color: var(--lst-text-muted); margin-top: 2px; }
.lst-card-note.up { color: var(--lst-success-fg); }

/* ---- パネル（テーブル等を内包する白カード） ---- */
.lst-panel {
	background: var(--lst-surface);
	border: 0.5px solid var(--lst-border);
	border-radius: var(--lst-r-xl);
	overflow: hidden;
}
.lst-panel-head {
	display: flex; align-items: center; gap: 8px;
	padding: 12px 16px;
	border-bottom: 0.5px solid var(--lst-border);
	flex-wrap: wrap;
}
.lst-panel-title { font-size: 14px; font-weight: 700; color: var(--lst-navy); margin-right: 6px; }
.lst-panel-body { padding: 14px 16px; }   /* パネル本文の共通余白（未定義だと端に貼り付くため） */
.lst-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---- ボタン ---- */
.lst-btn {
	display: inline-flex; align-items: center; gap: 6px;
	font-size: 12.5px; font-family: inherit;
	border-radius: var(--lst-r-md);
	border: 0.5px solid var(--lst-border-2);
	background: var(--lst-surface);
	color: var(--lst-text-2);
	padding: 8px 12px; cursor: pointer;
	transition: background .15s, border-color .15s, transform .05s;
	width: auto;
}
.lst-btn:hover { background: var(--lst-surface-2); }
.lst-btn:active { transform: scale(0.98); }
.lst-btn .ti, .lst-btn i { font-size: 16px; }
.lst-btn-primary { background: var(--lst-blue); border-color: var(--lst-blue); color: #fff; }
.lst-btn-primary:hover { background: var(--lst-navy-2); }
.lst-btn-danger { background: var(--lst-danger-bg); border-color: var(--lst-danger-bd); color: var(--lst-danger-fg); }
.lst-btn-danger:hover { background: #f6ddd2; }

/* ---- 選択数バッジ ---- */
.lst-selcount {
	margin-left: auto; font-size: 11.5px; color: var(--lst-text-3);
	background: #eef2f9; padding: 5px 10px; border-radius: 20px;
}
.lst-count {
	margin-left: auto; font-size: 11.5px; font-weight: 500; color: var(--lst-text-2);
	white-space: nowrap;
}
.lst-count + .lst-selcount { margin-left: 8px; }

/* ---- 状態チップ ---- */
.lst-chip { font-size: 10.5px; padding: 3px 8px; border-radius: 20px; display: inline-block; }
.lst-chip-registered { background: var(--lst-success-bg); color: var(--lst-success-fg); }
.lst-chip-pending    { background: var(--lst-warning-bg); color: var(--lst-warning-fg); }
.lst-chip-target     { background: var(--lst-info-bg);    color: var(--lst-info-fg); }

/* ---- ページネーション ---- */
.lst-pager {
	display: flex; align-items: center; justify-content: space-between;
	padding: 11px 16px; border-top: 0.5px solid var(--lst-border);
	font-size: 11.5px; color: var(--lst-text-3);
}
.lst-pager-btns { display: flex; gap: 6px; align-items: center; }
.lst-pager-btns .pg {
	width: 26px; height: 26px; border-radius: var(--lst-r-sm);
	border: 0.5px solid var(--lst-border-2);
	display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.lst-pager-btns .pg.active { background: var(--lst-navy); color: #fff; border-color: var(--lst-navy); }

/* モバイルのメニュー開閉トグル（PCでは非表示。スマホのみ下のメディアクエリで有効化） */
.lst-nav-toggle { display: none; }
.lst-nav-burger { display: none; }

/* ============================================================
 * スマホ／タブレット対応（レスポンシブ）
 * 既存のデスクトップ表示は変えず、狭い画面でのみ折り返す
 * ============================================================ */
@media (max-width: 820px) {
	/* サイドバーを上部バー＋ハンバーガーの縦ドロワーへ
	   （横1列だとアイコンが潰れて何か分からないため、タップで開く縦メニューにする） */
	.lst-app { flex-direction: column; }
	.lst-sidebar {
		width: 100%; height: auto; position: sticky; top: 0; z-index: 60;
		flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px;
		padding: 8px 12px; border-right: none; border-bottom: 0.5px solid var(--lst-border);
		background: var(--lst-surface);
	}
	/* モバイルはヘッダーが横1列。ここでβ版を下に積むとヘッダーが厚くなるので横並びに戻す */
	.lst-brand-full { flex-direction: row; align-items: center; gap: 6px; padding: 0; margin: 0 auto 0 0; }
	.lst-brand-full img { width: 116px; }

	/* ハンバーガーボタン（モバイルのみ表示） */
	.lst-nav-burger {
		display: inline-flex; align-items: center; gap: 6px; order: 2;
		padding: 9px 14px; border-radius: 10px; cursor: pointer;
		background: var(--lst-navy); color: #fff; font-weight: 700; font-size: 14px;
		-webkit-tap-highlight-color: transparent;
	}
	.lst-nav-burger .ti { font-size: 20px; }
	.lst-nav-burger .lst-burger-x { display: none; }
	.lst-nav-toggle:checked ~ .lst-nav-burger .lst-burger-open { display: none; }
	.lst-nav-toggle:checked ~ .lst-nav-burger .lst-burger-x { display: inline; }

	/* ナビは既定で隠し、チェックで縦ドロワー展開（アイコン＋文字を大きく・押しやすく） */
	.lst-nav {
		display: none; order: 4; width: 100%;
		flex-direction: column; gap: 2px; margin-top: 6px;
		max-height: 74vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
	}
	.lst-nav-toggle:checked ~ .lst-nav { display: flex; }
	.lst-nav a {
		display: flex; align-items: center; gap: 12px; width: 100%;
		white-space: normal; overflow: visible; text-overflow: clip;
		padding: 13px 14px; font-size: 15px; border-radius: 10px;
	}
	.lst-nav a .ti { font-size: 21px; width: 24px; text-align: center; flex: 0 0 auto; }

	/* 「もっと見る」はドロワー内では通常の折りたたみ（見出し表示＋子はインデント） */
	.lst-nav-more { display: block; width: 100%; margin: 0; }
	.lst-nav-more > summary {
		display: flex; align-items: center; gap: 12px; padding: 13px 14px;
		font-size: 15px; border-radius: 10px;
	}
	.lst-nav-more > summary .ti { font-size: 21px; width: 24px; text-align: center; }
	.lst-nav-more > a { margin-left: 0; padding-left: 40px; }

	/* 上部バーをすっきりさせるため、ユーザー情報ブロックはドロワー内へ集約せず非表示に */
	.lst-sidebar-foot { display: none; }
	.lst-logout-btn { order: 3; width: auto; margin: 0; padding: 9px 12px; }

	/* メイン領域 */
	.lst-content { padding: 12px 12px 20px; gap: 12px; }

	/* バナーは縦積み */
	.lst-banner { flex-direction: column; align-items: stretch; gap: 10px; }
	.lst-banner-tools { flex-wrap: wrap; }
	.lst-banner-search { flex: 1; }
	.lst-banner-search input { width: 100%; }

	/* カードは2列 */
	.lst-cards { grid-template-columns: repeat(2, 1fr); gap: 10px; }
	.lst-card-val { font-size: 20px; }

	/* パネルヘッダー／ツールバーは折り返し＋横スクロール可 */
	.lst-panel-head { gap: 6px; }
	.lst-toolbar { width: 100%; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
	.lst-toolbar .lst-btn, .lst-toolbar .lst-listsel { flex-shrink: 0; }
	.lst-count, .lst-selcount { margin-left: 0; }

	/* 一覧テーブルは横スワイプでスクロール */
	.dataTables_scrollBody { -webkit-overflow-scrolling: touch; }

	/* タップしやすいボタンサイズ */
	.lst-btn { padding: 9px 12px; font-size: 13px; }
	.lst-banner-btn { padding: 9px 14px; }

	/* モーダルを画面幅に収める */
	.inner_box { max-width: 94vw !important; }
	#popup_container { max-width: 94vw !important; }
}

@media (max-width: 480px) {
	.lst-cards { grid-template-columns: repeat(2, 1fr); }
	.lst-banner-title { font-size: 17px; }
	.lst-brand-full img { width: 96px; }
}

/* fancybox(1.3.4)の閉じる×。既定は枠の外(top/right:-15px)＋薄いスプライト画像で、しかも中身が空の<a>に
   JSが style="display:inline" を付与するため width/height も効かず見えにくい。枠内の濃紺の丸い×に作り替える。
   外枠(#fancybox-wrap)上にあるので、中身がスクロールしても右上に固定で残る。 */
#fancybox-close {
	display: flex !important;	/* 空<a>の inline(JSが付与) を上書き＋×を中央寄せ */
	align-items: center;
	justify-content: center;
	position: absolute !important;
	top: 8px !important;
	right: 8px !important;
	width: 34px !important;
	height: 34px !important;
	margin: 0 !important;
	padding: 0 !important;
	background: #15264a !important;	/* スプライト画像を上書き */
	border-radius: 50% !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .3) !important;
	opacity: 1 !important;
	z-index: 1106 !important;
	cursor: pointer;
}
#fancybox-close::after {
	content: "\00d7";	/* × （空<a>なので擬似要素で描画） */
	color: #fff;
	font-size: 24px;
	font-weight: 700;
	line-height: 1;
}
#fancybox-close:hover { background: #3a6fc0 !important; }
