:root {
    --primary-color: #0d6efd;
    --primary-dark: #0a58ca;
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --border-color: #e0e4e9;
    --label-color: #4b5563;
    --input-bg: #f9fafb;
    --text-main: #1f2937;
    --required-color: #ef4444;}
.trace-body {
    background-color: #fff;
    font-family: inherit;
    color: var(--text-main);
    margin: 0;}
.trace-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0;}
.trace-card {
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;}
.trace-header {
    padding: 20px 0;
    background: transparent;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;}
.header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    padding-left: 1rem;}
.header-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 1.2rem;
    background-color: var(--primary-color);
    border-radius: 2px;}
.header-title h5 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: #111827;}
.mode-tabs {
    display: flex;
    background: #f3f4f6;
    padding: 4px;
    border-radius: 8px;
    gap: 4px;}
.mode-tabs input[type="radio"] {display: none;}
.mode-tab {
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.2s;
    margin: 0;}
.mode-tabs input[type="radio"]:checked + .mode-tab {
    background: #fff;
    color: var(--primary-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);}
.btn-reset {
    background: #fee2e2;
    color: #b91c1c;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;}
.btn-reset:hover {background: #fecaca;}
.trace-form {padding: 24px;}
.form-group-section {margin-bottom: 32px;}
.section-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;}
.section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);}
.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;}
.grid-layout.cols-2 {
    grid-template-columns: 1fr 1fr;}
.input-field {
    display: flex;
    flex-direction: column;
    gap: 6px;}
.input-field.span-2 {grid-column: span 2;}
.input-field label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--label-color);}
.required {color: var(--required-color);}
input[type="text"], input[type="number"],
input[type="time"], select, textarea {
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.875rem;
    transition: all 0.2s;
    outline: none;}
input:focus, select:focus, textarea:focus {
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);}
.input-group {
    display: flex;
    gap: 4px;
    align-items: center;}
.time-record-box {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: #f9fafb;}
.time-record-box.border-blue {border-color: #93c5fd;}
.box-header {
    background: #e5e7eb;
    padding: 8px 16px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #4b5563;
    text-align: center;}
.box-header.bg-blue {
    background: var(--primary-color);
    color: #fff;}
.box-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;}
.inner-row {
    display: flex;
    flex-direction: column;
    gap: 4px;}
.inner-row label {
    font-size: 0.75rem;
    font-weight: 600;}
.btn-now {
    background: #6b7280;
    color: white;
    border: none;
    padding: 0 12px;
    height: 35px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;}
.btn-now.bg-blue { background: var(--primary-color); }
.btn-now:hover { filter: brightness(1.1); }
.violation-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0;}
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: .4s;
    border-radius: 34px;}
.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;}
input:checked + .slider {background-color: var(--primary-color);}
input:checked + .slider:before {transform: translateX(22px);}
.switch-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--label-color);
    min-width: 80px;}
.image-upload-box {
    display: flex;
    flex-direction: column;
    gap: 8px;}
.image-upload-box label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--label-color);}
.drop-zone {
    height: 180px;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;}
.drop-zone.drag-over {
    border-color: var(--primary-color);
    background: #eff6ff;}
.preview-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;}
.drop-zone-text {
    position: absolute;
    bottom: 10px;
    background: rgba(255, 255, 255, 0.8);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #6b7280;
    text-align: center;
    pointer-events: none;
    z-index: 1;}
.image-upload-box input[type="text"] {font-size: 0.75rem;}
.km-badge {
    background: #eff6ff;
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.8125rem;
    border: 1px solid #dbeafe;
    min-width: 70px;
    text-align: center;}
textarea {
    width: 100%;
    resize: vertical;
    padding: 16px;
    box-sizing: border-box;}
.form-actions {
    margin-top: 40px;
    display: flex;
    justify-content: center;}
.btn-submit {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 16px 48px;
    border-radius: 8px;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(13, 110, 253, 0.3);}
.btn-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(13, 110, 253, 0.4);}
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border-color);}
.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;}
.footer-links a {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.875rem;}
.footer-links a:hover {color: var(--primary-color);}
.sep {color: #d1d5db;}
@media (max-width: 768px) {
    .grid-layout.cols-2 {grid-template-columns: 1fr;}
    .input-field.span-2 {grid-column: span 1;}}
.selected-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;}
.tag-badge {
    background-color: #f1f3f5;
    color: #495057;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #dee2e6;}
.remove-tag {
    cursor: pointer;
    color: #dc3545 !important;
    background: none;
    border: none;
    padding: 0;
    margin-left: 6px;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
    transition: transform 0.15s, color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;}
.remove-tag:hover {
    color: #a52834 !important;
    transform: scale(1.2);}