:root {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #1f2933;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f3f4f6;
}

a {
    color: inherit;
}

.container {
    width: min(1100px, 94%);
    margin: 0 auto;
}

.topbar {
    background: #0f4c81;
    color: #ffffff;
    padding: 1rem 0;
}

.topbar-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.brand h1 {
    margin: 0;
    font-size: 1.5rem;
}

.brand .logo {
    height: 40px;
    width: auto;
    margin: 0;
    display: block;
}

.brand small {
    display: block;
    font-size: 0.85rem;
    opacity: 0.8;
}

.main-nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.main-nav a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.main-nav a:hover,
.main-nav a:focus {
    background: rgba(255, 255, 255, 0.15);
}

.user-info {
    margin-left: auto;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info .logout {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.user-info .logout:hover,
.user-info .logout:focus {
    background: rgba(255, 255, 255, 0.3);
}

main.container {
    background: #ffffff;
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(15, 76, 129, 0.08);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f9fafb;
}

h2 {
    margin-bottom: 0px !important;
    margin-top: 0px !important;
}

.card h2 {
    margin-top: 0;
    font-size: 1.25rem;
    color: #0f4c81;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.1rem;
    border-radius: 6px;
    background: #0f4c81;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover,
.btn:focus {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(15, 76, 129, 0.15);
}

.btn-secondary {
    background: #64748b;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-weight: 600;
}

.alert-success {
    background: #e8f6ee;
    color: #166534;
}

.alert-error {
    background: #fbeaea;
    color: #b91c1c;
}

.alert-info {
    background: #e0f2fe;
    color: #0c4a6e;
}

.simple-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.form-field input,
.form-field select {
    width: 100%;
    padding: 0.55rem 0.6rem;
    border-radius: 6px;
    border: 1px solid #cbd5f5;
    font-size: 1rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
}

.helper-text {
    color: #4b5563;
    font-size: 0.9rem;
}

.summary {
    width: 100%;
    border-collapse: collapse;
}

.summary th,
.summary td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.summary th {
    color: #0f4c81;
    width: 60%;
}

.narrow {
    max-width: 420px;
    margin: 0 auto;
    background: #f9fafb;
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
}

table.data-table thead th {
    background: #eef2f7;
    color: #0f4c81;
    padding: 0.65rem 0.75rem;
    text-align: left;
    font-size: 0.95rem;
}

table.data-table tbody td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.95rem;
}

table.data-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.table-actions {
    margin-top: 1rem;
    text-align: right;
}

.filters {
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
}

.filters .form-field {
    min-width: 200px;
}

.status-tag {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    background: #e2e8f0;
    color: #334155;
}

.status-tag.active {
    background: #dcfce7;
    color: #166534;
}

.status-tag.inactive {
    background: #fee2e2;
    color: #b91c1c;
}

.footer {
    margin-top: 2rem;
    padding: 1.5rem 0;
    background: #0f4c81;
    color: #e2e8f0;
    text-align: center;
}

@media (max-width: 640px) {
    .topbar-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .user-info {
        margin-left: 0;
    }

    .main-nav {
        width: 100%;
        justify-content: space-between;
    }
}

