/* 
00 index.php
01 news/
02 news/detail.php
03 admin/usr.php

----------------------------------- */
main {
	max-width: 960px;
	margin: 0 auto;
	padding: 16px;
}
@media (min-width: 640px) {
	main {padding: 24px 16px;}
}
.posts-container {max-width: 896px;}


#loginInfo{
	padding: 10px 0;
	font-size: 12px;
}
#loginInfo div a{
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
	font-size: 12px;
	padding: 2px 6px;
	border:1px solid rgba(0,0,0,.14);
	border-bottom-width:2px;
	border-radius: 8px;
	background:#fff;
}
#instllDemo{
	padding: 10px;
	margin-bottom: 10px;
	border: 2px solid #f00;
	border-radius: 8px;
	font-size: 13px;
}
#instllDemo h2{
	margin-bottom: 10px;
	font-weight: normal;
	font-size: 16px;
}

/* 00 index.php
-------------------------------------------------- */

/* ウェルカムバナー -------------------------------------------------- */
.welcome-banner {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	background: white;
	border-radius: 12px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
	border: 1px solid #e5e7eb;
	margin-bottom: 16px;
}
@media (min-width: 640px) {
	.welcome-banner {
		margin-bottom: 24px;
	}
}
.welcome-banner h2{
	font-size: 14px;
	font-weight: 700;
	color: #1e293b;
}

