body.vp-classic .chat-reply-button {
    flex: 0 0 auto;
    min-width: 38px;
    padding: 0.08rem 0.4rem;
    border: 1px solid #c8c8c8 !important;
    background: linear-gradient(180deg, #ffffff 0%, #e4e4e4 100%) !important;
    border-radius: 0 !important;
    color: #666 !important;
    font-size: 18px !important;
    line-height: 1.2;
    cursor: pointer;
    margin-left: 4px;
}

body.vp-classic .chat-reply-button:hover {
    background: linear-gradient(180deg, #ffffff 0%, #d6d6d6 100%) !important;
    color: #333 !important;
}

body.vp-classic .chat-reply-chip {
    margin: 0 0 0.22rem 2.5rem;
    padding: 0.18rem 0.5rem;
    border: none;
    border-left: 3px solid #8aaee0;
    background: rgba(138,174,224,0.08);
    color: #606060;
    font-size: 0.82rem;
}

body.vp-classic .chat-reply-chip:hover {
    background: rgba(138,174,224,0.16);
    border-left-color: #5d8bcc;
}
body.vp-classic .chat-reply-chip-label {
    display: inline;
    color: #3f5f8d;
    font-weight: 700;
    margin-right: 0.35rem;
}
body.vp-classic .chat-reply-chip-label::after {
    content: ':';
    color: #999;
    margin-left: 0.05rem;
}
body.vp-classic .chat-reply-chip-text {
    display: inline;
    color: #707070;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/*
 * VirtualPol capture skin.
 * Estilo local basado únicamente en la captura aportada por el usuario.
 */

:root {
    --chat-font-size: 1.25rem;
    --sidebar-w: 250px;
    --subnav-w: 262px;
    --topbar-h: 82px;
    --composer-h: 44px;
    --vp-capture-bg: #eeeeee;
    --vp-capture-border: #c8c8c8;
    --vp-capture-text: #333333;
    --vp-capture-muted: #6a6a6a;
    --vp-capture-link: #006cff;
    --sidebar-w-tablet: 200px;
    --subnav-w-tablet: 220px;
    --topbar-h-tablet: 64px;
}

html,
body {
    height: 100%;
    background: var(--vp-capture-bg);
}

body.vp-classic {
    --sidebar-w: 250px;
    --subnav-w: 262px;
    --topbar-h: 82px;
    --composer-h: 44px;
    --vp-page-bg: var(--vp-capture-bg);
    --vp-sidebar-bg: var(--vp-capture-bg);
    --vp-topbar-bg: var(--vp-capture-bg);
    --vp-border: var(--vp-capture-border);
    --vp-link: var(--vp-capture-link);
    margin: 0;
    background: var(--vp-capture-bg);
    color: var(--vp-capture-text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.2;
}

body.vp-classic .maxsim-badge {
    display: none !important;
}

body.vp-classic a {
    color: var(--vp-capture-link);
    text-decoration: none;
}

body.vp-classic a:hover {
    text-decoration: underline;
}

body.vp-classic .app-topbar {
    height: var(--topbar-h);
    background: #d8d8d8;
    border-bottom: 1px solid #b8b8b8;
    box-shadow: none;
}

body.vp-classic .app-topbar-stripes {
    flex: 0 0 var(--sidebar-w);
    width: var(--sidebar-w);
    height: var(--topbar-h);
    background: #eeeeee;
    border-right: 1px solid #c7c7c7;
}

body.vp-classic .app-topbar-flag-link,
body.vp-classic .app-topbar-flag {
    display: block;
    width: 100%;
    height: 100%;
}

body.vp-classic .app-topbar-flag {
    border: 0;
    border-radius: 0;
    background-image: linear-gradient(to bottom, #22cfd6 0 31%, #ffd91a 31% 63%, #050505 63% 100%);
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
}

body.vp-classic .app-topbar-flag-stripe {
    display: none !important;
}

body.vp-classic .app-topbar-main {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    height: var(--topbar-h);
    padding: 0;
    background-color: #5f241d;
    background-image: url('/static/backgrounds/tapiz-amanecer-rojo.png');
    background-position: center center !important;
    background-repeat: no-repeat;
    background-size: cover !important;
    border: 0;
    box-shadow: none;
}

body.vp-classic .app-topbar-left {
    display: none !important;
}

body.vp-classic .app-topbar-titlebar {
    position: absolute;
    left: 130px;
    top: 26px;
    z-index: 2;
    display: block;
    min-width: 0;
}

body.vp-classic .app-topbar-state-chip {
    display: inline-block;
    max-width: 420px;
    min-height: 29px;
    padding: 1px 7px 2px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 8px;
    background: rgba(245, 245, 245, 0.86);
    color: #858585;
    font-size: 22px;
    font-weight: 400;
    line-height: 26px;
    text-shadow: 0 1px 0 #ffffff;
    white-space: nowrap;
    text-overflow: ellipsis;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

body.vp-classic .app-topbar-state-chip:hover {
    background: rgba(255, 255, 255, 0.93);
    color: #666666;
    text-decoration: none;
}

body.vp-classic .app-topbar-right {
    position: absolute;
    top: 13px;
    right: 10px;
    z-index: 3;
    display: flex;
    align-items: center;
    min-height: 24px;
    margin: 0;
    padding: 0 9px;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: none;
    backdrop-filter: none;
}

body.vp-classic .app-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.42rem;
    color: #808080;
    font-size: 20px;
    line-height: 24px;
    white-space: nowrap;
}

body.vp-classic .app-topbar-actions > * {
    order: 20;
}

body.vp-classic #topbar_notifications_link {
    order: 1;
}

body.vp-classic .app-topbar-nick {
    order: 2;
    text-transform: none;
}

body.vp-classic .app-topbar-nick::after {
    content: ' ✏️';
    font-size: 16px;
    vertical-align: 1px;
}

body.vp-classic .app-topbar-actions > .app-topbar-sep:nth-child(2) {
    display: none;
}

body.vp-classic .app-topbar-actions > .app-topbar-sep:nth-child(4) {
    order: 3;
}

body.vp-classic .app-topbar-actions > a[title="Mensajes privados"] {
    order: 4;
}

body.vp-classic .app-topbar-actions > .app-topbar-sep:nth-child(6) {
    order: 5;
}

body.vp-classic .app-topbar-balance {
    order: 6;
    display: inline-flex;
    align-items: center;
    flex-direction: row-reverse;
    gap: 3px;
}

body.vp-classic .app-topbar-actions > .app-topbar-sep:nth-child(8) {
    order: 7;
}

body.vp-classic .app-topbar-actions > a[title="Opciones"] {
    order: 8;
    width: 24px;
    overflow: hidden;
    color: transparent !important;
    font-size: 0;
}

body.vp-classic .app-topbar-actions > a[title="Opciones"]::before {
    content: '⚒';
    color: #4f83c4;
    font-size: 22px;
    line-height: 1;
}

body.vp-classic .app-topbar-actions > .app-topbar-sep:nth-child(10) {
    order: 9;
}

body.vp-classic .app-topbar-actions > a[href="/maxsim/auth/logout"] {
    order: 10;
}

body.vp-classic .app-topbar-link,
body.vp-classic .app-topbar-icon-link {
    color: #4f83c4;
    font-weight: 700;
    text-decoration: none;
}

body.vp-classic .app-topbar-link:hover,
body.vp-classic .app-topbar-icon-link:hover {
    color: #2b65a8;
    text-decoration: none;
}

body.vp-classic .app-topbar-icon-link {
    font-size: 22px;
    line-height: 1;
}

body.vp-classic .app-topbar-sep {
    color: #a9a9a9;
}

body.vp-classic .topbar-notifications-bell {
    color: #8d8d8d;
    text-shadow: none !important;
}

body.vp-classic .topbar-notifications-bell-icon,
body.vp-classic .app-topbar-balance-icon {
    width: 20px;
    height: 20px;
    vertical-align: -3px;
}

body.vp-classic .topbar-notifications-bell.is-active {
    color: #d75f5f;
    text-shadow: 0 0 0.45rem rgba(215, 95, 95, 0.25);
}

body.vp-classic .app-sidebar {
    top: var(--topbar-h);
    bottom: 0;
    left: 0;
    width: var(--sidebar-w);
    overflow: visible;
    background: linear-gradient(90deg, #f7f7f7 0%, #eeeeee 100%);
    border-right: 1px solid #c8c8c8;
    box-shadow: none;
}

body.vp-classic .app-sidebar .scroll {
    height: 100%;
    overflow: visible;
    padding: 0;
}

body.vp-classic .app-sidebar-nav {
    padding: 0;
    border-bottom: 1px solid #d1d1d1;
}

body.vp-classic .app-sidebar-group {
    position: relative;
    padding: 0;
    border-bottom: 1px solid #d0d0d0;
}

body.vp-classic .app-sidebar-heading {
    position: relative;
    min-height: 49px;
    margin: 0;
    padding: 10px 32px 8px 26px;
    border-left: 6px solid transparent;
    background: linear-gradient(90deg, #f7f7f7 0%, #e9e9e9 100%);
    color: #6a6a6a;
    font-size: 24px;
    font-weight: 400;
    line-height: 1.12;
}

body.vp-classic .app-sidebar-heading::after {
    content: '›';
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    color: #bbbbbb;
    font-size: 24px;
    line-height: 1;
}

body.vp-classic .app-sidebar-group.is-active .app-sidebar-heading,
body.vp-classic .app-sidebar-group:hover .app-sidebar-heading,
body.vp-classic .app-sidebar-group:focus-within .app-sidebar-heading {
    border-left-color: #ff6262;
    background: #eeeeee;
    color: #5d5d5d;
}

body.vp-classic .app-sidebar-links {
    display: none;
    position: absolute;
    top: 0;
    left: calc(100% - 1px);
    z-index: 1250;
    width: 236px;
    padding: 5px 0;
    border: 1px solid #c8c8c8;
    background: #eeeeee;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.12);
}

body.vp-classic .app-sidebar-group:hover .app-sidebar-links,
body.vp-classic .app-sidebar-group:focus-within .app-sidebar-links {
    display: block;
}

body.vp-classic .app-sidebar-link {
    display: block;
    padding: 7px 12px 7px 18px;
    border: 0;
    background: transparent;
    color: #3178c6;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.15;
    white-space: nowrap;
}

body.vp-classic .app-sidebar-link::before {
    display: none !important;
}

body.vp-classic .app-sidebar-link:hover,
body.vp-classic .app-sidebar-link.is-active {
    background: #ffffff;
    color: #222222;
    font-weight: 700;
    text-decoration: none;
}

body.vp-classic .app-sidebar-link-badge {
    border-radius: 2px;
    background: #c94a4a;
    color: #ffffff;
    font-size: 10px;
}

body.vp-classic .app-sidebar-mini-maps {
    margin: 0;
    padding: 50px 10px 12px;
    border: 0;
    background: transparent;
    color: #666666;
}

body.vp-classic .app-sidebar-mini-maps > .app-sidebar-heading,
body.vp-classic .app-sidebar-mini-map-top,
body.vp-classic .app-sidebar-mini-map-size,
body.vp-classic .app-sidebar-mini-map-more {
    display: none !important;
}

body.vp-classic .app-sidebar-mini-maps-body,
body.vp-classic .app-sidebar-mini-map-card {
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

body.vp-classic .app-sidebar-mini-map-card:not(:first-child) {
    display: none;
}

body.vp-classic .app-sidebar-mini-map-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 220px;
    margin: 0 auto 5px;
    padding: 0;
}

body.vp-classic .app-sidebar-mini-map-button,
body.vp-classic .app-sidebar-mini-map-button.is-primary {
    min-height: auto;
    padding: 0;
    border: 0 !important;
    background: transparent !important;
    color: #686868 !important;
    box-shadow: none !important;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.1;
    text-transform: lowercase;
}

body.vp-classic .app-sidebar-mini-map-button:first-child {
    text-transform: none;
}

body.vp-classic .app-sidebar-mini-map-button:hover,
body.vp-classic .app-sidebar-mini-map-button.is-primary:hover {
    color: #3178c6 !important;
    text-decoration: none;
}

body.vp-classic .app-sidebar-mini-map-link {
    display: block;
    width: 220px;
    margin: 0 auto;
    padding: 0;
    border: 0;
    background: transparent;
}

body.vp-classic .app-sidebar-mini-map-grid {
    width: 220px;
    table-layout: fixed;
    border-collapse: collapse;
    border-spacing: 0;
    background: #ffffff;
}

body.vp-classic .app-sidebar-mini-map-grid td {
    width: 22px;
    height: 21px;
    min-width: 0;
    padding: 0;
    border: 1px solid #a6a6a6;
}

body.vp-classic .app-sidebar-mini-map-grid td.is-empty,
body.vp-classic .app-sidebar-mini-map-grid td.is-unowned {
    background: #ffffff;
}

body.vp-classic .app-sidebar-mini-map-grid td.is-unavailable {
    background: #111111;
}

body.vp-classic .app-sidebar-mini-map-grid td.is-available {
    background: #ffce00;
}

body.vp-classic .app-sidebar-mini-map-grid td.is-owned {
    background: #ff2d2d;
}

body.vp-classic .app-sidebar-mini-map-title-overlay {
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

body.vp-classic .app {
    height: calc(100vh - var(--topbar-h));
    margin-top: var(--topbar-h);
    margin-left: var(--sidebar-w);
    overflow: hidden;
    background: var(--vp-capture-bg);
}

body.vp-classic .app-main {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    background: var(--vp-capture-bg);
}

body.vp-classic .chat {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: var(--vp-capture-bg);
}

body.vp-classic .chat-legacy-header {
    flex: 0 0 43px;
    height: 43px;
    min-height: 43px;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 0;
    padding: 0;
    background: var(--vp-capture-bg);
    border-bottom: 1px solid #cfcfcf;
}

body.vp-classic .chat-legacy-breadcrumb {
    display: flex;
    align-items: stretch;
    gap: 0;
    min-width: 0;
    height: 43px;
    padding: 0;
    overflow: visible;
}

body.vp-classic .chat-legacy-crumb {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    min-height: 43px;
    height: 43px;
    margin: 0 0 0 -12px;
    padding: 0 24px 0 27px;
    border: 1px solid #d0d0d0;
    border-top: 0;
    border-bottom-color: #c4c4c4;
    border-radius: 0;
    background: linear-gradient(180deg, #fafafa 0%, #ececec 100%);
    color: #3178c6;
    box-shadow: none;
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%);
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    white-space: nowrap;
}

body.vp-classic .chat-legacy-crumb:first-child {
    margin-left: 0;
}

body.vp-classic .chat-legacy-crumb.is-home {
    min-width: 61px;
    padding: 0 21px 0 14px;
    color: #4a9bdd;
    font-size: 24px;
    font-weight: 700;
}

body.vp-classic .chat-legacy-crumb.is-current {
    min-width: 160px;
    background: #ffffff;
    color: #111111;
    font-weight: 700;
}

body.vp-classic .chat-legacy-mobile-button {
    display: none !important;
}

body.vp-classic .chat-messages,
body.vp-classic #messages {
    flex: 1 1 0;
    min-height: 0;
    height: auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 18px calc(var(--composer-h) + 0.75rem);
    margin: 0;
    border-top: 0;
    background: var(--vp-capture-bg);
    color: var(--vp-capture-text);
    box-shadow: none;
    white-space: pre-wrap;
    scrollbar-gutter: stable;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

body.vp-classic #messages::before {
    content: '';
    flex: 1 1 0;
    min-height: 0;
}

body.vp-classic #chat-load-more,
body.vp-classic #chat-history-end,
body.vp-classic .chat-load-more,
body.vp-classic .chat-history-end {
    order: 1;
    flex: 0 0 auto;
}

body.vp-classic .chat-line,
body.vp-classic .chat-day-divider {
    order: 2;
    flex: 0 0 auto;
}

body.vp-classic #messages-spacer {
    pointer-events: none;
}

body.vp-classic .chat-line {
    margin: 0;
    padding: 0;
    border: 0;
    color: #333333;
    font-size: var(--chat-font-size);
    line-height: 1.14;
    word-break: break-word;
}

body.vp-classic .chat-line-header {
    display: flex;
    align-items: flex-start;
    gap: 0;
}

body.vp-classic .chat-line-main {
    flex: 1 1 auto;
    min-width: 0;
}

body.vp-classic .chat-line strong,
body.vp-classic .chat-user-nick {
    color: #555555;
    font-weight: 700;
}

body.vp-classic .chat-line a {
    color: #0064ff;
    text-decoration: none;
}

body.vp-classic .chat-line a:hover {
    text-decoration: underline;
}

body.vp-classic .same-time {
    color: var(--vp-capture-bg);
}

body.vp-classic .chat-mention-self {
    color: #0064ff;
    font-weight: 700;
}

body.vp-classic .chat-inline-image {
    max-width: min(420px, 100%);
    max-height: 320px;
    margin-top: 4px;
    border: 1px solid #c8c8c8;
    border-radius: 0;
    background: #ffffff;
}

body.vp-classic .app-subnav {
    position: relative;
    flex: 0 0 var(--subnav-w);
    width: var(--subnav-w);
    min-width: var(--subnav-w);
    max-width: var(--subnav-w);
    background: var(--vp-capture-bg);
    border-left: 1px solid #c6c6c6;
}

body.vp-classic .chat-composer {
    position: fixed !important;
    left: var(--sidebar-w);
    right: 0;
    bottom: 0;
    z-index: 1300;
    min-height: var(--composer-h);
    width: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    padding: 5px 8px 5px 0;
    border-top: 1px solid #c5c5c5;
    background: #f2f2f2;
    box-shadow: none;
}

/* --- Message search bar: fixed above composer --- */
body.vp-classic .chat-search-bar {
    position: fixed !important;
    left: var(--sidebar-w);
    right: 0;
    bottom: var(--composer-h);
    z-index: 1301;
    max-height: 40vh;
    margin: 0;
    border-top: 1px solid #c5c5c5;
    border-bottom: 1px solid #d0d0d0;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
}
body.vp-classic .chat-composer .input-group {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
    gap: 8px;
    flex-shrink: 0;
}

body.vp-classic .chat-composer .input-group-text {
    order: 0;
    position: relative;
    flex: 0 0 30px;
    width: 30px;
    min-width: 30px;
    height: 34px;
    padding: 0;
    border: 0 !important;
    background: transparent !important;
    color: transparent !important;
    box-shadow: none !important;
}

body.vp-classic .chat-composer .input-group-text::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    transform: translate(-50%, -50%);
    border: 1px solid #bdbdbd;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 38%, #ffffff 0 28%, #d7d7d7 30% 100%);
}

body.vp-classic .chat-composer #input_msg {
    order: 1;
    flex: 1 1 auto;
    min-width: 0;
    height: 40px;
    min-height: 40px;
    padding: 5px 7px;
    border: 1px solid #8fb1cf !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    color: #222222 !important;
    font-size: var(--chat-font-size);
    line-height: 1.2;
    box-shadow: inset 0 1px 3px rgba(70, 120, 160, 0.3), 0 0 4px rgba(62, 150, 210, 0.45) !important;
}
body.vp-classic .chat-hide-events-label {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    order: 3;
    flex: 0 0 auto;
    color: #111111;
    font-size: 18px;
    line-height: 34px;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}
body.vp-classic .chat-hide-events-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
    accent-color: #3f5f8d;
}
body.vp-classic .chat-hide-events-text {
    font-size: 14px;
    color: #111111;
    vertical-align: middle;
}

body.vp-classic .chat-composer .btn-primary,
body.vp-classic .chat-composer button[type="submit"] {
    order: 4;
    flex: 0 0 78px;
    width: 78px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    border: 1px solid #c8c8c8 !important;
    border-radius: 6px !important;
    background: linear-gradient(180deg, #ffffff 0%, #e4e4e4 100%) !important;
    color: #555555 !important;
    box-shadow: none !important;
    font-size: 18px;
    font-weight: 400;
}

body.vp-classic .chat-composer .btn-primary:hover,
body.vp-classic .chat-composer button[type="submit"]:hover {
    background: linear-gradient(180deg, #ffffff 0%, #d9d9d9 100%) !important;
    color: #333333 !important;
    text-decoration: none;
}

body.vp-classic .chat-image-preview {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 0.65rem;
    padding: 0.35rem 0.5rem;
    background: rgba(255,248,235,0.9);
    border: 1px solid #dcc8a8;
    border-left: 3px solid #e8a040;
    border-radius: 0;
    margin-bottom: 0.3rem;
    box-sizing: border-box;
    flex-shrink: 0;
}

body.vp-classic .chat-reply-preview {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 0.65rem;
    padding: 0.35rem 0.5rem;
    background: rgba(235,245,255,0.9);
    border: 1px solid #b8c8e0;
    border-left: 3px solid #8aaee0;
    border-radius: 0;
    margin-bottom: 0.3rem;
    box-sizing: border-box;
    flex-shrink: 0;
}

body.vp-classic .chat-image-preview-thumb {
    width: 42px;
    min-width: 42px;
    height: 42px;
    object-fit: cover;
    border: 1px solid #c8b898;
    background: #fff;
}

body.vp-classic .chat-image-preview-meta {
    flex: 1 1 auto;
    min-width: 0;
    color: #555;
    line-height: 1.2;
}

body.vp-classic .chat-image-preview-meta strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.85rem;
    color: #8a5a1a;
    margin-bottom: 0.05rem;
}

body.vp-classic .chat-image-preview-meta small {
    display: block;
    font-size: 0.75rem;
    color: #8a6a3a;
}

body.vp-classic .chat-reply-preview-meta {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.25rem 0.45rem;
    background: rgba(255,255,255,0.7);
    border-left: 3px solid #8aaee0;
    color: #555;
    line-height: 1.2;
    cursor: pointer;
}

body.vp-classic .chat-reply-preview-meta strong,
body.vp-classic .chat-reply-preview-meta small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.vp-classic .chat-reply-preview-meta strong {
    font-size: 0.85rem;
}

body.vp-classic .chat-reply-preview-meta small {
    font-size: 0.75rem;
}

body.vp-classic .card,
body.vp-classic .modal-content,
body.vp-classic .dropdown-menu,
body.vp-classic .accordion-item,
body.vp-classic .offcanvas,
body.vp-classic .list-group-item,
body.vp-classic .table-responsive,
body.vp-classic .alert {
    border-radius: 0 !important;
    box-shadow: none !important;
}

body.vp-classic .card,
body.vp-classic .modal-content,
body.vp-classic .dropdown-menu,
body.vp-classic .accordion-item,
body.vp-classic .offcanvas {
    background: #f4f4f4;
    border: 1px solid #c8c8c8;
}

body.vp-classic .card-header,
body.vp-classic .modal-header,
body.vp-classic .accordion-button,
body.vp-classic .offcanvas-header {
    background: #e2e2e2 !important;
    color: #666666 !important;
    border-bottom: 1px solid #c8c8c8 !important;
}

body.vp-classic button:not(.btn-close),
body.vp-classic a.button,
body.vp-classic input[type="button"],
body.vp-classic input[type="submit"],
body.vp-classic .btn {
    border: 1px solid #b3b3b3 !important;
    border-radius: 0 !important;
    background: linear-gradient(180deg, #ffffff 0%, #dddddd 100%) !important;
    color: #5f5f5f !important;
    box-shadow: inset 0 1px 0 #ffffff !important;
}

body.vp-classic input[type="text"],
body.vp-classic input[type="email"],
body.vp-classic input[type="password"],
body.vp-classic input[type="number"],
body.vp-classic input[type="search"],
body.vp-classic input[type="url"],
body.vp-classic textarea,
body.vp-classic select,
body.vp-classic .form-control,
body.vp-classic .form-select {
    border: 1px solid #ababab !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    color: #4d4d4d !important;
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.08) !important;
}

body.vp-classic .table,
body.vp-classic table {
    color: #555555;
}

body.vp-classic .table > :not(caption) > * > *,
body.vp-classic table td,
body.vp-classic table th {
    border-color: #d7d7d7;
}

body.vp-classic .table thead th,
body.vp-classic .table thead td,
body.vp-classic table thead th,
body.vp-classic table thead td {
    background: #e2e2e2 !important;
    color: #666666 !important;
    border-bottom: 1px solid #c5c5c5 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

body.vp-classic .nav-tabs {
    border-bottom: 1px solid #bcbcbc;
}

body.vp-classic .nav-tabs .nav-link {
    border-radius: 0 !important;
    border: 1px solid #c0c0c0;
    background: #e7e7e7;
    color: #666666;
    box-shadow: none;
}

body.vp-classic .nav-tabs .nav-link.active,
body.vp-classic .nav-tabs .nav-item.show .nav-link {
    background: #ffffff;
    color: #111111;
    border-bottom-color: #ffffff;
}

body.vp-classic.has-elections-banner .app-sidebar {
    top: calc(var(--topbar-h) + var(--elections-banner-h));
}

body.vp-classic.has-elections-banner .app {
    height: calc(100vh - var(--topbar-h) - var(--elections-banner-h));
    margin-top: calc(var(--topbar-h) + var(--elections-banner-h));
}

body.vp-classic.has-elections-banner .chat-composer {
    left: var(--sidebar-w);
}

/* ========================================================
   MÓVIL (<768px) — Adaptación fiel del escritorio
   Misma estructura visual: bandera + chip + dropdowns + composer fijo
   ======================================================== */
@media (max-width: 767.98px) {
    body.vp-classic {
        --topbar-h: 54px;
        --sidebar-w: 164px;
        --subnav-w: 0px;
        --composer-h: 40px;
        --chat-font-size: 0.9rem;
    }

    /* ── Topbar: preservar bandera tricolor ── */
    body.vp-classic .app-topbar {
        height: var(--topbar-h);
    }
    body.vp-classic .app-topbar-stripes {
        flex: 0 0 var(--sidebar-w);
        width: var(--sidebar-w);
        height: var(--topbar-h);
    }
    body.vp-classic .app-topbar-main {
        height: var(--topbar-h);
        background-size: cover !important;
    }

    /* Mostrar chip "Estado de Polesia" */
    body.vp-classic .app-topbar-titlebar {
        display: block !important;
        left: 6px;
        top: 10px;
    }
    body.vp-classic .app-topbar-state-chip {
        max-width: calc(100vw - var(--sidebar-w) - 110px);
        min-height: 20px;
        padding: 0 5px 1px;
        font-size: 13px;
        line-height: 19px;
        border-radius: 5px;
    }

    /* User info compacto a la derecha */
    body.vp-classic .app-topbar-right {
        top: 7px;
        right: 3px;
        padding: 0 5px;
    }

    body.vp-classic .app-topbar-actions {
        gap: 0.2rem;
        font-size: 12px;
        line-height: 17px;
    }

    body.vp-classic .app-topbar-icon-link,
    body.vp-classic .app-topbar-actions > a[title="Opciones"]::before {
        font-size: 15px;
    }

    body.vp-classic .app-topbar-balance-icon,
    body.vp-classic .topbar-notifications-bell-icon {
        width: 15px;
        height: 15px;
    }

    /* Ocultar elementos no esenciales del topbar */
    body.vp-classic .app-topbar-actions > a[title="Opciones"],
    body.vp-classic .app-topbar-actions > .app-topbar-sep:nth-child(8),
    body.vp-classic .app-topbar-actions > .app-topbar-sep:nth-child(10),
    body.vp-classic .app-topbar-actions > a[href="/maxsim/auth/logout"] {
        display: none !important;
    }
    body.vp-classic .app-topbar-nick::after {
        display: none;
    }

    /* Ocultar topbar-left del tema base (hamburguesa) */
    body.vp-classic .app-topbar-left {
        display: none !important;
    }
    body.vp-classic .app-topbar-logo-link {
        display: none !important;
    }

    /* ── Sidebar: dropdowns como en escritorio ── */
    body.vp-classic .app-sidebar {
        width: var(--sidebar-w) !important;
        overflow: visible;
        z-index: 1000;
    }

    body.vp-classic .app-sidebar .scroll {
        overflow-y: auto;
        overflow-x: visible;
    }

    /* Dropdowns: ocultos hasta tap (JS añade .is-open) */
    body.vp-classic .app-sidebar-links {
        position: absolute;
        display: none;
        top: 0;
        left: calc(100% - 1px);
        z-index: 1250;
        width: 172px;
        padding: 3px 0;
        border: 1px solid #c8c8c8;
        background: #eeeeee;
        box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.12);
    }
    body.vp-classic .app-sidebar-group.is-open .app-sidebar-links {
        display: block;
    }

    body.vp-classic .app-sidebar-heading {
        min-height: 34px;
        padding: 5px 22px 4px 10px;
        font-size: 12px;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        user-select: none;
    }
    body.vp-classic .app-sidebar-heading::after {
        font-size: 16px;
        right: 6px;
    }
    body.vp-classic .app-sidebar-link {
        padding: 4px 7px 4px 10px;
        font-size: 11px;
        white-space: nowrap;
    }
    body.vp-classic .app-sidebar-mini-maps {
        display: none;
    }

    /* ── Layout ── */
    body.vp-classic .app,
    body.vp-classic .app-footer {
        margin-left: var(--sidebar-w) !important;
    }
    body.vp-classic .app-footer {
        left: var(--sidebar-w);
    }
    body.vp-classic .app {
        overflow: hidden;
    }

    /* ── Subnav: oculto, toggle con botón flotante ── */
    body.vp-classic .app-subnav {
        display: none !important;
    }
    body.vp-classic .app-subnav.is-visible {
        display: block !important;
        position: fixed;
        top: var(--topbar-h);
        right: 0;
        bottom: 0;
        width: 260px;
        max-width: 82vw;
        z-index: 1200;
        border-left: 2px solid #aaa;
        box-shadow: none;
        overflow-y: auto;
    }
    /* Botón para abrir/cerrar subnav */
    body.vp-classic .app-subnav-toggle {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: calc(var(--topbar-h) + 6px);
        right: 6px;
        z-index: 1190;
        width: 32px;
        height: 32px;
        padding: 0;
        border: 1px solid #bababa;
        border-radius: 6px;
        background: #f4f4f4;
        color: #666;
        font-size: 16px;
        cursor: pointer;
    }

    /* ── Chat ── */
    body.vp-classic .chat-line {
        font-size: var(--chat-font-size);
    }

    body.vp-classic .chat-legacy-crumb {
        min-width: auto;
        height: 28px;
        min-height: 28px;
        padding: 0 11px 0 13px;
        font-size: 10px;
    }

    body.vp-classic .chat-legacy-header,
    body.vp-classic .chat-legacy-breadcrumb {
        height: 28px;
        min-height: 28px;
        flex-basis: 28px;
    }

    /* ── Composer FIJO (como en escritorio) ── */
    body.vp-classic .chat-composer {
        position: fixed !important;
        left: var(--sidebar-w) !important;
        right: 0;
        bottom: 0;
        z-index: 1300;
        min-height: var(--composer-h);
        padding: 3px 5px;
    }

    /* ── Search bar FIJA (como en escritorio) ── */
    body.vp-classic .chat-search-bar {
        left: var(--sidebar-w) !important;
        bottom: var(--composer-h);
    }

    body.vp-classic .chat-messages,
    body.vp-classic #messages {
        padding-bottom: calc(var(--composer-h) + 0.75rem);
    }

    body.vp-classic .chat-composer #input_msg {
        height: 32px;
        min-height: 32px;
        font-size: 13px;
        padding: 3px 5px;
    }

    body.vp-classic .chat-composer .input-group-text {
        flex: 0 0 22px;
        width: 22px;
        min-width: 22px;
        height: 26px;
    }

    body.vp-classic .chat-composer .input-group-text::before {
        width: 13px;
        height: 13px;
    }

    body.vp-classic .chat-composer .btn-primary,
    body.vp-classic .chat-composer button[type="submit"] {
        flex: 0 0 50px;
        width: 50px;
        height: 32px;
        min-height: 32px;
        font-size: 12px;
    }

    body.vp-classic .chat-composer .input-group {
        gap: 3px;
    }

    /* ── Anular colapso mobile del tema base ── */
    body.vp-classic.mobile-sidebar-collapsed .app,
    body.vp-classic.mobile-sidebar-collapsed .app-footer,
    body.vp-classic.mobile-sidebar-collapsed .chat-composer {
        margin-left: var(--sidebar-w) !important;
        left: var(--sidebar-w) !important;
    }
    body.vp-classic.mobile-sidebar-collapsed .app-sidebar {
        width: var(--sidebar-w) !important;
    }

    body.vp-classic.mobile-sidebar-expanded .app-sidebar {
        width: var(--sidebar-w) !important;
    }

    /* ── Tablas responsive ── */
    body.vp-classic .app-main {
        overflow-x: auto;
    }

    body.vp-classic .table {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* ── Ocultar badge maxsim ── */
    body.vp-classic .maxsim-badge {
        display: none !important;
    }
}

@media (min-width: 992px) {
    body.vp-classic {
        overflow: hidden;
    }
}

/* ── Desktop: padding más ajustado (ratón preciso, hover disponible) ── */
@media (hover: hover) and (pointer: fine) {
    body.vp-classic .chat-messages,
    body.vp-classic #messages {
        padding-bottom: calc(var(--composer-h) + 0.75rem);
    }
}
