* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	background: #f5f5f5;
	color: #333;
	line-height: 1.6;
}

/* ===== App Layout (Sidebar + Main) ===== */
.app-layout {
	display: flex;
	min-height: 100vh;
}

/* ===== Sidebar ===== */
.sidebar {
	width: 220px;
	background: #1a1a2e;
	color: #ccc;
	display: flex;
	flex-direction: column;
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	z-index: 50;
	transition: width 0.2s ease;
	overflow: hidden;
}

.sidebar.collapsed {
	width: 56px;
}

.sidebar-header {
	padding: 0.75rem;
	border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-brand {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	text-decoration: none;
	color: #fff;
	font-weight: 700;
	font-size: 1.1rem;
	padding: 0.25rem 0.35rem;
}

.sidebar-brand-icon {
	width: 28px;
	height: 28px;
	background: #3b82f6;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.9rem;
	font-weight: 800;
	flex-shrink: 0;
}

.sidebar-brand-text {
	white-space: nowrap;
	overflow: hidden;
}

.sidebar.collapsed .sidebar-brand-text {
	display: none;
}

/* Nav list */
.sidebar-nav {
	list-style: none;
	flex: 1;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 0.5rem 0;
}

/* Nav icon */
.nav-icon {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

/* Link styles */
.sidebar-link {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.5rem 0.75rem;
	margin: 1px 0.5rem;
	border-radius: 6px;
	color: #b0b0c0;
	text-decoration: none;
	font-size: 0.85rem;
	white-space: nowrap;
	border: none;
	background: none;
	cursor: pointer;
	width: calc(100% - 1rem);
	text-align: left;
	font-family: inherit;
	transition: background 0.15s, color 0.15s;
}

.sidebar-link:hover {
	background: rgba(255,255,255,0.08);
	color: #fff;
}

.sidebar-link.active {
	background: rgba(59,130,246,0.2);
	color: #93c5fd;
}

.sidebar-link-text {
	overflow: hidden;
	white-space: nowrap;
}

.sidebar.collapsed .sidebar-link-text {
	display: none;
}

/* Submenu links */
.sidebar-link.sub {
	padding-left: 2.5rem;
	font-size: 0.82rem;
}

.sidebar.collapsed .sidebar-link.sub {
	padding-left: 0.75rem;
}

/* Group / Accordion */
.sidebar-group {
	list-style: none;
}

/* 親項目（トップレベル）を子項目と背景色で区別して視認性を上げる */
.sidebar-nav > .sidebar-group > .sidebar-group-toggle,
.sidebar-nav > .sidebar-item > .sidebar-link {
	background: rgba(255,255,255,0.06);
	color: #e6e6f0;
	font-weight: 600;
}

.sidebar-nav > .sidebar-group > .sidebar-group-toggle:hover,
.sidebar-nav > .sidebar-item > .sidebar-link:hover {
	background: rgba(255,255,255,0.12);
	color: #fff;
}

.sidebar-nav > .sidebar-group.open > .sidebar-group-toggle {
	background: rgba(59,130,246,0.22);
	color: #cdddff;
}

/* アクティブ状態は親背景より優先 */
.sidebar-nav > .sidebar-item > .sidebar-link.active {
	background: rgba(59,130,246,0.2);
	color: #93c5fd;
}

/* 子項目（サブメニュー）はひとまとまりの暗いブロックとして表示 */
.sidebar-nav > .sidebar-group > .sidebar-submenu {
	background: rgba(0,0,0,0.22);
	margin: 1px 0.5rem;
	border-radius: 6px;
}

.sidebar.collapsed .sidebar-nav > .sidebar-group > .sidebar-submenu {
	background: none;
}

/* ドラッグ＆ドロップ並び替え（親項目） */
.sidebar-nav > [data-menu-id] > .sidebar-link {
	cursor: grab;
}

.sidebar-nav > [data-menu-id].dragging {
	opacity: 0.5;
}

.sidebar-chevron {
	width: 14px;
	height: 14px;
	margin-left: auto;
	flex-shrink: 0;
	transition: transform 0.2s;
}

.sidebar.collapsed .sidebar-chevron {
	display: none;
}

.sidebar-group.open > .sidebar-group-toggle .sidebar-chevron {
	transform: rotate(180deg);
}

.sidebar-submenu {
	list-style: none;
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.25s ease;
}

.sidebar-group.open > .sidebar-submenu {
	max-height: 2000px;
}

.sidebar.collapsed .sidebar-submenu {
	max-height: 0 !important;
}

/* Nested group */
.sidebar-group-nested > .sidebar-group-toggle {
	font-weight: 600;
	font-size: 0.82rem;
	opacity: 0.85;
}

.sidebar-group-nested > .sidebar-group-toggle .sidebar-chevron {
	width: 12px;
	height: 12px;
}

.sidebar-submenu-nested {
	padding-left: 0.5rem;
}

.sidebar-submenu-nested .sidebar-link.sub {
	font-size: 0.8rem;
}

/* Footer */
.sidebar-footer {
	border-top: 1px solid rgba(255,255,255,0.08);
	padding: 0.5rem 0;
	background: #16162a;
}

.sidebar-user {
	margin-bottom: 0.25rem;
	position: relative;
}

.sidebar-user-toggle {
	width: 100%;
	background: rgba(100,140,255,0.15);
	color: #a8c4ff;
}

/* Toggle button */
.sidebar-toggle-btn {
	color: #888;
}

.sidebar-toggle-btn:hover {
	color: #ccc;
}

.sidebar-toggle-icon {
	transition: transform 0.2s;
}

.sidebar.collapsed .sidebar-toggle-icon {
	transform: rotate(180deg);
}

/* ===== Main Content ===== */
.main-content {
	flex: 1;
	margin-left: 220px;
	min-height: 100vh;
	transition: margin-left 0.2s ease;
}

.sidebar.collapsed ~ .main-content {
	margin-left: 56px;
}

.container {
	max-width: 1400px;
	margin: 0 auto;
	padding: 2rem;
}

/* 横長テーブルなど、画面幅いっぱいを使いたいページ用（Layout の fluid プロパティで付与） */
.container.container-fluid {
	max-width: none;
}

/* ===== Common UI Components ===== */
h1 {
	margin-bottom: 1.5rem;
	font-size: 1.5rem;
}

h2 {
	margin-bottom: 1rem;
	font-size: 1.25rem;
}

.card {
	background: #fff;
	border-radius: 8px;
	padding: 1.5rem;
	margin-bottom: 1rem;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1rem;
	margin-bottom: 2rem;
}

.stat-card {
	background: #fff;
	border-radius: 8px;
	padding: 1.5rem;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	text-align: center;
}

.stat-card .number {
	font-size: 2rem;
	font-weight: 700;
	color: #1a1a2e;
}

.stat-card .label {
	font-size: 0.85rem;
	color: #666;
	margin-top: 0.25rem;
}

table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

th, td {
	padding: 0.75rem 1rem;
	text-align: left;
	border-bottom: 1px solid #eee;
}

th {
	background: #f8f9fa;
	font-weight: 600;
	font-size: 0.85rem;
	color: #555;
	position: sticky;
	top: 0;
	z-index: 2;
}

tr:last-child td {
	border-bottom: none;
}

tr:hover td {
	background: #f8f9fa;
}

.badge {
	display: inline-block;
	padding: 0.2rem 0.6rem;
	border-radius: 12px;
	font-size: 0.75rem;
	font-weight: 600;
}

.badge-gray { background: #e9ecef; color: #495057; }
.badge-blue { background: #d0ebff; color: #1864ab; }
.badge-yellow { background: #fff3bf; color: #e67700; }
.badge-green { background: #d3f9d8; color: #2b8a3e; }
.badge-red { background: #ffe3e3; color: #c92a2a; }
.badge-purple { background: #e5dbff; color: #6741d9; }
.badge-dark { background: #dee2e6; color: #868e96; }

.alert-success {
	background: #d3f9d8;
	color: #2b8a3e;
	padding: 0.75rem 1rem;
	border-radius: 6px;
	margin-bottom: 1rem;
	font-weight: 500;
}

.alert-danger {
	background: #ffe3e3;
	color: #c92a2a;
	padding: 0.75rem 1rem;
	border-radius: 6px;
	margin-bottom: 1rem;
	font-weight: 500;
}

.alert-warning {
	background: #fff3bf;
	color: #e67700;
	padding: 0.75rem 1rem;
	border-radius: 6px;
	margin-bottom: 1rem;
	font-weight: 500;
}

.alert-warning a {
	color: #e67700;
	font-weight: 700;
}

.btn {
	display: inline-block;
	padding: 0.5rem 1rem;
	border: none;
	border-radius: 6px;
	font-size: 0.875rem;
	cursor: pointer;
	text-decoration: none;
	line-height: 1.5;
}

.btn-primary {
	background: #1a1a2e;
	color: #fff;
}

.btn-primary:hover {
	background: #16213e;
}

.btn:disabled, .btn-danger:disabled {
	background: #ced4da !important;
	color: #868e96 !important;
	cursor: not-allowed;
}

.btn-danger {
	background: #e03131;
	color: #fff;
}

.btn-danger:hover {
	background: #c92a2a;
}

.btn-warning {
	background: #f59f00;
	color: #fff;
}

.btn-warning:hover {
	background: #e67700;
}

.btn-sm {
	padding: 0.25rem 0.5rem;
	font-size: 0.8rem;
}

.form-group {
	margin-bottom: 1rem;
}

.form-group label {
	display: block;
	margin-bottom: 0.25rem;
	font-weight: 600;
	font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
	width: 100%;
	padding: 0.5rem 0.75rem;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 0.875rem;
	font-family: inherit;
}

.form-group textarea {
	min-height: 120px;
	resize: vertical;
}

/* .form-group の外（テーブルセル等）で使う汎用インプットスタイル */
.cell-input {
	padding: 0.4rem 0.6rem;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 0.875rem;
	font-family: inherit;
}

/* チケット分割ダイアログの入力テーブル。列が多く1列あたりが狭いため、
   セルと入力欄の余白を詰めて数値（工数・ギャラ）が読める幅を確保する */
.split-table th,
.split-table td {
	padding: 0.4rem 0.4rem;
}

.split-table .cell-input {
	padding: 0.3rem 0.4rem;
	width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

.form-inline {
	display: flex;
	gap: 0.5rem;
	align-items: end;
}

.form-inline .form-group {
	flex: 1;
	margin-bottom: 0;
}

.actions {
	display: flex;
	gap: 0.5rem;
	margin-top: 1rem;
}

.empty {
	text-align: center;
	padding: 3rem;
	color: #999;
}

a {
	color: #1864ab;
}

.section {
	margin-top: 2rem;
}

.breadcrumb {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.9rem;
	margin-bottom: 0.5rem;
}

.breadcrumb a {
	color: #495057;
	text-decoration: none;
}

.breadcrumb a:hover {
	color: #1864ab;
	text-decoration: underline;
}

.breadcrumb .breadcrumb-separator {
	color: #adb5bd;
}

.breadcrumb .breadcrumb-current {
	color: #868e96;
}

.header-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1.5rem;
}

.detail-grid {
	display: grid;
	grid-template-columns: 120px 1fr;
	gap: 0.5rem 1rem;
	margin-bottom: 1rem;
}

.detail-grid dt {
	font-weight: 600;
	font-size: 0.85rem;
	color: #666;
}

.detail-grid dd {
	font-size: 0.9rem;
}

.btn-secondary {
	background: #868e96;
	color: #fff;
}

.btn-secondary:hover {
	background: #495057;
}

.btn-info {
	background: #2196F3;
	color: #fff;
}

.btn-info:hover {
	background: #1976D2;
}

.btn-success {
	background: #2e7d32;
	color: #fff;
}

.btn-success:hover {
	background: #1b5e20;
}

dialog {
	margin: auto;
}

dialog::backdrop {
	background: rgba(0, 0, 0, 0.5);
}

.header-actions {
	display: flex;
	gap: 0.5rem;
}

.tabs {
	display: flex;
	gap: 0;
	border-bottom: 2px solid #dee2e6;
}

.tab {
	padding: 0.5rem 1.25rem;
	text-decoration: none;
	color: #495057;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
	font-weight: 500;
}

.tab:hover {
	color: #1864ab;
}

.tab-active {
	color: #1864ab;
	border-bottom-color: #1864ab;
}

.checkbox-group {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
}

.checkbox-label {
	display: flex;
	align-items: center;
	gap: 0.3rem;
	font-size: 0.875rem;
	font-weight: normal;
	cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
	width: auto;
}

.pagination {
	display: flex;
	gap: 4px;
	align-items: center;
	justify-content: center;
	margin-top: 16px;
	flex-wrap: wrap;
}

/* Spinner */
.spinner {
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 3px solid #ddd;
	border-top-color: #3b82f6;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

/* Workflow stepper */
.workflow-stepper {
	list-style: none;
	position: relative;
	padding-left: 0;
}

.workflow-step {
	display: flex;
	gap: 1rem;
	padding-bottom: 1.5rem;
	position: relative;
}

.workflow-step:last-child {
	padding-bottom: 0;
}

.workflow-step:not(:last-child)::before {
	content: '';
	position: absolute;
	left: 15px;
	top: 32px;
	bottom: 0;
	width: 2px;
	background: #dee2e6;
}

.workflow-step.step-completed:not(:last-child)::before {
	background: #2b8a3e;
}

.step-indicator {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.85rem;
	font-weight: 700;
	flex-shrink: 0;
	z-index: 1;
}

.step-completed .step-indicator {
	background: #2b8a3e;
	color: #fff;
}

.step-current .step-indicator {
	background: #1864ab;
	color: #fff;
	box-shadow: 0 0 0 4px #d0ebff;
}

.step-future .step-indicator {
	background: #e9ecef;
	color: #868e96;
}

.step-cancelled .step-indicator {
	background: #e03131;
	color: #fff;
}

.step-content {
	flex: 1;
}

.step-content h3 {
	font-size: 0.95rem;
	margin-bottom: 0.25rem;
}

.step-meta {
	font-size: 0.8rem;
	color: #868e96;
}

.step-action-card {
	background: #f8f9fa;
	border: 2px solid #1864ab;
	border-radius: 8px;
	padding: 1.25rem;
	margin-top: 0.75rem;
}

/* ===== ファイルアップロード ===== */
.dropzone {
	border: 2px dashed #ccc;
	border-radius: 12px;
	padding: 3rem 2rem;
	text-align: center;
	transition: border-color 0.2s, background 0.2s;
	cursor: pointer;
}
.dropzone:hover,
.dropzone-active {
	border-color: #1a1a2e;
	background: #f0f4ff;
}
.dropzone-content p {
	margin: 0.75rem 0;
	color: #666;
}
.upload-item {
	background: #f8f9fa;
	border: 1px solid #e9ecef;
	border-radius: 8px;
	padding: 0.75rem 1rem;
	margin-bottom: 0.5rem;
}
.upload-item-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 0.5rem;
}
.upload-filename {
	font-weight: 500;
	word-break: break-all;
}
.upload-size {
	color: #666;
	font-size: 0.875rem;
	white-space: nowrap;
	margin-left: 1rem;
}
.progress-bar-container {
	background: #e9ecef;
	border-radius: 4px;
	height: 8px;
	overflow: hidden;
	margin-bottom: 0.5rem;
}
.progress-bar {
	background: #1a1a2e;
	height: 100%;
	border-radius: 4px;
	transition: width 0.2s ease;
}
.progress-bar-done {
	background: #2b8a3e;
}
.upload-status {
	font-size: 0.8125rem;
	color: #666;
}

/* ===== Calendar Grid ===== */
.calendar-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1.5rem;
	margin-bottom: 1rem;
}
.calendar-nav a {
	text-decoration: none;
	color: #1a1a2e;
	font-weight: 600;
	padding: 0.3rem 0.8rem;
	border-radius: 6px;
	border: 1px solid #ddd;
}
.calendar-nav a:hover {
	background: #f0f0f0;
}
.calendar-nav .calendar-title {
	font-size: 1.25rem;
	font-weight: 700;
}
.calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	border: 1px solid #ddd;
	border-radius: 8px;
	overflow: hidden;
}
.calendar-header {
	background: #1a1a2e;
	color: #fff;
	text-align: center;
	padding: 0.5rem 0;
	font-size: 0.8125rem;
	font-weight: 600;
}
.calendar-header.sun {
	color: #ff6b6b;
}
.calendar-header.sat {
	color: #74c0fc;
}
.calendar-cell {
	min-height: 100px;
	border: 1px solid #eee;
	padding: 0.25rem;
	background: #fff;
	vertical-align: top;
}
.calendar-cell.other-month {
	background: #f9f9f9;
	color: #bbb;
}
.calendar-cell.today {
	background: #fff9db;
}
.calendar-date {
	font-size: 0.8125rem;
	font-weight: 600;
	padding: 0.15rem 0.3rem;
	margin-bottom: 0.2rem;
}
.calendar-date.sun {
	color: #e03131;
}
.calendar-date.sat {
	color: #1971c2;
}
.calendar-event {
	display: block;
	font-size: 0.7rem;
	padding: 0.15rem 0.35rem;
	margin-bottom: 0.15rem;
	border-left: 3px solid #1a1a2e;
	background: #eef;
	border-radius: 0 4px 4px 0;
	text-decoration: none;
	color: #333;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	cursor: pointer;
}
.calendar-event:hover {
	background: #ddf;
}
.calendar-event.cancelled {
	border-left-color: #aaa;
	background: #f5f5f5;
	color: #999;
	text-decoration: line-through;
}
.calendar-event.completed {
	border-left-color: #2b8a3e;
	background: #ebfbee;
}

/* ===== Dialog ===== */
dialog::backdrop {
	background: rgba(0, 0, 0, 0.4);
	cursor: pointer;
}
.base-dialog {
	border: none;
	border-radius: 8px;
	padding: 0;
	width: 90%;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}
.base-dialog-body {
	padding: 1.5rem;
}
.base-dialog-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
}

/* --- Close Button --- */
.dialog-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: none;
	border-radius: 50%;
	background: transparent;
	color: #888;
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}
.dialog-close:hover {
	background: #f0f0f0;
	color: #333;
}
.dialog-close:active {
	background: #e0e0e0;
}

/* デバッグモード バナー */
.debug-banner {
	background: #ff6b35;
	color: #fff;
	text-align: center;
	padding: 0.5rem;
	font-weight: 700;
	font-size: 0.9rem;
	border-radius: 6px;
	margin-bottom: 1rem;
}

/* メニュー権限画面: 固定保存バー */
.save-bar {
	position: sticky;
	bottom: 0;
	background: #fff;
	padding: 1rem 0;
	border-top: 1px solid #ddd;
	text-align: right;
	z-index: 10;
}

/* 権限マトリクステーブル */
.perm-matrix th,
.perm-matrix td {
	text-align: center;
	padding: 0.4rem 0.5rem;
	white-space: nowrap;
}
.perm-matrix td:first-child,
.perm-matrix th:first-child {
	text-align: left;
	font-weight: 500;
}
.perm-matrix input[type="checkbox"] {
	width: 18px;
	height: 18px;
	cursor: pointer;
}
.perm-group-row td:first-child {
	background: #f8f9fa;
}
.perm-child-row td:first-child {
	padding-left: 1.5rem;
	color: #888;
	font-size: 0.85rem;
}
.perm-child-row td {
	border-bottom: none;
	padding-top: 0.15rem;
	padding-bottom: 0.15rem;
}

/* Toggle switch */
label.toggle-switch {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	cursor: pointer;
	font-weight: normal;
	margin-bottom: 0;
}
.toggle-switch input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}
.toggle-slider {
	display: inline-block;
	width: 44px;
	height: 24px;
	min-width: 44px;
	background: #ced4da;
	border-radius: 12px;
	position: relative;
	transition: background 0.2s;
}
.toggle-slider::after {
	content: '';
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba(0,0,0,0.2);
	transition: transform 0.2s;
}
.toggle-switch input:checked + .toggle-slider {
	background: #339af0;
}
.toggle-switch input:checked + .toggle-slider::after {
	transform: translateX(20px);
}
.toggle-label-text {
	font-size: 0.95rem;
	color: #495057;
	user-select: none;
}

/* === AI資料作成 === */
.ai-doc-container {
	display: grid;
	grid-template-columns: 400px 1fr;
	gap: 1rem;
	height: calc(100vh - 140px);
	min-height: 500px;
}
.ai-doc-chat {
	display: flex;
	flex-direction: column;
	border: 1px solid #dee2e6;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}
.ai-doc-messages {
	flex: 1;
	overflow-y: auto;
	padding: 1rem;
}
.ai-doc-hint {
	color: #868e96;
	text-align: center;
	margin-top: 2rem;
	line-height: 1.8;
}
.ai-doc-msg {
	margin-bottom: 1rem;
}
.ai-doc-msg-role {
	font-size: 0.75rem;
	font-weight: 600;
	color: #868e96;
	margin-bottom: 0.25rem;
}
.ai-doc-msg-user .ai-doc-msg-content {
	background: #e7f5ff;
	border-radius: 8px;
	padding: 0.5rem 0.75rem;
	white-space: pre-wrap;
	word-break: break-word;
}
.ai-doc-msg-assistant .ai-doc-msg-content {
	background: #f8f9fa;
	border-radius: 8px;
	padding: 0.5rem 0.75rem;
	white-space: pre-wrap;
	word-break: break-word;
}
.ai-doc-loading {
	color: #868e96;
	animation: ai-doc-pulse 1.5s ease-in-out infinite;
}
@keyframes ai-doc-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.4; }
}
.ai-doc-input-area {
	display: flex;
	gap: 0.5rem;
	padding: 0.75rem;
	border-top: 1px solid #dee2e6;
	background: #f8f9fa;
	align-items: flex-end;
}
.ai-doc-input-area textarea {
	flex: 1;
}
.ai-doc-preview {
	display: flex;
	flex-direction: column;
	border: 1px solid #dee2e6;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}
.ai-doc-preview-header {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 0.75rem;
	font-size: 0.85rem;
	font-weight: 600;
	color: #495057;
	background: #f8f9fa;
	border-bottom: 1px solid #dee2e6;
}
.ai-doc-page-controls {
	display: flex;
	gap: 2px;
	margin-left: 0.5rem;
}
.ai-doc-page-btn {
	width: 28px;
	height: 28px;
	border: 1px solid #ced4da;
	border-radius: 4px;
	background: #fff;
	color: #495057;
	font-size: 0.8rem;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}
.ai-doc-page-btn:hover {
	background: #e9ecef;
}
.ai-doc-page-btn-active {
	background: #228be6;
	color: #fff;
	border-color: #228be6;
}
.ai-doc-page-btn-active:hover {
	background: #1c7ed6;
}
.ai-doc-preview-wrapper {
	flex: 1;
	position: relative;
	overflow: hidden;
	background: #e9ecef;
}
.ai-doc-preview-frame {
	border: none;
	width: 100%;
	height: 100%;
	background: #fff;
}
.ai-doc-view-btn-active {
	background: #228be6 !important;
	color: #fff !important;
	border-color: #228be6 !important;
}

/* ===== 行内の操作メニュー（⋯）: src/views/components/row-menu.tsx ===== */
.row-menu {
	position: relative;
	display: inline-block;
	vertical-align: middle;
}
.row-menu > summary {
	list-style: none;
	cursor: pointer;
	user-select: none;
	display: inline-block;
	padding: 0.25rem 0.5rem;
	font-size: 0.8rem;
	line-height: 1.5;
	border: 1px solid #ced4da;
	border-radius: 4px;
	background: #fff;
	color: #495057;
}
.row-menu > summary::-webkit-details-marker {
	display: none;
}
.row-menu > summary:hover {
	background: #f1f3f5;
}
.row-menu[open] > summary {
	background: #e9ecef;
	border-color: #adb5bd;
}
.row-menu-items {
	position: absolute;
	top: calc(100% + 4px);
	right: 0;
	z-index: 20;
	min-width: 170px;
	padding: 4px;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #dee2e6;
	border-radius: 6px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.row-menu-item {
	display: block;
	width: 100%;
	text-align: left;
	white-space: nowrap;
	background: none;
	border: none;
	border-radius: 4px;
	padding: 0.4rem 0.6rem;
	font-size: 0.85rem;
	color: #212529;
	cursor: pointer;
}
.row-menu-item:hover:not(:disabled) {
	background: #f1f3f5;
}
.row-menu-item:disabled {
	color: #adb5bd;
	cursor: not-allowed;
}
.row-menu-item-danger {
	color: #c92a2a;
}
.row-menu-item-danger:hover:not(:disabled) {
	background: #fff5f5;
}
