/**
 * BreachFeed Public Styles - Professional Theme
 */

:root {
    --bf-primary: #1a1a1a;
    --bf-primary-light: #2d2d2d;
    --bf-accent: #ff6b35;
    --bf-accent-hover: #e55a2b;
    --bf-background: #2a2a2a;
    --bf-surface: #353535;
    --bf-border: #404040;
    --bf-text-primary: #ffffff;
    --bf-text-secondary: #b0b0b0;
    --bf-success: #00a32a;
    --bf-warning: #dba617;
    --bf-error: #d63638;
    --bf-font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.breachfeed-subscription-manager {
    max-width: 800px;
    margin: 20px 0;
    font-family: var(--bf-font-primary);
}

.breachfeed-subscription-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--bf-border);
    border-radius: 4px;
    margin-bottom: 10px;
    background: var(--bf-background);
    transition: all 0.2s ease;
}

.breachfeed-subscription-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.subscription-info strong {
    display: block;
    margin-bottom: 5px;
    color: var(--bf-text-primary);
    font-weight: 600;
}

.notification-methods {
    font-size: 14px;
    color: var(--bf-text-secondary);
}

.notification-methods .method {
    margin-right: 10px;
    padding: 2px 6px;
    background: var(--bf-surface);
    border-radius: 3px;
    color: var(--bf-text-secondary);
    font-weight: 500;
}

.breachfeed-add-subscription {
    margin-top: 30px;
    padding: 20px;
    background: var(--bf-surface);
    border-radius: 4px;
}

.breachfeed-add-subscription h3 {
    color: var(--bf-text-primary);
    margin-bottom: 20px;
    font-weight: 600;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--bf-text-primary);
}

.form-group select,
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"] {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--bf-border);
    border-radius: 4px;
    background: var(--bf-background);
    color: var(--bf-text-primary);
    font-size: 14px;
    transition: border-color 0.2s ease;
    font-family: var(--bf-font-primary);
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: var(--bf-accent);
    box-shadow: 0 0 0 1px var(--bf-accent);
}

.form-group input::placeholder {
    color: var(--bf-text-secondary);
}

.checkbox-label {
    display: inline-block;
    margin-right: 20px;
    font-weight: normal;
    color: var(--bf-text-primary);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
}

/* Search styles */
.breachfeed-search {
    max-width: 800px;
    margin: 20px 0;
    font-family: var(--bf-font-primary);
}

.search-input-wrapper {
    display: flex;
    gap: 10px;
}

.breachfeed-search-input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--bf-border);
    border-radius: 4px;
    font-size: 16px;
    background: var(--bf-background);
    color: var(--bf-text-primary);
    transition: border-color 0.2s ease;
    font-family: var(--bf-font-primary);
}

.breachfeed-search-input:focus {
    outline: none;
    border-color: var(--bf-accent);
    box-shadow: 0 0 0 1px var(--bf-accent);
}

.breachfeed-search-input::placeholder {
    color: var(--bf-text-secondary);
}

.breachfeed-search-button {
    padding: 10px 20px;
    background: var(--bf-accent);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.breachfeed-search-button:hover {
    background: var(--bf-accent-hover);
}

.breachfeed-search-results {
    margin-top: 30px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bf-border);
}

.results-header h3 {
    color: var(--bf-text-primary);
    margin: 0;
    font-weight: 600;
}

.results-count {
    color: var(--bf-text-secondary);
    font-size: 0.9rem;
}

/* Modern Article Cards - BreachFeed Style */
.breachfeed-articles-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin: 32px 0;
    padding: 0;
}

@media (max-width: 768px) {
    .breachfeed-articles-container {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 24px 0;
    }
}

.breachfeed-article {
    background: var(--bf-background);
    border: 1px solid var(--bf-border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}

.breachfeed-article:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border-color: var(--bf-accent);
}

.breachfeed-article-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--bf-surface);
}

.breachfeed-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.breachfeed-article:hover .breachfeed-article-image img {
    transform: scale(1.05);
}

.breachfeed-article-content {
    padding: 24px;
}

.breachfeed-article h4 {
    margin: 0 0 16px 0;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 600;
}

.breachfeed-article h4 a {
    color: var(--bf-text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breachfeed-article h4 a:hover {
    color: var(--bf-accent);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--bf-text-secondary);
    margin-bottom: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--bf-border);
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-meta .dashicons,
.article-meta .icon {
    font-size: 14px;
    color: var(--bf-accent);
}

.article-description {
    margin: 0;
    line-height: 1.6;
    color: var(--bf-text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

.article-severity-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    background: var(--bf-accent);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.article-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bf-accent);
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    margin-top: auto;
}

.article-read-more:hover {
    background: var(--bf-accent-hover);
    color: white;
    text-decoration: none;
    transform: translateX(2px);
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--bf-border);
}

