* { box-sizing: border-box; }
body {
    font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    background: #f4f6f8;
    color: #1a1f27;
}
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #12233f;
    color: #fff;
    padding: 0.75rem 1.5rem;
    flex-wrap: wrap;
}
.topbar .brand { font-weight: 700; font-size: 1.1rem; margin-right: 2rem; }
.topbar nav a {
    color: #cfe0f5;
    text-decoration: none;
    margin-right: 1.25rem;
    font-size: 0.95rem;
}
.topbar nav a:hover { color: #fff; text-decoration: underline; }
.user-menu { font-size: 0.9rem; }
.user-menu a { color: #ffb4b4; margin-left: 1rem; text-decoration: none; }

.container { max-width: 1200px; margin: 1.5rem auto; padding: 0 1.5rem; }

h1, h2, h3 { color: #12233f; }

.card {
    background: #fff;
    border: 1px solid #e1e6ec;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid #eef1f4; font-size: 0.92rem; }
th { background: #f0f3f7; }
tr:hover { background: #fafbfc; }

.badge { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 12px; font-size: 0.78rem; font-weight: 600; }
.badge-ok { background: #dff5e1; color: #1e7a34; }
.badge-due_soon { background: #fff3cd; color: #8a6d00; }
.badge-overdue { background: #fde0e0; color: #a41818; }
.badge-grounded { background: #fde0e0; color: #a41818; }
.badge-active { background: #dff5e1; color: #1e7a34; }

form.inline { display: inline; }
.btn {
    display: inline-block;
    padding: 0.45rem 0.9rem;
    background: #12233f;
    color: #fff;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
}
.btn:hover { background: #1c355e; }
.btn-secondary { background: #6c7580; }
.btn-danger { background: #b23b3b; }

.form-row { margin-bottom: 1rem; }
.form-row label { display: block; margin-bottom: 0.3rem; font-weight: 600; font-size: 0.9rem; }
.form-row input[type=text], .form-row input[type=number], .form-row input[type=date],
.form-row input[type=email], .form-row input[type=password], .form-row select, .form-row textarea {
    width: 100%; max-width: 420px; padding: 0.5rem; border: 1px solid #ccd3da; border-radius: 5px; font-size: 0.92rem;
}

.alert { padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1rem; font-size: 0.9rem; }
.alert-error { background: #fde0e0; color: #a41818; }
.alert-success { background: #dff5e1; color: #1e7a34; }

.login-box {
    max-width: 380px;
    margin: 6rem auto;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
