/* plan-admin.css: extracted from redeem-admin.php */

.admin-container {
	max-width: 1200px;
	margin: 2em auto;
	padding: 0 1em;
}

.admin-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 2em;
	padding-bottom: 1em;
	border-bottom: 2px solid #555;
}

.admin-header h1 {
	color: #ffd700;
	margin: 0;
}

.logout-btn {
	padding: 0.5em 1em;
	background: #ff6b6b;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	text-decoration: none;
	font-size: 0.9em;
}

.logout-btn:hover {
	background: #ff5252;
}

.stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1em;
	margin-bottom: 2em;
}

.stat-card {
	background: #3a3a3a;
	padding: 1.5em;
	border-radius: 8px;
	border-left: 4px solid #ffd700;
}

.stat-card h3 {
	color: #ffd700;
	margin: 0 0 0.5em 0;
	font-size: 0.9em;
	text-transform: uppercase;
}

.stat-card .value {
	font-size: 2em;
	color: #fff;
	font-weight: bold;
}

.section {
	margin-bottom: 2em;
}

.section h2 {
	color: #ffd700;
	border-bottom: 2px solid #555;
	padding-bottom: 0.5em;
	margin-bottom: 1em;
}

.menu-category {
	margin-bottom: 1.5em;
}

.menu-category h3 {
	color: #fff;
	margin: 0 0 1em 0;
}

.menu-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 1em;
}

.menu-card {
	background: #3a3a3a;
	padding: 1em;
	border-radius: 8px;
	border: 1px solid #555;
	transition: transform 0.2s;
}

.menu-card:hover {
	transform: translateY(-2px);
	border-color: #ffd700;
}

.menu-card.disabled {
	opacity: 0.5;
}

.menu-card-emoji {
	font-size: 2em;
	margin-bottom: 0.5em;
}

.menu-card-title {
	font-weight: bold;
	color: #fff;
	margin-bottom: 0.5em;
}

.menu-card-desc {
	color: #ccc;
	font-size: 0.9em;
	margin-bottom: 1em;
}

.menu-card-points {
	color: #ffd700;
	font-weight: bold;
	margin-bottom: 1em;
}

.menu-card form {
	display: flex;
	flex-direction: column;
}

.menu-card textarea {
	padding: 0.5em;
	background: #444;
	border: 1px solid #555;
	color: #fff;
	border-radius: 4px;
	margin-bottom: 0.5em;
	resize: vertical;
	font-size: 0.9em;
}

.menu-card textarea:focus {
	outline: none;
	border-color: #ffd700;
}

.menu-card button {
	padding: 0.6em;
	background: #ffd700;
	color: #000;
	border: none;
	border-radius: 4px;
	font-weight: bold;
	cursor: pointer;
	transition: background 0.3s;
}

.menu-card button:hover:not(:disabled) {
	background: #ffed4e;
}

.menu-card button:disabled {
	background: #999;
	cursor: not-allowed;
}

.alert {
	padding: 1em;
	border-radius: 4px;
	margin-bottom: 1em;
	border-left: 4px solid;
}

.alert.success {
	background: #4a5d4a;
	border-color: #7cb37c;
	color: #a3e8a3;
}

.alert.error {
	background: #5d4a4a;
	border-color: #d47575;
	color: #ff9999;
}

.history-table {
	width: 100%;
	border-collapse: collapse;
	background: #3a3a3a;
}

.history-table th {
	background: #444;
	padding: 1em;
	text-align: left;
	color: #ffd700;
	border-bottom: 2px solid #555;
}

.history-table td {
	padding: 1em;
	border-bottom: 1px solid #555;
	color: #ccc;
}

.history-table tr:hover {
	background: #444;
}

.toggle-btn {
	padding: 0.5em 1em;
	background: #444;
	color: #ccc;
	border: 1px solid #555;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.3s;
	font-size: 0.9em;
}

.toggle-btn:hover {
	background: #555;
}

.toggle-btn.active {
	background: #ffd700;
	color: #000;
	border-color: #ffd700;
	font-weight: bold;
}

