body { font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; line-height: 1.6; color: #333; background-color: #f8f9fa; margin: 0; padding: 20px; }
.ticket-container { max-width: 1100px; margin: 20px auto; background-color: #fff; border: 1px solid #e2e8f0; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03); padding: 25px 30px; }
h2 { font-size: 1.5em; font-weight: 600; color: #1a202c; margin-top: 0; margin-bottom: 8px; padding-bottom: 10px; border-bottom: 1px solid #e2e8f0; }
h3 { font-size: 1.2em; font-weight: 600; color: #2d3748; margin-top: 25px; margin-bottom: 15px; padding-bottom: 8px; border-bottom: 1px solid #e2e8f0; }
.review-image-column h3 { margin-top: 0; }
p.description { font-size: 0.95em; color: #718096; margin-bottom: 20px; }

/* --- Upload Section --- */
.upload-section { text-align: center; } .form-group { margin-bottom: 15px; text-align: left; } .form-group label { display: block; font-size: 0.9em; font-weight: 500; color: #4a5568; margin-bottom: 5px; } .form-group input[type="email"] { width: 100%; max-width: 400px; padding: 8px 12px; border: 1px solid #cbd5e0; border-radius: 6px; font-size: 0.95em; box-sizing: border-box; } .upload-area { border: 2px dashed #cbd5e0; border-radius: 8px; padding: 30px; background-color: #f7fafc; margin-bottom: 15px; margin-top: 15px; } .upload-label { cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; } .upload-icon { background-color: #e2e8f0; border-radius: 50%; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; } .upload-icon .icon { width: 24px; height: 24px; stroke: #718096; } .upload-label span { font-size: 0.9em; font-weight: 500; color: #4a5568; } .upload-label .upload-hint { font-size: 0.8em; color: #a0aec0; margin-top: 4px; }

/* --- Preview Section --- */
.preview-section { text-align: center; } .image-preview { max-width: 100%; max-height: 300px; margin: 15px auto; border: 1px solid #e2e8f0; border-radius: 4px; display: block; } .preview-email { font-size: 0.95em; color: #4a5568; margin-top: 10px; margin-bottom: 15px; }

/* --- Review Section General--- */
.review-layout-container { display: flex; flex-wrap: wrap; gap: 30px; align-items: flex-start; } .review-fields-column { flex-grow: 1; min-width: 300px; flex-basis: 60%; } .review-image-column { flex-basis: 35%; min-width: 250px; flex-shrink: 0; position: sticky; top: 20px; } #review-image-preview { display: block; max-width: 100%; height: auto; border: 1px solid #cbd5e0; border-radius: 6px; margin-top: 10px; } .review-section .field-group { margin-bottom: 30px; } .review-section .field-item { margin-bottom: 5px; display: flex; flex-direction: column; } .review-section .field-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; min-height: 20px; } .review-section label { display: block; font-size: 0.85em; font-weight: 500; color: #4a5568; } .review-section .field-value { background-color: #f7fafc; border: 1px solid #e2e8f0; padding: 6px 10px; border-radius: 4px; font-size: 0.9em; min-height: 34px; word-wrap: break-word; } .review-section .field-value .placeholder { color: #a0aec0; font-style: italic; } .review-section input[type="text"], .review-section input[type="date"], .review-section input[type="time"], .review-section input[type="email"], .review-section input[type="tel"], .review-section input[type="number"], .review-section textarea, .review-section select { width: 100%; padding: 6px 10px; border: 1px solid #cbd5e0; border-radius: 4px; font-size: 0.9em; box-sizing: border-box; } .review-section textarea { min-height: 60px; resize: vertical; } .review-section .edit-btn, .review-section .save-btn, .review-section .cancel-btn { background: none; border: none; cursor: pointer; padding: 2px 4px; font-size: 0.8em; display: inline-flex; align-items: center; } .review-section .edit-btn { color: #3182ce; } .review-section .save-btn { color: #38a169; margin-left: 5px; } .review-section .cancel-btn { color: #e53e3e; margin-left: 5px; } .review-section .edit-btn:hover, .review-section .save-btn:hover, .review-section .cancel-btn:hover { text-decoration: underline; }

/* --- Layout Specific Styles --- */
.field-grid-default { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 15px 20px; }
.notice-section-row { display: grid; gap: 10px 20px; align-items: center; margin-bottom: 10px; } .notice-checkbox-row { grid-template-columns: auto 1fr; } .notice-detail-row { grid-template-columns: auto 1fr auto 1fr; padding-left: 25px; } .notice-section-row label { margin-bottom: 0; display: flex; align-items: center; font-size: 0.9em; } .notice-section-row .field-item { margin-bottom: 0; } .notice-section-row input[type="checkbox"] { margin-right: 8px; height: 1em; width: 1em; accent-color: #3182ce;} .notice-section-row input[type="checkbox"]:disabled { cursor: not-allowed; opacity: 0.7; } .notice-section-row input[type="time"], .notice-section-row input[type="date"] { max-width: 180px; } .notice-detail-row label:not(:first-child) { padding-left: 10px; }
.court-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 15px 20px; }
.court-website-link { display: block; padding: 6px 0; font-size: 0.9em; word-wrap: break-word; min-height: 34px; } .court-website-link a { color: #3182ce; text-decoration: none; } .court-website-link a:hover { text-decoration: underline; }
.driver-row { display: grid; gap: 15px 20px; margin-bottom: 15px; align-items: flex-start; } .driver-name-row { grid-template-columns: repeat(3, 1fr); } .driver-address-row { grid-template-columns: 3fr 1fr; } .driver-city-state-zip-row { grid-template-columns: 5fr 2fr 3fr; } .driver-dob-race-sex-row { grid-template-columns: 5fr 2fr 2fr; } .driver-appearance-row { grid-template-columns: repeat(4, 1fr); } .driver-contact-row { grid-template-columns: repeat(2, 1fr); } .driver-license-row { grid-template-columns: 5fr 2fr 2fr; }
.vehicle-row { display: grid; gap: 15px 20px; margin-bottom: 15px; align-items: flex-start; } .vehicle-row-1 { grid-template-columns: 4fr 2fr 3fr; } .vehicle-row-2 { grid-template-columns: 1fr 2fr 2fr; } .vehicle-row-3 { grid-template-columns: repeat(2, 1fr); }
.violations-extra-rows-container { margin-top: 20px; border-top: 1px dashed #e2e8f0; padding-top: 15px; } .violations-extra-row { display: grid; gap: 15px 20px; margin-bottom: 15px; align-items: flex-start; } .violations-speed-row { grid-template-columns: repeat(5, 1fr); } .violations-full-width-row { grid-template-columns: 1fr; }
.violations-table-container { overflow-x: auto; margin-top: 10px; } .violations-table { width: 100%; border-collapse: collapse; font-size: 0.9em; } .violations-table th, .violations-table td { border: 1px solid #e2e8f0; padding: 8px 10px; text-align: left; vertical-align: top; } .violations-table thead th { background-color: #f7fafc; font-weight: 600; font-size: 0.85em; } .violations-table td { background-color: #fff; } .violations-table input[type="text"], .violations-table select { font-size: 0.9em; padding: 4px 6px; width: 98%; box-sizing: border-box; } .violations-table input[type="checkbox"] { height: 1.1em; width: 1.1em; margin-top: 5px; accent-color: #3182ce;} .violations-table .radio-group label { margin-right: 15px; font-size: 0.9em; display: inline-flex; align-items: center; } .violations-table .radio-group input[type="radio"] { margin-right: 4px; accent-color: #3182ce;} .violations-table td:nth-child(1) { width: 15%; text-align: center; } .violations-table td:nth-child(2) { width: 15%; } .violations-table td:nth-child(3) { width: 50%; } .violations-table td:nth-child(4) { width: 20%; }

/* --- Dynamic Question Section --- */
.dynamic-question-section { margin-top: 20px; padding-top: 20px; border-top: 1px solid #e2e8f0; }
.assistant-text { background-color: #edf2f7; border-left: 4px solid #4299e1; padding: 15px 20px; margin-bottom: 20px; border-radius: 4px; font-size: 0.95em; line-height: 1.7; }
.assistant-analysis { border-left-color: #48bb78; background-color: #f0fff4;}
.dynamic-q-desc { margin-top: 25px; border-top: 1px dashed #e2e8f0; padding-top: 15px; }
.dynamic-question-item { margin-bottom: 20px; }
.dynamic-question-item label { display: block; font-size: 0.95em; font-weight: 600; color: #2d3748; margin-bottom: 6px; }
.dynamic-question-item label .optional-tag { font-weight: normal; font-size: 0.85em; color: #718096; margin-left: 5px; }
.dynamic-question-item input[type="text"], .dynamic-question-item textarea, .dynamic-question-item select { width: 100%; max-width: 600px; padding: 8px 12px; border: 1px solid #cbd5e0; border-radius: 6px; font-size: 0.95em; box-sizing: border-box; }
.dynamic-question-item textarea { min-height: 80px; resize: vertical; }
.dynamic-question-item .radio-group-dynamic label, .dynamic-question-item .checkbox-group-dynamic label { display: block; /* Stack radio/checkbox options vertically */ margin-bottom: 8px; font-weight: normal; font-size: 0.95em; cursor: pointer; }
.dynamic-question-item .radio-group-dynamic input[type="radio"], .dynamic-question-item .checkbox-group-dynamic input[type="checkbox"] { margin-right: 8px; accent-color: #3182ce; vertical-align: middle; }


/* --- Buttons --- */
.button-group { margin-top: 20px; display: flex; justify-content: center; gap: 10px; } .final-submit-group { justify-content: flex-end; padding-top: 20px; margin-top: 25px; border-top: 1px solid #e2e8f0; } .button { padding: 10px 18px; border: none; border-radius: 6px; font-size: 0.95em; font-weight: 500; cursor: pointer; transition: background-color 0.2s ease, box-shadow 0.2s ease; min-width: 120px; } .button:disabled { opacity: 0.6; cursor: not-allowed; } .button-primary { background-color: #3182ce; color: white; } .button-primary:hover:not(:disabled) { background-color: #2b6cb0; } .button-secondary { background-color: #e2e8f0; color: #2d3748; border: 1px solid #cbd5e0; } .button-secondary:hover:not(:disabled) { background-color: #cbd5e0; }

/* --- Loading & State --- */
.hidden { display: none !important; } .loading-indicator { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; color: #718096; font-size: 0.9em; } .spinner { border: 4px solid #e2e8f0; border-top: 4px solid #3182ce; border-radius: 50%; width: 30px; height: 30px; animation: spin 1s linear infinite; margin-bottom: 10px; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- Error Messages --- */
.error-message { color: #e53e3e; font-size: 0.85em; margin-top: 10px; text-align: center; min-height: 1.2em; } .upload-section .error-message { margin-bottom: 10px; } .review-section .error-message { text-align: right; margin-top: 15px; } #dynamic-question-error { text-align: right; margin-top: 15px;}

/* --- Submitted Section --- */
.submitted-section { text-align: center; padding: 40px 20px; } .submitted-section h2 { border-bottom: none; margin-bottom: 15px; color: #38a169; }

/* Helper for hidden file input */
input[type="file"].hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; }

/* --- Responsive Styling --- */
@media (max-width: 950px) { .review-layout-container { flex-direction: column; } .review-image-column { position: static; width: 100%; max-width: 400px; margin: 0 auto 20px auto; flex-basis: auto; } .review-fields-column { flex-basis: auto; } }
@media (max-width: 768px) { .driver-row, .court-row, .vehicle-row, .notice-section-row, .violations-extra-row { grid-template-columns: 1fr !important; } .field-grid-default { grid-template-columns: 1fr; } .violations-table th, .violations-table td { padding: 6px 8px; white-space: normal; } .violations-table td:nth-child(1), .violations-table td:nth-child(2), .violations-table td:nth-child(3), .violations-table td:nth-child(4) { width: auto; } }