feat: современная тема — чистый минималистичный дизайн

- CSS-переменные для всех цветов (легко менять тему)
- Мягкие тени, скруглённые углы 10/16px
- Акцентный цвет #4361ee (спокойный синий)
- Сообщения: max-width 900px, центрированы
- Input: мягкий фокус, subtle transitions
- Login: gradient фон, подзаголовок
- Кнопки: transparent bg, hover → accent border

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
anor
2026-03-24 23:52:03 +10:00
co-authored by Claude Opus 4.6
parent ad26c2ce98
commit 195f8f6646
+63 -38
View File
@@ -5,54 +5,78 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Сметный ИИ-ассистент</title>
<style>
:root {
--bg: #f8f9fa; --bg-card: #ffffff; --bg-input: #ffffff;
--text: #1a1a2e; --text-muted: #6c757d; --text-light: #adb5bd;
--border: #e9ecef; --border-light: #f1f3f5;
--accent: #4361ee; --accent-hover: #3a56d4; --accent-light: #eef1ff;
--user-bg: #4361ee; --user-text: #ffffff;
--ai-bg: #ffffff; --ai-border: #e9ecef;
--file-bg: #f0fdf4; --file-border: #bbf7d0;
--error-bg: #fff1f2; --error-border: #fecdd3;
--system-bg: #f8f9fa; --system-text: #6c757d;
--shadow-sm: 0 1px 3px rgba(0,0,0,.06);
--shadow-md: 0 4px 16px rgba(0,0,0,.08);
--radius: 10px; --radius-lg: 16px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #f5f5f5; height: 100vh; display: flex; flex-direction: column; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg); height: 100vh; display: flex; flex-direction: column; color: var(--text); -webkit-font-smoothing: antialiased; }
/* Login */
#login-screen { display: flex; align-items: center; justify-content: center; height: 100vh; }
#login-form { background: #fff; padding: 2rem; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,.1); width: 320px; }
#login-form h2 { margin-bottom: 1rem; text-align: center; }
#login-form input { width: 100%; padding: .6rem; margin-bottom: .8rem; border: 1px solid #ddd; border-radius: 6px; font-size: 1rem; }
#login-form button { width: 100%; padding: .7rem; background: #2563eb; color: #fff; border: none; border-radius: 6px; font-size: 1rem; cursor: pointer; }
#login-form button:hover { background: #1d4ed8; }
#login-error { color: #dc2626; font-size: .85rem; margin-bottom: .5rem; display: none; }
#login-screen { display: flex; align-items: center; justify-content: center; height: 100vh; background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); }
#login-form { background: var(--bg-card); padding: 2.5rem 2rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); width: 340px; }
#login-form h2 { margin-bottom: .3rem; text-align: center; font-size: 1.4rem; font-weight: 700; color: var(--text); }
#login-form .subtitle { text-align: center; color: var(--text-muted); font-size: .85rem; margin-bottom: 1.5rem; display: block; }
#login-form input { width: 100%; padding: .7rem .9rem; margin-bottom: .7rem; border: 1.5px solid var(--border); border-radius: var(--radius); font-size: .95rem; transition: border-color .2s; outline: none; background: var(--bg); }
#login-form input:focus { border-color: var(--accent); background: var(--bg-card); }
#login-form button { width: 100%; padding: .75rem; background: var(--accent); color: #fff; border: none; border-radius: var(--radius); font-size: .95rem; font-weight: 600; cursor: pointer; transition: background .2s; margin-top: .3rem; }
#login-form button:hover { background: var(--accent-hover); }
#login-error { color: #e03131; font-size: .8rem; margin-bottom: .5rem; display: none; text-align: center; }
/* Chat */
#chat-screen { display: none; flex-direction: column; height: 100vh; }
#header { background: #fff; padding: .6rem 1rem; border-bottom: 1px solid #e5e7eb; display: flex; align-items: center; justify-content: space-between; }
#header h1 { font-size: 1.1rem; font-weight: 600; }
.header-actions { display: flex; gap: .5rem; }
.header-actions button { padding: .3rem .8rem; background: #f3f4f6; border: 1px solid #d1d5db; border-radius: 6px; cursor: pointer; font-size: .8rem; }
.header-actions button:hover { background: #e5e7eb; }
#header { background: var(--bg-card); padding: .7rem 1.2rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; box-shadow: var(--shadow-sm); }
#header h1 { font-size: 1rem; font-weight: 600; color: var(--text); letter-spacing: -.01em; }
.header-actions { display: flex; gap: .4rem; }
.header-actions button { padding: .35rem .75rem; background: transparent; border: 1.5px solid var(--border); border-radius: var(--radius); cursor: pointer; font-size: .78rem; color: var(--text-muted); font-weight: 500; transition: all .15s; }
.header-actions button:hover { background: var(--bg); border-color: var(--accent); color: var(--accent); }
#messages { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; }
.msg { max-width: 80%; padding: .7rem 1rem; border-radius: 12px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; font-size: .95rem; }
.msg-user { align-self: flex-end; background: #2563eb; color: #fff; }
.msg-ai { align-self: flex-start; background: #fff; border: 1px solid #e5e7eb; }
.copy-btn { display: block; margin-top: .4rem; margin-left: auto; background: #f3f4f6; border: 1px solid #d1d5db; border-radius: 4px; cursor: pointer; font-size: .7rem; padding: .2rem .5rem; color: #6b7280; width: fit-content; }
.copy-btn:hover { background: #e5e7eb; }
.msg-user .copy-btn { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.4); color: rgba(255,255,255,.8); }
.msg-user .copy-btn:hover { background: rgba(255,255,255,.3); }
.copy-btn.copied { background: #d1fae5; border-color: #6ee7b7; color: #065f46; }
.msg-tool { align-self: flex-start; background: #fef3c7; border: 1px solid #fcd34d; font-size: .8rem; font-family: monospace; }
.msg-file { align-self: flex-start; background: #ecfdf5; border: 1px solid #6ee7b7; font-size: .85rem; }
.msg-file a { color: #059669; text-decoration: underline; cursor: pointer; }
.msg-error { align-self: center; background: #fef2f2; border: 1px solid #fca5a5; color: #dc2626; }
.msg-system { align-self: center; background: #f0f9ff; border: 1px solid #93c5fd; font-size: .8rem; color: #1e40af; }
.typing { align-self: flex-start; color: #9ca3af; font-style: italic; font-size: .85rem; }
#messages { flex: 1; overflow-y: auto; padding: 1.2rem 1rem; display: flex; flex-direction: column; gap: .7rem; max-width: 900px; width: 100%; margin: 0 auto; }
.msg { max-width: 85%; padding: .8rem 1.1rem; border-radius: var(--radius-lg); line-height: 1.6; white-space: pre-wrap; word-break: break-word; font-size: .9rem; box-shadow: var(--shadow-sm); }
.msg-user { align-self: flex-end; background: var(--user-bg); color: var(--user-text); border-bottom-right-radius: 4px; }
.msg-ai { align-self: flex-start; background: var(--ai-bg); border: 1px solid var(--ai-border); border-bottom-left-radius: 4px; }
.copy-btn { display: block; margin-top: .5rem; margin-left: auto; background: transparent; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; font-size: .7rem; padding: .2rem .6rem; color: var(--text-light); width: fit-content; transition: all .15s; }
.copy-btn:hover { background: var(--bg); color: var(--text-muted); border-color: var(--text-light); }
.msg-user .copy-btn { border-color: rgba(255,255,255,.25); color: rgba(255,255,255,.6); }
.msg-user .copy-btn:hover { background: rgba(255,255,255,.15); color: rgba(255,255,255,.9); }
.copy-btn.copied { background: #d3f9d8; border-color: #69db7c; color: #2b8a3e; }
.msg-tool { align-self: flex-start; background: #fffbeb; border: 1px solid #fde68a; font-size: .78rem; font-family: 'SF Mono', Menlo, monospace; color: #92400e; box-shadow: none; }
.msg-file { align-self: flex-start; background: var(--file-bg); border: 1px solid var(--file-border); font-size: .85rem; }
.msg-file a { color: #16a34a; text-decoration: none; font-weight: 500; }
.msg-file a:hover { text-decoration: underline; }
.msg-error { align-self: center; background: var(--error-bg); border: 1px solid var(--error-border); color: #e03131; font-size: .85rem; box-shadow: none; }
.msg-system { align-self: center; background: var(--system-bg); border: none; font-size: .8rem; color: var(--system-text); box-shadow: none; padding: .4rem .8rem; }
.typing { align-self: flex-start; color: var(--text-light); font-style: italic; font-size: .85rem; padding: .4rem 0; }
/* Input */
#input-area { background: #fff; border-top: 1px solid #e5e7eb; padding: .8rem 1rem; }
#drop-zone { border: 2px dashed transparent; border-radius: 8px; transition: border-color .2s; padding: .3rem; }
#drop-zone.dragover { border-color: #2563eb; background: #eff6ff; }
#input-area { background: var(--bg-card); border-top: 1px solid var(--border); padding: .8rem 1rem; box-shadow: 0 -2px 8px rgba(0,0,0,.03); }
#input-area > div { max-width: 900px; margin: 0 auto; }
#drop-zone { border: 2px dashed transparent; border-radius: var(--radius); transition: all .2s; padding: .3rem; }
#drop-zone.dragover { border-color: var(--accent); background: var(--accent-light); }
#file-list { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: .3rem; }
.file-badge { background: #e0f2fe; padding: .2rem .5rem; border-radius: 4px; font-size: .75rem; display: flex; align-items: center; gap: .3rem; }
.file-badge .remove { cursor: pointer; color: #dc2626; font-weight: bold; }
#input-row { display: flex; gap: .5rem; }
#msg-input { flex: 1; padding: .6rem; border: 1px solid #d1d5db; border-radius: 8px; font-size: 1rem; resize: none; min-height: 42px; max-height: 150px; font-family: inherit; }
#send-btn { padding: .6rem 1.2rem; background: #2563eb; color: #fff; border: none; border-radius: 8px; cursor: pointer; font-size: 1rem; white-space: nowrap; }
#send-btn:disabled { background: #93c5fd; cursor: not-allowed; }
#file-btn { padding: .6rem; background: #f3f4f6; border: 1px solid #d1d5db; border-radius: 8px; cursor: pointer; font-size: 1.1rem; }
.file-badge { background: var(--accent-light); color: var(--accent); padding: .25rem .6rem; border-radius: 6px; font-size: .75rem; display: flex; align-items: center; gap: .3rem; font-weight: 500; }
.file-badge .remove { cursor: pointer; color: #e03131; font-weight: bold; }
#input-row { display: flex; gap: .5rem; align-items: flex-end; }
#msg-input { flex: 1; padding: .65rem .9rem; border: 1.5px solid var(--border); border-radius: var(--radius); font-size: .95rem; resize: none; min-height: 44px; max-height: 150px; font-family: inherit; outline: none; transition: border-color .2s; background: var(--bg); }
#msg-input:focus { border-color: var(--accent); background: var(--bg-card); }
#send-btn { padding: .65rem 1.3rem; background: var(--accent); color: #fff; border: none; border-radius: var(--radius); cursor: pointer; font-size: .95rem; font-weight: 600; white-space: nowrap; transition: background .15s; }
#send-btn:hover { background: var(--accent-hover); }
#send-btn:disabled { background: #a5b4fc; cursor: not-allowed; }
#file-btn { padding: .65rem .7rem; background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--radius); cursor: pointer; font-size: 1.1rem; transition: all .15s; }
#file-btn:hover { border-color: var(--accent); background: var(--accent-light); }
</style>
</head>
<body>
@@ -61,6 +85,7 @@ body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-
<div id="login-screen">
<form id="login-form" onsubmit="return doLogin(event)">
<h2>Сметный ИИ</h2>
<span class="subtitle">Профессиональный ассистент</span>
<div id="login-error">Неверный логин или пароль</div>
<input type="text" id="login-user" placeholder="Логин" autocomplete="username" required>
<input type="password" id="login-pass" placeholder="Пароль" autocomplete="current-password" required>