Files
mtusi2026lab4-fork/src/frontend/src/styles.css
T

104 lines
9.7 KiB
CSS

@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");
:root {
font-family: "Manrope", "Segoe UI", sans-serif;
color: #242925;
background: #eef0ed;
font-synthesis: none;
--accent: #25634b;
--muted: #697169;
--line: #e4e8e1;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button, summary, select { cursor: pointer; }
button { border: 1px solid var(--line); border-radius: 8px; background: white; padding: 9px 14px; color: inherit; font-size: 13px; font-weight: 650; transition: background .15s ease, color .15s ease; }
button:hover:not(:disabled) { background: #f0f3ee; }
button:disabled { cursor: default; color: #879084; background: #f5f6f3; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: #d2e6d8; }
* { scrollbar-width: thin; scrollbar-color: #c4cec3 transparent; }
input, textarea { caret-color: var(--accent); }
h1, h2, p { margin: 0; }
h1 { font-size: 24px; letter-spacing: -.035em; font-weight: 800; }
h2 { font-size: 18px; letter-spacing: -.025em; }
.primary { background: var(--accent); border-color: transparent; color: white; }
.primary:hover:not(:disabled) { background: #194c38; }
.primary:disabled { background: #e0e6de; border-color: transparent; }
.quiet { border-color: transparent; background: transparent; color: var(--muted); padding: 7px 9px; }
.compact { font-size: 12px; padding: 9px 12px; }
.stack { display: grid; gap: 18px; }
label { display: grid; gap: 7px; font-size: 12px; font-weight: 700; }
input, textarea { width: 100%; min-width: 0; padding: 12px; border: 1px solid #d6ded3; border-radius: 8px; background: #fff; color: inherit; font-size: 14px; font-weight: 400; }
input::placeholder, textarea::placeholder { color: #71796f; }
textarea { resize: vertical; }
.error { color: #a32f33; font-size: 13px; overflow-wrap: anywhere; }
.auth-page, .loading-page { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(100%, 390px); }
.auth-card h1 { font-size: 32px; margin: 20px 0 28px; }
.brand-mark { width: 48px; height: 48px; border-radius: 14px; background: var(--accent); display: grid; place-items: center; }
.brand-mark svg { width: 28px; stroke: white; stroke-width: 1.5; stroke-linejoin: round; fill: none; }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: #e1e7de; margin-bottom: 28px; }
.tabs button { flex: 1; border: 0; background: transparent; color: #596554; }
.tabs button.active { background: white; color: #242925; }
.auth-card .primary { padding: 13px; margin-top: 6px; }
.app-shell { width: min(1440px, 100%); height: calc(100dvh - 48px); min-height: 580px; margin: 24px auto; display: flex; flex-direction: column; background: white; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.app-header { min-height: 84px; padding: 18px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.brand { color: inherit; text-decoration: none; font-size: 21px; font-weight: 800; letter-spacing: -.035em; display: flex; align-items: center; gap: 8px; }
.brand-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.account { display: flex; gap: 12px; align-items: center; font-size: 13px; }
.account strong, .account small { display: block; }
.account small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.avatar, .chat-avatar { display: grid; place-items: center; flex-shrink: 0; background: #e7eee3; color: #435d3b; border-radius: 12px; width: 38px; height: 38px; font-size: 14px; font-weight: 700; }
.banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 24px; background: #edf5ee; color: #295735; font-size: 12px; }
.banner.error { background: #fff0ee; color: #a32f33; }
.banner .quiet { color: inherit; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #242925; color: white; padding: 12px 18px; border-radius: 10px; font-size: 13px; }
.app-content { display: grid; grid-template-columns: 320px minmax(0, 1fr); flex: 1; min-height: 0; }
.sidebar { min-height: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.sidebar-heading { padding: 26px 22px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sidebar-heading h1 { font-size: 23px; }
.create-form { margin: 0 20px 16px; padding-bottom: 20px; border-bottom: 1px solid var(--line); gap: 12px; overflow-y: auto; flex-shrink: 0; max-height: 38vh; }
.list-toolbar { padding: 0 16px 12px 24px; display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 11px; }
.chat-list { padding: 0 12px 16px; flex: 1; min-height: 60px; overflow-y: auto; }
.chat-item { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; padding: 14px 12px; border: 0; background: transparent; margin-bottom: 4px; border-radius: 10px; }
.chat-item.selected { background: #edf3e9; }
.chat-item.selected .chat-avatar { background: #dce8d4; color: #315c27; }
.chat-copy { min-width: 0; display: grid; gap: 5px; }
.chat-copy strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-copy small { font-size: 11px; font-weight: 400; color: var(--muted); }
.identity { border-top: 1px solid var(--line); padding: 14px 24px; font-size: 12px; color: var(--muted); }
.identity code { display: block; font-size: 10px; margin-top: 12px; overflow-wrap: anywhere; user-select: all; }
.identity .quiet { padding-left: 0; }
.conversation { min-height: 0; min-width: 0; display: flex; flex-direction: column; background: #fafbf8; }
.conversation-empty { display: grid; justify-items: center; gap: 20px; margin: auto; color: var(--muted); padding: 40px; }
.conversation-empty svg { width: 48px; stroke: #95a38c; stroke-width: 1.5; fill: none; stroke-linejoin: round; }
.conversation-empty h2 { font-size: 16px; font-weight: 500; }
.conversation-header { background: white; padding: 24px 28px; display: flex; justify-content: space-between; align-items: start; gap: 16px; border-bottom: 1px solid var(--line); }
.conversation-header h2 { overflow-wrap: anywhere; }
.members { margin-top: 5px; color: var(--muted); font-size: 11px; }
.members code { display: block; overflow-wrap: anywhere; margin-top: 8px; font-size: 10px; }
.messages { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 28px; }
.message { max-width: min(85%, 620px); border-radius: 12px 12px 12px 3px; background: #eaece7; padding: 12px 16px; }
.message.own { align-self: flex-end; background: #e2edda; border-radius: 12px 12px 3px 12px; }
.message-meta { display: flex; gap: 24px; justify-content: space-between; align-items: baseline; color: #596453; font-size: 10px; font-variant-numeric: tabular-nums; }
.message p { margin-top: 7px; line-height: 1.6; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.empty-note { margin: auto; padding: 24px; text-align: center; color: var(--muted); font-size: 13px; }
.pagination { flex-shrink: 0; border-top: 1px solid var(--line); padding: 14px 22px; background: white; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; font-size: 11px; font-variant-numeric: tabular-nums; }
.page-settings, .page-navigation { display: flex; align-items: center; gap: 12px; }
.page-settings label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 500; font-size: 11px; }
.page-settings select { border: 1px solid var(--line); background: #fafbf8; border-radius: 6px; padding: 5px; color: inherit; }
.page-range { color: var(--muted); }
.page-navigation button { padding: 6px 10px; font-size: 11px; }
.page-navigation span { min-width: 44px; text-align: center; }
.sidebar .page-navigation { width: 100%; justify-content: space-between; }
.sidebar .page-settings { width: 100%; justify-content: space-between; }
.composer { display: flex; align-items: end; gap: 12px; padding: 20px 28px; background: white; border-top: 1px solid var(--line); }
.composer textarea { background: #f7f8f5; border-color: transparent; resize: vertical; max-height: 180px; }
.composer .primary { padding: 13px 20px; }
@media (max-width: 1488px) { .app-shell { width: calc(100% - 48px); } }
@media (max-width: 900px) { .app-shell { width: 100%; height: 100dvh; margin: 0; border: 0; border-radius: 0; } .app-content { grid-template-columns: 280px minmax(0, 1fr); } .messages, .conversation-header { padding: 20px; } .message { max-width: 95%; } .message-meta { gap: 12px; flex-wrap: wrap; } .composer { padding: 16px; } }
@media (max-width: 620px) { .app-shell { height: auto; min-height: 100dvh; } .app-header { padding: 18px; } .brand { font-size: 18px; } .account .avatar, .account small { display: none; } .account { gap: 4px; } .app-content { display: flex; flex-direction: column; } .sidebar { border-right: 0; border-bottom: 1px solid var(--line); } .sidebar-heading { padding: 20px; } .chat-list { max-height: 240px; } .sidebar .pagination { flex-wrap: nowrap; } .sidebar .page-settings, .sidebar .page-navigation { width: auto; } .sidebar .page-range { display: none; } .conversation { min-height: 480px; } .messages { max-height: 55dvh; min-height: 180px; } .pagination { padding: 12px 16px; } .composer { gap: 8px; } .composer .primary { padding: 12px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }