/* SRS-Farben und -Typografie nach srs-design-guide, ohne Tailwind-Build */
:root {
	--primary:   #282824;
	--secondary: #BC002D;
	--bg:        #EEECE6;
	--beige:     #DDD6CC;
	--ok:        #2a7a2a;
	--radius:    8px;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--primary);
	font-family: 'Open Sans', system-ui, sans-serif;
	font-size: 15px;
}

h1, .brand {
	font-family: 'Noto Sans JP', system-ui, sans-serif;
	letter-spacing: 2px;
	font-weight: 500;
}

h1 { font-size: 1.5rem; margin: 0; }

.topbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 24px;
	background: var(--primary);
	color: #fff;
}

.topbar .logout { display: flex; gap: 16px; align-items: center; }

main { max-width: 1200px; margin: 0 auto; padding: 24px 16px; }

.card { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }

button, input { font: inherit; }

button {
	cursor: pointer;
	border-radius: var(--radius);
	border: 2px solid var(--primary);
	background: var(--primary);
	color: #fff;
	padding: 8px 16px;
	transition: opacity .2s, background .2s, color .2s;
}

button:hover:not(:disabled) { opacity: .9; }
button:disabled { opacity: .4; cursor: default; }

.topbar button { background: transparent; border-color: #fff; }

.btn-outline { background: #fff; color: var(--primary); }
.btn-outline:hover:not(:disabled) { background: var(--primary); color: #fff; opacity: 1; }

.progress-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.progress { height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; margin: 8px 0 24px; }
.progress div { height: 100%; width: 0; background: var(--secondary); transition: width .3s; }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tabs button { background: var(--beige); border-color: var(--beige); color: var(--primary); border-radius: 999px; padding: 4px 16px; }
.tabs button.active { background: var(--secondary); border-color: var(--secondary); color: #fff; }

.toolbar { display: flex; gap: 8px; margin-bottom: 16px; }
.toolbar input {
	flex: 1;
	padding: 8px 16px;
	border: 1px solid #ccc;
	border-radius: var(--radius);
}
.toolbar input:focus { outline: 2px solid var(--primary); border-color: transparent; }

.message { padding: 8px 16px; border-radius: var(--radius); background: var(--beige); }
.message.error { background: #fbe5ea; color: var(--secondary); }

table.contacts { width: 100%; border-collapse: collapse; }
.contacts th, .contacts td { text-align: left; padding: 8px; border-bottom: 1px solid #e6e3dc; }
.contacts th { font-weight: 500; font-size: .85rem; text-transform: uppercase; letter-spacing: 1px; }
.contacts .c { text-align: center; width: 110px; }
.contacts input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--secondary); cursor: pointer; }
.contacts tbody tr:hover { background: #faf9f6; }
.contacts .empty { text-align: center; color: #777; padding: 24px; }

.status-col { width: 260px; }
.status { font-size: .85rem; }
.status.ok { color: var(--ok); }
.status.error { color: var(--secondary); }
.status.saving { color: #777; }

.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; font-size: .9rem; }
.pager span:last-child { display: flex; gap: 8px; }

.login { max-width: 420px; margin: 48px auto; background: #fff; border-radius: 12px; padding: 32px; }
.login form { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; }
.login input { padding: 12px 16px; border: 1px solid #ccc; border-radius: var(--radius); }
.login .info { color: var(--ok); }
.login .error { color: var(--secondary); }
.login a { color: var(--secondary); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (max-width: 768px) {
	.contacts th:nth-child(2), .contacts td:nth-child(2) { display: none; }
	.contacts .c { width: auto; }
	.status-col { width: auto; }
}
