Spaces:
Paused
Paused
dushyantsingh0 commited on
Commit ·
b83c98a
1
Parent(s): 7d79311
backend stabilization
Browse files
api/v1/reports.py
CHANGED
|
@@ -558,6 +558,13 @@ async def get_staff_performance(
|
|
| 558 |
now = datetime.utcnow()
|
| 559 |
since_30d = now - timedelta(days=30)
|
| 560 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 561 |
# Group by date(resolved_at) and resolver name
|
| 562 |
stmt = (
|
| 563 |
select(
|
|
@@ -593,8 +600,10 @@ async def get_staff_performance(
|
|
| 593 |
"timestamp": bucket_date.isoformat(),
|
| 594 |
"performance": day_map.get(bucket_date, {})
|
| 595 |
})
|
| 596 |
-
|
| 597 |
-
|
|
|
|
|
|
|
| 598 |
|
| 599 |
@router.get("/escalation-trends/", dependencies=[Depends(require_roles(ALL_SC_ROLES))])
|
| 600 |
async def get_escalation_assignee_trends(
|
|
@@ -611,6 +620,13 @@ async def get_escalation_assignee_trends(
|
|
| 611 |
now = datetime.utcnow()
|
| 612 |
since_30d = now - timedelta(days=30)
|
| 613 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 614 |
# Group by date(is_escalated) and assignee name
|
| 615 |
stmt = (
|
| 616 |
select(
|
|
@@ -646,8 +662,10 @@ async def get_escalation_assignee_trends(
|
|
| 646 |
"timestamp": bucket_date.isoformat(),
|
| 647 |
"escalations": day_map.get(bucket_date, {})
|
| 648 |
})
|
| 649 |
-
|
| 650 |
-
|
|
|
|
|
|
|
| 651 |
|
| 652 |
@router.get("/summary/", dependencies=[Depends(require_roles(EVERYBODY_ROLES))])
|
| 653 |
async def get_reports_summary(
|
|
@@ -656,6 +674,14 @@ async def get_reports_summary(
|
|
| 656 |
db: AsyncSession = Depends(get_db)
|
| 657 |
) -> Any:
|
| 658 |
"""Consolidated endpoint to fetch all dashboard reports in a single trip."""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 659 |
import asyncio
|
| 660 |
from core.database import async_session_factory
|
| 661 |
|
|
@@ -676,8 +702,6 @@ async def get_reports_summary(
|
|
| 676 |
try:
|
| 677 |
return await asyncio.wait_for(run_isolated(get_ai_service_insights, workspace_id, current_user), timeout=15.0)
|
| 678 |
except Exception as e:
|
| 679 |
-
from core.logging import get_logger
|
| 680 |
-
logger = get_logger(__name__)
|
| 681 |
logger.warning(f"Dashboard Hydration: Insights timeout or failure, providing fallback. Error: {str(e)}")
|
| 682 |
|
| 683 |
# Retrieve from UserWorkspace cache as fallback
|
|
@@ -685,9 +709,9 @@ async def get_reports_summary(
|
|
| 685 |
from sqlalchemy import select
|
| 686 |
try:
|
| 687 |
async with async_session_factory() as fallback_db:
|
| 688 |
-
|
| 689 |
from uuid import UUID
|
| 690 |
-
target_ws_uuid = UUID(
|
| 691 |
stmt = select(UserWorkspace).where(
|
| 692 |
UserWorkspace.user_id == current_user.id,
|
| 693 |
UserWorkspace.workspace_id == target_ws_uuid
|
|
@@ -722,4 +746,7 @@ async def get_reports_summary(
|
|
| 722 |
"escalations": results[6] if len(results) > 6 else None
|
| 723 |
}
|
| 724 |
|
|
|
|
|
|
|
|
|
|
| 725 |
return summary
|
|
|
|
| 558 |
now = datetime.utcnow()
|
| 559 |
since_30d = now - timedelta(days=30)
|
| 560 |
|
| 561 |
+
# 0. Cache lookup (5m TTL)
|
| 562 |
+
from core.cache import get_cached_object, set_cached_object
|
| 563 |
+
cache_key = f"reports:staff:{target_ws}"
|
| 564 |
+
cached_res = await get_cached_object(cache_key)
|
| 565 |
+
if cached_res:
|
| 566 |
+
return cached_res
|
| 567 |
+
|
| 568 |
# Group by date(resolved_at) and resolver name
|
| 569 |
stmt = (
|
| 570 |
select(
|
|
|
|
| 600 |
"timestamp": bucket_date.isoformat(),
|
| 601 |
"performance": day_map.get(bucket_date, {})
|
| 602 |
})
|
| 603 |
+
|
| 604 |
+
res_data = {"trend": buckets, "staff_names": list(all_names)}
|
| 605 |
+
await set_cached_object(cache_key, res_data, ttl=300)
|
| 606 |
+
return res_data
|
| 607 |
|
| 608 |
@router.get("/escalation-trends/", dependencies=[Depends(require_roles(ALL_SC_ROLES))])
|
| 609 |
async def get_escalation_assignee_trends(
|
|
|
|
| 620 |
now = datetime.utcnow()
|
| 621 |
since_30d = now - timedelta(days=30)
|
| 622 |
|
| 623 |
+
# 0. Cache lookup (5m TTL)
|
| 624 |
+
from core.cache import get_cached_object, set_cached_object
|
| 625 |
+
cache_key = f"reports:escalations:{target_ws}"
|
| 626 |
+
cached_res = await get_cached_object(cache_key)
|
| 627 |
+
if cached_res:
|
| 628 |
+
return cached_res
|
| 629 |
+
|
| 630 |
# Group by date(is_escalated) and assignee name
|
| 631 |
stmt = (
|
| 632 |
select(
|
|
|
|
| 662 |
"timestamp": bucket_date.isoformat(),
|
| 663 |
"escalations": day_map.get(bucket_date, {})
|
| 664 |
})
|
| 665 |
+
|
| 666 |
+
res_data = {"trend": buckets, "staff_names": list(all_names)}
|
| 667 |
+
await set_cached_object(cache_key, res_data, ttl=300)
|
| 668 |
+
return res_data
|
| 669 |
|
| 670 |
@router.get("/summary/", dependencies=[Depends(require_roles(EVERYBODY_ROLES))])
|
| 671 |
async def get_reports_summary(
|
|
|
|
| 674 |
db: AsyncSession = Depends(get_db)
|
| 675 |
) -> Any:
|
| 676 |
"""Consolidated endpoint to fetch all dashboard reports in a single trip."""
|
| 677 |
+
from core.cache import get_cached_object, set_cached_object
|
| 678 |
+
target_ws = workspace_id or str(current_user.workspace_id)
|
| 679 |
+
cache_key = f"reports:summary:{target_ws}:{current_user.role}"
|
| 680 |
+
|
| 681 |
+
cached_summary = await get_cached_object(cache_key)
|
| 682 |
+
if cached_summary:
|
| 683 |
+
return cached_summary
|
| 684 |
+
|
| 685 |
import asyncio
|
| 686 |
from core.database import async_session_factory
|
| 687 |
|
|
|
|
| 702 |
try:
|
| 703 |
return await asyncio.wait_for(run_isolated(get_ai_service_insights, workspace_id, current_user), timeout=15.0)
|
| 704 |
except Exception as e:
|
|
|
|
|
|
|
| 705 |
logger.warning(f"Dashboard Hydration: Insights timeout or failure, providing fallback. Error: {str(e)}")
|
| 706 |
|
| 707 |
# Retrieve from UserWorkspace cache as fallback
|
|
|
|
| 709 |
from sqlalchemy import select
|
| 710 |
try:
|
| 711 |
async with async_session_factory() as fallback_db:
|
| 712 |
+
target_ws_id = workspace_id or str(current_user.workspace_id)
|
| 713 |
from uuid import UUID
|
| 714 |
+
target_ws_uuid = UUID(target_ws_id) if isinstance(target_ws_id, str) else target_ws_id
|
| 715 |
stmt = select(UserWorkspace).where(
|
| 716 |
UserWorkspace.user_id == current_user.id,
|
| 717 |
UserWorkspace.workspace_id == target_ws_uuid
|
|
|
|
| 746 |
"escalations": results[6] if len(results) > 6 else None
|
| 747 |
}
|
| 748 |
|
| 749 |
+
# Store in cache (60s TTL for the consolidated summary)
|
| 750 |
+
await set_cached_object(cache_key, summary, ttl=60)
|
| 751 |
+
|
| 752 |
return summary
|
frontend/apps/customer/src/components/KnowledgeBase.module.css
CHANGED
|
@@ -1,42 +1,32 @@
|
|
| 1 |
-
/* Customer Portal KB
|
| 2 |
.container {
|
| 3 |
padding: 80px 64px;
|
| 4 |
color: var(--text-main);
|
| 5 |
-
background:
|
| 6 |
min-height: 100vh;
|
| 7 |
font-family: var(--font-sans);
|
| 8 |
position: relative;
|
| 9 |
overflow-x: hidden;
|
| 10 |
}
|
| 11 |
|
| 12 |
-
.container::before {
|
| 13 |
-
content: '';
|
| 14 |
-
position: absolute;
|
| 15 |
-
top: -200px;
|
| 16 |
-
right: -100px;
|
| 17 |
-
width: 600px;
|
| 18 |
-
height: 600px;
|
| 19 |
-
background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
|
| 20 |
-
opacity: 0.15;
|
| 21 |
-
filter: blur(80px);
|
| 22 |
-
pointer-events: none;
|
| 23 |
-
}
|
| 24 |
-
|
| 25 |
.searchHero {
|
| 26 |
-
margin-bottom:
|
| 27 |
text-align: center;
|
| 28 |
max-width: 1000px;
|
| 29 |
margin-inline: auto;
|
|
|
|
|
|
|
| 30 |
}
|
| 31 |
|
| 32 |
.searchHero h1 {
|
| 33 |
-
font-size:
|
| 34 |
font-weight: 900;
|
| 35 |
color: var(--text-main);
|
| 36 |
margin-bottom: 24px;
|
| 37 |
-
letter-spacing: -0.
|
| 38 |
font-family: var(--font-heading);
|
| 39 |
-
|
|
|
|
| 40 |
background-clip: text;
|
| 41 |
-webkit-background-clip: text;
|
| 42 |
-webkit-text-fill-color: transparent;
|
|
@@ -44,20 +34,20 @@
|
|
| 44 |
}
|
| 45 |
|
| 46 |
.description {
|
| 47 |
-
color:
|
| 48 |
-
font-size:
|
| 49 |
-
margin-bottom:
|
| 50 |
font-family: var(--font-sans);
|
| 51 |
font-weight: 500;
|
| 52 |
line-height: 1.6;
|
| 53 |
-
max-width:
|
| 54 |
margin-inline: auto;
|
| 55 |
}
|
| 56 |
|
| 57 |
.searchControls {
|
| 58 |
display: flex;
|
| 59 |
flex-direction: column;
|
| 60 |
-
gap:
|
| 61 |
align-items: center;
|
| 62 |
width: 100%;
|
| 63 |
}
|
|
@@ -65,132 +55,165 @@
|
|
| 65 |
.searchWrapper {
|
| 66 |
position: relative;
|
| 67 |
width: 100%;
|
| 68 |
-
max-width:
|
| 69 |
-
|
|
|
|
| 70 |
}
|
| 71 |
|
| 72 |
.searchInput {
|
| 73 |
width: 100%;
|
| 74 |
-
padding:
|
| 75 |
-
border-radius:
|
| 76 |
-
border:
|
| 77 |
-
font-size:
|
| 78 |
box-sizing: border-box;
|
| 79 |
outline: none;
|
| 80 |
-
background:
|
| 81 |
-
backdrop-filter: blur(20px);
|
| 82 |
color: var(--text-main);
|
| 83 |
-
transition: all 0.
|
| 84 |
font-family: var(--font-sans);
|
| 85 |
font-weight: 600;
|
| 86 |
}
|
| 87 |
|
| 88 |
.searchInput:focus {
|
| 89 |
border-color: var(--primary);
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
transform: translateY(-4px) scale(1.01);
|
| 93 |
}
|
| 94 |
|
| 95 |
.searchBtn {
|
| 96 |
position: absolute;
|
| 97 |
-
right:
|
| 98 |
top: 50%;
|
| 99 |
transform: translateY(-50%);
|
| 100 |
background: var(--primary);
|
| 101 |
-
color: #
|
| 102 |
border: none;
|
| 103 |
-
padding:
|
| 104 |
-
border-radius:
|
| 105 |
cursor: pointer;
|
| 106 |
-
font-size:
|
| 107 |
-
font-weight:
|
| 108 |
-
transition: all 0.
|
| 109 |
text-transform: uppercase;
|
| 110 |
-
letter-spacing: 0.
|
| 111 |
font-family: var(--font-heading);
|
| 112 |
-
box-shadow: 0 10px 20px var(--primary-glow);
|
| 113 |
}
|
| 114 |
|
| 115 |
.searchBtn:hover {
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
box-shadow: 0
|
| 119 |
}
|
| 120 |
|
| 121 |
.searchIcon {
|
| 122 |
position: absolute;
|
| 123 |
-
left:
|
| 124 |
top: 50%;
|
| 125 |
transform: translateY(-50%);
|
| 126 |
color: var(--primary);
|
| 127 |
-
opacity: 0.
|
| 128 |
}
|
| 129 |
|
| 130 |
.searchPulse {
|
| 131 |
position: absolute;
|
| 132 |
-
right:
|
| 133 |
top: 50%;
|
| 134 |
transform: translateY(-50%);
|
| 135 |
display: flex;
|
| 136 |
align-items: center;
|
| 137 |
gap: 12px;
|
| 138 |
-
font-size:
|
| 139 |
-
font-weight:
|
| 140 |
color: var(--primary);
|
| 141 |
-
animation: pulse 2s infinite;
|
| 142 |
font-family: var(--font-mono);
|
| 143 |
letter-spacing: 0.1em;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 144 |
}
|
| 145 |
|
| 146 |
-
@keyframes
|
| 147 |
-
0% { opacity: 0.
|
| 148 |
-
50% { opacity: 1;
|
| 149 |
-
100% { opacity: 0.
|
| 150 |
}
|
| 151 |
|
| 152 |
-
.
|
| 153 |
-
|
|
|
|
|
|
|
|
|
|
| 154 |
}
|
| 155 |
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
|
|
|
| 159 |
}
|
| 160 |
|
| 161 |
-
.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 162 |
display: flex;
|
| 163 |
-
gap: 48px;
|
| 164 |
align-items: center;
|
| 165 |
-
justify-content: center;
|
| 166 |
-
width: 100%;
|
| 167 |
}
|
| 168 |
|
| 169 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 170 |
.aiSpotlight {
|
| 171 |
max-width: 1100px;
|
| 172 |
margin: 0 auto 80px;
|
| 173 |
-
background:
|
| 174 |
-
|
| 175 |
-
border: 1px solid rgba(255,255,255,0.1);
|
| 176 |
border-radius: 40px;
|
| 177 |
-
padding:
|
| 178 |
position: relative;
|
| 179 |
-
box-shadow: 0 40px
|
| 180 |
overflow: hidden;
|
| 181 |
}
|
| 182 |
|
| 183 |
-
.aiSpotlight::
|
| 184 |
content: '';
|
| 185 |
position: absolute;
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
width:
|
| 189 |
-
height:
|
| 190 |
-
background: var(--primary
|
| 191 |
-
filter: blur(100px);
|
| 192 |
-
opacity: 0.1;
|
| 193 |
-
pointer-events: none;
|
| 194 |
}
|
| 195 |
|
| 196 |
.spotlightHeader {
|
|
@@ -204,351 +227,287 @@
|
|
| 204 |
display: flex;
|
| 205 |
align-items: center;
|
| 206 |
gap: 14px;
|
| 207 |
-
background:
|
| 208 |
padding: 12px 24px;
|
| 209 |
border-radius: 18px;
|
| 210 |
-
color:
|
| 211 |
font-size: 13px;
|
| 212 |
-
font-weight:
|
| 213 |
text-transform: uppercase;
|
| 214 |
-
letter-spacing: 0.
|
| 215 |
-
font-family: var(--font-heading);
|
| 216 |
-
border: 1px solid rgba(167, 139, 250, 0.2);
|
| 217 |
}
|
| 218 |
|
| 219 |
.syntheticFlag {
|
| 220 |
font-size: 11px;
|
| 221 |
-
font-weight:
|
| 222 |
-
color: #
|
| 223 |
-
background:
|
| 224 |
padding: 10px 20px;
|
| 225 |
border-radius: 12px;
|
| 226 |
font-family: var(--font-mono);
|
| 227 |
-
letter-spacing: 0.08em;
|
| 228 |
-
border: 1px solid rgba(16, 185, 129, 0.2);
|
| 229 |
}
|
| 230 |
|
| 231 |
.answerText {
|
| 232 |
font-size: 19px;
|
| 233 |
-
line-height:
|
| 234 |
-
color:
|
| 235 |
margin: 0;
|
| 236 |
font-family: var(--font-sans);
|
| 237 |
font-weight: 500;
|
| 238 |
}
|
| 239 |
|
| 240 |
-
.answerText strong {
|
| 241 |
-
color: var(--primary);
|
| 242 |
-
font-weight: 900;
|
| 243 |
-
}
|
| 244 |
-
|
| 245 |
.spotlightFooter {
|
| 246 |
margin-top: 40px;
|
| 247 |
padding-top: 32px;
|
| 248 |
-
border-top: 1px solid
|
| 249 |
font-size: 12px;
|
| 250 |
-
font-weight:
|
| 251 |
-
color:
|
| 252 |
text-transform: uppercase;
|
| 253 |
-
letter-spacing: 0.
|
| 254 |
-
|
| 255 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 256 |
}
|
| 257 |
|
| 258 |
-
/* Articles Grid */
|
| 259 |
.articlesGrid {
|
| 260 |
display: grid;
|
| 261 |
grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
|
| 262 |
gap: 40px;
|
| 263 |
-
|
| 264 |
-
margin: 0 auto;
|
| 265 |
}
|
| 266 |
|
| 267 |
.articleCard {
|
| 268 |
-
background:
|
| 269 |
-
border: 1px solid
|
| 270 |
-
border-radius:
|
| 271 |
-
padding:
|
| 272 |
cursor: pointer;
|
| 273 |
-
transition: all 0.
|
| 274 |
display: flex;
|
| 275 |
flex-direction: column;
|
| 276 |
height: 100%;
|
| 277 |
position: relative;
|
| 278 |
-
|
| 279 |
-
}
|
| 280 |
-
|
| 281 |
-
.articleCard::before {
|
| 282 |
-
content: '';
|
| 283 |
-
position: absolute;
|
| 284 |
-
top: 0;
|
| 285 |
-
left: 0;
|
| 286 |
-
width: 100%;
|
| 287 |
-
height: 100%;
|
| 288 |
-
background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 100%);
|
| 289 |
-
opacity: 0;
|
| 290 |
-
transition: opacity 0.5s ease;
|
| 291 |
}
|
| 292 |
|
| 293 |
.articleCard:hover {
|
| 294 |
-
transform: translateY(-
|
| 295 |
-
background: rgba(255, 255, 255, 0.04);
|
| 296 |
border-color: var(--primary);
|
| 297 |
-
box-shadow: 0 30px 60px rgba(0,0,0,0.
|
| 298 |
-
}
|
| 299 |
-
|
| 300 |
-
.articleCard:hover::before {
|
| 301 |
-
opacity: 1;
|
| 302 |
}
|
| 303 |
|
| 304 |
.cardHeader {
|
| 305 |
display: flex;
|
| 306 |
justify-content: space-between;
|
| 307 |
align-items: center;
|
| 308 |
-
margin-bottom:
|
| 309 |
-
position: relative;
|
| 310 |
-
z-index: 1;
|
| 311 |
}
|
| 312 |
|
| 313 |
.categoryBadge {
|
| 314 |
font-size: 11px;
|
| 315 |
-
font-weight:
|
| 316 |
color: var(--primary);
|
| 317 |
text-transform: uppercase;
|
| 318 |
-
letter-spacing: 0.
|
| 319 |
-
|
| 320 |
-
|
| 321 |
-
|
| 322 |
-
border-radius: 12px;
|
| 323 |
-
border: 1px solid rgba(255,255,255,0.05);
|
| 324 |
}
|
| 325 |
|
| 326 |
.matchBadge {
|
| 327 |
font-size: 11px;
|
| 328 |
-
font-weight:
|
| 329 |
-
padding:
|
| 330 |
-
border-radius:
|
| 331 |
font-family: var(--font-mono);
|
| 332 |
-
letter-spacing: 0.1em;
|
| 333 |
}
|
| 334 |
|
| 335 |
.highMatch {
|
| 336 |
-
color: #
|
| 337 |
-
background:
|
| 338 |
}
|
| 339 |
|
| 340 |
.regularMatch {
|
| 341 |
color: var(--primary);
|
| 342 |
-
background:
|
| 343 |
}
|
| 344 |
|
| 345 |
.articleTitle {
|
| 346 |
-
font-size:
|
| 347 |
-
font-weight:
|
| 348 |
-
color:
|
| 349 |
-
margin-bottom:
|
| 350 |
-
line-height: 1.
|
|
|
|
| 351 |
font-family: var(--font-heading);
|
| 352 |
-
letter-spacing: -0.02em;
|
| 353 |
-
position: relative;
|
| 354 |
-
z-index: 1;
|
| 355 |
}
|
| 356 |
|
| 357 |
.articleSnippet {
|
| 358 |
-
font-size:
|
| 359 |
-
color:
|
| 360 |
line-height: 1.8;
|
| 361 |
-
margin-bottom:
|
| 362 |
display: -webkit-box;
|
| 363 |
-webkit-line-clamp: 3;
|
| 364 |
line-clamp: 3;
|
| 365 |
-webkit-box-orient: vertical;
|
| 366 |
overflow: hidden;
|
| 367 |
-
font-
|
| 368 |
-
font-weight: 500;
|
| 369 |
-
opacity: 0.8;
|
| 370 |
-
position: relative;
|
| 371 |
-
z-index: 1;
|
| 372 |
}
|
| 373 |
|
| 374 |
.cardFooter {
|
| 375 |
display: flex;
|
| 376 |
justify-content: space-between;
|
| 377 |
align-items: center;
|
| 378 |
-
border-top: 1px solid
|
| 379 |
-
padding-top:
|
| 380 |
margin-top: auto;
|
| 381 |
-
position: relative;
|
| 382 |
-
z-index: 1;
|
| 383 |
}
|
| 384 |
|
| 385 |
.articleDate {
|
| 386 |
font-size: 12px;
|
| 387 |
-
color:
|
| 388 |
-
font-weight:
|
| 389 |
-
opacity: 0.5;
|
| 390 |
font-family: var(--font-mono);
|
| 391 |
text-transform: uppercase;
|
| 392 |
-
letter-spacing: 0.1em;
|
| 393 |
}
|
| 394 |
|
| 395 |
.readMore {
|
| 396 |
font-size: 14px;
|
| 397 |
-
font-weight:
|
| 398 |
color: var(--primary);
|
| 399 |
-
font-family: var(--font-heading);
|
| 400 |
text-transform: uppercase;
|
| 401 |
-
letter-spacing: 0.
|
| 402 |
display: flex;
|
| 403 |
align-items: center;
|
| 404 |
-
gap:
|
| 405 |
-
transition:
|
| 406 |
}
|
| 407 |
|
| 408 |
.articleCard:hover .readMore {
|
| 409 |
-
gap:
|
| 410 |
-
}
|
| 411 |
-
|
| 412 |
-
/* Category Select Dropdown */
|
| 413 |
-
.categorySelectWrapper {
|
| 414 |
-
display: flex;
|
| 415 |
-
align-items: center;
|
| 416 |
-
gap: 24px;
|
| 417 |
-
background: rgba(255,255,255,0.02);
|
| 418 |
-
padding: 12px 12px 12px 28px;
|
| 419 |
-
border-radius: 24px;
|
| 420 |
-
border: 1px solid rgba(255,255,255,0.05);
|
| 421 |
-
backdrop-filter: blur(20px);
|
| 422 |
}
|
| 423 |
|
| 424 |
-
|
| 425 |
-
|
| 426 |
-
|
| 427 |
-
|
| 428 |
-
|
| 429 |
-
font-family: var(--font-heading);
|
| 430 |
}
|
| 431 |
|
| 432 |
-
.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 433 |
position: relative;
|
| 434 |
-
display: flex;
|
| 435 |
-
align-items: center;
|
| 436 |
}
|
| 437 |
|
| 438 |
-
.
|
| 439 |
-
|
| 440 |
-
|
| 441 |
-
|
| 442 |
-
padding: 12px 56px 12px 24px;
|
| 443 |
-
border-radius: 18px;
|
| 444 |
-
font-size: 14px;
|
| 445 |
-
font-weight: 900;
|
| 446 |
-
color: var(--text-main);
|
| 447 |
-
cursor: pointer;
|
| 448 |
-
font-family: var(--font-heading);
|
| 449 |
-
letter-spacing: 0.1em;
|
| 450 |
-
transition: all 0.3s ease;
|
| 451 |
-
min-width: 260px;
|
| 452 |
}
|
| 453 |
|
| 454 |
-
.
|
| 455 |
-
|
| 456 |
-
|
|
|
|
|
|
|
| 457 |
}
|
| 458 |
|
| 459 |
-
.
|
| 460 |
-
|
| 461 |
-
|
| 462 |
-
|
| 463 |
-
|
| 464 |
-
|
|
|
|
|
|
|
|
|
|
| 465 |
}
|
| 466 |
|
| 467 |
-
|
| 468 |
-
|
| 469 |
-
|
| 470 |
-
|
| 471 |
-
|
|
|
|
|
|
|
| 472 |
}
|
| 473 |
|
| 474 |
-
.
|
| 475 |
-
|
| 476 |
-
|
| 477 |
-
|
| 478 |
-
|
| 479 |
-
border: 1px solid rgba(255, 255, 255, 0.05);
|
| 480 |
-
box-shadow: 0 50px 100px rgba(0,0,0,0.5);
|
| 481 |
-
margin-top: 48px;
|
| 482 |
}
|
| 483 |
|
| 484 |
.backBtn {
|
| 485 |
background: none;
|
| 486 |
border: none;
|
| 487 |
color: var(--primary);
|
| 488 |
-
font-weight:
|
| 489 |
font-size: 15px;
|
| 490 |
cursor: pointer;
|
| 491 |
-
margin-bottom:
|
| 492 |
display: flex;
|
| 493 |
align-items: center;
|
| 494 |
-
gap:
|
| 495 |
-
transition: all 0.
|
| 496 |
-
font-family: var(--font-heading);
|
| 497 |
text-transform: uppercase;
|
| 498 |
-
letter-spacing: 0.
|
| 499 |
}
|
| 500 |
|
| 501 |
.backBtn:hover {
|
| 502 |
-
transform: translateX(-
|
| 503 |
-
filter: brightness(1.2);
|
| 504 |
}
|
| 505 |
|
| 506 |
.markdownContent {
|
| 507 |
-
font-size:
|
| 508 |
-
line-height:
|
| 509 |
-
color:
|
| 510 |
-
font-
|
| 511 |
-
font-weight: 500;
|
| 512 |
}
|
| 513 |
|
| 514 |
.markdownContent h1, .markdownContent h2, .markdownContent h3 {
|
| 515 |
margin-top: 80px;
|
| 516 |
-
margin-bottom:
|
|
|
|
| 517 |
}
|
| 518 |
|
| 519 |
-
.markdownContent h1 { font-size:
|
| 520 |
-
.markdownContent h2 { font-size:
|
| 521 |
-
.markdownContent h3 { font-size:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 522 |
|
| 523 |
.loadingContainer {
|
| 524 |
display: flex;
|
| 525 |
flex-direction: column;
|
| 526 |
align-items: center;
|
| 527 |
justify-content: center;
|
| 528 |
-
padding:
|
| 529 |
-
gap:
|
| 530 |
}
|
| 531 |
|
| 532 |
.spinner {
|
| 533 |
-
width:
|
| 534 |
-
height:
|
| 535 |
-
border:
|
| 536 |
border-top-color: var(--primary);
|
| 537 |
border-radius: 50%;
|
| 538 |
-
animation: spin
|
| 539 |
}
|
| 540 |
|
| 541 |
@keyframes spin {
|
| 542 |
to { transform: rotate(360deg); }
|
| 543 |
}
|
| 544 |
-
|
| 545 |
-
.shimmerText {
|
| 546 |
-
animation: shimmer 2s infinite linear;
|
| 547 |
-
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
|
| 548 |
-
background-size: 200% 100%;
|
| 549 |
-
}
|
| 550 |
-
|
| 551 |
-
@keyframes shimmer {
|
| 552 |
-
0% { background-position: 200% 0; }
|
| 553 |
-
100% { background-position: -200% 0; }
|
| 554 |
-
}
|
|
|
|
| 1 |
+
/* Customer Portal KB - Solid Professional Enterprise Theme */
|
| 2 |
.container {
|
| 3 |
padding: 80px 64px;
|
| 4 |
color: var(--text-main);
|
| 5 |
+
background: #fbfcfe; /* Solid, crisp background */
|
| 6 |
min-height: 100vh;
|
| 7 |
font-family: var(--font-sans);
|
| 8 |
position: relative;
|
| 9 |
overflow-x: hidden;
|
| 10 |
}
|
| 11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
.searchHero {
|
| 13 |
+
margin-bottom: 100px;
|
| 14 |
text-align: center;
|
| 15 |
max-width: 1000px;
|
| 16 |
margin-inline: auto;
|
| 17 |
+
position: relative;
|
| 18 |
+
z-index: 10;
|
| 19 |
}
|
| 20 |
|
| 21 |
.searchHero h1 {
|
| 22 |
+
font-size: 84px;
|
| 23 |
font-weight: 900;
|
| 24 |
color: var(--text-main);
|
| 25 |
margin-bottom: 24px;
|
| 26 |
+
letter-spacing: -0.05em;
|
| 27 |
font-family: var(--font-heading);
|
| 28 |
+
line-height: 1.1;
|
| 29 |
+
background: linear-gradient(135deg, #0f172a 0%, var(--primary) 100%);
|
| 30 |
background-clip: text;
|
| 31 |
-webkit-background-clip: text;
|
| 32 |
-webkit-text-fill-color: transparent;
|
|
|
|
| 34 |
}
|
| 35 |
|
| 36 |
.description {
|
| 37 |
+
color: #64748b;
|
| 38 |
+
font-size: 22px;
|
| 39 |
+
margin-bottom: 80px;
|
| 40 |
font-family: var(--font-sans);
|
| 41 |
font-weight: 500;
|
| 42 |
line-height: 1.6;
|
| 43 |
+
max-width: 720px;
|
| 44 |
margin-inline: auto;
|
| 45 |
}
|
| 46 |
|
| 47 |
.searchControls {
|
| 48 |
display: flex;
|
| 49 |
flex-direction: column;
|
| 50 |
+
gap: 48px;
|
| 51 |
align-items: center;
|
| 52 |
width: 100%;
|
| 53 |
}
|
|
|
|
| 55 |
.searchWrapper {
|
| 56 |
position: relative;
|
| 57 |
width: 100%;
|
| 58 |
+
max-width: 880px;
|
| 59 |
+
box-shadow: 0 30px 60px rgba(0,0,0,0.04);
|
| 60 |
+
border-radius: 40px;
|
| 61 |
}
|
| 62 |
|
| 63 |
.searchInput {
|
| 64 |
width: 100%;
|
| 65 |
+
padding: 32px 200px 32px 88px;
|
| 66 |
+
border-radius: 40px;
|
| 67 |
+
border: 1px solid #e2e8f0;
|
| 68 |
+
font-size: 22px;
|
| 69 |
box-sizing: border-box;
|
| 70 |
outline: none;
|
| 71 |
+
background: #ffffff;
|
|
|
|
| 72 |
color: var(--text-main);
|
| 73 |
+
transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
|
| 74 |
font-family: var(--font-sans);
|
| 75 |
font-weight: 600;
|
| 76 |
}
|
| 77 |
|
| 78 |
.searchInput:focus {
|
| 79 |
border-color: var(--primary);
|
| 80 |
+
box-shadow: 0 0 0 1px var(--primary), 0 20px 40px rgba(0,0,0,0.06);
|
| 81 |
+
transform: translateY(-2px);
|
|
|
|
| 82 |
}
|
| 83 |
|
| 84 |
.searchBtn {
|
| 85 |
position: absolute;
|
| 86 |
+
right: 14px;
|
| 87 |
top: 50%;
|
| 88 |
transform: translateY(-50%);
|
| 89 |
background: var(--primary);
|
| 90 |
+
color: #ffffff !important;
|
| 91 |
border: none;
|
| 92 |
+
padding: 20px 48px;
|
| 93 |
+
border-radius: 30px;
|
| 94 |
cursor: pointer;
|
| 95 |
+
font-size: 16px;
|
| 96 |
+
font-weight: 800;
|
| 97 |
+
transition: all 0.2s ease;
|
| 98 |
text-transform: uppercase;
|
| 99 |
+
letter-spacing: 0.1em;
|
| 100 |
font-family: var(--font-heading);
|
|
|
|
| 101 |
}
|
| 102 |
|
| 103 |
.searchBtn:hover {
|
| 104 |
+
filter: brightness(1.05);
|
| 105 |
+
transform: translateY(-50%) translateY(-1px);
|
| 106 |
+
box-shadow: 0 10px 20px rgba(124, 58, 237, 0.2);
|
| 107 |
}
|
| 108 |
|
| 109 |
.searchIcon {
|
| 110 |
position: absolute;
|
| 111 |
+
left: 36px;
|
| 112 |
top: 50%;
|
| 113 |
transform: translateY(-50%);
|
| 114 |
color: var(--primary);
|
| 115 |
+
opacity: 0.8;
|
| 116 |
}
|
| 117 |
|
| 118 |
.searchPulse {
|
| 119 |
position: absolute;
|
| 120 |
+
right: 220px;
|
| 121 |
top: 50%;
|
| 122 |
transform: translateY(-50%);
|
| 123 |
display: flex;
|
| 124 |
align-items: center;
|
| 125 |
gap: 12px;
|
| 126 |
+
font-size: 11px;
|
| 127 |
+
font-weight: 800;
|
| 128 |
color: var(--primary);
|
|
|
|
| 129 |
font-family: var(--font-mono);
|
| 130 |
letter-spacing: 0.1em;
|
| 131 |
+
background: #f5f3ff;
|
| 132 |
+
padding: 8px 16px;
|
| 133 |
+
border-radius: 99px;
|
| 134 |
+
animation: pulseFade 2s infinite;
|
| 135 |
}
|
| 136 |
|
| 137 |
+
@keyframes pulseFade {
|
| 138 |
+
0% { opacity: 0.6; }
|
| 139 |
+
50% { opacity: 1; }
|
| 140 |
+
100% { opacity: 0.6; }
|
| 141 |
}
|
| 142 |
|
| 143 |
+
.filterBar {
|
| 144 |
+
display: flex;
|
| 145 |
+
gap: 40px;
|
| 146 |
+
justify-content: center;
|
| 147 |
+
align-items: center;
|
| 148 |
}
|
| 149 |
|
| 150 |
+
.categorySelectWrapper {
|
| 151 |
+
display: flex;
|
| 152 |
+
align-items: center;
|
| 153 |
+
gap: 16px;
|
| 154 |
}
|
| 155 |
|
| 156 |
+
.categoryLabel {
|
| 157 |
+
font-size: 12px;
|
| 158 |
+
font-weight: 800;
|
| 159 |
+
color: #94a3b8;
|
| 160 |
+
letter-spacing: 0.1em;
|
| 161 |
+
text-transform: uppercase;
|
| 162 |
+
}
|
| 163 |
+
|
| 164 |
+
.customSelect {
|
| 165 |
+
position: relative;
|
| 166 |
display: flex;
|
|
|
|
| 167 |
align-items: center;
|
|
|
|
|
|
|
| 168 |
}
|
| 169 |
|
| 170 |
+
.customSelect select {
|
| 171 |
+
appearance: none;
|
| 172 |
+
background: #ffffff;
|
| 173 |
+
border: 1px solid #e2e8f0;
|
| 174 |
+
padding: 12px 48px 12px 24px;
|
| 175 |
+
border-radius: 16px;
|
| 176 |
+
font-size: 13px;
|
| 177 |
+
font-weight: 700;
|
| 178 |
+
color: var(--text-main);
|
| 179 |
+
cursor: pointer;
|
| 180 |
+
transition: all 0.2s ease;
|
| 181 |
+
min-width: 240px;
|
| 182 |
+
font-family: var(--font-heading);
|
| 183 |
+
}
|
| 184 |
+
|
| 185 |
+
.customSelect select:hover {
|
| 186 |
+
border-color: #cbd5e1;
|
| 187 |
+
}
|
| 188 |
+
|
| 189 |
+
.selectIcon {
|
| 190 |
+
position: absolute;
|
| 191 |
+
right: 20px;
|
| 192 |
+
pointer-events: none;
|
| 193 |
+
color: var(--primary);
|
| 194 |
+
}
|
| 195 |
+
|
| 196 |
+
/* AI Answer Spotlight - Solid High Contrast */
|
| 197 |
.aiSpotlight {
|
| 198 |
max-width: 1100px;
|
| 199 |
margin: 0 auto 80px;
|
| 200 |
+
background: #ffffff;
|
| 201 |
+
border: 1px solid #e2e8f0;
|
|
|
|
| 202 |
border-radius: 40px;
|
| 203 |
+
padding: 64px;
|
| 204 |
position: relative;
|
| 205 |
+
box-shadow: 0 40px 100px rgba(0,0,0,0.03);
|
| 206 |
overflow: hidden;
|
| 207 |
}
|
| 208 |
|
| 209 |
+
.aiSpotlight::before {
|
| 210 |
content: '';
|
| 211 |
position: absolute;
|
| 212 |
+
top: 0;
|
| 213 |
+
left: 0;
|
| 214 |
+
width: 100%;
|
| 215 |
+
height: 4px;
|
| 216 |
+
background: var(--primary);
|
|
|
|
|
|
|
|
|
|
| 217 |
}
|
| 218 |
|
| 219 |
.spotlightHeader {
|
|
|
|
| 227 |
display: flex;
|
| 228 |
align-items: center;
|
| 229 |
gap: 14px;
|
| 230 |
+
background: #f5f3ff;
|
| 231 |
padding: 12px 24px;
|
| 232 |
border-radius: 18px;
|
| 233 |
+
color: var(--primary);
|
| 234 |
font-size: 13px;
|
| 235 |
+
font-weight: 800;
|
| 236 |
text-transform: uppercase;
|
| 237 |
+
letter-spacing: 0.1em;
|
|
|
|
|
|
|
| 238 |
}
|
| 239 |
|
| 240 |
.syntheticFlag {
|
| 241 |
font-size: 11px;
|
| 242 |
+
font-weight: 800;
|
| 243 |
+
color: #059669;
|
| 244 |
+
background: #ecfdf5;
|
| 245 |
padding: 10px 20px;
|
| 246 |
border-radius: 12px;
|
| 247 |
font-family: var(--font-mono);
|
|
|
|
|
|
|
| 248 |
}
|
| 249 |
|
| 250 |
.answerText {
|
| 251 |
font-size: 19px;
|
| 252 |
+
line-height: 1.8;
|
| 253 |
+
color: #1e293b;
|
| 254 |
margin: 0;
|
| 255 |
font-family: var(--font-sans);
|
| 256 |
font-weight: 500;
|
| 257 |
}
|
| 258 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 259 |
.spotlightFooter {
|
| 260 |
margin-top: 40px;
|
| 261 |
padding-top: 32px;
|
| 262 |
+
border-top: 1px solid #f1f5f9;
|
| 263 |
font-size: 12px;
|
| 264 |
+
font-weight: 700;
|
| 265 |
+
color: #94a3b8;
|
| 266 |
text-transform: uppercase;
|
| 267 |
+
letter-spacing: 0.1em;
|
| 268 |
+
}
|
| 269 |
+
|
| 270 |
+
/* Results Grid & Cards - Solid Material */
|
| 271 |
+
.resultsContainer {
|
| 272 |
+
max-width: 1400px;
|
| 273 |
+
margin: 0 auto;
|
| 274 |
}
|
| 275 |
|
|
|
|
| 276 |
.articlesGrid {
|
| 277 |
display: grid;
|
| 278 |
grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
|
| 279 |
gap: 40px;
|
| 280 |
+
margin-top: 64px;
|
|
|
|
| 281 |
}
|
| 282 |
|
| 283 |
.articleCard {
|
| 284 |
+
background: #ffffff;
|
| 285 |
+
border: 1px solid #e2e8f0;
|
| 286 |
+
border-radius: 40px;
|
| 287 |
+
padding: 56px;
|
| 288 |
cursor: pointer;
|
| 289 |
+
transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
|
| 290 |
display: flex;
|
| 291 |
flex-direction: column;
|
| 292 |
height: 100%;
|
| 293 |
position: relative;
|
| 294 |
+
box-shadow: 0 4px 12px rgba(0,0,0,0.02);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 295 |
}
|
| 296 |
|
| 297 |
.articleCard:hover {
|
| 298 |
+
transform: translateY(-8px);
|
|
|
|
| 299 |
border-color: var(--primary);
|
| 300 |
+
box-shadow: 0 30px 60px rgba(0,0,0,0.05);
|
|
|
|
|
|
|
|
|
|
|
|
|
| 301 |
}
|
| 302 |
|
| 303 |
.cardHeader {
|
| 304 |
display: flex;
|
| 305 |
justify-content: space-between;
|
| 306 |
align-items: center;
|
| 307 |
+
margin-bottom: 40px;
|
|
|
|
|
|
|
| 308 |
}
|
| 309 |
|
| 310 |
.categoryBadge {
|
| 311 |
font-size: 11px;
|
| 312 |
+
font-weight: 800;
|
| 313 |
color: var(--primary);
|
| 314 |
text-transform: uppercase;
|
| 315 |
+
letter-spacing: 0.1em;
|
| 316 |
+
background: #f5f3ff;
|
| 317 |
+
padding: 10px 20px;
|
| 318 |
+
border-radius: 14px;
|
|
|
|
|
|
|
| 319 |
}
|
| 320 |
|
| 321 |
.matchBadge {
|
| 322 |
font-size: 11px;
|
| 323 |
+
font-weight: 800;
|
| 324 |
+
padding: 10px 18px;
|
| 325 |
+
border-radius: 14px;
|
| 326 |
font-family: var(--font-mono);
|
|
|
|
| 327 |
}
|
| 328 |
|
| 329 |
.highMatch {
|
| 330 |
+
color: #059669;
|
| 331 |
+
background: #ecfdf5;
|
| 332 |
}
|
| 333 |
|
| 334 |
.regularMatch {
|
| 335 |
color: var(--primary);
|
| 336 |
+
background: #f5f3ff;
|
| 337 |
}
|
| 338 |
|
| 339 |
.articleTitle {
|
| 340 |
+
font-size: 30px;
|
| 341 |
+
font-weight: 800;
|
| 342 |
+
color: #0f172a;
|
| 343 |
+
margin-bottom: 24px;
|
| 344 |
+
line-height: 1.3;
|
| 345 |
+
letter-spacing: -0.03em;
|
| 346 |
font-family: var(--font-heading);
|
|
|
|
|
|
|
|
|
|
| 347 |
}
|
| 348 |
|
| 349 |
.articleSnippet {
|
| 350 |
+
font-size: 17px;
|
| 351 |
+
color: #475569;
|
| 352 |
line-height: 1.8;
|
| 353 |
+
margin-bottom: 48px;
|
| 354 |
display: -webkit-box;
|
| 355 |
-webkit-line-clamp: 3;
|
| 356 |
line-clamp: 3;
|
| 357 |
-webkit-box-orient: vertical;
|
| 358 |
overflow: hidden;
|
| 359 |
+
font-weight: 400;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 360 |
}
|
| 361 |
|
| 362 |
.cardFooter {
|
| 363 |
display: flex;
|
| 364 |
justify-content: space-between;
|
| 365 |
align-items: center;
|
| 366 |
+
border-top: 1px solid #f1f5f9;
|
| 367 |
+
padding-top: 40px;
|
| 368 |
margin-top: auto;
|
|
|
|
|
|
|
| 369 |
}
|
| 370 |
|
| 371 |
.articleDate {
|
| 372 |
font-size: 12px;
|
| 373 |
+
color: #94a3b8;
|
| 374 |
+
font-weight: 600;
|
|
|
|
| 375 |
font-family: var(--font-mono);
|
| 376 |
text-transform: uppercase;
|
|
|
|
| 377 |
}
|
| 378 |
|
| 379 |
.readMore {
|
| 380 |
font-size: 14px;
|
| 381 |
+
font-weight: 800;
|
| 382 |
color: var(--primary);
|
|
|
|
| 383 |
text-transform: uppercase;
|
| 384 |
+
letter-spacing: 0.05em;
|
| 385 |
display: flex;
|
| 386 |
align-items: center;
|
| 387 |
+
gap: 12px;
|
| 388 |
+
transition: all 0.2s ease;
|
| 389 |
}
|
| 390 |
|
| 391 |
.articleCard:hover .readMore {
|
| 392 |
+
gap: 18px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 393 |
}
|
| 394 |
|
| 395 |
+
/* Article View Enhancements - Zen Mode Solid */
|
| 396 |
+
.articleDetail {
|
| 397 |
+
padding: 80px;
|
| 398 |
+
max-width: 1400px;
|
| 399 |
+
margin: 0 auto;
|
|
|
|
| 400 |
}
|
| 401 |
|
| 402 |
+
.zenArticleContainer {
|
| 403 |
+
background: #ffffff;
|
| 404 |
+
border-radius: 64px;
|
| 405 |
+
padding: 120px;
|
| 406 |
+
border: 1px solid #e2e8f0;
|
| 407 |
+
box-shadow: 0 60px 120px rgba(0,0,0,0.04);
|
| 408 |
+
margin-top: 48px;
|
| 409 |
position: relative;
|
|
|
|
|
|
|
| 410 |
}
|
| 411 |
|
| 412 |
+
.articleHeader {
|
| 413 |
+
margin-bottom: 80px;
|
| 414 |
+
border-bottom: 1px solid #f1f5f9;
|
| 415 |
+
padding-bottom: 80px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 416 |
}
|
| 417 |
|
| 418 |
+
.articleMeta {
|
| 419 |
+
display: flex;
|
| 420 |
+
align-items: center;
|
| 421 |
+
gap: 32px;
|
| 422 |
+
margin-bottom: 40px;
|
| 423 |
}
|
| 424 |
|
| 425 |
+
.metaItem {
|
| 426 |
+
display: flex;
|
| 427 |
+
align-items: center;
|
| 428 |
+
gap: 12px;
|
| 429 |
+
font-size: 13px;
|
| 430 |
+
font-weight: 700;
|
| 431 |
+
color: #64748b;
|
| 432 |
+
text-transform: uppercase;
|
| 433 |
+
font-family: var(--font-mono);
|
| 434 |
}
|
| 435 |
|
| 436 |
+
.articleDetail h1 {
|
| 437 |
+
font-size: 64px;
|
| 438 |
+
font-weight: 900;
|
| 439 |
+
color: #0f172a;
|
| 440 |
+
line-height: 1.1;
|
| 441 |
+
letter-spacing: -0.04em;
|
| 442 |
+
margin-bottom: 40px;
|
| 443 |
}
|
| 444 |
|
| 445 |
+
.accentBar {
|
| 446 |
+
width: 120px;
|
| 447 |
+
height: 8px;
|
| 448 |
+
background: var(--primary);
|
| 449 |
+
border-radius: 4px;
|
|
|
|
|
|
|
|
|
|
| 450 |
}
|
| 451 |
|
| 452 |
.backBtn {
|
| 453 |
background: none;
|
| 454 |
border: none;
|
| 455 |
color: var(--primary);
|
| 456 |
+
font-weight: 800;
|
| 457 |
font-size: 15px;
|
| 458 |
cursor: pointer;
|
| 459 |
+
margin-bottom: 60px;
|
| 460 |
display: flex;
|
| 461 |
align-items: center;
|
| 462 |
+
gap: 16px;
|
| 463 |
+
transition: all 0.2s ease;
|
|
|
|
| 464 |
text-transform: uppercase;
|
| 465 |
+
letter-spacing: 0.1em;
|
| 466 |
}
|
| 467 |
|
| 468 |
.backBtn:hover {
|
| 469 |
+
transform: translateX(-8px);
|
|
|
|
| 470 |
}
|
| 471 |
|
| 472 |
.markdownContent {
|
| 473 |
+
font-size: 20px;
|
| 474 |
+
line-height: 1.9;
|
| 475 |
+
color: #334155;
|
| 476 |
+
font-weight: 400;
|
|
|
|
| 477 |
}
|
| 478 |
|
| 479 |
.markdownContent h1, .markdownContent h2, .markdownContent h3 {
|
| 480 |
margin-top: 80px;
|
| 481 |
+
margin-bottom: 40px;
|
| 482 |
+
color: #0f172a;
|
| 483 |
}
|
| 484 |
|
| 485 |
+
.markdownContent h1 { font-size: 52px; font-weight: 900; }
|
| 486 |
+
.markdownContent h2 { font-size: 38px; font-weight: 900; }
|
| 487 |
+
.markdownContent h3 { font-size: 30px; font-weight: 800; }
|
| 488 |
+
|
| 489 |
+
.markdownContent p {
|
| 490 |
+
margin-bottom: 40px;
|
| 491 |
+
}
|
| 492 |
|
| 493 |
.loadingContainer {
|
| 494 |
display: flex;
|
| 495 |
flex-direction: column;
|
| 496 |
align-items: center;
|
| 497 |
justify-content: center;
|
| 498 |
+
padding: 160px 0;
|
| 499 |
+
gap: 40px;
|
| 500 |
}
|
| 501 |
|
| 502 |
.spinner {
|
| 503 |
+
width: 72px;
|
| 504 |
+
height: 72px;
|
| 505 |
+
border: 6px solid #f1f5f9;
|
| 506 |
border-top-color: var(--primary);
|
| 507 |
border-radius: 50%;
|
| 508 |
+
animation: spin 0.8s linear infinite;
|
| 509 |
}
|
| 510 |
|
| 511 |
@keyframes spin {
|
| 512 |
to { transform: rotate(360deg); }
|
| 513 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
frontend/apps/customer/src/components/KnowledgeBase.tsx
CHANGED
|
@@ -124,28 +124,30 @@ export const KnowledgeBase: React.FC<KnowledgeBaseProps> = ({ onNewTicket }) =>
|
|
| 124 |
</button>
|
| 125 |
|
| 126 |
<div className={styles.zenArticleContainer}>
|
| 127 |
-
<header
|
| 128 |
-
<div
|
| 129 |
-
<
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
<
|
| 134 |
-
|
|
|
|
|
|
|
| 135 |
</div>
|
| 136 |
</div>
|
| 137 |
-
<h1
|
| 138 |
-
<div
|
| 139 |
</header>
|
| 140 |
|
| 141 |
{selectedArticle.summary && (
|
| 142 |
-
<div className={styles.aiSpotlight}
|
| 143 |
<div className={styles.spotlightHeader}>
|
| 144 |
<div className={styles.spotlightBadge}>
|
| 145 |
<Sparkles size={18} /> EXECUTIVE SUMMARY
|
| 146 |
</div>
|
| 147 |
</div>
|
| 148 |
-
<p
|
| 149 |
</div>
|
| 150 |
)}
|
| 151 |
|
|
@@ -354,18 +356,21 @@ export const KnowledgeBase: React.FC<KnowledgeBaseProps> = ({ onNewTicket }) =>
|
|
| 354 |
<span className={styles.categoryBadge}>{article.category?.toUpperCase() || 'GENERAL'}</span>
|
| 355 |
{article.score && (
|
| 356 |
<span className={`${styles.matchBadge} ${article.score > 80 ? styles.highMatch : styles.regularMatch}`}>
|
| 357 |
-
{Math.round(article.score)}%
|
| 358 |
</span>
|
| 359 |
)}
|
| 360 |
</div>
|
| 361 |
<h3 className={styles.articleTitle}>{article.title}</h3>
|
| 362 |
<div className={styles.articleSnippet}>
|
| 363 |
{article.snippet ? (
|
| 364 |
-
<span>
|
| 365 |
-
) : article.summary || article.content.replace(/[#*`]/g, '').slice(0,
|
| 366 |
</div>
|
| 367 |
<div className={styles.cardFooter}>
|
| 368 |
-
<span className={styles.articleDate}>
|
|
|
|
|
|
|
|
|
|
| 369 |
<span className={styles.readMore}>OPEN DOCUMENT <ArrowRight size={18} /></span>
|
| 370 |
</div>
|
| 371 |
</motion.div>
|
|
|
|
| 124 |
</button>
|
| 125 |
|
| 126 |
<div className={styles.zenArticleContainer}>
|
| 127 |
+
<header className={styles.articleHeader}>
|
| 128 |
+
<div className={styles.articleMeta}>
|
| 129 |
+
<div className={styles.metaItem}>
|
| 130 |
+
<span className={styles.categoryBadge}>{selectedArticle.category?.toUpperCase() || 'GENERAL'}</span>
|
| 131 |
+
</div>
|
| 132 |
+
<div className={styles.metaItem}>
|
| 133 |
+
<UserIcon size={16} /> <span>Nexus Intelligence Core</span>
|
| 134 |
+
</div>
|
| 135 |
+
<div className={styles.metaItem}>
|
| 136 |
+
<Clock size={16} /> <span>UPDATED: {new Date(selectedArticle.created_at).toLocaleDateString()}</span>
|
| 137 |
</div>
|
| 138 |
</div>
|
| 139 |
+
<h1>{selectedArticle.title}</h1>
|
| 140 |
+
<div className={styles.accentBar} />
|
| 141 |
</header>
|
| 142 |
|
| 143 |
{selectedArticle.summary && (
|
| 144 |
+
<div className={styles.aiSpotlight}>
|
| 145 |
<div className={styles.spotlightHeader}>
|
| 146 |
<div className={styles.spotlightBadge}>
|
| 147 |
<Sparkles size={18} /> EXECUTIVE SUMMARY
|
| 148 |
</div>
|
| 149 |
</div>
|
| 150 |
+
<p className={styles.answerText}>{selectedArticle.summary}</p>
|
| 151 |
</div>
|
| 152 |
)}
|
| 153 |
|
|
|
|
| 356 |
<span className={styles.categoryBadge}>{article.category?.toUpperCase() || 'GENERAL'}</span>
|
| 357 |
{article.score && (
|
| 358 |
<span className={`${styles.matchBadge} ${article.score > 80 ? styles.highMatch : styles.regularMatch}`}>
|
| 359 |
+
{Math.round(article.score)}% RELEVANCY
|
| 360 |
</span>
|
| 361 |
)}
|
| 362 |
</div>
|
| 363 |
<h3 className={styles.articleTitle}>{article.title}</h3>
|
| 364 |
<div className={styles.articleSnippet}>
|
| 365 |
{article.snippet ? (
|
| 366 |
+
<span>{article.snippet}</span>
|
| 367 |
+
) : article.summary || article.content.replace(/[#*`]/g, '').slice(0, 160) + '...'}
|
| 368 |
</div>
|
| 369 |
<div className={styles.cardFooter}>
|
| 370 |
+
<span className={styles.articleDate}>
|
| 371 |
+
<Clock size={12} style={{ marginRight: 6, verticalAlign: 'middle', opacity: 0.6 }} />
|
| 372 |
+
{new Date(article.created_at).toLocaleDateString()}
|
| 373 |
+
</span>
|
| 374 |
<span className={styles.readMore}>OPEN DOCUMENT <ArrowRight size={18} /></span>
|
| 375 |
</div>
|
| 376 |
</motion.div>
|
frontend/apps/customer/src/components/ThreadView.module.css
CHANGED
|
@@ -809,3 +809,105 @@
|
|
| 809 |
color: var(--text-dim);
|
| 810 |
line-height: 1.5;
|
| 811 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 809 |
color: var(--text-dim);
|
| 810 |
line-height: 1.5;
|
| 811 |
}
|
| 812 |
+
|
| 813 |
+
/* --- Resolution Section --- */
|
| 814 |
+
.resolutionCard {
|
| 815 |
+
background: #ffffff;
|
| 816 |
+
border: 1px solid var(--success);
|
| 817 |
+
border-radius: 24px;
|
| 818 |
+
padding: 48px;
|
| 819 |
+
margin-top: 48px;
|
| 820 |
+
position: relative;
|
| 821 |
+
overflow: hidden;
|
| 822 |
+
box-shadow: 0 20px 50px rgba(16, 185, 129, 0.08);
|
| 823 |
+
}
|
| 824 |
+
|
| 825 |
+
.resolutionHeader {
|
| 826 |
+
display: flex;
|
| 827 |
+
justify-content: space-between;
|
| 828 |
+
align-items: flex-start;
|
| 829 |
+
margin-bottom: 40px;
|
| 830 |
+
border-bottom: 1px solid rgba(16, 185, 129, 0.1);
|
| 831 |
+
padding-bottom: 32px;
|
| 832 |
+
}
|
| 833 |
+
|
| 834 |
+
.resolutionTitleArea {
|
| 835 |
+
display: flex;
|
| 836 |
+
align-items: center;
|
| 837 |
+
gap: 20px;
|
| 838 |
+
}
|
| 839 |
+
|
| 840 |
+
.resolutionIcon {
|
| 841 |
+
background: var(--success);
|
| 842 |
+
color: #fff;
|
| 843 |
+
width: 56px;
|
| 844 |
+
height: 56px;
|
| 845 |
+
border-radius: 18px;
|
| 846 |
+
display: flex;
|
| 847 |
+
align-items: center;
|
| 848 |
+
justify-content: center;
|
| 849 |
+
box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3);
|
| 850 |
+
flex-shrink: 0;
|
| 851 |
+
}
|
| 852 |
+
|
| 853 |
+
.resolutionTitleText h3 {
|
| 854 |
+
color: var(--success);
|
| 855 |
+
font-size: 16px;
|
| 856 |
+
font-weight: 900;
|
| 857 |
+
margin: 0 0 8px 0;
|
| 858 |
+
letter-spacing: 0.1em;
|
| 859 |
+
text-transform: uppercase;
|
| 860 |
+
}
|
| 861 |
+
|
| 862 |
+
.resolutionMeta {
|
| 863 |
+
display: flex;
|
| 864 |
+
gap: 16px;
|
| 865 |
+
font-size: 12px;
|
| 866 |
+
font-weight: 700;
|
| 867 |
+
color: var(--text-muted);
|
| 868 |
+
text-transform: uppercase;
|
| 869 |
+
opacity: 0.7;
|
| 870 |
+
}
|
| 871 |
+
|
| 872 |
+
.verifiedBadge {
|
| 873 |
+
background: var(--success);
|
| 874 |
+
color: #fff;
|
| 875 |
+
padding: 10px 24px;
|
| 876 |
+
border-radius: 14px;
|
| 877 |
+
font-size: 12px;
|
| 878 |
+
font-weight: 900;
|
| 879 |
+
letter-spacing: 0.05em;
|
| 880 |
+
box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
|
| 881 |
+
}
|
| 882 |
+
|
| 883 |
+
.resolutionContent {
|
| 884 |
+
font-size: 18px;
|
| 885 |
+
line-height: 1.9;
|
| 886 |
+
color: var(--text-main);
|
| 887 |
+
font-weight: 500;
|
| 888 |
+
position: relative;
|
| 889 |
+
z-index: 2;
|
| 890 |
+
}
|
| 891 |
+
|
| 892 |
+
.technicalAnnex {
|
| 893 |
+
margin-top: 40px;
|
| 894 |
+
padding: 32px;
|
| 895 |
+
background: #f8fafc;
|
| 896 |
+
border-radius: 20px;
|
| 897 |
+
border: 1px dashed rgba(16, 185, 129, 0.2);
|
| 898 |
+
}
|
| 899 |
+
|
| 900 |
+
.annexLabel {
|
| 901 |
+
font-weight: 900;
|
| 902 |
+
font-size: 11px;
|
| 903 |
+
color: #64748b;
|
| 904 |
+
margin-bottom: 12px;
|
| 905 |
+
text-transform: uppercase;
|
| 906 |
+
letter-spacing: 0.15em;
|
| 907 |
+
}
|
| 908 |
+
|
| 909 |
+
.annexContent {
|
| 910 |
+
font-size: 14px;
|
| 911 |
+
color: #475569;
|
| 912 |
+
line-height: 1.7;
|
| 913 |
+
}
|
frontend/apps/customer/src/components/ThreadView.tsx
CHANGED
|
@@ -582,44 +582,37 @@ export const ThreadView: React.FC<ThreadViewProps> = ({ ticket: initialTicket, o
|
|
| 582 |
</div>
|
| 583 |
|
| 584 |
{(['RESOLVED', 'CLOSED'].includes((ticket.status || '').toUpperCase()) || ticket.resolution_text || ticket.summary) && (
|
| 585 |
-
<div className={
|
| 586 |
-
|
| 587 |
-
|
| 588 |
-
marginTop: "40px",
|
| 589 |
-
background: "rgba(16, 185, 129, 0.03)",
|
| 590 |
-
borderRadius: 24,
|
| 591 |
-
boxShadow: '0 20px 40px rgba(16, 185, 129, 0.05)',
|
| 592 |
-
position: 'relative',
|
| 593 |
-
overflow: 'hidden'
|
| 594 |
-
}}>
|
| 595 |
-
<div style={{ position: 'absolute', top: 0, right: 0, padding: '20px', opacity: 0.05 }}>
|
| 596 |
-
<ShieldCheck size={120} color="var(--success)" />
|
| 597 |
</div>
|
| 598 |
|
| 599 |
-
<div
|
| 600 |
-
<div
|
| 601 |
-
<div
|
| 602 |
-
<ShieldCheck size={
|
| 603 |
</div>
|
| 604 |
-
<div>
|
| 605 |
-
<h3
|
| 606 |
-
<div className=
|
| 607 |
<span>BY: {ticket.resolved_by_name?.toUpperCase() || 'NEXUS CORE'}</span>
|
| 608 |
{ticket.resolved_at && <span>• {new Date(ticket.resolved_at).toLocaleString().toUpperCase()}</span>}
|
| 609 |
</div>
|
| 610 |
</div>
|
| 611 |
</div>
|
| 612 |
-
<div
|
| 613 |
</div>
|
| 614 |
|
| 615 |
-
<div
|
| 616 |
<NexusMarkdown content={ticket.summary || ticket.resolution_text || "This incident has been formally documented and resolved by our specialist team. No further action is required at this time."} />
|
| 617 |
</div>
|
| 618 |
|
| 619 |
{!ticket.summary && ticket.resolution_text && (
|
| 620 |
-
<div
|
| 621 |
-
<div
|
| 622 |
-
{
|
|
|
|
|
|
|
| 623 |
</div>
|
| 624 |
)}
|
| 625 |
</div>
|
|
|
|
| 582 |
</div>
|
| 583 |
|
| 584 |
{(['RESOLVED', 'CLOSED'].includes((ticket.status || '').toUpperCase()) || ticket.resolution_text || ticket.summary) && (
|
| 585 |
+
<div className={styles.resolutionCard}>
|
| 586 |
+
<div style={{ position: 'absolute', top: -20, right: -20, opacity: 0.03, pointerEvents: 'none' }}>
|
| 587 |
+
<ShieldCheck size={280} color="var(--success)" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 588 |
</div>
|
| 589 |
|
| 590 |
+
<div className={styles.resolutionHeader}>
|
| 591 |
+
<div className={styles.resolutionTitleArea}>
|
| 592 |
+
<div className={styles.resolutionIcon}>
|
| 593 |
+
<ShieldCheck size={28} />
|
| 594 |
</div>
|
| 595 |
+
<div className={styles.resolutionTitleText}>
|
| 596 |
+
<h3>Incident Resolution Report</h3>
|
| 597 |
+
<div className={styles.resolutionMeta}>
|
| 598 |
<span>BY: {ticket.resolved_by_name?.toUpperCase() || 'NEXUS CORE'}</span>
|
| 599 |
{ticket.resolved_at && <span>• {new Date(ticket.resolved_at).toLocaleString().toUpperCase()}</span>}
|
| 600 |
</div>
|
| 601 |
</div>
|
| 602 |
</div>
|
| 603 |
+
<div className={styles.verifiedBadge}>VERIFIED</div>
|
| 604 |
</div>
|
| 605 |
|
| 606 |
+
<div className={styles.resolutionContent}>
|
| 607 |
<NexusMarkdown content={ticket.summary || ticket.resolution_text || "This incident has been formally documented and resolved by our specialist team. No further action is required at this time."} />
|
| 608 |
</div>
|
| 609 |
|
| 610 |
{!ticket.summary && ticket.resolution_text && (
|
| 611 |
+
<div className={styles.technicalAnnex}>
|
| 612 |
+
<div className={styles.annexLabel}>Technical Annex</div>
|
| 613 |
+
<div className={styles.annexContent}>
|
| 614 |
+
{ticket.resolution_text}
|
| 615 |
+
</div>
|
| 616 |
</div>
|
| 617 |
)}
|
| 618 |
</div>
|