/* ===== MS-NIUMI — estilo "vidrio" de los años 2000 ===== */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  font: 13px/1.35 "Segoe UI", Tahoma, Verdana, sans-serif;
  color: #1d2b3a;
  background:
    radial-gradient(ellipse 60% 45% at 20% 85%, rgba(140, 230, 160, .55), transparent 70%),
    radial-gradient(ellipse 55% 40% at 85% 20%, rgba(255, 255, 255, .35), transparent 70%),
    radial-gradient(ellipse 80% 60% at 60% 110%, rgba(30, 90, 170, .9), transparent 70%),
    linear-gradient(160deg, #1b5fa8 0%, #3c9ad6 45%, #86cde6 70%, #2a74b8 100%);
}
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
a { color: #1a5fb4; }

#desktop { position: fixed; inset: 0 0 40px 0; }
#desktop.no-taskbar { bottom: 0; }

/* ----- Ventanas ----- */
.window {
  position: fixed;
  display: flex;
  flex-direction: column;
  background: linear-gradient(#f6fbff, #e1edf8);
  border: 1px solid rgba(30, 70, 110, .55);
  border-radius: 9px;
  box-shadow: 0 12px 34px rgba(0, 20, 50, .38), inset 0 0 0 1px rgba(255, 255, 255, .75);
  overflow: hidden;
}
.titlebar {
  flex: none;
  height: 30px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 6px 0 9px;
  background: linear-gradient(rgba(255, 255, 255, .85), rgba(200, 225, 248, .8) 55%, rgba(178, 212, 242, .85));
  border-bottom: 1px solid rgba(110, 150, 190, .5);
  user-select: none;
  cursor: default;
}
.ticon { width: 18px; height: 18px; }
.ttext { flex: 1; font-size: 12.5px; color: #183552; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wbtns { display: flex; gap: 2px; }
.wbtns button {
  width: 28px; height: 19px; padding: 0; line-height: 17px; font-size: 11px;
  border: 1px solid rgba(60, 90, 130, .55); border-radius: 4px;
  background: linear-gradient(#fdfeff, #d4e4f4); color: #2a3f57; cursor: pointer;
}
.wbtns button:hover { background: linear-gradient(#ffffff, #bfe0ff); }
.wbtns .b-close { width: 40px; background: linear-gradient(#f3b3a6, #d2563f); color: #fff; border-color: #8e2c1c; }
.wbtns .b-close:hover { background: linear-gradient(#ffc4b6, #e8492c); }

.btn {
  padding: 5px 14px;
  border: 1px solid #7d98b5;
  border-radius: 4px;
  background: linear-gradient(#ffffff, #e3ecf5 50%, #d2dfec 51%, #e6eef6);
  cursor: pointer;
}
.btn:hover { border-color: #3c7fb1; background: linear-gradient(#f4fbff, #d9effc 50%, #bee6fd 51%, #a7d9f5); }
.btn:active { background: linear-gradient(#c7e4f7, #a0d0ef); }
.btn.primary { font-weight: 600; }
.btn.small { padding: 3px 9px; font-size: 12px; }
.btn.danger { background: linear-gradient(#ffd6cf, #f0907d); border-color: #b5503c; }
.btn:disabled { opacity: .55; cursor: default; }
.linkish { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.linkish:hover { text-decoration: underline; }

input:not([type=checkbox]):not([type=color]), select, textarea {
  border: 1px solid #a6bdd4;
  border-radius: 3px;
  padding: 5px 7px;
  background: #fff;
  outline: none;
}
input:focus, textarea:focus, select:focus { border-color: #3d8fd6; box-shadow: 0 0 0 2px rgba(61, 143, 214, .18); }

/* ----- Marcos de imagen con color de estado ----- */
.avatar-frame {
  width: 64px; height: 64px; padding: 4px; flex: none;
  border-radius: 9px;
  background: linear-gradient(#e8e8e8, #9ea4aa);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 1px 3px rgba(0, 0, 0, .3);
  position: relative;
}
.avatar-frame::after {
  content: ""; position: absolute; left: 4px; right: 4px; top: 3px; height: 40%;
  border-radius: 7px 7px 40% 40%;
  background: linear-gradient(rgba(255, 255, 255, .45), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.avatar-frame img { width: 100%; height: 100%; object-fit: cover; border-radius: 5px; display: block; background: #fff; }
.avatar-frame.big { width: 110px; height: 110px; padding: 6px; }
.st-online { background: linear-gradient(#c6f5ad, #4bb52b); }
.st-busy { background: linear-gradient(#ffb3ad, #d0281d); }
.st-away { background: linear-gradient(#ffe6a0, #ee9d12); }
.st-offline, .st-invisible { background: linear-gradient(#eeeeee, #9ea4aa); }

/* Icono de estado (muñequito) */
.sicon { width: 14px; height: 14px; flex: none; position: relative; display: inline-block; vertical-align: -2px; }
.sicon::before { content: ""; position: absolute; left: 4px; top: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--sc); box-shadow: inset -1px -1px 0 rgba(0,0,0,.2); }
.sicon::after { content: ""; position: absolute; left: 1px; top: 6px; width: 12px; height: 8px; border-radius: 6px 6px 2px 2px; background: var(--sc); box-shadow: inset -1px -1px 0 rgba(0,0,0,.2); }
.sicon.online { --sc: #3cb521; }
.sicon.busy { --sc: #d9302a; }
.sicon.away { --sc: #f0a020; }
.sicon.offline { --sc: #a5abb1; }

/* ----- Inicio de sesión ----- */
.login-win { left: 50%; top: 50%; width: 340px; transform: translate(-50%, -50%); }
.login-body { padding: 18px 26px 22px; display: flex; flex-direction: column; align-items: center; gap: 14px;
  background: linear-gradient(#ffffff, #e4f0fa 60%, #d3e6f6); }
.brand { display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 300; color: #24507d; letter-spacing: .5px; }
.brand img { width: 38px; }
#login-form { display: flex; flex-direction: column; gap: 8px; width: 100%; }
#login-form .row { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #3b5068; }
#login-form .row select { flex: 1; padding: 2px 4px; }
#login-form:not(.register) .reg-only { display: none; }
#login-form .btn { align-self: center; min-width: 150px; margin-top: 4px; }
#login-form a { text-align: center; font-size: 12px; }
.error { color: #b3261e; font-size: 12px; min-height: 16px; text-align: center; }

/* ----- Lista de contactos ----- */
.main-win { left: 16px; top: 14px; width: 310px; bottom: 54px; min-height: 360px; }
.me {
  display: flex; gap: 10px; padding: 10px 10px 12px;
  background:
    radial-gradient(ellipse 60% 120% at 100% 0%, rgba(140, 210, 255, .45), transparent 70%),
    linear-gradient(#ffffff, #dcebf8);
  border-bottom: 1px solid #b8cfe4;
}
#me-frame { cursor: pointer; }
.me-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.me-name-row { display: flex; align-items: baseline; gap: 4px; min-width: 0; flex-wrap: wrap; }
#me-name { font-size: 15px; font-weight: 600; color: #1a3e63; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#me-status { border: 0; background: transparent; padding: 0 2px; font-size: 12px; color: #4a6380; cursor: pointer; box-shadow: none; }
#me-pm { width: 100%; font-size: 12px; font-style: italic; border-color: transparent; background: transparent; padding: 3px 5px; }
#me-pm:hover { border-color: #b8cfe4; background: rgba(255,255,255,.7); }
#me-pm:focus { background: #fff; font-style: normal; }
.conn-banner { background: #fff3c4; color: #7a5b00; padding: 4px 10px; font-size: 12px; border-bottom: 1px solid #e8d28a; }
.searchbar { display: flex; gap: 6px; padding: 7px 8px; border-bottom: 1px solid #c8d9ea; background: #f1f7fd; }
.searchbar input { flex: 1; min-width: 0; padding: 3px 7px; }
.contacts { flex: 1; overflow-y: auto; background: #fff; padding: 4px 0 10px; }
.cgroup-h { display: flex; align-items: center; gap: 5px; padding: 6px 8px 3px; font-weight: 600; color: #2f4c6b; cursor: pointer; user-select: none; font-size: 12.5px; }
.cgroup-h::before { content: "▾"; font-size: 10px; color: #6a84a0; width: 10px; }
.cgroup.collapsed .cgroup-h::before { content: "▸"; }
.cgroup.collapsed .crow { display: none; }
.crow { display: flex; align-items: center; gap: 6px; padding: 3px 8px 3px 18px; cursor: default; border: 1px solid transparent; border-radius: 3px; margin: 0 4px; position: relative; }
.crow:hover { background: linear-gradient(#f2f9ff, #dceefd); border-color: #b4d7f4; }
.crow.sel { background: linear-gradient(#e2f2ff, #c4e2fb); border-color: #8fc2ec; }
.crow .cav { width: 26px; height: 26px; padding: 2px; border-radius: 5px; }
.crow .cav::after { display: none; }
.crow .cav img { border-radius: 3px; }
.crow .cname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.crow .cname .pm { color: #7d8b99; font-style: italic; }
.crow.off .cname > b { color: #8a96a3; font-weight: normal; }
.crow .cname > b { font-weight: normal; }
.crow .x { display: none; border: 0; background: none; color: #a33; cursor: pointer; padding: 0 3px; font-size: 13px; }
.crow:hover .x { display: block; }
.crow .req-btns { display: flex; gap: 4px; }
.empty-hint { padding: 18px 14px; color: #6c7f93; text-align: center; font-size: 12.5px; }
.main-foot { display: flex; justify-content: space-between; gap: 6px; padding: 7px 8px; border-top: 1px solid #c4d6e8; background: linear-gradient(#eef5fc, #dbe8f5); }

/* ----- Ventana de conversación ----- */
.chat-win {
  width: 660px; height: min(540px, calc(100vh - 70px)); min-width: 380px; min-height: 340px;
  resize: both;
}
.chat-win.maxed { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; border-radius: 0; resize: none; }
.chat-win.active { box-shadow: 0 16px 44px rgba(0, 20, 50, .5), inset 0 0 0 1px rgba(255, 255, 255, .75); }
.chathead {
  flex: none; padding: 7px 12px 0;
  background:
    radial-gradient(ellipse 50% 140% at 95% 0%, rgba(160, 220, 255, .55), transparent 70%),
    linear-gradient(#ffffff, #e2eefa);
  border-bottom: 1px solid #bcd2e7;
}
.peer { font-size: 14.5px; display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; overflow: hidden; }
.peer .pname { font-weight: 600; color: #193d63; overflow: hidden; text-overflow: ellipsis; }
.peer .puser { color: #7a8ea3; font-size: 12px; }
.ppm { color: #6b7d90; font-style: italic; font-size: 12px; min-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toolbar { display: flex; gap: 2px; padding: 4px 0 5px; flex-wrap: wrap; }
.toolbar button, .ctoolbar button {
  display: flex; align-items: center; gap: 5px;
  border: 1px solid transparent; background: none; border-radius: 4px; padding: 3px 7px; cursor: pointer; color: #20476e;
}
.toolbar button:hover, .ctoolbar button:hover, .toolbar button.on, .ctoolbar button.on {
  border-color: #9ccbef; background: linear-gradient(#f7fcff, #d6ecfc);
}
.toolbar button span { font-size: 12px; }
.chatbody { flex: 1; display: flex; min-height: 0; }
.convo { flex: 1; display: flex; flex-direction: column; gap: 5px; padding: 8px 6px 8px 10px; min-width: 0; position: relative; }
.messages {
  flex: 1; overflow-y: auto; background: #fff; border: 1px solid #a9c2db; border-radius: 4px;
  padding: 6px 10px 8px; white-space: pre-wrap; overflow-wrap: anywhere;
}
.older { display: block; margin: 0 auto 6px; font-size: 11.5px; }
.m { margin-top: 6px; }
.m.cont { margin-top: 1px; }
.m.cont .who { display: none; }
.m .who { color: #5b6876; font-size: 12px; white-space: normal; }
.m .who .time { color: #a0abb6; font-size: 11px; margin-left: 4px; }
.m .txt { padding-left: 14px; font-size: 13.5px; }
.m .txt.big { font-size: 34px; line-height: 1.15; }
.sys { display: flex; align-items: center; gap: 6px; color: #6b7785; font-size: 12px; margin: 7px 0; white-space: normal; }
.sys::before { content: "•"; color: #9fb2c4; }
.sys.nudge { color: #b4561c; font-weight: 600; }
.sys.nudge::before { content: "📳"; }
.sys.sound::before { content: "🔊"; }
.sys.call::before { content: "📞"; }
.sys button { border: 1px solid #b5cbe0; background: #f3f8fd; border-radius: 3px; cursor: pointer; padding: 0 6px; font-size: 11px; }
.emo-u { font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif; }
img.emo { height: 1.5em; vertical-align: -0.35em; max-width: 4em; object-fit: contain; }
.txt.big img.emo { height: 1.3em; }
.typing { flex: none; min-height: 16px; font-size: 11.5px; color: #6b7d90; padding-left: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.typing:not(:empty)::before { content: "✎ "; }

.callbar {
  flex: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 10px; border: 1px solid #e0c060; border-radius: 4px;
  background: linear-gradient(#fffbe6, #ffeeb0);
}
.callbar .ctext { flex: 1; min-width: 160px; font-weight: 600; color: #5d4500; }
.callbar.ringing { animation: ringglow 1s ease-in-out infinite alternate; }
@keyframes ringglow { from { box-shadow: 0 0 0 0 rgba(255, 190, 0, .0); } to { box-shadow: 0 0 0 4px rgba(255, 190, 0, .45); } }
.btn.accept { background: linear-gradient(#d6f7c8, #6cc54a); border-color: #3f8b25; }

.composer { flex: none; border: 1px solid #a9c2db; border-radius: 4px; background: #fff; display: flex; flex-direction: column; }
.ctoolbar { display: flex; gap: 1px; padding: 2px 4px; border-bottom: 1px solid #e0e9f2; background: linear-gradient(#fbfdff, #eef4fa); }
.ctoolbar button { padding: 2px 6px; font-size: 15px; }
.ctoolbar button small { font-size: 11px; }
.inputrow { display: flex; }
.inputrow textarea { flex: 1; border: 0; resize: none; height: 66px; padding: 6px 8px; box-shadow: none !important; font-size: 13.5px; }
.inputrow .send { margin: 6px; align-self: stretch; padding: 0 16px; }

.side { flex: none; width: 140px; padding: 8px 10px 8px 4px; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; }
.side .frame { position: relative; display: flex; justify-content: center; }
.side .avatar-frame { width: 120px; height: 120px; padding: 6px; }
.side video { width: 100%; background: #000; border-radius: 6px; border: 2px solid #5f8fbd; display: block; }
.side .rvideo { aspect-ratio: 4 / 3; object-fit: contain; cursor: zoom-in; }
.side .lvideo { aspect-ratio: 4 / 3; object-fit: cover; }
.side .lvideo.mirror { transform: scaleX(-1); }
.side { overflow-y: auto; }
.side.video { width: 320px; justify-content: flex-start; }
.side.video .frame.me { margin-top: auto; }
.side.video .frame.me .avatar-frame { width: 64px; height: 64px; padding: 4px; }
.side.video .lvideo { width: 136px; }
.side.video { gap: 6px; }
.callctrls { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px; }
.callctrls button {
  width: 34px; height: 30px; border-radius: 6px; border: 1px solid #8eaed0; cursor: pointer; font-size: 15px;
  background: linear-gradient(#ffffff, #dbe9f6);
}
.callctrls button:hover { background: linear-gradient(#f4fbff, #bfe2fb); }
.callctrls button.off { background: linear-gradient(#ffe0dc, #f3a397); border-color: #c0614f; }
.callctrls button.lit { background: linear-gradient(#e0ffd6, #8fd975); border-color: #4c9a35; }
.callctrls .hang { background: linear-gradient(#ff9d8e, #d3361f); border-color: #8c2312; width: 44px; }
.ctimer { width: 100%; text-align: center; font-size: 11.5px; color: #3c5a78; font-variant-numeric: tabular-nums; }

/* ----- Zumbido ----- */
@keyframes shake {
  0%, 100% { transform: translate(0, 0); }
  8% { transform: translate(-14px, -7px); }
  16% { transform: translate(12px, 9px); }
  24% { transform: translate(-15px, 5px); }
  32% { transform: translate(13px, -9px); }
  40% { transform: translate(-11px, 7px); }
  48% { transform: translate(10px, -5px); }
  56% { transform: translate(-9px, 8px); }
  64% { transform: translate(8px, -6px); }
  72% { transform: translate(-6px, 4px); }
  80% { transform: translate(5px, -3px); }
  90% { transform: translate(-2px, 2px); }
}
.shake { animation: shake .75s linear; }

/* ----- Ventanas emergentes (emoticones, sonidos, fuente) ----- */
.popover {
  position: absolute; left: 10px; bottom: 112px; z-index: 30;
  width: 340px; max-width: calc(100% - 20px);
  background: #fff; border: 1px solid #8eaed0; border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 30, 60, .3);
  display: flex; flex-direction: column; max-height: min(300px, calc(100% - 118px));
}
.ptabs { display: flex; gap: 2px; padding: 4px 4px 0; border-bottom: 1px solid #d4e2ef; background: #f3f8fd; border-radius: 6px 6px 0 0; }
.ptabs button { border: 1px solid transparent; border-bottom: 0; background: none; padding: 4px 9px; border-radius: 4px 4px 0 0; cursor: pointer; font-size: 12px; }
.ptabs button.on { background: #fff; border-color: #d4e2ef; margin-bottom: -1px; font-weight: 600; }
.pbody { overflow-y: auto; padding: 6px; }
.ptitle { font-size: 11.5px; font-weight: 600; color: #4b6683; padding: 4px 2px; }
.egrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(32px, 1fr)); gap: 2px; }
.egrid button { height: 32px; border: 1px solid transparent; background: none; border-radius: 4px; cursor: pointer; font-size: 20px; padding: 0; display: flex; align-items: center; justify-content: center; }
.egrid button:hover { border-color: #9ccbef; background: #e8f4fe; }
.egrid button img { max-width: 26px; max-height: 26px; }
.sgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px; }
.snd { display: flex; align-items: center; border: 1px solid #d3e1ee; border-radius: 4px; overflow: hidden; }
.snd .s-send { flex: 1; display: flex; align-items: center; gap: 6px; border: 0; background: #f8fbfe; padding: 4px 6px; cursor: pointer; text-align: left; min-width: 0; }
.snd .s-send span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.snd .s-send:hover { background: #ddeffd; }
.snd .s-prev { border: 0; border-left: 1px solid #d3e1ee; background: #fff; cursor: pointer; padding: 4px 6px; font-size: 11px; }
.snd .s-prev:hover { background: #fff4d6; }
.pfoot { display: flex; gap: 6px; padding: 6px; border-top: 1px solid #e0e9f2; flex-wrap: wrap; }
.pop-style .pbody { display: flex; flex-direction: column; gap: 8px; }
.pop-style label { display: flex; align-items: center; gap: 8px; }
.pop-style .preview { border: 1px dashed #b5cbe0; padding: 6px 8px; border-radius: 4px; }

/* ----- Diálogos ----- */
.overlay { position: fixed; inset: 0; background: rgba(10, 30, 55, .35); z-index: 10000; display: flex; align-items: center; justify-content: center; }
.dialog { position: relative; width: 360px; max-width: calc(100vw - 24px); }
.dbody { padding: 14px 16px 6px; display: flex; flex-direction: column; gap: 10px; background: #fff; }
.dbody p { margin: 0; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: #3b5068; }
.dbtns { display: flex; justify-content: flex-end; gap: 6px; padding: 10px 14px; background: linear-gradient(#f1f6fb, #e1ebf5); border-top: 1px solid #ccdbe9; }
.derr { color: #b3261e; font-size: 12px; min-height: 15px; }
.rec-row { display: flex; align-items: center; gap: 10px; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: #bbb; }
.rec-dot.live { background: #e0241b; animation: ringglow .6s infinite alternate; }
.emo-preview { max-width: 64px; max-height: 64px; align-self: center; }

/* ----- Notificaciones ----- */
#toasts { position: fixed; right: 12px; bottom: 52px; display: flex; flex-direction: column; gap: 8px; z-index: 9000; }
.toast {
  width: 270px; border-radius: 7px; overflow: hidden; cursor: pointer;
  background: linear-gradient(#ffffff, #e5f1fb);
  border: 1px solid rgba(40, 80, 120, .5);
  box-shadow: 0 8px 22px rgba(0, 20, 50, .4);
  animation: toastin .35s ease-out;
}
@keyframes toastin { from { transform: translateY(40px); opacity: 0; } }
.toast .thead { display: flex; align-items: center; gap: 6px; padding: 4px 6px 4px 8px; font-size: 11.5px; color: #2d5279; background: linear-gradient(#e8f4ff, #c7e0f7); }
.toast .thead img { width: 14px; }
.toast .thead span { flex: 1; }
.toast .tclose { border: 0; background: none; cursor: pointer; color: #567; padding: 0 3px; }
.toast .tbody { display: flex; gap: 10px; padding: 10px; align-items: center; }
.toast .tbody img { width: 42px; height: 42px; border-radius: 5px; border: 2px solid #9fc3e3; object-fit: cover; flex: none; }
.toast .tbody b { display: block; color: #183d64; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast .tbody div { min-width: 0; font-size: 12.5px; }
.toast .tbody .tt { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* ----- Barra de tareas ----- */
#taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: 40px; z-index: 8000;
  display: flex; align-items: center; gap: 6px; padding: 0 8px;
  background: linear-gradient(rgba(40, 70, 105, .72), rgba(12, 30, 52, .82));
  border-top: 1px solid rgba(255, 255, 255, .35);
  backdrop-filter: blur(10px);
}
#taskbar .start { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 35%, rgba(255,255,255,.55), rgba(255,255,255,.08) 60%); }
#taskbar .start img { width: 24px; }
#task-buttons { flex: 1; display: flex; gap: 4px; overflow-x: auto; }
.task {
  flex: none; width: 170px; height: 32px; display: flex; align-items: center; gap: 6px; padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, .25); border-radius: 4px; cursor: pointer; color: #fff;
  background: linear-gradient(rgba(255, 255, 255, .16), rgba(255, 255, 255, .04));
  text-shadow: 0 1px 1px rgba(0, 0, 0, .6);
}
.task:hover { background: linear-gradient(rgba(255, 255, 255, .3), rgba(255, 255, 255, .1)); }
.task.active { background: linear-gradient(rgba(255, 255, 255, .38), rgba(255, 255, 255, .18)); border-color: rgba(255, 255, 255, .5); }
.task img { width: 22px; height: 22px; border-radius: 3px; object-fit: cover; }
.task span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.task.flash { animation: taskflash 1s steps(1) infinite; }
@keyframes taskflash { 0% { background: linear-gradient(#ffc966, #e8890c); } 50% { background: linear-gradient(rgba(255,255,255,.16), rgba(255,255,255,.04)); } }
#clock { color: #fff; font-size: 12px; padding: 0 6px; text-shadow: 0 1px 1px rgba(0,0,0,.6); }

/* ----- Pantallas pequeñas ----- */
@media (max-width: 760px) {
  .main-win { left: 0; top: 0; right: 0; bottom: 40px; width: auto; min-height: 0; border-radius: 0; }
  .chat-win { left: 0 !important; top: 0 !important; width: 100% !important; height: calc(100% - 40px) !important; border-radius: 0; resize: none; min-width: 0; min-height: 0; }
  .chatbody { flex-direction: column-reverse; }
  .side { width: auto !important; flex-direction: row; padding: 6px 8px 0; }
  .side:not(.incall) { display: none; }
  .side .frame.me { display: none; }
  .side .frame.them { flex: 1; }
  .side .avatar-frame { width: 64px; height: 64px; }
  .toolbar button span { display: none; }
  .task { width: 120px; }
}
