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

body {
    font-family: Arial, sans-serif;
    background: #f5f7fa;
    color: #222;
    line-height: 1.5;
}

.container {
    width: 95%;
    max-width: 1200px;
    margin: auto;
}

.topbar {
    background: #005baa;
    color: white;
    padding: 16px 0;
}

.topbar h1 {
    margin-bottom: 8px;
    font-size: 26px;
}

.userbar {
    font-size: 14px;
    margin-bottom: 8px;
}

.userbar span {
    opacity: 0.85;
    margin-left: 5px;
}

.logout-link {
    color: #ffd6d6;
    margin-left: 10px;
}

.topbar nav {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.topbar nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.topbar nav a:hover {
    text-decoration: underline;
}

main.container {
    padding: 28px 0;
}

h2 {
    margin-bottom: 12px;
}

h3 {
    margin: 24px 0 12px;
}

form {
    background: white;
    padding: 18px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    margin-bottom: 24px;
}

label {
    font-weight: bold;
}

input,
select,
textarea,
button {
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
    max-width: 420px;
    padding: 10px;
    margin-top: 4px;
    border: 1px solid #ccd3dd;
    border-radius: 8px;
    background: white;
}

textarea {
    resize: vertical;
}

button {
    padding: 10px 16px;
    border: 0;
    border-radius: 8px;
    background: #005baa;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

button:hover {
    background: #004985;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

th,
td {
    padding: 10px;
    border-bottom: 1px solid #e4e8ee;
    text-align: left;
}

th {
    background: #eef4fb;
    font-weight: bold;
}

tr:hover td {
    background: #f8fbff;
}

.alert,
p[style*="green"],
p[style*="red"] {
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 15px;
}

p[style*="green"] {
    background: #e7f8ed;
    color: #176b35 !important;
}

p[style*="red"] {
    background: #ffe5e5;
    color: #9b1c1c !important;
}

.dashboard {
    padding: 30px 0;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.footer {
    margin-top: 50px;
    padding: 20px 0;
    text-align: center;
    background: #eee;
}

.auth-page {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.auth-card h2 {
    margin-bottom: 8px;
}

.muted {
    color: #666;
    margin-bottom: 20px;
}

.auth-card label {
    display: block;
    margin-top: 15px;
    margin-bottom: 6px;
}

.auth-card input {
    max-width: none;
}

.auth-card button {
    width: 100%;
    margin-top: 22px;
}

.alert-error {
    background: #ffe5e5;
    color: #9b1c1c;
}

@media (max-width: 700px) {
    .topbar h1 {
        font-size: 21px;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    input,
    select,
    textarea {
        max-width: none;
    }
}