.cleaning-section {
	animation: fadeIn 0.3s;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* タブ切り替え */
.tab-buttons {
	display: flex;
	gap: 0.5em;
	margin: 1em 0 1.5em;
}

.tab-btn {
	padding: 0.5em 1em;
	background: #444;
	color: #ccc;
	border: 1px solid #555;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.2s;
	font-size: 0.95em;
}

.tab-btn.active {
	background: #ffd700;
	color: #000;
	border-color: #ffd700;
	font-weight: bold;
}

.tab-content {
	display: none;
}

.tab-content.active {
	display: block;
}

/* カレンダー表示（planner と同等の簡易版） */
table.planner-calendar {
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse;
	margin-top: 1em;
}

table.planner-calendar th,
table.planner-calendar td {
	border: 1px solid #555;
	padding: 8px;
	text-align: center;
	vertical-align: top;
}

table.planner-calendar td.calendar-day {
	cursor: pointer;
}

table.planner-calendar td.calendar-day:hover {
	background-color: #4a4a4a;
}

table.planner-calendar th {
	background-color: #444;
	font-weight: bold;
}

table.planner-calendar .schedule-mark {
	display: inline-block;
	width: 1.8em;
	height: 1.8em;
	background-color: #555;
	border-radius: 4px;
	text-align: center;
	line-height: 1.8em;
	font-size: 1.1em;
	margin-top: 0.5em;
	font-weight: bold;
}

table.planner-calendar td.today {
	color: goldenrod;
	font-weight: bold;
}

table.planner-calendar td.past-day {
	opacity: 0.25;
}

.planner-legend {
	margin-top: 1em;
	padding: 1em 1.5em;
	background-color: #3a3a3a;
	border: 1px solid #555;
	border-radius: 5px;
	display: flex;
	flex-wrap: wrap;
	gap: 1em 2em;
	align-items: center;
	justify-content: center;
}

.planner-legend p {
	min-width: 170px;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	font-size: 0.95em;
	color: #ccc;
}

.planner-legend .schedule-mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.8em;
	height: 1.8em;
	background-color: #555;
	border-radius: 4px;
	margin-right: 0.8em;
	font-size: 1.1em;
	flex-shrink: 0;
}

/* スケジュール管理フォーム */
.schedule-form-container {
	background: #3a3a3a;
	padding: 1.5em;
	border-radius: 8px;
	margin-bottom: 2em;
}

.schedule-form-container h3 {
	color: #ffd700;
	margin-top: 0;
	margin-bottom: 1em;
}

.schedule-form {
	display: flex;
	gap: 1em;
	align-items: flex-end;
}

.form-group {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-width: 200px;
}

.form-group label {
	display: block;
	color: #ccc;
	margin-bottom: 0.5em;
	font-size: 0.9em;
	line-height: 1.4;
}

.form-group input[type="date"],
.form-group select {
	padding: 0.3em 0.75em;
	background: #444;
	border: 1px solid #555;
	color: #fff;
	border-radius: 4px;
	font-size: 1em;
}

.form-group input[type="date"]:focus,
.form-group select:focus {
	outline: none;
	border-color: #ffd700;
	background: #4a4a4a;
}

.add-schedule-btn {
	padding: 0.6em 1.5em;
	background: #ffd700;
	color: #000;
	border: none;
	border-radius: 4px;
	font-weight: bold;
	cursor: pointer;
	transition: background 0.3s;
	white-space: nowrap;
}

.add-schedule-btn:hover {
	background: #ffed4e;
}

.schedule-list-container {
	background: #3a3a3a;
	padding: 1.5em;
	border-radius: 8px;
}

.schedule-list-container h3 {
	color: #ffd700;
	margin-top: 0;
	margin-bottom: 1em;
}

.delete-btn {
	padding: 0.4em 0.8em;
	background: #ff6b6b;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 0.85em;
	transition: background 0.3s;
}

.delete-btn:hover {
	background: #ff5252;
}

.alert-message {
	padding: 1em;
	margin-bottom: 1.5em;
	border-radius: 4px;
	font-weight: bold;
}

.alert-success {
	background: #4caf50;
	color: white;
}

.alert-error {
	background: #ff6b6b;
	color: white;
}

.schedule-list table {
	width: 100%;
	border-collapse: collapse;
}

.schedule-list th,
.schedule-list td {
	padding: 0.8em;
	text-align: left;
	border-bottom: 1px solid #555;
}

.schedule-list th {
	background: #444;
	color: #ffd700;
}

.schedule-list tr:hover {
	background: #444;
}

/* Login page */
.login-page {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 100vh;
	background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.login-container {
	background: #333;
	padding: 2em;
	border-radius: 8px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
	width: 100%;
	max-width: 400px;
}

.login-container h1 {
	text-align: center;
	color: #ffd700;
	margin-bottom: 1.5em;
}

.login-form {
	display: flex;
	flex-direction: column;
}

.login-form label {
	color: #ccc;
	margin-bottom: 0.5em;
	font-size: 0.95em;
}

.login-form input[type="password"] {
	padding: 0.8em;
	margin-bottom: 1.5em;
	background: #444;
	border: 1px solid #555;
	color: #fff;
	border-radius: 4px;
	font-size: 1em;
}

.login-form input[type="password"]:focus {
	outline: none;
	border-color: #ffd700;
	background: #4a4a4a;
}

.login-form button {
	padding: 0.8em;
	background: #ffd700;
	color: #000;
	border: none;
	border-radius: 4px;
	font-weight: bold;
	font-size: 1em;
	cursor: pointer;
	transition: background 0.3s;
}

.login-form button:hover {
	background: #ffed4e;
}

.login-page .error {
	color: #ff6b6b;
	text-align: center;
	margin-bottom: 1em;
	padding: 0.8em;
	background: #4a2a2a;
	border-radius: 4px;
}