.article-tag {
    display: inline-block;
    padding: 4px 10px;
    background: var(--bf-surface);
    color: var(--bf-text-secondary);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.article-tag:hover {
    background: var(--bf-accent);
    color: white;
}

/* Special tag types */
.article-tag.severity {
    background: var(--bf-warning);
    color: white;
}

.article-tag.incident {
    background: var(--bf-error);
    color: white;
}

.article-tag.cve {
    background: var(--bf-accent);
    color: white;
    font-weight: 600;
}

.article-tag.tech {
    background: #2196F3;
    color: white;
}

.article-tag.industry {
    background: #4CAF50;
    color: white;
}

.article-keywords {
    margin-top: 10px;
}

.keyword-tag {
    display: inline-block;
    padding: 3px 8px;
    margin-right: 5px;
    background: var(--bf-surface);
    border-radius: 3px;
    font-size: 12px;
    color: var(--bf-text-secondary);
}

.results-pagination {
    margin-top: 30px;
    text-align: center;
}

.results-pagination button {
    margin: 0 5px;
    padding: 8px 16px;
    background: var(--bf-background);
    border: 1px solid var(--bf-border);
    border-radius: 3px;
    cursor: pointer;
    color: var(--bf-text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
}

.results-pagination button:hover:not(:disabled) {
    background: var(--bf-surface);
    border-color: var(--bf-accent);
}

.results-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.results-pagination button.active {
    background: var(--bf-accent);
    border-color: var(--bf-accent);
    color: white;
}

.breachfeed-notice {
    padding: 15px;
    background: var(--bf-surface);
    border-left: 4px solid var(--bf-accent);
    margin: 20px 0;
    color: var(--bf-text-primary);
    font-family: var(--bf-font-primary);
}

.breachfeed-notice.success {
    border-left-color: var(--bf-success);
    background: #f0f6fc;
}

.breachfeed-notice.error {
    border-left-color: var(--bf-error);
    background: #fcf0f1;
}

/* Button styles */
.btn,
.button,
input[type="submit"],
button[type="submit"] {
    background: var(--bf-accent);
    color: white;
    border: 1px solid var(--bf-accent);
    padding: 8px 16px;
    border-radius: 3px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn:hover,
.button:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
    background: var(--bf-accent-hover);
    border-color: var(--bf-accent-hover);
    color: white;
    text-decoration: none;
}

/* Enhanced Dashboard Styles */
.breachfeed-user-dashboard {
    max-width: 1200px;
    margin: 20px 0;
    font-family: var(--bf-font-primary);
}

/* Navigation */
.dashboard-nav {
    border-bottom: 1px solid var(--bf-border);
    margin-bottom: 30px;
}

.nav-tab {
    background: none;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    font-weight: 500;
    color: var(--bf-text-secondary);
    transition: all 0.2s ease;
}

.nav-tab:hover {
    color: var(--bf-accent);
    background: var(--bf-surface);
}

.nav-tab-active {
    color: var(--bf-accent);
    border-bottom-color: var(--bf-accent);
    background: var(--bf-surface);
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.dashboard-stats .stat-card {
    background: var(--bf-background);
    border: 1px solid var(--bf-border);
    border-radius: 4px;
    padding: 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    cursor: pointer;
}

.dashboard-stats .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border-color: var(--bf-accent);
    background: var(--bf-surface);
}

.stat-icon {
    font-size: 32px;
    margin-right: 15px;
    color: var(--bf-accent);
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--bf-text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--bf-text-secondary);
    margin-top: 5px;
}

/* Subscription Cards */
.subscription-card {
    background: var(--bf-background);
    border: 1px solid var(--bf-border);
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.subscription-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.subscription-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.subscription-type-badge {
    padding: 4px 12px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.subscription-COMPANY { background: #e3f2fd; color: #1565c0; }
.subscription-KEYWORD { background: #f3e5f5; color: #7b1fa2; }
.subscription-AGENCY { background: #e8f5e8; color: #2e7d32; }
.subscription-LOCATION { background: #fff3e0; color: #ef6c00; }

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

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

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.subscription-content h4 {
    margin: 0 0 10px 0;
    color: var(--bf-text-primary);
}

/* Gallery Grid Layout v2.0.7 */
.subscriptions-header {
    margin-bottom: 24px;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.header-main h3 {
    margin: 0;
    color: var(--bf-text-primary);
}

.subscriptions-controls {
    background: var(--bf-surface);
    border: 1px solid var(--bf-border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

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

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

.filter-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--bf-text-secondary);
    white-space: nowrap;
}

.filter-select, .filter-input {
    padding: 6px 12px;
    border: 1px solid var(--bf-border);
    border-radius: 6px;
    background: var(--bf-background);
    color: var(--bf-text-primary);
    font-size: 13px;
    min-width: 120px;
}

.filter-input {
    min-width: 150px;
}

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

.view-toggle {
    display: flex;
    border: 1px solid var(--bf-border);
    border-radius: 6px;
    overflow: hidden;
}

.view-btn {
    padding: 8px 12px;
    border: none;
    background: var(--bf-surface);
    color: var(--bf-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
}

.view-btn:hover {
    background: var(--bf-accent);
    color: white;
}

.view-btn.active {
    background: var(--bf-accent);
    color: white;
}

.subscriptions-summary {
    font-size: 13px;
    color: var(--bf-text-secondary);
    margin-bottom: 16px;
}

/* Grid Layout */
.subscriptions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 0;
}

.subscriptions-grid.list-view {
    grid-template-columns: 1fr;
    gap: 12px;
}

/* Gallery Cards - Rounded Squares */
.gallery-card {
    background: var(--bf-background);
    border: 2px solid var(--bf-border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    min-height: 280px;
}

.gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--bf-accent);
}

.gallery-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--bf-accent) 0%, var(--bf-primary) 100%);
}

/* Card Sections */
.card-header {
    padding: 20px 20px 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.card-logo {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bf-surface);
    border: 2px solid var(--bf-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-toggle {
    flex-shrink: 0;
}

.card-content {
    padding: 16px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-title {
    margin-bottom: 12px;
}

.card-title h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--bf-text-primary);
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-details {
    margin-bottom: 16px;
    flex: 1;
}

.card-stats {
    margin-top: auto;
}

.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 12px;
    background: rgba(var(--bf-surface-rgb), 0.3);
    border-radius: 12px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--bf-accent);
    line-height: 1;
}

.stat-label {
    font-size: 11px;
    color: var(--bf-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.card-footer {
    padding: 0 20px 20px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-notifications {
    display: flex;
    gap: 6px;
}

.card-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--bf-border);
    background: var(--bf-background);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    background: var(--bf-accent);
    border-color: var(--bf-accent);
    color: white;
    transform: scale(1.1);
}

.action-btn.delete-subscription:hover {
    background: var(--bf-error);
    border-color: var(--bf-error);
}

/* List View Modifications */
.subscriptions-grid.list-view .gallery-card {
    aspect-ratio: auto;
    min-height: auto;
    flex-direction: row;
    align-items: center;
    padding: 16px 20px;
}

.subscriptions-grid.list-view .card-header {
    padding: 0;
    margin-right: 16px;
}

.subscriptions-grid.list-view .card-logo {
    width: 48px;
    height: 48px;
}

.subscriptions-grid.list-view .card-content {
    padding: 0;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

.subscriptions-grid.list-view .card-title {
    margin-bottom: 0;
    min-width: 200px;
}

.subscriptions-grid.list-view .card-title h4 {
    font-size: 16px;
    margin-bottom: 4px;
}

.subscriptions-grid.list-view .card-details {
    margin-bottom: 0;
    flex: 1;
}

.subscriptions-grid.list-view .card-stats {
    margin-top: 0;
}

.subscriptions-grid.list-view .stat-grid {
    display: flex;
    gap: 20px;
    background: transparent;
    padding: 0;
}

.subscriptions-grid.list-view .card-footer {
    padding: 0;
    margin-left: 16px;
}

/* Enhanced Subscription Cards v2.0.4+ */
.enhanced-card {
    background: linear-gradient(135deg, var(--bf-background) 0%, rgba(255,255,255,0.8) 100%);
    border: 1px solid var(--bf-border);
    border-radius: 16px;
    padding: 0;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}

.enhanced-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--bf-accent);
}

.enhanced-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--bf-accent) 0%, var(--bf-primary) 100%);
}

.subscription-header {
    padding: 24px 24px 16px 24px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    background: transparent;
}

.subscription-main-info {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex: 1;
}

.subscription-logo {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bf-surface);
    border: 2px solid var(--bf-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.entity-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.entity-icon {
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bf-primary), var(--bf-accent));
    color: white;
    border-radius: 10px;
}

