.alert-success {
    padding: 12px 16px;
    border-radius: 6px;
    background-color: #e6f4ea;
    color: #1e7e34;
    border: 1px solid #b7e1c1;
    font-size: 14px;
    margin-bottom: 10px;
}

.alert-error {
    padding: 12px 16px;
    border-radius: 6px;
    background-color: #fcebea;
    color: #c82333;
    border: 1px solid #f5c6cb;
    font-size: 14px;
    margin-bottom: 10px;
}

.logowrap {
    display: flex;
    justify-content: center;
}
.namewrap {
    display: flex;
    justify-content: center;
}

.bigbutton {
    width: 100%;margin-bottom: 20px
}

@media (min-width: 768px) {
    .logowrap {
        justify-content: flex-start;
    }
    .namewrap {
        justify-content: flex-end;
    }
}

dl dt{
    margin-top: 12px;
    font-size: 14px;
}

table a {
    text-decoration: none;
}

/* Workshop-Planer */
.prewrap {
    white-space: pre-wrap;
}

.inline-form {
    display: inline;
    margin: 0;
}

button.small,
input[type="submit"].small {
    padding: 4px 10px;
    font-size: 14px;
    width: auto;
    margin: 0;
}

.badge {
    display: inline-block;
    padding: 2px 10px;
    margin: 0 6px 6px 0;
    border-radius: 999px;
    font-size: 14px;
    background-color: #eef0f3;
    color: #333;
    white-space: nowrap;
}
.badge--submitted { background-color: #e8f0fe; color: #1a4fb0; }
.badge--approved { background-color: #e6f4ea; color: #1e7e34; }
.badge--rejected { background-color: #fcebea; color: #c82333; }
.badge--changes_requested { background-color: #fff4e0; color: #8a5300; }

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.image-grid img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 6px;
}

.alert-list {
    margin: 0;
    padding-left: 18px;
}
.alert-list li {
    margin: 0;
    list-style: disc;
}

/* Save + cancel side by side. Pico gives the submit input a bottom margin and
   grid cells stretch, so without this the cancel link ends up taller. */
.form-actions {
    align-items: start;
    margin-bottom: var(--pico-spacing);
}
.form-actions > input[type="submit"],
.form-actions > [role="button"] {
    margin-bottom: 0;
    width: 100%;
}

.muted {
    color: var(--pico-muted-color);
}

table.compact td {
    padding: 2px 8px 2px 0;
    font-size: 14px;
}

.hours-table input {
    margin-bottom: 0;
    min-width: 90px;
}
.hours-table td {
    vertical-align: middle;
}
.hours-table td:first-child {
    white-space: nowrap;
}

/* Timeline: rooms as rows, positions as percentages calculated server-side */
.timeline-scroll {
    overflow-x: auto;
    margin-bottom: 32px;
}
.timeline {
    padding-right: 24px;
}
.timeline-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--pico-muted-border-color);
}
.timeline-label {
    flex: 0 0 160px;
    padding: 6px 8px 6px 0;
    font-size: 14px;
    line-height: 1.3;
}
.timeline-track {
    position: relative;
    flex: 1 1 auto;
    min-height: 56px;
    background: repeating-linear-gradient(45deg, rgba(128, 128, 128, 0.1), rgba(128, 128, 128, 0.1) 6px, rgba(128, 128, 128, 0.18) 6px, rgba(128, 128, 128, 0.18) 12px);
}
.timeline-head .timeline-track {
    background: none;
    min-height: 24px;
}
.timeline-hour {
    position: absolute;
    top: 2px;
    transform: translateX(-50%);
    font-size: 12px;
    color: var(--pico-muted-color);
}
.timeline-gridline {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(128, 128, 128, 0.2);
    z-index: 2;
}
.timeline-open {
    position: absolute;
    top: 0;
    bottom: 0;
    background: var(--pico-background-color);
    z-index: 1;
}
.timeline-closed-label {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: var(--pico-muted-color);
}
.timeline-block {
    position: absolute;
    top: 4px;
    bottom: 4px;
    z-index: 3;
    overflow: hidden;
    padding: 2px 6px;
    border-radius: 4px;
    background: #e8f0fe;
    border: 1px solid #8ab0f0;
    color: #1a3d80;
    font-size: 12px;
    line-height: 1.25;
    text-decoration: none;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.timeline-block:hover {
    background: #d4e3fc;
    z-index: 4;
}
.timeline-block strong,
.timeline-block span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Schedule: tray with unscheduled workshops + drag & drop */
.schedule-tray {
    position: sticky;
    top: 0;
    z-index: 10;
    margin-bottom: 24px;
    padding: 10px 12px;
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 8px;
    background: var(--pico-background-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.schedule-tray-head {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    align-items: baseline;
    margin-bottom: 8px;
}
.schedule-tray-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 30vh;
    overflow-y: auto;
}
.schedule-tray-empty {
    margin: 0;
    font-size: 14px;
}
.schedule-chip {
    display: block;
    max-width: 240px;
    padding: 4px 10px;
    border: 1px dashed #8ab0f0;
    border-radius: 6px;
    background: #e8f0fe;
    color: #1a3d80;
    font-size: 13px;
    line-height: 1.3;
    text-decoration: none;
    cursor: grab;
}
.schedule-chip strong,
.schedule-chip small {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.schedule-tray.can-remove {
    border: 2px dashed #c82333;
}
.schedule-tray.can-remove::after {
    content: attr(data-drop-label);
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #c82333;
}
.schedule-tray.is-over {
    background: #fcebea;
}

.dnd-only {
    display: none;
}
.js-dnd .dnd-only {
    display: inline;
}
.js-dnd .timeline-block {
    cursor: grab;
}
.schedule-chip.is-dragging,
.timeline-block.is-dragging {
    opacity: 0.4;
}
body.is-dragging .timeline-block {
    pointer-events: none; /* the row underneath receives the drop */
}
body.is-dragging .timeline-block.is-dragging {
    pointer-events: auto;
}

.timeline-ghost {
    position: absolute;
    top: 4px;
    bottom: 4px;
    z-index: 5;
    padding: 2px 6px;
    border: 2px dashed #1e7e34;
    border-radius: 4px;
    background: rgba(30, 126, 52, 0.15);
    color: #145a24;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
    pointer-events: none;
}
.timeline-ghost.is-bad {
    border-color: #c82333;
    background: rgba(200, 35, 51, 0.15);
    color: #8a1420;
}
.timeline-ghost.is-saving {
    border-style: solid;
    opacity: 0.7;
}
body.is-saving {
    cursor: progress;
}

/* Ticket codes + mailing */
.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
textarea.mono {
    font-size: 14px;
}
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}
.stat {
    padding: 12px;
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 8px;
    text-align: center;
}
.stat-value {
    display: block;
    font-size: 28px;
    font-weight: bold;
    line-height: 1.2;
}
.stat-label {
    display: block;
    font-size: 13px;
    color: var(--pico-muted-color);
}
.mail-preview {
    padding: 16px;
    margin-bottom: 24px;
    border: 1px dashed var(--pico-muted-border-color);
    border-radius: 8px;
}

/* Resize handle on the right edge of a block (added by schedule.js) */
.timeline-resize {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 8px;
    cursor: ew-resize;
    touch-action: none;
}
.timeline-block:hover .timeline-resize,
.timeline-block.is-resizing .timeline-resize {
    background: repeating-linear-gradient(to right, transparent 0 2px, #8ab0f0 2px 3px);
}
.timeline-block.is-resizing {
    z-index: 6;
    border-style: dashed;
    border-color: #1e7e34;
    background: rgba(30, 126, 52, 0.15);
}
.timeline-block.is-resizing.is-bad {
    border-color: #c82333;
    background: rgba(200, 35, 51, 0.15);
}
.timeline-block.is-saving {
    opacity: 0.7;
}

/* Reimbursement */
.doc-list {
    padding-left: 0;
}
.doc-list li {
    list-style: none;
    margin-bottom: 6px;
}
article.notice {
    border-left: 4px solid #e0a800;
}

.contact-hint,
.deadline-hint {
    font-size: 15px;
}
.deadline-hint {
    padding: 8px 12px;
    border-left: 4px solid #e0a800;
    background: rgba(224, 168, 0, 0.08);
}

/* Printing (e.g. the parking list): only the content */
@media print {
    main > header,
    main > nav,
    main > footer,
    .no-print,
    .alert-success,
    .alert-error {
        display: none !important;
    }
}

/* Tabs: plain links, every tab has its own URL (?tab=…). */
nav.tabs {
    display: block;
    margin-bottom: var(--pico-spacing);
    border-bottom: 1px solid var(--pico-muted-border-color);
}
nav.tabs ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.1rem;
    margin: 0;
    padding: 0;
}
nav.tabs li {
    list-style: none;
    padding: 0;
    margin: 0;
}
nav.tabs a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    padding: 0.55rem 0.5rem;
    font-size: 0.95rem;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    color: var(--pico-muted-color);
    text-decoration: none;
    white-space: nowrap;
}
nav.tabs a:hover {
    color: var(--pico-color);
    border-bottom-color: var(--pico-muted-border-color);
}
nav.tabs a[aria-current="page"] {
    color: var(--pico-primary);
    border-bottom-color: var(--pico-primary);
    font-weight: 600;
}
.tab-badge {
    font-size: 0.75em;
    padding: 0.05rem 0.45rem;
    border-radius: 1rem;
    background: var(--pico-muted-border-color);
    color: var(--pico-color);
    font-weight: normal;
}
.tab-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--pico-del-color, #c62828);
}
.tab-panel > :first-child {
    margin-top: 0;
}
@media print {
    nav.tabs { display: none; }
}
