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

:root {
	--teal:       #0EA896;
	--teal-dark:  #0B8A7A;
	--teal-light: #E6F7F5;
	--coral:      #FF6B6B;
	--sand:       #FFF8F0;
	--text:       #1A2B35;
	--muted:      #6B8090;
	--border:     #D4E2E0;
	--white:      #FFFFFF;
	--radius-sm:  6px;
	--radius-md:  12px;
	--radius-lg:  20px;
	--shadow:     0 4px 24px rgba(14,168,150,.12), 0 1px 4px rgba(0,0,0,.06);
}

html { font-size: 16px; }

body {
	font-family: 'Inter', system-ui, sans-serif;
	min-height: 100vh;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 2rem 1rem 4rem;
	-webkit-font-smoothing: antialiased;
}

/* ── Card ─────────────────────────────── */
.card {
	background: var(--white);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow);
	width: 100%;
	max-width: 560px;
	overflow: hidden;
}

/* ── Header ───────────────────────────── */
.card-header {
	background: linear-gradient(135deg, #0EA896, #3DD6C5);
	padding: 2rem 2rem 1.5rem;
	position: relative;
	overflow: hidden;
}
.card-header::before {
	content: '';
	position: absolute;
	top: -40px; right: -40px;
	width: 180px; height: 180px;
	background: rgba(255,255,255,.08);
	border-radius: 50%;
}
.card-header::after {
	content: '';
	position: absolute;
	bottom: -60px; left: 30%;
	width: 220px; height: 220px;
	background: rgba(255,255,255,.05);
	border-radius: 50%;
}
.app-logo {
	display: flex;
	align-items: center;
	gap: .6rem;
	margin-bottom: .75rem;
	position: relative;
	z-index: 1;
}
.app-logo svg {
	flex-shrink: 0;
}
.app-name {
	font-size: 1.5rem;
	font-weight: 700;
	color: #fff;
	letter-spacing: -.02em;
}
.card-header p {
	color: rgba(255,255,255,.85);
	font-size: .85rem;
	line-height: 1.5;
	position: relative;
	z-index: 1;
	max-width: 400px;
}
.card-header p strong {
	color: #fff;
}
.card-header a {
	color: #fff;
	text-underline-offset: 2px;
}

/* ── Body ─────────────────────────────── */
.card-body {
	padding: 1.75rem 2rem 2rem;
}

/* ── Section label ────────────────────── */
.section-label {
	display: flex;
	align-items: center;
	gap: .5rem;
	font-size: .7rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--teal);
	margin-bottom: 1rem;
	margin-top: 1.5rem;
}
.section-label:first-child { margin-top: 0; }
.section-label::after {
	content: '';
	flex: 1;
	height: 1px;
	background: var(--border);
}

/* ── Row / two-col ────────────────────── */
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 460px) { .row { grid-template-columns: 1fr; } }

