/* Shared styling for the GLODP 2026-27 passwordless portal (WBS item 6).
   Deliberately plain, hand-written CSS -- no Tailwind/build step -- matching
   this app's existing www/ pages rather than introducing new tooling. */

:root {
	--glodp-pink: #E50076;
	--glodp-pink-bg: #fce7f3;
	--glodp-text: #334155;
	--glodp-muted: #64748b;
	--glodp-border: #e2e8f0;
}

.glodp-page {
	min-height: 100vh;
	background: #fff;
	padding: 24px 16px;
}

.glodp-page.glodp-auth {
	background-image: url('/bg.webp'), linear-gradient(#fff, #fff);
	background-size: cover;
	background-position: center;
	display: flex;
	align-items: center;
	justify-content: center;
}

.glodp-card {
	background: #fff;
	border: 1px solid var(--glodp-border);
	border-radius: 16px;
	padding: 32px;
	max-width: 440px;
	width: 100%;
	margin: 0 auto;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.glodp-card-wide {
	max-width: 640px;
}

.glodp-logo {
	display: block;
	height: 40px;
	margin: 0 auto 20px auto;
}

.glodp-title {
	font-size: 1.15rem;
	font-weight: 600;
	color: var(--glodp-text);
	text-align: center;
	margin: 0 0 4px 0;
}

.glodp-subtitle {
	font-size: 0.85rem;
	color: var(--glodp-muted);
	text-align: center;
	margin: 0 0 24px 0;
	line-height: 1.5;
}

.glodp-choice {
	display: block;
	width: 100%;
	text-align: left;
	background: #fff;
	border: 1px solid var(--glodp-border);
	border-radius: 12px;
	padding: 16px;
	margin-bottom: 12px;
	cursor: pointer;
	text-decoration: none;
	transition: box-shadow 0.15s, border-color 0.15s;
}

.glodp-choice:hover {
	border-color: #cbd5e1;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.glodp-choice-title {
	font-weight: 600;
	color: var(--glodp-text);
	margin-bottom: 2px;
}

.glodp-choice-sub {
	font-size: 0.8rem;
	color: var(--glodp-muted);
}

.glodp-field {
	margin-bottom: 16px;
}

.glodp-field label {
	display: block;
	font-size: 0.78rem;
	font-weight: 500;
	color: var(--glodp-muted);
	margin-bottom: 4px;
}

.glodp-field input[type="text"],
.glodp-field input[type="email"],
.glodp-field input[type="password"],
.glodp-field select {
	width: 100%;
	border: 1px solid #cbd5e1;
	background: #f8fafc;
	border-radius: 8px;
	padding: 10px 12px;
	font-size: 0.9rem;
	box-sizing: border-box;
}

.glodp-field select:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.glodp-field input:focus,
.glodp-field select:focus {
	outline: none;
	border-color: var(--glodp-pink);
	box-shadow: 0 0 0 2px rgba(229, 0, 118, 0.15);
}

.glodp-field-password {
	position: relative;
}

.glodp-field-password input[type="password"],
.glodp-field-password input[type="text"] {
	padding-right: 56px;
}

.glodp-toggle-password {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	padding: 0;
	font-size: 0.78rem;
	font-weight: 500;
	color: var(--glodp-muted);
	cursor: pointer;
}

.glodp-forgot-link {
	display: block;
	text-align: right;
	font-size: 0.8rem;
	color: var(--glodp-pink);
	text-decoration: none;
	margin: -10px 0 16px 0;
}

/* Login-method tabs (Email link / Password) */
.glodp-tabs {
	display: flex;
	border: 1px solid var(--glodp-border);
	border-radius: 8px;
	padding: 3px;
	margin-bottom: 20px;
	background: #f8fafc;
}

.glodp-tab {
	flex: 1;
	text-align: center;
	padding: 8px 10px;
	font-size: 0.85rem;
	font-weight: 500;
	color: var(--glodp-muted);
	background: none;
	border: none;
	border-radius: 6px;
	cursor: pointer;
}

.glodp-tab.glodp-tab-active {
	background: #fff;
	color: var(--glodp-text);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.glodp-btn {
	display: block;
	width: 100%;
	background: var(--glodp-pink);
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 11px;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	text-align: center;
	text-decoration: none;
}

.glodp-btn:hover {
	opacity: 0.9;
	color: #fff;
}

.glodp-btn[disabled] {
	background: #e2e8f0;
	color: #94a3b8;
	cursor: not-allowed;
}

.glodp-btn-link {
	background: none;
	border: none;
	color: var(--glodp-pink);
	font-size: 0.85rem;
	cursor: pointer;
	padding: 0;
	text-decoration: none;
}

.glodp-error {
	color: #dc2626;
	font-size: 0.8rem;
	margin-top: 6px;
}

.glodp-success-icon {
	width: 56px;
	height: 56px;
	border-radius: 999px;
	background: var(--glodp-pink-bg);
	color: var(--glodp-pink);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.6rem;
	margin: 0 auto 16px auto;
}

.glodp-eligibility-list label {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 0.85rem;
	color: var(--glodp-text);
	margin-bottom: 10px;
}

.glodp-eligibility-list input {
	margin-top: 3px;
	flex: none;
}

.glodp-note {
	font-size: 0.75rem;
	color: #94a3b8;
	font-style: italic;
	margin-top: 8px;
}

.glodp-hidden {
	display: none !important;
}

/* The three web forms get their topbar/sidebar from injectGlodpShellTopbar() after
   load; keep the page hidden until then so the stock web form layout (and its Edit
   button) never flashes. The animation is a fallback reveal if the JS never runs. */
body[data-path^="organisation"]:not(.glodp-shell-ready),
body[data-path^="leader"]:not(.glodp-shell-ready),
body[data-path^="download-document"]:not(.glodp-shell-ready) {
	visibility: hidden;
	animation: glodp-shell-reveal 0s 3s forwards;
}

@keyframes glodp-shell-reveal {
	to { visibility: visible; }
}

/* Workspace shell (logged-in pages) */
.glodp-shell-topbar {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 16px;
	border-bottom: 1px solid var(--glodp-border);
}

.glodp-shell-topbar img {
	height: 22px;
}

.glodp-shell-topbar .glodp-shell-title {
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--glodp-text);
}

.glodp-shell-topbar .glodp-spacer {
	flex: 1;
}

.glodp-shell-logout {
	font-size: 0.8rem;
	color: var(--glodp-muted);
	text-decoration: none;
}

.glodp-shell-body {
	display: flex;
	height: calc(100vh - 44px);
}

.glodp-shell-nav {
	flex: none;
	width: 200px;
	background: #f8fafc;
	border-right: 1px solid var(--glodp-border);
	padding: 12px 0;
	overflow-y: auto;
}

.glodp-shell-nav a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 16px;
	font-size: 0.87rem;
	color: var(--glodp-muted);
	text-decoration: none;
}

.glodp-shell-nav a.active {
	background: var(--glodp-pink-bg);
	color: var(--glodp-pink);
	font-weight: 500;
}

.glodp-shell-content {
	flex: 1;
	padding: 24px;
	min-width: 0;
	overflow-y: auto;
}

.glodp-list-table {
	width: 100%;
	border-collapse: collapse;
	border: 1px solid var(--glodp-border);
	border-radius: 8px;
	overflow: hidden;
	font-size: 0.87rem;
}

.glodp-list-table th {
	background: #f8fafc;
	text-align: left;
	color: var(--glodp-muted);
	font-weight: 500;
	padding: 10px 12px;
	font-size: 0.78rem;
}

.glodp-list-table td {
	padding: 10px 12px;
	border-top: 1px solid var(--glodp-border);
}

.glodp-list-table tr.glodp-row-clickable {
	cursor: pointer;
}

.glodp-list-table tr.glodp-row-clickable:hover {
	background: #f8fafc;
}

.glodp-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 0.75rem;
	background: #f1f5f9;
	color: var(--glodp-muted);
}

.glodp-badge-verified {
	background: #f0fdf4;
	color: #15803d;
}

.glodp-empty-state {
	text-align: center;
	padding: 40px 16px;
	color: var(--glodp-muted);
}

.glodp-lang-switch {
	display: inline-flex;
	flex-shrink: 0;
	padding: 2px;
	gap: 2px;
	background: #f1f5f9;
	border-radius: 6px;
}

.glodp-lang-switch button {
	padding: 1px 8px;
	border: 0;
	border-radius: 4px;
	background: transparent;
	color: var(--glodp-muted);
	font-size: 0.72rem;
	line-height: 1.5;
	cursor: pointer;
}

.glodp-lang-switch button.active {
	background: #fff;
	color: var(--glodp-pink);
	font-weight: 600;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.glodp-heading-row {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 12px;
}

.glodp-heading-row h2 {
	margin: 0;
}
