/* OEE Module — oee.css */

/* ── OEE color coding ─────────────────────────────────────────────────── */
.oee-green  { color: #27ae60; font-weight: bold; }
.oee-yellow { color: #e67e22; font-weight: bold; }
.oee-red    { color: #e74c3c; font-weight: bold; }

.oee-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 1.1em;
    font-weight: bold;
    min-width: 64px;
    text-align: center;
}
.oee-badge.oee-green  { background: #d5f5e3; color: #1e8449; }
.oee-badge.oee-yellow { background: #fef9e7; color: #b7770d; }
.oee-badge.oee-red    { background: #fdecea; color: #c0392b; }

/* ── Dashboard cards ──────────────────────────────────────────────────── */
.oee-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}
.oee-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 16px 20px;
    min-width: 260px;
    flex: 1 1 260px;
    box-shadow: 0 1px 3px rgba(0,0,0,.07);
}
.oee-card h3 {
    margin: 0 0 10px 0;
    font-size: 1em;
    color: #555;
    border-bottom: 1px solid #eee;
    padding-bottom: 6px;
}
.oee-card .oee-big {
    font-size: 2.2em;
    font-weight: bold;
    line-height: 1.1;
}
.oee-card .oee-factors {
    margin-top: 8px;
    font-size: 0.88em;
    color: #666;
}
.oee-card .oee-factors span {
    margin-right: 12px;
}

/* ── Charts row ───────────────────────────────────────────────────────── */
.oee-charts-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 24px;
}
.oee-chart-wrap {
    flex: 1 1 400px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 14px 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,.07);
}
.oee-chart-wrap h4 {
    margin: 0 0 10px 0;
    font-size: 0.95em;
    color: #444;
}

/* ── Table ────────────────────────────────────────────────────────────── */
.oee-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}
.oee-table th,
.oee-table td {
    padding: 6px 10px;
    border: 1px solid #e0e0e0;
    text-align: left;
}
.oee-table th {
    background: #f5f5f5;
    font-weight: 600;
}
.oee-table tr:nth-child(even) td {
    background: #fafafa;
}

/* ── Filter bar ───────────────────────────────────────────────────────── */
.oee-filter-bar {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 10px 14px;
    margin-bottom: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}
.oee-filter-bar label {
    font-size: 0.85em;
    color: #555;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.oee-filter-bar select,
.oee-filter-bar input[type="date"],
.oee-filter-bar input[type="text"] {
    font-size: 0.92em;
    padding: 4px 6px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

/* ── Ongoing badge ────────────────────────────────────────────────────── */
.oee-ongoing {
    display: inline-block;
    background: #e74c3c;
    color: #fff;
    border-radius: 10px;
    padding: 1px 8px;
    font-size: 0.8em;
    font-weight: bold;
}

/* ── Null / no data ───────────────────────────────────────────────────── */
.oee-nodata {
    color: #aaa;
    font-style: italic;
}
