@charset "UTF-8";

/* ---- 画面の大枠（モダンUI共通） ---- */

:root {
	--color-bg: #f8f9fa;
	--color-surface: #ffffff;
	--color-text: #333333;
	--color-text-muted: #5c5c5c;
	--color-heading: #1a1a2e;
	--color-brand: #4a4a4a;
	--color-primary: #0c0734;
	--color-primary-hover: #18104d;
	--color-primary-active: #070323;
	--color-border: #d0d5dd;
	--color-border-light: #e8eaed;
	--shadow-card: 0 4px 24px rgba(0, 0, 0, 0.08);
	--radius-card: 16px;
	--radius-control: 8px;
	--max-width: 1100px;
}

body {
	margin: 0;
	padding: 0;
	font-family: "Noto Sans JP", sans-serif;
	background-color: var(--color-bg);
	color: var(--color-text);
	min-height: 100vh;
}

a {
	color: var(--color-primary);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

/* ---- ヘッダー ---- */
header,
.site-header,
header.login-header {
	height: auto;
	width: 100%;
	background-color: var(--color-surface);
	padding: 16px 32px;
	box-sizing: border-box;
	border-bottom: 1px solid var(--color-border-light);
	position: relative;
	z-index: 2;
}

.site-header-inner,
.login-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	max-width: var(--max-width);
	margin: 0 auto;
	width: 100%;
	gap: 16px;
}

.site-brand,
.login-brand {
	font-size: 1.25rem;
	font-weight: 500;
	color: var(--color-brand);
	letter-spacing: 0.02em;
	flex-shrink: 0;
}

.site-header-nav,
.login-header-link {
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--color-primary);
}

.site-header-nav {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 8px;
	color: var(--color-text-muted);
}

.site-header-nav a {
	color: var(--color-primary);
	font-weight: 500;
}

.site-header-nav .pipeline {
	color: var(--color-border);
	margin: 0 4px;
}

/* 旧マークアップ互換（タイトル非表示・Partner表示はHTML側） */
header .content {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: center;
	max-width: var(--max-width);
	width: 100%;
	margin: 0 auto;
	padding: 0;
}

header .title {
	margin: 0;
	line-height: 1.4;
	font-size: 1.25rem;
	font-weight: 500;
	color: var(--color-brand);
}

header .user_info {
	margin: 0;
	line-height: 1.4;
	text-align: right;
	font-size: 0.95rem;
	color: var(--color-text-muted);
}

/* ---- メイン領域 ---- */
.app-body {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 24px 32px 48px;
	box-sizing: border-box;
}

/* メイン（検索＋記事）。ヘッダー内の .content とは別 */
body > .content {
	display: flex;
	flex-direction: row;
	justify-content: flex-start;
	align-items: stretch;
	gap: 24px;
	width: 100%;
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 24px 32px 48px;
	box-sizing: border-box;
}

body > .content > .content {
	padding: 0;
	margin: 0;
	flex: 1;
	min-width: 0;
	max-width: 100%;
}

.login {
	width: 100%;
}

/* ---- サイドバー（検索） ---- */
aside {
	width: 240px;
	flex-shrink: 0;
	background-color: var(--color-surface);
	border-radius: var(--radius-card);
	box-shadow: var(--shadow-card);
	padding: 20px;
	box-sizing: border-box;
}

aside .title {
	background-color: transparent;
	margin: 0 0 12px;
	padding: 0;
	font-weight: 700;
	font-size: 0.95rem;
	color: var(--color-heading);
}

aside .form {
	padding-left: 0;
}

aside form {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

aside input[type=text] {
	width: 100%;
	margin: 0;
	box-sizing: border-box;
}

aside select {
	margin: 0;
	width: 100%;
}

aside input[type=submit] {
	width: 100%;
	margin: 0;
}

/* ---- メインコンテンツ ---- */
article {
	flex: 1;
	min-width: 0;
	width: auto;
	padding: 24px 28px 28px;
	background-color: var(--color-surface);
	border-radius: var(--radius-card);
	box-shadow: var(--shadow-card);
	box-sizing: border-box;
	overflow-x: hidden;
}

/* ---- ログイン画面 ---- */
.page-login .login-main {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: calc(100vh - 80px);
	padding: 24px 16px 48px;
	box-sizing: border-box;
}

.page-login .content {
	padding: 0;
}

/* ---- フッター ---- */
footer {
	height: auto;
	min-height: 0;
	background-color: transparent;
	text-align: center;
	font-size: 0.75rem;
	color: var(--color-text-muted);
	padding: 0 32px 24px;
	line-height: 1.6;
}

.page-login footer {
	display: none;
}

/* ---- レスポンシブ ---- */
@media (max-width: 1100px) {
	body > .content {
		flex-direction: column;
		align-items: stretch;
		padding: 20px 16px 40px;
		gap: 16px;
	}

	body > .content > .content {
		flex: none;
		width: 100%;
	}

	aside,
	aside.search {
		width: 100%;
		max-width: none;
		flex-shrink: 1;
	}

	article {
		width: 100%;
		max-width: none;
		box-sizing: border-box;
	}
}

@media (max-width: 640px) {
	header,
	.site-header,
	header.login-header {
		padding: 12px 16px;
	}

	.site-header-inner,
	.login-header-inner,
	header .content {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}

	header .user_info,
	.site-header-nav {
		width: 100%;
		text-align: left;
		justify-content: flex-start;
		font-size: 0.875rem;
		line-height: 1.5;
		word-break: break-word;
	}

	.app-body,
	body > .content {
		padding: 16px 12px 32px;
	}

	article {
		padding: 18px 14px 20px;
	}

	.page-login .login-main {
		min-height: calc(100vh - 120px);
		padding: 16px 12px 32px;
		align-items: flex-start;
		padding-top: 24px;
	}
}

@media (max-width: 380px) {
	.site-brand,
	.login-brand,
	header .title {
		font-size: 1.1rem;
	}
}
