* { box-sizing: border-box; }

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

.container {
    padding: 22px;
    max-width: 100%;
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
}

h1 { margin: 0; font-size: 24px; color: #1f4e79; }
h2 { margin: 18px 0 12px; color: #1f4e79; }

a { color: #0d6efd; }

.btn,
button {
    border: 0;
    border-radius: 8px;
    padding: 10px 14px;
    background: #0d6efd;
    color: white;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

button:hover,
.btn:hover { opacity: .9; }

.btn.secondary,
button.secondary { background: #6c757d; }

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.tabs button {
    background: white;
    color: #1f4e79;
    border: 1px solid #d6e2ef;
}

.tabs button.active {
    background: #1f4e79;
    color: white;
}

.view { display: none; }
.view.active { display: block; }

.filter-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    align-items: center;
}

select,
input[type="file"],
input[type="password"],
textarea {
    padding: 10px;
    min-height: 42px;
    border-radius: 8px;
    border: 1px solid #cfd7df;
    background: white;
}

select { min-width: 220px; }

.sub-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.module-box,
.card {
    background: white;
    border: 1px solid #d9e2ec;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 3px 12px rgba(0,0,0,.05);
}

.module-box label { margin-right: 10px; white-space: nowrap; }

.stats {
    background: #f8d7da;
    border: 2px solid #dc3545;
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.scrollable-table {
    overflow-x: auto;
    max-width: 100%;
}

table {
    border-collapse: collapse;
    width: 100%;
    background: white;
    font-size: 13px;
}

th,
td {
    border: 1px solid #aaa;
    padding: 8px;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

th {
    background: #0d6efd;
    color: white;
    position: sticky;
    top: 0;
    z-index: 1;
}

tbody tr:nth-child(even) { background: #f0f8ff; }
tbody tr:hover { background: #dbe9ff; }

.text-start { text-align: left; }

.alert {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #664d03;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.alert.error {
    background: #f8d7da;
    border-color: #f5c2c7;
    color: #842029;
}

.login-body {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: white;
    padding: 28px;
    border-radius: 14px;
    box-shadow: 0 10px 32px rgba(0,0,0,.12);
    min-width: 320px;
}

.login-card input,
.login-card button {
    width: 100%;
    margin-top: 12px;
}
