* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #f5f7fa; color: #333; }
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

.header { background: #1e293b; color: white; padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center; }
.header h1 { font-size: 1.4rem; }
.nav-menu a { color: #94a3b8; margin-left: 1.5rem; font-size: 0.9rem; }
.nav-menu a:hover { color: white; text-decoration: none; }
.nav-cta { background: #2563eb; color: white !important; padding: 4px 12px; border-radius: 6px; }
.menu-toggle { display: none; background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; }

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav-menu { display: none; position: absolute; top: 56px; left: 0; right: 0; background: #1e293b; padding: 1rem 2rem; flex-direction: column; z-index: 100; border-top: 1px solid #334155; }
    .nav-menu.open { display: flex; }
    .nav-menu a { margin: 0; padding: 10px 0; border-bottom: 1px solid #334155; font-size: 1rem; display: block; }
    .nav-menu a:last-child { border-bottom: none; }
    .nav-menu .nav-cta { display: inline-block; margin-top: 8px; padding: 10px 16px; text-align: center; border-radius: 8px; }
    .header { position: relative; }
}

.container { max-width: 1400px; margin: 0 auto; padding: 1.5rem; }
.back { display: inline-block; margin-bottom: 1rem; color: #64748b; font-size: 0.9rem; }

.alert-banner { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px; padding: 0.75rem 1.25rem; margin-bottom: 1rem; display: flex; align-items: center; justify-content: space-between; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card { background: white; border-radius: 8px; padding: 1rem; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.stat-card .number { font-size: 1.8rem; font-weight: 700; }
.stat-card .label { font-size: 0.8rem; color: #64748b; margin-top: 0.25rem; }
.stat-high .number { color: #dc2626; }
.stat-medium .number { color: #f59e0b; }
.stat-low .number { color: #6b7280; }
.stat-total .number { color: #2563eb; }

.filters { background: white; border-radius: 8px; padding: 1rem 1.5rem; margin-bottom: 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,0.1); display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.filters select, .filters input[type="text"] { padding: 0.4rem 0.6rem; border: 1px solid #d1d5db; border-radius: 6px; font-size: 0.9rem; }
.filters input[type="text"] { min-width: 200px; }
.filters button { padding: 0.4rem 1rem; background: #2563eb; color: white; border: none; border-radius: 6px; cursor: pointer; font-size: 0.9rem; }
.filters button:hover { background: #1d4ed8; }

table { width: 100%; border-collapse: collapse; background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
thead { background: #f8fafc; }
th { padding: 0.75rem 1rem; text-align: left; font-size: 0.8rem; color: #64748b; font-weight: 600; text-transform: uppercase; border-bottom: 2px solid #e2e8f0; white-space: nowrap; }
td { padding: 0.75rem 1rem; border-bottom: 1px solid #f1f5f9; font-size: 0.9rem; vertical-align: top; }
tr:hover { background: #f8fafc; }
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: #eef2ff; }

.badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 12px; font-size: 0.75rem; font-weight: 600; }
.badge-high { background: #fef2f2; color: #dc2626; }
.badge-medium { background: #fffbeb; color: #d97706; }
.badge-low { background: #f3f4f6; color: #6b7280; }
.badge-score { background: #eff6ff; color: #2563eb; }
.badge-keyword { background: #e0e7ff; color: #3730a3; }

.score { display: inline-block; min-width: 2rem; text-align: center; padding: 0.2rem 0.5rem; border-radius: 6px; font-weight: 700; font-size: 0.9rem; }
.score-high { background: #dc2626; color: white; }
.score-medium { background: #f59e0b; color: white; }
.score-low { background: #e5e7eb; color: #6b7280; }

.desc { max-width: 350px; line-height: 1.4; }
.entity { max-width: 200px; font-weight: 500; }
.amount { font-weight: 600; white-space: nowrap; }
.amount-highlight { font-size: 1.4rem; font-weight: 700; color: #059669; }
.date { white-space: nowrap; color: #64748b; font-size: 0.85rem; }
.keyword-tag { display: inline-block; padding: 0.15rem 0.5rem; background: #e0e7ff; color: #3730a3; border-radius: 10px; font-size: 0.75rem; }

.dismiss-btn { padding: 0.3rem 0.6rem; background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; border-radius: 6px; cursor: pointer; font-size: 0.8rem; }
.dismiss-btn:hover { background: #fecaca; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 0.5rem; margin-top: 1.5rem; }
.pagination a, .pagination span { padding: 0.4rem 0.8rem; border-radius: 6px; font-size: 0.9rem; }
.pagination a { background: white; border: 1px solid #d1d5db; text-decoration: none; }
.pagination a:hover { background: #f1f5f9; }
.pagination .current { background: #2563eb; color: white; }
.meta { color: #64748b; font-size: 0.85rem; margin-top: 1rem; text-align: center; }

.card { background: white; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,0.1); overflow: hidden; margin-bottom: 1.5rem; }
.card-header { padding: 1.5rem 2rem; border-bottom: 1px solid #f1f5f9; }
.card-header .entity { font-size: 1.3rem; font-weight: 700; color: #1e293b; }
.card-body { padding: 1.5rem 2rem; }
.badges { display: flex; gap: 0.5rem; margin-top: 0.75rem; flex-wrap: wrap; }
.field { margin-bottom: 1rem; }
.field-label { font-size: 0.7rem; text-transform: uppercase; color: #94a3b8; font-weight: 600; letter-spacing: 0.05em; margin-bottom: 0.2rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.divider { height: 1px; background: #f1f5f9; margin: 1.25rem 0; }
.section-title { font-size: 1rem; font-weight: 700; color: #1e293b; margin-bottom: 0.75rem; padding-bottom: 0.5rem; border-bottom: 2px solid #e0e7ff; }
.actions { padding: 1rem 2rem; border-top: 1px solid #f1f5f9; display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }

.btn { padding: 0.5rem 1.2rem; border-radius: 8px; font-size: 0.9rem; cursor: pointer; border: none; font-weight: 500; display: inline-block; text-decoration: none; }
.btn:hover { text-decoration: none; }
.btn-primary { background: #7c3aed; color: white; }
.btn-primary:hover { background: #6d28d9; }
.btn-seace { background: #2563eb; color: white; }
.btn-seace:hover { background: #1d4ed8; }
.btn-dismiss { background: #fee2e2; color: #dc2626; }
.btn-restore { background: #dcfce7; color: #16a34a; border: 1px solid #bbf7d0; }
.btn-download { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; padding: 0.4rem 0.8rem; font-size: 0.85rem; }
.btn-download:hover { background: #dcfce7; }

.status-box { border-radius: 8px; padding: 1rem 1.5rem; margin-bottom: 1rem; display: flex; align-items: center; justify-content: space-between; }
.cron-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.cron-table th { text-align: left; padding: 0.5rem 0.75rem; background: #f8fafc; color: #64748b; font-size: 0.75rem; text-transform: uppercase; border-bottom: 2px solid #e2e8f0; }
.cron-table td { padding: 0.5rem 0.75rem; border-bottom: 1px solid #f1f5f9; }
.doc-item { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem; border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 0.5rem; }
.doc-item:hover { background: #f8fafc; }
.doc-name { font-weight: 500; font-size: 0.9rem; }

.modal-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.4); z-index: 1000; align-items: center; justify-content: center; }
.modal-box { background: white; border-radius: 12px; padding: 2rem; max-width: 420px; width: 90%; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.modal-input { width: 100%; padding: 0.5rem 0.75rem; border: 1px solid #d1d5db; border-radius: 8px; font-size: 0.9rem; margin-bottom: 1rem; }
