/* Reset & base */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
}
.container { max-width: 1280px; margin: 0 auto; padding: 0 1rem; }

/* Navbar */
.navbar {
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
    padding: 0.5rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}
.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}
.nav-brand { font-size: 1.25rem; font-weight: 600; color: #007bff; text-decoration: none; }
.nav-menu { list-style: none; display: flex; gap: 1rem; align-items: center; }
.nav-menu a { text-decoration: none; color: #333; padding: 0.25rem 0.5rem; border-radius: 4px; }
.nav-menu a:hover { background: #e9ecef; }

/* Main */
main { padding: 2rem 0; }
.page-title { font-size: 2rem; font-weight: 600; margin-bottom: 0.25rem; }
.page-sub { color: #6c757d; margin-bottom: 1.5rem; }

/* Cards */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 500; margin-bottom: 0.25rem; }
.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
}
.search-form { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; }
.search-form .form-group { flex: 1 1 200px; }
.search-form .btn { flex: 0 0 auto; }

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    border: 1px solid transparent;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.15s;
    text-decoration: none;
}
.btn-primary { background: #007bff; color: #fff; border-color: #007bff; }
.btn-primary:hover { background: #0069d9; }
.btn-secondary { background: #6c757d; color: #fff; border-color: #6c757d; }
.btn-secondary:hover { background: #5a6268; }
.btn-danger { background: #dc3545; color: #fff; border-color: #dc3545; }
.btn-danger:hover { background: #c82333; }
.btn-sm { padding: 0.25rem 0.5rem; font-size: 0.875rem; }
.btn-block { width: 100%; }

/* Tables */
.table-wrap { overflow-x: auto; margin-top: 1rem; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { background: #f1f3f5; text-align: left; padding: 0.75rem; font-weight: 600; }
td { padding: 0.75rem; border-bottom: 1px solid #e9ecef; vertical-align: middle; }
tr:hover { background: #f8f9fa; }
.empty-state { text-align: center; color: #6c757d; padding: 2rem; }
.badge {
    background: #e9ecef;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    color: #333;
}
.rating { color: #f59f00; }

/* Toolbar */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.filters { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }

/* Loading */
.loading {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    padding: 2rem;
    color: #6c757d;
}
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Pagination */
.pagination { display: flex; gap: 0.25rem; margin-top: 1rem; flex-wrap: wrap; }
.pagination a {
    padding: 0.4rem 0.8rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-decoration: none;
    color: #007bff;
}
.pagination a.active { background: #007bff; color: #fff; border-color: #007bff; }

/* Auth */
.auth-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f8f9fa;
}
.auth-card {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}
.auth-card h1 { font-size: 1.75rem; margin-bottom: 0.25rem; }
.auth-card .sub { color: #6c757d; margin-bottom: 1.5rem; }
.auth-card label { display: block; margin: 0.5rem 0 0.25rem; }
.auth-card input[type="text"],
.auth-card input[type="password"] { width: 100%; padding: 0.6rem; border: 1px solid #ced4da; border-radius: 4px; }
.auth-card .btn-block { margin-top: 1rem; }
.hint { font-size: 0.85rem; color: #6c757d; margin-top: 1rem; text-align: center; }
.alert { padding: 0.75rem; border-radius: 4px; margin-bottom: 1rem; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 0;
    color: #6c757d;
    border-top: 1px solid #e9ecef;
    margin-top: 2rem;
}