/* Fir Web - aceleași teme ca aplicația Android (vezi ui/theme/Theme.kt). */

:root {
  --accent: #4F6BFF;
  --accent-strong: #3450DB;
  --on-accent: #ffffff;
  --app-bg: #F7F8FC;
  --panel: #ffffff;
  --panel-2: #F3F5FA;
  --hover: #EEF1F8;
  --border: #E4E7EF;
  --text: #111B21;
  --muted: #667781;
  --mine: #DCE3FF;
  --theirs: #ffffff;
  --wall: #E9ECF5;
  --chip: #ffffff;
  --chip-text: #54656F;
  --read: #53BDEB;
  --danger: #E5484D;
  --shadow: 0 1px 1px rgba(11, 20, 26, .10);
  --shadow-lg: 0 10px 30px rgba(11, 20, 26, .18);
  --radius: 10px;
  color-scheme: light;
}
[data-mode="dark"] {
  --app-bg: #0E1116;
  --panel: #1A1E26;
  --panel-2: #20252F;
  --hover: #262C38;
  --border: #2A303B;
  --text: #E9EDEF;
  --muted: #8696A0;
  --mine: #26346E;
  --theirs: #232833;
  --wall: #0E1116;
  --chip: #1D282F;
  --chip-text: #8696A0;
  --shadow: 0 1px 1px rgba(0, 0, 0, .3);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, .5);
  color-scheme: dark;
}
[data-theme="green"] { --accent: #1FAF6B; --accent-strong: #14804E; --mine: #CFF3E1; --wall: #E6F0EA; --app-bg: #F5FBF8; }
[data-theme="green"][data-mode="dark"] { --mine: #125E3C; --wall: #0D1512; --app-bg: #0D1512; --panel: #16211C; --panel-2: #1B2822; --hover: #22312A; --theirs: #1E2B24; --border: #26352D; }
[data-theme="violet"] { --accent: #7C5CFC; --accent-strong: #5B3FD1; --mine: #E6DEFF; --wall: #EDE9F6; --app-bg: #FAF8FF; }
[data-theme="violet"][data-mode="dark"] { --mine: #3B2A6E; --wall: #120E1A; --app-bg: #120E1A; --panel: #1C1626; --panel-2: #231C2F; --hover: #2B2239; --theirs: #271F35; --border: #31283F; }
[data-theme="classic"] { --accent: #008069; --accent-strong: #005C4B; --mine: #D9FDD3; --wall: #EFEAE2; --app-bg: #F0F2F5; --panel-2: #F0F2F5; }
[data-theme="classic"][data-mode="dark"] { --accent: #00A884; --on-accent: #0B141A; --mine: #005C4B; --wall: #0B141A; --app-bg: #0B141A; --panel: #111B21; --panel-2: #202C33; --hover: #2A3942; --theirs: #202C33; --border: #2A3942; }
[data-theme="amoled"] { --accent: #4F6BFF; --mine: #1E2A55; --wall: #000; --app-bg: #000; --panel: #000; --panel-2: #0C0C0C; --hover: #161616; --theirs: #1A1A1A; --border: #1F1F1F; --chip: #141414; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 14.5px/1.42 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--app-bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
#app { height: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--accent); }
.icon { display: block; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.pad { padding: 28px 16px; }
.one-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(127, 127, 127, .35); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

.logo { font-weight: 800; font-size: 30px; color: var(--accent); letter-spacing: -.5px; }
.logo.big { font-size: 64px; }
.splash { height: 100%; display: grid; place-content: center; gap: 10px; text-align: center; }

/* --- butoane --- */
.icon-btn {
  background: none; border: 0; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; color: var(--muted); flex: none; transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
.btn {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 20px; padding: 7px 16px; flex: none;
  transition: background .15s;
}
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, transparent); }

/* --- conectare --- */
.link-screen {
  min-height: 100%; display: grid; place-items: center; padding: 24px 16px;
  background: linear-gradient(180deg, var(--accent) 0 220px, var(--app-bg) 220px);
}
.link-brand { position: absolute; top: 28px; left: 32px; display: flex; align-items: center; gap: 10px; color: var(--on-accent); font-weight: 800; font-size: 20px; }
.link-brand .mark { width: 34px; height: 34px; border-radius: 9px; background: var(--on-accent); color: var(--accent); display: grid; place-items: center; font-weight: 900; }
.link-card {
  background: var(--panel); border-radius: 16px; box-shadow: var(--shadow-lg); max-width: 920px; width: 100%;
  display: grid; grid-template-columns: 1fr auto; gap: 48px; padding: 52px 56px;
}
.link-text h1 { margin: 0 0 22px; font-size: 28px; font-weight: 600; }
.steps { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 14px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; font-size: 16px; }
.steps .num { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--panel-2); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.link-qr { display: grid; gap: 14px; justify-items: center; align-content: start; }
.qr { width: 264px; height: 264px; image-rendering: pixelated; border-radius: 10px; border: 1px solid var(--border); transition: opacity .2s; }
.qr.claimed { opacity: .15; }
.secure-note { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; }
.notice { background: color-mix(in srgb, var(--danger) 10%, transparent); border-left: 3px solid var(--danger); padding: 10px 14px; border-radius: 6px; }
.link-lang {
  position: absolute; top: 26px; right: 32px; padding: 6px 14px; border-radius: 999px; cursor: pointer;
  background: none; color: var(--on-accent); border: 1px solid color-mix(in srgb, var(--on-accent) 55%, transparent); font: inherit; font-weight: 600;
}
.lang-select { font: inherit; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); color: inherit; }
@media (max-width: 760px) {
  .link-lang { top: 20px; right: 16px; }
  .link-card { grid-template-columns: 1fr; padding: 28px 20px; gap: 24px; }
  .link-brand { position: static; margin-bottom: 16px; }
}

/* --- aspect general --- */
.layout { display: grid; grid-template-columns: minmax(300px, 30%) 1fr; height: 100%; max-width: 1700px; margin: 0 auto; box-shadow: var(--shadow-lg); }
.sidebar { background: var(--panel); border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.chat { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--wall); position: relative; }
@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; box-shadow: none; }
  .layout.has-active .sidebar { display: none; }
  .layout:not(.has-active) .chat { display: none; }
}

.side-head, .chat-head {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px; min-height: 60px; flex: none;
  background: var(--panel-2); border-bottom: 1px solid var(--border);
}
.brand { font-weight: 800; font-size: 21px; color: var(--accent); flex: 1; letter-spacing: -.3px; }
.back { display: none; }
@media (max-width: 760px) { .back { display: grid; } }

.conn[hidden] { display: none; }
.conn { background: color-mix(in srgb, var(--accent) 14%, var(--panel)); color: var(--text); font-size: 13px; padding: 8px 16px; display: flex; gap: 8px; align-items: center; }
.search-wrap { padding: 8px 12px; border-bottom: 1px solid var(--border); }
.search-box { display: flex; align-items: center; gap: 10px; background: var(--panel-2); border-radius: 10px; padding: 0 12px; color: var(--muted); }
.search { flex: 1; border: 0; background: none; padding: 9px 0; color: var(--text); font: inherit; outline: none; }
.chat-list { overflow-y: auto; flex: 1; }
.signer-banner { margin: 8px 12px; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--border); font-size: 13px; }
.signer-text { color: var(--text); line-height: 1.4; }
.signer-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.chat-item {
  display: flex; gap: 13px; align-items: center; width: 100%; padding: 0 0 0 14px; border: 0;
  background: none; text-align: left; transition: background .12s;
}
.chat-item:hover { background: var(--hover); }
.chat-item.active { background: var(--hover); }
.chat-meta { flex: 1; min-width: 0; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--border); }
.row { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.name { font-weight: 500; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.time { color: var(--muted); font-size: 12px; flex: none; }
.time.unread { color: var(--accent); font-weight: 600; }
.last { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 3px; min-width: 0; }
.last span { overflow: hidden; text-overflow: ellipsis; }
.badge { background: var(--accent); color: var(--on-accent); border-radius: 12px; min-width: 21px; height: 21px; padding: 0 6px; font-size: 12px; font-weight: 700; display: grid; place-items: center; flex: none; }

.avatar {
  border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff;
  font-weight: 600; overflow: hidden; font-size: 17px; user-select: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* --- fundalul conversației (modelul de pe Android, desenat ca SVG) --- */
[data-wall="pattern"][data-mode="light"] .chat {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' fill='none' stroke='black' stroke-opacity='.06' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='10' y='12' width='18' height='12' rx='4'/%3E%3Cpath d='M14 24l-2 5 7-5M58 34c0-12 14-2 14-14M29 52l7 10H22zM29 62v4M73 72c-10-7-4-14 0-9 4-5 10 2 0 9'/%3E%3Ccircle cx='44' cy='8' r='2.5'/%3E%3Crect x='44' y='80' width='8' height='8' rx='2'/%3E%3C/svg%3E");
}
[data-wall="pattern"][data-mode="dark"] .chat {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' fill='none' stroke='white' stroke-opacity='.05' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='10' y='12' width='18' height='12' rx='4'/%3E%3Cpath d='M14 24l-2 5 7-5M58 34c0-12 14-2 14-14M29 52l7 10H22zM29 62v4M73 72c-10-7-4-14 0-9 4-5 10 2 0 9'/%3E%3Ccircle cx='44' cy='8' r='2.5'/%3E%3Crect x='44' y='80' width='8' height='8' rx='2'/%3E%3C/svg%3E");
}
[data-wall="gradient"] .chat { background-image: linear-gradient(180deg, var(--wall), color-mix(in srgb, var(--wall) 88%, var(--accent))); }

/* --- conversație --- */
.head-text { min-width: 0; flex: 1; }
.head-text .name { font-size: 16px; }
.head-text .sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head-text .sub.typing { color: var(--accent); }
.welcome { margin: auto; text-align: center; padding: 24px; max-width: 460px; }
.welcome h2 { font-weight: 400; font-size: 28px; margin: 18px 0 10px; }
.welcome .secure-note { justify-content: center; margin-top: 28px; }
.messages { flex: 1; overflow-y: auto; padding: 14px 6% 18px; display: flex; flex-direction: column; position: relative; }
.history-note { align-self: center; font-size: 12.5px; color: var(--chip-text); background: color-mix(in srgb, var(--chip) 90%, #fde9a8); padding: 6px 12px; border-radius: 8px; margin: 4px 0 10px; text-align: center; box-shadow: var(--shadow); display: flex; gap: 6px; align-items: center; }
[data-mode="dark"] .history-note { background: var(--chip); }
.day { align-self: center; margin: 12px 0 8px; }
/* O singură etichetă plutitoare cu ziua (ca la WhatsApp) - separatoarele sticky se suprapuneau. */
.day-float { position: sticky; top: 4px; align-self: center; height: 0; z-index: 2; opacity: 0; transition: opacity .25s; pointer-events: none; }
.day-float.visible { opacity: 1; }
.day-float span { display: inline-block; background: var(--chip); color: var(--chip-text); font-size: 12.5px; padding: 5px 12px; border-radius: 8px; box-shadow: var(--shadow); white-space: nowrap; }
.day span { background: var(--chip); color: var(--chip-text); font-size: 12.5px; padding: 5px 12px; border-radius: 8px; box-shadow: var(--shadow); }
/* Linie de sistem (mesaje temporare) - ca separatorul de zi, dar nu rămâne lipită sus. */
.day.system { position: static; margin: 6px 0; text-align: center; max-width: 90%; }
.day.system.failed span { cursor: pointer; color: var(--danger, #d33); }
/* Anti-țeapă */
.scam-warning { align-self: flex-start; max-width: min(65%, 620px); margin: 2px 0 6px; padding: 8px 12px; border-radius: 10px;
  background: var(--danger-bg, #fde7e7); color: var(--danger-text, #7a1c1c); font-size: 13px; line-height: 1.4; }
.scam-warning .scam-title { font-weight: 600; margin-bottom: 2px; }
.scam-warning .scam-tip { margin-top: 4px; opacity: .85; }
a.risky { color: var(--danger, #d33) !important; }
.risky-body { padding: 0 20px 18px; display: flex; flex-direction: column; gap: 6px; }
.risky-host { font-size: 18px; font-weight: 600; word-break: break-all; }
.risky-reason { color: var(--danger, #d33); font-size: 13px; }
.risky-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; }
[data-mode="dark"] .scam-warning { background: #4a1f1f; color: #ffd9d9; }
.timer-btn { flex: none; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 14px; padding: 6px 10px; border-radius: 16px; cursor: pointer; }
.timer-btn:hover { background: var(--hover, rgba(127,127,127,.12)); }
.timer-btn.on { color: var(--accent); font-weight: 600; }

.msg { display: flex; align-items: center; gap: 6px; max-width: min(65%, 620px); margin-top: 2px; }
.msg.first { margin-top: 8px; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg.theirs { align-self: flex-start; }
.bubble {
  background: var(--theirs); border-radius: 8px; padding: 6px 8px 8px 9px; box-shadow: var(--shadow);
  overflow-wrap: anywhere; position: relative; min-width: 0;
}
.mine .bubble { background: var(--mine); }
.msg.first.theirs .bubble { border-top-left-radius: 0; }
.msg.first.mine .bubble { border-top-right-radius: 0; }
.msg.first.theirs .bubble::before, .msg.first.mine .bubble::before {
  content: ""; position: absolute; top: 0; width: 8px; height: 13px;
}
.msg.first.theirs .bubble::before { left: -8px; background: var(--theirs); clip-path: polygon(100% 0, 0 0, 100% 100%); }
.msg.first.mine .bubble::before { right: -8px; background: var(--mine); clip-path: polygon(0 0, 100% 0, 0 100%); }
.bubble.failed { outline: 1px solid var(--danger); cursor: pointer; }
.text { white-space: pre-wrap; font-size: 14.5px; }
.text::after { content: ""; display: inline-block; width: 64px; }
.mine .text::after { width: 78px; }
.meta {
  font-size: 11px; color: var(--muted); white-space: nowrap; float: right; margin: 4px -2px -4px 8px;
  display: flex; align-items: center; gap: 3px; position: relative; top: 2px;
}
.bubble.media-only .meta { position: absolute; right: 8px; bottom: 8px; top: auto; margin: 0; color: #fff; background: rgba(0, 0, 0, .38); padding: 1px 6px; border-radius: 10px; float: none; }
.tick { display: inline-flex; color: var(--muted); }
.tick.seen { color: var(--read); }
.tick.failed { color: var(--danger); }
.bubble.media-only .tick { color: #fff; }
.bubble.media-only .tick.seen { color: #8fd8ff; }
.sender { font-weight: 600; font-size: 13px; margin-bottom: 2px; }
.quote {
  border-left: 4px solid var(--accent); background: rgba(127, 127, 127, .12); border-radius: 6px;
  padding: 5px 8px; margin-bottom: 5px; font-size: 13px; color: var(--muted); max-height: 64px; overflow: hidden;
}
.quote .sender { color: var(--accent); }
.deleted, .call { color: var(--muted); font-style: italic; display: flex; align-items: center; gap: 6px; padding-right: 60px; }
.error-line { color: var(--danger); margin-top: 2px; font-size: 12.5px; display: flex; gap: 4px; align-items: center; }
.reactions {
  position: absolute; bottom: -14px; right: 10px; background: var(--panel); border-radius: 12px;
  padding: 1px 6px; font-size: 13px; box-shadow: var(--shadow); border: 1px solid var(--border);
}
.theirs .reactions { right: auto; left: 10px; }
.msg.has-reactions { margin-bottom: 14px; }

/* media în bule */
.media { display: block; border-radius: 6px; overflow: hidden; position: relative; cursor: pointer; background: rgba(127, 127, 127, .18); margin: -2px -4px 0 -5px; }
.media img, .media video { display: block; max-width: 360px; max-height: 420px; width: auto; height: auto; min-width: 160px; min-height: 100px; object-fit: cover; }
.media.loading { width: 300px; height: 200px; display: grid; place-items: center; color: var(--muted); }
.media .play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.media .play span { width: 54px; height: 54px; border-radius: 50%; background: rgba(0, 0, 0, .5); display: grid; place-items: center; }
.media-ph { display: grid; place-items: center; gap: 6px; text-align: center; font-size: 13px; padding: 12px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(127, 127, 127, .3); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.doc {
  display: flex; gap: 12px; align-items: center; background: rgba(127, 127, 127, .12); border-radius: 8px;
  padding: 10px 12px; min-width: 240px; max-width: 340px; border: 0; text-align: left; width: 100%;
}
.doc .doc-icon { width: 40px; height: 40px; border-radius: 8px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; flex: none; }
.doc .doc-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc .doc-info { font-size: 12px; color: var(--muted); }
.doc-wrap { display: flex; gap: 6px; align-items: center; }
.voice { display: flex; align-items: center; gap: 8px; min-width: 260px; }
.voice audio { width: 260px; height: 40px; }

/* acțiuni la trecerea cu mouse-ul */
.actions { display: none; gap: 2px; background: var(--panel); border-radius: 20px; padding: 3px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); flex: none; position: relative; }
.msg:hover .actions, .msg:focus-within .actions { display: flex; }
.act { background: none; border: 0; border-radius: 50%; width: 30px; height: 30px; padding: 0; display: grid; place-items: center; color: var(--muted); font-size: 16px; }
.act:hover { background: var(--hover); color: var(--text); }
.react-row { display: flex; gap: 2px; }
@media (hover: none) { .actions { display: none !important; } }

.composer-wrap { background: var(--panel-2); flex: none; }
.reply-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 8px 16px 0 64px; padding: 8px 10px; border-left: 4px solid var(--accent); background: var(--panel); border-radius: 8px;
}
.reply-bar .sender { color: var(--accent); }
.composer { display: flex; align-items: flex-end; gap: 6px; padding: 8px 14px 10px; }
.input {
  flex: 1; resize: none; border: 0; border-radius: 10px; padding: 11px 14px;
  font: inherit; background: var(--panel); color: var(--text); max-height: 160px; outline: none; line-height: 1.4;
}
.send { background: var(--accent); color: var(--on-accent); border: 0; border-radius: 50%; width: 44px; height: 44px; display: grid; place-items: center; flex: none; transition: transform .1s; }
.send:active { transform: scale(.94); }

/* --- vizualizator media --- */
.viewer { position: fixed; inset: 0; background: rgba(8, 10, 14, .94); z-index: 20; display: grid; grid-template-rows: auto 1fr; color: #fff; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.viewer-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px; }
.viewer-head .icon-btn { color: #ddd; }
.viewer-head .icon-btn:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.viewer-title { flex: 1; min-width: 0; }
.viewer-title .name { font-size: 15px; }
.viewer-title .sub { font-size: 12.5px; color: #aab; }
.viewer-body { display: grid; place-items: center; min-height: 0; position: relative; padding: 0 64px 24px; }
.viewer-body img, .viewer-body video { max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; border-radius: 4px; }
.viewer-body iframe { width: min(1000px, 100%); height: calc(100vh - 110px); border: 0; background: #fff; border-radius: 4px; }
.viewer-body audio { width: min(480px, 90vw); }
.viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; display: grid; place-items: center; }
.viewer-nav:hover { background: rgba(255, 255, 255, .22); }
.viewer-nav.prev { left: 10px; }
.viewer-nav.next { right: 10px; }
.viewer-file { display: grid; justify-items: center; gap: 14px; text-align: center; }
.viewer-file .doc-icon { width: 88px; height: 88px; border-radius: 16px; background: var(--accent); display: grid; place-items: center; }

/* --- setări --- */
.modal-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); display: grid; place-items: center; padding: 16px; z-index: 10; animation: fade .12s; }
.modal { background: var(--panel); border-radius: 14px; width: min(500px, 100%); padding: 6px 22px 18px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { font-size: 19px; font-weight: 600; margin: 14px 0; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-top: 1px solid var(--border); }
.setting > div:first-child:not(.avatar), .setting > .avatar + div { flex: 1; }
.setting.col { flex-direction: column; align-items: stretch; }
.swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 10px; }
.swatch { border: 2px solid var(--border); border-radius: 12px; background: var(--panel-2); padding: 8px 4px 6px; display: grid; justify-items: center; gap: 6px; font-size: 12px; }
.swatch.selected { border-color: var(--accent); }
.swatch .dots { display: flex; }
.swatch .dots i { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--panel); }
.swatch .dots i + i { margin-left: -8px; }
.walls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.wall-opt { border: 2px solid var(--border); border-radius: 10px; background: var(--wall); height: 56px; display: grid; place-items: end center; padding-bottom: 4px; font-size: 12px; color: var(--chip-text); }
.wall-opt.selected { border-color: var(--accent); }
.switch { appearance: none; width: 40px; height: 22px; border-radius: 11px; background: var(--border); position: relative; cursor: pointer; transition: background .15s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(18px); }

/* 2.30: filtre, arhivă, silențios, mesaje fixate */
.chips { display: flex; gap: 8px; padding: 10px 12px 6px; }
.chip { border: 1px solid var(--border); background: none; color: var(--text); font: inherit; font-size: 13px; padding: 5px 14px; border-radius: 16px; cursor: pointer; }
.chip:hover { background: var(--hover); }
.chip.on { background: color-mix(in srgb, var(--accent) 16%, transparent); border-color: transparent; color: var(--accent); font-weight: 600; }
.archived-row { display: flex; align-items: center; gap: 14px; width: 100%; border: 0; background: none; color: var(--text); font: inherit; font-weight: 600; padding: 12px 16px 12px 26px; cursor: pointer; text-align: left; }
.archived-row:hover { background: var(--hover); }
.archived-row .icon { color: var(--accent); }
.row-icons { display: flex; align-items: center; gap: 4px; flex: none; }
.muted-icon { color: var(--muted); }
.badge.quiet { background: var(--muted); }
.menu-list { display: flex; flex-direction: column; padding: 0 8px 12px; }
.menu-opt { display: flex; align-items: center; gap: 12px; border: 0; background: none; color: var(--text); font: inherit; padding: 12px 14px; border-radius: 8px; cursor: pointer; text-align: left; }
.menu-opt:hover { background: var(--hover); }
.menu-label { display: flex; align-items: center; gap: 8px; padding: 8px 14px 2px; }
.pinbar { display: flex; align-items: center; background: var(--panel); border-bottom: 1px solid var(--border); padding: 0 8px 0 0; }
.pinbar[hidden] { display: none; }
.pin-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; color: var(--accent); font: inherit; padding: 8px 16px; cursor: pointer; text-align: left; border-left: 3px solid var(--accent); }
.pin-text { min-width: 0; color: var(--text); }
.pin-title { color: var(--accent); font-size: 13px; font-weight: 600; }
.meta .icon { vertical-align: -1px; margin-right: 2px; }
.msg.flash .bubble { outline: 2px solid var(--accent); outline-offset: 2px; transition: outline-color .3s; }

/* 2.30: sondaje, mențiuni, „nume neverificat” */
.poll { min-width: 240px; max-width: 340px; display: flex; flex-direction: column; gap: 4px; }
.poll-q { font-weight: 600; }
.poll-opt { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; overflow: hidden; }
.poll-opt:disabled { cursor: default; opacity: .8; }
.poll-opt.on { border-color: var(--accent); }
.poll-mark { width: 18px; height: 18px; flex: none; border: 2px solid var(--muted); border-radius: 50%; display: grid; place-items: center; font-size: 12px; line-height: 1; }
.poll-mark.sq { border-radius: 4px; }
.poll-opt.on .poll-mark { border-color: var(--accent); background: var(--accent); color: var(--on-accent, #fff); }
.poll-label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.poll-count { font-size: 12px; color: var(--muted); }
.poll-bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--accent); border-radius: 2px; transition: width .2s; }
.poll-votes { align-self: center; background: none; border: 0; color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; padding: 6px; }
.poll-who { padding: 8px 4px; border-bottom: 1px solid var(--border); }
.poll-form { display: flex; flex-direction: column; gap: 8px; padding-bottom: 12px; }
.poll-edit { display: flex; flex-direction: column; gap: 6px; max-height: 45vh; overflow: auto; }
.poll-form .input-line { width: 100%; box-sizing: border-box; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2, transparent); color: inherit; font: inherit; }
.poll-multi { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.mention { color: var(--accent); font-weight: 600; }
.msg.mine .mention { color: inherit; text-decoration: underline; }
.mention-pop { display: flex; flex-direction: column; max-height: 220px; overflow: auto; margin: 0 8px 4px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.mention-pop .menu-opt { text-align: left; }
.name-warn { color: var(--danger); font-size: 12px; margin-bottom: 2px; }
.inline-code { font-family: ui-monospace, Consolas, monospace; font-size: .92em; background: rgba(127,127,127,.15); padding: 0 4px; border-radius: 4px; }

/* --- administrare școală (LTT Chat) --- */
.admin-bg { align-items: stretch; }
.modal.admin-panel { width: min(1180px, 100%); max-height: 94vh; }
.admin-tabs { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; margin: 0 12px; }
.admin-tab { border: 0; background: transparent; padding: 6px 10px; border-radius: 8px; cursor: pointer; color: var(--muted); font: inherit; }
.admin-tab.on { background: var(--accent); color: #fff; }
.admin-body { padding: 8px 0; }
.admin-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 6px 0 12px; }
.admin-tools .search { max-width: 260px; }
.admin-check { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; font-weight: 600; padding: 6px; border-bottom: 1px solid var(--line, #ddd); position: sticky; top: 0; background: var(--panel); }
.admin-table td { padding: 4px 6px; border-bottom: 1px solid var(--line, #eee); vertical-align: middle; }
.admin-table tr.inactive td { opacity: .5; }
.admin-in { width: 100%; min-width: 120px; padding: 5px 6px; border: 1px solid var(--line, #ccc); border-radius: 6px; background: transparent; color: inherit; font: inherit; }
.admin-actions { white-space: nowrap; display: flex; gap: 6px; }
.admin-code { font-size: 28px; font-weight: 700; letter-spacing: 2px; text-align: center; font-family: ui-monospace, monospace; }
.admin-code-sm { font-family: ui-monospace, monospace; font-weight: 600; }
.admin-toast { position: sticky; bottom: 0; margin-top: 8px; padding: 10px 14px; border-radius: 8px; background: var(--accent); color: #fff; }
.admin-toast.bad { background: #c62828; }
.admin-rights li { margin: 4px 0; }
.print-sheet { display: none; }
@media print {
  body > *:not(.print-sheet) { display: none !important; }
  .print-sheet { display: block; color: #000; background: #fff; }
  .print-card { border: 1px dashed #999; padding: 14px 18px; margin: 0 0 10px; break-inside: avoid; font: 13px/1.4 sans-serif; }
  .print-title { font-weight: 700; font-size: 15px; }
  .print-name { font-size: 15px; margin: 4px 0; }
  .print-code { font-family: monospace; font-size: 18px; letter-spacing: 1px; }
}

/* --- anunțuri cu confirmare (LTT Chat) --- */
.notice { min-width: 220px; max-width: 360px; }
.notice-tag { font-size: 12px; font-weight: 600; opacity: .8; margin-bottom: 2px; }
.notice-text { margin: 2px 0 6px; }
.notice-late { color: #c62828; }
.notice-ack { width: 100%; margin-top: 6px; }
.notice-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0; }
.notice-btn { font-size: 18px; }

/* LTT Chat: fluturași de salariu (payslips.js) */
.payslip-name { display: block; height: 26px; width: auto; max-width: 340px; border: 1px solid var(--line, #ddd); border-radius: 4px; background: #fff; }
.payslip-confirm { padding: 10px; border-radius: 8px; background: var(--panel-2, rgba(0,0,0,.05)); }
