/* Seeing Systems Tender Portal */
:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-tertiary: #1a2235;
    --bg-card: #151d2e;
    --border: #1e293b;
    --border-hover: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --high: #10b981;
    --high-bg: rgba(16,185,129,0.12);
    --medium: #f59e0b;
    --medium-bg: rgba(245,158,11,0.12);
    --low: #6b7280;
    --low-bg: rgba(107,114,128,0.12);
    --danger: #ef4444;
    --success: #10b981;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.3), 0 2px 4px -2px rgba(0,0,0,0.2);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
}

/* Header */
header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left { display: flex; align-items: center; gap: 16px; }
.header-right { display: flex; align-items: center; gap: 20px; }

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    color: var(--accent);
}

.logo h1 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo .tagline {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
}

.stats {
    display: flex;
    gap: 24px;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent);
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Auth header items */
.auth-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--text-secondary);
}

.user-badge .admin-tag {
    background: var(--accent);
    color: white;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.btn .icon { width: 16px; height: 16px; }

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

.btn-primary:hover { background: var(--accent-hover); }

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

.btn-secondary:hover {
    background: var(--border);
    color: var(--text-primary);
}

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

.btn-danger:hover { opacity: 0.9; }

.btn-small {
    padding: 4px 10px;
    font-size: 12px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn.loading .icon { animation: spin 1s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }

/* Toolbar */
.toolbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px;
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.search-bar {
    display: flex;
    align-items: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0 12px;
    flex: 1;
    min-width: 200px;
    max-width: 400px;
}

.search-bar .icon {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-bar input {
    background: none;
    border: none;
    padding: 8px 10px;
    color: var(--text-primary);
    font-size: 14px;
    width: 100%;
    outline: none;
    font-family: inherit;
}

.search-bar input::placeholder { color: var(--text-muted); }

.search-bar:focus-within { border-color: var(--accent); }

.filters {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-group label {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

.filter-buttons {
    display: flex;
    gap: 2px;
    background: var(--bg-tertiary);
    padding: 2px;
    border-radius: var(--radius);
}

.filter-btn {
    padding: 4px 10px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    color: var(--text-muted);
    transition: all 0.15s;
    font-family: inherit;
}

.filter-btn:hover { color: var(--text-primary); }

.filter-btn.active { background: var(--bg-card); color: var(--text-primary); }

.filter-btn.high.active { background: var(--high-bg); color: var(--high); }
.filter-btn.medium.active { background: var(--medium-bg); color: var(--medium); }
.filter-btn.low.active { background: var(--low-bg); color: var(--low); }

.filter-select {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 6px 28px 6px 10px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    outline: none;
    font-family: inherit;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2394a3b8'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px;
}

.filter-select:focus { border-color: var(--accent); }

.filter-select option { background: var(--bg-secondary); }

/* Content */
.content {
    flex: 1;
    padding: 16px 24px 24px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

.view-toggle {
    display: flex;
    gap: 2px;
    background: var(--bg-tertiary);
    padding: 2px;
    border-radius: var(--radius);
}

.view-btn {
    padding: 6px 8px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
}

.view-btn svg { width: 16px; height: 16px; display: block; }
.view-btn:hover { color: var(--text-primary); }
.view-btn.active { background: var(--bg-card); color: var(--text-primary); }

/* Table */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    padding: 10px 14px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    user-select: none;
    position: sticky;
    top: 0;
    background: var(--bg-card);
}

th.sortable { cursor: pointer; }
th.sortable:hover { color: var(--text-primary); }
th.sorted-asc::after { content: ' \2191'; }
th.sorted-desc::after { content: ' \2193'; }

tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.1s;
    cursor: pointer;
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(59,130,246,0.05); }

td {
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-secondary);
    max-width: 400px;
}

td.title-cell {
    color: var(--text-primary);
    font-weight: 500;
}

/* Relevance badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-high { background: var(--high-bg); color: var(--high); }
.badge-medium { background: var(--medium-bg); color: var(--medium); }
.badge-low { background: var(--low-bg); color: var(--low); }

.badge-open { background: rgba(16,185,129,0.12); color: #10b981; }
.badge-closed { background: rgba(239,68,68,0.12); color: #ef4444; }
.badge-planned { background: rgba(59,130,246,0.12); color: #3b82f6; }

/* Link button in table */
.link-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--accent);
    font-size: 11px;
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
}

.link-btn:hover { background: var(--accent); color: white; border-color: var(--accent); }
.link-btn svg { width: 12px; height: 12px; }

/* Cards view */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 14px;
}