/* ── Field ────────────────────────────── */
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.field:last-child { margin-bottom: 0; }
.field label {
	font-size: .8rem;
	font-weight: 600;
	color: var(--text);
}
.field input,
.field select,
.field textarea {
	width: 100%;
	padding: .6rem .8rem;
	border: 1.5px solid var(--border);
	border-radius: var(--radius-sm);
	font-family: inherit;
	font-size: .9rem;
	color: var(--text);
	background: var(--white);
	transition: border-color .15s, box-shadow .15s;
	line-height: 1.4;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
	outline: none;
	border-color: var(--teal);
	box-shadow: 0 0 0 3px rgba(14,168,150,.15);
}
.field textarea { resize: vertical; min-height: 5.5rem; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B8090' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .75rem center; padding-right: 2rem; }

/* ── Pill toggle (radio) ──────────────── */
.pill-group {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
}
.pill-group input[type="radio"] { display: none; }
.pill-group label {
	padding: .4rem 1rem;
	border: 1.5px solid var(--border);
	border-radius: 999px;
	font-size: .85rem;
	font-weight: 500;
	color: var(--muted);
	cursor: pointer;
	transition: all .15s;
	user-select: none;
}
.pill-group input[type="radio"]:checked + label {
	border-color: var(--teal);
	background: var(--teal);
	color: #fff;
}
.pill-group label:hover { border-color: var(--teal); color: var(--teal); }

/* ── Chip toggle (checkbox) ───────────── */
.chip-group {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
}
.chip-group input[type="checkbox"] { display: none; }
.chip-group label {
	padding: .4rem .9rem;
	border: 1.5px solid var(--border);
	border-radius: var(--radius-sm);
	font-size: .82rem;
	font-weight: 500;
	color: var(--muted);
	cursor: pointer;
	transition: all .15s;
	user-select: none;
}
.chip-group input[type="checkbox"]:checked + label {
	border-color: var(--teal);
	background: var(--teal-light);
	color: var(--teal-dark);
}
.chip-group label:hover { border-color: var(--teal); color: var(--teal-dark); }

/* ── Upload slots ─────────────────────── */
.upload-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: .75rem;
}
.upload-slot {
	position: relative;
	border: 1.5px dashed var(--border);
	border-radius: var(--radius-md);
	aspect-ratio: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: .4rem;
	cursor: pointer;
	transition: border-color .15s, background .15s;
	overflow: hidden;
	background: var(--sand);
}
.upload-slot:hover { border-color: var(--teal); background: var(--teal-light); }
.upload-slot input[type="file"] {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
	width: 100%;
	height: 100%;
}
.upload-slot .slot-icon { color: var(--border); transition: color .15s; }
.upload-slot:hover .slot-icon { color: var(--teal); }
.upload-slot .slot-label {
	font-size: .7rem;
	font-weight: 600;
	color: var(--muted);
	text-align: center;
	padding: 0 .4rem;
}
.upload-slot .slot-preview {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: none;
	border-radius: calc(var(--radius-md) - 2px);
}
.upload-slot.has-file .slot-preview { display: block; }
.upload-slot.has-file .slot-icon,
.upload-slot.has-file .slot-label { display: none; }

/* spinner overlay */
.upload-slot .slot-spinner {
	display: none;
	position: absolute;
	inset: 0;
	background: rgba(255,255,255,.75);
	align-items: center;
	justify-content: center;
	border-radius: calc(var(--radius-md) - 2px);
}
.upload-slot.uploading .slot-spinner { display: flex; }
.spinner-ring {
	width: 28px; height: 28px;
	border: 3px solid var(--border);
	border-top-color: var(--teal);
	border-radius: 50%;
	animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* done badge */
.upload-slot .slot-done {
	display: none;
	position: absolute;
	top: 6px; right: 6px;
	background: var(--teal);
	color: #fff;
	border-radius: 50%;
	width: 20px; height: 20px;
	align-items: center;
	justify-content: center;
}
.upload-slot.upload-done .slot-done { display: flex; }

/* ── Submit button ────────────────────── */
.btn-submit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	width: 100%;
	margin-top: 1.75rem;
	padding: .85rem 1rem;
	background: linear-gradient(135deg, var(--teal), var(--teal-dark));
	color: #fff;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 700;
	border: none;
	border-radius: var(--radius-md);
	cursor: pointer;
	transition: opacity .15s, transform .1s;
	letter-spacing: .01em;
}
.btn-submit:hover { opacity: .92; }
.btn-submit:active { transform: scale(.98); }
.btn-submit:disabled { opacity: .6; cursor: not-allowed; }
.btn-submit .btn-spinner {
	display: none;
	width: 18px; height: 18px;
	border: 2.5px solid rgba(255,255,255,.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: spin .7s linear infinite;
}
.btn-submit.loading .btn-spinner { display: block; }
.btn-submit.loading .btn-text { display: none; }

/* ── Toast ────────────────────────────── */
#toast {
	position: fixed;
	bottom: 1.5rem;
	left: 50%;
	transform: translateX(-50%) translateY(4px);
	min-width: 260px;
	max-width: 90vw;
	background: var(--text);
	color: #fff;
	padding: .75rem 1.25rem;
	border-radius: var(--radius-md);
	font-size: .875rem;
	font-weight: 500;
	box-shadow: 0 8px 24px rgba(0,0,0,.2);
	opacity: 0;
	pointer-events: none;
	transition: opacity .25s, transform .25s;
	z-index: 9999;
	text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.success { background: var(--teal-dark); }
#toast.error   { background: var(--coral); }
