* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f3f4f6;
    color: #111827;
}

.public-page,
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.login-page {
    background: #111827;
}

.public-card,
.login-card,
.card,
.section {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}

.public-card {
    width: 100%;
    max-width: 760px;
    overflow: hidden;
}

.login-card {
    width: 100%;
    max-width: 430px;
    padding: 34px;
}

.public-header {
    padding: 34px;
    background: linear-gradient(135deg, #111827, #374151);
    color: #ffffff;
}

.public-header h1,
.login-card h1,
.topbar h2 {
    margin: 0;
}

.public-header h1,
.topbar h2 {
    font-size: 30px;
}

.public-header p,
.login-card p,
.muted {
    color: #6b7280;
    margin: 8px 0 0;
}

.public-header p {
    color: #d1d5db;
}

form.public-form {
    padding: 34px;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.field {
    display: flex;
    flex-direction: column;
}

.field.full {
    grid-column: 1 / -1;
}

label {
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 14px;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
select {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 15px;
}

input:focus,
select:focus {
    outline: none;
    border-color: #111827;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.12);
}

.consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 14px;
    color: #374151;
    margin-top: 6px;
}

.buttons,
.actions,
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

button,
.btn {
    display: inline-block;
    border: none;
    border-radius: 10px;
    padding: 13px 18px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}

.btn-primary,
button.btn-primary {
    background: #111827;
    color: #ffffff;
}

.btn-secondary,
button.btn-secondary {
    background: #e5e7eb;
    color: #111827;
}

.btn-danger,
button.btn-danger {
    background: #991b1b;
    color: #ffffff;
}

.alert {
    padding: 14px 16px;
    border-radius: 10px;
    font-weight: 700;
    margin-bottom: 18px;
}

.public-alert {
    margin: 24px 34px 0;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.footer {
    padding: 0 34px 28px;
    color: #FFFFFF;
    font-size: 13px;
    text-align: right;
}

.footer a,
.back {
    color: #FFFFFF;
    font-weight: 700;
    text-decoration: none;
}

.back {
    display: block;
    margin-top: 20px;
}

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

.sidebar {
    width: 270px;
    background: #111827;
    color: #ffffff;
    padding: 28px 22px;
}

.sidebar h1 {
    font-size: 22px;
    margin: 0 0 8px;
}

.sidebar p {
    color: #9ca3af;
    font-size: 14px;
    margin: 0 0 28px;
}

.nav a {
    display: block;
    color: #e5e7eb;
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 8px;
    font-weight: 700;
}

.nav a:hover,
.nav a.active {
    background: #374151;
}

.main {
    flex: 1;
    padding: 34px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 28px;
}

.logout {
    background: #111827;
    color: #ffffff;
    padding: 11px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 26px;
}

.cards.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.section {
    padding: 24px;
    margin-bottom: 24px;
}

.label {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 8px;
}

.value {
    font-size: 34px;
    font-weight: 800;
}

.filters,
.form-row {
    display: grid;
    grid-template-columns: 1fr 220px auto auto;
    gap: 12px;
    align-items: end;
}

.form-row {
    grid-template-columns: 1fr auto auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

th,
td {
    padding: 13px 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    font-size: 14px;
}

th {
    background: #f9fafb;
    font-weight: 800;
    color: #374151;
}

.badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.badge-ok {
    background: #dcfce7;
    color: #166534;
}

.badge-no {
    background: #fee2e2;
    color: #991b1b;
}

.empty {
    color: #6b7280;
}

.warning {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-weight: 700;
}

.winner {
    border: 2px solid #111827;
    background: #f9fafb;
}

.ball {
    font-size: 54px;
    font-weight: 900;
    margin: 0 0 10px;
}

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

    .sidebar {
        width: 100%;
    }

    .cards,
    .cards.three {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filters,
    .form-row {
        grid-template-columns: 1fr;
    }

    table {
        display: block;
        overflow-x: auto;
    }
}

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

    .buttons,
    .topbar {
        flex-direction: column;
    }

    button,
    .btn {
        width: 100%;
    }

    .main {
        padding: 20px;
    }
}