.welcome-icon {
	width: 28px;
	height: 28px;
	flex:0 0 28px;
	background: linear-gradient(to bottom right, #f59e0b, #ea580c);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
}
.welcome-icon .material-symbols-outlined {font-size: 16px;}

/* 勤怠管理カード
-------------------------------------------------- */
.atd-btns {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
	margin-bottom: 16px;
}


.atd-display {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 24px;
	background: #f9fafb;
	border-radius: 8px;
	padding: 12px;
	margin-bottom: 12px;
}
.atd-display li.flx{flex: 0 0 90px;}
.atd-time{text-align: center;}
.atd-time dt{
	font-size: 12px;
	color: #6b7280;
}
.atd-time dd{
	font-size: 16px;
	font-weight: 700;
	color: #1f2937;
}
.atd-divider {
	width: 1px;
	height: 40px;
	background: #d1d5db;
}
.atd-time-icon {
	width: 28px;
	height: 28px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.check-in-icon {background: #d1fae5;}
.check-in-icon .material-symbols-outlined {
	font-size: 16px;
	color: #059669;
}
.check-out-icon {background: #f1f5f9;}
.check-out-icon .material-symbols-outlined {
	font-size: 16px;
	color: #64748b;
}

/* カテゴリセクション
-------------------------------------------------- */
.category-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.cat-btn {
	position: relative;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	background: #f3f4f6;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s;
	font-family: inherit;
}
.cat-btn:hover {background: #e5e7eb;}
.cat-btn.active {
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
	transform: scale(1.02);
}

.cat-icon {
	width: 28px;
	height: 28px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.7);
	transition: all 0.2s;
}
.cat-btn.active .cat-icon {
	background: white;
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.cat-icon .material-symbols-outlined {font-size: 16px; color: #1e293b;}
.cat-name {
	font-size: 14px;
	font-weight: 500;
	color: #4b5563;
	white-space: nowrap;
	transition: all 0.2s;
}
.cat-btn.active .cat-name {font-weight: 600;}

/* ▼business（業務連絡）
---------------------------------- */
#business.active {background: linear-gradient(to bottom right, #dbeafe, #bfdbfe);}
#business.active .material-symbols-outlined,
#business.active .cat-name {color: #2563eb;}

/* ▼ minutes（議事録）
---------------------------------- */
#minutes.active {background: linear-gradient(to bottom right, #f3e8ff, #e9d5ff);}
#minutes.active .material-symbols-outlined,
#minutes.active .cat-name {color: #9333ea;}

/* ▼ hr（人事）
---------------------------------- */
#hr.active {background: linear-gradient(to bottom right, #fef3c7, #fde68a);}
#hr.active .material-symbols-outlined,
#hr.active .cat-name {color: #d97706;}

/* ▼ training（育成）
---------------------------------- */
#training.active {background: linear-gradient(to bottom right, #ccfbf1, #99f6e4);}
#training.active .material-symbols-outlined,
#training.active .cat-name {color: #0d9488;}

/* ▼ manual（マニュアル）
---------------------------------- */
#manual.active {background: linear-gradient(to bottom right, #fed7aa, #fdba74);}
#manual.active .material-symbols-outlined,
#manual.active .cat-name {color: #ea580c;}

/* ▼ franchise（フランチャイズ）
---------------------------------- */
#franchise.active {background: linear-gradient(to bottom right, #e0e7ff, #c7d2fe);}
#franchise.active .material-symbols-outlined,
#franchise.active .cat-name {color: #4f46e5;}

/* ▼ executive（幹部限定）
---------------------------------- */
#executive.active {background: linear-gradient(to bottom right, #fef9c3, #facc15);}
#executive.active .material-symbols-outlined,
#executive.active .cat-name {color: #a16207;}


/* メッセージリスト
-------------------------------------------------- */
#messageList {
	display: flex;
	flex-direction: column;
}
.message-item a{
	display: flex;
	gap: 12px;
	padding: 12px;
	border-bottom: 1px solid #f3f4f6;
	cursor: pointer;
	border-radius: 8px;
	transition: all 0.2s;
}
.message-item:last-child {border-bottom: none;}
.message-item:hover {background: #f9fafb;}
/*.message-item.unread {background: rgba(219, 234, 254, 0.3);}*/

/* Avatar Base
--------------------------------- */
.avatar-container {
	position: relative;
	flex-shrink: 0;
}
.avatar {
	--avatar-color: #3b82f6; /* fallback */

	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	overflow: hidden;

	background: var(--avatar-color);
	color: #ffffff;
	font-weight: 600;
	font-size: 14px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
/* グラデーション重ね
--------------------------------- */
.avatar::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to bottom right,
		rgba(255,255,255,0.10),
		rgba(255,255,255,0.05)
	);
	pointer-events: none;
}

.unread-badge {
	position: absolute;
	top: -2px;
	right: -2px;
	width: 14px;
	height: 14px;
	background: linear-gradient(to bottom right, #f43f5e, #e11d48);
	border-radius: 50%;
	border: 2px solid white;
	display: flex;
	align-items: center;
	justify-content: center;
}
.unread-badge .material-symbols-outlined {
	font-size: 6px;
	color: white;
	font-variation-settings: 'FILL' 1, 'wght' 700, 'GRAD' 0, 'opsz' 20;
}

.message-content {
	flex: 1;
	min-width: 0;
}
.message-content dt {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 6px;
	flex-wrap: wrap;
}
.message-content dt > p {
	font-size: 14px;
	font-weight: 600;
	color: #1f2937;
}
.message-content dt > div {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	color: #6b7280;
}
.message-content dt > div .material-symbols-outlined {font-size: 12px;}
.message-content dd {
	font-size: 14px;
	color: #374151;
	transition: color 0.2s;
}
.message-item.unread .message-content dd {color: #1f2937;font-weight: 500;}
.message-item:hover .message-content dd {color: #1f2937;}

.new-badge {
	padding: 2px 6px;
	background: linear-gradient(to right, #f43f5e, #e11d48);
	color: white;
	font-size: 10px;
	font-weight: 600;
	border-radius: 9999px;
}


/*.viewall .material-symbols-outlined {transition: transform 0.2s;}
.viewall:hover .material-symbols-outlined {transform: translateX(4px);}
*/

/* 01 news/
-------------------------------------------------- */
/* フィルター ------------------------- */
.filters-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 8px;
	margin-bottom: 12px;
}

.filter-item {
	display: flex;
	flex-direction: column;
}
.filter-label {
	font-size: 12px;
	color: #6b7280;
	margin-bottom: 3px;
	font-weight: 500;
}

/* 投稿リスト ------------------------- */
.post-list {
	display: flex;
	flex-direction: column;
}
.post-item {
	padding: 16px 10px;
	border-bottom: 1px solid #f3f4f6;
	cursor: pointer;
	transition: all 0.2s;
}
.post-item:last-child {border-bottom: none;}
.post-item:hover {background: #f9fafb;}
.post-item .flx {align-items: start;}

/* .post-unread-indicator {
	flex-shrink: 0;
	width: 10px;
	padding-top: 4px;
}
.post-unread-dot {
	width: 10px;
	height: 10px;
	background: #f97316;
	border-radius: 50%;
} */

/* 未読indicator ------------------------- */
.post-item .flx{
	padding-left: 20px;
	position: relative;
}
.post-item.unread .flx:before{
	content: '';
	display: block;
	width: 10px;
	height: 10px;
	background: #f97316;
	border-radius: 50%;
	position: absolute;
	top: 3px;
	left: 0;
}

dl.post-details {
	flex: 1;
	min-width: 0;
}
dl.post-details dt{
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 4px;
	flex-wrap: wrap;
}
dl.post-details dt > span{
	display: inline-block;
	padding: 2px 8px;
	background: #ddd;
	color: #999;
	font-size: 12px;
	font-weight: 500;
	border-radius: 4px;
	display: -webkit-flex;
	display: flex;
	align-items: center;
}
dl.post-details dt > span .material-symbols-outlined{font-size: 18px;}

/* カテゴリ ------------------------- */
dl.post-details dt > span.badge_business  {background: #dbeafe; color: #2563eb;}
dl.post-details dt > span.badge_minutes   {background: #f3e8ff; color: #9333ea;}
dl.post-details dt > span.badge_hr        {background: #fef3c7; color: #d97706;}
dl.post-details dt > span.badge_training  {background: #ccfbf1; color: #0d9488;}
dl.post-details dt > span.badge_manual    {background: #fed7aa; color: #ea580c;}
dl.post-details dt > span.badge_franchise {background: #e0e7ff; color: #4f46e5;}
dl.post-details dt > span.badge_executive {background: #fef9c3; color: #a16207;}

dl.post-details dt > p{
	font-size: 14px;
	font-weight: 500;
	color: #374151;
}
dl.post-details dt > div{
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	color: #6b7280;
}
dl.post-details dt > div .material-symbols-outlined {font-size: 12px;}
dl.post-details dd {font-size: 14px;color: #374151;}
.post-item.unread dl.post-details dd {
	font-weight: 600;
	color: #1f2937;
}
.nopost{
	padding: 15px;
	font-size: 12px;
}

/* 02 news/detail.php
-------------------------------------------------- */
#meta{
	display: -webkit-flex;
	display: flex;
	flex-flow: row nowrap;
	justify-content: center;
	align-items: center;
	gap: 5px;
}
#meta li a{
	padding: 4px 10px;
	background: #f0f2ff;
	color: #333;
	font-size: 12px;
	border-radius: 4px;
	display: -webkit-flex;
	display: flex;
	flex-flow: row nowrap;
	align-items: center;
	gap: 5px;
}
#meta li a .material-symbols-outlined {font-size: 16px;}

/* カテゴリ ------------------------- */
#meta li a.badge_business  {background: #dbeafe; color: #2563eb;}
#meta li a.badge_minutes   {background: #f3e8ff; color: #9333ea;}
#meta li a.badge_hr        {background: #fef3c7; color: #d97706;}
#meta li a.badge_training  {background: #ccfbf1; color: #0d9488;}
#meta li a.badge_manual    {background: #fed7aa; color: #ea580c;}
#meta li a.badge_franchise {background: #e0e7ff; color: #4f46e5;}
#meta li a.badge_executive {background: #fef9c3; color: #a16207;}

#post{
	margin: 15px 0;
	padding: 15px 0;
	border-width: 1px 0;
	border-style: solid;
	border-color: #666;
}
#post a{
	color: #0c25f0;
	text-decoration: underline;
}
#post p{line-height: 1.6;}
#post img{
	max-width: 100%;
	height: auto;
}
#post iframe{max-width: 100%;}
#post ul,
#post ol{
	padding-inline-start: 24px;
	list-style: inherit;
}
p:empty::before {
	content: "\00a0";
}

/* readmodal
---------------------------------------  */
#readUsersModal{
 display:none;
 position:fixed;
 inset:0;
 z-index:9999;
}
#readUsersBackdrop{
	position:absolute;
	inset:0;
	background:rgba(0,0,0,.35);
}
#dialog{
	max-width:520px;
	padding: 10px;
	margin:10vh auto;
	background:#fff;
	border-radius:10px;
	box-shadow:0 10px 30px rgba(0,0,0,.25);
	overflow:hidden;
	position:relative;
}
#dialog .flx p{white-space: nowrap; flex:1; font-weight: bold;}
#dialog .flx button{flex: 0 0 8em;}
#dialog dl{
	padding: 10px 0 0;
	margin: 10px 0;
	border-top: 1px solid #eee;
}
#dialog dl dt{font-size: 14px;}
#dialog dl dd{padding: 5px 0;}

.formparts{margin-bottom: 10px;}
.formparts dt{
	margin-top: 10px;
	font-size: 12px;
	color: rgba(0,0,0,.65);
}
.formparts dd ul{
	padding: 10px;
	border: 1px solid rgba(0,0,0,.14);
	border-radius: 8px;
	font-size: 13px;
}
.formparts dd ul li{padding: 5px 0;}
#deleteForm{text-align: right;}
#deleteForm p{display: inline-block;}
#confirmDeleteDialog{
	max-width:520px;
	padding: 10px;
	margin:auto;
	background:#fff;
	border-radius:10px;
}

/* 03 admin/usr.php
-------------------------------------------------- */
#userlist{
	margin: 15px 0;
	display: -webkit-flex;
	display: flex;
	flex-flow: column;
	gap: 8px;
}
#userlist li{
	padding: 8px;
	border-radius: 8px;
	border: 1px solid rgba(0,0,0,.08);
	display: -webkit-flex;
	display: flex;
	flex-flow: row nowrap;
	align-items: center;
	gap: 5px;
}
#userlist li dl{
	flex: 1 1 auto;
	color: #1f2937;
	font-size: 14px;
}
#userlist li dl dt{font-weight: 600;}
#userlist li dl dd{font-weight: 500; font-size: 12px;}
#userlist li a{flex: 0;white-space: nowrap;}


/* 04 admin/usr_edit.php
-------------------------------------------------- */
.formlist li{margin: 8px 0;}
.formlist li dl{
	display: -webkit-flex;
	display: flex;
	flex-flow: row nowrap;
	align-items: center;
	gap: 8px;
}
.formlist li dl dt{
	flex: 0 0 6em;
	font-size: 12px;
	color: rgba(0,0,0,.65);
}

#ext_setting{
	margin-top: 8px;
	padding: 8px 0;
	border-top: 1px solid #000;
	font-size: 13px;
}
#ext_setting dt{
	margin-top: 5px;
	display: -webkit-flex;
	display: flex;
	flex-flow: row nowrap;
	border-bottom: 1px dashed #ccc;
}
#ext_setting dd{padding: 5px 0;}