.entity-icon-COMPANY { background: linear-gradient(135deg, #2196F3, #1976D2); }
.entity-icon-KEYWORD { background: linear-gradient(135deg, #4CAF50, #388E3C); }
.entity-icon-AGENCY { background: linear-gradient(135deg, #FF9800, #F57C00); }
.entity-icon-LOCATION { background: linear-gradient(135deg, #9C27B0, #7B1FA2); }

.subscription-title-info {
    flex: 1;
    min-width: 0;
}

.entity-name {
    margin: 0 0 8px 0 !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    color: var(--bf-text-primary) !important;
    line-height: 1.2 !important;
}

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

.subscription-type-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.creation-date {
    font-size: 12px;
    color: var(--bf-text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.subscription-content {
    padding: 0 24px 16px 24px;
}

.entity-description {
    margin-bottom: 16px;
    padding: 12px 16px;
    background: rgba(var(--bf-accent-rgb), 0.05);
    border-left: 3px solid var(--bf-accent);
    border-radius: 0 8px 8px 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--bf-text-secondary);
}

.subscription-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.subscription-stats {
    padding: 16px 24px;
    background: rgba(var(--bf-surface-rgb), 0.5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid var(--bf-border);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.stat-number {
    font-size: 18px;
    font-weight: 700;
    color: var(--bf-accent);
    line-height: 1;
}

.stat-label {
    font-size: 11px;
    color: var(--bf-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--bf-border);
    flex-shrink: 0;
}

.subscription-notifications {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-badge {
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.notification-badge.active {
    background: rgba(var(--bf-success-rgb), 0.1);
    border-color: var(--bf-success);
    color: var(--bf-success);
    opacity: 1;
}

.notification-badge.inactive {
    background: rgba(var(--bf-text-secondary-rgb), 0.1);
    border-color: var(--bf-border);
    color: var(--bf-text-secondary);
    opacity: 0.6;
}

.subscription-actions {
    padding: 16px 24px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.button-secondary {
    padding: 8px 16px;
    border: 1px solid var(--bf-border);
    background: var(--bf-background);
    color: var(--bf-text-primary);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.button-secondary:hover {
    background: var(--bf-surface);
    border-color: var(--bf-accent);
    color: var(--bf-accent);
    transform: translateY(-1px);
}

.button-danger {
    padding: 8px 16px;
    border: 1px solid var(--bf-error);
    background: rgba(var(--bf-error-rgb), 0.1);
    color: var(--bf-error);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.button-danger:hover {
    background: var(--bf-error);
    color: white;
    transform: translateY(-1px);
}

.button-icon {
    font-size: 12px;
}

.location-badge {
    background: rgba(var(--bf-accent-rgb), 0.1);
    color: var(--bf-accent);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

/* Responsive Design for Enhanced Cards */
@media (max-width: 768px) {
    .subscription-header {
        padding: 20px 20px 12px 20px;
    }
    
    .subscription-main-info {
        gap: 12px;
    }
    
    .subscription-logo {
        width: 48px;
        height: 48px;
    }
    
    .entity-name {
        font-size: 18px !important;
    }
    
    .subscription-content {
        padding: 0 20px 12px 20px;
    }
    
    .subscription-stats {
        padding: 12px 20px;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .stat-item {
        min-width: 60px;
    }
    
    .subscription-actions {
        padding: 12px 20px 20px 20px;
        flex-direction: column;
    }
    
    .button-secondary,
    .button-danger {
        justify-content: center;
        width: 100%;
    }
}

.detail-label {
    font-weight: 600;
    color: var(--bf-text-primary);
}

.severity-badge {
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.severity-LOW { background: #e8f5e8; color: #2e7d32; }
.severity-MEDIUM { background: #fff3e0; color: #ef6c00; }
.severity-HIGH { background: #fce4ec; color: #c2185b; }
.severity-CRITICAL { background: #ffebee; color: #d32f2f; }

.subscription-notifications {
    margin: 15px 0;
}

.notification-badge {
    margin-right: 8px;
    font-size: 16px;
    color: var(--bf-text-secondary);
}

.subscription-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--bf-border);
}

.button-link {
    background: none;
    border: none;
    color: var(--bf-accent);
    cursor: pointer;
    text-decoration: underline;
    margin-right: 15px;
    font-size: 14px;
    transition: color 0.2s ease;
}

.button-link:hover {
    color: var(--bf-accent-hover);
}

/* Incident Cards */
.incident-card {
    background: var(--bf-background);
    border: 1px solid var(--bf-border);
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.incident-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.incident-CRITICAL { border-left: 4px solid #d32f2f; }
.incident-HIGH { border-left: 4px solid #f57c00; }
.incident-MEDIUM { border-left: 4px solid #fbc02d; }
.incident-LOW { border-left: 4px solid #388e3c; }

.incident-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.incident-date {
    font-size: 14px;
    color: var(--bf-text-secondary);
}

.incident-image {
    margin-bottom: 15px;
}

.incident-image img {
    max-width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--bf-border);
}

.incident-content h4 {
    margin: 0 0 15px 0;
    color: var(--bf-text-primary);
    font-weight: 600;
}

.incident-content h4 a {
    color: var(--bf-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

.incident-content h4 a:hover {
    color: var(--bf-accent-hover);
}

.incident-summary,
.incident-matches,
.incident-recommendations {
    margin-bottom: 20px;
}

.incident-summary h5,
.incident-matches h5,
.incident-recommendations h5 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--bf-text-secondary);
    text-transform: uppercase;
}

.match-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.match-tag {
    padding: 4px 12px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

.match-COMPANY { background: #e3f2fd; color: #1565c0; }
.match-KEYWORD { background: #f3e5f5; color: #7b1fa2; }
.match-AGENCY { background: #e8f5e8; color: #2e7d32; }
.match-LOCATION { background: #fff3e0; color: #ef6c00; }

.recommendations-content {
    background: var(--bf-surface);
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid var(--bf-accent);
    white-space: pre-line;
    font-size: 14px;
    line-height: 1.6;
    color: var(--bf-text-primary);
}

.incident-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--bf-border);
    font-size: 14px;
}

.incident-source {
    color: var(--bf-text-secondary);
}

.read-full-article {
    color: var(--bf-accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.read-full-article:hover {
    color: var(--bf-accent-hover);
    text-decoration: underline;
}

/* Form Styles */
.add-subscription-form {
    background: var(--bf-surface);
    padding: 25px;
    border-radius: 4px;
    margin-bottom: 30px;
    border: 1px solid var(--bf-border);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.notification-methods,
.notification-settings {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.form-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--bf-border);
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--bf-text-secondary);
    font-family: var(--bf-font-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .breachfeed-subscription-manager,
    .breachfeed-search,
    .breachfeed-user-dashboard {
        margin: 15px 0;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .dashboard-stats .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .incident-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .incident-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .search-input-wrapper {
        flex-direction: column;
    }
    
    .breachfeed-search-button {
        width: 100%;
    }
}

/* Company Profile Styles */
.breachfeed-company-profile {
    max-width: 1200px;
    margin: 32px 0;
    font-family: var(--bf-font-primary);
}

/* Company Header */
.company-header {
    background: var(--bf-background);
    border: 1px solid var(--bf-border);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.company-header-content {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

.company-logo {
    flex-shrink: 0;
}

.company-logo img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
    background: white;
    padding: 8px;
    border: 1px solid var(--bf-border);
}

.company-info {
    flex: 1;
}

.company-name {
    margin: 0 0 16px 0;
    color: var(--bf-text-primary);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.company-industry {
    margin-bottom: 16px;
}

.industry-tag {
    display: inline-block;
    background: var(--bf-accent);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.company-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    color: var(--bf-text-secondary);
    font-size: 14px;
}

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

.meta-item strong {
    color: var(--bf-text-primary);
}

.company-website {
    color: var(--bf-accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.company-website:hover {
    color: var(--bf-accent-hover);
}

.company-website .dashicons {
    font-size: 14px;
    margin-left: 4px;
}

/* Company Description */
.company-description {
    background: var(--bf-background);
    border: 1px solid var(--bf-border);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.company-description h2 {
    margin: 0 0 20px 0;
    color: var(--bf-text-primary);
    font-size: 22px;
    font-weight: 600;
}

.description-content {
    line-height: 1.7;
    color: var(--bf-text-secondary);
    font-size: 16px;
}

/* Incident Summary */
.incident-summary {
    background: var(--bf-background);
    border: 1px solid var(--bf-border);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.incident-summary h2 {
    margin: 0 0 24px 0;
    color: var(--bf-text-primary);
    font-size: 22px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.incident-summary h2::before {
    content: "🛡️";
    font-size: 24px;
}

/* Incident Stats Cards */
.incident-stats {
    margin-bottom: 32px;
}

.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.stat-card {
    background: var(--bf-surface);
    border: 1px solid var(--bf-border);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--bf-accent);
}

.stat-card.critical::before {
    background: #d32f2f;
}

.stat-card.high::before {
    background: #f57c00;
}

.stat-card.total::before {
    background: var(--bf-accent);
}

.stat-card.last-incident::before {
    background: var(--bf-warning);
}

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

.stat-card .stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--bf-text-primary);
    margin-bottom: 8px;
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 14px;
    color: var(--bf-text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* No Incidents State */
.no-incidents {
    text-align: center;
    padding: 48px 24px;
    background: var(--bf-surface);
    border-radius: 12px;
    border: 2px dashed var(--bf-border);
}

.no-incidents-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.no-incidents h3 {
    margin: 0 0 12px 0;
    color: var(--bf-text-primary);
    font-size: 20px;
    font-weight: 600;
}

.no-incidents p {
    margin: 0;
    color: var(--bf-text-secondary);
    font-size: 16px;
    line-height: 1.5;
}

/* Incident Timeline */
.incident-timeline h3 {
    margin: 0 0 24px 0;
    color: var(--bf-text-primary);
    font-size: 18px;
    font-weight: 600;
}

.timeline-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.timeline-item {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: var(--bf-surface);
    border: 1px solid var(--bf-border);
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--bf-accent);
    border-radius: 4px 0 0 4px;
}

.timeline-item.severity-critical::before {
    background: #d32f2f;
}

.timeline-item.severity-high::before {
    background: #f57c00;
}

.timeline-item.severity-medium::before {
    background: #fbc02d;
}

.timeline-item.severity-low::before {
    background: #388e3c;
}

.timeline-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.timeline-date {
    flex-shrink: 0;
    width: 100px;
    font-size: 13px;
    color: var(--bf-text-secondary);
    font-weight: 500;
    text-align: right;
    padding-top: 2px;
}

.timeline-content {
    flex: 1;
}

.incident-title {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.incident-title a {
    color: var(--bf-text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.incident-title a:hover {
    color: var(--bf-accent);
}

.incident-title .dashicons {
    font-size: 14px;
    margin-left: 4px;
    color: var(--bf-accent);
}

.incident-description {
    margin: 0 0 16px 0;
    color: var(--bf-text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

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

.severity-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.severity-badge.severity-critical {
    background: #ffebee;
    color: #d32f2f;
    border: 1px solid #ffcdd2;
}

.severity-badge.severity-high {
    background: #fff3e0;
    color: #f57c00;
    border: 1px solid #ffcc02;
}

.severity-badge.severity-medium {
    background: #fffde7;
    color: #fbc02d;
    border: 1px solid #fff176;
}

.severity-badge.severity-low {
    background: #e8f5e8;
    color: #388e3c;
    border: 1px solid #c8e6c9;
}

.source-badge {
    padding: 4px 8px;
    background: var(--bf-border);
    color: var(--bf-text-secondary);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.incident-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.incident-tag {
    padding: 3px 6px;
    background: var(--bf-accent);
    color: white;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Recent Mentions */
.recent-mentions {
    background: var(--bf-background);
    border: 1px solid var(--bf-border);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.recent-mentions h2 {
    margin: 0 0 24px 0;
    color: var(--bf-text-primary);
    font-size: 22px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.recent-mentions h2::before {
    content: "📰";
    font-size: 24px;
}

.mentions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.mention-card {
    background: var(--bf-surface);
    border: 1px solid var(--bf-border);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s ease;
}

.mention-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--bf-accent);
}

.mention-title {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.mention-title a {
    color: var(--bf-text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.mention-title a:hover {
    color: var(--bf-accent);
}

.mention-description {
    margin: 0 0 16px 0;
    color: var(--bf-text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

.mention-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 12px;
    color: var(--bf-text-secondary);
}

.mention-date {
    font-weight: 500;
}

.mention-source {
    background: var(--bf-border);
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
}

.mention-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mention-tag {
    padding: 3px 6px;
    background: var(--bf-surface);
    color: var(--bf-text-secondary);
    border: 1px solid var(--bf-border);
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
}

.mention-tag:hover {
    background: var(--bf-accent);
    color: white;
    border-color: var(--bf-accent);
}

/* Error States */
.breachfeed-error {
    background: var(--bf-surface);
    border: 1px solid var(--bf-error);
    border-left: 4px solid var(--bf-error);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.breachfeed-error h3 {
    margin: 0 0 12px 0;
    color: var(--bf-error);
    font-size: 18px;
    font-weight: 600;
}

.breachfeed-error p {
    margin: 0;
    color: var(--bf-text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

/* Responsive Design for Company Profile */
@media (max-width: 768px) {
    .company-header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 16px;
    }
    
    .company-meta {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .stat-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .timeline-item {
        flex-direction: column;
        gap: 12px;
    }
    
    .timeline-date {
        width: auto;
        text-align: left;
    }
    
    .mentions-grid {
        grid-template-columns: 1fr;
    }
    
    .incident-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* AI-Generated Company Information */
.ai-company-info {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--bf-border);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stock-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.stock-ticker {
    background: var(--bf-accent);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.market-cap {
    color: var(--bf-text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.competitors,
.key-products,
.business-model {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    line-height: 1.4;
}

.competitors strong,
.key-products strong,
.business-model strong {
    color: var(--bf-text-primary);
    flex-shrink: 0;
}

.competitor-list,
.products-list {
    color: var(--bf-text-secondary);
    font-weight: 500;
}

.business-model span {
    color: var(--bf-text-secondary);
    font-weight: 500;
}

/* AI info responsive design */
@media (max-width: 768px) {
    .ai-company-info {
        margin-top: 20px;
        padding-top: 16px;
        gap: 12px;
    }
    
    .stock-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .competitors,
    .key-products,
    .business-model {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .stat-cards {
        grid-template-columns: 1fr;
    }
    
    .company-header,
    .company-description,
    .incident-summary,
    .recent-mentions {
        padding: 20px;
    }
}

/* Autocomplete Styles */
.autocomplete-container {
    position: relative;
}

.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bf-background);
    border: 1px solid var(--bf-border);
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.autocomplete-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--bf-border);
    color: var(--bf-text-primary);
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: var(--bf-surface);
}

.autocomplete-item.selected {
    background: var(--bf-accent);
    color: white;
}

.autocomplete-item.add-new {
    background: var(--bf-surface);
    font-weight: bold;
    color: var(--bf-accent);
    border-top: 2px solid var(--bf-border);
}

.autocomplete-item.add-new:hover {
    background: var(--bf-accent);
    color: white;
}

.autocomplete-item-type {
    font-size: 12px;
    color: var(--bf-text-secondary);
    background: var(--bf-border);
    padding: 2px 6px;
    border-radius: 3px;
}

/* Modal Styles */
.breachfeed-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--bf-background);
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--bf-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: var(--bf-text-primary);
    font-size: 20px;
}

.modal-close {
    cursor: pointer;
    font-size: 24px;
    color: var(--bf-text-secondary);
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

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

.modal-body {
    padding: 25px;
}

.modal-body .form-group {
    margin-bottom: 20px;
}

.modal-body .form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--bf-text-primary);
    font-weight: 500;
}

.modal-body .form-group input,
.modal-body .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--bf-border);
    border-radius: 4px;
    background: var(--bf-surface);
    color: var(--bf-text-primary);
    font-size: 14px;
    font-family: var(--bf-font-primary);
}

.modal-body .form-group input:focus,
.modal-body .form-group textarea:focus {
    outline: none;
    border-color: var(--bf-accent);
    box-shadow: 0 0 0 3px rgba(255, 87, 51, 0.1);
}

.modal-body .form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--bf-border);
}

/* Gallery Grid Layout Styles */
:root {
    --bf-surface-rgb: 53, 53, 53;
}

/* Subscription Management Header */
.subscriptions-header {
    margin-bottom: 30px;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.subscriptions-summary {
    color: var(--bf-text-secondary);
    font-size: 14px;
}

/* Controls Section */
.subscriptions-controls {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    padding: 20px;
    background: var(--bf-surface);
    border-radius: 12px;
    border: 1px solid var(--bf-border);
}

/* Filters */
.subscriptions-filters {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--bf-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select,
.filter-input {
    padding: 8px 12px;
    border: 1px solid var(--bf-border);
    border-radius: 6px;
    background: var(--bf-background);
    color: var(--bf-text-primary);
    font-size: 14px;
    min-width: 120px;
    transition: all 0.2s ease;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--bf-accent);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.button-secondary {
    padding: 8px 16px;
    background: var(--bf-surface);
    border: 1px solid var(--bf-border);
    border-radius: 6px;
    color: var(--bf-text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.button-secondary:hover {
    background: var(--bf-background);
    border-color: var(--bf-accent);
}

/* View Controls */
.view-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.view-toggle {
    display: flex;
    background: var(--bf-background);
    border: 1px solid var(--bf-border);
    border-radius: 8px;
    overflow: hidden;
}

.view-btn {
    padding: 10px 14px;
    background: transparent;
    border: none;
    color: var(--bf-text-secondary);
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

.view-btn:hover {
    background: var(--bf-surface);
    color: var(--bf-text-primary);
}

.view-btn.active {
    background: var(--bf-accent);
    color: white;
}

.button-icon {
    margin-right: 8px;
    font-size: 14px;
}

/* Gallery Cards - Rounded Squares */
.subscriptions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.gallery-card {
    background: var(--bf-background);
    border: 2px solid var(--bf-border);
    border-radius: 20px;
    aspect-ratio: 1;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.gallery-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
    border-color: var(--bf-accent);
}

.gallery-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--bf-accent) 0%, var(--bf-primary) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-card:hover::before {
    opacity: 1;
}

/* Responsive Grid */
@media (max-width: 1200px) {
    .subscriptions-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .subscriptions-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .subscriptions-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .subscriptions-filters {
        justify-content: space-between;
    }
    
    .view-controls {
        justify-content: center;
    }
}

/* Toggle Switch Styles */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bf-border);
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

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

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

/* Notification Badges */
.notification-badge {
    font-size: 16px;
    opacity: 0.3;
    transition: opacity 0.2s ease;
}

.notification-badge.active {
    opacity: 1;
}

/* Company Profile Logo Enhancements */
.company-logo {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bf-surface);
    border: 2px solid var(--bf-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
}

.company-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.company-logo-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bf-primary), var(--bf-accent));
    border-radius: 14px;
}

.company-icon {
    font-size: 48px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Company Header Layout */
.company-header {
    background: var(--bf-surface);
    border: 1px solid var(--bf-border);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.company-header-content {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.company-info {
    flex: 1;
    min-width: 0;
}

.company-name {
    margin: 0 0 15px 0;
    font-size: 32px;
    font-weight: 700;
    color: var(--bf-text-primary);
    line-height: 1.2;
}

.company-industry .industry-tag {
    display: inline-block;
    padding: 6px 16px;
    background: var(--bf-accent);
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
}

.company-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.meta-item {
    font-size: 14px;
    color: var(--bf-text-secondary);
}

.meta-item strong {
    color: var(--bf-text-primary);
}

.company-website {
    color: var(--bf-accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.company-website:hover {
    color: var(--bf-accent-hover);
    text-decoration: underline;
}

/* Alert Type Badges */
.alert-type-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 8px;
    display: inline-block;
}

.alert-CONFIRMED_BREACH {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
    animation: pulse-red 2s infinite;
}

.alert-SECURITY_INCIDENT {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(217, 119, 6, 0.3);
}

.alert-SECURITY_MENTION {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

/* Alert type checkbox styling */
.alert-type-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 5px;
}

.alert-type-label {
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 500;
    border: 1px solid var(--bf-border);
}

.alert-type-label.confirmed-breach {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.3);
    color: #dc2626;
}

.alert-type-label.security-incident {
    background: rgba(217, 119, 6, 0.1);
    border-color: rgba(217, 119, 6, 0.3);
    color: #d97706;
}

.alert-type-label.security-mention {
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.3);
    color: #2563eb;
}

/* Incident badges layout */
.incident-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Enhanced incident cards with alert type styling */
.incident-card.alert-CONFIRMED_BREACH {
    border-left: 4px solid #dc2626;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.05), transparent);
}

.incident-card.alert-SECURITY_INCIDENT {
    border-left: 4px solid #d97706;
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.05), transparent);
}

.incident-card.alert-SECURITY_MENTION {
    border-left: 4px solid #2563eb;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), transparent);
}

/* Pulse animation for critical alerts */
@keyframes pulse-red {
    0%, 100% {
        box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 4px 12px rgba(220, 38, 38, 0.5);
        transform: scale(1.02);
    }
}

/* Responsive Design for Company Profile */
@media (max-width: 768px) {
    .company-header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .company-logo {
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .company-meta {
        align-items: center;
    }
    
    .incident-badges {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .alert-type-checkboxes {
        gap: 6px;
    }
}

/* Article Detail Page Styles */
.breachfeed-article-detail {
    padding: 40px 0;
    background: var(--bf-primary);
    min-height: 100vh;
    width: 100%;
    display: grid;
    place-items: center;
}

/* Override theme's content-area constraints for BreachFeed pages */
.breachfeed-article-detail .content-area,
.breachfeed-tag-articles .content-area {
    max-width: 1400px !important;
    width: 1400px !important;
    padding: 0 !important;
    position: relative !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin: 0 !important;
}

.breachfeed-article-detail .site-content,
.breachfeed-tag-articles .site-content,
.breachfeed-article-detail #primary,
.breachfeed-tag-articles #primary,
.breachfeed-article-detail .entry-content,
.breachfeed-tag-articles .entry-content {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Ensure full width for article wrapper */
body.single-breachfeed_article .content-area,
body.page-template-breachfeed-article .content-area {
    max-width: 1400px !important;
    width: 1400px !important;
    margin: 0 auto !important;
}

body .site-main,
body #main,
body .entry-content {
    max-width: 100% !important;
    width: 100% !important;
}

/* Ensure content width is not constrained by theme */
.breachfeed-article-detail .site-content {
    width: 100%;
    max-width: 100%;
}

/* Remove any offset from parent elements */
body.single-breachfeed_article,
body.page-template-breachfeed-article,
.breachfeed-article-detail .site,
.breachfeed-article-detail .site-inner {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Force content-area to be exactly 1400px */
.content-area {
    width: 1400px !important;
    max-width: 1400px !important;
    position: relative !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin: 0 !important;
}

.breachfeed-article-detail #primary,
.breachfeed-article-detail #main {
    width: 100%;
    max-width: 100%;
}

.breachfeed-article-detail .container {
    max-width: 1400px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
    box-sizing: border-box;
    position: relative;
}

.article-header {
    background: var(--bf-surface);
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--bf-border);
}

.article-meta-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.article-title {
    font-size: 32px;
    line-height: 1.3;
    color: var(--bf-text-primary);
    margin: 0 0 20px 0;
    font-weight: 700;
}

.article-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.category-tag {
    background: var(--bf-background);
    color: var(--bf-text-secondary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    border: 1px solid var(--bf-border);
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.category-tag:hover {
    border-color: var(--bf-accent);
    color: var(--bf-accent);
    transform: translateY(-1px);
    text-decoration: none;
}

/* Voting System */
.article-voting {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid var(--bf-border);
    position: relative;
}

.vote-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border: 2px solid var(--bf-border);
    border-radius: 6px;
    background: var(--bf-background);
    color: var(--bf-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.vote-btn:hover:not(:disabled) {
    border-color: var(--bf-accent);
    transform: translateY(-1px);
    color: var(--bf-text-primary);
}

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

.vote-btn.vote-up.active {
    border-color: var(--bf-success);
    background: rgba(0, 163, 42, 0.1);
    color: var(--bf-success);
}

.vote-btn.vote-down.active {
    border-color: var(--bf-error);
    background: rgba(214, 54, 56, 0.1);
    color: var(--bf-error);
}

.vote-icon {
    font-size: 18px;
}

.vote-count {
    font-weight: 600;
}

.vote-score {
    margin-left: auto;
    font-size: 16px;
    color: var(--bf-text-secondary);
}

.vote-feedback {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bf-accent);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    animation: fadeInOut 2s;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(10px); }
    20% { opacity: 1; transform: translateX(-50%) translateY(0); }
    80% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

/* Featured Image */
.article-featured-image {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--bf-border);
}

.article-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Content Wrapper */
.article-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
    max-width: 100%;
    width: 100%;
    margin: 0;
}

/* Force full width for all parent containers */
.breachfeed-article-detail,
.breachfeed-article-detail > * {
    width: 100% !important;
    max-width: 100% !important;
}

.breachfeed-article-detail .container {
    width: 100% !important;
    max-width: 1400px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.article-main-content {
    min-width: 0; /* Prevent overflow */
    flex: 1;
    background: var(--bf-surface);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--bf-border);
}

.article-summary {
    background: var(--bf-background);
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 30px;
    border: 1px solid var(--bf-border);
}

.article-summary h2 {
    font-size: 20px;
    margin: 0 0 10px 0;
    color: var(--bf-text-primary);
}

.article-summary p {
    color: var(--bf-text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}

.article-summary p:last-child {
    margin-bottom: 0;
}

.article-full-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--bf-text-secondary);
}

.article-full-content p {
    margin-bottom: 16px;
}

.article-full-content h2,
.article-full-content h3,
.article-full-content h4 {
    margin: 24px 0 12px 0;
    color: var(--bf-text-primary);
    font-weight: 600;
}

.article-full-content ul,
.article-full-content ol {
    margin: 16px 0;
    padding-left: 30px;
}

.article-full-content li {
    margin-bottom: 8px;
}

.article-full-content blockquote {
    border-left: 4px solid var(--bf-accent);
    padding-left: 20px;
    margin: 20px 0;
    color: var(--bf-text-secondary);
    font-style: italic;
    background: var(--bf-background);
    padding: 20px;
    border-radius: 0 6px 6px 0;
}

.article-full-content img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 6px;
    border: 1px solid var(--bf-border);
}

.article-full-content a {
    color: var(--bf-accent);
    text-decoration: none;
    transition: color 0.2s;
}

.article-full-content a:hover {
    color: var(--bf-accent-hover);
    text-decoration: underline;
}

/* Article description formatting for detail page */
.article-main-content .article-description p {
    margin-bottom: 16px;
    line-height: 1.6;
    color: var(--bf-text-secondary);
}

.article-main-content .article-description p:last-child {
    margin-bottom: 0;
}

.article-recommendations {
    background: #1a1a1a !important;
    border: 2px solid var(--bf-warning);
    padding: 30px;
    border-radius: 12px;
    margin: 30px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.article-recommendations::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--bf-warning), var(--bf-accent));
}

.article-recommendations h2 {
    color: var(--bf-warning) !important;
    font-size: 24px;
    margin: 0 0 20px 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.article-recommendations h2::before {
    content: '⚠️';
    font-size: 28px;
}

.recommendations-content {
    color: #e0e0e0 !important;
    font-size: 16px;
    line-height: 1.8;
}

.recommendations-content p {
    color: #e0e0e0 !important;
    margin-bottom: 1.2em;
    line-height: 1.8;
    font-size: 16px;
}

.recommendations-content p:last-child {
    margin-bottom: 0;
}

.recommendations-content strong {
    color: var(--bf-warning) !important;
    font-weight: 600;
}

.recommendations-content em {
    color: #b0b0b0 !important;
    font-style: italic;
}

/* Override any theme styles */
.article-recommendations,
.article-recommendations * {
    background-color: transparent !important;
}

.article-recommendations {
    background: #1a1a1a !important;
}

.article-source {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--bf-border);
}

.source-info {
    color: var(--bf-text-secondary);
    margin-bottom: 10px;
}

.source-link {
    display: inline-block;
    padding: 10px 20px;
    background: var(--bf-accent);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
    font-weight: 600;
}

.source-link:hover {
    background: var(--bf-accent-hover);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* Sidebar */
.article-sidebar {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

@media (max-width: 1200px) {
    .breachfeed-article-detail .container {
        max-width: 100% !important;
        padding: 0 20px;
    }
    
    .article-content-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .article-sidebar {
        position: static;
        max-height: none;
    }
    
    .article-main-content {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .article-main-content {
        padding: 20px;
    }
    
    .breachfeed-article-detail .container {
        padding: 0 15px;
    }
}

/* Mentioned Entities */
.mentioned-entities {
    background: var(--bf-surface);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--bf-border);
    margin-bottom: 20px;
}

.mentioned-entities h3 {
    font-size: 18px;
    margin: 0 0 20px 0;
    color: var(--bf-text-primary);
    font-weight: 600;
}

.entity-section {
    margin-bottom: 25px;
}

.entity-section:last-child {
    margin-bottom: 0;
}

.entity-section h4 {
    font-size: 14px;
    text-transform: uppercase;
    color: var(--bf-text-secondary);
    margin: 0 0 15px 0;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.entity-icon {
    font-size: 18px;
}

.entity-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    margin-bottom: 10px;
    background: var(--bf-background);
    border: 1px solid var(--bf-border);
    border-radius: 6px;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.entity-item.subscribed {
    background: rgba(0, 163, 42, 0.05);
    border-color: rgba(0, 163, 42, 0.3);
}

.entity-item:hover {
    background: var(--bf-primary-light);
    border-color: var(--bf-accent);
    transform: translateX(5px);
}

.entity-item.subscribed:hover {
    background: rgba(0, 163, 42, 0.1);
    border-color: var(--bf-success);
}

.entity-content {
    flex: 1;
    min-width: 0;
}

.entity-name {
    font-weight: 600;
    color: var(--bf-text-primary);
    font-size: 15px;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.entity-detail {
    font-size: 12px;
    color: var(--bf-text-secondary);
    margin-top: 2px;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.login-prompt {
    font-size: 12px;
    color: var(--bf-text-secondary);
    font-style: italic;
}

.quick-subscribe-btn {
    padding: 6px 14px;
    background: var(--bf-accent);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.quick-subscribe-btn:hover {
    background: var(--bf-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.quick-subscribe-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.quick-subscribe-btn.subscribed {
    background: var(--bf-success);
    min-width: 100px;
}

.quick-subscribe-btn.subscribed .unsubscribe-text {
    display: none;
}

.quick-subscribe-btn.subscribed:hover {
    background: var(--bf-error);
}

.quick-subscribe-btn.subscribed:hover .subscribed-text {
    display: none;
}

.quick-subscribe-btn.subscribed:hover .unsubscribe-text {
    display: inline;
}

.subscribe-feedback {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bf-success);
    color: white;
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 163, 42, 0.3);
    transform: translateX(400px);
    transition: transform 0.3s;
    z-index: 9999;
}

.subscribe-feedback.show {
    transform: translateX(0);
}

/* Share Section */
.article-share {
    background: var(--bf-surface);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--bf-border);
}

.article-share h3 {
    font-size: 18px;
    margin: 0 0 15px 0;
    color: var(--bf-text-primary);
    font-weight: 600;
}

.share-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.share-btn {
    display: block;
    padding: 10px 15px;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    color: white;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.share-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: white;
}

.share-twitter {
    background: #1DA1F2;
}

.share-twitter:hover {
    background: #1a8cd8;
}

.share-linkedin {
    background: #0077B5;
}

.share-linkedin:hover {
    background: #006399;
}

.share-email {
    background: var(--bf-background);
    color: var(--bf-text-primary);
    border-color: var(--bf-border);
}

.share-email:hover {
    background: var(--bf-primary-light);
    border-color: var(--bf-accent);
    color: var(--bf-text-primary);
}

/* Popular Articles Page */
.breachfeed-popular-articles {
    padding: 40px 0;
    background: var(--bf-primary);
    min-height: 80vh;
}

.breachfeed-popular-articles .container {
    max-width: 1820px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 36px;
    margin: 0 0 10px 0;
    color: var(--bf-text-primary);
    font-weight: 700;
}

.page-description {
    font-size: 18px;
    color: var(--bf-text-secondary);
}

.filter-section {
    background: var(--bf-surface);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid var(--bf-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.time-filter {
    display: flex;
    gap: 10px;
}

.filter-btn {
    padding: 8px 16px;
    background: var(--bf-background);
    border: 1px solid var(--bf-border);
    border-radius: 4px;
    text-decoration: none;
    color: var(--bf-text-secondary);
    transition: all 0.2s;
    font-weight: 500;
}

.filter-btn:hover {
    background: var(--bf-primary-light);
    border-color: var(--bf-accent);
    color: var(--bf-text-primary);
}

.filter-btn.active {
    background: var(--bf-accent);
    color: white;
    border-color: var(--bf-accent);
}

/* Popular Articles Grid */
.articles-grid {
    display: grid;
    gap: 20px;
}

.popular-article-card {
    background: var(--bf-surface);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--bf-border);
    display: flex;
    gap: 20px;
    position: relative;
    transition: all 0.2s;
}

.popular-article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    border-color: var(--bf-accent);
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--bf-accent);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.popular-article-card .article-votes {
    flex-shrink: 0;
    text-align: center;
    padding: 10px;
    background: var(--bf-background);
    border: 1px solid var(--bf-border);
    border-radius: 6px;
    min-width: 80px;
}

.popular-article-card .vote-score {
    font-size: 24px;
    font-weight: bold;
    color: var(--bf-accent);
}

.popular-article-card .vote-label {
    font-size: 12px;
    color: var(--bf-text-secondary);
    text-transform: uppercase;
}

.popular-article-card .article-content {
    flex: 1;
}

.popular-article-card .article-title a {
    color: var(--bf-text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 20px;
    line-height: 1.4;
    transition: color 0.2s;
}

.popular-article-card .article-title a:hover {
    color: var(--bf-accent);
}

.popular-article-card .article-excerpt {
    color: var(--bf-text-secondary);
    margin: 10px 0;
    line-height: 1.6;
}

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

.popular-article-card .source {
    font-size: 13px;
    color: var(--bf-text-secondary);
}

.article-thumbnail {
    width: 120px;
    flex-shrink: 0;
}

.article-thumbnail img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--bf-border);
}

.mentioned-entities {
    font-size: 13px;
    color: var(--bf-text-secondary);
}

.more {
    color: var(--bf-accent);
    font-weight: 500;
}

/* Popular Articles Shortcode */
.breachfeed-popular-shortcode {
    margin: 30px 0;
}

.popular-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.popular-articles-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.popular-article-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--bf-surface);
    border: 1px solid var(--bf-border);
    border-radius: 6px;
    transition: all 0.2s;
}

.popular-article-item:hover {
    background: var(--bf-primary-light);
    border-color: var(--bf-accent);
}

.grid-layout .popular-article-item {
    flex-direction: column;
    text-align: center;
}

.article-rank {
    font-size: 18px;
    font-weight: bold;
    color: var(--bf-text-secondary);
}

.popular-article-item .article-votes {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--bf-accent);
}

.article-info {
    flex: 1;
}

.article-info h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
}

.article-info a {
    color: var(--bf-text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.article-info a:hover {
    color: var(--bf-accent);
}

.popular-articles-footer {
    text-align: center;
}

.view-all-popular {
    display: inline-block;
    padding: 10px 20px;
    background: var(--bf-accent);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.2s;
}

.view-all-popular:hover {
    background: var(--bf-accent-hover);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* Update article actions for dual links */
.article-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 15px;
}

.article-source-link {
    font-size: 14px;
    color: #666;
    text-decoration: none;
}

.article-source-link:hover {
    color: #007cba;
}

/* Articles by Tag Page Styles */
.breachfeed-tag-articles {
    padding: 40px 0;
    background: var(--bf-primary);
    min-height: 100vh;
}

.breachfeed-tag-articles .container {
    max-width: 1820px;
    margin: 0 auto;
    padding: 0 20px;
}

.breachfeed-tag-articles .page-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--bf-border);
}

.breachfeed-tag-articles .page-title {
    font-size: 36px;
    color: var(--bf-text-primary);
    margin: 0 0 20px 0;
    font-weight: 700;
}

.breachfeed-tag-articles .tag-name {
    color: var(--bf-accent);
    text-transform: uppercase;
}

.breadcrumb-nav {
    font-size: 14px;
    color: var(--bf-text-secondary);
}

.breadcrumb-nav a {
    color: var(--bf-text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-nav a:hover {
    color: var(--bf-accent);
}

.breadcrumb-nav .separator {
    margin: 0 8px;
    color: var(--bf-border);
}

.breadcrumb-nav .current {
    color: var(--bf-accent);
    text-transform: uppercase;
}

/* Articles Grid for Tag Page */
.breachfeed-tag-articles .articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.breachfeed-tag-articles .article-card {
    background: var(--bf-surface);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--bf-border);
    transition: all 0.3s ease;
}

.breachfeed-tag-articles .article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.breachfeed-tag-articles .article-thumbnail {
    position: relative;
    padding-top: 56.25%;
    overflow: hidden;
    background: var(--bf-background);
}

.breachfeed-tag-articles .article-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.breachfeed-tag-articles .article-card:hover .article-thumbnail img {
    transform: scale(1.05);
}

.breachfeed-tag-articles .article-content {
    padding: 20px;
}

.breachfeed-tag-articles .article-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.breachfeed-tag-articles .article-title {
    font-size: 20px;
    line-height: 1.4;
    margin: 0 0 12px 0;
    font-weight: 600;
}

.breachfeed-tag-articles .article-title a {
    color: var(--bf-text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breachfeed-tag-articles .article-title a:hover {
    color: var(--bf-accent);
}

.breachfeed-tag-articles .article-excerpt {
    color: var(--bf-text-secondary);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.breachfeed-tag-articles .article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 15px;
}

.breachfeed-tag-articles .tag {
    background: var(--bf-background);
    color: var(--bf-text-secondary);
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 12px;
    border: 1px solid var(--bf-border);
    text-decoration: none;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.breachfeed-tag-articles .tag:hover {
    border-color: var(--bf-accent);
    color: var(--bf-accent);
}

.breachfeed-tag-articles .tag.current-tag {
    background: var(--bf-accent);
    color: white;
    border-color: var(--bf-accent);
    cursor: default;
}

.breachfeed-tag-articles .read-more {
    color: var(--bf-accent);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s ease;
}

.breachfeed-tag-articles .read-more:hover {
    color: var(--bf-accent-hover);
}

/* Tag Page Pagination */
.breachfeed-tag-articles .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid var(--bf-border);
}

.breachfeed-tag-articles .page-link {
    padding: 8px 16px;
    background: var(--bf-surface);
    color: var(--bf-text-secondary);
    text-decoration: none;
    border: 1px solid var(--bf-border);
    border-radius: 4px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.breachfeed-tag-articles .page-link:hover {
    background: var(--bf-accent);
    color: white;
    border-color: var(--bf-accent);
}

.breachfeed-tag-articles .page-link.current {
    background: var(--bf-accent);
    color: white;
    border-color: var(--bf-accent);
    cursor: default;
}

.breachfeed-tag-articles .page-link.prev,
.breachfeed-tag-articles .page-link.next {
    padding: 8px 20px;
}

.breachfeed-tag-articles .page-numbers {
    display: flex;
    gap: 5px;
    align-items: center;
}

.breachfeed-tag-articles .dots {
    color: var(--bf-text-secondary);
    padding: 0 5px;
}

/* Error and No Articles States */
.breachfeed-tag-articles .error-message,
.breachfeed-tag-articles .no-articles {
    text-align: center;
    padding: 60px 20px;
    background: var(--bf-surface);
    border-radius: 8px;
    border: 1px solid var(--bf-border);
}

.breachfeed-tag-articles .error-message p,
.breachfeed-tag-articles .no-articles p {
    font-size: 18px;
    color: var(--bf-text-secondary);
    margin-bottom: 20px;
}

.breachfeed-tag-articles .button {
    display: inline-block;
    padding: 10px 24px;
    background: var(--bf-accent);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.breachfeed-tag-articles .button:hover {
    background: var(--bf-accent-hover);
}

/* AI Enhanced Notice */
.ai-enhanced-notice {
    background-color: #e8f4fd;
    border: 1px solid #bee5eb;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #004085;
    font-size: 14px;
}

.ai-enhanced-notice .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #0c5460;
}

/* Read full article prompt */
.read-full-article {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    text-align: center;
}

.read-full-article p {
    margin-bottom: 15px;
    color: #6c757d;
}

.read-full-article .button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 20px;
    background: #007cba;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background 0.2s;
}

.read-full-article .button:hover {
    background: #005a87;
    color: white;
}

.read-full-article .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Article Content Text Formatting */
.article-full-content p,
.article-description p,
.article-summary p,
.recommendations-content p {
    margin-bottom: 1.5em;
    line-height: 1.7;
    color: #333;
}

.article-full-content p:last-child,
.article-description p:last-child,
.article-summary p:last-child,
.recommendations-content p:last-child {
    margin-bottom: 0;
}

/* Improve readability for article body */
.article-full-content {
    font-size: 1.05em;
    color: #2c3e50;
    text-align: left;
}

/* Handle line breaks properly */
.article-full-content br {
    display: block;
    margin: 0.75em 0;
    content: "";
}

/* Ensure proper paragraph spacing in scraped content */
.article-full-content p + p {
    margin-top: 1.5em;
}

/* Format recommendations with better spacing */
.recommendations-content {
    background: #f8f9fa;
    padding: 1.5em;
    border-radius: 8px;
    border-left: 4px solid #4285f4;
}

.recommendations-content p {
    margin-bottom: 1em;
}

.recommendations-content p:first-child {
    font-weight: 600;
}

/* Fix text visibility on dark backgrounds - v2.13.3 */
.breachfeed-article-detail,
.breachfeed-article-detail * {
    color: var(--bf-text-primary);
}

.breachfeed-article-detail .article-meta,
.breachfeed-article-detail .article-content p,
.breachfeed-article-detail .article-summary p,
.breachfeed-article-detail .article-description p,
.breachfeed-article-detail .article-full-content p {
    color: var(--bf-text-secondary);
}

/* Fix AI enhanced notice for dark theme */
.breachfeed-article-detail .ai-enhanced-notice {
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid var(--bf-accent);
    color: var(--bf-accent);
}

.breachfeed-article-detail .ai-enhanced-notice .dashicons {
    color: var(--bf-accent);
}

/* Fix read full article box for dark theme */
.breachfeed-article-detail .read-full-article {
    background: var(--bf-background);
    border: 1px solid var(--bf-border);
    color: var(--bf-text-secondary);
}

.breachfeed-article-detail .read-full-article p {
    color: var(--bf-text-secondary);
}

/* Ensure all text elements inherit proper colors */
.breachfeed-article-detail h1,
.breachfeed-article-detail h2,
.breachfeed-article-detail h3,
.breachfeed-article-detail h4,
.breachfeed-article-detail h5,
.breachfeed-article-detail h6 {
    color: var(--bf-text-primary);
}

/* Fix any remaining text visibility issues */
.breachfeed-article-detail span:not(.vote-icon):not(.dashicons),
.breachfeed-article-detail div:not(.ai-enhanced-notice),
.breachfeed-article-detail p {
    color: inherit;
}
