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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.navbar {
    background: #1a1a2e;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    height: 56px;
}

.nav-brand {
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    margin-right: 2rem;
}

.nav-links a {
    color: #ccc;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

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

h1 { margin-bottom: 1rem; }
h2 { margin: 1.5rem 0 0.75rem; }

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    font-size: 2rem;
    color: #1a1a2e;
}

.detail-card {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.detail-card p {
    margin: 0.5rem 0;
}

.table {
    width: 100%;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-collapse: collapse;
    overflow: hidden;
}

.table th,
.table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #666;
}

.sortable th[data-sort] {
    cursor: pointer;
    user-select: none;
}

.sortable th[data-sort]:hover {
    color: #333;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

.table a {
    color: #2563eb;
    text-decoration: none;
}

.table a:hover {
    text-decoration: underline;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
    line-height: 1.5;
}

.btn:hover {
    background: #f0f0f0;
}

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

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

.btn-danger {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
}

.form-group textarea {
    font-family: monospace;
}

.inline-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.inline-form input,
.inline-form select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.error {
    background: #fef2f2;
    color: #dc2626;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border: 1px solid #fecaca;
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-active, .badge-checkout { background: #dcfce7; color: #166534; }
.badge-revoked, .badge-reclaimed { background: #fef2f2; color: #dc2626; }
.badge-expired { background: #fef3c7; color: #92400e; }
.badge-suspended { background: #fff7ed; color: #9a3412; }
.badge-checkin { background: #dbeafe; color: #1e40af; }

.row-warning { background: #fef3c7 !important; }
.row-expired { background: #fef2f2 !important; }

.login-container {
    max-width: 400px;
    margin: 10vh auto;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.login-container h1 {
    text-align: center;
    color: #1a1a2e;
    margin-bottom: 1.5rem;
}

code {
    background: #f1f5f9;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-size: 0.85em;
}
