:root {
	--bg: #f4f6f9;
	--panel: #ffffff;
	--line: #d9e0e7;
	--text: #1f2d3d;
	--subtext: #5b6b7a;
	--primary: #1f4e79;
	--primary-dark: #173a5a;
	--shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
	--radius: 10px;
	--success-bg: #edf8ef;
	--success-text: #256c2f;
	--error-bg: #fff1f0;
	--error-text: #b42318;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
	background: var(--bg);
	color: var(--text);
}

.header {
	background: linear-gradient(135deg, var(--primary), var(--primary-dark));
	color: #fff;
	padding: 22px 32px;
	box-shadow: var(--shadow);
}

.header h1 {
	margin: 0;
	font-size: 28px;
	font-weight: 700;
}

.header p {
	margin: 8px 0 0;
	font-size: 14px;
	color: rgba(255,255,255,0.88);
}

.container {
	max-width: 1380px;
	margin: 28px auto;
	padding: 0 20px 40px;
}

.card {
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 22px;
	margin-bottom: 20px;
}

.card h2 {
	margin: 0 0 16px;
	font-size: 20px;
	border-left: 5px solid var(--primary);
	padding-left: 10px;
}

.top-buttons {
	margin-bottom: 16px;
}

.menu-button,
.action-button,
.link-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 8px 14px;
	border: 1px solid var(--primary);
	border-radius: 8px;
	background: #fff;
	color: var(--primary);
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.15s ease;
}

.menu-button:hover,
.action-button:hover,
.link-button:hover {
	background: var(--primary);
	color: #fff;
}

.action-button.primary {
	background: var(--primary);
	color: #fff;
}

.action-button.primary:hover {
	background: var(--primary-dark);
	border-color: var(--primary-dark);
}

.form-row {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: end;
}

.form-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 180px;
}

.form-field label {
	font-size: 13px;
	font-weight: 600;
	color: var(--subtext);
}

select,
input[type="text"],
input[type="number"],
input[type="date"],
input[type="file"] {
	height: 40px;
	padding: 8px 10px;
	border: 1px solid #c7d0d9;
	border-radius: 8px;
	background: #fff;
	font-size: 14px;
	color: var(--text);
}

input[type="file"] {
	padding: 6px 10px;
}

textarea {
	width: 100%;
	padding: 10px;
	border: 1px solid #c7d0d9;
	border-radius: 8px;
	background: #fff;
	font-size: 14px;
	color: var(--text);
}

select:focus,
input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="file"]:focus,
textarea:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(31, 78, 121, 0.12);
}

.notice {
	padding: 12px 14px;
	border-radius: 8px;
	margin-bottom: 16px;
	font-size: 14px;
}

.notice.success {
	background: var(--success-bg);
	color: var(--success-text);
	border: 1px solid #b7e0be;
}

.notice.error {
	background: var(--error-bg);
	color: var(--error-text);
	border: 1px solid #f3b5b2;
}

.info-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 10px 18px;
	margin-bottom: 12px;
}

.info-item {
	font-size: 14px;
}

.info-item strong {
	display: inline-block;
	min-width: 90px;
	color: var(--subtext);
}

.edit-inline-row {
	display: flex;
	flex-wrap: wrap;
	align-items: end;
	gap: 18px;
	margin-top: 12px;
}

.edit-actions {
	display: flex;
	gap: 12px;
	align-items: center;
	margin-left: 24px;
}

.table-wrap {
	overflow-x: auto;
}

table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border: 1px solid #dfe6ee;
}

th, td {
	border: 1px solid #dfe6ee;
	padding: 12px 10px;
	text-align: left;
	font-size: 14px;
	vertical-align: middle;
	white-space: nowrap;
}

th {
	background: #f8fafc;
	color: var(--text);
	font-weight: 700;
}

tr:hover td {
	background: #fbfdff;
}
.result-count {
	margin: 0 0 12px;
	font-size: 14px;
	color: var(--subtext);
}

.badge {
	display: inline-block;
	margin-bottom: 12px;
	padding: 4px 10px;
	border-radius: 999px;
	background: #eaf2fb;
	color: var(--primary);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.03em;
}

.footer-note {
	margin-top: 24px;
	font-size: 12px;
	color: #6c7a89;
	text-align: right;
}

@media (max-width: 640px) {
	.header {
		padding: 18px 20px;
	}

	.header h1 {
		font-size: 24px;
	}

	.container {
		padding: 0 14px 28px;
	}

	.card {
		padding: 18px;
	}

	.edit-actions {
		margin-left: 0;
	}
}