:root {
    --brand-navy: #004a7f;
    --brand-navy-dark: #00355c;
    --brand-red: #e30613;
    --brand-red-dark: #b8050f;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
    background: #f4f6f8;
    color: #1c2733;
}

/* --- Login / Setup --- */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--brand-navy);
}

.login-box {
    background: #fff;
    padding: 2.5rem;
    border-radius: 12px;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    text-align: center;
}

.login-box img.logo { max-width: 220px; margin-bottom: 1.2rem; }
.login-box h1 { font-size: 1.4rem; margin-bottom: 0.2rem; color: var(--brand-navy); }
.login-box .subtitle { color: #6b7785; margin-bottom: 1.5rem; font-size: 0.9rem; }

.login-box label { display: block; font-size: 0.85rem; margin: 0.8rem 0 0.3rem; font-weight: 600; text-align: left; }
.login-box input {
    width: 100%;
    padding: 0.6rem 0.7rem;
    border: 1px solid #d3dae1;
    border-radius: 6px;
    font-size: 1rem;
}

.login-box button {
    width: 100%;
    margin-top: 1.5rem;
    padding: 0.7rem;
    background: var(--brand-navy);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
}
.login-box button:hover { background: var(--brand-navy-dark); }

.alert { padding: 0.7rem 1rem; border-radius: 6px; margin-bottom: 1rem; font-size: 0.9rem; }
.alert-error { background: #fde2e2; color: var(--brand-red-dark); border-left: 4px solid var(--brand-red); }
.alert-success { background: #dcf5e3; color: #1b5e30; }
.alert-warning { background: #fff2cc; color: #7a5c00; }

/* --- App Layout --- */
.topbar {
    background: linear-gradient(120deg, var(--brand-navy), #00253f);
    color: #fff;
    display: flex;
    align-items: center;
    padding: 0 1.2rem;
    height: 68px;
    gap: 1.8rem;
    border-bottom: 3px solid var(--brand-red);
}
.topbar-brand { font-weight: 700; display: flex; align-items: center; }
.topbar-brand a { display: flex; align-items: center; }
.topbar-brand img {
    height: 40px;
    display: block;
    background: #fff;
    padding: 6px 14px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
}
.topbar-nav { display: flex; gap: 1.3rem; flex: 1; }
.topbar-nav a { color: rgba(255,255,255,0.72); text-decoration: none; font-size: 0.94rem; font-weight: 600; padding: 0.5rem 0; border-bottom: 2px solid transparent; }
.topbar-nav a.active, .topbar-nav a:hover { color: #fff; border-bottom: 2px solid var(--brand-red); }
.topbar-user { display: flex; align-items: center; gap: 0.8rem; font-size: 0.9rem; }
.topbar-user a { color: rgba(255,255,255,0.85); text-decoration: none; font-weight: 600; }
.topbar-user a:hover { color: #fff; }

.page-content { padding: 1.5rem; max-width: 1100px; margin: 0 auto; }

.banner {
    background: #fde2e2;
    color: var(--brand-red-dark);
    border-left: 4px solid var(--brand-red);
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    margin-bottom: 1.2rem;
    font-weight: 600;
}

.banner-success {
    background: #1b8a4c;
    color: #fff;
    padding: 1rem 1.3rem;
    border-radius: 8px;
    margin-bottom: 1.2rem;
    font-weight: 700;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 4px 14px rgba(27,138,76,0.3);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.banner-success.fade-out { opacity: 0; transform: translateY(-8px); }

.card {
    background: #fff;
    border-radius: 10px;
    padding: 1.2rem;
    margin-bottom: 1.2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.card h2 { font-size: 1.05rem; margin-bottom: 0.8rem; color: var(--brand-navy); }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid #eef1f4; }
th { color: #6b7785; font-weight: 600; font-size: 0.8rem; text-transform: uppercase; }

.btn {
    display: inline-block;
    background: var(--brand-navy);
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
}
.btn:hover { background: var(--brand-navy-dark); }
.btn-secondary { background: #e5e9ed; color: #1c2733; }
.btn-secondary:hover { background: #d3dae1; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem 1.2rem; }
.form-grid label { font-size: 0.85rem; font-weight: 600; display: block; margin-bottom: 0.3rem; }
.form-grid input, .form-grid select {
    width: 100%;
    padding: 0.5rem 0.6rem;
    border: 1px solid #d3dae1;
    border-radius: 6px;
    font-size: 0.95rem;
}
.form-full { grid-column: 1 / -1; }

.search-big {
    width: 100%;
    padding: 1rem 1.1rem;
    font-size: 1.15rem;
    border: 2px solid #d3dae1;
    border-radius: 8px;
}
.search-big:focus { border-color: var(--brand-navy); outline: none; }

.soll-ist-ok { color: #1b8a4c; font-weight: 600; }
.soll-ist-low { color: var(--brand-red-dark); font-weight: 600; }

@media (max-width: 640px) {
    .topbar { flex-wrap: wrap; height: auto; padding: 0.6rem; }
    .topbar-nav { order: 3; width: 100%; overflow-x: auto; }
    .form-grid { grid-template-columns: 1fr; }
}
