Files
MaalFlows/public/admin.css
T
2026-07-24 13:41:16 +02:00

828 lines
18 KiB
CSS

:root {
color-scheme: light;
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
--line: #dfe6e2;
--ink: #17211d;
--muted: #627067;
--brand: #0f8f6f;
--bg: #f5f7f4;
--panel: #ffffff;
--topbar-height: 58px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); overflow: hidden; }
button, input, textarea, select { font: inherit; }
button {
border: 0;
background: var(--brand);
color: white;
border-radius: 6px;
padding: 10px 14px;
cursor: pointer;
}
button:hover { filter: brightness(0.96); }
input, textarea, select {
width: 100%;
border: 1px solid var(--line);
border-radius: 6px;
padding: 9px 10px;
background: white;
color: var(--ink);
}
input[type="color"] {
width: 100%;
height: 44px;
padding: 4px;
cursor: pointer;
}
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch {
border: 0;
border-radius: 4px;
}
label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.hidden { display: none !important; }
.shell { min-height: 100vh; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.panel {
width: min(360px, 100%);
display: grid;
gap: 14px;
background: white;
border: 1px solid var(--line);
border-radius: 8px;
padding: 24px;
}
.panel h1 { margin: 0 0 6px; }
.error { min-height: 20px; color: #b42318; margin: 0; }
.app {
height: 100vh;
min-height: 0;
display: grid;
grid-template-columns: 330px minmax(0, 1fr) 320px;
overflow: hidden;
}
.sidebar {
border-right: 1px solid var(--line);
background: var(--panel);
display: grid;
grid-template-rows: auto auto auto minmax(0, 1fr);
min-height: 0;
overflow: hidden;
}
.brand, .sitebar {
height: var(--topbar-height);
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 14px;
border-bottom: 1px solid var(--line);
}
.brand h1 { margin: 0; font-size: 20px; }
.brand button, .sitebar button { background: #edf3ef; color: var(--ink); }
.switch { display: flex; align-items: center; gap: 8px; }
.switch input { width: auto; }
.setting-switch {
justify-content: space-between;
flex-direction: row-reverse;
border: 1px solid var(--line);
border-radius: 8px;
padding: 10px 12px;
background: #f8fbf9;
color: var(--ink);
}
.setting-switch input {
appearance: none;
width: 42px;
height: 24px;
border: 0;
border-radius: 999px;
padding: 0;
background: #cbd6d0;
position: relative;
cursor: pointer;
}
.setting-switch input:before {
position: absolute;
top: 3px;
left: 3px;
width: 18px;
height: 18px;
border-radius: 50%;
background: white;
content: "";
transition: transform .16s ease;
}
.setting-switch input:checked { background: var(--brand); }
.setting-switch input:checked:before { transform: translateX(18px); }
.color-field input { margin-top: 2px; }
.list-tools {
padding: 10px 14px;
border-bottom: 1px solid var(--line);
background: #fbfdfb;
}
.list-tools label { color: var(--muted); }
.conversation-list { overflow: auto; min-height: 0; }
.conversation-item {
border: 0;
border-bottom: 1px solid var(--line);
border-left: 3px solid transparent;
background: white;
color: var(--ink);
border-radius: 0;
padding: 10px 10px 10px 7px;
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
gap: 8px;
align-items: start;
}
.conversation-item.active {
background: #edf8f3;
border-left-color: var(--brand);
}
.conversation-item.fresh { animation: pulse 1.2s ease-in-out 4; }
.conversation-item.unread { background: #fffdf4; }
.conversation-item.unread.active { background: #edf8f3; }
.conversation-open {
min-width: 0;
text-align: left;
display: grid;
gap: 5px;
border: 0;
background: transparent;
color: var(--ink);
border-radius: 6px;
padding: 2px;
}
.conversation-open:hover { filter: none; background: #f3f7f4; }
.row { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.visitor-row { min-width: 0; }
.visitor-name-wrap {
min-width: 0;
display: inline-flex;
align-items: center;
gap: 7px;
}
.visitor-name-wrap strong {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.visitor-name-wrap .presence-dot {
flex: 0 0 auto;
}
.unread-dot {
width: 9px;
height: 9px;
flex: 0 0 auto;
border-radius: 50%;
background: #c9d4ce;
}
.conversation-item.unread .unread-dot {
background: #ff3b30;
box-shadow: 0 0 0 0 rgb(255 59 48 / 55%);
animation: unreadPulse 1.25s ease-out infinite;
}
.status {
font-size: 12px;
color: white;
background: #456257;
border-radius: 999px;
padding: 2px 8px;
}
.photo-count {
flex: 0 0 auto;
color: var(--brand);
font-size: 12px;
}
.snippet, .preview, .meta { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visitor-facts {
display: flex;
flex-wrap: wrap;
gap: 4px;
color: var(--muted);
font-size: 11px;
}
.visitor-facts > span {
max-width: 96px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
border: 1px solid #e4ebe6;
border-radius: 999px;
padding: 2px 6px;
background: #f8fbf9;
}
.conversation-actions {
grid-column: 1 / -1;
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr)) 34px;
gap: 6px;
}
.status-button {
height: 34px;
padding: 0 6px;
font-size: 11px;
background: #f4f7f5;
color: var(--muted);
border: 1px solid var(--line);
white-space: nowrap;
}
.status-button.active {
color: white;
border-color: transparent;
}
.status-button.new.active { background: #2f9e44; }
.status-button.open.active { background: #2f80ed; }
.status-button.resolved.active { background: #68736c; }
.delete-chat {
width: 34px;
height: 34px;
padding: 0;
display: grid;
place-items: center;
background: #fff1f0;
color: #b42318;
}
.delete-chat svg { width: 18px; height: 18px; fill: currentColor; }
.empty-list {
margin: 0;
padding: 18px 14px;
color: var(--muted);
font-size: 13px;
}
.conversation { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; min-width: 0; min-height: 0; overflow: hidden; }
.conversation-header {
height: var(--topbar-height);
overflow: visible;
padding: 12px 20px;
background: white;
border-bottom: 1px solid var(--line);
display: flex;
align-items: center;
justify-content: space-between;
gap: 20px;
}
.conversation-header h2 { margin: 0; font-size: 20px; }
.conversation-header p { margin: 0; color: var(--muted); font-size: 13px; }
.conversation-header select { width: 150px; align-self: start; }
.visitor-head { width: 100%; min-width: 0; display: grid; gap: 7px; }
.visitor-summary-row {
display: flex;
align-items: center;
flex-wrap: nowrap;
gap: 7px;
min-width: 0;
color: var(--muted);
font-size: 12px;
}
.visitor-name-edit {
min-width: 0;
margin: 0 4px 0 0;
padding: 0;
display: inline-flex;
align-items: center;
gap: 7px;
border: 0;
background: transparent;
color: var(--ink);
font-size: 20px;
font-weight: 800;
line-height: 1.2;
}
.visitor-name-edit:hover {
background: transparent;
color: var(--brand);
filter: none;
}
.visitor-name-edit span {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.visitor-name-edit svg {
width: 15px;
height: 15px;
flex: 0 0 auto;
fill: currentColor;
opacity: .64;
}
.visitor-summary-row > span {
border: 1px solid #e4ebe6;
border-radius: 999px;
padding: 2px 7px;
background: #f8fbf9;
white-space: nowrap;
}
.visitor-summary-row .country-pill {
display: inline-flex;
align-items: center;
gap: 5px;
border-color: #d9e6df;
background: #fbfdfb;
}
.country-badge {
display: inline-flex;
align-items: center;
gap: 5px;
min-width: 0;
}
.flag-image {
width: 18px;
height: 13px;
flex: 0 0 auto;
border-radius: 2px;
background-color: #e4ebe6;
background-position: center;
background-size: cover;
box-shadow: 0 0 0 1px rgb(0 0 0 / 8%);
}
.country-badge.unknown .flag-image {
width: auto;
height: auto;
background: transparent;
box-shadow: none;
}
.country-badge strong {
color: var(--muted);
font-size: 11px;
line-height: 1;
}
.visitor-summary-row .presence-dot {
border: 0;
padding: 0;
background: #c9d4ce;
}
.visitor-summary-row .presence-dot.active { background: #2f9e44; }
.visitor-summary-row .presence-dot.idle { background: #f59f00; }
.visitor-summary-row .presence-dot.offline { background: #c9d4ce; }
.visitor-details {
max-width: 980px;
color: var(--muted);
font-size: 12px;
}
.visitor-summary-row .visitor-details {
position: relative;
max-width: none;
}
.visitor-summary-row .visitor-details[open] {
flex-basis: auto;
}
.visitor-details summary {
width: fit-content;
display: inline-flex;
align-items: center;
cursor: pointer;
user-select: none;
color: var(--ink);
}
.visitor-details summary::-webkit-details-marker { display: none; }
.visitor-details summary span {
width: 20px;
height: 20px;
display: grid;
place-items: center;
border-radius: 50%;
background: var(--brand);
color: white;
font-size: 12px;
font-weight: 700;
}
.visitor-detail-popover {
position: absolute;
z-index: 20;
top: calc(100% + 8px);
right: 0;
width: min(520px, calc(100vw - 420px));
padding: 12px;
border: 1px solid var(--line);
border-radius: 8px;
background: white;
box-shadow: 0 14px 32px rgb(0 0 0 / 13%);
}
.visitor-detail-grid {
display: grid;
grid-template-columns: 76px minmax(0, 1fr);
gap: 5px 10px;
margin-top: 0;
}
.visitor-detail-grid span { color: var(--muted); }
.visitor-detail-grid a,
.history-list a {
min-width: 0;
color: var(--brand);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.visitor-detail-grid em {
min-width: 0;
color: var(--muted);
font-style: normal;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.history-list {
margin: 10px 0 0;
padding-left: 20px;
display: grid;
gap: 4px;
}
.history-list li {
min-width: 0;
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
gap: 10px;
}
.history-list small { color: var(--muted); }
.messages {
overflow: auto;
min-height: 0;
padding: 20px;
display: flex;
flex-direction: column;
gap: 12px;
}
.visitor-panel {
min-height: 0;
overflow: hidden;
display: grid;
grid-template-rows: auto minmax(0, 1fr);
border-left: 1px solid var(--line);
background: var(--panel);
}
.visitor-panel header {
height: var(--topbar-height);
padding: 14px;
border-bottom: 1px solid var(--line);
display: grid;
grid-template-columns: minmax(0, 1fr) auto auto;
gap: 10px;
align-items: center;
}
.visitor-panel h2 { margin: 0; font-size: 18px; }
.visitor-panel header span { color: var(--muted); font-size: 12px; }
.visitor-filter-toggle {
height: 30px;
padding: 0 9px;
border: 1px solid var(--line);
background: #f8fbf9;
color: var(--muted);
font-size: 12px;
}
.visitor-filter-toggle.active {
background: #eaf6f1;
color: var(--brand);
border-color: #c7e8dc;
}
.visitor-list {
min-height: 0;
overflow: auto;
}
.visitor-card {
padding: 10px 12px 10px 9px;
border-bottom: 1px solid var(--line);
border-left: 3px solid transparent;
background: white;
}
.visitor-card.bot { opacity: .68; }
.visitor-card.clickable { cursor: pointer; }
.visitor-card.clickable:hover { background: #f8fbf9; }
.visitor-card.active {
background: #edf8f3;
border-left-color: var(--brand);
}
.visitor-card-head {
display: grid;
grid-template-columns: 34px minmax(0, 1fr) 10px;
gap: 9px;
align-items: center;
margin-bottom: 7px;
}
.visitor-card-head strong,
.visitor-card-head small {
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.visitor-card-head small { color: var(--muted); font-size: 12px; margin-top: 2px; }
.visitor-avatar {
width: 34px;
height: 34px;
display: grid;
place-items: center;
border-radius: 8px;
background: #eaf6f1;
color: var(--brand);
font-weight: 800;
font-size: 13px;
}
.presence-dot {
width: 9px;
height: 9px;
flex: 0 0 auto;
border-radius: 50%;
}
.presence-dot.active {
background: #2f9e44;
box-shadow: 0 0 0 4px rgb(47 158 68 / 14%);
}
.presence-dot.idle {
background: #f59f00;
box-shadow: 0 0 0 4px rgb(245 159 0 / 16%);
}
.presence-dot.offline {
background: #c9d4ce;
}
.visitor-compact-meta {
display: flex;
align-items: center;
gap: 7px;
min-width: 0;
color: var(--muted);
font-size: 12px;
}
.visitor-compact-meta > span {
flex: 0 0 auto;
max-width: 72px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.visitor-page,
.visitor-referrer {
display: block;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 12px;
}
.visitor-page { margin-top: 6px; }
.visitor-referrer {
margin-top: 3px;
color: var(--muted);
}
.visitor-card a { color: var(--ink); text-decoration: none; }
.visitor-card a:hover { color: var(--brand); text-decoration: underline; }
.message {
max-width: min(680px, 86%);
padding: 10px 12px;
border-radius: 8px;
border: 1px solid var(--line);
background: white;
}
.message.admin { align-self: flex-end; background: #ecf8f3; border-color: #c7e8dc; }
.message .by { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.message p { margin: 0; white-space: pre-wrap; }
.message a { color: var(--brand); display: inline-block; margin-top: 6px; }
.read-receipt {
align-self: flex-end;
margin-top: -4px;
font-size: 12px;
color: var(--muted);
}
.read-receipt.seen { color: var(--brand); }
.attachments {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-top: 8px;
}
.photo-preview {
width: min(340px, 100%);
display: grid;
gap: 0;
padding: 0;
border: 1px solid var(--line);
border-radius: 8px;
background: white;
color: var(--ink);
overflow: hidden;
text-align: left;
margin: 0;
}
.photo-open {
width: 100%;
min-height: 80px;
max-height: 360px;
display: grid;
place-items: center;
padding: 0;
border: 0;
border-radius: 0;
background: #edf3ef;
color: var(--ink);
}
.photo-open img {
max-width: 100%;
height: auto;
max-height: 360px;
width: auto;
object-fit: contain;
display: block;
background: #edf3ef;
}
.photo-preview figcaption {
display: grid;
grid-template-columns: minmax(0, 1fr) 30px;
gap: 6px;
align-items: center;
padding: 6px 7px;
}
.photo-preview figcaption span {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: var(--muted);
font-size: 12px;
}
.photo-delete {
width: 30px;
height: 30px;
padding: 0;
display: grid;
place-items: center;
background: #fff1f0;
color: #b42318;
}
.photo-delete svg { width: 16px; height: 16px; fill: currentColor; }
.photo-modal {
position: fixed;
inset: 0;
z-index: 20;
display: grid;
place-items: center;
padding: 24px;
}
.photo-backdrop {
position: absolute;
inset: 0;
border: 0;
border-radius: 0;
background: rgb(0 0 0 / 72%);
}
.photo-modal figure {
position: relative;
z-index: 1;
margin: 0;
max-width: min(1100px, 94vw);
max-height: 90vh;
display: grid;
gap: 8px;
}
.photo-modal img {
max-width: 100%;
max-height: 82vh;
object-fit: contain;
border-radius: 8px;
background: white;
}
.photo-modal figcaption {
color: white;
text-align: center;
font-size: 13px;
}
.photo-close {
position: absolute;
top: 10px;
right: 10px;
width: 34px;
height: 34px;
padding: 0;
border-radius: 50%;
background: rgb(0 0 0 / 54%);
}
.typing { padding: 0 20px 10px; color: var(--brand); font-size: 13px; }
.reply {
display: grid;
gap: 8px;
padding: 14px;
background: white;
border-top: 1px solid var(--line);
}
.reply.dragging {
box-shadow: inset 0 0 0 2px var(--brand);
background: #edf8f3;
}
.reply-composer {
display: grid;
grid-template-columns: minmax(0, 1fr) 44px 88px;
gap: 8px;
align-items: stretch;
}
.reply-composer textarea { min-height: 72px; resize: vertical; }
.reply-icon-button {
min-height: 72px;
width: 100%;
display: grid;
place-items: center;
border-radius: 6px;
padding: 0;
cursor: pointer;
}
.reply-icon-button svg {
width: 21px;
height: 21px;
fill: currentColor;
}
.attach-button {
border: 1px solid var(--line);
background: #f8fbf9;
color: var(--muted);
}
.attach-button:hover { background: #edf3ef; color: var(--ink); }
.attach-button input { display: none; }
.send-button {
border: 0;
background: var(--brand);
color: white;
}
.send-button svg {
width: 26px;
height: 26px;
transform: translateX(1px);
}
.reply-attachments {
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.reply-chip {
max-width: 100%;
display: inline-flex;
align-items: center;
gap: 6px;
border: 1px solid var(--line);
border-radius: 999px;
background: #f8fbf9;
padding: 5px 5px 5px 9px;
font-size: 12px;
}
.reply-chip span {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 240px;
}
.reply-chip button {
width: 22px;
height: 22px;
border-radius: 50%;
padding: 0;
background: #e8eee9;
color: var(--ink);
}
.settings {
position: fixed;
inset: 0 0 0 auto;
width: min(430px, 100%);
overflow: auto;
background: white;
border-left: 1px solid var(--line);
padding: 16px;
box-shadow: -12px 0 30px rgb(0 0 0 / 12%);
}
.settings-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.settings h2 { margin: 0 0 12px; }
.settings h3 { margin: 20px 0 8px; }
.settings form { display: grid; gap: 12px; }
pre {
white-space: pre-wrap;
overflow: auto;
padding: 12px;
border: 1px solid var(--line);
border-radius: 8px;
background: #f7faf8;
}
@keyframes pulse {
0%, 100% { background: white; }
50% { background: #dff7eb; }
}
@keyframes unreadPulse {
0% { box-shadow: 0 0 0 0 rgb(255 59 48 / 55%); }
70% { box-shadow: 0 0 0 8px rgb(255 59 48 / 0%); }
100% { box-shadow: 0 0 0 0 rgb(255 59 48 / 0%); }
}
@media (max-width: 820px) {
body { overflow: auto; }
.app { height: auto; min-height: 100vh; grid-template-columns: 1fr; overflow: visible; }
.sidebar { height: 42vh; border-right: 0; border-bottom: 1px solid var(--line); }
.conversation { height: 58vh; }
.visitor-panel { display: none; }
}