/* 7e Traditie -- shared stylesheet. One token system, every page. */

:root {
	--ink: #2E2C28;
	--ink-soft: #6B685E;
	--paper: #EDEFEA;
	--paper-raised: #F7F8F5;
	--sky: #CFDBDD;
	--sand: #E3D9C6;
	--moss: #5F7A5A;
	--moss-deep: #45604A;
	--moss-wash: rgba(95, 122, 90, 0.08);
	--ember: #A9714C;
	--ember-wash: rgba(169, 113, 76, 0.08);
	--line: #D8DAD3;
	--danger: #A23B3B;
	--danger-wash: rgba(162, 59, 59, 0.08);
	--success: #3F6B4A;
	--success-wash: rgba(63, 107, 74, 0.08);
	--radius: 4px;
	--focus-ring: 0 0 0 3px rgba(95, 122, 90, 0.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar { display: none; }

body {
	min-height: 100vh;
	background: linear-gradient(180deg, var(--sky) 0, var(--sand) 190px, var(--paper) 320px);
	background-repeat: no-repeat;
	color: var(--ink);
	font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
	font-family: 'Piazzolla', Georgia, serif;
	font-weight: 600;
	line-height: 1.3;
	margin: 0 0 0.5em;
	color: var(--ink);
}
h1 { font-size: 1.9rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

a {
	color: var(--moss-deep);
	text-decoration: underline;
	text-decoration-color: rgba(95, 122, 90, 0.35);
	text-underline-offset: 2px;
}
a:hover { color: var(--moss); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: none;
	box-shadow: var(--focus-ring);
	border-radius: var(--radius);
}

/* ---- chrome shared by every page ---- */

.topbar {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 8px 20px;
	padding: 20px 24px;
	background: var(--paper);
	border-bottom: 1px solid var(--line);
	font-size: 0.88rem;
	color: var(--ink-soft);
}
.topbar .wordmark {
	font-family: 'Piazzolla', serif;
	font-weight: 600;
	font-size: 1.05rem;
	color: var(--ink);
	text-decoration: none;
}
.topbar-actions a, .topbar-actions .topbar-user { margin-left: 16px; }
.topbar-actions > :first-child { margin-left: 0; }

.hero {
	padding: 56px 24px 40px;
	text-align: center;
}
.hero .site-name {
	font-family: 'Piazzolla', serif;
	font-size: 1.85rem;
	font-weight: 600;
	margin: 0;
	color: var(--ink);
}
.hero .site-tagline {
	font-size: 0.95rem;
	color: var(--ink-soft);
	margin: 8px 0 0;
}

.page {
	max-width: 640px;
	margin: 0 auto;
	padding: 40px 24px 72px;
}
.page.narrow { max-width: 420px; }
.page.wide { max-width: 900px; }

/* ---- public meeting list + detail ---- */

.section-heading { margin: 32px 0 4px; }
.section-heading:first-of-type { margin-top: 0; }

.meeting-time {
	display: inline-block;
	min-width: 52px;
	color: var(--ink-soft);
	font-weight: 400;
	font-variant-numeric: tabular-nums;
}

.meeting-list {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--line);
}
.meeting-list li { border-bottom: 1px solid var(--line); }
.meeting-list a {
	display: block;
	padding: 18px 6px;
	text-decoration: none;
	color: var(--ink);
	font-family: 'Piazzolla', serif;
	font-size: 1.15rem;
	font-weight: 500;
	border-left: 3px solid transparent;
	transition: border-color .15s ease, padding-left .15s ease, color .15s ease;
}
.meeting-list a:hover,
.meeting-list a:focus-visible {
	border-left-color: var(--moss);
	padding-left: 16px;
	color: var(--moss-deep);
}

.empty-state { color: var(--ink-soft); font-style: italic; padding: 24px 6px; }

.back-link { display: inline-block; margin: 0 0 28px; font-size: 0.9rem; }

.detail-section {
	margin: 0 0 28px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--line);
}
.detail-section:last-of-type { border-bottom: none; padding-bottom: 0; }
.detail-section h3 { margin-bottom: 10px; }
.detail-section .link-value { word-break: break-all; }
.detail-section .code-value {
	font-family: 'IBM Plex Mono', monospace;
	font-size: 0.95rem;
	background: var(--paper-raised);
	border: 1px solid var(--line);
	padding: 2px 8px;
	border-radius: 3px;
	display: inline-block;
	margin: 2px 0;
}

.callout {
	background: var(--ember-wash);
	border-left: 3px solid var(--ember);
	padding: 14px 18px;
	font-size: 0.92rem;
	color: var(--ink-soft);
	margin: 0 0 14px;
}

/* ---- forms + buttons (shared by auth + admin/manager screens) ---- */

.card {
	background: var(--paper-raised);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 32px;
}

.field { margin: 0 0 18px; }
.field label {
	display: block;
	font-weight: 600;
	font-size: 0.85rem;
	color: var(--ink-soft);
	margin-bottom: 6px;
}
.hint {
	font-size: 0.82rem;
	font-style: italic;
	color: var(--ink-soft);
	margin: 6px 0 0;
	max-width: 420px;
}

input[type="text"],
input[type="password"],
input[type="time"],
select,
textarea {
	width: 100%;
	max-width: 380px;
	padding: 10px 12px;
	font-family: 'Public Sans', sans-serif;
	font-size: 1rem;
	color: var(--ink);
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	line-height: 1.25;
}
input[type="time"] { max-width: 160px; }
input:focus, select:focus, textarea:focus { border-color: var(--moss); }

.checkbox-field { display: flex; align-items: center; gap: 8px; margin: 0 0 18px; }
.checkbox-field label { font-weight: 600; font-size: 0.9rem; color: var(--ink); margin: 0; }

.radio-group { margin: 0 0 18px; }
.radio-option { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.radio-option label { margin: 0; font-weight: 500; font-size: 0.95rem; color: var(--ink); }

.sub-fields { margin-bottom: 18px; }

button, .btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	vertical-align: middle;
	font-family: 'Public Sans', sans-serif;
	font-weight: 600;
	font-size: 0.95rem;
	line-height: 1.25;
	white-space: nowrap;
	background: var(--moss);
	color: #fff;
	border: 1px solid transparent;
	padding: 10px 20px;
	border-radius: var(--radius);
	cursor: pointer;
	text-decoration: none;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
button:hover, .btn:hover { background: var(--moss-deep); color: #fff; }

.btn-secondary {
	background: none;
	color: var(--moss-deep);
	border: 1px solid var(--line);
}
.btn-secondary:hover { background: var(--moss-wash); color: var(--moss-deep); }

.btn-text-danger {
	background: none;
	border: none;
	color: var(--danger);
	text-decoration: underline;
	font-weight: 400;
	font-size: 0.9rem;
	padding: 0;
	cursor: pointer;
}
.btn-text-danger:hover { color: #7a2b2b; background: none; }

.divider { border: none; border-top: 1px solid var(--line); margin: 24px 0; }

.form-actions { display: flex; align-items: center; gap: 12px; margin-top: 8px; }

.alert {
	padding: 12px 16px;
	border-radius: var(--radius);
	margin: 0 0 20px;
	font-size: 0.9rem;
}
.alert-error { background: var(--danger-wash); color: var(--danger); border: 1px solid rgba(162,59,59,0.25); }
.alert-success { background: var(--success-wash); color: var(--success); border: 1px solid rgba(63,107,74,0.25); }
.alert-info { background: var(--paper-raised); color: var(--ink-soft); border: 1px solid var(--line); }

/* ---- admin dashboard table ---- */

.table-wrap { overflow-x: auto; margin: 24px 0; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { font-weight: 600; color: var(--ink-soft); }
.row-actions { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; }
.row-actions form { display: flex; margin: 0; }
td form { display: flex; align-items: center; gap: 8px; margin: 0; }
td input[type="text"] { padding: 6px 10px; font-size: 0.9rem; max-width: 220px; }
/* every button/link-button inside a table row: one compact size */
.row-actions a,
td button,
td .btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: 'Public Sans', sans-serif;
	font-weight: 600;
	font-size: 0.85rem;
	line-height: 1.25;
	white-space: nowrap;
	padding: 6px 14px;
	border-radius: var(--radius);
	border: 1px solid var(--line);
	background: none;
	color: var(--moss-deep);
	text-decoration: none;
	cursor: pointer;
}
.row-actions a:hover,
td button:hover,
td .btn:hover { background: var(--moss-wash); color: var(--moss-deep); }
td .btn-text-danger { color: var(--danger); border-color: rgba(162,59,59,0.3); }
td .btn-text-danger:hover { background: var(--danger-wash); color: #7a2b2b; }

@media (max-width: 480px) {
	.page { padding: 28px 18px 56px; }
	.hero { padding: 44px 18px 32px; }
	.card { padding: 24px 20px; }
}
