.atdsc {
	--atd-ink: #1f2933;
	--atd-muted: #5f6b7a;
	--atd-line: #d5dce4;
	--atd-bg: #ffffff;
	--atd-soft: #f4f7fa;
	--atd-brand: #0f5c8c;
	--atd-brand-ink: #ffffff;
	--atd-ok: #1d7a46;
	--atd-ok-soft: #e7f5ec;
	--atd-err: #b42318;
	--atd-err-soft: #fdecea;
	--atd-water: #a9d6f5;
	--atd-open: #ffffff;
	--atd-taken: #c3cbd4;
	--atd-held: #e4dcf5;
	--atd-sel: #0f5c8c;
	color: var(--atd-ink);
	max-width: 860px;
	margin: 0 auto;
	font-size: 16px;
	line-height: 1.5;
	box-sizing: border-box;
}
.atdsc *, .atdsc *::before, .atdsc *::after { box-sizing: border-box; }
.atdsc-card {
	background: var(--atd-bg);
	border: 1px solid var(--atd-line);
	border-radius: 10px;
	padding: 20px 22px;
	margin: 0 0 18px;
}
.atdsc h2 { margin: 0 0 10px; font-size: 1.5em; line-height: 1.25; }
.atdsc h3 { margin: 0 0 14px; font-size: 1.2em; display: flex; align-items: center; gap: 10px; }
.atdsc-step {
	display: inline-flex; align-items: center; justify-content: center;
	width: 28px; height: 28px; border-radius: 50%;
	background: var(--atd-brand); color: var(--atd-brand-ink);
	font-size: 14px; font-weight: 700; flex: none;
}
.atdsc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.atdsc-grid-tight { gap: 0 12px; }
.atdsc-span2 { grid-column: 1 / -1; }
.atdsc-field { margin: 0; min-width: 0; }
.atdsc-field.atdsc-flush { margin-bottom: 4px; }
fieldset.atdsc-field { border: 0; padding: 0; margin: 16px 0 0; }
.atdsc-field > label, .atdsc-field legend { display: block; font-weight: 600; margin: 0 0 5px; padding: 0; font-size: .95em; }
.atdsc-req { color: var(--atd-err); }
.atdsc input[type="text"], .atdsc input[type="email"], .atdsc input[type="tel"], .atdsc select {
	width: 100%; min-height: 44px; padding: 9px 12px;
	border: 1px solid #b8c2cc; border-radius: 7px; background: #fff; color: var(--atd-ink);
	font: inherit; margin: 0;
}
.atdsc select:disabled { background: var(--atd-soft); color: var(--atd-muted); }
.atdsc input:focus, .atdsc select:focus, .atdsc .atdsc-slip:focus-visible, .atdsc textarea:focus { outline: 3px solid rgba(15, 92, 140, .35); outline-offset: 1px; border-color: var(--atd-brand); }
.atdsc .is-invalid { border-color: var(--atd-err) !important; box-shadow: 0 0 0 2px var(--atd-err-soft); }
.atdsc-hint { color: var(--atd-muted); font-size: .88em; margin: 5px 0 0; }
.atdsc-check, .atdsc-radio { display: flex; gap: 9px; align-items: flex-start; font-weight: 400; margin: 7px 0; cursor: pointer; }
.atdsc-check input, .atdsc-radio input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--atd-brand); }
.atdsc-pay { padding: 12px 14px; border: 1px solid var(--atd-line); border-radius: 8px; margin: 8px 0; }
.atdsc-pay:has(input:checked) { border-color: var(--atd-brand); background: #eef5fa; }
.atdsc-pay em { display: block; font-style: normal; color: var(--atd-muted); font-size: .88em; }
.atdsc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.atdsc-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 46px; padding: 10px 20px; border-radius: 8px; border: 1px solid transparent;
	font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; position: relative;
}
.atdsc-btn-primary { background: var(--atd-brand); color: var(--atd-brand-ink); }
.atdsc-btn-primary:hover { filter: brightness(1.08); }
.atdsc-btn-primary:disabled { opacity: .6; cursor: wait; }
.atdsc-btn-secondary { background: #fff; color: var(--atd-brand); border-color: var(--atd-brand); }
.atdsc-btn input[type="file"] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; font-size: 0; }
.atdsc-btn:focus-within { outline: 3px solid rgba(15, 92, 140, .35); outline-offset: 2px; }
.atdsc-link { background: none; border: 0; padding: 4px 0; color: var(--atd-brand); text-decoration: underline; cursor: pointer; font: inherit; font-size: .9em; }
.atdsc-submit { width: 100%; margin-top: 16px; font-size: 1.05em; }

