{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background: #020617;
    color: white;
}

.wrapper {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 20px;
}

.layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.content {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
}

.header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.title small {
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.title h1 {
    margin-top: 10px;
    font-size: 42px;
}

.kpi-grid {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.card {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 24px;
    padding: 20px;
}

.card h2 {
    margin-top: 10px;
    font-size: 36px;
}

.red-card {
    border-color: rgba(239,68,68,0.3);
    background: rgba(239,68,68,0.08);
}

.green-card {
    border-color: rgba(16,185,129,0.3);
    background: rgba(16,185,129,0.08);
}

.card.green-card h2 a,
.card.green-card h2 a:link,
.card.green-card h2 a:visited,
.card.green-card h2 a:hover,
.card.green-card h2 a:active {
    color: inherit;          /* наследует цвет от h2 */
    text-decoration: none;   /* убирает подчёркивание */
    cursor: pointer;         /* оставляет курсор-руку, чтобы было понятно, что кликабельно (опционально) */
}



.main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.section-title h2 {
    font-size: 28px;
}

.muted {
    color: #94a3b8;
}

.button {
    background: #ef4444;
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 14px;
    cursor: pointer;
}

.downtime-item {
    background: #020617;
    border: 1px solid #1e293b;
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.progress {
    width: 220px;
    height: 10px;
    background: #1e293b;
    border-radius: 999px;
    overflow: hidden;
}

.progress-red {
    height: 100%;
    background: #ef4444;
}

.progress-green {
    height: 100%;
    background: #10b981;
}

.production-item {
    margin-bottom: 24px;
}

.production-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stats-grid h3 {
    font-size: 42px;
    margin-top: 10px;
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sidebar-links a {
    background: #0f172a;
    border: 1px solid #1e293b;
    color: white;
    text-decoration: none;
    padding: 16px;
    border-radius: 16px;
    transition: 0.2s;
}

.sidebar-links a:hover {
    background: #1e293b;
}

.sidebar-links .danger-link {
    background: #ef4444;
    border-color: #ef4444;
}

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

    .sidebar {
        width: 100%;
        position: relative;
        top: 0;
    }

    .main-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .title h1 {
        font-size: 30px;
    }
}