* { box-sizing: border-box; }
body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f8;
    margin: 0;
    color: #222;
    font-size: 14px;
}
.topbar {
    background: #2c3e50;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    flex-wrap: wrap;
    position: relative;
}
.topbar .brand { font-weight: bold; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.brand-icon { flex-shrink: 0; }
.topbar nav a {
    color: #dce6ef;
    text-decoration: none;
    margin-left: 14px;
    font-size: 13px;
    padding: 4px 6px;
    border-radius: 4px;
}
.topbar nav a:hover, .topbar nav a.active { background: #3d566e; color: #fff; }
.topbar nav a.logout { background: #a94442; color: #fff; }

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid #4a6178;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.login-wrap { max-width: 360px; margin: 80px auto; padding: 0 16px; }
.brand-heading { display: flex; align-items: center; gap: 8px; font-size: 18px; }

.page-wrap { padding: 18px 22px; max-width: 1200px; margin: 0 auto; }

h1, h2, h3 { color: #2c3e50; margin-top: 0; }

.card {
    background: #fff;
    border: 1px solid #e1e6ea;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 18px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

/* Compact form styling - light grey / light blue fields */
.form-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.form-group { flex: 1; min-width: 150px; }
.form-group label { display: block; font-size: 12px; color: #556; margin-bottom: 3px; }
input, select, textarea {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #cdd6dd;
    border-radius: 4px;
    background: #eef3f7; /* light blue */
    font-size: 13px;
}
input:focus, select:focus, textarea:focus {
    background: #e6f0fb;
    outline: none;
    border-color: #7ea6d8;
}
.grey { background: #f0f0f0 !important; }

.btn {
    display: inline-block;
    padding: 7px 14px;
    border: none;
    border-radius: 4px;
    background: #2c7be5;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    text-decoration: none;
}
.btn.secondary { background: #6c757d; }
.btn.danger { background: #c0392b; }
.btn.small { padding: 4px 8px; font-size: 12px; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
table th, table td {
    border: 1px solid #e1e6ea;
    padding: 6px 8px;
    text-align: left;
}
table th { background: #f0f4f7; }
tr:nth-child(even) td { background: #fafbfc; }

.badge { padding: 2px 8px; border-radius: 10px; font-size: 11px; }
.badge.green { background: #d4edda; color: #155724; }
.badge.red { background: #f8d7da; color: #721c24; }
.badge.yellow { background: #fff3cd; color: #856404; }

.flag-red { color: #c0392b; font-weight: bold; }
.flag-green { color: #1e8449; font-weight: bold; }

.modal-bg {
    display: none;
    position: fixed; top:0; left:0; right:0; bottom:0;
    background: rgba(0,0,0,0.4);
    z-index: 100;
    align-items: center; justify-content: center;
}
.modal-bg.show { display: flex; }
.modal-box {
    background: #fff;
    border-radius: 6px;
    padding: 18px;
    width: 360px;
    max-width: 92%;
}

.alert { padding: 8px 12px; border-radius: 4px; margin-bottom: 12px; font-size: 13px; }
.alert.success { background: #d4edda; color: #155724; }
.alert.error { background: #f8d7da; color: #721c24; }

@media print {
    .topbar, .no-print { display: none !important; }
    body { background: #fff; }
}

@media (max-width: 768px) {
    .nav-toggle { display: inline-block; }

    .topbar nav {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 10px;
    }
    .topbar nav.open { display: flex; }
    .topbar nav a {
        margin-left: 0;
        margin-top: 4px;
        padding: 8px 10px;
    }

    .page-wrap { padding: 12px; }

    .form-row { flex-direction: column; gap: 8px; }
    .form-group { min-width: 100%; }

    table { display: block; width: 100%; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }

    .login-wrap { margin: 40px auto; }
}
