* { box-sizing: border-box; }
body {
	margin: 0;
	background: #f4f5f7;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: #1d2327;
}

.jtd-wrap {
	max-width: 560px;
	margin: 0 auto;
	padding: 16px;
}

.jtd-header { text-align: center; margin-bottom: 20px; }
.jtd-header h1 { font-size: 22px; margin: 0 0 2px; }
.jtd-subtitle { color: #666; margin: 0; font-size: 14px; }

.jtd-alert { padding: 12px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.jtd-alert-error { background: #fdecea; color: #611a15; border: 1px solid #f5c6cb; }

.jtd-section { border: 1px solid #e2e4e7; border-radius: 10px; padding: 14px 16px 6px; margin-bottom: 16px; background: #fff; }
.jtd-section legend { font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: #2271b1; padding: 0 6px; }

.jtd-field { display: block; margin-bottom: 12px; }
.jtd-field span { display: block; font-size: 13px; font-weight: 500; margin-bottom: 4px; color: #3c434a; }
.jtd-field input, .jtd-field select, .jtd-field textarea {
	width: 100%; box-sizing: border-box; padding: 10px 12px; font-size: 16px;
	border: 1px solid #c3c4c7; border-radius: 8px; background: #fff; font-family: inherit;
}
.jtd-field textarea { resize: vertical; }

.jtd-row { display: flex; gap: 10px; }
.jtd-row .jtd-field { flex: 1; }
.jtd-field-sm { max-width: 110px; }
.jtd-hint { font-size: 12px; color: #8c8f94; margin: -6px 0 12px; }

.jtd-capture { margin-bottom: 16px; }
.jtd-capture-label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.jtd-capture-preview { width: 100%; min-height: 140px; border: 2px dashed #c3c4c7; border-radius: 10px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #fafafa; margin-bottom: 10px; }
.jtd-capture-preview img { width: 100%; height: 100%; object-fit: cover; }
.jtd-capture-preview-round { width: 140px; height: 140px; min-height: 0; border-radius: 50%; margin-left: auto; margin-right: auto; }
.jtd-capture-placeholder { color: #8c8f94; font-size: 13px; }
.jtd-capture-buttons { display: flex; gap: 10px; }

.jtd-btn { display: inline-flex; align-items: center; justify-content: center; flex: 1; padding: 11px 14px; border-radius: 8px; font-size: 14px; font-weight: 600; text-align: center; cursor: pointer; border: 1px solid transparent; box-sizing: border-box; text-decoration: none; }
.jtd-btn-outline { background: #fff; border-color: #2271b1; color: #2271b1; }
.jtd-btn-primary { background: #2271b1; color: #fff; width: 100%; padding: 14px; font-size: 16px; margin-top: 8px; }
.jtd-btn-primary:disabled { opacity: .6; }
.jtd-btn-sm { flex: none; padding: 6px 12px; font-size: 13px; }

.jtd-declaration { background: #f6f7f7; }
.jtd-checkbox { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: #3c434a; padding-bottom: 12px; }
.jtd-checkbox input { margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0; }

.jtd-privacy-note { text-align: center; color: #8c8f94; font-size: 12px; margin-top: 12px; }

.jtd-success { text-align: center; padding: 40px 20px; }
.jtd-success-icon { width: 64px; height: 64px; line-height: 64px; border-radius: 50%; background: #d1e7dd; color: #0f5132; font-size: 32px; margin: 0 auto 16px; }

/* login */
.jtd-login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.jtd-login-card { background: #fff; border: 1px solid #e2e4e7; border-radius: 12px; padding: 28px 24px; width: 100%; max-width: 360px; text-align: center; }
.jtd-login-card h1 { font-size: 20px; margin: 0 0 2px; }
.jtd-login-card form { text-align: left; margin-top: 18px; }

/* staff dashboard */
.jtd-dash-wrap { max-width: 960px; margin: 0 auto; padding: 16px; }
.jtd-dash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.jtd-dash-header strong { display: block; font-size: 16px; }
.jtd-dash-staffname { font-size: 12px; color: #8c8f94; }

.jtd-dash-filters { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.jtd-dash-filters input, .jtd-dash-filters select { padding: 9px 10px; border: 1px solid #c3c4c7; border-radius: 8px; font-size: 14px; }
.jtd-dash-filters input[type="search"] { flex: 1; min-width: 180px; }

.jtd-dash-loading { text-align: center; color: #8c8f94; padding: 30px 0; }

.jtd-card {
	background: #fff; border: 1px solid #e2e4e7; border-radius: 10px; padding: 14px 16px; margin-bottom: 10px;
	display: flex; justify-content: space-between; align-items: center; gap: 10px; cursor: pointer;
}
.jtd-card:hover { border-color: #2271b1; }
.jtd-card-main strong { display: block; font-size: 15px; }
.jtd-card-sub { font-size: 12px; color: #666; margin-top: 2px; }
.jtd-card-right { text-align: right; }

.jtd-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.jtd-pill-pending { background: #fff3cd; color: #7a5b00; }
.jtd-pill-paid { background: #d1e7dd; color: #0f5132; }
.jtd-pill-partial { background: #cfe2ff; color: #084298; }

.jtd-dash-pagination { display: flex; justify-content: center; gap: 6px; margin-top: 16px; }
.jtd-dash-pagination button { padding: 6px 12px; border: 1px solid #c3c4c7; background: #fff; border-radius: 6px; cursor: pointer; }
.jtd-dash-pagination button.is-active { background: #2271b1; color: #fff; border-color: #2271b1; }

.jtd-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: flex-end; justify-content: center; z-index: 999; }
.jtd-modal { background: #fff; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; border-radius: 14px 14px 0 0; padding: 20px; position: relative; }
@media (min-width: 600px) {
	.jtd-modal-backdrop { align-items: center; }
	.jtd-modal { border-radius: 14px; }
}
.jtd-modal-close { position: absolute; top: 10px; right: 14px; background: none; border: none; font-size: 24px; cursor: pointer; color: #666; }
.jtd-modal-thumbs { display: flex; gap: 10px; margin: 12px 0; }
.jtd-modal-thumbs img { width: 100px; height: 100px; object-fit: cover; border-radius: 8px; border: 1px solid #e2e4e7; }

@media (max-width: 400px) {
	.jtd-row { flex-direction: column; }
	.jtd-field-sm { max-width: none; }
}
