Spaces:
Sleeping
Sleeping
Upload 13 files
Browse files- src/apps/templates/Judgechatbot.html +501 -61
- src/apps/templates/advocatechatbot.html +494 -49
- src/apps/templates/advocatedashboard.html +22 -0
- src/apps/templates/citizen.html +254 -37
- src/apps/templates/judgedashboard.html +4 -0
- src/apps/templates/legalrights.html +320 -186
- src/apps/templates/minor.html +490 -48
- src/apps/templates/roleselection.html +172 -35
- src/apps/templates/safetytips.html +326 -186
- src/apps/templates/studentchatbot.html +473 -57
- src/apps/templates/studentdashboard.html +4 -0
- src/apps/templates/woman.html +32 -6
- src/apps/templates/womanchatbot.html +255 -28
src/apps/templates/Judgechatbot.html
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
<title>AI Legal Assistant | Judicial Deliberation System</title>
|
| 7 |
-
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap"
|
|
|
|
| 8 |
<style>
|
| 9 |
:root {
|
| 10 |
--bg-dark: #030617;
|
|
@@ -18,7 +20,9 @@
|
|
| 18 |
}
|
| 19 |
|
| 20 |
* {
|
| 21 |
-
margin: 0;
|
|
|
|
|
|
|
| 22 |
font-family: 'Poppins', sans-serif;
|
| 23 |
}
|
| 24 |
|
|
@@ -35,64 +39,253 @@
|
|
| 35 |
width: 300px;
|
| 36 |
background: var(--sidebar-bg);
|
| 37 |
border-right: 1px solid var(--glass-border);
|
| 38 |
-
display: flex;
|
|
|
|
| 39 |
z-index: 100;
|
| 40 |
}
|
| 41 |
|
| 42 |
-
.sidebar-header {
|
|
|
|
|
|
|
| 43 |
|
| 44 |
.new-chat-btn {
|
| 45 |
-
width: 100%;
|
|
|
|
| 46 |
background: linear-gradient(135deg, var(--accent-gold), #d97706);
|
| 47 |
-
border: none;
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
box-shadow: 0 10px 20px rgba(251, 191, 36, 0.15);
|
| 52 |
}
|
| 53 |
|
| 54 |
-
.new-chat-btn:hover {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
|
| 56 |
-
.history-label { padding: 0 25px 10px; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 2.5px; color: var(--text-dim); font-weight: 700; opacity: 0.8; }
|
| 57 |
-
.history-list { flex: 1; overflow-y: auto; padding: 15px; }
|
| 58 |
.history-item {
|
| 59 |
-
padding: 14px 18px;
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
}
|
| 64 |
-
.history-item:hover { background: rgba(251, 191, 36, 0.05); color: var(--accent-gold); border-color: rgba(251, 191, 36, 0.2); }
|
| 65 |
|
| 66 |
-
.
|
| 67 |
-
|
| 68 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
|
| 70 |
/* MAIN AREA */
|
| 71 |
-
.main-chat {
|
| 72 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
.top-bar {
|
| 74 |
-
height: 80px;
|
|
|
|
|
|
|
| 75 |
border-bottom: 1px solid var(--glass-border);
|
| 76 |
-
display: flex;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
}
|
| 78 |
|
| 79 |
-
.branding-title {
|
| 80 |
-
|
| 81 |
-
|
|
|
|
|
|
|
|
|
|
| 82 |
|
| 83 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
|
| 85 |
-
.
|
| 86 |
-
|
| 87 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
|
| 89 |
-
.
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
.ai-msg li
|
| 95 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
|
| 97 |
.typing {
|
| 98 |
display: flex;
|
|
@@ -128,31 +321,235 @@
|
|
| 128 |
animation: typing-blink 1.4s infinite ease-in-out;
|
| 129 |
}
|
| 130 |
|
| 131 |
-
.typing-dots span:nth-child(2) {
|
| 132 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 133 |
|
| 134 |
@keyframes typing-blink {
|
| 135 |
-
|
| 136 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 137 |
}
|
| 138 |
|
| 139 |
@keyframes pulse-border-gold {
|
| 140 |
-
|
| 141 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 142 |
}
|
| 143 |
|
| 144 |
-
.input-area {
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 150 |
|
| 151 |
-
.
|
| 152 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 153 |
</style>
|
| 154 |
</head>
|
|
|
|
| 155 |
<body>
|
|
|
|
| 156 |
<aside class="sidebar">
|
| 157 |
<div class="sidebar-header">
|
| 158 |
<button class="new-chat-btn" id="newChatBtn"><span>🏛️</span> New Deliberation</button>
|
|
@@ -168,25 +565,36 @@
|
|
| 168 |
</div>
|
| 169 |
</div>
|
| 170 |
<div style="display: flex; flex-direction: column; gap: 10px; margin-top: 20px;">
|
| 171 |
-
<a href="/judgedashboard.html"
|
| 172 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 173 |
</div>
|
| 174 |
</div>
|
| 175 |
</aside>
|
| 176 |
|
| 177 |
<main class="main-chat">
|
| 178 |
<header class="top-bar">
|
|
|
|
| 179 |
<div class="system-branding">
|
| 180 |
<span class="branding-title">🏛️ Judicial Intelligence System</span>
|
| 181 |
-
<div class="status-pill">
|
|
|
|
|
|
|
| 182 |
</div>
|
| 183 |
-
<div style="font-size: 0.85rem; color: var(--text-dim); font-weight: 600; letter-spacing: 1px;">JUDICIAL
|
|
|
|
| 184 |
</header>
|
| 185 |
|
| 186 |
-
<div id="welcomeScreen"
|
|
|
|
| 187 |
<div style="font-size: 5rem; margin-bottom: 30px; animation: float 8s ease-in-out infinite;">⚖️</div>
|
| 188 |
-
<h1 style="font-size: 3.2rem; font-weight: 800; margin-bottom: 15px; letter-spacing: -1.5px;">Protocol
|
| 189 |
-
|
|
|
|
|
|
|
| 190 |
</div>
|
| 191 |
|
| 192 |
<div class="messages-container" id="chatContainer"></div>
|
|
@@ -201,10 +609,16 @@
|
|
| 201 |
<div class="input-box">
|
| 202 |
<input type="text" id="messageInput" placeholder="Initiate legal inquiry..." autocomplete="off">
|
| 203 |
<button class="send-btn" id="sendButton">
|
| 204 |
-
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 205 |
</button>
|
| 206 |
</div>
|
| 207 |
-
<p
|
|
|
|
|
|
|
| 208 |
</div>
|
| 209 |
</main>
|
| 210 |
|
|
@@ -331,6 +745,12 @@
|
|
| 331 |
createNewMessage('ai', msg.response);
|
| 332 |
});
|
| 333 |
currentAiMessageElement = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 334 |
} catch (err) { console.error(err); }
|
| 335 |
}
|
| 336 |
|
|
@@ -353,11 +773,31 @@
|
|
| 353 |
currentCaseId = crypto.randomUUID();
|
| 354 |
chatContainer.innerHTML = '';
|
| 355 |
welcomeScreen.classList.remove('hidden');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 356 |
};
|
| 357 |
|
| 358 |
connectWS();
|
| 359 |
loadHistory();
|
| 360 |
fetchUserStatus();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 361 |
</script>
|
| 362 |
</body>
|
|
|
|
| 363 |
</html>
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
| 3 |
+
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8">
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 7 |
<title>AI Legal Assistant | Judicial Deliberation System</title>
|
| 8 |
+
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap"
|
| 9 |
+
rel="stylesheet">
|
| 10 |
<style>
|
| 11 |
:root {
|
| 12 |
--bg-dark: #030617;
|
|
|
|
| 20 |
}
|
| 21 |
|
| 22 |
* {
|
| 23 |
+
margin: 0;
|
| 24 |
+
padding: 0;
|
| 25 |
+
box-sizing: border-box;
|
| 26 |
font-family: 'Poppins', sans-serif;
|
| 27 |
}
|
| 28 |
|
|
|
|
| 39 |
width: 300px;
|
| 40 |
background: var(--sidebar-bg);
|
| 41 |
border-right: 1px solid var(--glass-border);
|
| 42 |
+
display: flex;
|
| 43 |
+
flex-direction: column;
|
| 44 |
z-index: 100;
|
| 45 |
}
|
| 46 |
|
| 47 |
+
.sidebar-header {
|
| 48 |
+
padding: 40px 25px;
|
| 49 |
+
}
|
| 50 |
|
| 51 |
.new-chat-btn {
|
| 52 |
+
width: 100%;
|
| 53 |
+
padding: 16px;
|
| 54 |
background: linear-gradient(135deg, var(--accent-gold), #d97706);
|
| 55 |
+
border: none;
|
| 56 |
+
border-radius: 12px;
|
| 57 |
+
color: #030617;
|
| 58 |
+
font-weight: 700;
|
| 59 |
+
display: flex;
|
| 60 |
+
align-items: center;
|
| 61 |
+
justify-content: center;
|
| 62 |
+
gap: 10px;
|
| 63 |
+
cursor: pointer;
|
| 64 |
+
transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
| 65 |
box-shadow: 0 10px 20px rgba(251, 191, 36, 0.15);
|
| 66 |
}
|
| 67 |
|
| 68 |
+
.new-chat-btn:hover {
|
| 69 |
+
transform: translateY(-3px);
|
| 70 |
+
box-shadow: 0 15px 30px rgba(251, 191, 36, 0.25);
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
.history-label {
|
| 74 |
+
padding: 0 25px 10px;
|
| 75 |
+
font-size: 0.7rem;
|
| 76 |
+
text-transform: uppercase;
|
| 77 |
+
letter-spacing: 2.5px;
|
| 78 |
+
color: var(--text-dim);
|
| 79 |
+
font-weight: 700;
|
| 80 |
+
opacity: 0.8;
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
.history-list {
|
| 84 |
+
flex: 1;
|
| 85 |
+
overflow-y: auto;
|
| 86 |
+
padding: 15px;
|
| 87 |
+
}
|
| 88 |
|
|
|
|
|
|
|
| 89 |
.history-item {
|
| 90 |
+
padding: 14px 18px;
|
| 91 |
+
border-radius: 10px;
|
| 92 |
+
margin-bottom: 8px;
|
| 93 |
+
cursor: pointer;
|
| 94 |
+
transition: 0.2s;
|
| 95 |
+
font-size: 0.9rem;
|
| 96 |
+
color: var(--text-dim);
|
| 97 |
+
display: flex;
|
| 98 |
+
align-items: center;
|
| 99 |
+
gap: 12px;
|
| 100 |
+
border: 1px solid transparent;
|
| 101 |
+
white-space: nowrap;
|
| 102 |
+
overflow: hidden;
|
| 103 |
+
text-overflow: ellipsis;
|
| 104 |
}
|
|
|
|
| 105 |
|
| 106 |
+
.history-item:hover {
|
| 107 |
+
background: rgba(251, 191, 36, 0.05);
|
| 108 |
+
color: var(--accent-gold);
|
| 109 |
+
border-color: rgba(251, 191, 36, 0.2);
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
.sidebar-footer {
|
| 113 |
+
padding: 25px;
|
| 114 |
+
border-top: 1px solid var(--glass-border);
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
.user-badge {
|
| 118 |
+
display: flex;
|
| 119 |
+
align-items: center;
|
| 120 |
+
gap: 15px;
|
| 121 |
+
padding: 12px;
|
| 122 |
+
background: rgba(251, 191, 36, 0.05);
|
| 123 |
+
border-radius: 14px;
|
| 124 |
+
border: 1px solid rgba(251, 191, 36, 0.1);
|
| 125 |
+
}
|
| 126 |
+
|
| 127 |
+
.user-avatar {
|
| 128 |
+
width: 36px;
|
| 129 |
+
height: 36px;
|
| 130 |
+
background: var(--accent-gold);
|
| 131 |
+
border-radius: 10px;
|
| 132 |
+
display: flex;
|
| 133 |
+
align-items: center;
|
| 134 |
+
justify-content: center;
|
| 135 |
+
font-weight: 800;
|
| 136 |
+
color: #030617;
|
| 137 |
+
font-size: 0.9rem;
|
| 138 |
+
}
|
| 139 |
|
| 140 |
/* MAIN AREA */
|
| 141 |
+
.main-chat {
|
| 142 |
+
flex: 1;
|
| 143 |
+
display: flex;
|
| 144 |
+
flex-direction: column;
|
| 145 |
+
position: relative;
|
| 146 |
+
background: radial-gradient(circle at top right, rgba(251, 191, 36, 0.02), transparent);
|
| 147 |
+
}
|
| 148 |
+
|
| 149 |
.top-bar {
|
| 150 |
+
height: 80px;
|
| 151 |
+
background: rgba(3, 6, 23, 0.85);
|
| 152 |
+
backdrop-filter: blur(25px);
|
| 153 |
border-bottom: 1px solid var(--glass-border);
|
| 154 |
+
display: flex;
|
| 155 |
+
align-items: center;
|
| 156 |
+
justify-content: space-between;
|
| 157 |
+
padding: 0 45px;
|
| 158 |
+
z-index: 50;
|
| 159 |
}
|
| 160 |
|
| 161 |
+
.branding-title {
|
| 162 |
+
font-weight: 700;
|
| 163 |
+
color: white;
|
| 164 |
+
letter-spacing: -0.5px;
|
| 165 |
+
font-size: 1.1rem;
|
| 166 |
+
}
|
| 167 |
|
| 168 |
+
.status-pill {
|
| 169 |
+
display: flex;
|
| 170 |
+
align-items: center;
|
| 171 |
+
gap: 10px;
|
| 172 |
+
font-size: 0.75rem;
|
| 173 |
+
background: rgba(251, 191, 36, 0.1);
|
| 174 |
+
color: var(--accent-gold);
|
| 175 |
+
padding: 5px 15px;
|
| 176 |
+
border-radius: 20px;
|
| 177 |
+
font-weight: 700;
|
| 178 |
+
border: 1px solid rgba(251, 191, 36, 0.2);
|
| 179 |
+
}
|
| 180 |
|
| 181 |
+
.status-dot {
|
| 182 |
+
width: 7px;
|
| 183 |
+
height: 7px;
|
| 184 |
+
background: var(--accent-gold);
|
| 185 |
+
border-radius: 50%;
|
| 186 |
+
animation: pulse-dot 2s infinite;
|
| 187 |
+
}
|
| 188 |
+
|
| 189 |
+
@keyframes pulse-dot {
|
| 190 |
+
|
| 191 |
+
0%,
|
| 192 |
+
100% {
|
| 193 |
+
transform: scale(1);
|
| 194 |
+
opacity: 1;
|
| 195 |
+
}
|
| 196 |
+
|
| 197 |
+
50% {
|
| 198 |
+
transform: scale(1.6);
|
| 199 |
+
opacity: 0.3;
|
| 200 |
+
}
|
| 201 |
+
}
|
| 202 |
+
|
| 203 |
+
.messages-container {
|
| 204 |
+
flex: 1;
|
| 205 |
+
overflow-y: auto;
|
| 206 |
+
padding: 50px 12%;
|
| 207 |
+
display: flex;
|
| 208 |
+
flex-direction: column;
|
| 209 |
+
gap: 40px;
|
| 210 |
+
scroll-behavior: smooth;
|
| 211 |
+
}
|
| 212 |
+
|
| 213 |
+
.message {
|
| 214 |
+
max-width: 900px;
|
| 215 |
+
animation: message-slide 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
|
| 216 |
+
}
|
| 217 |
+
|
| 218 |
+
@keyframes message-slide {
|
| 219 |
+
from {
|
| 220 |
+
opacity: 0;
|
| 221 |
+
transform: translateY(25px);
|
| 222 |
+
}
|
| 223 |
+
|
| 224 |
+
to {
|
| 225 |
+
opacity: 1;
|
| 226 |
+
transform: translateY(0);
|
| 227 |
+
}
|
| 228 |
+
}
|
| 229 |
+
|
| 230 |
+
.user-msg {
|
| 231 |
+
align-self: flex-end;
|
| 232 |
+
background: linear-gradient(135deg, var(--accent-gold), #d97706);
|
| 233 |
+
padding: 18px 26px;
|
| 234 |
+
border-radius: 22px 22px 4px 22px;
|
| 235 |
+
color: #030617;
|
| 236 |
+
font-weight: 500;
|
| 237 |
+
max-width: 70%;
|
| 238 |
+
box-shadow: 0 10px 30px rgba(251, 191, 36, 0.2);
|
| 239 |
+
}
|
| 240 |
+
|
| 241 |
+
.ai-msg {
|
| 242 |
+
align-self: flex-start;
|
| 243 |
+
background: rgba(255, 255, 255, 0.02);
|
| 244 |
+
border: 1px solid var(--glass-border);
|
| 245 |
+
padding: 35px;
|
| 246 |
+
border-radius: 24px 24px 24px 6px;
|
| 247 |
+
max-width: 88%;
|
| 248 |
+
line-height: 1.9;
|
| 249 |
+
color: #e2e8f0;
|
| 250 |
+
}
|
| 251 |
+
|
| 252 |
+
.ai-msg h3 {
|
| 253 |
+
color: var(--accent-gold);
|
| 254 |
+
font-size: 1.4rem;
|
| 255 |
+
margin-bottom: 25px;
|
| 256 |
+
font-weight: 700;
|
| 257 |
+
display: flex;
|
| 258 |
+
align-items: center;
|
| 259 |
+
gap: 15px;
|
| 260 |
+
}
|
| 261 |
|
| 262 |
+
.ai-msg ul {
|
| 263 |
+
margin: 25px 0;
|
| 264 |
+
list-style: none;
|
| 265 |
+
}
|
| 266 |
+
|
| 267 |
+
.ai-msg li {
|
| 268 |
+
position: relative;
|
| 269 |
+
padding-left: 32px;
|
| 270 |
+
margin-bottom: 18px;
|
| 271 |
+
}
|
| 272 |
+
|
| 273 |
+
.ai-msg li::before {
|
| 274 |
+
content: "⚖️";
|
| 275 |
+
position: absolute;
|
| 276 |
+
left: 0;
|
| 277 |
+
font-size: 1rem;
|
| 278 |
+
}
|
| 279 |
+
|
| 280 |
+
.highlight {
|
| 281 |
+
background: rgba(251, 191, 36, 0.05);
|
| 282 |
+
border-left: 5px solid var(--accent-gold);
|
| 283 |
+
padding: 25px;
|
| 284 |
+
margin: 30px 0;
|
| 285 |
+
border-radius: 0 18px 18px 0;
|
| 286 |
+
font-weight: 600;
|
| 287 |
+
color: #fff;
|
| 288 |
+
}
|
| 289 |
|
| 290 |
.typing {
|
| 291 |
display: flex;
|
|
|
|
| 321 |
animation: typing-blink 1.4s infinite ease-in-out;
|
| 322 |
}
|
| 323 |
|
| 324 |
+
.typing-dots span:nth-child(2) {
|
| 325 |
+
animation-delay: 0.22s;
|
| 326 |
+
}
|
| 327 |
+
|
| 328 |
+
.typing-dots span:nth-child(3) {
|
| 329 |
+
animation-delay: 0.44s;
|
| 330 |
+
}
|
| 331 |
|
| 332 |
@keyframes typing-blink {
|
| 333 |
+
|
| 334 |
+
0%,
|
| 335 |
+
100% {
|
| 336 |
+
opacity: 0.2;
|
| 337 |
+
transform: scale(0.85);
|
| 338 |
+
}
|
| 339 |
+
|
| 340 |
+
50% {
|
| 341 |
+
opacity: 1;
|
| 342 |
+
transform: scale(1.15);
|
| 343 |
+
}
|
| 344 |
}
|
| 345 |
|
| 346 |
@keyframes pulse-border-gold {
|
| 347 |
+
|
| 348 |
+
0%,
|
| 349 |
+
100% {
|
| 350 |
+
border-color: var(--glass-border);
|
| 351 |
+
}
|
| 352 |
+
|
| 353 |
+
50% {
|
| 354 |
+
border-color: var(--accent-gold);
|
| 355 |
+
box-shadow: 0 0 25px rgba(251, 191, 36, 0.15);
|
| 356 |
+
}
|
| 357 |
}
|
| 358 |
|
| 359 |
+
.input-area {
|
| 360 |
+
padding: 40px 12%;
|
| 361 |
+
background: linear-gradient(to top, var(--bg-dark) 60%, transparent);
|
| 362 |
+
border-top: 1px solid var(--glass-border);
|
| 363 |
+
z-index: 60;
|
| 364 |
+
}
|
| 365 |
+
|
| 366 |
+
.input-box {
|
| 367 |
+
background: rgba(255, 255, 255, 0.03);
|
| 368 |
+
border: 1px solid var(--glass-border);
|
| 369 |
+
border-radius: 20px;
|
| 370 |
+
padding: 8px;
|
| 371 |
+
display: flex;
|
| 372 |
+
align-items: center;
|
| 373 |
+
transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
|
| 374 |
+
}
|
| 375 |
+
|
| 376 |
+
.input-box:focus-within {
|
| 377 |
+
border-color: var(--accent-gold);
|
| 378 |
+
box-shadow: 0 0 40px rgba(251, 191, 36, 0.1);
|
| 379 |
+
background: rgba(255, 255, 255, 0.05);
|
| 380 |
+
}
|
| 381 |
+
|
| 382 |
+
.input-box input {
|
| 383 |
+
flex: 1;
|
| 384 |
+
background: transparent;
|
| 385 |
+
border: none;
|
| 386 |
+
padding: 18px 28px;
|
| 387 |
+
color: white;
|
| 388 |
+
font-size: 1.1rem;
|
| 389 |
+
outline: none;
|
| 390 |
+
}
|
| 391 |
+
|
| 392 |
+
.send-btn {
|
| 393 |
+
background: var(--accent-gold);
|
| 394 |
+
color: #030617;
|
| 395 |
+
border: none;
|
| 396 |
+
width: 55px;
|
| 397 |
+
height: 55px;
|
| 398 |
+
border-radius: 16px;
|
| 399 |
+
display: flex;
|
| 400 |
+
align-items: center;
|
| 401 |
+
justify-content: center;
|
| 402 |
+
cursor: pointer;
|
| 403 |
+
transition: 0.3s;
|
| 404 |
+
margin-right: 8px;
|
| 405 |
+
}
|
| 406 |
|
| 407 |
+
.send-btn:hover {
|
| 408 |
+
transform: scale(1.1) rotate(-5deg);
|
| 409 |
+
filter: brightness(1.1);
|
| 410 |
+
}
|
| 411 |
+
|
| 412 |
+
.hidden {
|
| 413 |
+
display: none !important;
|
| 414 |
+
}
|
| 415 |
+
|
| 416 |
+
@keyframes float {
|
| 417 |
+
|
| 418 |
+
0%,
|
| 419 |
+
100% {
|
| 420 |
+
transform: translateY(0);
|
| 421 |
+
}
|
| 422 |
+
|
| 423 |
+
50% {
|
| 424 |
+
transform: translateY(-20px);
|
| 425 |
+
}
|
| 426 |
+
}
|
| 427 |
+
|
| 428 |
+
/* MOBILE RESPONSIVENESS */
|
| 429 |
+
.menu-toggle {
|
| 430 |
+
display: none;
|
| 431 |
+
background: none;
|
| 432 |
+
border: none;
|
| 433 |
+
color: var(--text-primary);
|
| 434 |
+
font-size: 1.8rem;
|
| 435 |
+
cursor: pointer;
|
| 436 |
+
align-items: center;
|
| 437 |
+
justify-content: center;
|
| 438 |
+
margin-right: 15px;
|
| 439 |
+
z-index: 101;
|
| 440 |
+
transition: color 0.3s;
|
| 441 |
+
}
|
| 442 |
+
|
| 443 |
+
.menu-toggle:hover {
|
| 444 |
+
color: var(--accent-gold);
|
| 445 |
+
}
|
| 446 |
+
|
| 447 |
+
.sidebar-overlay {
|
| 448 |
+
display: none;
|
| 449 |
+
position: fixed;
|
| 450 |
+
top: 0;
|
| 451 |
+
left: 0;
|
| 452 |
+
width: 100vw;
|
| 453 |
+
height: 100vh;
|
| 454 |
+
background: rgba(3, 6, 23, 0.6);
|
| 455 |
+
backdrop-filter: blur(5px);
|
| 456 |
+
-webkit-backdrop-filter: blur(5px);
|
| 457 |
+
z-index: 99;
|
| 458 |
+
opacity: 0;
|
| 459 |
+
transition: opacity 0.3s ease;
|
| 460 |
+
pointer-events: none;
|
| 461 |
+
}
|
| 462 |
+
|
| 463 |
+
.sidebar-overlay.active {
|
| 464 |
+
display: block;
|
| 465 |
+
opacity: 1;
|
| 466 |
+
pointer-events: auto;
|
| 467 |
+
}
|
| 468 |
+
|
| 469 |
+
@media (max-width: 768px) {
|
| 470 |
+
.menu-toggle {
|
| 471 |
+
display: flex;
|
| 472 |
+
}
|
| 473 |
+
|
| 474 |
+
.sidebar {
|
| 475 |
+
position: fixed;
|
| 476 |
+
top: 0;
|
| 477 |
+
left: -300px;
|
| 478 |
+
height: 100vh;
|
| 479 |
+
width: 300px;
|
| 480 |
+
transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
| 481 |
+
z-index: 1000;
|
| 482 |
+
box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
|
| 483 |
+
}
|
| 484 |
+
|
| 485 |
+
.sidebar.active {
|
| 486 |
+
left: 0;
|
| 487 |
+
}
|
| 488 |
+
|
| 489 |
+
.top-bar {
|
| 490 |
+
padding: 0 15px;
|
| 491 |
+
}
|
| 492 |
+
|
| 493 |
+
.top-bar > div:last-child {
|
| 494 |
+
display: none;
|
| 495 |
+
}
|
| 496 |
+
|
| 497 |
+
.messages-container {
|
| 498 |
+
padding: 25px 15px;
|
| 499 |
+
gap: 20px;
|
| 500 |
+
}
|
| 501 |
+
|
| 502 |
+
.user-msg {
|
| 503 |
+
max-width: 85%;
|
| 504 |
+
padding: 12px 18px;
|
| 505 |
+
font-size: 0.95rem;
|
| 506 |
+
}
|
| 507 |
+
|
| 508 |
+
.ai-msg {
|
| 509 |
+
max-width: 95%;
|
| 510 |
+
padding: 20px;
|
| 511 |
+
font-size: 0.95rem;
|
| 512 |
+
}
|
| 513 |
+
|
| 514 |
+
.ai-msg h3 {
|
| 515 |
+
font-size: 1.15rem;
|
| 516 |
+
margin-bottom: 15px;
|
| 517 |
+
}
|
| 518 |
+
|
| 519 |
+
.input-area {
|
| 520 |
+
padding: 15px 15px 25px 15px;
|
| 521 |
+
}
|
| 522 |
+
|
| 523 |
+
.input-box input {
|
| 524 |
+
padding: 12px 15px;
|
| 525 |
+
font-size: 0.95rem;
|
| 526 |
+
}
|
| 527 |
+
|
| 528 |
+
.send-btn {
|
| 529 |
+
width: 44px;
|
| 530 |
+
height: 44px;
|
| 531 |
+
}
|
| 532 |
+
|
| 533 |
+
#welcomeScreen h1 {
|
| 534 |
+
font-size: 1.8rem !important;
|
| 535 |
+
margin-bottom: 10px !important;
|
| 536 |
+
}
|
| 537 |
+
|
| 538 |
+
#welcomeScreen p {
|
| 539 |
+
font-size: 0.95rem !important;
|
| 540 |
+
max-width: 100% !important;
|
| 541 |
+
}
|
| 542 |
+
|
| 543 |
+
#welcomeScreen div:first-child {
|
| 544 |
+
font-size: 3.5rem !important;
|
| 545 |
+
margin-bottom: 15px !important;
|
| 546 |
+
}
|
| 547 |
+
}
|
| 548 |
</style>
|
| 549 |
</head>
|
| 550 |
+
|
| 551 |
<body>
|
| 552 |
+
<div class="sidebar-overlay" id="sidebarOverlay"></div>
|
| 553 |
<aside class="sidebar">
|
| 554 |
<div class="sidebar-header">
|
| 555 |
<button class="new-chat-btn" id="newChatBtn"><span>🏛️</span> New Deliberation</button>
|
|
|
|
| 565 |
</div>
|
| 566 |
</div>
|
| 567 |
<div style="display: flex; flex-direction: column; gap: 10px; margin-top: 20px;">
|
| 568 |
+
<a href="/judgedashboard.html"
|
| 569 |
+
style="color: var(--accent-gold); text-decoration: none; font-size: 0.85rem; text-align: center; font-weight: 700; letter-spacing: 0.5px;">Return
|
| 570 |
+
to Chambers</a>
|
| 571 |
+
<a href="/role"
|
| 572 |
+
style="color: var(--text-dim); text-decoration: none; font-size: 0.8rem; text-align: center;">←
|
| 573 |
+
Change Role</a>
|
| 574 |
</div>
|
| 575 |
</div>
|
| 576 |
</aside>
|
| 577 |
|
| 578 |
<main class="main-chat">
|
| 579 |
<header class="top-bar">
|
| 580 |
+
<button class="menu-toggle" id="menuToggle" aria-label="Toggle Sidebar">☰</button>
|
| 581 |
<div class="system-branding">
|
| 582 |
<span class="branding-title">🏛️ Judicial Intelligence System</span>
|
| 583 |
+
<div class="status-pill">
|
| 584 |
+
<div class="status-dot"></div>Secure Deliberation Active
|
| 585 |
+
</div>
|
| 586 |
</div>
|
| 587 |
+
<div style="font-size: 0.85rem; color: var(--text-dim); font-weight: 600; letter-spacing: 1px;">JUDICIAL
|
| 588 |
+
FRAMEWORK v5.0 PRO</div>
|
| 589 |
</header>
|
| 590 |
|
| 591 |
+
<div id="welcomeScreen"
|
| 592 |
+
style="position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 40px; z-index: 1;">
|
| 593 |
<div style="font-size: 5rem; margin-bottom: 30px; animation: float 8s ease-in-out infinite;">⚖️</div>
|
| 594 |
+
<h1 style="font-size: 3.2rem; font-weight: 800; margin-bottom: 15px; letter-spacing: -1.5px;">Protocol
|
| 595 |
+
Initiated, Your Honor.</h1>
|
| 596 |
+
<p style="color: var(--text-dim); max-width: 600px; line-height: 1.8; font-size: 1.2rem; font-weight: 300;">
|
| 597 |
+
Enhanced judicial support is online.</p>
|
| 598 |
</div>
|
| 599 |
|
| 600 |
<div class="messages-container" id="chatContainer"></div>
|
|
|
|
| 609 |
<div class="input-box">
|
| 610 |
<input type="text" id="messageInput" placeholder="Initiate legal inquiry..." autocomplete="off">
|
| 611 |
<button class="send-btn" id="sendButton">
|
| 612 |
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3"
|
| 613 |
+
stroke-linecap="round" stroke-linejoin="round">
|
| 614 |
+
<line x1="22" y1="2" x2="11" y2="13"></line>
|
| 615 |
+
<polygon points="22 2 15 22 11 13 2 9 22 2"></polygon>
|
| 616 |
+
</svg>
|
| 617 |
</button>
|
| 618 |
</div>
|
| 619 |
+
<p
|
| 620 |
+
style="text-align: center; font-size: 0.8rem; color: var(--text-dim); margin-top: 25px; font-weight: 500; opacity: 0.7; letter-spacing: 0.5px;">
|
| 621 |
+
🔒 ENCRYPTED END-TO-END • JUDICIAL PRIVACY PROTECTED</p>
|
| 622 |
</div>
|
| 623 |
</main>
|
| 624 |
|
|
|
|
| 745 |
createNewMessage('ai', msg.response);
|
| 746 |
});
|
| 747 |
currentAiMessageElement = null;
|
| 748 |
+
if (window.innerWidth <= 768) {
|
| 749 |
+
const sidebar = document.querySelector('.sidebar');
|
| 750 |
+
const sidebarOverlay = document.getElementById('sidebarOverlay');
|
| 751 |
+
if (sidebar) sidebar.classList.remove('active');
|
| 752 |
+
if (sidebarOverlay) sidebarOverlay.classList.remove('active');
|
| 753 |
+
}
|
| 754 |
} catch (err) { console.error(err); }
|
| 755 |
}
|
| 756 |
|
|
|
|
| 773 |
currentCaseId = crypto.randomUUID();
|
| 774 |
chatContainer.innerHTML = '';
|
| 775 |
welcomeScreen.classList.remove('hidden');
|
| 776 |
+
if (window.innerWidth <= 768) {
|
| 777 |
+
const sidebar = document.querySelector('.sidebar');
|
| 778 |
+
const sidebarOverlay = document.getElementById('sidebarOverlay');
|
| 779 |
+
if (sidebar) sidebar.classList.remove('active');
|
| 780 |
+
if (sidebarOverlay) sidebarOverlay.classList.remove('active');
|
| 781 |
+
}
|
| 782 |
};
|
| 783 |
|
| 784 |
connectWS();
|
| 785 |
loadHistory();
|
| 786 |
fetchUserStatus();
|
| 787 |
+
|
| 788 |
+
// Mobile Sidebar Toggling Logic
|
| 789 |
+
const menuToggle = document.getElementById('menuToggle');
|
| 790 |
+
const sidebar = document.querySelector('.sidebar');
|
| 791 |
+
const sidebarOverlay = document.getElementById('sidebarOverlay');
|
| 792 |
+
|
| 793 |
+
function toggleSidebar() {
|
| 794 |
+
sidebar.classList.toggle('active');
|
| 795 |
+
sidebarOverlay.classList.toggle('active');
|
| 796 |
+
}
|
| 797 |
+
|
| 798 |
+
menuToggle.addEventListener('click', toggleSidebar);
|
| 799 |
+
sidebarOverlay.addEventListener('click', toggleSidebar);
|
| 800 |
</script>
|
| 801 |
</body>
|
| 802 |
+
|
| 803 |
</html>
|
src/apps/templates/advocatechatbot.html
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
<title>AI Legal Assistant | Advocate Command Center</title>
|
| 7 |
-
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap"
|
|
|
|
| 8 |
<style>
|
| 9 |
:root {
|
| 10 |
--bg-dark: #030617;
|
|
@@ -17,43 +19,256 @@
|
|
| 17 |
--glass-border: rgba(255, 255, 255, 0.08);
|
| 18 |
}
|
| 19 |
|
| 20 |
-
* {
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
-
.sidebar { width: 280px; background: var(--sidebar-bg); border-right: 1px solid var(--glass-border); display: flex; flex-direction: column; z-index: 100; }
|
| 24 |
-
.sidebar-header { padding: 30px 20px; }
|
| 25 |
.new-chat-btn {
|
| 26 |
-
width: 100%;
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
|
| 29 |
}
|
| 30 |
-
.new-chat-btn:hover { transform: translateY(-2px); box-shadow: 0 15px 25px rgba(37, 99, 235, 0.3); }
|
| 31 |
|
| 32 |
-
.
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
|
|
|
|
|
|
| 40 |
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
|
| 47 |
-
.messages-container {
|
| 48 |
-
|
| 49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
|
| 51 |
-
.
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
|
| 58 |
.typing {
|
| 59 |
display: flex;
|
|
@@ -88,29 +303,217 @@
|
|
| 88 |
animation: typing-blink 1.4s infinite ease-in-out;
|
| 89 |
}
|
| 90 |
|
| 91 |
-
.typing-dots span:nth-child(2) {
|
| 92 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
|
| 94 |
@keyframes typing-blink {
|
| 95 |
-
|
| 96 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
}
|
| 98 |
|
| 99 |
@keyframes pulse-border {
|
| 100 |
-
|
| 101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
}
|
| 103 |
|
| 104 |
-
.input-area {
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 109 |
|
| 110 |
-
.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 111 |
</style>
|
| 112 |
</head>
|
|
|
|
| 113 |
<body>
|
|
|
|
| 114 |
<aside class="sidebar">
|
| 115 |
<div class="sidebar-header">
|
| 116 |
<button class="new-chat-btn" id="newChatBtn"><span>+</span> New Case Research</button>
|
|
@@ -126,25 +529,36 @@
|
|
| 126 |
</div>
|
| 127 |
</div>
|
| 128 |
<div style="display: flex; flex-direction: column; gap: 8px; margin-top: 15px;">
|
| 129 |
-
<a href="/advocatedashboard.html"
|
| 130 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 131 |
</div>
|
| 132 |
</div>
|
| 133 |
</aside>
|
| 134 |
|
| 135 |
<main class="main-chat">
|
| 136 |
<header class="top-bar">
|
|
|
|
| 137 |
<div class="system-branding">
|
| 138 |
<span style="font-weight: 700; color: white;">⚖️ Law Bot (Advocate)</span>
|
| 139 |
-
<div class="status-pill">
|
|
|
|
|
|
|
| 140 |
</div>
|
| 141 |
<div style="font-size: 0.85rem; color: var(--text-dim); font-weight: 500;">Case Management v4.0 PRO</div>
|
| 142 |
</header>
|
| 143 |
|
| 144 |
-
<div id="welcomeScreen"
|
|
|
|
| 145 |
<div style="font-size: 4rem; margin-bottom: 25px;">💼</div>
|
| 146 |
-
<h1 style="font-size: 2.8rem; font-weight: 700; margin-bottom: 12px; letter-spacing: -1px;">Advancing
|
| 147 |
-
|
|
|
|
|
|
|
|
|
|
| 148 |
</div>
|
| 149 |
|
| 150 |
<div class="messages-container" id="chatContainer"></div>
|
|
@@ -157,9 +571,14 @@
|
|
| 157 |
|
| 158 |
<div class="input-area">
|
| 159 |
<div class="input-box">
|
| 160 |
-
<input type="text" id="messageInput" placeholder="Describe case or request legal sections..."
|
|
|
|
| 161 |
<button class="send-btn" id="sendButton">
|
| 162 |
-
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 163 |
</button>
|
| 164 |
</div>
|
| 165 |
</div>
|
|
@@ -288,6 +707,12 @@
|
|
| 288 |
createNewMessage('ai', msg.response);
|
| 289 |
});
|
| 290 |
currentAiMessageElement = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 291 |
} catch (err) { console.error(err); }
|
| 292 |
}
|
| 293 |
|
|
@@ -310,11 +735,31 @@
|
|
| 310 |
currentCaseId = crypto.randomUUID();
|
| 311 |
chatContainer.innerHTML = '';
|
| 312 |
welcomeScreen.classList.remove('hidden');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 313 |
};
|
| 314 |
|
| 315 |
connectWS();
|
| 316 |
loadHistory();
|
| 317 |
fetchUserStatus();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 318 |
</script>
|
| 319 |
</body>
|
|
|
|
| 320 |
</html>
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
| 3 |
+
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8">
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 7 |
<title>AI Legal Assistant | Advocate Command Center</title>
|
| 8 |
+
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap"
|
| 9 |
+
rel="stylesheet">
|
| 10 |
<style>
|
| 11 |
:root {
|
| 12 |
--bg-dark: #030617;
|
|
|
|
| 19 |
--glass-border: rgba(255, 255, 255, 0.08);
|
| 20 |
}
|
| 21 |
|
| 22 |
+
* {
|
| 23 |
+
margin: 0;
|
| 24 |
+
padding: 0;
|
| 25 |
+
box-sizing: border-box;
|
| 26 |
+
font-family: 'Poppins', sans-serif;
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
body {
|
| 30 |
+
background-color: var(--bg-dark);
|
| 31 |
+
color: var(--text-primary);
|
| 32 |
+
height: 100vh;
|
| 33 |
+
display: flex;
|
| 34 |
+
overflow: hidden;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
.sidebar {
|
| 38 |
+
width: 280px;
|
| 39 |
+
background: var(--sidebar-bg);
|
| 40 |
+
border-right: 1px solid var(--glass-border);
|
| 41 |
+
display: flex;
|
| 42 |
+
flex-direction: column;
|
| 43 |
+
z-index: 100;
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
.sidebar-header {
|
| 47 |
+
padding: 30px 20px;
|
| 48 |
+
}
|
| 49 |
|
|
|
|
|
|
|
| 50 |
.new-chat-btn {
|
| 51 |
+
width: 100%;
|
| 52 |
+
padding: 14px;
|
| 53 |
+
background: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo));
|
| 54 |
+
border: none;
|
| 55 |
+
border-radius: 12px;
|
| 56 |
+
color: white;
|
| 57 |
+
font-weight: 600;
|
| 58 |
+
display: flex;
|
| 59 |
+
align-items: center;
|
| 60 |
+
justify-content: center;
|
| 61 |
+
gap: 10px;
|
| 62 |
+
cursor: pointer;
|
| 63 |
+
transition: 0.3s;
|
| 64 |
box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
|
| 65 |
}
|
|
|
|
| 66 |
|
| 67 |
+
.new-chat-btn:hover {
|
| 68 |
+
transform: translateY(-2px);
|
| 69 |
+
box-shadow: 0 15px 25px rgba(37, 99, 235, 0.3);
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
.history-label {
|
| 73 |
+
padding: 0 20px 10px;
|
| 74 |
+
font-size: 0.75rem;
|
| 75 |
+
text-transform: uppercase;
|
| 76 |
+
letter-spacing: 2px;
|
| 77 |
+
color: var(--text-dim);
|
| 78 |
+
font-weight: 700;
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
.history-list {
|
| 82 |
+
flex: 1;
|
| 83 |
+
overflow-y: auto;
|
| 84 |
+
padding: 10px;
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
.history-item {
|
| 88 |
+
padding: 12px 15px;
|
| 89 |
+
border-radius: 10px;
|
| 90 |
+
margin-bottom: 5px;
|
| 91 |
+
cursor: pointer;
|
| 92 |
+
transition: 0.2s;
|
| 93 |
+
font-size: 0.85rem;
|
| 94 |
+
color: var(--text-dim);
|
| 95 |
+
display: flex;
|
| 96 |
+
align-items: center;
|
| 97 |
+
gap: 10px;
|
| 98 |
+
border: 1px solid transparent;
|
| 99 |
+
white-space: nowrap;
|
| 100 |
+
overflow: hidden;
|
| 101 |
+
text-overflow: ellipsis;
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
+
.history-item:hover {
|
| 105 |
+
background: var(--glass-bg);
|
| 106 |
+
color: white;
|
| 107 |
+
border-color: var(--glass-border);
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
.sidebar-footer {
|
| 111 |
+
padding: 20px;
|
| 112 |
+
border-top: 1px solid var(--glass-border);
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
+
.user-badge {
|
| 116 |
+
display: flex;
|
| 117 |
+
align-items: center;
|
| 118 |
+
gap: 12px;
|
| 119 |
+
padding: 10px;
|
| 120 |
+
background: var(--glass-bg);
|
| 121 |
+
border-radius: 12px;
|
| 122 |
+
}
|
| 123 |
+
|
| 124 |
+
.user-avatar {
|
| 125 |
+
width: 32px;
|
| 126 |
+
height: 32px;
|
| 127 |
+
background: var(--accent-blue);
|
| 128 |
+
border-radius: 8px;
|
| 129 |
+
display: flex;
|
| 130 |
+
align-items: center;
|
| 131 |
+
justify-content: center;
|
| 132 |
+
font-weight: 700;
|
| 133 |
+
color: white;
|
| 134 |
+
font-size: 0.8rem;
|
| 135 |
+
}
|
| 136 |
+
|
| 137 |
+
.main-chat {
|
| 138 |
+
flex: 1;
|
| 139 |
+
display: flex;
|
| 140 |
+
flex-direction: column;
|
| 141 |
+
position: relative;
|
| 142 |
+
background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.03), transparent);
|
| 143 |
+
}
|
| 144 |
+
|
| 145 |
+
.top-bar {
|
| 146 |
+
height: 70px;
|
| 147 |
+
background: rgba(3, 6, 23, 0.82);
|
| 148 |
+
backdrop-filter: blur(25px);
|
| 149 |
+
border-bottom: 1px solid var(--glass-border);
|
| 150 |
+
display: flex;
|
| 151 |
+
align-items: center;
|
| 152 |
+
justify-content: space-between;
|
| 153 |
+
padding: 0 40px;
|
| 154 |
+
z-index: 50;
|
| 155 |
+
}
|
| 156 |
+
|
| 157 |
+
.status-pill {
|
| 158 |
+
display: flex;
|
| 159 |
+
align-items: center;
|
| 160 |
+
gap: 8px;
|
| 161 |
+
font-size: 0.75rem;
|
| 162 |
+
background: rgba(37, 99, 235, 0.1);
|
| 163 |
+
color: #60a5fa;
|
| 164 |
+
padding: 4px 12px;
|
| 165 |
+
border-radius: 20px;
|
| 166 |
+
font-weight: 600;
|
| 167 |
+
border: 1px solid rgba(37, 99, 235, 0.2);
|
| 168 |
+
}
|
| 169 |
+
|
| 170 |
+
.status-dot {
|
| 171 |
+
width: 6px;
|
| 172 |
+
height: 6px;
|
| 173 |
+
background: #60a5fa;
|
| 174 |
+
border-radius: 50%;
|
| 175 |
+
animation: pulse-dot 2s infinite;
|
| 176 |
+
}
|
| 177 |
+
|
| 178 |
+
@keyframes pulse-dot {
|
| 179 |
|
| 180 |
+
0%,
|
| 181 |
+
100% {
|
| 182 |
+
transform: scale(1);
|
| 183 |
+
opacity: 1;
|
| 184 |
+
}
|
| 185 |
|
| 186 |
+
50% {
|
| 187 |
+
transform: scale(1.5);
|
| 188 |
+
opacity: 0.4;
|
| 189 |
+
}
|
| 190 |
+
}
|
| 191 |
|
| 192 |
+
.messages-container {
|
| 193 |
+
flex: 1;
|
| 194 |
+
overflow-y: auto;
|
| 195 |
+
padding: 40px 10%;
|
| 196 |
+
display: flex;
|
| 197 |
+
flex-direction: column;
|
| 198 |
+
gap: 30px;
|
| 199 |
+
scroll-behavior: smooth;
|
| 200 |
+
}
|
| 201 |
|
| 202 |
+
.message {
|
| 203 |
+
max-width: 850px;
|
| 204 |
+
animation: message-slide 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
|
| 205 |
+
}
|
| 206 |
+
|
| 207 |
+
@keyframes message-slide {
|
| 208 |
+
from {
|
| 209 |
+
opacity: 0;
|
| 210 |
+
transform: translateY(20px);
|
| 211 |
+
}
|
| 212 |
+
|
| 213 |
+
to {
|
| 214 |
+
opacity: 1;
|
| 215 |
+
transform: translateY(0);
|
| 216 |
+
}
|
| 217 |
+
}
|
| 218 |
+
|
| 219 |
+
.user-msg {
|
| 220 |
+
align-self: flex-end;
|
| 221 |
+
background: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo));
|
| 222 |
+
padding: 16px 24px;
|
| 223 |
+
border-radius: 20px 20px 4px 20px;
|
| 224 |
+
color: white;
|
| 225 |
+
max-width: 70%;
|
| 226 |
+
line-height: 1.6;
|
| 227 |
+
}
|
| 228 |
+
|
| 229 |
+
.ai-msg {
|
| 230 |
+
align-self: flex-start;
|
| 231 |
+
background: var(--glass-bg);
|
| 232 |
+
border: 1px solid var(--glass-border);
|
| 233 |
+
padding: 30px;
|
| 234 |
+
border-radius: 20px 20px 20px 4px;
|
| 235 |
+
max-width: 85%;
|
| 236 |
+
line-height: 1.8;
|
| 237 |
+
color: #e2e8f0;
|
| 238 |
+
}
|
| 239 |
+
|
| 240 |
+
.ai-msg h3 {
|
| 241 |
+
color: #60a5fa;
|
| 242 |
+
font-size: 1.3rem;
|
| 243 |
+
margin-bottom: 20px;
|
| 244 |
+
font-weight: 600;
|
| 245 |
+
display: flex;
|
| 246 |
+
align-items: center;
|
| 247 |
+
gap: 12px;
|
| 248 |
+
}
|
| 249 |
+
|
| 250 |
+
.ai-msg li {
|
| 251 |
+
position: relative;
|
| 252 |
+
padding-left: 28px;
|
| 253 |
+
margin-bottom: 15px;
|
| 254 |
+
}
|
| 255 |
+
|
| 256 |
+
.ai-msg li::before {
|
| 257 |
+
content: "📘";
|
| 258 |
+
position: absolute;
|
| 259 |
+
left: 0;
|
| 260 |
+
font-size: 0.9rem;
|
| 261 |
+
}
|
| 262 |
+
|
| 263 |
+
.highlight {
|
| 264 |
+
background: rgba(37, 99, 235, 0.08);
|
| 265 |
+
border-left: 4px solid var(--accent-blue);
|
| 266 |
+
padding: 22px;
|
| 267 |
+
margin: 25px 0;
|
| 268 |
+
border-radius: 0 16px 16px 0;
|
| 269 |
+
font-weight: 500;
|
| 270 |
+
color: #fff;
|
| 271 |
+
}
|
| 272 |
|
| 273 |
.typing {
|
| 274 |
display: flex;
|
|
|
|
| 303 |
animation: typing-blink 1.4s infinite ease-in-out;
|
| 304 |
}
|
| 305 |
|
| 306 |
+
.typing-dots span:nth-child(2) {
|
| 307 |
+
animation-delay: 0.2s;
|
| 308 |
+
}
|
| 309 |
+
|
| 310 |
+
.typing-dots span:nth-child(3) {
|
| 311 |
+
animation-delay: 0.4s;
|
| 312 |
+
}
|
| 313 |
|
| 314 |
@keyframes typing-blink {
|
| 315 |
+
|
| 316 |
+
0%,
|
| 317 |
+
100% {
|
| 318 |
+
opacity: 0.3;
|
| 319 |
+
transform: scale(0.8);
|
| 320 |
+
}
|
| 321 |
+
|
| 322 |
+
50% {
|
| 323 |
+
opacity: 1;
|
| 324 |
+
transform: scale(1.1);
|
| 325 |
+
}
|
| 326 |
}
|
| 327 |
|
| 328 |
@keyframes pulse-border {
|
| 329 |
+
|
| 330 |
+
0%,
|
| 331 |
+
100% {
|
| 332 |
+
border-color: var(--glass-border);
|
| 333 |
+
}
|
| 334 |
+
|
| 335 |
+
50% {
|
| 336 |
+
border-color: #60a5fa;
|
| 337 |
+
box-shadow: 0 0 20px rgba(96, 165, 250, 0.1);
|
| 338 |
+
}
|
| 339 |
}
|
| 340 |
|
| 341 |
+
.input-area {
|
| 342 |
+
padding: 30px 10%;
|
| 343 |
+
background: linear-gradient(to top, var(--bg-dark) 50%, transparent);
|
| 344 |
+
border-top: 1px solid var(--glass-border);
|
| 345 |
+
z-index: 60;
|
| 346 |
+
}
|
| 347 |
+
|
| 348 |
+
.input-box {
|
| 349 |
+
background: rgba(255, 255, 255, 0.04);
|
| 350 |
+
border: 1px solid var(--glass-border);
|
| 351 |
+
border-radius: 18px;
|
| 352 |
+
padding: 6px;
|
| 353 |
+
display: flex;
|
| 354 |
+
align-items: center;
|
| 355 |
+
transition: 0.3s;
|
| 356 |
+
}
|
| 357 |
|
| 358 |
+
.input-box:focus-within {
|
| 359 |
+
border-color: var(--accent-blue);
|
| 360 |
+
box-shadow: 0 0 30px rgba(37, 99, 235, 0.2);
|
| 361 |
+
}
|
| 362 |
+
|
| 363 |
+
.input-box input {
|
| 364 |
+
flex: 1;
|
| 365 |
+
background: transparent;
|
| 366 |
+
border: none;
|
| 367 |
+
padding: 16px 24px;
|
| 368 |
+
color: white;
|
| 369 |
+
font-size: 1.05rem;
|
| 370 |
+
outline: none;
|
| 371 |
+
}
|
| 372 |
+
|
| 373 |
+
.send-btn {
|
| 374 |
+
background: var(--accent-blue);
|
| 375 |
+
color: white;
|
| 376 |
+
border: none;
|
| 377 |
+
width: 50px;
|
| 378 |
+
height: 50px;
|
| 379 |
+
border-radius: 14px;
|
| 380 |
+
display: flex;
|
| 381 |
+
align-items: center;
|
| 382 |
+
justify-content: center;
|
| 383 |
+
cursor: pointer;
|
| 384 |
+
transition: 0.3s;
|
| 385 |
+
margin-right: 6px;
|
| 386 |
+
}
|
| 387 |
+
|
| 388 |
+
.hidden {
|
| 389 |
+
display: none !important;
|
| 390 |
+
}
|
| 391 |
+
|
| 392 |
+
/* MOBILE RESPONSIVENESS */
|
| 393 |
+
.menu-toggle {
|
| 394 |
+
display: none;
|
| 395 |
+
background: none;
|
| 396 |
+
border: none;
|
| 397 |
+
color: var(--text-primary);
|
| 398 |
+
font-size: 1.8rem;
|
| 399 |
+
cursor: pointer;
|
| 400 |
+
align-items: center;
|
| 401 |
+
justify-content: center;
|
| 402 |
+
margin-right: 15px;
|
| 403 |
+
z-index: 101;
|
| 404 |
+
transition: color 0.3s;
|
| 405 |
+
}
|
| 406 |
+
|
| 407 |
+
.menu-toggle:hover {
|
| 408 |
+
color: var(--accent-blue);
|
| 409 |
+
}
|
| 410 |
+
|
| 411 |
+
.sidebar-overlay {
|
| 412 |
+
display: none;
|
| 413 |
+
position: fixed;
|
| 414 |
+
top: 0;
|
| 415 |
+
left: 0;
|
| 416 |
+
width: 100vw;
|
| 417 |
+
height: 100vh;
|
| 418 |
+
background: rgba(3, 6, 23, 0.6);
|
| 419 |
+
backdrop-filter: blur(5px);
|
| 420 |
+
-webkit-backdrop-filter: blur(5px);
|
| 421 |
+
z-index: 99;
|
| 422 |
+
opacity: 0;
|
| 423 |
+
transition: opacity 0.3s ease;
|
| 424 |
+
pointer-events: none;
|
| 425 |
+
}
|
| 426 |
+
|
| 427 |
+
.sidebar-overlay.active {
|
| 428 |
+
display: block;
|
| 429 |
+
opacity: 1;
|
| 430 |
+
pointer-events: auto;
|
| 431 |
+
}
|
| 432 |
+
|
| 433 |
+
@media (max-width: 768px) {
|
| 434 |
+
.menu-toggle {
|
| 435 |
+
display: flex;
|
| 436 |
+
}
|
| 437 |
+
|
| 438 |
+
.sidebar {
|
| 439 |
+
position: fixed;
|
| 440 |
+
top: 0;
|
| 441 |
+
left: -280px;
|
| 442 |
+
height: 100vh;
|
| 443 |
+
width: 280px;
|
| 444 |
+
transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
| 445 |
+
z-index: 1000;
|
| 446 |
+
box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
|
| 447 |
+
}
|
| 448 |
+
|
| 449 |
+
.sidebar.active {
|
| 450 |
+
left: 0;
|
| 451 |
+
}
|
| 452 |
+
|
| 453 |
+
.top-bar {
|
| 454 |
+
padding: 0 15px;
|
| 455 |
+
}
|
| 456 |
+
|
| 457 |
+
.top-bar > div:last-child {
|
| 458 |
+
display: none;
|
| 459 |
+
}
|
| 460 |
+
|
| 461 |
+
.messages-container {
|
| 462 |
+
padding: 25px 15px;
|
| 463 |
+
gap: 20px;
|
| 464 |
+
}
|
| 465 |
+
|
| 466 |
+
.user-msg {
|
| 467 |
+
max-width: 85%;
|
| 468 |
+
padding: 12px 18px;
|
| 469 |
+
font-size: 0.95rem;
|
| 470 |
+
}
|
| 471 |
+
|
| 472 |
+
.ai-msg {
|
| 473 |
+
max-width: 95%;
|
| 474 |
+
padding: 20px;
|
| 475 |
+
font-size: 0.95rem;
|
| 476 |
+
}
|
| 477 |
+
|
| 478 |
+
.ai-msg h3 {
|
| 479 |
+
font-size: 1.15rem;
|
| 480 |
+
margin-bottom: 15px;
|
| 481 |
+
}
|
| 482 |
+
|
| 483 |
+
.input-area {
|
| 484 |
+
padding: 15px 15px 25px 15px;
|
| 485 |
+
}
|
| 486 |
+
|
| 487 |
+
.input-box input {
|
| 488 |
+
padding: 12px 15px;
|
| 489 |
+
font-size: 0.95rem;
|
| 490 |
+
}
|
| 491 |
+
|
| 492 |
+
.send-btn {
|
| 493 |
+
width: 44px;
|
| 494 |
+
height: 44px;
|
| 495 |
+
}
|
| 496 |
+
|
| 497 |
+
#welcomeScreen h1 {
|
| 498 |
+
font-size: 1.8rem !important;
|
| 499 |
+
margin-bottom: 10px !important;
|
| 500 |
+
}
|
| 501 |
+
|
| 502 |
+
#welcomeScreen p {
|
| 503 |
+
font-size: 0.95rem !important;
|
| 504 |
+
max-width: 100% !important;
|
| 505 |
+
}
|
| 506 |
+
|
| 507 |
+
#welcomeScreen div:first-child {
|
| 508 |
+
font-size: 3.5rem !important;
|
| 509 |
+
margin-bottom: 15px !important;
|
| 510 |
+
}
|
| 511 |
+
}
|
| 512 |
</style>
|
| 513 |
</head>
|
| 514 |
+
|
| 515 |
<body>
|
| 516 |
+
<div class="sidebar-overlay" id="sidebarOverlay"></div>
|
| 517 |
<aside class="sidebar">
|
| 518 |
<div class="sidebar-header">
|
| 519 |
<button class="new-chat-btn" id="newChatBtn"><span>+</span> New Case Research</button>
|
|
|
|
| 529 |
</div>
|
| 530 |
</div>
|
| 531 |
<div style="display: flex; flex-direction: column; gap: 8px; margin-top: 15px;">
|
| 532 |
+
<a href="/advocatedashboard.html"
|
| 533 |
+
style="color: var(--accent-blue); text-decoration: none; font-size: 0.8rem; text-align: center; font-weight: 600;">Back
|
| 534 |
+
to Dashboard</a>
|
| 535 |
+
<a href="/role"
|
| 536 |
+
style="color: var(--text-dim); text-decoration: none; font-size: 0.8rem; text-align: center;">←
|
| 537 |
+
Change Role</a>
|
| 538 |
</div>
|
| 539 |
</div>
|
| 540 |
</aside>
|
| 541 |
|
| 542 |
<main class="main-chat">
|
| 543 |
<header class="top-bar">
|
| 544 |
+
<button class="menu-toggle" id="menuToggle" aria-label="Toggle Sidebar">☰</button>
|
| 545 |
<div class="system-branding">
|
| 546 |
<span style="font-weight: 700; color: white;">⚖️ Law Bot (Advocate)</span>
|
| 547 |
+
<div class="status-pill">
|
| 548 |
+
<div class="status-dot"></div>Advocate Secure Access
|
| 549 |
+
</div>
|
| 550 |
</div>
|
| 551 |
<div style="font-size: 0.85rem; color: var(--text-dim); font-weight: 500;">Case Management v4.0 PRO</div>
|
| 552 |
</header>
|
| 553 |
|
| 554 |
+
<div id="welcomeScreen"
|
| 555 |
+
style="position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 40px; z-index: 1;">
|
| 556 |
<div style="font-size: 4rem; margin-bottom: 25px;">💼</div>
|
| 557 |
+
<h1 style="font-size: 2.8rem; font-weight: 700; margin-bottom: 12px; letter-spacing: -1px;">Advancing
|
| 558 |
+
Justice through AI.</h1>
|
| 559 |
+
<p style="color: var(--text-dim); max-width: 550px; line-height: 1.7; font-size: 1.1rem;">Professional
|
| 560 |
+
research tools at your disposal. Analyze precedents, retrieve sections, and build your case strategy
|
| 561 |
+
with precision.</p>
|
| 562 |
</div>
|
| 563 |
|
| 564 |
<div class="messages-container" id="chatContainer"></div>
|
|
|
|
| 571 |
|
| 572 |
<div class="input-area">
|
| 573 |
<div class="input-box">
|
| 574 |
+
<input type="text" id="messageInput" placeholder="Describe case or request legal sections..."
|
| 575 |
+
autocomplete="off">
|
| 576 |
<button class="send-btn" id="sendButton">
|
| 577 |
+
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"
|
| 578 |
+
stroke-linecap="round" stroke-linejoin="round">
|
| 579 |
+
<line x1="22" y1="2" x2="11" y2="13"></line>
|
| 580 |
+
<polygon points="22 2 15 22 11 13 2 9 22 2"></polygon>
|
| 581 |
+
</svg>
|
| 582 |
</button>
|
| 583 |
</div>
|
| 584 |
</div>
|
|
|
|
| 707 |
createNewMessage('ai', msg.response);
|
| 708 |
});
|
| 709 |
currentAiMessageElement = null;
|
| 710 |
+
if (window.innerWidth <= 768) {
|
| 711 |
+
const sidebar = document.querySelector('.sidebar');
|
| 712 |
+
const sidebarOverlay = document.getElementById('sidebarOverlay');
|
| 713 |
+
if (sidebar) sidebar.classList.remove('active');
|
| 714 |
+
if (sidebarOverlay) sidebarOverlay.classList.remove('active');
|
| 715 |
+
}
|
| 716 |
} catch (err) { console.error(err); }
|
| 717 |
}
|
| 718 |
|
|
|
|
| 735 |
currentCaseId = crypto.randomUUID();
|
| 736 |
chatContainer.innerHTML = '';
|
| 737 |
welcomeScreen.classList.remove('hidden');
|
| 738 |
+
if (window.innerWidth <= 768) {
|
| 739 |
+
const sidebar = document.querySelector('.sidebar');
|
| 740 |
+
const sidebarOverlay = document.getElementById('sidebarOverlay');
|
| 741 |
+
if (sidebar) sidebar.classList.remove('active');
|
| 742 |
+
if (sidebarOverlay) sidebarOverlay.classList.remove('active');
|
| 743 |
+
}
|
| 744 |
};
|
| 745 |
|
| 746 |
connectWS();
|
| 747 |
loadHistory();
|
| 748 |
fetchUserStatus();
|
| 749 |
+
|
| 750 |
+
// Mobile Sidebar Toggling Logic
|
| 751 |
+
const menuToggle = document.getElementById('menuToggle');
|
| 752 |
+
const sidebar = document.querySelector('.sidebar');
|
| 753 |
+
const sidebarOverlay = document.getElementById('sidebarOverlay');
|
| 754 |
+
|
| 755 |
+
function toggleSidebar() {
|
| 756 |
+
sidebar.classList.toggle('active');
|
| 757 |
+
sidebarOverlay.classList.toggle('active');
|
| 758 |
+
}
|
| 759 |
+
|
| 760 |
+
menuToggle.addEventListener('click', toggleSidebar);
|
| 761 |
+
sidebarOverlay.addEventListener('click', toggleSidebar);
|
| 762 |
</script>
|
| 763 |
</body>
|
| 764 |
+
|
| 765 |
</html>
|
src/apps/templates/advocatedashboard.html
CHANGED
|
@@ -267,6 +267,28 @@
|
|
| 267 |
.logout-action:hover {
|
| 268 |
background: #fff5f5;
|
| 269 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 270 |
</style>
|
| 271 |
</head>
|
| 272 |
|
|
|
|
| 267 |
.logout-action:hover {
|
| 268 |
background: #fff5f5;
|
| 269 |
}
|
| 270 |
+
|
| 271 |
+
@media (max-width: 768px) {
|
| 272 |
+
.container {
|
| 273 |
+
grid-template-columns: 1fr;
|
| 274 |
+
}
|
| 275 |
+
|
| 276 |
+
.sidebar {
|
| 277 |
+
display: none;
|
| 278 |
+
}
|
| 279 |
+
|
| 280 |
+
.header h1 {
|
| 281 |
+
font-size: 1.4rem;
|
| 282 |
+
}
|
| 283 |
+
|
| 284 |
+
.profile span {
|
| 285 |
+
display: none;
|
| 286 |
+
}
|
| 287 |
+
|
| 288 |
+
.stats {
|
| 289 |
+
grid-template-columns: 1fr;
|
| 290 |
+
}
|
| 291 |
+
}
|
| 292 |
</style>
|
| 293 |
</head>
|
| 294 |
|
src/apps/templates/citizen.html
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
<title>AI Legal Assistant | Citizen Dashboard</title>
|
| 7 |
-
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap"
|
|
|
|
| 8 |
<style>
|
| 9 |
:root {
|
| 10 |
--bg-dark: #030617;
|
|
@@ -191,9 +193,20 @@
|
|
| 191 |
}
|
| 192 |
|
| 193 |
@keyframes pulse-dot {
|
| 194 |
-
0% {
|
| 195 |
-
|
| 196 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 197 |
}
|
| 198 |
|
| 199 |
/* MESSAGES AREA */
|
|
@@ -214,8 +227,15 @@
|
|
| 214 |
}
|
| 215 |
|
| 216 |
@keyframes message-slide {
|
| 217 |
-
from {
|
| 218 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 219 |
}
|
| 220 |
|
| 221 |
/* USER MSG */
|
|
@@ -322,17 +342,39 @@
|
|
| 322 |
animation: typing-blink 1.4s infinite ease-in-out;
|
| 323 |
}
|
| 324 |
|
| 325 |
-
.typing-dots span:nth-child(2) {
|
| 326 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 327 |
|
| 328 |
@keyframes typing-blink {
|
| 329 |
-
|
| 330 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 331 |
}
|
| 332 |
|
| 333 |
@keyframes pulse-border {
|
| 334 |
-
|
| 335 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 336 |
}
|
| 337 |
|
| 338 |
/* INPUT AREA */
|
|
@@ -372,7 +414,9 @@
|
|
| 372 |
font-weight: 400;
|
| 373 |
}
|
| 374 |
|
| 375 |
-
.input-box input::placeholder {
|
|
|
|
|
|
|
| 376 |
|
| 377 |
.send-btn {
|
| 378 |
background: var(--accent-blue);
|
|
@@ -395,21 +439,153 @@
|
|
| 395 |
}
|
| 396 |
|
| 397 |
/* SCROLLBAR */
|
| 398 |
-
::-webkit-scrollbar {
|
| 399 |
-
|
| 400 |
-
|
| 401 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 402 |
|
| 403 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 404 |
|
| 405 |
-
|
| 406 |
-
|
| 407 |
-
|
| 408 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 409 |
}
|
| 410 |
</style>
|
| 411 |
</head>
|
|
|
|
| 412 |
<body>
|
|
|
|
| 413 |
<!-- ZONE 1: SIDEBAR -->
|
| 414 |
<aside class="sidebar" id="sidebar">
|
| 415 |
<div class="sidebar-header">
|
|
@@ -417,7 +593,7 @@
|
|
| 417 |
<span>+</span> New Case
|
| 418 |
</button>
|
| 419 |
</div>
|
| 420 |
-
|
| 421 |
<div class="history-label">Case Archives</div>
|
| 422 |
<div class="history-list" id="historyList">
|
| 423 |
<!-- Threads pop here -->
|
|
@@ -431,13 +607,16 @@
|
|
| 431 |
<div style="font-size: 0.7rem; color: var(--text-dim);">Active Consultation</div>
|
| 432 |
</div>
|
| 433 |
</div>
|
| 434 |
-
<a href="/role"
|
|
|
|
|
|
|
| 435 |
</div>
|
| 436 |
</aside>
|
| 437 |
|
| 438 |
<!-- ZONE 2: MAIN AREA -->
|
| 439 |
<main class="main-chat">
|
| 440 |
<header class="top-bar">
|
|
|
|
| 441 |
<div class="system-branding">
|
| 442 |
<span style="font-weight: 700; color: white;">⚖️ AI Legal Assistant</span>
|
| 443 |
<div class="status-pill">
|
|
@@ -448,10 +627,14 @@
|
|
| 448 |
<div style="font-size: 0.85rem; color: var(--text-dim); font-weight: 500;">Citizen Framework v4.0 PRO</div>
|
| 449 |
</header>
|
| 450 |
|
| 451 |
-
<div id="welcomeScreen"
|
|
|
|
| 452 |
<div style="font-size: 4rem; margin-bottom: 25px; animation: float 6s ease-in-out infinite;">🤖</div>
|
| 453 |
-
<h1 style="font-size: 2.8rem; font-weight: 700; margin-bottom: 12px; letter-spacing: -1px;">Intelligence at
|
| 454 |
-
|
|
|
|
|
|
|
|
|
|
| 455 |
</div>
|
| 456 |
|
| 457 |
<div class="messages-container" id="chatContainer">
|
|
@@ -467,12 +650,20 @@
|
|
| 467 |
|
| 468 |
<div class="input-area">
|
| 469 |
<div class="input-box">
|
| 470 |
-
<input type="text" id="messageInput" placeholder="How can I help you navigate the law today?"
|
|
|
|
| 471 |
<button class="send-btn" id="sendButton">
|
| 472 |
-
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 473 |
</button>
|
| 474 |
</div>
|
| 475 |
-
<p
|
|
|
|
|
|
|
|
|
|
| 476 |
</div>
|
| 477 |
</main>
|
| 478 |
|
|
@@ -492,13 +683,13 @@
|
|
| 492 |
|
| 493 |
function formatResponse(text) {
|
| 494 |
let formatted = text;
|
| 495 |
-
|
| 496 |
// Header mapping (### titles)
|
| 497 |
formatted = formatted.replace(/### (.*?)\s*(\n|$)/g, "<h3>⚖️ $1</h3>");
|
| 498 |
-
|
| 499 |
// Highlight boxes (! at start of line)
|
| 500 |
formatted = formatted.replace(/^! (.*?)$/gm, '<div class="highlight">$1</div>');
|
| 501 |
-
|
| 502 |
// Bullet points
|
| 503 |
formatted = formatted.replace(/^\d+\.\s(.*?)$/gm, "<li>$1</li>");
|
| 504 |
formatted = formatted.replace(/^\*\s(.*?)$/gm, "<li>$1</li>");
|
|
@@ -519,7 +710,7 @@
|
|
| 519 |
ws.onmessage = (event) => {
|
| 520 |
typingIndicator.classList.add('hidden');
|
| 521 |
welcomeScreen.classList.add('hidden');
|
| 522 |
-
|
| 523 |
if (event.data === '[DONE]') {
|
| 524 |
saveInteraction(currentCaseId, messageInput.value, currentAiMessage);
|
| 525 |
return;
|
|
@@ -545,7 +736,7 @@
|
|
| 545 |
welcomeScreen.classList.add('hidden');
|
| 546 |
const msgDiv = document.createElement('div');
|
| 547 |
msgDiv.className = `message ${type}-msg`;
|
| 548 |
-
|
| 549 |
if (type === 'ai') {
|
| 550 |
msgDiv.innerHTML = formatResponse(content);
|
| 551 |
currentAiMessageElement = msgDiv;
|
|
@@ -563,7 +754,7 @@
|
|
| 563 |
|
| 564 |
createNewMessage('user', text);
|
| 565 |
ws.send(text);
|
| 566 |
-
|
| 567 |
messageInput.value = '';
|
| 568 |
currentAiMessage = '';
|
| 569 |
currentAiMessageElement = null;
|
|
@@ -616,7 +807,7 @@
|
|
| 616 |
headers: { 'Authorization': `Bearer ${token}` }
|
| 617 |
});
|
| 618 |
const thread = await res.json();
|
| 619 |
-
|
| 620 |
currentCaseId = caseId;
|
| 621 |
chatContainer.innerHTML = '';
|
| 622 |
welcomeScreen.classList.add('hidden');
|
|
@@ -626,6 +817,12 @@
|
|
| 626 |
createNewMessage('ai', msg.response);
|
| 627 |
});
|
| 628 |
currentAiMessageElement = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 629 |
} catch (err) { console.error(err); }
|
| 630 |
}
|
| 631 |
|
|
@@ -648,11 +845,31 @@
|
|
| 648 |
currentCaseId = crypto.randomUUID();
|
| 649 |
chatContainer.innerHTML = '';
|
| 650 |
welcomeScreen.classList.remove('hidden');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 651 |
};
|
| 652 |
|
| 653 |
connectWS();
|
| 654 |
loadHistory();
|
| 655 |
fetchUserStatus();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 656 |
</script>
|
| 657 |
</body>
|
|
|
|
| 658 |
</html>
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
| 3 |
+
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8">
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 7 |
<title>AI Legal Assistant | Citizen Dashboard</title>
|
| 8 |
+
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap"
|
| 9 |
+
rel="stylesheet">
|
| 10 |
<style>
|
| 11 |
:root {
|
| 12 |
--bg-dark: #030617;
|
|
|
|
| 193 |
}
|
| 194 |
|
| 195 |
@keyframes pulse-dot {
|
| 196 |
+
0% {
|
| 197 |
+
transform: scale(1);
|
| 198 |
+
opacity: 1;
|
| 199 |
+
}
|
| 200 |
+
|
| 201 |
+
50% {
|
| 202 |
+
transform: scale(1.5);
|
| 203 |
+
opacity: 0.4;
|
| 204 |
+
}
|
| 205 |
+
|
| 206 |
+
100% {
|
| 207 |
+
transform: scale(1);
|
| 208 |
+
opacity: 1;
|
| 209 |
+
}
|
| 210 |
}
|
| 211 |
|
| 212 |
/* MESSAGES AREA */
|
|
|
|
| 227 |
}
|
| 228 |
|
| 229 |
@keyframes message-slide {
|
| 230 |
+
from {
|
| 231 |
+
opacity: 0;
|
| 232 |
+
transform: translateY(20px);
|
| 233 |
+
}
|
| 234 |
+
|
| 235 |
+
to {
|
| 236 |
+
opacity: 1;
|
| 237 |
+
transform: translateY(0);
|
| 238 |
+
}
|
| 239 |
}
|
| 240 |
|
| 241 |
/* USER MSG */
|
|
|
|
| 342 |
animation: typing-blink 1.4s infinite ease-in-out;
|
| 343 |
}
|
| 344 |
|
| 345 |
+
.typing-dots span:nth-child(2) {
|
| 346 |
+
animation-delay: 0.2s;
|
| 347 |
+
}
|
| 348 |
+
|
| 349 |
+
.typing-dots span:nth-child(3) {
|
| 350 |
+
animation-delay: 0.4s;
|
| 351 |
+
}
|
| 352 |
|
| 353 |
@keyframes typing-blink {
|
| 354 |
+
|
| 355 |
+
0%,
|
| 356 |
+
100% {
|
| 357 |
+
opacity: 0.3;
|
| 358 |
+
transform: scale(0.8);
|
| 359 |
+
}
|
| 360 |
+
|
| 361 |
+
50% {
|
| 362 |
+
opacity: 1;
|
| 363 |
+
transform: scale(1.1);
|
| 364 |
+
}
|
| 365 |
}
|
| 366 |
|
| 367 |
@keyframes pulse-border {
|
| 368 |
+
|
| 369 |
+
0%,
|
| 370 |
+
100% {
|
| 371 |
+
border-color: var(--glass-border);
|
| 372 |
+
}
|
| 373 |
+
|
| 374 |
+
50% {
|
| 375 |
+
border-color: var(--accent-blue);
|
| 376 |
+
box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
|
| 377 |
+
}
|
| 378 |
}
|
| 379 |
|
| 380 |
/* INPUT AREA */
|
|
|
|
| 414 |
font-weight: 400;
|
| 415 |
}
|
| 416 |
|
| 417 |
+
.input-box input::placeholder {
|
| 418 |
+
color: var(--text-dim);
|
| 419 |
+
}
|
| 420 |
|
| 421 |
.send-btn {
|
| 422 |
background: var(--accent-blue);
|
|
|
|
| 439 |
}
|
| 440 |
|
| 441 |
/* SCROLLBAR */
|
| 442 |
+
::-webkit-scrollbar {
|
| 443 |
+
width: 6px;
|
| 444 |
+
}
|
| 445 |
+
|
| 446 |
+
::-webkit-scrollbar-track {
|
| 447 |
+
background: transparent;
|
| 448 |
+
}
|
| 449 |
+
|
| 450 |
+
::-webkit-scrollbar-thumb {
|
| 451 |
+
background: var(--glass-border);
|
| 452 |
+
border-radius: 10px;
|
| 453 |
+
}
|
| 454 |
+
|
| 455 |
+
::-webkit-scrollbar-thumb:hover {
|
| 456 |
+
background: var(--text-dim);
|
| 457 |
+
}
|
| 458 |
+
|
| 459 |
+
.hidden {
|
| 460 |
+
display: none !important;
|
| 461 |
+
}
|
| 462 |
+
|
| 463 |
+
/* MOBILE RESPONSIVENESS & SIDEBAR SLIDE OUT */
|
| 464 |
+
.menu-toggle {
|
| 465 |
+
display: none;
|
| 466 |
+
background: none;
|
| 467 |
+
border: none;
|
| 468 |
+
color: var(--text-primary);
|
| 469 |
+
font-size: 1.8rem;
|
| 470 |
+
cursor: pointer;
|
| 471 |
+
align-items: center;
|
| 472 |
+
justify-content: center;
|
| 473 |
+
margin-right: 15px;
|
| 474 |
+
z-index: 101;
|
| 475 |
+
transition: color 0.3s;
|
| 476 |
+
}
|
| 477 |
+
|
| 478 |
+
.menu-toggle:hover {
|
| 479 |
+
color: var(--accent-blue);
|
| 480 |
+
}
|
| 481 |
+
|
| 482 |
+
.sidebar-overlay {
|
| 483 |
+
display: none;
|
| 484 |
+
position: fixed;
|
| 485 |
+
top: 0;
|
| 486 |
+
left: 0;
|
| 487 |
+
width: 100vw;
|
| 488 |
+
height: 100vh;
|
| 489 |
+
background: rgba(3, 6, 23, 0.6);
|
| 490 |
+
backdrop-filter: blur(5px);
|
| 491 |
+
-webkit-backdrop-filter: blur(5px);
|
| 492 |
+
z-index: 99;
|
| 493 |
+
opacity: 0;
|
| 494 |
+
transition: opacity 0.3s ease;
|
| 495 |
+
pointer-events: none;
|
| 496 |
+
}
|
| 497 |
+
|
| 498 |
+
.sidebar-overlay.active {
|
| 499 |
+
display: block;
|
| 500 |
+
opacity: 1;
|
| 501 |
+
pointer-events: auto;
|
| 502 |
+
}
|
| 503 |
+
|
| 504 |
+
@media (max-width: 768px) {
|
| 505 |
+
.menu-toggle {
|
| 506 |
+
display: flex;
|
| 507 |
+
}
|
| 508 |
+
|
| 509 |
+
.sidebar {
|
| 510 |
+
position: fixed;
|
| 511 |
+
top: 0;
|
| 512 |
+
left: -280px;
|
| 513 |
+
height: 100vh;
|
| 514 |
+
width: 280px;
|
| 515 |
+
transform: none !important;
|
| 516 |
+
transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
| 517 |
+
z-index: 1000;
|
| 518 |
+
box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
|
| 519 |
+
}
|
| 520 |
+
|
| 521 |
+
.sidebar.active {
|
| 522 |
+
left: 0;
|
| 523 |
+
}
|
| 524 |
+
|
| 525 |
+
.top-bar {
|
| 526 |
+
padding: 0 15px;
|
| 527 |
+
}
|
| 528 |
+
|
| 529 |
+
.top-bar > div:last-child {
|
| 530 |
+
display: none;
|
| 531 |
+
}
|
| 532 |
+
|
| 533 |
+
.messages-container {
|
| 534 |
+
padding: 25px 15px;
|
| 535 |
+
gap: 20px;
|
| 536 |
+
}
|
| 537 |
+
|
| 538 |
+
.user-msg {
|
| 539 |
+
max-width: 85%;
|
| 540 |
+
padding: 12px 18px;
|
| 541 |
+
font-size: 0.95rem;
|
| 542 |
+
}
|
| 543 |
+
|
| 544 |
+
.ai-msg {
|
| 545 |
+
max-width: 95%;
|
| 546 |
+
padding: 20px;
|
| 547 |
+
font-size: 0.95rem;
|
| 548 |
+
}
|
| 549 |
+
|
| 550 |
+
.ai-msg h3 {
|
| 551 |
+
font-size: 1.15rem;
|
| 552 |
+
margin-bottom: 15px;
|
| 553 |
+
}
|
| 554 |
|
| 555 |
+
.input-area {
|
| 556 |
+
padding: 15px 15px 25px 15px;
|
| 557 |
+
}
|
| 558 |
+
|
| 559 |
+
.input-box input {
|
| 560 |
+
padding: 12px 15px;
|
| 561 |
+
font-size: 0.95rem;
|
| 562 |
+
}
|
| 563 |
|
| 564 |
+
.send-btn {
|
| 565 |
+
width: 44px;
|
| 566 |
+
height: 44px;
|
| 567 |
+
}
|
| 568 |
+
|
| 569 |
+
#welcomeScreen h1 {
|
| 570 |
+
font-size: 1.8rem !important;
|
| 571 |
+
margin-bottom: 10px !important;
|
| 572 |
+
}
|
| 573 |
+
|
| 574 |
+
#welcomeScreen p {
|
| 575 |
+
font-size: 0.95rem !important;
|
| 576 |
+
max-width: 100% !important;
|
| 577 |
+
}
|
| 578 |
+
|
| 579 |
+
#welcomeScreen div:first-child {
|
| 580 |
+
font-size: 3.5rem !important;
|
| 581 |
+
margin-bottom: 15px !important;
|
| 582 |
+
}
|
| 583 |
}
|
| 584 |
</style>
|
| 585 |
</head>
|
| 586 |
+
|
| 587 |
<body>
|
| 588 |
+
<div class="sidebar-overlay" id="sidebarOverlay"></div>
|
| 589 |
<!-- ZONE 1: SIDEBAR -->
|
| 590 |
<aside class="sidebar" id="sidebar">
|
| 591 |
<div class="sidebar-header">
|
|
|
|
| 593 |
<span>+</span> New Case
|
| 594 |
</button>
|
| 595 |
</div>
|
| 596 |
+
|
| 597 |
<div class="history-label">Case Archives</div>
|
| 598 |
<div class="history-list" id="historyList">
|
| 599 |
<!-- Threads pop here -->
|
|
|
|
| 607 |
<div style="font-size: 0.7rem; color: var(--text-dim);">Active Consultation</div>
|
| 608 |
</div>
|
| 609 |
</div>
|
| 610 |
+
<a href="/role"
|
| 611 |
+
style="display: block; margin-top: 15px; color: var(--text-dim); text-decoration: none; font-size: 0.8rem; text-align: center; font-weight: 500;">←
|
| 612 |
+
Change Role</a>
|
| 613 |
</div>
|
| 614 |
</aside>
|
| 615 |
|
| 616 |
<!-- ZONE 2: MAIN AREA -->
|
| 617 |
<main class="main-chat">
|
| 618 |
<header class="top-bar">
|
| 619 |
+
<button class="menu-toggle" id="menuToggle" aria-label="Toggle Sidebar">☰</button>
|
| 620 |
<div class="system-branding">
|
| 621 |
<span style="font-weight: 700; color: white;">⚖️ AI Legal Assistant</span>
|
| 622 |
<div class="status-pill">
|
|
|
|
| 627 |
<div style="font-size: 0.85rem; color: var(--text-dim); font-weight: 500;">Citizen Framework v4.0 PRO</div>
|
| 628 |
</header>
|
| 629 |
|
| 630 |
+
<div id="welcomeScreen"
|
| 631 |
+
style="position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 40px; z-index: 1;">
|
| 632 |
<div style="font-size: 4rem; margin-bottom: 25px; animation: float 6s ease-in-out infinite;">🤖</div>
|
| 633 |
+
<h1 style="font-size: 2.8rem; font-weight: 700; margin-bottom: 12px; letter-spacing: -1px;">Intelligence at
|
| 634 |
+
your service.</h1>
|
| 635 |
+
<p style="color: var(--text-dim); max-width: 550px; line-height: 1.7; font-size: 1.1rem;">Describe your
|
| 636 |
+
legal issue, ask about sections, or get procedural guidance. Your Indian Law expert is ready to assist.
|
| 637 |
+
</p>
|
| 638 |
</div>
|
| 639 |
|
| 640 |
<div class="messages-container" id="chatContainer">
|
|
|
|
| 650 |
|
| 651 |
<div class="input-area">
|
| 652 |
<div class="input-box">
|
| 653 |
+
<input type="text" id="messageInput" placeholder="How can I help you navigate the law today?"
|
| 654 |
+
autocomplete="off">
|
| 655 |
<button class="send-btn" id="sendButton">
|
| 656 |
+
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"
|
| 657 |
+
stroke-linecap="round" stroke-linejoin="round">
|
| 658 |
+
<line x1="22" y1="2" x2="11" y2="13"></line>
|
| 659 |
+
<polygon points="22 2 15 22 11 13 2 9 22 2"></polygon>
|
| 660 |
+
</svg>
|
| 661 |
</button>
|
| 662 |
</div>
|
| 663 |
+
<p
|
| 664 |
+
style="text-align: center; font-size: 0.75rem; color: var(--text-dim); margin-top: 18px; font-weight: 400; opacity: 0.8;">
|
| 665 |
+
⚠️ AI can provide guidance based on IPC/BNS/CrPC. For critical judicial matters, always consult a
|
| 666 |
+
certified advocate.</p>
|
| 667 |
</div>
|
| 668 |
</main>
|
| 669 |
|
|
|
|
| 683 |
|
| 684 |
function formatResponse(text) {
|
| 685 |
let formatted = text;
|
| 686 |
+
|
| 687 |
// Header mapping (### titles)
|
| 688 |
formatted = formatted.replace(/### (.*?)\s*(\n|$)/g, "<h3>⚖️ $1</h3>");
|
| 689 |
+
|
| 690 |
// Highlight boxes (! at start of line)
|
| 691 |
formatted = formatted.replace(/^! (.*?)$/gm, '<div class="highlight">$1</div>');
|
| 692 |
+
|
| 693 |
// Bullet points
|
| 694 |
formatted = formatted.replace(/^\d+\.\s(.*?)$/gm, "<li>$1</li>");
|
| 695 |
formatted = formatted.replace(/^\*\s(.*?)$/gm, "<li>$1</li>");
|
|
|
|
| 710 |
ws.onmessage = (event) => {
|
| 711 |
typingIndicator.classList.add('hidden');
|
| 712 |
welcomeScreen.classList.add('hidden');
|
| 713 |
+
|
| 714 |
if (event.data === '[DONE]') {
|
| 715 |
saveInteraction(currentCaseId, messageInput.value, currentAiMessage);
|
| 716 |
return;
|
|
|
|
| 736 |
welcomeScreen.classList.add('hidden');
|
| 737 |
const msgDiv = document.createElement('div');
|
| 738 |
msgDiv.className = `message ${type}-msg`;
|
| 739 |
+
|
| 740 |
if (type === 'ai') {
|
| 741 |
msgDiv.innerHTML = formatResponse(content);
|
| 742 |
currentAiMessageElement = msgDiv;
|
|
|
|
| 754 |
|
| 755 |
createNewMessage('user', text);
|
| 756 |
ws.send(text);
|
| 757 |
+
|
| 758 |
messageInput.value = '';
|
| 759 |
currentAiMessage = '';
|
| 760 |
currentAiMessageElement = null;
|
|
|
|
| 807 |
headers: { 'Authorization': `Bearer ${token}` }
|
| 808 |
});
|
| 809 |
const thread = await res.json();
|
| 810 |
+
|
| 811 |
currentCaseId = caseId;
|
| 812 |
chatContainer.innerHTML = '';
|
| 813 |
welcomeScreen.classList.add('hidden');
|
|
|
|
| 817 |
createNewMessage('ai', msg.response);
|
| 818 |
});
|
| 819 |
currentAiMessageElement = null;
|
| 820 |
+
if (window.innerWidth <= 768) {
|
| 821 |
+
const sidebar = document.querySelector('.sidebar');
|
| 822 |
+
const sidebarOverlay = document.getElementById('sidebarOverlay');
|
| 823 |
+
if (sidebar) sidebar.classList.remove('active');
|
| 824 |
+
if (sidebarOverlay) sidebarOverlay.classList.remove('active');
|
| 825 |
+
}
|
| 826 |
} catch (err) { console.error(err); }
|
| 827 |
}
|
| 828 |
|
|
|
|
| 845 |
currentCaseId = crypto.randomUUID();
|
| 846 |
chatContainer.innerHTML = '';
|
| 847 |
welcomeScreen.classList.remove('hidden');
|
| 848 |
+
if (window.innerWidth <= 768) {
|
| 849 |
+
const sidebar = document.querySelector('.sidebar');
|
| 850 |
+
const sidebarOverlay = document.getElementById('sidebarOverlay');
|
| 851 |
+
if (sidebar) sidebar.classList.remove('active');
|
| 852 |
+
if (sidebarOverlay) sidebarOverlay.classList.remove('active');
|
| 853 |
+
}
|
| 854 |
};
|
| 855 |
|
| 856 |
connectWS();
|
| 857 |
loadHistory();
|
| 858 |
fetchUserStatus();
|
| 859 |
+
|
| 860 |
+
// Mobile Sidebar Toggling Logic
|
| 861 |
+
const menuToggle = document.getElementById('menuToggle');
|
| 862 |
+
const sidebar = document.querySelector('.sidebar');
|
| 863 |
+
const sidebarOverlay = document.getElementById('sidebarOverlay');
|
| 864 |
+
|
| 865 |
+
function toggleSidebar() {
|
| 866 |
+
sidebar.classList.toggle('active');
|
| 867 |
+
sidebarOverlay.classList.toggle('active');
|
| 868 |
+
}
|
| 869 |
+
|
| 870 |
+
menuToggle.addEventListener('click', toggleSidebar);
|
| 871 |
+
sidebarOverlay.addEventListener('click', toggleSidebar);
|
| 872 |
</script>
|
| 873 |
</body>
|
| 874 |
+
|
| 875 |
</html>
|
src/apps/templates/judgedashboard.html
CHANGED
|
@@ -339,6 +339,10 @@
|
|
| 339 |
.header h1 {
|
| 340 |
font-size: 1.4rem;
|
| 341 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 342 |
}
|
| 343 |
|
| 344 |
/* Animation for case cards */
|
|
|
|
| 339 |
.header h1 {
|
| 340 |
font-size: 1.4rem;
|
| 341 |
}
|
| 342 |
+
|
| 343 |
+
.user-info span {
|
| 344 |
+
display: none;
|
| 345 |
+
}
|
| 346 |
}
|
| 347 |
|
| 348 |
/* Animation for case cards */
|
src/apps/templates/legalrights.html
CHANGED
|
@@ -1,186 +1,320 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
}
|
| 96 |
-
|
| 97 |
-
.safety-tips li {
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
}
|
| 186 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Legal Rights & Protection Portal</title>
|
| 7 |
+
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
| 8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
+
<style>
|
| 10 |
+
:root {
|
| 11 |
+
--primary: #E91E63;
|
| 12 |
+
--secondary: #9C27B0;
|
| 13 |
+
--accent: #FF4081;
|
| 14 |
+
--dark: #2A0944;
|
| 15 |
+
--light: #F8BBD0;
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
* {
|
| 19 |
+
margin: 0;
|
| 20 |
+
padding: 0;
|
| 21 |
+
box-sizing: border-box;
|
| 22 |
+
font-family: 'Poppins', sans-serif;
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
body {
|
| 26 |
+
background: linear-gradient(135deg, #fff5f7 0%, #f8f4ff 100%);
|
| 27 |
+
color: var(--dark);
|
| 28 |
+
min-height: 100vh;
|
| 29 |
+
display: flex;
|
| 30 |
+
flex-direction: column;
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
.safety-tips {
|
| 34 |
+
flex: 1;
|
| 35 |
+
padding: 4rem 5%;
|
| 36 |
+
max-width: 1200px;
|
| 37 |
+
margin: 0 auto;
|
| 38 |
+
width: 100%;
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
.page-title {
|
| 42 |
+
text-align: center;
|
| 43 |
+
font-size: 2.5rem;
|
| 44 |
+
font-weight: 700;
|
| 45 |
+
margin-bottom: 3rem;
|
| 46 |
+
background: linear-gradient(135deg, var(--primary), var(--secondary));
|
| 47 |
+
-webkit-background-clip: text;
|
| 48 |
+
-webkit-text-fill-color: transparent;
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
.safety-tips .grid-container {
|
| 52 |
+
display: grid;
|
| 53 |
+
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
| 54 |
+
gap: 2rem;
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
.safety-tips .feature-card {
|
| 58 |
+
background: rgba(255, 255, 255, 0.9);
|
| 59 |
+
border: 1px solid rgba(233, 30, 99, 0.1);
|
| 60 |
+
padding: 2rem;
|
| 61 |
+
border-radius: 20px;
|
| 62 |
+
backdrop-filter: blur(10px);
|
| 63 |
+
box-shadow: 0 8px 32px rgba(233, 30, 99, 0.05);
|
| 64 |
+
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
.safety-tips .feature-card:hover {
|
| 68 |
+
transform: translateY(-5px);
|
| 69 |
+
box-shadow: 0 12px 40px rgba(233, 30, 99, 0.1);
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
.safety-tips h3 {
|
| 73 |
+
font-size: 1.3rem;
|
| 74 |
+
font-weight: 600;
|
| 75 |
+
margin-bottom: 1.5rem;
|
| 76 |
+
color: var(--dark);
|
| 77 |
+
border-bottom: 2px solid rgba(233, 30, 99, 0.1);
|
| 78 |
+
padding-bottom: 0.8rem;
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
.safety-tips ul {
|
| 82 |
+
list-style: none;
|
| 83 |
+
padding: 0;
|
| 84 |
+
margin: 0;
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
.safety-tips li {
|
| 88 |
+
padding: 0.8rem 0;
|
| 89 |
+
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
|
| 90 |
+
display: flex;
|
| 91 |
+
align-items: center;
|
| 92 |
+
gap: 1rem;
|
| 93 |
+
transition: transform 0.3s ease;
|
| 94 |
+
font-size: 0.95rem;
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
.safety-tips li:last-child {
|
| 98 |
+
border-bottom: none;
|
| 99 |
+
}
|
| 100 |
+
|
| 101 |
+
.safety-tips li:hover {
|
| 102 |
+
transform: translateX(8px);
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
.safety-tips i {
|
| 106 |
+
font-size: 1rem;
|
| 107 |
+
width: 32px;
|
| 108 |
+
height: 32px;
|
| 109 |
+
border-radius: 50%;
|
| 110 |
+
display: flex;
|
| 111 |
+
align-items: center;
|
| 112 |
+
justify-content: center;
|
| 113 |
+
background: linear-gradient(135deg, var(--primary), var(--accent));
|
| 114 |
+
color: white;
|
| 115 |
+
flex-shrink: 0;
|
| 116 |
+
}
|
| 117 |
+
|
| 118 |
+
.safety-kit {
|
| 119 |
+
background: rgba(255, 255, 255, 0.9);
|
| 120 |
+
border-radius: 20px;
|
| 121 |
+
padding: 2rem;
|
| 122 |
+
border: 1px solid rgba(233, 30, 99, 0.1);
|
| 123 |
+
box-shadow: 0 8px 32px rgba(233, 30, 99, 0.05);
|
| 124 |
+
margin: 3rem 0;
|
| 125 |
+
}
|
| 126 |
+
|
| 127 |
+
.safety-kit h2 {
|
| 128 |
+
margin-bottom: 1.5rem;
|
| 129 |
+
font-size: 1.8rem;
|
| 130 |
+
color: var(--dark);
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
.safety-kit p {
|
| 134 |
+
margin-bottom: 1rem;
|
| 135 |
+
font-size: 1rem;
|
| 136 |
+
display: flex;
|
| 137 |
+
align-items: center;
|
| 138 |
+
gap: 0.8rem;
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
.action-buttons {
|
| 142 |
+
display: flex;
|
| 143 |
+
gap: 1.5rem;
|
| 144 |
+
flex-wrap: wrap;
|
| 145 |
+
margin-top: 2rem;
|
| 146 |
+
}
|
| 147 |
+
|
| 148 |
+
.safety-button {
|
| 149 |
+
background: linear-gradient(135deg, var(--primary), var(--secondary));
|
| 150 |
+
border: none;
|
| 151 |
+
padding: 0.9rem 1.8rem;
|
| 152 |
+
border-radius: 50px;
|
| 153 |
+
color: white;
|
| 154 |
+
font-weight: 600;
|
| 155 |
+
cursor: pointer;
|
| 156 |
+
transition: all 0.3s ease;
|
| 157 |
+
display: inline-flex;
|
| 158 |
+
align-items: center;
|
| 159 |
+
gap: 10px;
|
| 160 |
+
box-shadow: 0 4px 15px rgba(233, 30, 99, 0.2);
|
| 161 |
+
}
|
| 162 |
+
|
| 163 |
+
.safety-button:hover {
|
| 164 |
+
transform: translateY(-2px);
|
| 165 |
+
box-shadow: 0 6px 20px rgba(233, 30, 99, 0.3);
|
| 166 |
+
}
|
| 167 |
+
|
| 168 |
+
.back-button {
|
| 169 |
+
background: #555;
|
| 170 |
+
border: none;
|
| 171 |
+
padding: 0.9rem 1.8rem;
|
| 172 |
+
border-radius: 50px;
|
| 173 |
+
color: white;
|
| 174 |
+
font-weight: 600;
|
| 175 |
+
cursor: pointer;
|
| 176 |
+
transition: all 0.3s ease;
|
| 177 |
+
display: inline-flex;
|
| 178 |
+
align-items: center;
|
| 179 |
+
gap: 10px;
|
| 180 |
+
}
|
| 181 |
+
|
| 182 |
+
.back-button:hover {
|
| 183 |
+
background: #444;
|
| 184 |
+
transform: translateY(-2px);
|
| 185 |
+
}
|
| 186 |
+
|
| 187 |
+
@media (max-width: 768px) {
|
| 188 |
+
.safety-tips {
|
| 189 |
+
padding: 2rem 5%;
|
| 190 |
+
}
|
| 191 |
+
.page-title {
|
| 192 |
+
font-size: 2rem;
|
| 193 |
+
margin-bottom: 2rem;
|
| 194 |
+
}
|
| 195 |
+
.safety-tips .feature-card {
|
| 196 |
+
padding: 1.5rem;
|
| 197 |
+
}
|
| 198 |
+
.safety-kit {
|
| 199 |
+
padding: 1.5rem;
|
| 200 |
+
}
|
| 201 |
+
.action-buttons {
|
| 202 |
+
flex-direction: column;
|
| 203 |
+
gap: 1rem;
|
| 204 |
+
}
|
| 205 |
+
.safety-button, .back-button {
|
| 206 |
+
width: 100%;
|
| 207 |
+
justify-content: center;
|
| 208 |
+
}
|
| 209 |
+
}
|
| 210 |
+
</style>
|
| 211 |
+
</head>
|
| 212 |
+
<body>
|
| 213 |
+
<section class="safety-tips" id="safety">
|
| 214 |
+
<h1 class="page-title">Legal Rights & Protection</h1>
|
| 215 |
+
|
| 216 |
+
<div class="grid-container">
|
| 217 |
+
<div class="feature-card">
|
| 218 |
+
<h3>⚖️ Fundamental Legal Rights</h3>
|
| 219 |
+
<ul>
|
| 220 |
+
<li><i class="fas fa-balance-scale"></i> Right to equality (Article 14-18)</li>
|
| 221 |
+
<li><i class="fas fa-university"></i> Right to education (Article 21A)</li>
|
| 222 |
+
<li><i class="fas fa-gavel"></i> Right to legal aid under Article 39A</li>
|
| 223 |
+
<li><i class="fas fa-user-shield"></i> Protection from arrest (Section 41A CrPC)</li>
|
| 224 |
+
</ul>
|
| 225 |
+
</div>
|
| 226 |
+
|
| 227 |
+
<div class="feature-card">
|
| 228 |
+
<h3>👩⚖️ Women's Legal Rights</h3>
|
| 229 |
+
<ul>
|
| 230 |
+
<li><i class="fas fa-venus"></i> Free legal aid (Legal Services Authorities Act)</li>
|
| 231 |
+
<li><i class="fas fa-home"></i> Right to residence (PWDVA, 2005)</li>
|
| 232 |
+
<li><i class="fas fa-shield-alt"></i> Sexual harassment protection (POSH Act, 2013)</li>
|
| 233 |
+
<li><i class="fas fa-exclamation-triangle"></i> Immediate assistance under Zero FIR</li>
|
| 234 |
+
</ul>
|
| 235 |
+
</div>
|
| 236 |
+
|
| 237 |
+
<div class="feature-card">
|
| 238 |
+
<h3>🛑 Consumer Rights</h3>
|
| 239 |
+
<ul>
|
| 240 |
+
<li><i class="fas fa-receipt"></i> Right to be informed of product details</li>
|
| 241 |
+
<li><i class="fas fa-shield-alt"></i> Right to seek redressal for unfair practices</li>
|
| 242 |
+
<li><i class="fas fa-handshake"></i> Right to consumer education</li>
|
| 243 |
+
<li><i class="fas fa-money-bill-wave"></i> Claim compensation for defective goods</li>
|
| 244 |
+
</ul>
|
| 245 |
+
</div>
|
| 246 |
+
</div>
|
| 247 |
+
|
| 248 |
+
<!-- Legal Resources Section -->
|
| 249 |
+
<div class="safety-kit">
|
| 250 |
+
<h2>Know Your Rights Checklist</h2>
|
| 251 |
+
<p>✅ Keep a copy of important legal documents (Aadhaar, PAN, Passport)</p>
|
| 252 |
+
<p>✅ Know your rights under IPC, CrPC, and the Constitution</p>
|
| 253 |
+
<p>✅ Contact the National Legal Services Authority (NALSA) for legal aid</p>
|
| 254 |
+
<p>✅ Save helpline numbers: 1091 (Women), 14400 (Consumer complaints)</p>
|
| 255 |
+
</div>
|
| 256 |
+
|
| 257 |
+
<div class="action-buttons">
|
| 258 |
+
<button class="safety-button" onclick="downloadLegalGuide()">
|
| 259 |
+
<i class="fas fa-download"></i>
|
| 260 |
+
Download Legal Rights Guide
|
| 261 |
+
</button>
|
| 262 |
+
<button class="back-button" onclick="goBack()">
|
| 263 |
+
<i class="fas fa-arrow-left"></i>
|
| 264 |
+
Back to Previous Page
|
| 265 |
+
</button>
|
| 266 |
+
</div>
|
| 267 |
+
</section>
|
| 268 |
+
|
| 269 |
+
<script>
|
| 270 |
+
function downloadLegalGuide() {
|
| 271 |
+
const content = `==================================================
|
| 272 |
+
LEGAL RIGHTS & PROTECTION GUIDE
|
| 273 |
+
==================================================
|
| 274 |
+
|
| 275 |
+
1. FUNDAMENTAL LEGAL RIGHTS:
|
| 276 |
+
- Right to equality (Article 14-18 of the Constitution).
|
| 277 |
+
- Right to education (Article 21A - Free and compulsory education).
|
| 278 |
+
- Right to legal aid (Article 39A - Equal justice and free legal aid).
|
| 279 |
+
- Protection from arrest (Section 41A CrPC - Procedure of arrest).
|
| 280 |
+
|
| 281 |
+
2. WOMEN'S LEGAL RIGHTS:
|
| 282 |
+
- Right to free legal aid (Legal Services Authorities Act).
|
| 283 |
+
- Right to residence (Protection of Women from Domestic Violence Act, 2005).
|
| 284 |
+
- Protection against sexual harassment at the workplace (POSH Act, 2013).
|
| 285 |
+
- Right to immediate assistance under Zero FIR.
|
| 286 |
+
|
| 287 |
+
3. CONSUMER RIGHTS:
|
| 288 |
+
- Right to be informed about product/service details before purchase.
|
| 289 |
+
- Right to seek redressal for unfair trade practices.
|
| 290 |
+
- Right to consumer education and awareness.
|
| 291 |
+
- Right to claim compensation for defective goods.
|
| 292 |
+
|
| 293 |
+
==================================================
|
| 294 |
+
REPORT OFFENSES / CONTACT HELPLINES:
|
| 295 |
+
National Emergency: 112
|
| 296 |
+
Women's Helpline: 1091
|
| 297 |
+
Consumer Complaints Helpline: 14400 / 1915
|
| 298 |
+
==================================================`;
|
| 299 |
+
|
| 300 |
+
const blob = new Blob([content], { type: 'text/plain' });
|
| 301 |
+
const url = URL.createObjectURL(blob);
|
| 302 |
+
const a = document.createElement('a');
|
| 303 |
+
a.href = url;
|
| 304 |
+
a.download = 'Legal_Rights_Guide.txt';
|
| 305 |
+
document.body.appendChild(a);
|
| 306 |
+
a.click();
|
| 307 |
+
document.body.removeChild(a);
|
| 308 |
+
URL.revokeObjectURL(url);
|
| 309 |
+
}
|
| 310 |
+
|
| 311 |
+
function goBack() {
|
| 312 |
+
if (window.history.length > 1) {
|
| 313 |
+
window.history.back();
|
| 314 |
+
} else {
|
| 315 |
+
window.location.href = '/woman.html';
|
| 316 |
+
}
|
| 317 |
+
}
|
| 318 |
+
</script>
|
| 319 |
+
</body>
|
| 320 |
+
</html>
|
src/apps/templates/minor.html
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
<title>AI Legal Assistant | Friendly Law Learning</title>
|
| 7 |
-
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap"
|
|
|
|
| 8 |
<style>
|
| 9 |
:root {
|
| 10 |
--bg-dark: #030617;
|
|
@@ -17,43 +19,256 @@
|
|
| 17 |
--glass-border: rgba(255, 255, 255, 0.08);
|
| 18 |
}
|
| 19 |
|
| 20 |
-
* {
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
-
.sidebar { width: 280px; background: var(--sidebar-bg); border-right: 1px solid var(--glass-border); display: flex; flex-direction: column; z-index: 100; }
|
| 24 |
-
.sidebar-header { padding: 30px 20px; }
|
| 25 |
.new-chat-btn {
|
| 26 |
-
width: 100%;
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
box-shadow: 0 10px 20px rgba(16, 185, 129, 0.2);
|
| 29 |
}
|
| 30 |
-
.new-chat-btn:hover { transform: translateY(-2px); box-shadow: 0 15px 25px rgba(16, 185, 129, 0.3); }
|
| 31 |
|
| 32 |
-
.
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
|
|
|
|
|
|
| 40 |
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
|
| 47 |
-
.messages-container {
|
| 48 |
-
|
| 49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
|
| 51 |
-
.
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
|
| 58 |
.typing {
|
| 59 |
display: flex;
|
|
@@ -88,29 +303,217 @@
|
|
| 88 |
animation: typing-blink 1.4s infinite ease-in-out;
|
| 89 |
}
|
| 90 |
|
| 91 |
-
.typing-dots span:nth-child(2) {
|
| 92 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
|
| 94 |
@keyframes typing-blink {
|
| 95 |
-
|
| 96 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
}
|
| 98 |
|
| 99 |
@keyframes pulse-border {
|
| 100 |
-
|
| 101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
}
|
| 103 |
|
| 104 |
-
.input-area {
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 109 |
|
| 110 |
-
.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 111 |
</style>
|
| 112 |
</head>
|
|
|
|
| 113 |
<body>
|
|
|
|
| 114 |
<aside class="sidebar">
|
| 115 |
<div class="sidebar-header">
|
| 116 |
<button class="new-chat-btn" id="newChatBtn"><span>+</span> Start New Chat</button>
|
|
@@ -126,24 +529,32 @@
|
|
| 126 |
</div>
|
| 127 |
</div>
|
| 128 |
<div style="display: flex; flex-direction: column; gap: 8px; margin-top: 15px;">
|
| 129 |
-
<a href="/role"
|
|
|
|
|
|
|
| 130 |
</div>
|
| 131 |
</div>
|
| 132 |
</aside>
|
| 133 |
|
| 134 |
<main class="main-chat">
|
| 135 |
<header class="top-bar">
|
|
|
|
| 136 |
<div class="system-branding">
|
| 137 |
<span style="font-weight: 700; color: white;">⚖️ Law Bot (Fun Mode)</span>
|
| 138 |
-
<div class="status-pill">
|
|
|
|
|
|
|
| 139 |
</div>
|
| 140 |
<div style="font-size: 0.85rem; color: var(--text-dim); font-weight: 500;">Easy Explainer v4.0</div>
|
| 141 |
</header>
|
| 142 |
|
| 143 |
-
<div id="welcomeScreen"
|
|
|
|
| 144 |
<div style="font-size: 4rem; margin-bottom: 25px;">👦</div>
|
| 145 |
-
<h1 style="font-size: 2.8rem; font-weight: 700; margin-bottom: 12px; letter-spacing: -1px;">Law made simple.
|
| 146 |
-
<
|
|
|
|
|
|
|
| 147 |
</div>
|
| 148 |
|
| 149 |
<div class="messages-container" id="chatContainer"></div>
|
|
@@ -156,9 +567,14 @@
|
|
| 156 |
|
| 157 |
<div class="input-area">
|
| 158 |
<div class="input-box">
|
| 159 |
-
<input type="text" id="messageInput" placeholder="Ask your buddy a legal question..."
|
|
|
|
| 160 |
<button class="send-btn" id="sendButton">
|
| 161 |
-
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 162 |
</button>
|
| 163 |
</div>
|
| 164 |
</div>
|
|
@@ -287,6 +703,12 @@
|
|
| 287 |
createNewMessage('ai', msg.response);
|
| 288 |
});
|
| 289 |
currentAiMessageElement = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 290 |
} catch (err) { console.error(err); }
|
| 291 |
}
|
| 292 |
|
|
@@ -309,11 +731,31 @@
|
|
| 309 |
currentCaseId = crypto.randomUUID();
|
| 310 |
chatContainer.innerHTML = '';
|
| 311 |
welcomeScreen.classList.remove('hidden');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 312 |
};
|
| 313 |
|
| 314 |
connectWS();
|
| 315 |
loadHistory();
|
| 316 |
fetchUserStatus();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 317 |
</script>
|
| 318 |
</body>
|
|
|
|
| 319 |
</html>
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
| 3 |
+
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8">
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 7 |
<title>AI Legal Assistant | Friendly Law Learning</title>
|
| 8 |
+
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap"
|
| 9 |
+
rel="stylesheet">
|
| 10 |
<style>
|
| 11 |
:root {
|
| 12 |
--bg-dark: #030617;
|
|
|
|
| 19 |
--glass-border: rgba(255, 255, 255, 0.08);
|
| 20 |
}
|
| 21 |
|
| 22 |
+
* {
|
| 23 |
+
margin: 0;
|
| 24 |
+
padding: 0;
|
| 25 |
+
box-sizing: border-box;
|
| 26 |
+
font-family: 'Poppins', sans-serif;
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
body {
|
| 30 |
+
background-color: var(--bg-dark);
|
| 31 |
+
color: var(--text-primary);
|
| 32 |
+
height: 100vh;
|
| 33 |
+
display: flex;
|
| 34 |
+
overflow: hidden;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
.sidebar {
|
| 38 |
+
width: 280px;
|
| 39 |
+
background: var(--sidebar-bg);
|
| 40 |
+
border-right: 1px solid var(--glass-border);
|
| 41 |
+
display: flex;
|
| 42 |
+
flex-direction: column;
|
| 43 |
+
z-index: 100;
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
.sidebar-header {
|
| 47 |
+
padding: 30px 20px;
|
| 48 |
+
}
|
| 49 |
|
|
|
|
|
|
|
| 50 |
.new-chat-btn {
|
| 51 |
+
width: 100%;
|
| 52 |
+
padding: 14px;
|
| 53 |
+
background: linear-gradient(135deg, var(--accent-green), var(--accent-teal));
|
| 54 |
+
border: none;
|
| 55 |
+
border-radius: 12px;
|
| 56 |
+
color: white;
|
| 57 |
+
font-weight: 600;
|
| 58 |
+
display: flex;
|
| 59 |
+
align-items: center;
|
| 60 |
+
justify-content: center;
|
| 61 |
+
gap: 10px;
|
| 62 |
+
cursor: pointer;
|
| 63 |
+
transition: 0.3s;
|
| 64 |
box-shadow: 0 10px 20px rgba(16, 185, 129, 0.2);
|
| 65 |
}
|
|
|
|
| 66 |
|
| 67 |
+
.new-chat-btn:hover {
|
| 68 |
+
transform: translateY(-2px);
|
| 69 |
+
box-shadow: 0 15px 25px rgba(16, 185, 129, 0.3);
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
.history-label {
|
| 73 |
+
padding: 0 20px 10px;
|
| 74 |
+
font-size: 0.75rem;
|
| 75 |
+
text-transform: uppercase;
|
| 76 |
+
letter-spacing: 2px;
|
| 77 |
+
color: var(--text-dim);
|
| 78 |
+
font-weight: 700;
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
.history-list {
|
| 82 |
+
flex: 1;
|
| 83 |
+
overflow-y: auto;
|
| 84 |
+
padding: 10px;
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
.history-item {
|
| 88 |
+
padding: 12px 15px;
|
| 89 |
+
border-radius: 10px;
|
| 90 |
+
margin-bottom: 5px;
|
| 91 |
+
cursor: pointer;
|
| 92 |
+
transition: 0.2s;
|
| 93 |
+
font-size: 0.85rem;
|
| 94 |
+
color: var(--text-dim);
|
| 95 |
+
display: flex;
|
| 96 |
+
align-items: center;
|
| 97 |
+
gap: 10px;
|
| 98 |
+
border: 1px solid transparent;
|
| 99 |
+
white-space: nowrap;
|
| 100 |
+
overflow: hidden;
|
| 101 |
+
text-overflow: ellipsis;
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
+
.history-item:hover {
|
| 105 |
+
background: var(--glass-bg);
|
| 106 |
+
color: white;
|
| 107 |
+
border-color: var(--glass-border);
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
.sidebar-footer {
|
| 111 |
+
padding: 20px;
|
| 112 |
+
border-top: 1px solid var(--glass-border);
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
+
.user-badge {
|
| 116 |
+
display: flex;
|
| 117 |
+
align-items: center;
|
| 118 |
+
gap: 12px;
|
| 119 |
+
padding: 10px;
|
| 120 |
+
background: var(--glass-bg);
|
| 121 |
+
border-radius: 12px;
|
| 122 |
+
}
|
| 123 |
+
|
| 124 |
+
.user-avatar {
|
| 125 |
+
width: 32px;
|
| 126 |
+
height: 32px;
|
| 127 |
+
background: var(--accent-green);
|
| 128 |
+
border-radius: 8px;
|
| 129 |
+
display: flex;
|
| 130 |
+
align-items: center;
|
| 131 |
+
justify-content: center;
|
| 132 |
+
font-weight: 700;
|
| 133 |
+
color: white;
|
| 134 |
+
font-size: 0.8rem;
|
| 135 |
+
}
|
| 136 |
+
|
| 137 |
+
.main-chat {
|
| 138 |
+
flex: 1;
|
| 139 |
+
display: flex;
|
| 140 |
+
flex-direction: column;
|
| 141 |
+
position: relative;
|
| 142 |
+
background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.03), transparent);
|
| 143 |
+
}
|
| 144 |
+
|
| 145 |
+
.top-bar {
|
| 146 |
+
height: 70px;
|
| 147 |
+
background: rgba(3, 6, 23, 0.82);
|
| 148 |
+
backdrop-filter: blur(25px);
|
| 149 |
+
border-bottom: 1px solid var(--glass-border);
|
| 150 |
+
display: flex;
|
| 151 |
+
align-items: center;
|
| 152 |
+
justify-content: space-between;
|
| 153 |
+
padding: 0 40px;
|
| 154 |
+
z-index: 50;
|
| 155 |
+
}
|
| 156 |
+
|
| 157 |
+
.status-pill {
|
| 158 |
+
display: flex;
|
| 159 |
+
align-items: center;
|
| 160 |
+
gap: 8px;
|
| 161 |
+
font-size: 0.75rem;
|
| 162 |
+
background: rgba(16, 185, 129, 0.1);
|
| 163 |
+
color: #34d399;
|
| 164 |
+
padding: 4px 12px;
|
| 165 |
+
border-radius: 20px;
|
| 166 |
+
font-weight: 600;
|
| 167 |
+
border: 1px solid rgba(16, 185, 129, 0.2);
|
| 168 |
+
}
|
| 169 |
+
|
| 170 |
+
.status-dot {
|
| 171 |
+
width: 6px;
|
| 172 |
+
height: 6px;
|
| 173 |
+
background: #34d399;
|
| 174 |
+
border-radius: 50%;
|
| 175 |
+
animation: pulse-dot 2s infinite;
|
| 176 |
+
}
|
| 177 |
+
|
| 178 |
+
@keyframes pulse-dot {
|
| 179 |
|
| 180 |
+
0%,
|
| 181 |
+
100% {
|
| 182 |
+
transform: scale(1);
|
| 183 |
+
opacity: 1;
|
| 184 |
+
}
|
| 185 |
|
| 186 |
+
50% {
|
| 187 |
+
transform: scale(1.5);
|
| 188 |
+
opacity: 0.4;
|
| 189 |
+
}
|
| 190 |
+
}
|
| 191 |
|
| 192 |
+
.messages-container {
|
| 193 |
+
flex: 1;
|
| 194 |
+
overflow-y: auto;
|
| 195 |
+
padding: 40px 10%;
|
| 196 |
+
display: flex;
|
| 197 |
+
flex-direction: column;
|
| 198 |
+
gap: 30px;
|
| 199 |
+
scroll-behavior: smooth;
|
| 200 |
+
}
|
| 201 |
|
| 202 |
+
.message {
|
| 203 |
+
max-width: 850px;
|
| 204 |
+
animation: message-slide 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
|
| 205 |
+
}
|
| 206 |
+
|
| 207 |
+
@keyframes message-slide {
|
| 208 |
+
from {
|
| 209 |
+
opacity: 0;
|
| 210 |
+
transform: translateY(20px);
|
| 211 |
+
}
|
| 212 |
+
|
| 213 |
+
to {
|
| 214 |
+
opacity: 1;
|
| 215 |
+
transform: translateY(0);
|
| 216 |
+
}
|
| 217 |
+
}
|
| 218 |
+
|
| 219 |
+
.user-msg {
|
| 220 |
+
align-self: flex-end;
|
| 221 |
+
background: linear-gradient(135deg, var(--accent-green), var(--accent-teal));
|
| 222 |
+
padding: 16px 24px;
|
| 223 |
+
border-radius: 20px 20px 4px 20px;
|
| 224 |
+
color: white;
|
| 225 |
+
max-width: 70%;
|
| 226 |
+
line-height: 1.6;
|
| 227 |
+
}
|
| 228 |
+
|
| 229 |
+
.ai-msg {
|
| 230 |
+
align-self: flex-start;
|
| 231 |
+
background: var(--glass-bg);
|
| 232 |
+
border: 1px solid var(--glass-border);
|
| 233 |
+
padding: 30px;
|
| 234 |
+
border-radius: 20px 20px 20px 4px;
|
| 235 |
+
max-width: 85%;
|
| 236 |
+
line-height: 1.8;
|
| 237 |
+
color: #e2e8f0;
|
| 238 |
+
}
|
| 239 |
+
|
| 240 |
+
.ai-msg h3 {
|
| 241 |
+
color: #34d399;
|
| 242 |
+
font-size: 1.3rem;
|
| 243 |
+
margin-bottom: 20px;
|
| 244 |
+
font-weight: 600;
|
| 245 |
+
display: flex;
|
| 246 |
+
align-items: center;
|
| 247 |
+
gap: 12px;
|
| 248 |
+
}
|
| 249 |
+
|
| 250 |
+
.ai-msg li {
|
| 251 |
+
position: relative;
|
| 252 |
+
padding-left: 28px;
|
| 253 |
+
margin-bottom: 15px;
|
| 254 |
+
}
|
| 255 |
+
|
| 256 |
+
.ai-msg li::before {
|
| 257 |
+
content: "✨";
|
| 258 |
+
position: absolute;
|
| 259 |
+
left: 0;
|
| 260 |
+
font-size: 0.9rem;
|
| 261 |
+
}
|
| 262 |
+
|
| 263 |
+
.highlight {
|
| 264 |
+
background: rgba(16, 185, 129, 0.08);
|
| 265 |
+
border-left: 4px solid var(--accent-green);
|
| 266 |
+
padding: 22px;
|
| 267 |
+
margin: 25px 0;
|
| 268 |
+
border-radius: 0 16px 16px 0;
|
| 269 |
+
font-weight: 500;
|
| 270 |
+
color: #fff;
|
| 271 |
+
}
|
| 272 |
|
| 273 |
.typing {
|
| 274 |
display: flex;
|
|
|
|
| 303 |
animation: typing-blink 1.4s infinite ease-in-out;
|
| 304 |
}
|
| 305 |
|
| 306 |
+
.typing-dots span:nth-child(2) {
|
| 307 |
+
animation-delay: 0.2s;
|
| 308 |
+
}
|
| 309 |
+
|
| 310 |
+
.typing-dots span:nth-child(3) {
|
| 311 |
+
animation-delay: 0.4s;
|
| 312 |
+
}
|
| 313 |
|
| 314 |
@keyframes typing-blink {
|
| 315 |
+
|
| 316 |
+
0%,
|
| 317 |
+
100% {
|
| 318 |
+
opacity: 0.3;
|
| 319 |
+
transform: scale(0.8);
|
| 320 |
+
}
|
| 321 |
+
|
| 322 |
+
50% {
|
| 323 |
+
opacity: 1;
|
| 324 |
+
transform: scale(1.1);
|
| 325 |
+
}
|
| 326 |
}
|
| 327 |
|
| 328 |
@keyframes pulse-border {
|
| 329 |
+
|
| 330 |
+
0%,
|
| 331 |
+
100% {
|
| 332 |
+
border-color: var(--glass-border);
|
| 333 |
+
}
|
| 334 |
+
|
| 335 |
+
50% {
|
| 336 |
+
border-color: #34d399;
|
| 337 |
+
box-shadow: 0 0 20px rgba(52, 211, 153, 0.1);
|
| 338 |
+
}
|
| 339 |
}
|
| 340 |
|
| 341 |
+
.input-area {
|
| 342 |
+
padding: 30px 10%;
|
| 343 |
+
background: linear-gradient(to top, var(--bg-dark) 50%, transparent);
|
| 344 |
+
border-top: 1px solid var(--glass-border);
|
| 345 |
+
z-index: 60;
|
| 346 |
+
}
|
| 347 |
+
|
| 348 |
+
.input-box {
|
| 349 |
+
background: rgba(255, 255, 255, 0.04);
|
| 350 |
+
border: 1px solid var(--glass-border);
|
| 351 |
+
border-radius: 18px;
|
| 352 |
+
padding: 6px;
|
| 353 |
+
display: flex;
|
| 354 |
+
align-items: center;
|
| 355 |
+
transition: 0.3s;
|
| 356 |
+
}
|
| 357 |
|
| 358 |
+
.input-box:focus-within {
|
| 359 |
+
border-color: var(--accent-green);
|
| 360 |
+
box-shadow: 0 0 30px rgba(16, 185, 129, 0.2);
|
| 361 |
+
}
|
| 362 |
+
|
| 363 |
+
.input-box input {
|
| 364 |
+
flex: 1;
|
| 365 |
+
background: transparent;
|
| 366 |
+
border: none;
|
| 367 |
+
padding: 16px 24px;
|
| 368 |
+
color: white;
|
| 369 |
+
font-size: 1.05rem;
|
| 370 |
+
outline: none;
|
| 371 |
+
}
|
| 372 |
+
|
| 373 |
+
.send-btn {
|
| 374 |
+
background: var(--accent-green);
|
| 375 |
+
color: white;
|
| 376 |
+
border: none;
|
| 377 |
+
width: 50px;
|
| 378 |
+
height: 50px;
|
| 379 |
+
border-radius: 14px;
|
| 380 |
+
display: flex;
|
| 381 |
+
align-items: center;
|
| 382 |
+
justify-content: center;
|
| 383 |
+
cursor: pointer;
|
| 384 |
+
transition: 0.3s;
|
| 385 |
+
margin-right: 6px;
|
| 386 |
+
}
|
| 387 |
+
|
| 388 |
+
.hidden {
|
| 389 |
+
display: none !important;
|
| 390 |
+
}
|
| 391 |
+
|
| 392 |
+
/* MOBILE RESPONSIVENESS */
|
| 393 |
+
.menu-toggle {
|
| 394 |
+
display: none;
|
| 395 |
+
background: none;
|
| 396 |
+
border: none;
|
| 397 |
+
color: var(--text-primary);
|
| 398 |
+
font-size: 1.8rem;
|
| 399 |
+
cursor: pointer;
|
| 400 |
+
align-items: center;
|
| 401 |
+
justify-content: center;
|
| 402 |
+
margin-right: 15px;
|
| 403 |
+
z-index: 101;
|
| 404 |
+
transition: color 0.3s;
|
| 405 |
+
}
|
| 406 |
+
|
| 407 |
+
.menu-toggle:hover {
|
| 408 |
+
color: var(--accent-green);
|
| 409 |
+
}
|
| 410 |
+
|
| 411 |
+
.sidebar-overlay {
|
| 412 |
+
display: none;
|
| 413 |
+
position: fixed;
|
| 414 |
+
top: 0;
|
| 415 |
+
left: 0;
|
| 416 |
+
width: 100vw;
|
| 417 |
+
height: 100vh;
|
| 418 |
+
background: rgba(3, 6, 23, 0.6);
|
| 419 |
+
backdrop-filter: blur(5px);
|
| 420 |
+
-webkit-backdrop-filter: blur(5px);
|
| 421 |
+
z-index: 99;
|
| 422 |
+
opacity: 0;
|
| 423 |
+
transition: opacity 0.3s ease;
|
| 424 |
+
pointer-events: none;
|
| 425 |
+
}
|
| 426 |
+
|
| 427 |
+
.sidebar-overlay.active {
|
| 428 |
+
display: block;
|
| 429 |
+
opacity: 1;
|
| 430 |
+
pointer-events: auto;
|
| 431 |
+
}
|
| 432 |
+
|
| 433 |
+
@media (max-width: 768px) {
|
| 434 |
+
.menu-toggle {
|
| 435 |
+
display: flex;
|
| 436 |
+
}
|
| 437 |
+
|
| 438 |
+
.sidebar {
|
| 439 |
+
position: fixed;
|
| 440 |
+
top: 0;
|
| 441 |
+
left: -280px;
|
| 442 |
+
height: 100vh;
|
| 443 |
+
width: 280px;
|
| 444 |
+
transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
| 445 |
+
z-index: 1000;
|
| 446 |
+
box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
|
| 447 |
+
}
|
| 448 |
+
|
| 449 |
+
.sidebar.active {
|
| 450 |
+
left: 0;
|
| 451 |
+
}
|
| 452 |
+
|
| 453 |
+
.top-bar {
|
| 454 |
+
padding: 0 15px;
|
| 455 |
+
}
|
| 456 |
+
|
| 457 |
+
.top-bar > div:last-child {
|
| 458 |
+
display: none;
|
| 459 |
+
}
|
| 460 |
+
|
| 461 |
+
.messages-container {
|
| 462 |
+
padding: 25px 15px;
|
| 463 |
+
gap: 20px;
|
| 464 |
+
}
|
| 465 |
+
|
| 466 |
+
.user-msg {
|
| 467 |
+
max-width: 85%;
|
| 468 |
+
padding: 12px 18px;
|
| 469 |
+
font-size: 0.95rem;
|
| 470 |
+
}
|
| 471 |
+
|
| 472 |
+
.ai-msg {
|
| 473 |
+
max-width: 95%;
|
| 474 |
+
padding: 20px;
|
| 475 |
+
font-size: 0.95rem;
|
| 476 |
+
}
|
| 477 |
+
|
| 478 |
+
.ai-msg h3 {
|
| 479 |
+
font-size: 1.15rem;
|
| 480 |
+
margin-bottom: 15px;
|
| 481 |
+
}
|
| 482 |
+
|
| 483 |
+
.input-area {
|
| 484 |
+
padding: 15px 15px 25px 15px;
|
| 485 |
+
}
|
| 486 |
+
|
| 487 |
+
.input-box input {
|
| 488 |
+
padding: 12px 15px;
|
| 489 |
+
font-size: 0.95rem;
|
| 490 |
+
}
|
| 491 |
+
|
| 492 |
+
.send-btn {
|
| 493 |
+
width: 44px;
|
| 494 |
+
height: 44px;
|
| 495 |
+
}
|
| 496 |
+
|
| 497 |
+
#welcomeScreen h1 {
|
| 498 |
+
font-size: 1.8rem !important;
|
| 499 |
+
margin-bottom: 10px !important;
|
| 500 |
+
}
|
| 501 |
+
|
| 502 |
+
#welcomeScreen p {
|
| 503 |
+
font-size: 0.95rem !important;
|
| 504 |
+
max-width: 100% !important;
|
| 505 |
+
}
|
| 506 |
+
|
| 507 |
+
#welcomeScreen div:first-child {
|
| 508 |
+
font-size: 3.5rem !important;
|
| 509 |
+
margin-bottom: 15px !important;
|
| 510 |
+
}
|
| 511 |
+
}
|
| 512 |
</style>
|
| 513 |
</head>
|
| 514 |
+
|
| 515 |
<body>
|
| 516 |
+
<div class="sidebar-overlay" id="sidebarOverlay"></div>
|
| 517 |
<aside class="sidebar">
|
| 518 |
<div class="sidebar-header">
|
| 519 |
<button class="new-chat-btn" id="newChatBtn"><span>+</span> Start New Chat</button>
|
|
|
|
| 529 |
</div>
|
| 530 |
</div>
|
| 531 |
<div style="display: flex; flex-direction: column; gap: 8px; margin-top: 15px;">
|
| 532 |
+
<a href="/role"
|
| 533 |
+
style="color: var(--text-dim); text-decoration: none; font-size: 0.8rem; text-align: center;">←
|
| 534 |
+
Change Role</a>
|
| 535 |
</div>
|
| 536 |
</div>
|
| 537 |
</aside>
|
| 538 |
|
| 539 |
<main class="main-chat">
|
| 540 |
<header class="top-bar">
|
| 541 |
+
<button class="menu-toggle" id="menuToggle" aria-label="Toggle Sidebar">☰</button>
|
| 542 |
<div class="system-branding">
|
| 543 |
<span style="font-weight: 700; color: white;">⚖️ Law Bot (Fun Mode)</span>
|
| 544 |
+
<div class="status-pill">
|
| 545 |
+
<div class="status-dot"></div>Learning Buddy Active
|
| 546 |
+
</div>
|
| 547 |
</div>
|
| 548 |
<div style="font-size: 0.85rem; color: var(--text-dim); font-weight: 500;">Easy Explainer v4.0</div>
|
| 549 |
</header>
|
| 550 |
|
| 551 |
+
<div id="welcomeScreen"
|
| 552 |
+
style="position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 40px; z-index: 1;">
|
| 553 |
<div style="font-size: 4rem; margin-bottom: 25px;">👦</div>
|
| 554 |
+
<h1 style="font-size: 2.8rem; font-weight: 700; margin-bottom: 12px; letter-spacing: -1px;">Law made simple.
|
| 555 |
+
</h1>
|
| 556 |
+
<p style="color: var(--text-dim); max-width: 550px; line-height: 1.7; font-size: 1.1rem;">Let’s talk about
|
| 557 |
+
your rights in a fun, easy way! Ask me anything about school, safety, or basic laws.</p>
|
| 558 |
</div>
|
| 559 |
|
| 560 |
<div class="messages-container" id="chatContainer"></div>
|
|
|
|
| 567 |
|
| 568 |
<div class="input-area">
|
| 569 |
<div class="input-box">
|
| 570 |
+
<input type="text" id="messageInput" placeholder="Ask your buddy a legal question..."
|
| 571 |
+
autocomplete="off">
|
| 572 |
<button class="send-btn" id="sendButton">
|
| 573 |
+
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"
|
| 574 |
+
stroke-linecap="round" stroke-linejoin="round">
|
| 575 |
+
<line x1="22" y1="2" x2="11" y2="13"></line>
|
| 576 |
+
<polygon points="22 2 15 22 11 13 2 9 22 2"></polygon>
|
| 577 |
+
</svg>
|
| 578 |
</button>
|
| 579 |
</div>
|
| 580 |
</div>
|
|
|
|
| 703 |
createNewMessage('ai', msg.response);
|
| 704 |
});
|
| 705 |
currentAiMessageElement = null;
|
| 706 |
+
if (window.innerWidth <= 768) {
|
| 707 |
+
const sidebar = document.querySelector('.sidebar');
|
| 708 |
+
const sidebarOverlay = document.getElementById('sidebarOverlay');
|
| 709 |
+
if (sidebar) sidebar.classList.remove('active');
|
| 710 |
+
if (sidebarOverlay) sidebarOverlay.classList.remove('active');
|
| 711 |
+
}
|
| 712 |
} catch (err) { console.error(err); }
|
| 713 |
}
|
| 714 |
|
|
|
|
| 731 |
currentCaseId = crypto.randomUUID();
|
| 732 |
chatContainer.innerHTML = '';
|
| 733 |
welcomeScreen.classList.remove('hidden');
|
| 734 |
+
if (window.innerWidth <= 768) {
|
| 735 |
+
const sidebar = document.querySelector('.sidebar');
|
| 736 |
+
const sidebarOverlay = document.getElementById('sidebarOverlay');
|
| 737 |
+
if (sidebar) sidebar.classList.remove('active');
|
| 738 |
+
if (sidebarOverlay) sidebarOverlay.classList.remove('active');
|
| 739 |
+
}
|
| 740 |
};
|
| 741 |
|
| 742 |
connectWS();
|
| 743 |
loadHistory();
|
| 744 |
fetchUserStatus();
|
| 745 |
+
|
| 746 |
+
// Mobile Sidebar Toggling Logic
|
| 747 |
+
const menuToggle = document.getElementById('menuToggle');
|
| 748 |
+
const sidebar = document.querySelector('.sidebar');
|
| 749 |
+
const sidebarOverlay = document.getElementById('sidebarOverlay');
|
| 750 |
+
|
| 751 |
+
function toggleSidebar() {
|
| 752 |
+
sidebar.classList.toggle('active');
|
| 753 |
+
sidebarOverlay.classList.toggle('active');
|
| 754 |
+
}
|
| 755 |
+
|
| 756 |
+
menuToggle.addEventListener('click', toggleSidebar);
|
| 757 |
+
sidebarOverlay.addEventListener('click', toggleSidebar);
|
| 758 |
</script>
|
| 759 |
</body>
|
| 760 |
+
|
| 761 |
</html>
|
src/apps/templates/roleselection.html
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
@@ -7,9 +8,15 @@
|
|
| 7 |
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap" rel="stylesheet">
|
| 8 |
<style>
|
| 9 |
/* Existing styles... */
|
| 10 |
-
body.direct-roles #landing {
|
| 11 |
-
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
* {
|
| 14 |
margin: 0;
|
| 15 |
padding: 0;
|
|
@@ -17,7 +24,8 @@
|
|
| 17 |
font-family: 'Poppins', sans-serif;
|
| 18 |
}
|
| 19 |
|
| 20 |
-
body,
|
|
|
|
| 21 |
height: 100%;
|
| 22 |
overflow: hidden;
|
| 23 |
background-color: #030617;
|
|
@@ -55,7 +63,8 @@
|
|
| 55 |
overflow: hidden;
|
| 56 |
transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
|
| 57 |
z-index: 10;
|
| 58 |
-
perspective: 1000px;
|
|
|
|
| 59 |
}
|
| 60 |
|
| 61 |
.hero::before {
|
|
@@ -85,13 +94,23 @@
|
|
| 85 |
}
|
| 86 |
|
| 87 |
@keyframes moveLight {
|
| 88 |
-
from {
|
| 89 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
}
|
| 91 |
|
| 92 |
@keyframes moveLight2 {
|
| 93 |
-
from {
|
| 94 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 95 |
}
|
| 96 |
|
| 97 |
/* FLOATING CONTENT */
|
|
@@ -107,9 +126,17 @@
|
|
| 107 |
}
|
| 108 |
|
| 109 |
@keyframes float {
|
| 110 |
-
0% {
|
| 111 |
-
|
| 112 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
}
|
| 114 |
|
| 115 |
.tag {
|
|
@@ -141,7 +168,10 @@
|
|
| 141 |
}
|
| 142 |
|
| 143 |
@media (max-width: 768px) {
|
| 144 |
-
.content h1 {
|
|
|
|
|
|
|
|
|
|
| 145 |
}
|
| 146 |
|
| 147 |
.content p#subtitle {
|
|
@@ -181,8 +211,17 @@
|
|
| 181 |
}
|
| 182 |
|
| 183 |
@keyframes blink {
|
| 184 |
-
|
| 185 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 186 |
}
|
| 187 |
|
| 188 |
.cta-btn {
|
|
@@ -205,9 +244,17 @@
|
|
| 205 |
}
|
| 206 |
|
| 207 |
@keyframes pulseGlow {
|
| 208 |
-
0% {
|
| 209 |
-
|
| 210 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 211 |
}
|
| 212 |
|
| 213 |
.cta-btn::after {
|
|
@@ -253,6 +300,7 @@
|
|
| 253 |
visibility: hidden;
|
| 254 |
transition: opacity 1s ease;
|
| 255 |
z-index: 5;
|
|
|
|
| 256 |
}
|
| 257 |
|
| 258 |
#rolePage.visible {
|
|
@@ -295,10 +343,70 @@
|
|
| 295 |
gap: 25px;
|
| 296 |
}
|
| 297 |
|
| 298 |
-
@media (max-width:
|
| 299 |
-
|
| 300 |
-
|
| 301 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 302 |
}
|
| 303 |
|
| 304 |
.role {
|
|
@@ -337,8 +445,13 @@
|
|
| 337 |
}
|
| 338 |
|
| 339 |
@keyframes sweep {
|
| 340 |
-
from {
|
| 341 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 342 |
}
|
| 343 |
|
| 344 |
.role:hover {
|
|
@@ -369,21 +482,42 @@
|
|
| 369 |
}
|
| 370 |
|
| 371 |
@keyframes fadeSlide {
|
| 372 |
-
from {
|
| 373 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 374 |
}
|
| 375 |
|
| 376 |
@keyframes fadeIn {
|
| 377 |
-
from {
|
| 378 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 379 |
}
|
| 380 |
|
| 381 |
@keyframes slideUp {
|
| 382 |
-
from {
|
| 383 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 384 |
}
|
| 385 |
|
| 386 |
-
.hidden {
|
|
|
|
|
|
|
| 387 |
|
| 388 |
.fade-out {
|
| 389 |
opacity: 0;
|
|
@@ -413,7 +547,8 @@
|
|
| 413 |
<div id="rolePage">
|
| 414 |
<div class="role-selection">
|
| 415 |
<h2>Who are you?</h2>
|
| 416 |
-
<p>Select your role to unlock precise legal intelligence and expert guidance tailored to your specific
|
|
|
|
| 417 |
<div class="roles">
|
| 418 |
<button class="role" data-role="Judge">👨⚖️ Judge</button>
|
| 419 |
<button class="role" data-role="Advocate/Lawyer">👩⚖️ Advocate</button>
|
|
@@ -423,7 +558,8 @@
|
|
| 423 |
<button class="role" data-role="Minor">👦 Minor</button>
|
| 424 |
</div>
|
| 425 |
<footer class="professional-footer">
|
| 426 |
-
© 2026 Law Bot AI • Forged for Justice • Managed by <a
|
|
|
|
| 427 |
</footer>
|
| 428 |
</div>
|
| 429 |
</div>
|
|
@@ -444,7 +580,7 @@
|
|
| 444 |
// --- PARALLAX TILT EFFECT ---
|
| 445 |
const x = (window.innerWidth / 2 - e.clientX) / 75;
|
| 446 |
const y = (window.innerHeight / 2 - e.clientY) / 75;
|
| 447 |
-
|
| 448 |
// Keep the floating animation active by adding these transforms
|
| 449 |
contentEl.style.transform = `perspective(1000px) rotateY(${x}deg) rotateX(${y}deg)`;
|
| 450 |
});
|
|
@@ -452,7 +588,7 @@
|
|
| 452 |
// --- PARTICLES ANIMATION ---
|
| 453 |
const canvas = document.getElementById("particles");
|
| 454 |
const ctx = canvas.getContext("2d");
|
| 455 |
-
|
| 456 |
let w, h, particles = [];
|
| 457 |
|
| 458 |
function initCanvas() {
|
|
@@ -533,4 +669,5 @@
|
|
| 533 |
});
|
| 534 |
</script>
|
| 535 |
</body>
|
|
|
|
| 536 |
</html>
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
| 3 |
+
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8">
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
| 8 |
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap" rel="stylesheet">
|
| 9 |
<style>
|
| 10 |
/* Existing styles... */
|
| 11 |
+
body.direct-roles #landing {
|
| 12 |
+
display: none !important;
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
body.direct-roles #rolePage {
|
| 16 |
+
opacity: 1 !important;
|
| 17 |
+
visibility: visible !important;
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
* {
|
| 21 |
margin: 0;
|
| 22 |
padding: 0;
|
|
|
|
| 24 |
font-family: 'Poppins', sans-serif;
|
| 25 |
}
|
| 26 |
|
| 27 |
+
body,
|
| 28 |
+
html {
|
| 29 |
height: 100%;
|
| 30 |
overflow: hidden;
|
| 31 |
background-color: #030617;
|
|
|
|
| 63 |
overflow: hidden;
|
| 64 |
transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
|
| 65 |
z-index: 10;
|
| 66 |
+
perspective: 1000px;
|
| 67 |
+
/* For the tilt effect */
|
| 68 |
}
|
| 69 |
|
| 70 |
.hero::before {
|
|
|
|
| 94 |
}
|
| 95 |
|
| 96 |
@keyframes moveLight {
|
| 97 |
+
from {
|
| 98 |
+
transform: translate(0, 0);
|
| 99 |
+
}
|
| 100 |
+
|
| 101 |
+
to {
|
| 102 |
+
transform: translate(250px, 150px);
|
| 103 |
+
}
|
| 104 |
}
|
| 105 |
|
| 106 |
@keyframes moveLight2 {
|
| 107 |
+
from {
|
| 108 |
+
transform: translate(0, 0);
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
to {
|
| 112 |
+
transform: translate(-250px, -150px);
|
| 113 |
+
}
|
| 114 |
}
|
| 115 |
|
| 116 |
/* FLOATING CONTENT */
|
|
|
|
| 126 |
}
|
| 127 |
|
| 128 |
@keyframes float {
|
| 129 |
+
0% {
|
| 130 |
+
transform: translateY(0px);
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
50% {
|
| 134 |
+
transform: translateY(-15px);
|
| 135 |
+
}
|
| 136 |
+
|
| 137 |
+
100% {
|
| 138 |
+
transform: translateY(0px);
|
| 139 |
+
}
|
| 140 |
}
|
| 141 |
|
| 142 |
.tag {
|
|
|
|
| 168 |
}
|
| 169 |
|
| 170 |
@media (max-width: 768px) {
|
| 171 |
+
.content h1 {
|
| 172 |
+
white-space: normal;
|
| 173 |
+
font-size: 3rem;
|
| 174 |
+
}
|
| 175 |
}
|
| 176 |
|
| 177 |
.content p#subtitle {
|
|
|
|
| 211 |
}
|
| 212 |
|
| 213 |
@keyframes blink {
|
| 214 |
+
|
| 215 |
+
0%,
|
| 216 |
+
100% {
|
| 217 |
+
opacity: 1;
|
| 218 |
+
transform: scale(1);
|
| 219 |
+
}
|
| 220 |
+
|
| 221 |
+
50% {
|
| 222 |
+
opacity: 0.3;
|
| 223 |
+
transform: scale(0.8);
|
| 224 |
+
}
|
| 225 |
}
|
| 226 |
|
| 227 |
.cta-btn {
|
|
|
|
| 244 |
}
|
| 245 |
|
| 246 |
@keyframes pulseGlow {
|
| 247 |
+
0% {
|
| 248 |
+
box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
|
| 249 |
+
}
|
| 250 |
+
|
| 251 |
+
50% {
|
| 252 |
+
box-shadow: 0 0 35px rgba(99, 102, 241, 0.7);
|
| 253 |
+
}
|
| 254 |
+
|
| 255 |
+
100% {
|
| 256 |
+
box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
|
| 257 |
+
}
|
| 258 |
}
|
| 259 |
|
| 260 |
.cta-btn::after {
|
|
|
|
| 300 |
visibility: hidden;
|
| 301 |
transition: opacity 1s ease;
|
| 302 |
z-index: 5;
|
| 303 |
+
overflow-y: auto;
|
| 304 |
}
|
| 305 |
|
| 306 |
#rolePage.visible {
|
|
|
|
| 343 |
gap: 25px;
|
| 344 |
}
|
| 345 |
|
| 346 |
+
@media (max-width: 768px) {
|
| 347 |
+
#rolePage {
|
| 348 |
+
align-items: flex-start;
|
| 349 |
+
padding: 40px 15px;
|
| 350 |
+
}
|
| 351 |
+
|
| 352 |
+
.role-selection {
|
| 353 |
+
padding: 35px 20px;
|
| 354 |
+
border-radius: 30px;
|
| 355 |
+
margin-top: 20px;
|
| 356 |
+
margin-bottom: 20px;
|
| 357 |
+
}
|
| 358 |
+
|
| 359 |
+
.role-selection h2 {
|
| 360 |
+
font-size: 2.2rem;
|
| 361 |
+
}
|
| 362 |
+
|
| 363 |
+
.role-selection p {
|
| 364 |
+
margin-bottom: 30px;
|
| 365 |
+
font-size: 1rem;
|
| 366 |
+
}
|
| 367 |
+
|
| 368 |
+
.roles {
|
| 369 |
+
grid-template-columns: 1fr;
|
| 370 |
+
gap: 15px;
|
| 371 |
+
}
|
| 372 |
+
|
| 373 |
+
.role {
|
| 374 |
+
padding: 18px 20px;
|
| 375 |
+
font-size: 1.05rem;
|
| 376 |
+
}
|
| 377 |
+
|
| 378 |
+
.content {
|
| 379 |
+
padding: 20px 15px;
|
| 380 |
+
}
|
| 381 |
+
|
| 382 |
+
.tag {
|
| 383 |
+
font-size: 0.7rem;
|
| 384 |
+
padding: 4px 12px;
|
| 385 |
+
margin-bottom: 15px;
|
| 386 |
+
}
|
| 387 |
+
|
| 388 |
+
.content h1 {
|
| 389 |
+
font-size: 2.2rem !important;
|
| 390 |
+
line-height: 1.2;
|
| 391 |
+
margin-bottom: 15px;
|
| 392 |
+
}
|
| 393 |
+
|
| 394 |
+
.content p#subtitle {
|
| 395 |
+
font-size: 0.95rem !important;
|
| 396 |
+
line-height: 1.5;
|
| 397 |
+
margin-bottom: 25px;
|
| 398 |
+
min-height: auto;
|
| 399 |
+
}
|
| 400 |
+
|
| 401 |
+
.status {
|
| 402 |
+
margin-bottom: 35px;
|
| 403 |
+
font-size: 0.75rem;
|
| 404 |
+
}
|
| 405 |
+
|
| 406 |
+
.cta-btn {
|
| 407 |
+
padding: 16px 45px;
|
| 408 |
+
font-size: 1rem;
|
| 409 |
+
}
|
| 410 |
}
|
| 411 |
|
| 412 |
.role {
|
|
|
|
| 445 |
}
|
| 446 |
|
| 447 |
@keyframes sweep {
|
| 448 |
+
from {
|
| 449 |
+
transform: translateX(-100%) skewX(-15deg);
|
| 450 |
+
}
|
| 451 |
+
|
| 452 |
+
to {
|
| 453 |
+
transform: translateX(100%) skewX(-15deg);
|
| 454 |
+
}
|
| 455 |
}
|
| 456 |
|
| 457 |
.role:hover {
|
|
|
|
| 482 |
}
|
| 483 |
|
| 484 |
@keyframes fadeSlide {
|
| 485 |
+
from {
|
| 486 |
+
opacity: 0;
|
| 487 |
+
transform: translateY(35px);
|
| 488 |
+
}
|
| 489 |
+
|
| 490 |
+
to {
|
| 491 |
+
opacity: 1;
|
| 492 |
+
transform: translateY(0);
|
| 493 |
+
}
|
| 494 |
}
|
| 495 |
|
| 496 |
@keyframes fadeIn {
|
| 497 |
+
from {
|
| 498 |
+
opacity: 0;
|
| 499 |
+
}
|
| 500 |
+
|
| 501 |
+
to {
|
| 502 |
+
opacity: 1;
|
| 503 |
+
}
|
| 504 |
}
|
| 505 |
|
| 506 |
@keyframes slideUp {
|
| 507 |
+
from {
|
| 508 |
+
opacity: 0;
|
| 509 |
+
transform: translateY(60px);
|
| 510 |
+
}
|
| 511 |
+
|
| 512 |
+
to {
|
| 513 |
+
opacity: 1;
|
| 514 |
+
transform: translateY(0);
|
| 515 |
+
}
|
| 516 |
}
|
| 517 |
|
| 518 |
+
.hidden {
|
| 519 |
+
display: none !important;
|
| 520 |
+
}
|
| 521 |
|
| 522 |
.fade-out {
|
| 523 |
opacity: 0;
|
|
|
|
| 547 |
<div id="rolePage">
|
| 548 |
<div class="role-selection">
|
| 549 |
<h2>Who are you?</h2>
|
| 550 |
+
<p>Select your role to unlock precise legal intelligence and expert guidance tailored to your specific
|
| 551 |
+
framework.</p>
|
| 552 |
<div class="roles">
|
| 553 |
<button class="role" data-role="Judge">👨⚖️ Judge</button>
|
| 554 |
<button class="role" data-role="Advocate/Lawyer">👩⚖️ Advocate</button>
|
|
|
|
| 558 |
<button class="role" data-role="Minor">👦 Minor</button>
|
| 559 |
</div>
|
| 560 |
<footer class="professional-footer">
|
| 561 |
+
© 2026 Law Bot AI • Forged for Justice • Managed by <a
|
| 562 |
+
href="https://www.linkedin.com/in/vishwanath77" target="_blank">Vishwanath</a>
|
| 563 |
</footer>
|
| 564 |
</div>
|
| 565 |
</div>
|
|
|
|
| 580 |
// --- PARALLAX TILT EFFECT ---
|
| 581 |
const x = (window.innerWidth / 2 - e.clientX) / 75;
|
| 582 |
const y = (window.innerHeight / 2 - e.clientY) / 75;
|
| 583 |
+
|
| 584 |
// Keep the floating animation active by adding these transforms
|
| 585 |
contentEl.style.transform = `perspective(1000px) rotateY(${x}deg) rotateX(${y}deg)`;
|
| 586 |
});
|
|
|
|
| 588 |
// --- PARTICLES ANIMATION ---
|
| 589 |
const canvas = document.getElementById("particles");
|
| 590 |
const ctx = canvas.getContext("2d");
|
| 591 |
+
|
| 592 |
let w, h, particles = [];
|
| 593 |
|
| 594 |
function initCanvas() {
|
|
|
|
| 669 |
});
|
| 670 |
</script>
|
| 671 |
</body>
|
| 672 |
+
|
| 673 |
</html>
|
src/apps/templates/safetytips.html
CHANGED
|
@@ -1,186 +1,326 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
}
|
| 96 |
-
|
| 97 |
-
.safety-tips li {
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
}
|
| 186 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Women's Safety & Protection Guidelines</title>
|
| 7 |
+
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
| 8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
+
<style>
|
| 10 |
+
:root {
|
| 11 |
+
--primary: #E91E63;
|
| 12 |
+
--secondary: #9C27B0;
|
| 13 |
+
--accent: #FF4081;
|
| 14 |
+
--dark: #2A0944;
|
| 15 |
+
--light: #F8BBD0;
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
* {
|
| 19 |
+
margin: 0;
|
| 20 |
+
padding: 0;
|
| 21 |
+
box-sizing: border-box;
|
| 22 |
+
font-family: 'Poppins', sans-serif;
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
body {
|
| 26 |
+
background: linear-gradient(135deg, #fff5f7 0%, #f8f4ff 100%);
|
| 27 |
+
color: var(--dark);
|
| 28 |
+
min-height: 100vh;
|
| 29 |
+
display: flex;
|
| 30 |
+
flex-direction: column;
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
.safety-tips {
|
| 34 |
+
flex: 1;
|
| 35 |
+
padding: 4rem 5%;
|
| 36 |
+
max-width: 1200px;
|
| 37 |
+
margin: 0 auto;
|
| 38 |
+
width: 100%;
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
.page-title {
|
| 42 |
+
text-align: center;
|
| 43 |
+
font-size: 2.5rem;
|
| 44 |
+
font-weight: 700;
|
| 45 |
+
margin-bottom: 3rem;
|
| 46 |
+
background: linear-gradient(135deg, var(--primary), var(--secondary));
|
| 47 |
+
-webkit-background-clip: text;
|
| 48 |
+
-webkit-text-fill-color: transparent;
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
.safety-tips .grid-container {
|
| 52 |
+
display: grid;
|
| 53 |
+
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
| 54 |
+
gap: 2rem;
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
.safety-tips .feature-card {
|
| 58 |
+
background: rgba(255, 255, 255, 0.9);
|
| 59 |
+
border: 1px solid rgba(233, 30, 99, 0.1);
|
| 60 |
+
padding: 2rem;
|
| 61 |
+
border-radius: 20px;
|
| 62 |
+
backdrop-filter: blur(10px);
|
| 63 |
+
box-shadow: 0 8px 32px rgba(233, 30, 99, 0.05);
|
| 64 |
+
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
.safety-tips .feature-card:hover {
|
| 68 |
+
transform: translateY(-5px);
|
| 69 |
+
box-shadow: 0 12px 40px rgba(233, 30, 99, 0.1);
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
.safety-tips h3 {
|
| 73 |
+
font-size: 1.3rem;
|
| 74 |
+
font-weight: 600;
|
| 75 |
+
margin-bottom: 1.5rem;
|
| 76 |
+
color: var(--dark);
|
| 77 |
+
border-bottom: 2px solid rgba(233, 30, 99, 0.1);
|
| 78 |
+
padding-bottom: 0.8rem;
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
.safety-tips ul {
|
| 82 |
+
list-style: none;
|
| 83 |
+
padding: 0;
|
| 84 |
+
margin: 0;
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
.safety-tips li {
|
| 88 |
+
padding: 0.8rem 0;
|
| 89 |
+
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
|
| 90 |
+
display: flex;
|
| 91 |
+
align-items: center;
|
| 92 |
+
gap: 1rem;
|
| 93 |
+
transition: transform 0.3s ease;
|
| 94 |
+
font-size: 0.95rem;
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
.safety-tips li:last-child {
|
| 98 |
+
border-bottom: none;
|
| 99 |
+
}
|
| 100 |
+
|
| 101 |
+
.safety-tips li:hover {
|
| 102 |
+
transform: translateX(8px);
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
.safety-tips i {
|
| 106 |
+
font-size: 1rem;
|
| 107 |
+
width: 32px;
|
| 108 |
+
height: 32px;
|
| 109 |
+
border-radius: 50%;
|
| 110 |
+
display: flex;
|
| 111 |
+
align-items: center;
|
| 112 |
+
justify-content: center;
|
| 113 |
+
background: linear-gradient(135deg, var(--primary), var(--accent));
|
| 114 |
+
color: white;
|
| 115 |
+
flex-shrink: 0;
|
| 116 |
+
}
|
| 117 |
+
|
| 118 |
+
.safety-kit {
|
| 119 |
+
background: rgba(255, 255, 255, 0.9);
|
| 120 |
+
border-radius: 20px;
|
| 121 |
+
padding: 2rem;
|
| 122 |
+
border: 1px solid rgba(233, 30, 99, 0.1);
|
| 123 |
+
box-shadow: 0 8px 32px rgba(233, 30, 99, 0.05);
|
| 124 |
+
margin: 3rem 0;
|
| 125 |
+
}
|
| 126 |
+
|
| 127 |
+
.safety-kit h2 {
|
| 128 |
+
margin-bottom: 1.5rem;
|
| 129 |
+
font-size: 1.8rem;
|
| 130 |
+
color: var(--dark);
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
.safety-kit p {
|
| 134 |
+
margin-bottom: 1rem;
|
| 135 |
+
font-size: 1rem;
|
| 136 |
+
display: flex;
|
| 137 |
+
align-items: center;
|
| 138 |
+
gap: 0.8rem;
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
.action-buttons {
|
| 142 |
+
display: flex;
|
| 143 |
+
gap: 1.5rem;
|
| 144 |
+
flex-wrap: wrap;
|
| 145 |
+
margin-top: 2rem;
|
| 146 |
+
}
|
| 147 |
+
|
| 148 |
+
.safety-button {
|
| 149 |
+
background: linear-gradient(135deg, var(--primary), var(--secondary));
|
| 150 |
+
border: none;
|
| 151 |
+
padding: 0.9rem 1.8rem;
|
| 152 |
+
border-radius: 50px;
|
| 153 |
+
color: white;
|
| 154 |
+
font-weight: 600;
|
| 155 |
+
cursor: pointer;
|
| 156 |
+
transition: all 0.3s ease;
|
| 157 |
+
display: inline-flex;
|
| 158 |
+
align-items: center;
|
| 159 |
+
gap: 10px;
|
| 160 |
+
box-shadow: 0 4px 15px rgba(233, 30, 99, 0.2);
|
| 161 |
+
}
|
| 162 |
+
|
| 163 |
+
.safety-button:hover {
|
| 164 |
+
transform: translateY(-2px);
|
| 165 |
+
box-shadow: 0 6px 20px rgba(233, 30, 99, 0.3);
|
| 166 |
+
}
|
| 167 |
+
|
| 168 |
+
.back-button {
|
| 169 |
+
background: #555;
|
| 170 |
+
border: none;
|
| 171 |
+
padding: 0.9rem 1.8rem;
|
| 172 |
+
border-radius: 50px;
|
| 173 |
+
color: white;
|
| 174 |
+
font-weight: 600;
|
| 175 |
+
cursor: pointer;
|
| 176 |
+
transition: all 0.3s ease;
|
| 177 |
+
display: inline-flex;
|
| 178 |
+
align-items: center;
|
| 179 |
+
gap: 10px;
|
| 180 |
+
}
|
| 181 |
+
|
| 182 |
+
.back-button:hover {
|
| 183 |
+
background: #444;
|
| 184 |
+
transform: translateY(-2px);
|
| 185 |
+
}
|
| 186 |
+
|
| 187 |
+
@media (max-width: 768px) {
|
| 188 |
+
.safety-tips {
|
| 189 |
+
padding: 2rem 5%;
|
| 190 |
+
}
|
| 191 |
+
.page-title {
|
| 192 |
+
font-size: 2rem;
|
| 193 |
+
margin-bottom: 2rem;
|
| 194 |
+
}
|
| 195 |
+
.safety-tips .feature-card {
|
| 196 |
+
padding: 1.5rem;
|
| 197 |
+
}
|
| 198 |
+
.safety-kit {
|
| 199 |
+
padding: 1.5rem;
|
| 200 |
+
}
|
| 201 |
+
.action-buttons {
|
| 202 |
+
flex-direction: column;
|
| 203 |
+
gap: 1rem;
|
| 204 |
+
}
|
| 205 |
+
.safety-button, .back-button {
|
| 206 |
+
width: 100%;
|
| 207 |
+
justify-content: center;
|
| 208 |
+
}
|
| 209 |
+
}
|
| 210 |
+
</style>
|
| 211 |
+
</head>
|
| 212 |
+
<body>
|
| 213 |
+
<section class="safety-tips" id="safety">
|
| 214 |
+
<h1 class="page-title">Safety & Protection Guidelines</h1>
|
| 215 |
+
|
| 216 |
+
<div class="grid-container">
|
| 217 |
+
<div class="feature-card">
|
| 218 |
+
<h3>🛡️ General Safety Tips</h3>
|
| 219 |
+
<ul>
|
| 220 |
+
<li><i class="fas fa-map-marker-alt"></i> Always share live location with trusted contacts</li>
|
| 221 |
+
<li><i class="fas fa-phone-volume"></i> Keep emergency numbers on speed dial (112, 1091)</li>
|
| 222 |
+
<li><i class="fas fa-car"></i> Verify cab details before boarding (Check plate)</li>
|
| 223 |
+
<li><i class="fas fa-lock"></i> Avoid isolated ATMs/restrooms at night</li>
|
| 224 |
+
</ul>
|
| 225 |
+
</div>
|
| 226 |
+
|
| 227 |
+
<div class="feature-card">
|
| 228 |
+
<h3>🚆 Public Transport Safety</h3>
|
| 229 |
+
<ul>
|
| 230 |
+
<li><i class="fas fa-subway"></i> Use women-only coaches in metros/trains</li>
|
| 231 |
+
<li><i class="fas fa-bus"></i> Prefer front seats in buses</li>
|
| 232 |
+
<li><i class="fas fa-phone"></i> Download RailMadad app (152 emergency)</li>
|
| 233 |
+
<li><i class="fas fa-road"></i> Avoid empty bus stops at night</li>
|
| 234 |
+
</ul>
|
| 235 |
+
</div>
|
| 236 |
+
|
| 237 |
+
<div class="feature-card">
|
| 238 |
+
<h3>🏢 Workplace Safety</h3>
|
| 239 |
+
<ul>
|
| 240 |
+
<li><i class="fas fa-gavel"></i> Know POSH Act 2013 provisions</li>
|
| 241 |
+
<li><i class="fas fa-file-alt"></i> Document all incidents formally</li>
|
| 242 |
+
<li><i class="fas fa-users"></i> Use company transport for late hours</li>
|
| 243 |
+
<li><i class="fas fa-exclamation-triangle"></i> Report inappropriate behavior immediately</li>
|
| 244 |
+
</ul>
|
| 245 |
+
</div>
|
| 246 |
+
</div>
|
| 247 |
+
|
| 248 |
+
<!-- Emergency Preparedness Section -->
|
| 249 |
+
<div class="safety-kit">
|
| 250 |
+
<h2>Emergency Preparedness Kit</h2>
|
| 251 |
+
<p>✅ Keep pepper spray in easy-to-reach pocket</p>
|
| 252 |
+
<p>✅ Save ICE (In Case of Emergency) contacts</p>
|
| 253 |
+
<p>✅ Create code word with family for danger situations</p>
|
| 254 |
+
<p>✅ Keep ₹100 cash separate for emergencies</p>
|
| 255 |
+
</div>
|
| 256 |
+
|
| 257 |
+
<div class="action-buttons">
|
| 258 |
+
<button class="safety-button" onclick="downloadSafetyGuide()">
|
| 259 |
+
<i class="fas fa-download"></i>
|
| 260 |
+
Download Safety Guide
|
| 261 |
+
</button>
|
| 262 |
+
<button class="back-button" onclick="goBack()">
|
| 263 |
+
<i class="fas fa-arrow-left"></i>
|
| 264 |
+
Back to Previous Page
|
| 265 |
+
</button>
|
| 266 |
+
</div>
|
| 267 |
+
</section>
|
| 268 |
+
|
| 269 |
+
<script>
|
| 270 |
+
function downloadSafetyGuide() {
|
| 271 |
+
const content = `==================================================
|
| 272 |
+
WOMEN'S SAFETY & PROTECTION HANDBOOK
|
| 273 |
+
==================================================
|
| 274 |
+
|
| 275 |
+
1. GENERAL SAFETY TIPS:
|
| 276 |
+
- Always share live location with trusted contacts.
|
| 277 |
+
- Keep emergency numbers on speed dial (112, 1091).
|
| 278 |
+
- Verify cab details before boarding (check number plate).
|
| 279 |
+
- Avoid isolated ATMs and restrooms at night.
|
| 280 |
+
|
| 281 |
+
2. PUBLIC TRANSPORT SAFETY:
|
| 282 |
+
- Use women-only coaches in metros and trains.
|
| 283 |
+
- Prefer front seats in buses.
|
| 284 |
+
- Download RailMadad app (152 for railway emergencies).
|
| 285 |
+
- Avoid empty bus stops at night.
|
| 286 |
+
|
| 287 |
+
3. WORKPLACE SAFETY:
|
| 288 |
+
- Know POSH Act 2013 provisions.
|
| 289 |
+
- Document all incidents formally.
|
| 290 |
+
- Use company transport for late hours.
|
| 291 |
+
- Report inappropriate behavior immediately.
|
| 292 |
+
|
| 293 |
+
4. EMERGENCY PREPAREDNESS CHECKLIST:
|
| 294 |
+
- Keep pepper spray in an easy-to-reach pocket.
|
| 295 |
+
- Save ICE (In Case of Emergency) contacts.
|
| 296 |
+
- Create a code word with family for danger situations.
|
| 297 |
+
- Keep a separate reserve of cash for emergencies.
|
| 298 |
+
|
| 299 |
+
==================================================
|
| 300 |
+
EMERGENCY NUMBERS:
|
| 301 |
+
National Emergency: 112
|
| 302 |
+
Women Helpline: 1091 / 181
|
| 303 |
+
Railway Helpline: 139 / 152
|
| 304 |
+
==================================================`;
|
| 305 |
+
|
| 306 |
+
const blob = new Blob([content], { type: 'text/plain' });
|
| 307 |
+
const url = URL.createObjectURL(blob);
|
| 308 |
+
const a = document.createElement('a');
|
| 309 |
+
a.href = url;
|
| 310 |
+
a.download = 'Womens_Safety_Handbook.txt';
|
| 311 |
+
document.body.appendChild(a);
|
| 312 |
+
a.click();
|
| 313 |
+
document.body.removeChild(a);
|
| 314 |
+
URL.revokeObjectURL(url);
|
| 315 |
+
}
|
| 316 |
+
|
| 317 |
+
function goBack() {
|
| 318 |
+
if (window.history.length > 1) {
|
| 319 |
+
window.history.back();
|
| 320 |
+
} else {
|
| 321 |
+
window.location.href = '/woman.html';
|
| 322 |
+
}
|
| 323 |
+
}
|
| 324 |
+
</script>
|
| 325 |
+
</body>
|
| 326 |
+
</html>
|
src/apps/templates/studentchatbot.html
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
<title>AI Legal Assistant | Student Framework</title>
|
| 7 |
-
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap"
|
|
|
|
| 8 |
<style>
|
| 9 |
:root {
|
| 10 |
--bg-dark: #030617;
|
|
@@ -18,7 +20,9 @@
|
|
| 18 |
}
|
| 19 |
|
| 20 |
* {
|
| 21 |
-
margin: 0;
|
|
|
|
|
|
|
| 22 |
font-family: 'Poppins', sans-serif;
|
| 23 |
}
|
| 24 |
|
|
@@ -35,63 +39,243 @@
|
|
| 35 |
width: 280px;
|
| 36 |
background: var(--sidebar-bg);
|
| 37 |
border-right: 1px solid var(--glass-border);
|
| 38 |
-
display: flex;
|
|
|
|
| 39 |
z-index: 100;
|
| 40 |
}
|
| 41 |
|
| 42 |
-
.sidebar-header {
|
|
|
|
|
|
|
| 43 |
|
| 44 |
.new-chat-btn {
|
| 45 |
-
width: 100%;
|
|
|
|
| 46 |
background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
|
| 47 |
-
border: none;
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
box-shadow: 0 10px 20px rgba(59, 130, 246, 0.2);
|
| 52 |
}
|
| 53 |
|
| 54 |
-
.new-chat-btn:hover {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
|
| 56 |
-
.history-label { padding: 0 20px 10px; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 2px; color: var(--text-dim); font-weight: 700; }
|
| 57 |
-
.history-list { flex: 1; overflow-y: auto; padding: 10px; }
|
| 58 |
.history-item {
|
| 59 |
-
padding: 12px 15px;
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
}
|
| 64 |
-
.history-item:hover { background: var(--glass-bg); color: white; border-color: var(--glass-border); }
|
| 65 |
|
| 66 |
-
.
|
| 67 |
-
|
| 68 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
|
| 70 |
/* MAIN AREA */
|
| 71 |
-
.main-chat {
|
| 72 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
.top-bar {
|
| 74 |
-
height: 70px;
|
|
|
|
|
|
|
| 75 |
border-bottom: 1px solid var(--glass-border);
|
| 76 |
-
display: flex;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
}
|
| 78 |
|
| 79 |
-
.status-pill {
|
| 80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
|
| 82 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
|
| 84 |
-
|
| 85 |
-
.message { max-width: 850px; animation: message-slide 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
|
| 86 |
-
@keyframes message-slide { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
|
| 87 |
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 95 |
|
| 96 |
.typing {
|
| 97 |
display: flex;
|
|
@@ -126,30 +310,222 @@
|
|
| 126 |
animation: typing-blink 1.4s infinite ease-in-out;
|
| 127 |
}
|
| 128 |
|
| 129 |
-
.typing-dots span:nth-child(2) {
|
| 130 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 131 |
|
| 132 |
@keyframes typing-blink {
|
| 133 |
-
|
| 134 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 135 |
}
|
| 136 |
|
| 137 |
@keyframes pulse-border {
|
| 138 |
-
|
| 139 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 140 |
}
|
| 141 |
|
| 142 |
-
.input-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
.send-btn { background: var(--accent-blue); color: white; border: none; width: 50px; height: 50px; border-radius: 14px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.3s; margin-right: 6px; }
|
| 147 |
-
.send-btn:hover { background: var(--accent-purple); transform: scale(1.1); }
|
| 148 |
|
| 149 |
-
.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 150 |
</style>
|
| 151 |
</head>
|
|
|
|
| 152 |
<body>
|
|
|
|
| 153 |
<aside class="sidebar">
|
| 154 |
<div class="sidebar-header">
|
| 155 |
<button class="new-chat-btn" id="newChatBtn"><span>+</span> New Research</button>
|
|
@@ -165,25 +541,35 @@
|
|
| 165 |
</div>
|
| 166 |
</div>
|
| 167 |
<div style="display: flex; flex-direction: column; gap: 8px; margin-top: 15px;">
|
| 168 |
-
<a href="/studentdashboard.html"
|
| 169 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 170 |
</div>
|
| 171 |
</div>
|
| 172 |
</aside>
|
| 173 |
|
| 174 |
<main class="main-chat">
|
| 175 |
<header class="top-bar">
|
|
|
|
| 176 |
<div class="system-branding">
|
| 177 |
<span style="font-weight: 700; color: white;">⚖️ Law Bot (Student)</span>
|
| 178 |
-
<div class="status-pill">
|
|
|
|
|
|
|
| 179 |
</div>
|
| 180 |
<div style="font-size: 0.85rem; color: var(--text-dim); font-weight: 500;">Educational Framework v4.0</div>
|
| 181 |
</header>
|
| 182 |
|
| 183 |
-
<div id="welcomeScreen"
|
|
|
|
| 184 |
<div style="font-size: 4rem; margin-bottom: 25px;">📚</div>
|
| 185 |
-
<h1 style="font-size: 2.8rem; font-weight: 700; margin-bottom: 12px; letter-spacing: -1px;">Empowering your
|
| 186 |
-
|
|
|
|
|
|
|
| 187 |
</div>
|
| 188 |
|
| 189 |
<div class="messages-container" id="chatContainer"></div>
|
|
@@ -198,7 +584,11 @@
|
|
| 198 |
<div class="input-box">
|
| 199 |
<input type="text" id="messageInput" placeholder="Enter your research query..." autocomplete="off">
|
| 200 |
<button class="send-btn" id="sendButton">
|
| 201 |
-
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 202 |
</button>
|
| 203 |
</div>
|
| 204 |
</div>
|
|
@@ -327,6 +717,12 @@
|
|
| 327 |
createNewMessage('ai', msg.response);
|
| 328 |
});
|
| 329 |
currentAiMessageElement = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 330 |
} catch (err) { console.error(err); }
|
| 331 |
}
|
| 332 |
|
|
@@ -349,11 +745,31 @@
|
|
| 349 |
currentCaseId = crypto.randomUUID();
|
| 350 |
chatContainer.innerHTML = '';
|
| 351 |
welcomeScreen.classList.remove('hidden');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 352 |
};
|
| 353 |
|
| 354 |
connectWS();
|
| 355 |
loadHistory();
|
| 356 |
fetchUserStatus();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 357 |
</script>
|
| 358 |
</body>
|
|
|
|
| 359 |
</html>
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
| 3 |
+
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8">
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 7 |
<title>AI Legal Assistant | Student Framework</title>
|
| 8 |
+
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap"
|
| 9 |
+
rel="stylesheet">
|
| 10 |
<style>
|
| 11 |
:root {
|
| 12 |
--bg-dark: #030617;
|
|
|
|
| 20 |
}
|
| 21 |
|
| 22 |
* {
|
| 23 |
+
margin: 0;
|
| 24 |
+
padding: 0;
|
| 25 |
+
box-sizing: border-box;
|
| 26 |
font-family: 'Poppins', sans-serif;
|
| 27 |
}
|
| 28 |
|
|
|
|
| 39 |
width: 280px;
|
| 40 |
background: var(--sidebar-bg);
|
| 41 |
border-right: 1px solid var(--glass-border);
|
| 42 |
+
display: flex;
|
| 43 |
+
flex-direction: column;
|
| 44 |
z-index: 100;
|
| 45 |
}
|
| 46 |
|
| 47 |
+
.sidebar-header {
|
| 48 |
+
padding: 30px 20px;
|
| 49 |
+
}
|
| 50 |
|
| 51 |
.new-chat-btn {
|
| 52 |
+
width: 100%;
|
| 53 |
+
padding: 14px;
|
| 54 |
background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
|
| 55 |
+
border: none;
|
| 56 |
+
border-radius: 12px;
|
| 57 |
+
color: white;
|
| 58 |
+
font-weight: 600;
|
| 59 |
+
display: flex;
|
| 60 |
+
align-items: center;
|
| 61 |
+
justify-content: center;
|
| 62 |
+
gap: 10px;
|
| 63 |
+
cursor: pointer;
|
| 64 |
+
transition: 0.3s;
|
| 65 |
box-shadow: 0 10px 20px rgba(59, 130, 246, 0.2);
|
| 66 |
}
|
| 67 |
|
| 68 |
+
.new-chat-btn:hover {
|
| 69 |
+
transform: translateY(-2px);
|
| 70 |
+
box-shadow: 0 15px 25px rgba(59, 130, 246, 0.3);
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
.history-label {
|
| 74 |
+
padding: 0 20px 10px;
|
| 75 |
+
font-size: 0.75rem;
|
| 76 |
+
text-transform: uppercase;
|
| 77 |
+
letter-spacing: 2px;
|
| 78 |
+
color: var(--text-dim);
|
| 79 |
+
font-weight: 700;
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
.history-list {
|
| 83 |
+
flex: 1;
|
| 84 |
+
overflow-y: auto;
|
| 85 |
+
padding: 10px;
|
| 86 |
+
}
|
| 87 |
|
|
|
|
|
|
|
| 88 |
.history-item {
|
| 89 |
+
padding: 12px 15px;
|
| 90 |
+
border-radius: 10px;
|
| 91 |
+
margin-bottom: 5px;
|
| 92 |
+
cursor: pointer;
|
| 93 |
+
transition: 0.2s;
|
| 94 |
+
font-size: 0.85rem;
|
| 95 |
+
color: var(--text-dim);
|
| 96 |
+
display: flex;
|
| 97 |
+
align-items: center;
|
| 98 |
+
gap: 10px;
|
| 99 |
+
border: 1px solid transparent;
|
| 100 |
+
white-space: nowrap;
|
| 101 |
+
overflow: hidden;
|
| 102 |
+
text-overflow: ellipsis;
|
| 103 |
}
|
|
|
|
| 104 |
|
| 105 |
+
.history-item:hover {
|
| 106 |
+
background: var(--glass-bg);
|
| 107 |
+
color: white;
|
| 108 |
+
border-color: var(--glass-border);
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
.sidebar-footer {
|
| 112 |
+
padding: 20px;
|
| 113 |
+
border-top: 1px solid var(--glass-border);
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
.user-badge {
|
| 117 |
+
display: flex;
|
| 118 |
+
align-items: center;
|
| 119 |
+
gap: 12px;
|
| 120 |
+
padding: 10px;
|
| 121 |
+
background: var(--glass-bg);
|
| 122 |
+
border-radius: 12px;
|
| 123 |
+
}
|
| 124 |
+
|
| 125 |
+
.user-avatar {
|
| 126 |
+
width: 32px;
|
| 127 |
+
height: 32px;
|
| 128 |
+
background: var(--accent-blue);
|
| 129 |
+
border-radius: 8px;
|
| 130 |
+
display: flex;
|
| 131 |
+
align-items: center;
|
| 132 |
+
justify-content: center;
|
| 133 |
+
font-weight: 700;
|
| 134 |
+
color: white;
|
| 135 |
+
font-size: 0.8rem;
|
| 136 |
+
}
|
| 137 |
|
| 138 |
/* MAIN AREA */
|
| 139 |
+
.main-chat {
|
| 140 |
+
flex: 1;
|
| 141 |
+
display: flex;
|
| 142 |
+
flex-direction: column;
|
| 143 |
+
position: relative;
|
| 144 |
+
background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.03), transparent);
|
| 145 |
+
}
|
| 146 |
+
|
| 147 |
.top-bar {
|
| 148 |
+
height: 70px;
|
| 149 |
+
background: rgba(3, 6, 23, 0.82);
|
| 150 |
+
backdrop-filter: blur(25px);
|
| 151 |
border-bottom: 1px solid var(--glass-border);
|
| 152 |
+
display: flex;
|
| 153 |
+
align-items: center;
|
| 154 |
+
justify-content: space-between;
|
| 155 |
+
padding: 0 40px;
|
| 156 |
+
z-index: 50;
|
| 157 |
}
|
| 158 |
|
| 159 |
+
.status-pill {
|
| 160 |
+
display: flex;
|
| 161 |
+
align-items: center;
|
| 162 |
+
gap: 8px;
|
| 163 |
+
font-size: 0.75rem;
|
| 164 |
+
background: rgba(59, 130, 246, 0.1);
|
| 165 |
+
color: var(--accent-blue);
|
| 166 |
+
padding: 4px 12px;
|
| 167 |
+
border-radius: 20px;
|
| 168 |
+
font-weight: 600;
|
| 169 |
+
border: 1px solid rgba(59, 130, 246, 0.2);
|
| 170 |
+
}
|
| 171 |
|
| 172 |
+
.status-dot {
|
| 173 |
+
width: 6px;
|
| 174 |
+
height: 6px;
|
| 175 |
+
background: var(--accent-blue);
|
| 176 |
+
border-radius: 50%;
|
| 177 |
+
animation: pulse-dot 2s infinite;
|
| 178 |
+
}
|
| 179 |
|
| 180 |
+
@keyframes pulse-dot {
|
|
|
|
|
|
|
| 181 |
|
| 182 |
+
0%,
|
| 183 |
+
100% {
|
| 184 |
+
transform: scale(1);
|
| 185 |
+
opacity: 1;
|
| 186 |
+
}
|
| 187 |
+
|
| 188 |
+
50% {
|
| 189 |
+
transform: scale(1.5);
|
| 190 |
+
opacity: 0.4;
|
| 191 |
+
}
|
| 192 |
+
}
|
| 193 |
+
|
| 194 |
+
.messages-container {
|
| 195 |
+
flex: 1;
|
| 196 |
+
overflow-y: auto;
|
| 197 |
+
padding: 40px 10%;
|
| 198 |
+
display: flex;
|
| 199 |
+
flex-direction: column;
|
| 200 |
+
gap: 30px;
|
| 201 |
+
scroll-behavior: smooth;
|
| 202 |
+
}
|
| 203 |
+
|
| 204 |
+
.message {
|
| 205 |
+
max-width: 850px;
|
| 206 |
+
animation: message-slide 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
|
| 207 |
+
}
|
| 208 |
+
|
| 209 |
+
@keyframes message-slide {
|
| 210 |
+
from {
|
| 211 |
+
opacity: 0;
|
| 212 |
+
transform: translateY(20px);
|
| 213 |
+
}
|
| 214 |
+
|
| 215 |
+
to {
|
| 216 |
+
opacity: 1;
|
| 217 |
+
transform: translateY(0);
|
| 218 |
+
}
|
| 219 |
+
}
|
| 220 |
+
|
| 221 |
+
.user-msg {
|
| 222 |
+
align-self: flex-end;
|
| 223 |
+
background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
|
| 224 |
+
padding: 16px 24px;
|
| 225 |
+
border-radius: 20px 20px 4px 20px;
|
| 226 |
+
color: white;
|
| 227 |
+
max-width: 70%;
|
| 228 |
+
line-height: 1.6;
|
| 229 |
+
}
|
| 230 |
+
|
| 231 |
+
.ai-msg {
|
| 232 |
+
align-self: flex-start;
|
| 233 |
+
background: var(--glass-bg);
|
| 234 |
+
border: 1px solid var(--glass-border);
|
| 235 |
+
padding: 30px;
|
| 236 |
+
border-radius: 20px 20px 20px 4px;
|
| 237 |
+
max-width: 85%;
|
| 238 |
+
line-height: 1.8;
|
| 239 |
+
color: #e2e8f0;
|
| 240 |
+
}
|
| 241 |
+
|
| 242 |
+
.ai-msg h3 {
|
| 243 |
+
color: var(--accent-blue);
|
| 244 |
+
font-size: 1.3rem;
|
| 245 |
+
margin-bottom: 20px;
|
| 246 |
+
font-weight: 600;
|
| 247 |
+
display: flex;
|
| 248 |
+
align-items: center;
|
| 249 |
+
gap: 12px;
|
| 250 |
+
}
|
| 251 |
+
|
| 252 |
+
.ai-msg ul {
|
| 253 |
+
margin: 20px 0;
|
| 254 |
+
list-style: none;
|
| 255 |
+
}
|
| 256 |
+
|
| 257 |
+
.ai-msg li {
|
| 258 |
+
position: relative;
|
| 259 |
+
padding-left: 28px;
|
| 260 |
+
margin-bottom: 15px;
|
| 261 |
+
}
|
| 262 |
+
|
| 263 |
+
.ai-msg li::before {
|
| 264 |
+
content: "🎓";
|
| 265 |
+
position: absolute;
|
| 266 |
+
left: 0;
|
| 267 |
+
font-size: 0.9rem;
|
| 268 |
+
}
|
| 269 |
+
|
| 270 |
+
.highlight {
|
| 271 |
+
background: rgba(59, 130, 246, 0.08);
|
| 272 |
+
border-left: 4px solid var(--accent-blue);
|
| 273 |
+
padding: 22px;
|
| 274 |
+
margin: 25px 0;
|
| 275 |
+
border-radius: 0 16px 16px 0;
|
| 276 |
+
font-weight: 500;
|
| 277 |
+
color: #fff;
|
| 278 |
+
}
|
| 279 |
|
| 280 |
.typing {
|
| 281 |
display: flex;
|
|
|
|
| 310 |
animation: typing-blink 1.4s infinite ease-in-out;
|
| 311 |
}
|
| 312 |
|
| 313 |
+
.typing-dots span:nth-child(2) {
|
| 314 |
+
animation-delay: 0.2s;
|
| 315 |
+
}
|
| 316 |
+
|
| 317 |
+
.typing-dots span:nth-child(3) {
|
| 318 |
+
animation-delay: 0.4s;
|
| 319 |
+
}
|
| 320 |
|
| 321 |
@keyframes typing-blink {
|
| 322 |
+
|
| 323 |
+
0%,
|
| 324 |
+
100% {
|
| 325 |
+
opacity: 0.3;
|
| 326 |
+
transform: scale(0.8);
|
| 327 |
+
}
|
| 328 |
+
|
| 329 |
+
50% {
|
| 330 |
+
opacity: 1;
|
| 331 |
+
transform: scale(1.1);
|
| 332 |
+
}
|
| 333 |
}
|
| 334 |
|
| 335 |
@keyframes pulse-border {
|
| 336 |
+
|
| 337 |
+
0%,
|
| 338 |
+
100% {
|
| 339 |
+
border-color: var(--glass-border);
|
| 340 |
+
}
|
| 341 |
+
|
| 342 |
+
50% {
|
| 343 |
+
border-color: var(--accent-blue);
|
| 344 |
+
box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
|
| 345 |
+
}
|
| 346 |
+
}
|
| 347 |
+
|
| 348 |
+
.input-area {
|
| 349 |
+
padding: 30px 10%;
|
| 350 |
+
background: linear-gradient(to top, var(--bg-dark) 50%, transparent);
|
| 351 |
+
border-top: 1px solid var(--glass-border);
|
| 352 |
+
z-index: 60;
|
| 353 |
+
}
|
| 354 |
+
|
| 355 |
+
.input-box {
|
| 356 |
+
background: rgba(255, 255, 255, 0.04);
|
| 357 |
+
border: 1px solid var(--glass-border);
|
| 358 |
+
border-radius: 18px;
|
| 359 |
+
padding: 6px;
|
| 360 |
+
display: flex;
|
| 361 |
+
align-items: center;
|
| 362 |
+
transition: 0.3s;
|
| 363 |
}
|
| 364 |
|
| 365 |
+
.input-box:focus-within {
|
| 366 |
+
border-color: var(--accent-blue);
|
| 367 |
+
box-shadow: 0 0 30px rgba(59, 130, 246, 0.2);
|
| 368 |
+
}
|
|
|
|
|
|
|
| 369 |
|
| 370 |
+
.input-box input {
|
| 371 |
+
flex: 1;
|
| 372 |
+
background: transparent;
|
| 373 |
+
border: none;
|
| 374 |
+
padding: 16px 24px;
|
| 375 |
+
color: white;
|
| 376 |
+
font-size: 1.05rem;
|
| 377 |
+
outline: none;
|
| 378 |
+
}
|
| 379 |
+
|
| 380 |
+
.send-btn {
|
| 381 |
+
background: var(--accent-blue);
|
| 382 |
+
color: white;
|
| 383 |
+
border: none;
|
| 384 |
+
width: 50px;
|
| 385 |
+
height: 50px;
|
| 386 |
+
border-radius: 14px;
|
| 387 |
+
display: flex;
|
| 388 |
+
align-items: center;
|
| 389 |
+
justify-content: center;
|
| 390 |
+
cursor: pointer;
|
| 391 |
+
transition: 0.3s;
|
| 392 |
+
margin-right: 6px;
|
| 393 |
+
}
|
| 394 |
+
|
| 395 |
+
.send-btn:hover {
|
| 396 |
+
background: var(--accent-purple);
|
| 397 |
+
transform: scale(1.1);
|
| 398 |
+
}
|
| 399 |
+
|
| 400 |
+
.hidden {
|
| 401 |
+
display: none !important;
|
| 402 |
+
}
|
| 403 |
+
|
| 404 |
+
/* MOBILE RESPONSIVENESS */
|
| 405 |
+
.menu-toggle {
|
| 406 |
+
display: none;
|
| 407 |
+
background: none;
|
| 408 |
+
border: none;
|
| 409 |
+
color: var(--text-primary);
|
| 410 |
+
font-size: 1.8rem;
|
| 411 |
+
cursor: pointer;
|
| 412 |
+
align-items: center;
|
| 413 |
+
justify-content: center;
|
| 414 |
+
margin-right: 15px;
|
| 415 |
+
z-index: 101;
|
| 416 |
+
transition: color 0.3s;
|
| 417 |
+
}
|
| 418 |
+
|
| 419 |
+
.menu-toggle:hover {
|
| 420 |
+
color: var(--accent-blue);
|
| 421 |
+
}
|
| 422 |
+
|
| 423 |
+
.sidebar-overlay {
|
| 424 |
+
display: none;
|
| 425 |
+
position: fixed;
|
| 426 |
+
top: 0;
|
| 427 |
+
left: 0;
|
| 428 |
+
width: 100vw;
|
| 429 |
+
height: 100vh;
|
| 430 |
+
background: rgba(3, 6, 23, 0.6);
|
| 431 |
+
backdrop-filter: blur(5px);
|
| 432 |
+
-webkit-backdrop-filter: blur(5px);
|
| 433 |
+
z-index: 99;
|
| 434 |
+
opacity: 0;
|
| 435 |
+
transition: opacity 0.3s ease;
|
| 436 |
+
pointer-events: none;
|
| 437 |
+
}
|
| 438 |
+
|
| 439 |
+
.sidebar-overlay.active {
|
| 440 |
+
display: block;
|
| 441 |
+
opacity: 1;
|
| 442 |
+
pointer-events: auto;
|
| 443 |
+
}
|
| 444 |
+
|
| 445 |
+
@media (max-width: 768px) {
|
| 446 |
+
.menu-toggle {
|
| 447 |
+
display: flex;
|
| 448 |
+
}
|
| 449 |
+
|
| 450 |
+
.sidebar {
|
| 451 |
+
position: fixed;
|
| 452 |
+
top: 0;
|
| 453 |
+
left: -280px;
|
| 454 |
+
height: 100vh;
|
| 455 |
+
width: 280px;
|
| 456 |
+
transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
| 457 |
+
z-index: 1000;
|
| 458 |
+
box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
|
| 459 |
+
}
|
| 460 |
+
|
| 461 |
+
.sidebar.active {
|
| 462 |
+
left: 0;
|
| 463 |
+
}
|
| 464 |
+
|
| 465 |
+
.top-bar {
|
| 466 |
+
padding: 0 15px;
|
| 467 |
+
}
|
| 468 |
+
|
| 469 |
+
.top-bar > div:last-child {
|
| 470 |
+
display: none;
|
| 471 |
+
}
|
| 472 |
+
|
| 473 |
+
.messages-container {
|
| 474 |
+
padding: 25px 15px;
|
| 475 |
+
gap: 20px;
|
| 476 |
+
}
|
| 477 |
+
|
| 478 |
+
.user-msg {
|
| 479 |
+
max-width: 85%;
|
| 480 |
+
padding: 12px 18px;
|
| 481 |
+
font-size: 0.95rem;
|
| 482 |
+
}
|
| 483 |
+
|
| 484 |
+
.ai-msg {
|
| 485 |
+
max-width: 95%;
|
| 486 |
+
padding: 20px;
|
| 487 |
+
font-size: 0.95rem;
|
| 488 |
+
}
|
| 489 |
+
|
| 490 |
+
.ai-msg h3 {
|
| 491 |
+
font-size: 1.15rem;
|
| 492 |
+
margin-bottom: 15px;
|
| 493 |
+
}
|
| 494 |
+
|
| 495 |
+
.input-area {
|
| 496 |
+
padding: 15px 15px 25px 15px;
|
| 497 |
+
}
|
| 498 |
+
|
| 499 |
+
.input-box input {
|
| 500 |
+
padding: 12px 15px;
|
| 501 |
+
font-size: 0.95rem;
|
| 502 |
+
}
|
| 503 |
+
|
| 504 |
+
.send-btn {
|
| 505 |
+
width: 44px;
|
| 506 |
+
height: 44px;
|
| 507 |
+
}
|
| 508 |
+
|
| 509 |
+
#welcomeScreen h1 {
|
| 510 |
+
font-size: 1.8rem !important;
|
| 511 |
+
margin-bottom: 10px !important;
|
| 512 |
+
}
|
| 513 |
+
|
| 514 |
+
#welcomeScreen p {
|
| 515 |
+
font-size: 0.95rem !important;
|
| 516 |
+
max-width: 100% !important;
|
| 517 |
+
}
|
| 518 |
+
|
| 519 |
+
#welcomeScreen div:first-child {
|
| 520 |
+
font-size: 3.5rem !important;
|
| 521 |
+
margin-bottom: 15px !important;
|
| 522 |
+
}
|
| 523 |
+
}
|
| 524 |
</style>
|
| 525 |
</head>
|
| 526 |
+
|
| 527 |
<body>
|
| 528 |
+
<div class="sidebar-overlay" id="sidebarOverlay"></div>
|
| 529 |
<aside class="sidebar">
|
| 530 |
<div class="sidebar-header">
|
| 531 |
<button class="new-chat-btn" id="newChatBtn"><span>+</span> New Research</button>
|
|
|
|
| 541 |
</div>
|
| 542 |
</div>
|
| 543 |
<div style="display: flex; flex-direction: column; gap: 8px; margin-top: 15px;">
|
| 544 |
+
<a href="/studentdashboard.html"
|
| 545 |
+
style="color: var(--accent-blue); text-decoration: none; font-size: 0.8rem; text-align: center; font-weight: 600;">Back
|
| 546 |
+
to Dashboard</a>
|
| 547 |
+
<a href="/role"
|
| 548 |
+
style="color: var(--text-dim); text-decoration: none; font-size: 0.8rem; text-align: center;">←
|
| 549 |
+
Change Role</a>
|
| 550 |
</div>
|
| 551 |
</div>
|
| 552 |
</aside>
|
| 553 |
|
| 554 |
<main class="main-chat">
|
| 555 |
<header class="top-bar">
|
| 556 |
+
<button class="menu-toggle" id="menuToggle" aria-label="Toggle Sidebar">☰</button>
|
| 557 |
<div class="system-branding">
|
| 558 |
<span style="font-weight: 700; color: white;">⚖️ Law Bot (Student)</span>
|
| 559 |
+
<div class="status-pill">
|
| 560 |
+
<div class="status-dot"></div>Academic Ready
|
| 561 |
+
</div>
|
| 562 |
</div>
|
| 563 |
<div style="font-size: 0.85rem; color: var(--text-dim); font-weight: 500;">Educational Framework v4.0</div>
|
| 564 |
</header>
|
| 565 |
|
| 566 |
+
<div id="welcomeScreen"
|
| 567 |
+
style="position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 40px; z-index: 1;">
|
| 568 |
<div style="font-size: 4rem; margin-bottom: 25px;">📚</div>
|
| 569 |
+
<h1 style="font-size: 2.8rem; font-weight: 700; margin-bottom: 12px; letter-spacing: -1px;">Empowering your
|
| 570 |
+
studies.</h1>
|
| 571 |
+
<p style="color: var(--text-dim); max-width: 550px; line-height: 1.7; font-size: 1.1rem;">Expert guidance
|
| 572 |
+
for law students. Ask about case laws, sections, or get conceptual breakdowns for your exams.</p>
|
| 573 |
</div>
|
| 574 |
|
| 575 |
<div class="messages-container" id="chatContainer"></div>
|
|
|
|
| 584 |
<div class="input-box">
|
| 585 |
<input type="text" id="messageInput" placeholder="Enter your research query..." autocomplete="off">
|
| 586 |
<button class="send-btn" id="sendButton">
|
| 587 |
+
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"
|
| 588 |
+
stroke-linecap="round" stroke-linejoin="round">
|
| 589 |
+
<line x1="22" y1="2" x2="11" y2="13"></line>
|
| 590 |
+
<polygon points="22 2 15 22 11 13 2 9 22 2"></polygon>
|
| 591 |
+
</svg>
|
| 592 |
</button>
|
| 593 |
</div>
|
| 594 |
</div>
|
|
|
|
| 717 |
createNewMessage('ai', msg.response);
|
| 718 |
});
|
| 719 |
currentAiMessageElement = null;
|
| 720 |
+
if (window.innerWidth <= 768) {
|
| 721 |
+
const sidebar = document.querySelector('.sidebar');
|
| 722 |
+
const sidebarOverlay = document.getElementById('sidebarOverlay');
|
| 723 |
+
if (sidebar) sidebar.classList.remove('active');
|
| 724 |
+
if (sidebarOverlay) sidebarOverlay.classList.remove('active');
|
| 725 |
+
}
|
| 726 |
} catch (err) { console.error(err); }
|
| 727 |
}
|
| 728 |
|
|
|
|
| 745 |
currentCaseId = crypto.randomUUID();
|
| 746 |
chatContainer.innerHTML = '';
|
| 747 |
welcomeScreen.classList.remove('hidden');
|
| 748 |
+
if (window.innerWidth <= 768) {
|
| 749 |
+
const sidebar = document.querySelector('.sidebar');
|
| 750 |
+
const sidebarOverlay = document.getElementById('sidebarOverlay');
|
| 751 |
+
if (sidebar) sidebar.classList.remove('active');
|
| 752 |
+
if (sidebarOverlay) sidebarOverlay.classList.remove('active');
|
| 753 |
+
}
|
| 754 |
};
|
| 755 |
|
| 756 |
connectWS();
|
| 757 |
loadHistory();
|
| 758 |
fetchUserStatus();
|
| 759 |
+
|
| 760 |
+
// Mobile Sidebar Toggling Logic
|
| 761 |
+
const menuToggle = document.getElementById('menuToggle');
|
| 762 |
+
const sidebar = document.querySelector('.sidebar');
|
| 763 |
+
const sidebarOverlay = document.getElementById('sidebarOverlay');
|
| 764 |
+
|
| 765 |
+
function toggleSidebar() {
|
| 766 |
+
sidebar.classList.toggle('active');
|
| 767 |
+
sidebarOverlay.classList.toggle('active');
|
| 768 |
+
}
|
| 769 |
+
|
| 770 |
+
menuToggle.addEventListener('click', toggleSidebar);
|
| 771 |
+
sidebarOverlay.addEventListener('click', toggleSidebar);
|
| 772 |
</script>
|
| 773 |
</body>
|
| 774 |
+
|
| 775 |
</html>
|
src/apps/templates/studentdashboard.html
CHANGED
|
@@ -138,6 +138,10 @@
|
|
| 138 |
}
|
| 139 |
|
| 140 |
@media(max-width: 768px) {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 141 |
.sidebar {
|
| 142 |
width: 100%;
|
| 143 |
height: auto;
|
|
|
|
| 138 |
}
|
| 139 |
|
| 140 |
@media(max-width: 768px) {
|
| 141 |
+
body {
|
| 142 |
+
flex-direction: column;
|
| 143 |
+
}
|
| 144 |
+
|
| 145 |
.sidebar {
|
| 146 |
width: 100%;
|
| 147 |
height: auto;
|
src/apps/templates/woman.html
CHANGED
|
@@ -87,9 +87,34 @@
|
|
| 87 |
width: 90%;
|
| 88 |
}
|
| 89 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
.hero {
|
| 91 |
flex-direction: column;
|
| 92 |
-
padding-top:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
}
|
| 94 |
}
|
| 95 |
|
|
@@ -159,19 +184,20 @@
|
|
| 159 |
}
|
| 160 |
|
| 161 |
.quick-links {
|
|
|
|
|
|
|
|
|
|
| 162 |
flex-wrap: wrap;
|
| 163 |
gap: 1rem;
|
| 164 |
-
margin: 2rem
|
| 165 |
-
|
| 166 |
-
|
| 167 |
}
|
| 168 |
|
| 169 |
.quick-linkss {
|
|
|
|
| 170 |
flex-wrap: wrap;
|
| 171 |
gap: 1rem;
|
| 172 |
margin: 0;
|
| 173 |
-
|
| 174 |
-
|
| 175 |
}
|
| 176 |
|
| 177 |
.quick-link {
|
|
|
|
| 87 |
width: 90%;
|
| 88 |
}
|
| 89 |
|
| 90 |
+
.fir-generator {
|
| 91 |
+
margin-top: 0 !important;
|
| 92 |
+
width: 100% !important;
|
| 93 |
+
}
|
| 94 |
+
|
| 95 |
.hero {
|
| 96 |
flex-direction: column;
|
| 97 |
+
padding-top: 8rem;
|
| 98 |
+
padding-bottom: 4rem;
|
| 99 |
+
min-height: auto;
|
| 100 |
+
}
|
| 101 |
+
|
| 102 |
+
.hero h1 {
|
| 103 |
+
font-size: 2.2rem !important;
|
| 104 |
+
line-height: 1.3;
|
| 105 |
+
margin-bottom: 0.8rem;
|
| 106 |
+
}
|
| 107 |
+
|
| 108 |
+
.hero p {
|
| 109 |
+
font-size: 1.1rem !important;
|
| 110 |
+
margin-bottom: 1.5rem;
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
+
.emergency-alert {
|
| 114 |
+
padding: 12px 24px;
|
| 115 |
+
font-size: 0.9rem;
|
| 116 |
+
bottom: 20px;
|
| 117 |
+
right: 20px;
|
| 118 |
}
|
| 119 |
}
|
| 120 |
|
|
|
|
| 184 |
}
|
| 185 |
|
| 186 |
.quick-links {
|
| 187 |
+
display: flex;
|
| 188 |
+
justify-content: center;
|
| 189 |
+
align-items: center;
|
| 190 |
flex-wrap: wrap;
|
| 191 |
gap: 1rem;
|
| 192 |
+
margin: 2rem auto;
|
| 193 |
+
max-width: 600px;
|
|
|
|
| 194 |
}
|
| 195 |
|
| 196 |
.quick-linkss {
|
| 197 |
+
display: flex;
|
| 198 |
flex-wrap: wrap;
|
| 199 |
gap: 1rem;
|
| 200 |
margin: 0;
|
|
|
|
|
|
|
| 201 |
}
|
| 202 |
|
| 203 |
.quick-link {
|
src/apps/templates/womanchatbot.html
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
<title>AI Legal Assistant | Woman's Framework</title>
|
| 7 |
-
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap"
|
|
|
|
| 8 |
<style>
|
| 9 |
:root {
|
| 10 |
--bg-dark: #030617;
|
|
@@ -185,9 +187,20 @@
|
|
| 185 |
}
|
| 186 |
|
| 187 |
@keyframes pulse-dot {
|
| 188 |
-
0% {
|
| 189 |
-
|
| 190 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 191 |
}
|
| 192 |
|
| 193 |
/* MESSAGES AREA */
|
|
@@ -208,8 +221,15 @@
|
|
| 208 |
}
|
| 209 |
|
| 210 |
@keyframes message-slide {
|
| 211 |
-
from {
|
| 212 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 213 |
}
|
| 214 |
|
| 215 |
.user-msg {
|
|
@@ -246,9 +266,20 @@
|
|
| 246 |
font-weight: 600;
|
| 247 |
}
|
| 248 |
|
| 249 |
-
.ai-msg p {
|
| 250 |
-
|
| 251 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 252 |
|
| 253 |
.ai-msg li::before {
|
| 254 |
content: "✦";
|
|
@@ -302,17 +333,39 @@
|
|
| 302 |
animation: typing-blink 1.4s infinite ease-in-out;
|
| 303 |
}
|
| 304 |
|
| 305 |
-
.typing-dots span:nth-child(2) {
|
| 306 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 307 |
|
| 308 |
@keyframes typing-blink {
|
| 309 |
-
|
| 310 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 311 |
}
|
| 312 |
|
| 313 |
@keyframes pulse-border {
|
| 314 |
-
|
| 315 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 316 |
}
|
| 317 |
|
| 318 |
/* INPUT AREA */
|
|
@@ -370,22 +423,154 @@
|
|
| 370 |
transform: scale(1.1);
|
| 371 |
}
|
| 372 |
|
| 373 |
-
.hidden {
|
|
|
|
|
|
|
| 374 |
|
| 375 |
@keyframes float {
|
| 376 |
-
|
| 377 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 378 |
}
|
| 379 |
</style>
|
| 380 |
</head>
|
|
|
|
| 381 |
<body>
|
|
|
|
| 382 |
<aside class="sidebar">
|
| 383 |
<div class="sidebar-header">
|
| 384 |
<button class="new-chat-btn" id="newChatBtn">
|
| 385 |
<span>+</span> New Case
|
| 386 |
</button>
|
| 387 |
</div>
|
| 388 |
-
|
| 389 |
<div class="history-label">Legal Threads</div>
|
| 390 |
<div class="history-list" id="historyList"></div>
|
| 391 |
|
|
@@ -398,14 +583,19 @@
|
|
| 398 |
</div>
|
| 399 |
</div>
|
| 400 |
<div style="display: flex; flex-direction: column; gap: 8px; margin-top: 15px;">
|
| 401 |
-
<a href="/woman.html"
|
| 402 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 403 |
</div>
|
| 404 |
</div>
|
| 405 |
</aside>
|
| 406 |
|
| 407 |
<main class="main-chat">
|
| 408 |
<header class="top-bar">
|
|
|
|
| 409 |
<div class="system-branding">
|
| 410 |
<span style="font-weight: 700; color: white;">⚖️ Law Bot (Woman)</span>
|
| 411 |
<div class="status-pill">
|
|
@@ -413,13 +603,17 @@
|
|
| 413 |
Secure Online
|
| 414 |
</div>
|
| 415 |
</div>
|
| 416 |
-
<div style="font-size: 0.85rem; color: var(--text-dim); font-weight: 500;">Protective Intelligence v4.0
|
|
|
|
| 417 |
</header>
|
| 418 |
|
| 419 |
-
<div id="welcomeScreen"
|
|
|
|
| 420 |
<div style="font-size: 4rem; margin-bottom: 25px; animation: float 6s ease-in-out infinite;">🛡️</div>
|
| 421 |
-
<h1 style="font-size: 2.8rem; font-weight: 700; margin-bottom: 12px; letter-spacing: -1px;">Empowerment
|
| 422 |
-
|
|
|
|
|
|
|
| 423 |
</div>
|
| 424 |
|
| 425 |
<div class="messages-container" id="chatContainer"></div>
|
|
@@ -433,12 +627,19 @@
|
|
| 433 |
|
| 434 |
<div class="input-area">
|
| 435 |
<div class="input-box">
|
| 436 |
-
<input type="text" id="messageInput" placeholder="How can I assist you with your legal rights today?"
|
|
|
|
| 437 |
<button class="send-btn" id="sendButton">
|
| 438 |
-
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 439 |
</button>
|
| 440 |
</div>
|
| 441 |
-
<p style="text-align: center; font-size: 0.75rem; color: var(--text-dim); margin-top: 18px; opacity: 0.8;">
|
|
|
|
|
|
|
| 442 |
</div>
|
| 443 |
</main>
|
| 444 |
|
|
@@ -565,6 +766,12 @@
|
|
| 565 |
createNewMessage('ai', msg.response);
|
| 566 |
});
|
| 567 |
currentAiMessageElement = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 568 |
} catch (err) { console.error(err); }
|
| 569 |
}
|
| 570 |
|
|
@@ -587,11 +794,31 @@
|
|
| 587 |
currentCaseId = crypto.randomUUID();
|
| 588 |
chatContainer.innerHTML = '';
|
| 589 |
welcomeScreen.classList.remove('hidden');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 590 |
};
|
| 591 |
|
| 592 |
connectWS();
|
| 593 |
loadHistory();
|
| 594 |
fetchUserStatus();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 595 |
</script>
|
| 596 |
</body>
|
|
|
|
| 597 |
</html>
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
| 3 |
+
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8">
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 7 |
<title>AI Legal Assistant | Woman's Framework</title>
|
| 8 |
+
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap"
|
| 9 |
+
rel="stylesheet">
|
| 10 |
<style>
|
| 11 |
:root {
|
| 12 |
--bg-dark: #030617;
|
|
|
|
| 187 |
}
|
| 188 |
|
| 189 |
@keyframes pulse-dot {
|
| 190 |
+
0% {
|
| 191 |
+
transform: scale(1);
|
| 192 |
+
opacity: 1;
|
| 193 |
+
}
|
| 194 |
+
|
| 195 |
+
50% {
|
| 196 |
+
transform: scale(1.5);
|
| 197 |
+
opacity: 0.4;
|
| 198 |
+
}
|
| 199 |
+
|
| 200 |
+
100% {
|
| 201 |
+
transform: scale(1);
|
| 202 |
+
opacity: 1;
|
| 203 |
+
}
|
| 204 |
}
|
| 205 |
|
| 206 |
/* MESSAGES AREA */
|
|
|
|
| 221 |
}
|
| 222 |
|
| 223 |
@keyframes message-slide {
|
| 224 |
+
from {
|
| 225 |
+
opacity: 0;
|
| 226 |
+
transform: translateY(20px);
|
| 227 |
+
}
|
| 228 |
+
|
| 229 |
+
to {
|
| 230 |
+
opacity: 1;
|
| 231 |
+
transform: translateY(0);
|
| 232 |
+
}
|
| 233 |
}
|
| 234 |
|
| 235 |
.user-msg {
|
|
|
|
| 266 |
font-weight: 600;
|
| 267 |
}
|
| 268 |
|
| 269 |
+
.ai-msg p {
|
| 270 |
+
margin-bottom: 18px;
|
| 271 |
+
}
|
| 272 |
+
|
| 273 |
+
.ai-msg ul {
|
| 274 |
+
margin: 20px 0;
|
| 275 |
+
list-style: none;
|
| 276 |
+
}
|
| 277 |
+
|
| 278 |
+
.ai-msg li {
|
| 279 |
+
position: relative;
|
| 280 |
+
padding-left: 28px;
|
| 281 |
+
margin-bottom: 15px;
|
| 282 |
+
}
|
| 283 |
|
| 284 |
.ai-msg li::before {
|
| 285 |
content: "✦";
|
|
|
|
| 333 |
animation: typing-blink 1.4s infinite ease-in-out;
|
| 334 |
}
|
| 335 |
|
| 336 |
+
.typing-dots span:nth-child(2) {
|
| 337 |
+
animation-delay: 0.2s;
|
| 338 |
+
}
|
| 339 |
+
|
| 340 |
+
.typing-dots span:nth-child(3) {
|
| 341 |
+
animation-delay: 0.4s;
|
| 342 |
+
}
|
| 343 |
|
| 344 |
@keyframes typing-blink {
|
| 345 |
+
|
| 346 |
+
0%,
|
| 347 |
+
100% {
|
| 348 |
+
opacity: 0.3;
|
| 349 |
+
transform: scale(0.8);
|
| 350 |
+
}
|
| 351 |
+
|
| 352 |
+
50% {
|
| 353 |
+
opacity: 1;
|
| 354 |
+
transform: scale(1.1);
|
| 355 |
+
}
|
| 356 |
}
|
| 357 |
|
| 358 |
@keyframes pulse-border {
|
| 359 |
+
|
| 360 |
+
0%,
|
| 361 |
+
100% {
|
| 362 |
+
border-color: var(--glass-border);
|
| 363 |
+
}
|
| 364 |
+
|
| 365 |
+
50% {
|
| 366 |
+
border-color: var(--accent-pink);
|
| 367 |
+
box-shadow: 0 0 20px rgba(244, 114, 182, 0.1);
|
| 368 |
+
}
|
| 369 |
}
|
| 370 |
|
| 371 |
/* INPUT AREA */
|
|
|
|
| 423 |
transform: scale(1.1);
|
| 424 |
}
|
| 425 |
|
| 426 |
+
.hidden {
|
| 427 |
+
display: none !important;
|
| 428 |
+
}
|
| 429 |
|
| 430 |
@keyframes float {
|
| 431 |
+
|
| 432 |
+
0%,
|
| 433 |
+
100% {
|
| 434 |
+
transform: translateY(0);
|
| 435 |
+
}
|
| 436 |
+
|
| 437 |
+
50% {
|
| 438 |
+
transform: translateY(-15px);
|
| 439 |
+
}
|
| 440 |
+
}
|
| 441 |
+
|
| 442 |
+
/* MOBILE RESPONSIVENESS */
|
| 443 |
+
.menu-toggle {
|
| 444 |
+
display: none;
|
| 445 |
+
background: none;
|
| 446 |
+
border: none;
|
| 447 |
+
color: var(--text-primary);
|
| 448 |
+
font-size: 1.8rem;
|
| 449 |
+
cursor: pointer;
|
| 450 |
+
align-items: center;
|
| 451 |
+
justify-content: center;
|
| 452 |
+
margin-right: 15px;
|
| 453 |
+
z-index: 101;
|
| 454 |
+
transition: color 0.3s;
|
| 455 |
+
}
|
| 456 |
+
|
| 457 |
+
.menu-toggle:hover {
|
| 458 |
+
color: var(--accent-pink);
|
| 459 |
+
}
|
| 460 |
+
|
| 461 |
+
.sidebar-overlay {
|
| 462 |
+
display: none;
|
| 463 |
+
position: fixed;
|
| 464 |
+
top: 0;
|
| 465 |
+
left: 0;
|
| 466 |
+
width: 100vw;
|
| 467 |
+
height: 100vh;
|
| 468 |
+
background: rgba(3, 6, 23, 0.6);
|
| 469 |
+
backdrop-filter: blur(5px);
|
| 470 |
+
-webkit-backdrop-filter: blur(5px);
|
| 471 |
+
z-index: 99;
|
| 472 |
+
opacity: 0;
|
| 473 |
+
transition: opacity 0.3s ease;
|
| 474 |
+
pointer-events: none;
|
| 475 |
+
}
|
| 476 |
+
|
| 477 |
+
.sidebar-overlay.active {
|
| 478 |
+
display: block;
|
| 479 |
+
opacity: 1;
|
| 480 |
+
pointer-events: auto;
|
| 481 |
+
}
|
| 482 |
+
|
| 483 |
+
@media (max-width: 768px) {
|
| 484 |
+
.menu-toggle {
|
| 485 |
+
display: flex;
|
| 486 |
+
}
|
| 487 |
+
|
| 488 |
+
.sidebar {
|
| 489 |
+
position: fixed;
|
| 490 |
+
top: 0;
|
| 491 |
+
left: -280px;
|
| 492 |
+
height: 100vh;
|
| 493 |
+
width: 280px;
|
| 494 |
+
transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
| 495 |
+
z-index: 1000;
|
| 496 |
+
box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
|
| 497 |
+
}
|
| 498 |
+
|
| 499 |
+
.sidebar.active {
|
| 500 |
+
left: 0;
|
| 501 |
+
}
|
| 502 |
+
|
| 503 |
+
.top-bar {
|
| 504 |
+
padding: 0 15px;
|
| 505 |
+
}
|
| 506 |
+
|
| 507 |
+
.top-bar > div:last-child {
|
| 508 |
+
display: none;
|
| 509 |
+
}
|
| 510 |
+
|
| 511 |
+
.messages-container {
|
| 512 |
+
padding: 25px 15px;
|
| 513 |
+
gap: 20px;
|
| 514 |
+
}
|
| 515 |
+
|
| 516 |
+
.user-msg {
|
| 517 |
+
max-width: 85%;
|
| 518 |
+
padding: 12px 18px;
|
| 519 |
+
font-size: 0.95rem;
|
| 520 |
+
}
|
| 521 |
+
|
| 522 |
+
.ai-msg {
|
| 523 |
+
max-width: 95%;
|
| 524 |
+
padding: 20px;
|
| 525 |
+
font-size: 0.95rem;
|
| 526 |
+
}
|
| 527 |
+
|
| 528 |
+
.ai-msg h3 {
|
| 529 |
+
font-size: 1.15rem;
|
| 530 |
+
margin-bottom: 15px;
|
| 531 |
+
}
|
| 532 |
+
|
| 533 |
+
.input-area {
|
| 534 |
+
padding: 15px 15px 25px 15px;
|
| 535 |
+
}
|
| 536 |
+
|
| 537 |
+
.input-box input {
|
| 538 |
+
padding: 12px 15px;
|
| 539 |
+
font-size: 0.95rem;
|
| 540 |
+
}
|
| 541 |
+
|
| 542 |
+
.send-btn {
|
| 543 |
+
width: 44px;
|
| 544 |
+
height: 44px;
|
| 545 |
+
}
|
| 546 |
+
|
| 547 |
+
#welcomeScreen h1 {
|
| 548 |
+
font-size: 1.8rem !important;
|
| 549 |
+
margin-bottom: 10px !important;
|
| 550 |
+
}
|
| 551 |
+
|
| 552 |
+
#welcomeScreen p {
|
| 553 |
+
font-size: 0.95rem !important;
|
| 554 |
+
max-width: 100% !important;
|
| 555 |
+
}
|
| 556 |
+
|
| 557 |
+
#welcomeScreen div:first-child {
|
| 558 |
+
font-size: 3rem !important;
|
| 559 |
+
margin-bottom: 15px !important;
|
| 560 |
+
}
|
| 561 |
}
|
| 562 |
</style>
|
| 563 |
</head>
|
| 564 |
+
|
| 565 |
<body>
|
| 566 |
+
<div class="sidebar-overlay" id="sidebarOverlay"></div>
|
| 567 |
<aside class="sidebar">
|
| 568 |
<div class="sidebar-header">
|
| 569 |
<button class="new-chat-btn" id="newChatBtn">
|
| 570 |
<span>+</span> New Case
|
| 571 |
</button>
|
| 572 |
</div>
|
| 573 |
+
|
| 574 |
<div class="history-label">Legal Threads</div>
|
| 575 |
<div class="history-list" id="historyList"></div>
|
| 576 |
|
|
|
|
| 583 |
</div>
|
| 584 |
</div>
|
| 585 |
<div style="display: flex; flex-direction: column; gap: 8px; margin-top: 15px;">
|
| 586 |
+
<a href="/woman.html"
|
| 587 |
+
style="color: var(--accent-pink); text-decoration: none; font-size: 0.8rem; text-align: center; font-weight: 600;">Back
|
| 588 |
+
to Dashboard</a>
|
| 589 |
+
<a href="/role"
|
| 590 |
+
style="color: var(--text-dim); text-decoration: none; font-size: 0.8rem; text-align: center;">←
|
| 591 |
+
Change Role</a>
|
| 592 |
</div>
|
| 593 |
</div>
|
| 594 |
</aside>
|
| 595 |
|
| 596 |
<main class="main-chat">
|
| 597 |
<header class="top-bar">
|
| 598 |
+
<button class="menu-toggle" id="menuToggle" aria-label="Toggle Sidebar">☰</button>
|
| 599 |
<div class="system-branding">
|
| 600 |
<span style="font-weight: 700; color: white;">⚖️ Law Bot (Woman)</span>
|
| 601 |
<div class="status-pill">
|
|
|
|
| 603 |
Secure Online
|
| 604 |
</div>
|
| 605 |
</div>
|
| 606 |
+
<div style="font-size: 0.85rem; color: var(--text-dim); font-weight: 500;">Protective Intelligence v4.0
|
| 607 |
+
</div>
|
| 608 |
</header>
|
| 609 |
|
| 610 |
+
<div id="welcomeScreen"
|
| 611 |
+
style="position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 40px; z-index: 1;">
|
| 612 |
<div style="font-size: 4rem; margin-bottom: 25px; animation: float 6s ease-in-out infinite;">🛡️</div>
|
| 613 |
+
<h1 style="font-size: 2.8rem; font-weight: 700; margin-bottom: 12px; letter-spacing: -1px;">Empowerment
|
| 614 |
+
through Law.</h1>
|
| 615 |
+
<p style="color: var(--text-dim); max-width: 550px; line-height: 1.7; font-size: 1.1rem;">Dedicated legal
|
| 616 |
+
guidance for your rights and safety. Your consultation is private and powered by expert AI.</p>
|
| 617 |
</div>
|
| 618 |
|
| 619 |
<div class="messages-container" id="chatContainer"></div>
|
|
|
|
| 627 |
|
| 628 |
<div class="input-area">
|
| 629 |
<div class="input-box">
|
| 630 |
+
<input type="text" id="messageInput" placeholder="How can I assist you with your legal rights today?"
|
| 631 |
+
autocomplete="off">
|
| 632 |
<button class="send-btn" id="sendButton">
|
| 633 |
+
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"
|
| 634 |
+
stroke-linecap="round" stroke-linejoin="round">
|
| 635 |
+
<line x1="22" y1="2" x2="11" y2="13"></line>
|
| 636 |
+
<polygon points="22 2 15 22 11 13 2 9 22 2"></polygon>
|
| 637 |
+
</svg>
|
| 638 |
</button>
|
| 639 |
</div>
|
| 640 |
+
<p style="text-align: center; font-size: 0.75rem; color: var(--text-dim); margin-top: 18px; opacity: 0.8;">
|
| 641 |
+
⚠️ AI provide framework for awareness. For judicial action, connect with local authorities or legal
|
| 642 |
+
counsel.</p>
|
| 643 |
</div>
|
| 644 |
</main>
|
| 645 |
|
|
|
|
| 766 |
createNewMessage('ai', msg.response);
|
| 767 |
});
|
| 768 |
currentAiMessageElement = null;
|
| 769 |
+
if (window.innerWidth <= 768) {
|
| 770 |
+
const sidebar = document.querySelector('.sidebar');
|
| 771 |
+
const sidebarOverlay = document.getElementById('sidebarOverlay');
|
| 772 |
+
if (sidebar) sidebar.classList.remove('active');
|
| 773 |
+
if (sidebarOverlay) sidebarOverlay.classList.remove('active');
|
| 774 |
+
}
|
| 775 |
} catch (err) { console.error(err); }
|
| 776 |
}
|
| 777 |
|
|
|
|
| 794 |
currentCaseId = crypto.randomUUID();
|
| 795 |
chatContainer.innerHTML = '';
|
| 796 |
welcomeScreen.classList.remove('hidden');
|
| 797 |
+
if (window.innerWidth <= 768) {
|
| 798 |
+
const sidebar = document.querySelector('.sidebar');
|
| 799 |
+
const sidebarOverlay = document.getElementById('sidebarOverlay');
|
| 800 |
+
if (sidebar) sidebar.classList.remove('active');
|
| 801 |
+
if (sidebarOverlay) sidebarOverlay.classList.remove('active');
|
| 802 |
+
}
|
| 803 |
};
|
| 804 |
|
| 805 |
connectWS();
|
| 806 |
loadHistory();
|
| 807 |
fetchUserStatus();
|
| 808 |
+
|
| 809 |
+
// Mobile Sidebar Toggling Logic
|
| 810 |
+
const menuToggle = document.getElementById('menuToggle');
|
| 811 |
+
const sidebar = document.querySelector('.sidebar');
|
| 812 |
+
const sidebarOverlay = document.getElementById('sidebarOverlay');
|
| 813 |
+
|
| 814 |
+
function toggleSidebar() {
|
| 815 |
+
sidebar.classList.toggle('active');
|
| 816 |
+
sidebarOverlay.classList.toggle('active');
|
| 817 |
+
}
|
| 818 |
+
|
| 819 |
+
menuToggle.addEventListener('click', toggleSidebar);
|
| 820 |
+
sidebarOverlay.addEventListener('click', toggleSidebar);
|
| 821 |
</script>
|
| 822 |
</body>
|
| 823 |
+
|
| 824 |
</html>
|