* {
    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: #2c3e50;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-brand {
    color: #ecf0f1;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 700;
}

.nav-links a {
    color: #bdc3c7;
    text-decoration: none;
    margin-right: 1.5rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #ecf0f1;
}

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

h1 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

h2 {
    margin: 2rem 0 1rem;
    color: #34495e;
}

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

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

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
}

.stat-label {
    color: #7f8c8d;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.btn:hover {
    background: #2980b9;
}

.btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.actions {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.muted {
    color: #7f8c8d;
    font-size: 0.875rem;
}

.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.story-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}

.story-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.story-thumb {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.story-thumb.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ecf0f1;
    color: #95a5a6;
}

.story-info {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.story-date {
    font-size: 0.8rem;
    color: #7f8c8d;
}

.story-stats {
    font-size: 0.8rem;
    color: #34495e;
}

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

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

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.85rem;
}

.data-table tr.clickable {
    cursor: pointer;
}

.data-table tr.clickable:hover {
    background: #f0f3f5;
}

.data-table a {
    color: #3498db;
    text-decoration: none;
}

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

.table-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.story-detail {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.story-image {
    max-width: 400px;
    border-radius: 8px;
}

.story-meta p {
    margin-bottom: 0.5rem;
}

/* Filters bar */
.filters-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-input {
    padding: 0.5rem 0.75rem;
    border: 1px solid #dcdde1;
    border-radius: 6px;
    font-size: 0.875rem;
    background: white;
    min-width: 160px;
}

.filter-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52,152,219,0.15);
}

.btn-sm {
    padding: 0.45rem 1rem;
    font-size: 0.8rem;
}

.table-info {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}

/* Sortable table */
.sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.sortable:hover {
    background: #eef1f3;
}

.sortable.sorted {
    background: #e8ecef;
}

.sort-arrow {
    font-size: 0.7rem;
    color: #7f8c8d;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-green {
    background: #d5f5e3;
    color: #27ae60;
}

.badge-gray {
    background: #ecf0f1;
    color: #95a5a6;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.page-link {
    display: inline-block;
    padding: 0.5rem 0.85rem;
    border-radius: 6px;
    text-decoration: none;
    color: #3498db;
    background: white;
    border: 1px solid #dcdde1;
    font-size: 0.875rem;
    transition: background 0.2s;
}

.page-link:hover {
    background: #f0f3f5;
}

.page-link.current {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.page-ellipsis {
    padding: 0.5rem 0.4rem;
    color: #95a5a6;
}
