.cyber-bg-grid {
    opacity: 0.28;
}

.cyber-bg-glow {
    opacity: 0.45;
}

.cyber-bg-gradient {
    opacity: 0.92;
}

.page-content {
    padding: var(--space-8) var(--space-8) var(--space-10);
}

.page-content-inner {
    max-width: 1120px;
}

.page-intro {
    color: var(--text-secondary);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    margin: 0 0 var(--space-6);
    max-width: 62ch;
}

.page-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: var(--leading-tight);
    margin: 0 0 var(--space-5);
}

.page-title-main {
    font-size: var(--text-xl);
    margin-bottom: var(--space-1);
}

.page-title-section {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 var(--space-5);
}

.detail-title {
    font-size: var(--text-xl);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: var(--leading-tight);
    margin: 0 0 var(--space-3);
}

.detail-section-title {
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: 0.01em;
    text-transform: none;
    color: var(--text);
}

.vuln-essentials > .detail-section-title,
.report-essentials > .detail-section-title {
    font-size: var(--text-base);
    font-weight: 600;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-height: 2.5rem;
    padding: 0.5rem 1.125rem;
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1.2;
}

.btn-sm {
    min-height: 2rem;
    padding: 0.35rem 0.875rem;
    font-size: var(--text-xs);
}

.btn:focus-visible {
    outline: none;
    box-shadow: var(--shadow-focus);
}

.btn-primary {
    box-shadow: 0 1px 2px rgba(5, 150, 105, 0.2);
}

.btn-primary:hover {
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
}

.btn-secondary {
    background: var(--bg-card);
    border-color: var(--border-strong);
}

.btn-secondary:hover {
    background: var(--bg-subtle);
    border-color: var(--color-neutral-400);
}

.card {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    border-color: var(--border);
}

.card:hover {
    box-shadow: var(--shadow-card);
}

.card.card-stacked-list:hover,
.card.entity-detail-card:hover,
.card.legal-page-card:hover,
.card.top-labels-card:hover,
.card.vuln-chart-card:hover,
.card.report-chart-card:hover {
    box-shadow: var(--shadow-card);
}

.vuln-home-card:hover,
.home-today-count-card:hover {
    box-shadow: var(--shadow-card-hover);
}

.card-header {
    padding: var(--space-4) var(--space-5);
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}

.card-body {
    padding: var(--space-5) var(--space-6);
}

.card.card-stacked-list .list-item {
    padding: var(--space-4) var(--space-5);
    transition: background var(--transition);
}

.card.card-stacked-list .list-item:hover {
    background: var(--bg-subtle);
}

.page-filters {
    gap: var(--space-3) var(--space-4);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    box-shadow: var(--shadow-card);
}

.page-filters label {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
}

.page-filters input[type="search"],
.page-filters input[type="date"],
.page-filters select,
.search-form input[type="search"],
.tool-input,
.tool-textarea {
    min-height: 2.5rem;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    color: var(--text);
    background: var(--bg-card);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.tool-textarea {
    min-height: 8rem;
    resize: vertical;
    line-height: var(--leading-normal);
    font-family: inherit;
}

.page-filters input:focus,
.page-filters select:focus,
.search-form input:focus,
.tool-input:focus,
.tool-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-focus);
}

.tool-form .form-group {
    margin-bottom: var(--space-5);
}

.tool-form .form-group label {
    display: block;
    margin-bottom: var(--space-2);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text);
}

.search-form button {
    min-height: 2.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.search-form button:focus-visible {
    outline: none;
    box-shadow: var(--shadow-focus);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    font-size: var(--text-xs);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.01em;
}

.badge.badge-label,
.badge.badge-confidence,
.badge.badge-ioc-count,
.badge.badge-malware-count,
.badge.badge-tag {
    background: var(--bg-subtle);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.badge.badge-kev {
    background: var(--severity-high);
    color: var(--color-white);
}

.relations-table {
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.relations-table th {
    background: var(--bg-subtle);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.relations-table td {
    border-bottom: 1px solid var(--border-subtle);
    font-size: var(--text-sm);
}

.relations-table tbody tr:last-child td {
    border-bottom: none;
}

.relations-table tbody tr:hover td {
    background: rgba(5, 150, 105, 0.03);
}

.alert {
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    border: 1px solid transparent;
}

.alert.alert-success {
    background: var(--success-soft);
    color: #047857;
    border-color: rgba(5, 150, 105, 0.2);
}

.empty-state-block {
    padding: var(--space-8) var(--space-6);
    background: var(--bg-subtle);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-md);
}

.empty-state {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.pagination a,
.pagination span {
    min-width: 2.25rem;
    min-height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.pagination .current {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
    font-weight: 600;
}

.sidebar-nav a.active {
    background: var(--sidebar-active);
    color: var(--sidebar-accent);
    font-weight: 600;
}

.card-body a:not(.btn):not(.badge):not(.badge-tag-link),
.list-item a:not(.btn):not(.badge),
.detail-description a:not(.btn):not(.badge) {
    background: transparent;
    padding: 0;
    border: none;
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.card-body a:not(.btn):not(.badge):not(.badge-tag-link):hover,
.list-item a:not(.btn):not(.badge):hover,
.detail-description a:not(.btn):not(.badge):hover {
    background: transparent;
    color: var(--color-primary-hover);
    border: none;
}

.home-section {
    margin-bottom: var(--space-10);
    padding-bottom: var(--space-8);
}

.vuln-essentials,
.report-essentials {
    border-radius: var(--radius-md);
    background: var(--bg-subtle);
    border-color: var(--border);
}

.vuln-home-card {
    border-radius: var(--radius-md);
}

.entity-detail-card {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}

.error-code {
    color: var(--color-neutral-400);
    font-size: 3.5rem;
}

.error-title {
    font-size: var(--text-xl);
}

@media (max-width: 768px) {
    .page-content {
        padding: 1rem max(1rem, env(safe-area-inset-right)) max(1.25rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
    }

    .page-title {
        font-size: var(--text-xl);
    }

    .card-body {
        padding: var(--space-4);
    }

    .page-filters {
        padding: var(--space-4);
    }
}

@media (max-width: 640px) {
    .btn {
        width: 100%;
        justify-content: center;
    }

    .nav-actions .btn,
    .search-form button,
    .top-bar .search-form button {
        width: auto;
    }

    .page-filters .btn {
        width: 100%;
    }
}