.tender-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    cursor: pointer;
    transition: all 0.15s;
}

.tender-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    flex: 1;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.card-source {
    font-size: 11px;
    color: var(--text-muted);
}

/* Notes section */
.notes-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.notes-section h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.note-item {
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    padding: 10px 12px;
    margin-bottom: 6px;
    font-size: 13px;
}

.note-item .note-author {
    font-weight: 600;
    color: var(--accent);
    font-size: 12px;
}

.note-item .note-date {
    color: var(--text-muted);
    font-size: 11px;
    margin-left: 8px;
}

.note-item .note-text {
    color: var(--text-secondary);
    margin-top: 4px;
}

.note-item.private {
    border-left: 3px solid var(--medium);
}

.note-input-group {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.note-input-group textarea {
    flex: 1;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 10px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
    outline: none;
}

.note-input-group textarea:focus { border-color: var(--accent); }

.note-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Modal */
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); }

.modal-content {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    z-index: 1;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
}

.modal-close:hover { color: var(--text-primary); }

.modal h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-right: 32px;
}

.modal .detail-grid {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.modal .detail-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.modal .detail-value {
    font-size: 14px;
    color: var(--text-secondary);
}

.modal .detail-value a {
    color: var(--accent);
    text-decoration: none;
}

.modal .detail-value a:hover { text-decoration: underline; }

.modal .desc-full {
    margin-top: 16px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
}

.relevance-reasons {
    margin-top: 12px;
    padding: 10px;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
}

.relevance-reasons span {
    display: inline-block;
    padding: 2px 8px;
    margin: 2px;
    background: var(--bg-card);
    border-radius: 4px;
    font-size: 11px;
    color: var(--text-secondary);
}

/* Loading */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 12px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state svg { width: 48px; height: 48px; margin-bottom: 12px; opacity: 0.5; }

/* Refresh overlay */
.refresh-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
}

.refresh-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    min-width: 350px;
}

.refresh-card h3 { margin: 12px 0 8px; font-size: 16px; }
.refresh-card p { font-size: 13px; color: var(--text-muted); }

#refresh-progress {
    margin-top: 16px;
    text-align: left;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    max-height: 200px;
    overflow-y: auto;
}

.progress-item {
    padding: 4px 0;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.progress-item.success .progress-status { color: var(--success); }
.progress-item.error .progress-status { color: var(--danger); }

/* Login page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 420px;
    width: 100%;
    text-align: center;
}

.login-card .logo { justify-content: center; margin-bottom: 24px; }
.login-card h2 { font-size: 20px; margin-bottom: 8px; }
.login-card .subtitle { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }

.form-group {
    margin-bottom: 14px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
}

.form-group input:focus { border-color: var(--accent); }

.form-error {
    color: var(--danger);
    font-size: 13px;
    margin-top: 8px;
    display: none;
}

.form-success {
    color: var(--success);
    font-size: 13px;
    margin-top: 8px;
    display: none;
}

.login-card .btn { width: 100%; justify-content: center; margin-top: 8px; }

.login-card .toggle-link {
    display: block;
    margin-top: 16px;
    color: var(--accent);
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
}

.login-card .toggle-link:hover { text-decoration: underline; }

/* Footer */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
}

.footer-right { display: flex; gap: 8px; }
.separator { color: var(--border); }

