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

:root {
	--primary: #1a1a2e;
	--primary-light: #16213e;
	--accent: #0f3460;
	--accent-bright: #e94560;
	--bg: #f0f2f5;
	--card-bg: #fff;
	--text: #2d3436;
	--text-light: #636e72;
	--border: #dfe6e9;
	--radius: 10px;
	--shadow: 0 2px 8px rgba(0,0,0,0.08);
	--shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	background: var(--bg);
	color: var(--text);
	line-height: 1.6;
	min-height: 100vh;
}

a { color: var(--accent); }

/* Navigation */
nav {
	background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
	color: #fff;
	padding: 0.85rem 1.25rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.5rem;
	box-shadow: 0 2px 10px rgba(0,0,0,0.15);
	position: sticky;
	top: 0;
	z-index: 100;
}

nav .logo {
	font-weight: 700;
	font-size: 1.15rem;
	color: #fff;
	text-decoration: none;
	letter-spacing: 0.02em;
}

.nav-links {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	flex-wrap: wrap;
}

.nav-links a {
	color: rgba(255,255,255,0.75);
	text-decoration: none;
	font-size: 0.85rem;
	padding: 0.35rem 0.65rem;
	border-radius: 6px;
	transition: all 0.15s;
}

.nav-links a:hover {
	color: #fff;
	background: rgba(255,255,255,0.1);
}

/* Main content */
main {
	max-width: 800px;
	margin: 1.5rem auto;
	padding: 0 1rem;
}

h2 {
	margin-bottom: 1.25rem;
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--primary);
}

h3 {
	margin: 1.25rem 0 0.5rem;
	font-size: 1.1rem;
	font-weight: 600;
	color: var(--primary);
}

section { margin-bottom: 2rem; }

/* Cards */
.card {
	background: var(--card-bg);
	border-radius: var(--radius);
	padding: 1.15rem;
	margin-bottom: 0.85rem;
	box-shadow: var(--shadow);
	text-decoration: none;
	color: inherit;
	display: block;
	transition: box-shadow 0.15s, transform 0.15s;
}

