.app-shell {
    background: #ffffff;
    min-height: 100vh;
}

.board {
    background: #ffffff;
    padding: 12px;
}

/* Top bar */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 4px 16px 4px;
    flex-wrap: wrap;
}

.top-bar .left-buttons,
.top-bar .right-buttons {
    display: flex;
    gap: 8px;
}

.top-bar .week-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.week-nav button {
    border: none;
    background: #f0f0f0;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    cursor: pointer;
}

.week-nav button:hover {
    background: #e0e0e0;
}

.btn-board {
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    background: #3498db;
    color: #fff;
    cursor: pointer;
    font-weight: 500;
}

.btn-board:hover {
    background: #2c81ba;
}

.btn-board.secondary {
    background: #eef1f4;
    color: #333;
}

.btn-board.secondary:hover {
    background: #dfe4e8;
}

/* Board layout: collapsible Aufgaben sidebar + 7-day week grid, no visible gridlines */
.board-layout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.aufgaben-sidebar {
    flex: 0 0 220px;
    background: #f5f6f8;
    border: 1px solid #e8e9ec;
    border-radius: 14px;
    padding: 10px;
    transition: flex-basis 0.15s ease, padding 0.15s ease;
}

.aufgaben-sidebar.collapsed {
    flex: 0 0 40px;
    padding: 10px 4px;
    overflow: hidden;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.aufgaben-sidebar.collapsed .sidebar-header {
    justify-content: center;
}

.sidebar-toggle {
    border: none;
    background: #e9ecef;
    border-radius: 6px;
    width: 26px;
    height: 26px;
    line-height: 1;
    cursor: pointer;
    font-weight: 600;
    flex-shrink: 0;
}

.sidebar-toggle:hover {
    background: #dde1e5;
}

.week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 16px;
    align-items: start;
    flex: 1 1 auto;
    min-width: 0;
}

.board-column-header {
    font-weight: 600;
    color: #444;
    margin-bottom: 4px;
    text-align: center;
}

.board-column-date {
    font-size: 0.8rem;
    color: #999;
    text-align: center;
    margin-bottom: 8px;
}

.day-column, .aufgaben-column {
    background: #ffffff;
    min-height: 300px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 8px;
    padding: 4px;
    border-radius: 12px;
}

.aufgaben-column {
    flex-direction: column;
    flex-wrap: nowrap;
}

/* Cards: rounded corners, free-floating feel, no grid lines */
.einsatz-card, .aufgabe-card {
    flex: 0 0 auto;
    width: 100%;
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    padding: 10px 12px;
    cursor: grab;
    user-select: none;
    position: relative;
    transition: box-shadow 0.15s ease;
}

.einsatz-card:hover, .aufgabe-card:hover {
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.einsatz-card {
    border-left: 6px solid var(--card-color, #3498db);
}

.einsatz-card .card-title {
    font-weight: 600;
    font-size: 0.92rem;
}

.einsatz-card .card-sub {
    font-size: 0.78rem;
    color: #777;
}

.card-ghost {
    opacity: 0.4;
}

/* Hover popover (read-only preview) */
.hover-popover {
    position: fixed;
    z-index: 2000;
    background: #2b2b2b;
    color: #fff;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.82rem;
    max-width: 260px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    pointer-events: none;
}

.hover-popover .popover-title {
    font-weight: 700;
    margin-bottom: 4px;
}

/* Modal dialogs */
.dialog-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.dialog-box {
    background: #fff;
    border-radius: 16px;
    padding: 20px 24px;
    width: 420px;
    max-width: 92vw;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}

.dialog-box h4 {
    margin-bottom: 16px;
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
}

.form-field {
    margin-bottom: 12px;
}

.form-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #555;
}

.form-field input, .form-field select, .form-field textarea {
    width: 100%;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.form-hint {
    display: block;
    font-size: 0.75rem;
    color: #888;
    margin-top: 4px;
}

.archiv-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.admin-section {
    margin-bottom: 32px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

.admin-table th {
    text-align: left;
    font-size: 0.8rem;
    color: #777;
    padding: 4px 8px;
    border-bottom: 2px solid #eee;
}

.admin-table td {
    padding: 4px 8px;
    border-bottom: 1px solid #f2f2f2;
}

.admin-table input[type="text"],
.admin-table input:not([type]),
.admin-table select {
    width: 100%;
    padding: 5px 7px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.admin-table input[type="color"] {
    width: 44px;
    height: 30px;
    padding: 0;
    border: 1px solid #ccc;
    border-radius: 6px;
}

@media (max-width: 1100px) {
    .board-layout {
        flex-direction: column;
    }

    .aufgaben-sidebar {
        flex-basis: auto;
        width: 100%;
    }

    .week-grid {
        grid-template-columns: 1fr;
        width: 100%;
    }
}