/* Actions row */
.tender-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* Users management modal */
.modal-wide {
    max-width: 900px;
}

.users-table-wrap {
    margin-top: 16px;
}

#users-table th {
    font-size: 11px;
    padding: 8px 12px;
}

#users-table td {
    padding: 8px 12px;
    font-size: 13px;
    vertical-align: middle;
}

#users-table tbody tr {
    cursor: default;
}

#users-table tbody tr:hover {
    background: rgba(59,130,246,0.03);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: all 0.2s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    left: 2px;
    bottom: 2px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--accent);
    border-color: var(--accent);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(16px);
    background: white;
}

.toggle-switch input:disabled + .toggle-slider {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-delete-user {
    padding: 4px 8px;
    font-size: 11px;
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    font-weight: 500;
}

.btn-delete-user:hover {
    background: var(--danger);
    color: white;
}

.btn-delete-user:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.btn-manage-users {
    padding: 6px 12px;
    font-size: 12px;
}

/* Sources health panel */
.sources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
}

.source-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    transition: border-color 0.15s;
}

.source-card:hover {
    border-color: var(--border-hover);
}

.source-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.source-card-header .source-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.success {
    background: var(--success);
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
}

.status-dot.error {
    background: var(--danger);
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
}

.status-dot.unknown {
    background: var(--text-muted);
}

.source-card-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
    line-height: 1.4;
}

.source-card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.source-card-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.source-card-stats .stat-label {
    color: var(--text-muted);
    font-size: 11px;
    text-transform: none;
    letter-spacing: 0;
}

.source-card-error {
    font-size: 12px;
    color: var(--danger);
    background: rgba(239, 68, 68, 0.08);
    border-radius: var(--radius);
    padding: 8px 10px;
    margin-bottom: 10px;
    line-height: 1.4;
    word-break: break-word;
}

.source-card-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.source-card-footer .btn {
    font-size: 11px;
    padding: 4px 10px;
}

.source-card-footer .btn.refreshing {
    opacity: 0.6;
    pointer-events: none;
}

.btn-sources {
    padding: 6px 12px;
    font-size: 12px;
}

/* Keywords management */
.keywords-add-form {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
}

.keyword-text-input {
    flex: 1;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    outline: none;
}

.keyword-text-input:focus {
    border-color: var(--accent);
}

.keyword-text-input::placeholder {
    color: var(--text-muted);
}

.keywords-tier-section {
    margin-bottom: 20px;
}

.keywords-tier-heading {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.keywords-tier-heading.primary { color: var(--high); }
.keywords-tier-heading.secondary { color: var(--medium); }
.keywords-tier-heading.tertiary { color: var(--text-muted); }

.keywords-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.keyword-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.15s;
}

.keyword-chip.config {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    border: 1px solid var(--border);
    opacity: 0.7;
    cursor: default;
}

.keyword-chip.user-added {
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent);
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.keyword-chip .chip-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: none;
    background: none;
    color: inherit;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0;
    opacity: 0.6;
    transition: opacity 0.15s;
    border-radius: 50%;
}

.keyword-chip .chip-delete:hover {
    opacity: 1;
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.keywords-empty {
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
    padding: 4px 0;
}

.btn-keywords {
    padding: 6px 12px;
    font-size: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    header { flex-direction: column; gap: 12px; padding: 12px 16px; }
    .header-right { width: 100%; justify-content: space-between; }
    .toolbar { padding: 10px 16px; flex-direction: column; }
    .search-bar { max-width: none; }
    .filters { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
    .content { padding: 12px 16px; }
    .cards-grid { grid-template-columns: 1fr; }
    footer { flex-direction: column; gap: 4px; text-align: center; }
    .stats { gap: 16px; }
    td { padding: 8px 10px; font-size: 12px; }
}

@media (max-width: 480px) {
    .stats { display: none; }
    .modal-content { padding: 16px; width: 95%; }
}