.card:hover {
	box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

a.card:hover {
	transform: translateY(-1px);
}

.card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

/* Task cards */
.task-card {
	border-left: 4px solid var(--border);
	padding-left: 1.25rem;
}

.task-card.priority-urgent { border-left-color: var(--accent-bright); }
.task-card.priority-normal { border-left-color: #3498db; }
.task-card.priority-low { border-left-color: #b2bec3; }

.task-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.task-title {
	font-weight: 600;
	font-size: 1.05rem;
}

.task-meta {
	font-size: 0.82rem;
	color: var(--text-light);
	margin-top: 0.3rem;
}

.task-info {
	margin-top: 0.75rem;
	font-size: 0.9rem;
	line-height: 1.8;
}

.task-info div { margin-bottom: 0.15rem; }

/* Badges */
.badge {
	font-size: 0.7rem;
	padding: 0.2rem 0.6rem;
	border-radius: 20px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	display: inline-block;
}

.badge-pending { background: #ffeaa7; color: #856404; }
.badge-accepted { background: #dfe6e9; color: #2d3436; }
.badge-done { background: #55efc4; color: #00695c; }
.badge-declined { background: #fab1a0; color: #c0392b; }
.badge-escalated { background: #fdcb6e; color: #856404; }

/* Buttons */
.btn {
	background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
	color: #fff;
	border: none;
	padding: 0.6rem 1.5rem;
	border-radius: 8px;
	cursor: pointer;
	font-size: 0.9rem;
	font-weight: 600;
	transition: all 0.15s;
	display: inline-block;
	text-decoration: none;
}

.btn:hover {
	opacity: 0.9;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(26,26,46,0.25);
}

.btn:active { transform: translateY(0); }
.btn-sm { padding: 0.3rem 0.85rem; font-size: 0.8rem; }
.btn-danger { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.btn-link { background: none; color: rgba(255,255,255,0.75); border: none; cursor: pointer; font-size: 0.85rem; padding: 0.35rem 0.65rem; border-radius: 6px; transition: all 0.15s; }
.btn-link:hover { color: #fff; background: rgba(255,255,255,0.1); }

/* Forms */
.form { max-width: 500px; }

.form label {
	display: block;
	margin-top: 1rem;
	font-weight: 600;
	font-size: 0.85rem;
	color: var(--text-light);
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.form input[type="text"],
.form input[type="email"],
.form input[type="tel"],
.form input[type="password"],
.form input[type="date"],
.form input[type="number"],
.form textarea,
.form select {
	width: 100%;
	padding: 0.7rem 0.85rem;
	border: 2px solid var(--border);
	border-radius: 8px;
	font-size: 0.95rem;
	margin-top: 0.35rem;
	transition: border-color 0.15s;
	background: #fff;
}

.form input:focus, .form textarea:focus, .form select:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 3px rgba(15,52,96,0.1);
}

.form button { margin-top: 1.5rem; width: 100%; padding: 0.75rem; font-size: 1rem; }

.inline-form {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	margin-bottom: 1rem;
}

.inline-form input { flex: 1; margin-top: 0; }
.inline-form button { width: auto; margin-top: 0; }

/* Response buttons */
.response-buttons {
	display: flex;
	gap: 1rem;
	margin: 0.75rem 0;
}

.response-buttons label {
	font-weight: normal;
	text-transform: none;
	cursor: pointer;
	padding: 0.5rem 1rem;
	border: 2px solid var(--border);
	border-radius: 8px;
	transition: all 0.15s;
}

.response-buttons label:hover {
	border-color: var(--accent);
	background: rgba(15,52,96,0.03);
}

.response-buttons input[type="radio"] { margin-right: 0.3rem; }

/* Checkbox grid */
.checkbox-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 0.4rem;
	margin: 0.75rem 0;
	max-height: 300px;
	overflow-y: auto;
	padding: 0.5rem;
	border: 1px solid var(--border);
	border-radius: 8px;
}

.checkbox-grid label {
	font-weight: normal;
	font-size: 0.9rem;
	text-transform: none;
	cursor: pointer;
	padding: 0.25rem 0.5rem;
	border-radius: 4px;
}

.checkbox-grid label:hover { background: rgba(15,52,96,0.03); }

/* Alerts */
.error {
	background: #fff5f5;
	border: 1px solid #fed7d7;
	color: #c53030;
	padding: 0.75rem 1rem;
	border-radius: 8px;
	margin-bottom: 1rem;
	font-size: 0.9rem;
}

.success {
	background: #f0fff4;
	border: 1px solid #c6f6d5;
	color: #276749;
	padding: 0.75rem 1rem;
	border-radius: 8px;
	margin-bottom: 1rem;
	font-size: 0.9rem;
}

.warning {
	background: #fffbeb;
	border: 1px solid #fef3c7;
	color: #92400e;
	padding: 0.75rem 1rem;
	border-radius: 8px;
	margin: 1rem 0;
	font-size: 0.9rem;
}

.empty {
	color: var(--text-light);
	font-style: italic;
	padding: 1.5rem;
	text-align: center;
}

/* Login page */
.login-container {
	max-width: 400px;
	margin: 0 auto;
	padding: 2.5rem 2rem;
	background: var(--card-bg);
	border-radius: 16px;
	box-shadow: var(--shadow-lg);
	text-align: center;
	position: relative;
	top: 50%;
}

body:has(.login-container) {
	background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 50%, #533483 100%);
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 100vh;
}

.login-container h1 {
	margin-bottom: 0.5rem;
	font-size: 1.6rem;
	color: var(--primary);
}

.login-container .form { max-width: none; }

.login-container .form label {
	text-align: left;
}

.login-container p {
	margin-top: 1rem;
	font-size: 0.85rem;
}

.login-container a { color: var(--accent); text-decoration: none; }
.login-container a:hover { text-decoration: underline; }

/* Tables */
table {
	width: 100%;
	border-collapse: collapse;
	background: var(--card-bg);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow);
	font-size: 0.85rem;
}

th, td {
	padding: 0.65rem 0.75rem;
	text-align: left;
	border-bottom: 1px solid var(--border);
}

th {
	background: #f8f9fa;
	font-weight: 700;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--text-light);
}

tr:hover td { background: rgba(15,52,96,0.02); }

select {
	padding: 0.3rem 0.5rem;
	border: 1px solid var(--border);
	border-radius: 6px;
	font-size: 0.85rem;
}

details summary {
	cursor: pointer;
	font-weight: 600;
	margin-bottom: 0.5rem;
	color: var(--accent);
}

/* Responses */
.response {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.response small { color: var(--text-light); }

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

/* Temp password display */
.temp-password {
	font-family: "SF Mono", "Fira Code", "Courier New", monospace;
	font-size: 1.4rem;
	background: linear-gradient(135deg, #f8f9fa, #e9ecef);
	padding: 1rem;
	border-radius: 10px;
	margin: 1.25rem 0;
	user-select: all;
	letter-spacing: 0.08em;
	border: 2px dashed var(--border);
	font-weight: 600;
}

/* Password toggle */
.pw-wrap {
	position: relative;
	display: flex;
	align-items: center;
}

.pw-wrap input {
	flex: 1;
	padding-right: 2.75rem;
}

.pw-toggle {
	position: absolute;
	right: 0.6rem;
	background: none;
	border: none;
	cursor: pointer;
	font-size: 1.15rem;
	opacity: 0.35;
	padding: 0.25rem;
	line-height: 1;
	transition: opacity 0.15s;
}

.pw-toggle:hover, .pw-toggle.active { opacity: 0.75; }

/* Due date warnings */
.due-overdue { border-left-color: #e74c3c !important; background: #fff5f5; }
.due-soon { border-left-color: #f39c12 !important; background: #fffbeb; }
.text-danger { color: #e74c3c; font-weight: 700; }
.badge-overdue { background: #e74c3c; color: #fff; }
.badge-soon { background: #f39c12; color: #fff; }
.priority-badge-urgent { background: #ffe0e0; color: #c0392b; }
.priority-badge-normal { background: #e0f0ff; color: #2471a3; }
.priority-badge-low { background: #f0f0f0; color: #666; }

/* Coordinator stats */
.stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 0.75rem;
	margin-bottom: 1.25rem;
}

.stat-card {
	background: var(--card-bg);
	border-radius: var(--radius);
	padding: 1rem;
	text-align: center;
	box-shadow: var(--shadow);
}

.stat-card.stat-danger { background: #fff5f5; border: 1px solid #fed7d7; }
.stat-number { font-size: 1.75rem; font-weight: 700; color: var(--primary); }
.stat-danger .stat-number { color: #e74c3c; }
.stat-label { font-size: 0.75rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 0.25rem; }

.side-panels {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
}

.side-panels h4 { margin-bottom: 0.5rem; color: var(--primary); }

.stat-row {
	display: flex;
	justify-content: space-between;
	padding: 0.35rem 0;
	border-bottom: 1px solid var(--border);
	font-size: 0.85rem;
}

.stat-row:last-child { border-bottom: none; }

/* Comments */
.comment {
	padding: 0.85rem 1rem;
}

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

.comment-header small { color: var(--text-light); }
.comment p { margin: 0; line-height: 1.5; }

/* Searchable select */
.searchable-select-wrap {
	margin-top: 0.35rem;
}

.searchable-select-wrap .search-filter {
	width: 100%;
	padding: 0.6rem 0.85rem;
	border: 2px solid var(--border);
	border-bottom: none;
	border-radius: 8px 8px 0 0;
	font-size: 0.95rem;
}

.searchable-select-wrap select {
	width: 100%;
	border: 2px solid var(--border);
	border-radius: 0 0 8px 8px;
	font-size: 0.9rem;
	padding: 0;
}

.searchable-select-wrap select option {
	padding: 0.4rem 0.75rem;
}

.searchable-select-wrap select option:checked {
	background: var(--accent);
	color: #fff;
}

/* Hamburger */
.hamburger {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0.5rem;
	flex-direction: column;
	gap: 4px;
}

.hamburger span {
	display: block;
	width: 22px;
	height: 2px;
	background: #fff;
	border-radius: 2px;
	transition: all 0.2s;
}

/* Mobile */
@media (max-width: 600px) {
	.hamburger { display: flex; }

	.nav-links {
		display: none;
		width: 100%;
		flex-direction: column;
		gap: 0.15rem;
		padding-top: 0.5rem;
	}

	.nav-links.open { display: flex; }

	.nav-links a, .btn-link {
		display: block;
		padding: 0.5rem 0.65rem;
		width: 100%;
		text-align: left;
	}

	nav {
		flex-wrap: wrap;
		justify-content: space-between;
	}

	main { margin-top: 1rem; }
	table { font-size: 0.75rem; }
	th, td { padding: 0.4rem; }
	.login-container { margin: 1rem; }
	.response-buttons { flex-direction: column; gap: 0.5rem; }
	h2 { font-size: 1.3rem; }
	.stats-grid { grid-template-columns: repeat(3, 1fr); }
	.side-panels { grid-template-columns: 1fr; }
}
