* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f3f4f6;
    color: #111827;
}

a {
    color: inherit;
    text-decoration: none;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: #111827;
    color: #f9fafb;
}

.logo {
    font-weight: 600;
    letter-spacing: 0.05em;
}

.topbar .btn {
    margin-left: 1rem;
}

.navbar {
    background: #1f2937;
    padding: 0.25rem 1.5rem;
}

.navbar ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1rem;
}

.navbar a {
    display: block;
    padding: 0.4rem 0.7rem;
    border-radius: 0.375rem;
    color: #e5e7eb;
    font-size: 0.95rem;
}

.navbar a:hover {
    background: #374151;
}

.container {
    max-width: 1100px;
    margin: 1.5rem auto 2.5rem;
    padding: 0 1rem;
}

.card {
    background: #ffffff;
    padding: 1.25rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px rgba(15, 23, 42, 0.05);
    margin-bottom: 1.5rem;
}

.card h2 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.15rem;
}

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

.card-link {
    display: block;
}

.card-link .card {
    height: 100%;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.card-link .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px rgba(15, 23, 42, 0.12);
}

/* Forms */

label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="datetime-local"],
select,
textarea {
    width: 100%;
    padding: 0.45rem 0.6rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    font: inherit;
    margin-top: 0.25rem;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.5);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 0.75rem;
}

/* Buttons */

.btn {
    display: inline-block;
    border-radius: 999px;
    border: none;
    padding: 0.45rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: #2563eb;
    color: #f9fafb;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-ghost {
    background: transparent;
    color: #f9fafb;
    border: 1px solid rgba(249, 250, 251, 0.3);
}

.btn-ghost:hover {
    background: rgba(249, 250, 251, 0.1);
}

.btn-small {
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
}

/* Tables */

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

thead {
    background: #f3f4f6;
}

th,
td {
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid #e5e7eb;
}

tbody tr:hover {
    background: #f9fafb;
}

/* Alerts */

.alert {
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #ecfdf3;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* Footer */

.footer {
    text-align: center;
    padding: 1rem 0;
    font-size: 0.8rem;
    color: #6b7280;
}

/* Login */

.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(circle at top, #1d4ed8 0, #111827 45%, #020617 100%);
}

.login-card {
    background: #ffffff;
    padding: 2rem 2.25rem;
    border-radius: 1rem;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 25px 35px rgba(15, 23, 42, 0.5);
}

.login-card h1 {
    margin-top: 0;
    margin-bottom: 1rem;
    text-align: center;
}
