/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5; color: #333; line-height: 1.6;
}
a { color: #1976d2; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header { background: #1a1a2e; color: #fff; padding: 14px 24px; }
.header-inner {
    max-width: 1400px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.header-left { display: flex; align-items: center; gap: 16px; }
.site-logo { color: #fff; font-size: 18px; font-weight: 700; text-decoration: none; }
.site-logo:hover { text-decoration: none; color: #4fc3f7; }
.site-tagline { color: #888; font-size: 13px; }
.header-user { display: flex; align-items: center; gap: 12px; font-size: 13px; color: #aaa; }
.header-user a { color: #4fc3f7; }

/* Main */
.site-main { max-width: 1400px; margin: 0 auto; padding: 24px 20px; min-height: 60vh; }

/* Cards */
.card { background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin-bottom: 20px; }
.card h2 { font-size: 16px; margin-bottom: 16px; color: #1a1a2e; }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
table th { background: #f8f9fa; text-align: left; padding: 10px 12px; font-weight: 600; color: #555; border-bottom: 2px solid #dee2e6; white-space: nowrap; }
table td { padding: 8px 12px; border-bottom: 1px solid #eee; vertical-align: top; }
table tr:hover { background: #f8f9fa; }
table a { color: #1976d2; text-decoration: none; }
table a:hover { text-decoration: underline; }

/* Badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.badge-success { background: #e8f5e9; color: #2e7d32; }
.badge-warning { background: #fff3e0; color: #e65100; }
.badge-danger { background: #ffebee; color: #c62828; }
.badge-info { background: #e3f2fd; color: #1565c0; }
.badge-secondary { background: #f5f5f5; color: #666; }

/* Detail grid */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.detail-grid .field { padding: 8px 0; border-bottom: 1px solid #f0f0f0; }
.detail-grid .field-label { font-size: 11px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; }
.detail-grid .field-value { font-size: 14px; margin-top: 2px; word-break: break-word; }

/* Filters */
.filters { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.filters input, .filters select { padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }
.filters input[type="text"] { min-width: 250px; }

/* Photos */
.photo-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.photo-grid img { max-width: 200px; max-height: 150px; border-radius: 4px; object-fit: cover; }

/* Rating stars */
.rating-stars { color: #ffa000; }

/* Search section */
.search-section { margin-bottom: 24px; }
.search-section h1 { font-size: 22px; color: #1a1a2e; margin-bottom: 16px; font-weight: 600; }
.search-bar { display: flex; gap: 8px; margin-bottom: 12px; }
.search-input {
    flex: 1; padding: 11px 16px; border: 2px solid #ddd; border-radius: 8px;
    font-size: 15px; transition: border-color 0.2s;
}
.search-input:focus { border-color: #1976d2; outline: none; }
.results-count { margin-top: 12px; font-size: 14px; color: #666; }

/* Buttons */
.btn {
    display: inline-block; padding: 8px 16px; border-radius: 6px;
    font-size: 13px; font-weight: 500; text-decoration: none; cursor: pointer; border: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: #1976d2; color: #fff; }
.btn-primary:hover { background: #1565c0; }
.btn-secondary { background: #e0e0e0; color: #333; }
.btn-secondary:hover { background: #ccc; }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* Pagination */
.pagination { display: flex; gap: 4px; margin-top: 16px; justify-content: center; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 6px 12px; border-radius: 4px; font-size: 13px; text-decoration: none; }
.pagination a { background: #fff; color: #333; border: 1px solid #ddd; }
.pagination a:hover { background: #f0f0f0; text-decoration: none; }
.pagination span.current { background: #1976d2; color: #fff; }

/* No results */
.no-results { text-align: center; padding: 48px 20px; color: #888; }

/* Login page */
.login-container {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; background: #f5f5f5; padding: 20px;
}
.login-card {
    background: #fff; border-radius: 12px; padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08); width: 100%; max-width: 420px;
}
.login-card h1 { font-size: 22px; color: #1a1a2e; margin-bottom: 4px; }
.login-card .subtitle { color: #888; font-size: 14px; margin-bottom: 24px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: #555; margin-bottom: 4px; }
.form-group input {
    width: 100%; padding: 11px 14px; border: 2px solid #ddd; border-radius: 8px;
    font-size: 15px; transition: border-color 0.2s;
}
.form-group input:focus { border-color: #1976d2; outline: none; }
.login-btn { width: 100%; padding: 12px; font-size: 15px; margin-top: 8px; }
.login-footer { margin-top: 16px; text-align: center; font-size: 13px; }
.login-footer a { color: #1976d2; }
.alert { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.alert-error { background: #ffebee; color: #c62828; }
.alert-success { background: #e8f5e9; color: #2e7d32; }
.alert-info { background: #e3f2fd; color: #1565c0; }

/* Footer */
.site-footer {
    text-align: center; padding: 24px 20px; font-size: 13px; color: #888;
    border-top: 1px solid #eee; margin-top: 40px;
}
.footer-note { font-size: 11px; color: #bbb; margin-top: 4px; }

/* Responsive */
@media (max-width: 768px) {
    .header-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
    .search-bar { flex-direction: column; }
    .filters { flex-direction: column; }
    .filters input[type="text"] { min-width: 100%; }
    .detail-grid { grid-template-columns: 1fr; }
    .login-card { padding: 28px 24px; }
    table { font-size: 12px; }
    table th, table td { padding: 6px 8px; }
}