.atdsc-alert { border-radius: 8px; padding: 12px 16px; margin: 0 0 16px; background: var(--atd-soft); border: 1px solid var(--atd-line); }
.atdsc-alert ul { margin: 6px 0 0 18px; padding: 0; }
.atdsc-alert-error { background: var(--atd-err-soft); border-color: #f5b5ae; color: #7a1a12; }
.atdsc-alert-ok { background: var(--atd-ok-soft); border-color: #a8dbbb; color: #14532d; }

/* Map */
.atdsc-map { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--atd-line); border-radius: 8px; background: #fff; margin: 10px 0 8px; }
.atdsc-map-svg { display: block; width: 100%; height: auto; min-width: 900px; }
.atdsc-map-svg.is-admin { min-width: 1300px; }
.atdsc-label-cover { fill: #fff; }
.atdsc-slip.is-na rect { fill: #f1f4f7; stroke: #c3cbd4; }
.atdsc-slip.is-na .atdsc-slip-id { fill: #9aa5b1; }
.atdsc-staff-note { background: #fff8e6; border-color: #f1d9a0; }
.atdsc-grid-3 { grid-template-columns: repeat(3, 1fr); margin-bottom: 12px; }
.atdsc-slip rect { fill: var(--atd-open); stroke: #1f2933; stroke-width: 1.5; transition: fill .15s; }
.atdsc-slip-id { font-size: 14px; font-weight: 700; fill: #1f2933; pointer-events: none; }
.atdsc-slip-name { font-size: 10px; fill: #1f2933; pointer-events: none; }
.is-admin .atdsc-slip-id { font-size: 12px; }
.atdsc-slip.is-clickable { cursor: pointer; }
.atdsc-slip.is-available.is-clickable:hover rect { fill: #d8ecdf; }
.atdsc-slip.is-available rect { fill: #eaf7ee; stroke: var(--atd-ok); }
.atdsc-slip.is-taken rect { fill: var(--atd-taken); stroke: #8d99a6; }
.atdsc-slip.is-taken .atdsc-slip-id { fill: #4b5563; }
.atdsc-slip.is-held rect { fill: var(--atd-held); stroke: #6b4fa0; }
.atdsc-slip.is-selected rect { fill: #f59e0b; stroke: #92400e; stroke-width: 2; }
.atdsc-slip.is-selected text { fill: #fff; }
.atdsc-slip:focus { outline: none; }
.atdsc-slip:focus-visible rect { stroke: #f59e0b; stroke-width: 3; }
/* Admin map: one color per contract status (matches the status pills in the table) */
.atdsc-slip.is-st-docs rect { fill: #f8c9c4; stroke: #b42318; }
.atdsc-slip.is-st-verify rect { fill: #fbe3a1; stroke: #a16207; }
.atdsc-slip.is-st-payment rect { fill: #c9dcf5; stroke: #1d4f91; }
.atdsc-slip.is-st-ready rect { fill: #bfe6cc; stroke: #1d7a46; stroke-dasharray: 4 2; stroke-width: 1.6; }
.atdsc-slip.is-st-confirmed rect { fill: #2f8a55; stroke: #1b5e3a; }
.atdsc-slip.is-st-confirmed text { fill: #fff; }
.atdsc-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .88em; color: var(--atd-muted); margin: 0 0 14px; }
.atdsc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.atdsc-sw { display: inline-block; width: 16px; height: 12px; border-radius: 3px; border: 1px solid #6b8aa3; }
.atdsc-sw-available { background: #eaf7ee; border-color: #1d7a46; }
.atdsc-sw-selected { background: #f59e0b; border-color: #92400e; }
.atdsc-sw-taken { background: var(--atd-taken); }
.atdsc-sw-held { background: var(--atd-held); border-color: #6b4fa0; }
.atdsc-sw-docs { background: #f8c9c4; border-color: #b42318; }
.atdsc-sw-verify { background: #fbe3a1; border-color: #a16207; }
.atdsc-sw-payment { background: #c9dcf5; border-color: #1d4f91; }
.atdsc-sw-ready { background: #bfe6cc; border: 1px dashed #1d7a46; }
.atdsc-sw-confirmed { background: #2f8a55; border-color: #1b5e3a; }

/* Documents */
.atdsc-doc { border: 1px dashed #9fb0c0; border-radius: 9px; padding: 14px; margin: 12px 0; background: var(--atd-soft); }
.atdsc-doc.has-files { border-style: solid; border-color: var(--atd-ok); background: var(--atd-ok-soft); }
.atdsc-doc.is-busy { opacity: .7; }
.atdsc-doc-head p { margin-top: 2px; }
.atdsc-doc-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.atdsc-file-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.atdsc-file-list li { display: flex; align-items: center; gap: 10px; font-size: .9em; word-break: break-all; }
.atdsc-file-list img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; border: 1px solid var(--atd-line); flex: none; }
.atdsc-file-icon { width: 56px; height: 56px; border-radius: 6px; background: #fff; border: 1px solid var(--atd-line); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; color: var(--atd-muted); flex: none; }
.atdsc-later { margin: 10px 0; padding: 10px 12px; border-radius: 8px; background: #fff8e6; border: 1px solid #f1d9a0; font-size: .92em; }
.atdsc-received { margin: 4px 0 12px 18px; padding: 0; font-size: .92em; }

/* Totals */
.atdsc-total { margin: 16px 0 6px; border: 1px solid var(--atd-line); border-radius: 8px; overflow: hidden; }
.atdsc-total > div { display: flex; justify-content: space-between; padding: 9px 14px; border-top: 1px solid var(--atd-line); }
.atdsc-total > div:first-child { border-top: 0; }
.atdsc-total > div[hidden] { display: none; }
.atdsc-total-line { background: var(--atd-soft); font-weight: 700; font-size: 1.1em; }

/* Terms & signature */
.atdsc-terms { max-height: 280px; overflow-y: auto; border: 1px solid var(--atd-line); border-radius: 8px; padding: 4px 16px; background: var(--atd-soft); font-size: .9em; margin-bottom: 12px; }
.atdsc-sig-wrap { position: relative; border: 1px solid #b8c2cc; border-radius: 8px; background: #fff; }
.atdsc-sig { display: block; width: 100%; height: 170px; touch-action: none; cursor: crosshair; border-radius: 8px; }
.atdsc-sig-placeholder { position: absolute; left: 16px; bottom: 14px; color: #9aa5b1; pointer-events: none; border-top: 1px solid #c8d0d8; padding-top: 4px; width: calc(100% - 32px); font-size: .9em; }
.atdsc-sig-wrap.is-signed .atdsc-sig-placeholder { color: transparent; }
.atdsc-captcha { max-width: 320px; margin-top: 14px; }

/* Status page */
.atdsc-checklist { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.atdsc-checklist li { display: flex; gap: 12px; align-items: flex-start; }
.atdsc-checklist small { color: var(--atd-muted); }
.atdsc-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #9fb0c0; display: inline-flex; align-items: center; justify-content: center; flex: none; font-weight: 700; font-size: 14px; }
.is-done .atdsc-dot { background: var(--atd-ok); border-color: var(--atd-ok); color: #fff; }
.atdsc-summary dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.atdsc-summary dt { color: var(--atd-muted); }
.atdsc-summary dd { margin: 0; }

@media (max-width: 640px) {
	.atdsc-card { padding: 16px; border-radius: 8px; }
	.atdsc-grid { grid-template-columns: 1fr; }
	.atdsc-grid-tight { grid-template-columns: 1fr 1fr; }
	.atdsc-doc-buttons .atdsc-btn { flex: 1 1 100%; }
	.atdsc-summary dl { grid-template-columns: 1fr; gap: 0; }
	.atdsc-summary dd { margin-bottom: 8px; }
}
