/* Tables */
.table-container {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
    font-size: 0.875rem;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: var(--bg-tertiary);
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: var(--bg-secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
}

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

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-hover);
}

.btn-danger {
    background: var(--accent-red);
    color: white;
}

.btn-danger-outline {
    background: transparent;
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.45);
}

.btn-danger-outline:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #fecaca;
}

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

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 1rem;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-hint {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-input,
.form-control,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus,
.form-control:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(35, 131, 226, 0.1);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    align-items: end;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
}

.filter-bar .form-group {
    flex: 1 1 170px;
    margin-bottom: 0;
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-pending {
    background: #fff3cd;
    color: #856404;
}

.badge-writing {
    background: #cce5ff;
    color: #004085;
}

.badge-written {
    background: #d4edda;
    color: #155724;
}

.badge-published {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-draft {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.badge-active {
    background: #d4edda;
    color: #155724;
}

.badge-paused {
    background: #fff3cd;
    color: #856404;
}

.badge-error {
    background: #fee2e2;
    color: #991b1b;
}

.badge-completed,
.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-processing {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-skipped,
.badge-not_relevant {
    background: #e5e7eb;
    color: #374151;
}

/* Topic pillar types */
.badge-pillar {
    background: #cce5ff;
    color: #004085;
    font-weight: 600;
}

.badge-cluster {
    background: #d4edda;
    color: #155724;
}

.badge-support {
    background: #e2e3e5;
    color: #383d41;
}

/* Places status */
.badge-has_image {
    background: #d4edda;
    color: #155724;
}

.badge-processed {
    background: #cce5ff;
    color: #004085;
}

/* Alerts */
