/* Bereich Aufträge (Dashboard, Übersicht, Details, Versand) – ergänzt site.css. Keine Inline-Styles (CSP). */

.stat-link { display: block; color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.stat-link:hover { color: inherit; border-color: #9fc3e9; box-shadow: var(--shadow); }

.table tbody tr.row-mine { background: #f3f8fe; }
.table tbody tr.row-mine td:first-child { box-shadow: inset 3px 0 0 var(--c-primary); }

.input-inline { width: auto; min-width: 14rem; }
.input-password { width: 13rem; }
.input-operator { width: 5rem; font-family: var(--mono); text-align: center; }

.operators td { vertical-align: middle; }
.password-reveal { min-height: 1.9rem; }

.comment-text { white-space: pre-wrap; margin-top: .3rem; }
.form-value { white-space: pre-wrap; }

.attachment-list { margin: 0; padding-left: 1.1rem; }
.attachment-list li { margin-bottom: .2rem; }

.mail-preview {
    white-space: pre-wrap; font-family: var(--font); font-size: .95rem; background: #f8fafc;
    border: 1px solid var(--c-border); border-radius: var(--radius-sm); padding: .9rem 1rem; margin: 0;
}

.stages li.current.returned { background: var(--c-warning); color: #fff; }

/* Auftragsdetails: Arbeitsschritte im Hauptteil, ToDos rechts (mitlaufend), Verlauf eingeklappt am Ende. */
.order-todos { position: sticky; top: 1.25rem; }
.tasklist .task-text .task-meta,
.tasklist .task-text .task-auto { display: block; white-space: normal; font-size: .8rem; }

/* ToDo-Zettel im Post-it-Stil: klassisches Gelb, Klebestreifen, Eselsohr – damit er beachtet wird. */
.todo-note {
    position: relative;
    padding: 1.5rem 1.3rem 1.6rem;
    background: linear-gradient(175deg, #fff9b8 0%, #fff27d 60%, #fbe96a 100%);
    color: #3b3300;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgb(0 0 0 / 8%), 0 12px 22px -10px rgb(110 90 0 / 55%);
}
.todo-note::before {
    content: ""; position: absolute; top: -12px; left: 50%; width: 104px; height: 26px;
    transform: translateX(-50%) rotate(-2deg);
    background: rgb(255 255 255 / 60%); border: 1px solid rgb(0 0 0 / 6%);
    box-shadow: 0 1px 2px rgb(0 0 0 / 10%);
}
.todo-note::after {
    content: ""; position: absolute; right: 0; bottom: 0; width: 24px; height: 24px;
    background: linear-gradient(to top left, var(--c-bg) 50%, #e3cf4f 50%);
}
.todo-note .card-header { margin-bottom: .75rem; }
.todo-note h2 { font-size: 1.25rem; color: #3b3300; letter-spacing: .01em; }
.todo-note .badge-muted { background: rgb(110 90 0 / 14%); color: #4d4200; }
.todo-note .tasklist li { border-bottom-color: rgb(110 90 0 / 25%); }
.todo-note .tasklist input[type="checkbox"] { accent-color: #7a6300; }
.todo-note .tasklist .done .task-text { color: #7a6f3a; }
.todo-note .task-meta { color: #6b5d1a; }
.todo-note .task-auto { color: #6b5d1a; font-style: italic; }
.todo-note .task-auto::before { content: "⚙ "; font-style: normal; }

.work-steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.work-steps > li { counter-increment: step; position: relative; padding: 0 0 1.5rem 2.75rem; }
.work-steps > li::before {
    content: counter(step); position: absolute; left: 0; top: 0;
    width: 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center;
    background: var(--c-primary-soft); color: var(--c-primary); font-weight: 700;
}
.work-steps > li.done::before { content: "✓"; background: var(--c-success-soft); color: var(--c-success); }
.work-steps > li:not(:last-child)::after {
    content: ""; position: absolute; left: .9rem; top: 2.3rem; bottom: .5rem; border-left: 2px solid var(--c-border);
}
.work-steps > li > h3, .work-steps #order-operators > h3 { margin: .3rem 0 .5rem; font-size: 1.05rem; }

/* Ablagefeld für Lizenzdateien: Klick = Dateiauswahl (mehrfach), Drag & Drop. */
.dropzone {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: .25rem;
    padding: 1.4rem 1rem; text-align: center; cursor: pointer;
    border: 2px dashed #9fb3c8; border-radius: var(--radius); background: #f8fafc;
    transition: border-color .15s, background-color .15s;
}
.dropzone:hover, .dropzone:focus-within { border-color: var(--c-primary); background: var(--c-primary-soft); }
.dropzone.is-dragover { border-color: var(--c-primary); background: var(--c-primary-soft); border-style: solid; }
.dropzone.has-files { border-color: var(--c-success); background: var(--c-success-soft); }
.dropzone-input { position: absolute; left: 50%; bottom: .5rem; width: 1px; height: 1px; opacity: 0; }
.dropzone-title { font-weight: 600; color: var(--c-primary); }
.dropzone-hint { font-size: .85rem; color: var(--c-muted); }
.dropzone-files { font-size: .9rem; color: var(--c-success); word-break: break-word; }
.dropzone-files:empty { display: none; }
.upload-status { list-style: none; margin: .75rem 0 0; padding: 0; }
.upload-status li { margin-bottom: .2rem; }

.order-complete { border-top: 1px solid var(--c-border); padding-top: 1rem; }
.order-complete h3 { font-size: 1rem; }

.history > summary { display: flex; align-items: baseline; gap: .75rem; cursor: pointer; list-style: none; }
.history > summary::-webkit-details-marker { display: none; }
.history > summary::before { content: "▸"; color: var(--c-muted); display: inline-block; transition: transform .15s; }
.history[open] > summary::before { transform: rotate(90deg); }
.history > summary h2 { margin: 0; }
.history[open] > summary { margin-bottom: 1rem; }
.history-meta { margin-bottom: 1rem; }

@media (max-width: 900px) {
    .order-todos { position: static; order: -1; margin-top: .75rem; }
}

/* Wizard: abweichender Preis bzw. Anzahl User je Auftrag. */
.article-table .input.input-price { min-width: 0; width: 6.5rem; text-align: right; font-variant-numeric: tabular-nums; }
.override-field { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: .35rem 0 0 1.75rem; }
.override-field label { font-size: .9rem; }
.override-field .hint { margin: 0; }
.form-group:has(> .checkbox input[type="checkbox"]:not(:checked)) > .override-field { display: none; }
