/* ThreatScope Modern Dashboard Styles */

/* Hero Header */
.hero-header {
    position: relative;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    border-radius: 20px;
    padding: 36px 40px;
    margin-bottom: 28px;
    overflow: hidden;
    color: #fff;
}

.hero-bg-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 60% 80%, rgba(168, 85, 247, 0.08) 0%, transparent 40%);
    background-size: 100% 100%;
    animation: patternShift 12s ease-in-out infinite alternate;
}

@keyframes patternShift {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

.hero-content {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    flex-wrap: nowrap;
}

.hero-left { flex: 1; }

.greeting-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    margin-bottom: 14px;
    backdrop-filter: blur(10px);
}

.hero-greeting h1 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.hero-greeting p {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    line-height: 1.6;
    max-width: 500px;
}

.hero-quick-stats {
    display: flex;
    gap: 0;
    margin-top: 28px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 18px 24px;
    backdrop-filter: blur(10px);
}

.quick-stat {
    flex: 1;
    text-align: center;
}

.quick-stat-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.quick-stat-label {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quick-stat-divider {
    width: 1px;
    background: rgba(255,255,255,0.12);
    margin: 0 6px;
}

.critical-text { color: #f87171; }
.warning-text { color: #fb923c; }
.kev-text { color: #38bdf8; }

/* Security Score Ring */
.hero-right {
    flex-shrink: 0;
}

.security-score-ring {
    position: relative;
    width: 150px;
    height: 150px;
}

.security-score-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ring-bg {
    fill: none;
    stroke: rgba(255,255,255,0.1);
    stroke-width: 8;
}

.ring-fill {
    fill: none;
    stroke: url(#scoreGradient);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 314;
    stroke-dashoffset: 314;
    transition: stroke-dashoffset 1.5s ease;
}

.score-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.score-value {
    font-size: 36px;
    font-weight: 700;
}

.score-label {
    font-size: 10px;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Section Header */
.section-header {
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1d29;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-header h2 i {
    color: #8b8e99;
    font-size: 14px;
}

/* Quick Actions Grid */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}

.action-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid #e8e9ed;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    cursor: pointer;
}

.action-card:hover {
    border-color: #c7c9d1;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.action-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.scanner-icon { background: #fff7ed; color: #ea580c; }
.threat-icon { background: #fef3c7; color: #d97706; }
.cve-icon { background: #fee2e2; color: #dc2626; }
.actor-icon { background: #ede9fe; color: #7c3aed; }
.map-icon { background: #d1fae5; color: #059669; }
.ioc-icon { background: #fce7f3; color: #db2777; }

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

.action-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}

.action-desc {
    font-size: 11px;
    color: #8b8e99;
}

.action-arrow {
    color: #d1d2d6;
    font-size: 11px;
    transition: transform 0.2s;
}

.action-card:hover .action-arrow {
    transform: translateX(3px);
    color: #8b8e99;
}

/* Modern Grid */
.modern-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 20px;
    align-items: start;
}

.modern-col-left,
.modern-col-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Modern Card */
.modern-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e8e9ed;
    padding: 22px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

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

.modern-card-title {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1a1d29;
}

.modern-card-title i {
    color: #8b8e99;
    font-size: 14px;
}

/* Severity Bars */
.severity-bars {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

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

.severity-label {
    font-size: 12px;
    font-weight: 500;
    color: #5a5d6b;
    width: 60px;
    flex-shrink: 0;
}

.severity-track {
    flex: 1;
    height: 10px;
    background: #f1f5f9;
    border-radius: 5px;
    overflow: hidden;
}

.severity-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 1s ease;
}

.critical-fill { background: linear-gradient(90deg, #ef4444, #dc2626); }
.high-fill { background: linear-gradient(90deg, #f97316, #ea580c); }
.medium-fill { background: linear-gradient(90deg, #eab308, #ca8a04); }
.low-fill { background: linear-gradient(90deg, #22c55e, #16a34a); }

.severity-count {
    font-size: 13px;
    font-weight: 600;
    color: #1a1d29;
    width: 40px;
    text-align: right;
}

/* AI Card */
.ai-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
}

.ai-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13px;
    resize: none;
    font-family: inherit;
    background: #fff;
    color: #1a1d29;
    transition: border-color 0.2s;
}

.ai-form textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.ai-form-footer {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.ai-form-footer select {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 12px;
    background: #fff;
    color: #5a5d6b;
}

.btn-gradient {
    padding: 9px 20px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-gradient:hover {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Small Button */
.btn-sm {
    padding: 5px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    color: #5a5d6b;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.btn-sm:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* Live Dot */
.live-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
    animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

.view-all-link {
    font-size: 12px;
    color: #f97316;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s;
}

.view-all-link:hover { gap: 8px; }

/* Modern Threat List */
.modern-threat-list {
    list-style: none;
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modern-threat-item {
    display: flex;
    gap: 12px;
    padding: 14px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid transparent;
    transition: all 0.15s;
}

.modern-threat-item:hover {
    border-color: #e2e8f0;
    background: #f1f5f9;
}

.threat-sev-dot {
    width: 4px;
    border-radius: 2px;
    flex-shrink: 0;
    align-self: stretch;
}

.threat-sev-dot.critical { background: #ef4444; }
.threat-sev-dot.high { background: #f97316; }
.threat-sev-dot.medium { background: #eab308; }

.threat-body { flex: 1; min-width: 0; }

.threat-body-title {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #1a1d29;
}

.threat-body-desc {
    font-size: 11px;
    color: #8b8e99;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.threat-tags {
    display: flex;
    gap: 8px;
    font-size: 10px;
    color: #94a3b8;
}

.threat-tags span {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* Attack Surface Stats */
.attack-surface-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.as-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: #f8fafc;
    border-radius: 10px;
}

.as-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #fff7ed;
    color: #ea580c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.as-value {
    font-size: 18px;
    font-weight: 700;
    color: #1a1d29;
}

.as-label {
    font-size: 11px;
    color: #8b8e99;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 30px;
    color: #8b8e99;
    font-size: 13px;
}

/* Briefing content styles */
#briefing-content .briefing-meta {
    font-size: 11px;
    color: #8b8e99;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

#briefing-content .briefing-badges {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

#briefing-content .briefing-badge {
    background: #f1f5f9;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

#briefing-content .briefing-text {
    font-size: 13px;
    line-height: 1.75;
    color: #475569;
    max-height: 350px;
    overflow-y: auto;
}

/* Feed card stretch */
.feed-card {
    flex: 1;
}

/* Responsive */
@media (max-width: 1200px) {
    .quick-actions-grid { grid-template-columns: repeat(2, 1fr); }
    .modern-grid { grid-template-columns: 1fr; }
    .hero-content { flex-direction: column; text-align: center; }
    .hero-greeting p { max-width: 100%; }
    .hero-quick-stats { justify-content: center; }
    .hero-right { margin-top: 10px; }
}

@media (max-width: 768px) {
    .quick-actions-grid { grid-template-columns: 1fr; }
    .hero-quick-stats { flex-wrap: wrap; }
    .hero-header { padding: 24px 20px; }
}
