* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f7fb;
    color: #1f2a37;
}
.app-layout { display: flex; min-height: 100vh; }
.sidebar {
    width: 220px;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    padding: 20px;
    position: sticky;
    top: 0;
    height: 100vh;
}
.sidebar h1 { font-size: 20px; margin-bottom: 20px; }
.sidebar nav a {
    display: block;
    margin-bottom: 10px;
    text-decoration: none;
    color: #334155;
}
.content { flex: 1; padding: 20px; }
.top-row { display: flex; justify-content: space-between; align-items: center; }
.cards {
    margin-top: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}
.cards.three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
    background: #fff;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
}
.card span { color: #64748b; font-size: 13px; display: block; margin-bottom: 6px; }
.card strong { font-size: 20px; }
.panel {
    margin-top: 20px;
    background: #fff;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}
.form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.hint { color: #64748b; font-size: 12px; }
input, textarea, button {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 9px;
    font-size: 14px;
}
.btn-primary, .btn-secondary, .btn-danger {
    border: none;
    border-radius: 8px;
    cursor: pointer;
}
.btn-primary { background: #0f766e; color: #fff; }
.btn-secondary { background: #e2e8f0; color: #0f172a; padding: 10px 12px; text-decoration: none; display: inline-block; }
.btn-danger { background: #dc2626; color: #fff; padding: 8px 10px; }
.btn-secondary.full { width: 100%; margin-top: 12px; text-align: center; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid #e5e7eb; padding: 10px; text-align: left; font-size: 14px; }
.charts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
.chart-box {
    position: relative;
    height: 320px;
    min-height: 320px;
}
.chart-box canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}
.chart-warning {
    background: #ffedd5;
    color: #9a3412;
    border: 1px solid #fdba74;
    border-radius: 8px;
    padding: 10px;
}
.positive { color: #15803d; }
.negative { color: #b91c1c; }
.meta { margin-top: 10px; display: flex; gap: 14px; flex-wrap: wrap; color: #64748b; }
.warning { color: #b45309; }
.alert { padding: 10px; border-radius: 8px; margin-top: 10px; }
.alert.success { background: #dcfce7; color: #166534; }
.alert.error { background: #fee2e2; color: #991b1b; }
.alert.warning { background: #ffedd5; color: #9a3412; }

@media (max-width: 900px) {
    .app-layout { flex-direction: column; }
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }
    .chart-box {
        height: 260px;
        min-height: 260px;
    }
}
