:root {
	--ink: #1d2925;
	--muted: #6d7972;
	--paper: #f7f5ef;
	--green: #315f4a;
	--green-dark: #234737;
	--line: #dfe3da;
	--coral: #d9795e;
}

* { box-sizing: border-box; }

body {
	min-height: 100vh;
	margin: 0;
	color: var(--ink);
	background: var(--paper);
	font-family: Georgia, 'Times New Roman', serif;
}

.page {
	display: block;
	min-height: 100vh;
}

.intro {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 28px;
	padding: 18px clamp(28px, 5vw, 72px);
	border-bottom: 1px solid var(--line);
	color: var(--ink);
	background: var(--paper);
}

.intro::after {
	display: none;
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--green-dark); font-size: 1.15rem; font-weight: bold; letter-spacing: 0.03em; }
.brand-mark { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid var(--green-dark); border-radius: 50%; font-size: 0.9rem; }
.intro-copy { position: relative; z-index: 1; max-width: 470px; margin: auto 0; padding: 70px 0; }
.intro-copy, .quote { display: none; }
.eyebrow { margin: 0 0 18px; color: #d9e1d7; font: 700 0.36rem/1.2 Arial, sans-serif; letter-spacing: 0.18em; text-transform: uppercase; }
h1 { max-width: 470px; margin: 0; font-size: clamp(2.8rem, 5vw, 5.4rem); font-weight: normal; line-height: 0.98; letter-spacing: -0.04em; }
.intro-copy p:last-child { max-width: 330px; margin: 28px 0 0; color: #d5ded5; font-size: 1.1rem; line-height: 1.55; }
.quote { position: relative; z-index: 1; max-width: 320px; margin: 0; color: #d5ded5; font-size: 0.95rem; font-style: italic; line-height: 1.5; }

.content { display: grid; place-items: center; padding: 48px clamp(28px, 8vw, 120px); background: radial-gradient(circle at 85% 12%, #e9ede3 0, transparent 28%), var(--paper); }
.schedule-content { display: block; padding-left: 3%; padding-right: 3%; }
.login-card { width: min(100%, 430px); }
.page-title { color: var(--ink); font-size: clamp(1.8rem, 4vw, 3.4rem); white-space: nowrap; }
.schedule-panel { width: min(100%, 1100px); }
.schedule-content .schedule-panel { position: relative; width: 100%; }
.print-title { display: none; }
.login-card h2 { margin: 0 0 10px; font-size: clamp(2rem, 3vw, 2.7rem); font-weight: normal; letter-spacing: -0.03em; }
.subtitle { margin: 0 0 34px; color: var(--muted); font: 0.95rem/1.5 Arial, sans-serif; }
.month-navigation { display: flex; align-items: center; justify-content: space-between; width: min(100%, 360px); margin: 24px 0 18px; padding: 8px 0; font: 0.95rem Arial, sans-serif; }
.month-navigation a { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: #fffdf8; background: var(--green); text-decoration: none; font-size: 1.2rem; }
.month-navigation a:hover { background: var(--green-dark); }
.month-navigation strong { color: var(--ink); }
.absence-summary { position: absolute; top: 0; right: 0; margin: 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: 0.9rem Arial, sans-serif; }
.user-selector { display: block; width: min(100%, 360px); margin: 0 0 18px; }
.user-selector label { gap: 8px; }
.user-selector select { padding: 11px 12px; font-size: 0.9rem; }
.print-button { width: auto; margin: 0 0 18px; padding: 12px 16px; }
.schedule-actions { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.schedule-actions .print-button, .schedule-actions .sync-button { margin: 0; }
.sync-form { display: block; }
.sync-button { width: auto; padding: 12px 16px; }
.manual-entry-button { width: auto; margin: 0 0 18px; padding: 12px 16px; }
.planning-dialog { width: min(92vw, 760px); max-height: 90vh; padding: 28px; border: 0; border-radius: 4px; background: #fff; box-shadow: 0 24px 80px rgba(29, 41, 37, 0.25); overflow-y: auto; }
.planning-dialog[open] { position: fixed; inset: 50% auto auto 50%; z-index: 20; margin: 0; transform: translate(-50%, -50%); }
.planning-dialog::backdrop { background: rgba(29, 41, 37, 0.58); }
.conflict-dialog { width: min(92vw, 620px); max-height: 90vh; padding: 28px; border: 0; border-radius: 4px; background: #fff; box-shadow: 0 24px 80px rgba(29, 41, 37, 0.25); overflow-y: auto; }
.conflict-dialog[open] { position: fixed; inset: 50% auto auto 50%; z-index: 30; margin: 0; transform: translate(-50%, -50%); }
.conflict-dialog::backdrop { background: rgba(29, 41, 37, 0.58); }
.conflict-item { display: grid; gap: 10px; margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--line); }
.conflict-item label { display: flex; align-items: center; gap: 8px; font-weight: normal; letter-spacing: 0; text-transform: none; }
.conflict-item input { width: auto; }
.conflict-table { width: 100%; margin: 0 0 14px; border-collapse: collapse; font: 0.78rem Arial, sans-serif; }
.conflict-table th, .conflict-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.conflict-table thead th { color: var(--muted); font-size: 0.68rem; text-transform: uppercase; }
.conflict-table tbody th { color: var(--green-dark); white-space: nowrap; }
.planning-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 14px; margin-bottom: 22px; }
.edit-planning-link { color: var(--green-dark); font: 700 0.72rem Arial, sans-serif; }
.delete-planning-form { display: inline; }
.delete-planning-button { width: auto; margin: 0 0 0 8px; padding: 5px 7px; color: #fffdf8; background: var(--coral); font-size: 0.65rem; letter-spacing: 0.02em; }
.delete-planning-button:hover { background: #b85e48; }
.date-filter { display: flex; align-items: end; gap: 12px; margin: 26px 0 28px; padding: 18px; border: 1px solid var(--line); background: rgba(255, 253, 248, 0.65); }
.date-filter label { min-width: 150px; }
.date-filter button { width: auto; margin: 0; padding: 15px 20px; }
.clear-filter { padding: 15px 0; color: var(--green-dark); font: 0.8rem Arial, sans-serif; }
.table-wrapper { overflow-x: auto; overflow-y: clip; border: 1px solid var(--line); }
.schedule-table { width: 100%; min-width: 1400px; margin-left: 0; border-collapse: collapse; font: 0.82rem Arial, sans-serif; }
.schedule-table thead th { position: sticky; top: 0; z-index: 2; color: #fffdf8; background: var(--green); font-size: 0.7rem; letter-spacing: 0.06em; text-align: left; text-transform: uppercase; }
.schedule-table th, .schedule-table td { padding: 13px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.schedule-table th:first-child, .schedule-table td:first-child { padding-left: 0; }
.schedule-table tbody tr:nth-child(even) { background: rgba(233, 237, 227, 0.45); }
.schedule-table tbody tr.sunday-row, .schedule-table tbody tr.holiday-row,
.schedule-table tbody tr.sunday-row > td, .schedule-table tbody tr.holiday-row > td { background: #f6c28b; }
.schedule-table tbody tr:last-child td { border-bottom: 0; }
.schedule-table tfoot .totals-row { color: var(--ink); background: #e9ede3; font-weight: 700; }
.schedule-table tfoot .totals-row td { border-top: 2px solid var(--green); border-bottom: 0; }
.empty-row { color: var(--muted); text-align: center; }
.alert, .success { margin-bottom: 22px; padding: 12px 14px; font: 0.86rem/1.4 Arial, sans-serif; }
.alert { border-left: 3px solid var(--coral); color: #8b4939; background: #fcece6; }
.success { border-left: 3px solid var(--green); color: var(--green-dark); background: #e8f1e9; }
form { display: grid; gap: 20px; }
label { display: grid; gap: 8px; color: var(--ink); font: 700 0.77rem/1 Arial, sans-serif; letter-spacing: 0.06em; text-transform: uppercase; }
input { width: 100%; padding: 15px 16px; border: 1px solid var(--line); border-radius: 2px; outline: none; color: var(--ink); background: rgba(255, 253, 248, 0.78); font: 1rem Arial, sans-serif; transition: border-color 160ms ease, box-shadow 160ms ease; }
input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(49, 95, 74, 0.12); }
.password-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.password-row a, .signup a { color: var(--green-dark); text-decoration: underline; text-underline-offset: 3px; }
.password-row a { font: 0.78rem Arial, sans-serif; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 90px; }
.checkbox-label { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; text-transform: none; letter-spacing: normal; font: 0.8rem/1.4 Arial, sans-serif; }
.checkbox-label input { width: auto; margin-top: 3px; padding: 0; }
.password-field .password-toggle { position: absolute; top: 50%; right: 8px; width: auto; margin: 0; padding: 7px 8px; color: var(--green-dark); background: transparent; font-size: 0.68rem; letter-spacing: 0.03em; transform: translateY(-50%); }
.password-field .password-toggle:hover { color: var(--green-dark); background: #e9ede3; transform: translateY(-50%); }
button { width: 100%; margin-top: 4px; padding: 16px; border: 0; border-radius: 2px; color: #fffdf8; background: var(--green); cursor: pointer; font: 700 0.82rem Arial, sans-serif; letter-spacing: 0.1em; text-transform: uppercase; transition: background 160ms ease, transform 160ms ease; }
button:hover { background: var(--green-dark); transform: translateY(-1px); }
.button-link { display: inline-block; width: 100%; padding: 16px; border-radius: 2px; color: #fffdf8; background: var(--green); text-align: center; text-decoration: none; font: 700 0.82rem Arial, sans-serif; letter-spacing: 0.1em; text-transform: uppercase; transition: background 160ms ease, transform 160ms ease; }
.button-link:hover { color: #fffdf8; background: var(--green-dark); transform: translateY(-1px); }
.account-menu { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 22px; margin: 0; }
.account-menu a { color: var(--green-dark); font: 700 0.78rem Arial, sans-serif; letter-spacing: 0.04em; text-decoration: none; }
.account-menu a:hover { text-decoration: underline; text-underline-offset: 3px; }
.account-menu .logout-top { display: inline-block; padding: 10px 13px; border: 1px solid var(--green-dark); color: #fffdf8; background: var(--green-dark); font-size: 0.7rem; letter-spacing: 0.04em; text-decoration: none; }
.account-menu .logout-top:hover { color: #fffdf8; background: var(--coral); text-decoration: none; }
.intro .account-menu { margin: 0; padding: 0; border: 0; }
.admin-content { align-items: start; overflow-y: auto; }
.admin-panel { width: min(100%, 650px); }
.holiday-panel { width: min(100%, 850px); }
.admin-panel h2 { margin: 0 0 18px; font-size: clamp(2rem, 3vw, 2.7rem); font-weight: normal; letter-spacing: -0.03em; }
.admin-links { display: grid; gap: 12px; margin-top: 28px; }
.new-user-button { width: auto; margin: 0 0 28px; padding: 14px 18px; }
.user-dialog { width: min(90vw, 560px); max-height: 90vh; padding: 28px; border: 0; border-radius: 4px; color: var(--ink); background: #fff; box-shadow: 0 24px 80px rgba(29, 41, 37, 0.25); overflow-y: auto; }
.user-dialog.dialog-fallback { position: fixed; inset: 50% auto auto 50%; z-index: 10; display: block; margin: 0; transform: translate(-50%, -50%); }
.user-dialog::backdrop { background: rgba(29, 41, 37, 0.58); }
.dialog-header { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.dialog-header h2 { margin: 0 0 24px; }
.dialog-close { width: 36px; height: 36px; margin: -4px -4px 0 0; padding: 0; border-radius: 50%; font-size: 1.5rem; line-height: 1; letter-spacing: 0; }
.field-note { color: var(--muted); font-size: 0.7rem; font-weight: normal; letter-spacing: 0; text-transform: none; }
select { width: 100%; padding: 15px 16px; border: 1px solid var(--line); border-radius: 2px; color: var(--ink); background: rgba(255, 253, 248, 0.78); font: 1rem Arial, sans-serif; }
.cancel-link { display: block; margin-top: 16px; color: var(--green-dark); text-align: center; font: 0.85rem Arial, sans-serif; }
.users-heading { margin-top: 46px !important; padding-top: 28px; border-top: 1px solid var(--line); font-size: 1.7rem !important; }
.users-list { display: grid; gap: 10px; }
.holiday-form { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; margin-bottom: 46px; }
.holiday-form button { grid-column: 1 / -1; }
.holiday-list-header { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 0 0 22px; padding-top: 28px; border-top: 1px solid var(--line); }
.holiday-list-header h2 { margin: 0; font-size: 1.7rem; }
.year-filter { display: block; min-width: 190px; }
.year-filter label { gap: 8px; }
.year-filter select { padding: 11px 12px; font-size: 0.9rem; }
.holiday-year { margin-top: 28px; }
.holiday-year h3 { margin: 0; padding: 10px 0; color: var(--green-dark); border-bottom: 2px solid var(--green); font: 700 1.1rem Arial, sans-serif; }
.holiday-rows { display: grid; }
.holiday-entry-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); font-family: Arial, sans-serif; }
.holiday-entry-row strong, .holiday-entry-row span { display: block; }
.holiday-entry-row strong { font-size: 0.9rem; }
.holiday-entry-row span { margin-top: 5px; color: var(--muted); font-size: 0.8rem; }
.empty-holidays { color: var(--muted); font: 0.9rem Arial, sans-serif; }
.user-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); font-family: Arial, sans-serif; }
.user-row strong, .user-row span { display: block; }
.user-row strong { font-size: 0.9rem; overflow-wrap: anywhere; }
.user-row span { margin-top: 5px; color: var(--muted); font-size: 0.75rem; }
.user-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.user-actions a { color: var(--green-dark); font: 700 0.75rem Arial, sans-serif; }
.user-actions form { display: block; }
.profile-selector { display: grid; grid-template-columns: minmax(0, 2fr) minmax(150px, 1fr); gap: 14px; margin-bottom: 34px; }
.profile-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; margin: 22px 0; }
.profile-edit-link { width: auto; margin-bottom: 30px; }
.profile-readonly { max-width: 620px; font-family: Arial, sans-serif; }
.profile-readonly h2 { margin-bottom: 22px; }
.profile-readonly dl { display: grid; grid-template-columns: 1fr auto; margin: 0; border-top: 1px solid var(--line); }
.profile-readonly dt, .profile-readonly dd { margin: 0; padding: 13px 0; border-bottom: 1px solid var(--line); }
.profile-readonly dt { color: var(--muted); }
.profile-readonly dd { color: var(--ink); font-weight: 700; text-align: right; }
.delete-button { width: auto; margin: 0; padding: 8px 10px; color: #fffdf8; background: var(--coral); font-size: 0.7rem; letter-spacing: 0.04em; }
.delete-button:hover { background: #b85e48; }
.signup { margin: 28px 0 0; color: var(--muted); text-align: center; font: 0.9rem Arial, sans-serif; }

@media (max-width: 760px) {
	.intro { align-items: flex-start; flex-direction: column; gap: 16px; padding: 20px 28px; }
	.account-menu { justify-content: flex-start; gap: 12px 18px; }
	.content { min-height: 520px; padding: 56px 28px; }
	.schedule-content { padding-left: 3%; padding-right: 3%; }
	.date-filter { align-items: stretch; flex-direction: column; }
	.schedule-actions { align-items: stretch; flex-direction: column; }
	.schedule-actions .print-button, .schedule-actions .sync-button { width: 100%; }
	.planning-fields { grid-template-columns: 1fr; }
	.date-filter label { min-width: 0; }
	.date-filter button { width: 100%; }
	.clear-filter { text-align: center; }
	.profile-selector, .profile-fields { grid-template-columns: 1fr; }
	.holiday-form { grid-template-columns: 1fr; }
	.holiday-form button { grid-column: auto; }
	.holiday-list-header { align-items: stretch; flex-direction: column; }
	.year-filter { min-width: 0; }
	.profile-readonly dl { grid-template-columns: 1fr; }
	.profile-readonly dd { padding-top: 0; text-align: left; }
	.user-row, .holiday-entry-row { align-items: flex-start; flex-direction: column; gap: 12px; }
}

@media print {
	@page { size: landscape; margin: 10mm; }
	body { background: #fff; }
	.intro, .month-navigation, .absence-summary, .date-filter, .print-button, .page-title, .subtitle, .user-selector, .sync-form, .success, .alert, .manual-entry-button, .planning-dialog, .conflict-dialog, .schedule-table th:last-child, .schedule-table td:last-child { display: none; }
	.print-title { display: block; margin: 0 0 18px; font-size: 20pt; font-weight: normal; }
	.page, .content, .schedule-content, .schedule-panel { display: block; width: 100%; min-height: 0; padding: 0; }
	.table-wrapper { overflow: visible; border: 0; }
	.schedule-table { min-width: 0; font-size: 8pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
	.schedule-table tbody tr.sunday-row, .schedule-table tbody tr.holiday-row,
	.schedule-table tbody tr.sunday-row > td, .schedule-table tbody tr.holiday-row > td { background: #f6c28b !important; }
	.schedule-table th { position: static; }
	.schedule-table th, .schedule-table td { padding: 4px 5px; }
}
