* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: #f7f9fc;
    color: #1d2733;
}

.container {
    width: min(1120px, 95%);
    margin: 24px auto 40px;
}

.topbar {
    background: linear-gradient(120deg, #1d4f91 0%, #2563ad 60%, #2c83d4 100%);
    color: #fff;
    padding: 18px 0;
}

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

.nav-links {
    margin-top: 8px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.16);
}

.card {
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 8px 24px rgba(18, 45, 74, 0.08);
    margin-bottom: 16px;
}

.flash {
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 14px;
}

.flash.success {
    background: #e7f8ef;
    color: #1f6942;
}

.flash.error {
    background: #ffe9ea;
    color: #8f1f2a;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="file"],
textarea,
select {
    width: 100%;
    border: 1px solid #cad4e2;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    margin-bottom: 12px;
    background: #fff;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

button,
.btn {
    border: none;
    background: #1d4f91;
    color: #fff;
    border-radius: 10px;
    padding: 10px 14px;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
}

.btn.secondary,
button.secondary {
    background: #66758a;
}

.btn.warning,
button.warning {
    background: #f4c542;
    color: #1f2733;
}

.btn.success,
button.success {
    background: #1f8f4c;
    color: #fff;
}

.btn.danger,
button.danger {
    background: #a52b2b;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    border: 1px solid #a8b7cc !important;
}

th,
td {
    border: 1px solid #a8b7cc !important;
    padding: 10px 8px;
    text-align: left;
    vertical-align: top;
}

th {
    background: #f1f5fb;
    position: sticky;
    top: 0;
    z-index: 1;
}

.table-wrap {
    overflow: auto;
    max-height: 70vh;
    border-radius: 10px;
    border: 1px solid #e3e9f2;
}

.small {
    font-size: 12px;
    color: #5f6e82;
}

.login-logo-wrap {
    text-align: center;
    margin-bottom: 12px;
}

.login-logo {
    max-width: 160px;
    width: 100%;
    height: auto;
    display: inline-block;
}

.stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.stat-box {
    background: #f1f6ff;
    color: #1f4f91;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 13px;
}

@media (max-width: 768px) {
    .row {
        grid-template-columns: 1fr;
    }
}
