* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f5f7;
    color: #222;
}

.app {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 270px;
    background: #1f1f1f;
    color: white;
    transition: transform .25s ease;
    flex-shrink: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px;
    background: #BE0004;
}

.brand-logo {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: white;
    color: #BE0004;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.brand span {
    display: block;
    font-size: 13px;
    opacity: .85;
}

.sidebar nav {
    padding: 14px;
}

.sidebar nav a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 8px;
}

.sidebar nav a:hover {
    background: #333;
}

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

.topbar {
    height: 72px;
    background: white;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 24px;
}

.topbar span {
    display: block;
    font-size: 13px;
    color: #666;
}

.burger {
    border: none;
    background: #BE0004;
    color: white;
    font-size: 22px;
    border-radius: 10px;
    padding: 8px 13px;
    cursor: pointer;
}

.content {
    padding: 24px;
}

.card {
    background: white;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 3px 12px rgba(0,0,0,.08);
    margin-bottom: 20px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.stat {
    background: white;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 3px 12px rgba(0,0,0,.08);
}

.stat strong {
    display: block;
    font-size: 34px;
    color: #BE0004;
}

label {
    display: block;
    font-weight: bold;
    margin-top: 14px;
}

input, textarea, select {
    width: 100%;
    padding: 13px;
    border: 1px solid #ccc;
    border-radius: 10px;
    margin-top: 6px;
    font-size: 15px;
}

textarea {
    min-height: 120px;
}

button, .btn {
    display: inline-block;
    border: none;
    background: #BE0004;
    color: white;
    padding: 13px 18px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    margin-top: 14px;
}

.btn-secondary {
    background: #333;
}

.btn-green {
    background: #16833a;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 16px;
    overflow: hidden;
}

.table th,
.table td {
    padding: 13px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.table th {
    background: #BE0004;
    color: white;
}

.alert-ok {
    background: #e8f7ee;
    color: #16833a;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.alert-error {
    background: #fde8e8;
    color: #BE0004;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.checkbox-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.checkbox-item {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #BE0004;
}

.login-box {
    width: 100%;
    max-width: 420px;
    background: white;
    padding: 28px;
    border-radius: 18px;
    box-shadow: 0 5px 25px rgba(0,0,0,.2);
}

@media (max-width: 800px) {
    .sidebar {
        position: fixed;
        z-index: 1000;
        height: 100vh;
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

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

    .checkbox-list {
        grid-template-columns: 1fr;
    }
}
