body {
    margin: 0;
    background: #f4f4f4;
    font-family: Arial, sans-serif;
}

.brandbar {
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, #1a1a1a, #2f2f2f);
    color: #fff;
    padding: 14px 20px;
    padding: 14px 20px;
	box-shadow: 0px 2px 6px rgba(0,0,0,0.25);
}

.brandbar .logo {
    width: 148px;
    margin-right: 18px;
}

.filters {
    position: sticky;
    top: 0;
    z-index: 3000;
    backdrop-filter: blur(6px);
}

.filters {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

.filters .spacer {
    flex: 1;
}

#sectionsContainer {
    padding: 20px;
}

/* Modernised section card */
.section-card {
    background: #fff;
    margin-bottom: 15px;
    border-radius: 6px;
    border: 1px solid #ccc;
	transition: box-shadow .2s ease;
}

.section-card:hover {
    box-shadow: 0px 4px 14px rgba(0,0,0,0.12);
}
.section-header {
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #eee;
    cursor: pointer;
}

.section-title {
    font-weight: bold;
}

.section-body {
    padding: 0 15px 15px 15px;
}

/* Task table */
.section-table tbody tr:hover {
    background: #f8f8f8;
}

.section-table {
    width: 100%;
    border-collapse: collapse;
}

.section-table th {
    background: #fafafa;
    border-bottom: 1px solid #ccc;
    padding: 6px;
    text-align: left;
}

.section-table td {
    border-bottom: 1px solid #eee;
    padding: 6px;
}

.section-body {
    overflow: hidden;
    transition: max-height 0.28s ease, padding 0.25s ease;
    max-height: 500px; /* default open */
}

.section-body.collapsed {
    max-height: 0;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 5000;
}

.modal-overlay.show {
    display: flex;
}

.modal-window {
    background: #fff;
    padding: 25px;
    width: 480px;
    border-radius: 8px;
    max-height: 92%;
    overflow-y: auto;
    box-shadow: 0px 6px 24px rgba(0,0,0,0.25);
    animation: popin .25s ease;
}

@keyframes popin {
    0% { transform: scale(.85); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
.modal-close {
    position: absolute;
    top: 12px;
    right: 18px;
    font-size: 22px;
    cursor: pointer;
    color: #777;
}
.modal-close:hover {
    color: #000;
}
.hidden {
    display: none;
}

/* Buttons */
button.primary {
    background: #1e88e5;
    border-radius: 5px;
    padding: 9px 16px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    color: #fff;
    cursor: pointer;
}

button.secondary {
    background: #f0f0f0;
    color: #555;
    border: none;
    padding: 10px 16px;
    border-radius: 5px;
    cursor: pointer;
}

/* Notices */
.notice {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #2e7d32;       /* success: green */
    color: white;
    padding: 12px 20px;
    border-radius: 5px;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity .3s, transform .3s;
    z-index: 6000;
}

.notice.show {
    opacity: 1;
    transform: translateY(0);
}

.notice.error {
    background: #c62828;       /* error: red */
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: transform .1s ease;
}

.badge:hover {
    transform: scale(1.04);
}

/* Badge Types */
.badge.ok {
    background: #d1f5d3;
    color: #14691c;
}

.badge.short {
    background: #ffe1d2;
    color: #b23a00;
	animation: pulse 1.2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(178, 58, 0, 0.5); }
    70% { box-shadow: 0 0 0 8px rgba(178, 58, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(178, 58, 0, 0); }
}
.badge.material-order {
    background: #ffef8a;
    color: #5e4d00;
}

.badge.notreq {
    background: #e0e0e0;
    color: #555;
}

.badge.completed {
    background: #cfe3ff;
    color: #134b9b;
}
/* Supplier Logo */
.supplier-logo {
    height: 20px;
    margin-left: 6px;
    vertical-align: middle;
}

@media(max-width: 600px) {
    .modal-window {
        width: 90%;
        padding: 16px;
    }
    .filters {
        flex-wrap: wrap;
        gap: 6px;
    }
}