/* VitalHealth Tareas — UI minimalista */
:root {
    --vh-black: #0a0a0a;
    --vh-white: #ffffff;
    --vh-bg: #f5f5f4;
    --vh-surface: #ffffff;
    --vh-sidebar: #0f1a17;
    --vh-sidebar-border: #1e2e28;
    --vh-sidebar-text: #a8b5af;
    --vh-sidebar-text-active: #ffffff;
    --vh-accent: #2d4a3e;
    --vh-accent-hover: #3d6b58;
    --vh-accent-muted: rgba(45, 74, 62, 0.12);
    --vh-navy: #152238;
    --vh-border: #e8e8e6;
    --vh-border-strong: #d4d4d2;
    --vh-muted: #6b6b6b;
    --vh-text: #141414;
    --vh-radius: 10px;
    --vh-radius-sm: 6px;
    --vh-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    --vh-shadow-md: 0 4px 24px rgba(0, 0, 0, 0.06);
    --vh-sidebar-width: 260px;
    --vh-font: 'DM Sans', system-ui, -apple-system, sans-serif;
    --vh-transition: 0.2s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body.vh-app {
    margin: 0;
    font-family: var(--vh-font);
    font-size: 0.9375rem;
    color: var(--vh-text);
    background: var(--vh-bg);
    -webkit-font-smoothing: antialiased;
}

/* ——— Shell & Sidebar ——— */
.vh-shell {
    display: flex;
    min-height: 100vh;
}

.vh-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    width: var(--vh-sidebar-width);
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    background: var(--vh-sidebar);
    border-right: 1px solid var(--vh-sidebar-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform var(--vh-transition);
}

.vh-sidebar__brand {
    flex-shrink: 0;
    padding: 1.5rem 1.25rem 1.25rem;
    border-bottom: 1px solid var(--vh-sidebar-border);
}

.vh-brand {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--vh-white);
    text-decoration: none;
    letter-spacing: -0.02em;
    line-height: 1.35;
    display: block;
    word-break: break-word;
}

.vh-brand:hover {
    color: var(--vh-white);
    opacity: 0.92;
}

.vh-sidebar__label {
    display: block;
    padding: 1.25rem 1.25rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--vh-sidebar-text);
    opacity: 0.6;
}

.vh-sidebar__nav {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0 0.75rem;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.vh-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    margin-bottom: 2px;
    border-radius: var(--vh-radius-sm);
    color: var(--vh-sidebar-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background var(--vh-transition), color var(--vh-transition);
}

.vh-nav-link i {
    font-size: 1.1rem;
    width: 1.25rem;
    text-align: center;
    opacity: 0.85;
}

.vh-nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--vh-sidebar-text-active);
}

.vh-nav-link.active {
    background: var(--vh-accent);
    color: var(--vh-white);
}

.vh-nav-link.active i {
    opacity: 1;
}

.vh-sidebar__footer {
    flex-shrink: 0;
    margin-top: auto;
    padding: 1rem 0.75rem 1.25rem;
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--vh-sidebar-border);
    background: var(--vh-sidebar);
}

.vh-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.5rem 0.85rem 0.85rem;
    margin: 0;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    border-radius: var(--vh-radius-sm);
    transition: background var(--vh-transition);
}

.vh-user:hover {
    background: rgba(255, 255, 255, 0.06);
}

.vh-user__chevron {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--vh-sidebar-text);
    opacity: 0.6;
}

.vh-user__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--vh-accent);
    color: var(--vh-white);
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vh-user__info {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.vh-user__name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--vh-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vh-user__role {
    font-size: 0.75rem;
    color: var(--vh-sidebar-text);
}

.vh-nav-link--logout {
    color: var(--vh-sidebar-text);
    font-size: 0.85rem;
}

.vh-nav-link--logout:hover {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
}

.vh-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1035;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity var(--vh-transition);
}

.vh-sidebar-backdrop.is-visible {
    display: block;
    opacity: 1;
}

/* ——— Main content ——— */
.vh-main {
    flex: 1;
    margin-left: var(--vh-sidebar-width);
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.vh-topbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.75rem;
    background: var(--vh-surface);
    border-bottom: 1px solid var(--vh-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.vh-topbar__actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vh-topbar__toggle {
    display: none;
    border: 1px solid var(--vh-border);
    background: var(--vh-white);
    border-radius: var(--vh-radius-sm);
    width: 40px;
    height: 40px;
    padding: 0;
    align-items: center;
    justify-content: center;
    color: var(--vh-text);
    cursor: pointer;
}

.vh-topbar__toggle:hover {
    background: var(--vh-bg);
}

.vh-topbar__title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--vh-black);
}

.vh-content {
    flex: 1;
    padding: 1.5rem 1.75rem 2rem;
}

/* ——— Page header ——— */
.vh-page-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.vh-page-header h2 {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--vh-black);
}

.vh-page-header p {
    margin: 0;
    color: var(--vh-muted);
    font-size: 0.9rem;
}

.vh-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.vh-export-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
}

.vh-export-panel {
    padding: 1.15rem 1.25rem;
    border: 1px solid var(--vh-border);
    background: linear-gradient(135deg, var(--vh-accent-muted) 0%, var(--vh-surface) 45%);
}

.vh-export-panel__header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.vh-export-panel__title-wrap {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.vh-export-panel__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    background: var(--vh-accent);
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.vh-export-panel__title {
    margin: 0 0 0.15rem;
    font-size: 1rem;
    font-weight: 700;
}

.vh-export-panel__subtitle {
    font-size: 0.8125rem;
    color: var(--vh-muted);
}

.vh-export-panel__modes {
    display: inline-flex;
    padding: 0.2rem;
    border-radius: var(--vh-radius);
    background: var(--vh-bg);
    border: 1px solid var(--vh-border);
    gap: 0.2rem;
}

.vh-export-panel__mode {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    border: none;
    border-radius: calc(var(--vh-radius-sm) + 2px);
    background: transparent;
    color: var(--vh-muted);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--vh-transition), color var(--vh-transition);
}

.vh-export-panel__mode.is-active {
    background: var(--vh-surface);
    color: var(--vh-accent);
    box-shadow: var(--vh-shadow);
}

.vh-export-panel__body {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.vh-export-panel__pane {
    flex: 1 1 18rem;
    min-width: min(100%, 16rem);
}

.vh-export-panel__field {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.85rem;
    background: var(--vh-surface);
    border: 1px solid var(--vh-border);
    border-radius: var(--vh-radius);
    box-shadow: var(--vh-shadow);
}

.vh-export-panel__field:focus-within {
    border-color: var(--vh-accent);
    box-shadow: 0 0 0 3px var(--vh-accent-muted);
}

.vh-export-panel__field > i {
    color: var(--vh-accent);
    font-size: 1rem;
    flex-shrink: 0;
}

.vh-export-panel__input {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    background: transparent !important;
    font-weight: 500;
    color: var(--vh-text);
}

.vh-export-panel__input:focus {
    outline: none;
}

.vh-export-panel__hint {
    margin: 0.45rem 0 0;
    font-size: 0.75rem;
    color: var(--vh-muted);
}

.vh-export-panel__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex-shrink: 0;
}

@media (max-width: 767.98px) {
    .vh-export-panel__body {
        flex-direction: column;
        align-items: stretch;
    }

    .vh-export-panel__actions {
        width: 100%;
    }

    .vh-export-panel__actions .btn {
        flex: 1 1 auto;
        justify-content: center;
    }
}

/* ——— Cards & panels ——— */
.card-panel,
.stat-card {
    background: var(--vh-surface);
    border: 1px solid var(--vh-border);
    border-radius: var(--vh-radius);
    box-shadow: var(--vh-shadow);
}

.card-panel .card-header {
    background: transparent;
    border-bottom: 1px solid var(--vh-border);
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.card-panel .card-body {
    padding: 1.25rem;
}

.stat-card {
    transition: border-color var(--vh-transition), box-shadow var(--vh-transition);
}

.stat-card:hover {
    border-color: var(--vh-border-strong);
    box-shadow: var(--vh-shadow-md);
}

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--vh-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    background: var(--vh-accent-muted);
    color: var(--vh-accent);
}

.stat-card .text-muted {
    font-size: 0.8125rem;
    color: var(--vh-muted) !important;
}

.stat-card .fs-3 {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--vh-black);
}

/* ——— Buttons (override Bootstrap in app) ——— */
.vh-app .btn-primary {
    --bs-btn-bg: var(--vh-accent);
    --bs-btn-border-color: var(--vh-accent);
    --bs-btn-hover-bg: var(--vh-accent-hover);
    --bs-btn-hover-border-color: var(--vh-accent-hover);
    --bs-btn-active-bg: var(--vh-navy);
    --bs-btn-active-border-color: var(--vh-navy);
    font-weight: 600;
    border-radius: var(--vh-radius-sm);
    padding: 0.5rem 1rem;
}

.vh-app .btn-outline-primary {
    --bs-btn-color: var(--vh-accent);
    --bs-btn-border-color: var(--vh-border-strong);
    --bs-btn-hover-bg: var(--vh-accent);
    --bs-btn-hover-border-color: var(--vh-accent);
    font-weight: 500;
    border-radius: var(--vh-radius-sm);
}

.vh-app .btn-outline-secondary,
.vh-app .btn-outline-warning,
.vh-app .btn-light {
    border-radius: var(--vh-radius-sm);
    font-weight: 500;
}

.vh-app .btn-ghost {
    background: transparent;
    border: 1px solid var(--vh-border);
    color: var(--vh-text);
    font-weight: 500;
    border-radius: var(--vh-radius-sm);
    padding: 0.45rem 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.875rem;
    transition: background var(--vh-transition), border-color var(--vh-transition);
}

.vh-app .btn-ghost:hover {
    background: var(--vh-bg);
    border-color: var(--vh-border-strong);
    color: var(--vh-black);
}

.vh-app .btn-ghost--accent {
    border-color: var(--vh-accent);
    color: var(--vh-accent);
}

.vh-app .btn-ghost--accent:hover {
    background: var(--vh-accent-muted);
    color: var(--vh-accent-hover);
}

/* ——— Tables ——— */
.vh-app .table {
    --bs-table-bg: transparent;
    font-size: 0.9rem;
}

.vh-app .table thead th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--vh-muted);
    border-bottom: 1px solid var(--vh-border);
    background: var(--vh-bg);
    padding: 0.75rem 1rem;
}

.vh-app .table tbody td {
    padding: 0.85rem 1rem;
    border-color: var(--vh-border);
    vertical-align: middle;
}

.vh-app .table-hover tbody tr:hover {
    background: var(--vh-accent-muted);
}

.task-row-link {
    cursor: pointer;
    transition: background var(--vh-transition);
}

/* ——— Badges ——— */
.vh-badge {
    display: inline-block;
    padding: 0.28em 0.65em;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    letter-spacing: 0.01em;
}

.vh-status--abierta { background: #f0f0ef; color: #525252; }
.vh-status--en_progreso { background: #e8eeec; color: var(--vh-accent); }
.vh-status--pendiente_aprobacion { background: #f5f0e6; color: #7c5e10; }
.vh-status--finalizada { background: var(--vh-accent-muted); color: var(--vh-accent-hover); }

.vh-priority--baja { background: #e5e5e5; color: #525252; }
.vh-priority--media { background: #fef3c7; color: #92400e; }
.vh-priority--urgente { background: #fee2e2; color: #b91c1c; }

.vh-role--owner {
    background: #1a1a1a;
    color: #fff;
}

.vh-protected {
    background: #f5f5f4;
    color: var(--vh-muted);
    font-weight: 500;
    font-size: 0.6875rem;
}

/* Modal Mi cuenta — estilo tarjetas con avatar */
.vh-profile-modal__dialog {
    max-width: 520px;
    width: calc(100% - 2rem);
}

.vh-profile-modal__content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    padding: 1.75rem 1.5rem 1.5rem;
    position: relative;
}

.vh-profile-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    opacity: 0.45;
}

.vh-profile-modal__form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.vh-profile-modal__avatar-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.vh-profile-modal__avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(145deg, #e8eeec 0%, #d4e0db 100%);
    color: var(--vh-accent);
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--vh-white);
    box-shadow: 0 4px 16px rgba(45, 74, 62, 0.15);
}

.vh-profile-modal__title {
    text-align: center;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--vh-black);
    margin: 0 0 1.25rem;
    letter-spacing: -0.02em;
}

.vh-profile-field {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    width: 100%;
    padding: 0.85rem 1rem;
    margin-bottom: 0.65rem;
    background: var(--vh-white);
    border: 1px solid var(--vh-border);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    text-align: left;
}

.vh-profile-field--static {
    cursor: default;
}

.vh-profile-field--input {
    margin-bottom: 0;
    cursor: text;
    transition: border-color var(--vh-transition), box-shadow var(--vh-transition);
}

.vh-profile-field--input:focus-within {
    border-color: var(--vh-accent);
    box-shadow: 0 0 0 3px var(--vh-accent-muted);
}

.vh-profile-field__icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--vh-accent-muted);
    color: var(--vh-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.vh-profile-field__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.vh-profile-field__label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--vh-muted);
}

.vh-profile-field__value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--vh-black);
    line-height: 1.3;
    word-break: break-word;
}

.vh-profile-field__input {
    width: 100%;
    border: none;
    padding: 0;
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--vh-black);
    background: transparent;
    outline: none;
    font-family: var(--vh-font);
}

.vh-profile-field__input::placeholder {
    color: #c4c4c4;
    font-weight: 400;
}

.vh-profile-modal__passwords {
    width: 100%;
    margin-top: 0.35rem;
    margin-bottom: 1rem;
}

.vh-profile-modal__passwords .vh-profile-field {
    height: 100%;
    margin-bottom: 0;
}

.vh-profile-modal__passwords .vh-profile-field__label {
    font-size: 0.6875rem;
    line-height: 1.25;
    white-space: normal;
}

.vh-profile-modal__submit {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 12px;
    background: var(--vh-accent);
    color: var(--vh-white);
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: var(--vh-font);
    cursor: pointer;
    transition: background var(--vh-transition), transform 0.15s ease;
    box-shadow: 0 4px 14px rgba(45, 74, 62, 0.25);
}

.vh-profile-modal__submit:hover {
    background: var(--vh-accent-hover);
}

.vh-profile-modal__submit:active {
    transform: scale(0.99);
}

/* Cerrar sesión en modal — solo visible en móvil (ver media query) */
.vh-profile-modal__logout-wrap {
    display: none;
    width: 100%;
    margin-top: 1rem;
    padding-top: 0.25rem;
}

.vh-profile-modal .vh-profile-modal__logout,
.vh-profile-modal .vh-profile-modal__logout:link,
.vh-profile-modal .vh-profile-modal__logout:visited {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 48px;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid #fecaca;
    background-color: #fef2f2;
    color: #dc2626 !important;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: var(--vh-font);
    line-height: 1.25;
    text-align: center;
    text-decoration: none !important;
    -webkit-text-decoration: none !important;
    cursor: pointer;
    transition: background-color var(--vh-transition), border-color var(--vh-transition), color var(--vh-transition);
}

.vh-profile-modal .vh-profile-modal__logout:hover,
.vh-profile-modal .vh-profile-modal__logout:focus,
.vh-profile-modal .vh-profile-modal__logout:active {
    background-color: #fee2e2;
    border-color: #f87171;
    color: #b91c1c !important;
    text-decoration: none !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.vh-profile-modal .vh-profile-modal__logout i {
    font-size: 1.1rem;
    line-height: 1;
}

@media (max-width: 480px) {
    .vh-profile-modal__passwords .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ——— Progress & bars ——— */
.progress-thin {
    height: 4px;
    border-radius: 2px;
    background: var(--vh-border);
}

.vh-progress--abierta { background: #9ca3af; }
.vh-progress--en_progreso { background: var(--vh-accent); }
.vh-progress--pendiente_aprobacion { background: #a68b4b; }
.vh-progress--finalizada { background: var(--vh-accent-hover); }

.area-bar {
    height: 4px;
    border-radius: 2px;
    background: var(--vh-border);
    overflow: hidden;
}

.area-bar-fill {
    height: 100%;
    background: var(--vh-accent);
    border-radius: 2px;
    transition: width 0.4s ease;
}

/* ——— Forms ——— */
.vh-app .form-control,
.vh-app .form-select {
    border-radius: var(--vh-radius-sm);
    border-color: var(--vh-border-strong);
    padding: 0.55rem 0.85rem;
    font-size: 0.9rem;
}

.vh-app .form-control:focus,
.vh-app .form-select:focus {
    border-color: var(--vh-accent);
    box-shadow: 0 0 0 3px var(--vh-accent-muted);
}

.vh-app .form-label {
    font-weight: 500;
    font-size: 0.8125rem;
    color: var(--vh-text);
    margin-bottom: 0.35rem;
}

.vh-app .input-group-text {
    background: var(--vh-bg);
    border-color: var(--vh-border-strong);
    color: var(--vh-muted);
}

/* ——— Alerts ——— */
.vh-alert {
    border-radius: var(--vh-radius-sm);
    border-width: 1px;
    font-size: 0.9rem;
}

.vh-alert--success {
    background: #f4f9f6;
    border-color: #c5d9ce;
    color: var(--vh-accent);
}

.vh-alert--danger {
    background: #fafafa;
    border-color: #e5e5e5;
    color: #991b1b;
}

/* ——— Comments & timeline ——— */
.comment-bubble {
    background: var(--vh-bg);
    border: 1px solid var(--vh-border);
    border-radius: var(--vh-radius-sm);
    padding: 0.85rem 1rem;
    border-left: 3px solid var(--vh-accent);
}

.timeline-item {
    position: relative;
    padding-left: 1.25rem;
    padding-bottom: 1rem;
    border-left: 1px solid var(--vh-border);
    margin-left: 0.35rem;
}

.timeline-item:last-child {
    border-left-color: transparent;
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 6px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--vh-accent);
}

/* Detalle de tarea */
.vh-task-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.875rem;
    color: var(--vh-muted);
    text-decoration: none;
    margin-bottom: 1rem;
    font-weight: 500;
}

.vh-task-back:hover {
    color: var(--vh-accent);
}

.vh-task-hero {
    padding: 1.5rem 1.5rem 1.25rem;
}

.vh-task-hero__top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--vh-border);
}

.vh-task-hero__id {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--vh-muted);
    margin-bottom: 0.35rem;
}

.vh-task-hero__title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--vh-black);
    line-height: 1.25;
}

.vh-task-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.vh-task-action-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.25rem;
    padding: 1rem 1.15rem;
    border-radius: var(--vh-radius-lg);
    border: 1px solid #bfdbfe;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
    box-shadow: 0 8px 24px rgba(29, 78, 216, 0.08);
}

.vh-task-action-bar__info {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    min-width: min(100%, 18rem);
}

.vh-task-action-bar__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    background: #1d4ed8;
    color: #fff;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.vh-task-action-bar__title {
    margin: 0 0 0.15rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e3a8a;
}

.vh-task-action-bar__text {
    margin: 0;
    font-size: 0.8125rem;
    color: #475569;
    line-height: 1.45;
}

.vh-task-action-bar__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-left: auto;
}

.vh-task-action-bar__approve-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
    min-width: min(100%, 16rem);
}

.vh-task-action-bar__comment-label {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
}

.vh-task-action-bar__comment {
    font-size: 0.8125rem;
    border-radius: 8px;
    border: 1px solid #bfdbfe;
    resize: vertical;
    min-height: 2.5rem;
}

.vh-task-action-bar__comment:focus {
    border-color: var(--vh-accent);
    box-shadow: 0 0 0 3px var(--vh-accent-muted);
}

.vh-task-action-bar__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: 10px;
    border: none;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--vh-transition), box-shadow var(--vh-transition);
}

.vh-task-action-bar__btn:hover {
    transform: translateY(-1px);
}

.vh-task-action-bar__btn--approve {
    background: #16a34a;
    color: #fff;
    box-shadow: 0 6px 16px rgba(22, 163, 74, 0.25);
}

.vh-task-action-bar__btn--approve:hover {
    background: #15803d;
}

.vh-task-action-bar__btn--correct {
    background: #fff;
    color: #b91c1c;
    border: 1px solid #fecaca;
    box-shadow: 0 4px 12px rgba(185, 28, 28, 0.08);
}

.vh-task-action-bar__btn--correct:hover {
    background: #fef2f2;
}

.vh-task-reopen {
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--vh-border);
    box-shadow: var(--vh-shadow-md);
}

.vh-task-reopen__body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.25rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(90deg, var(--vh-accent-muted) 0%, var(--vh-surface) 42%);
    border-left: 4px solid var(--vh-accent);
}

.vh-task-reopen__info {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    flex: 1 1 16rem;
    min-width: 0;
}

.vh-task-reopen__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--vh-radius);
    background: var(--vh-surface);
    color: var(--vh-accent);
    font-size: 1.05rem;
    box-shadow: var(--vh-shadow);
    flex-shrink: 0;
}

.vh-task-reopen__title {
    margin: 0 0 0.2rem;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--vh-text);
}

.vh-task-reopen__text {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--vh-muted);
    line-height: 1.45;
}

.vh-task-reopen__text strong {
    color: var(--vh-accent);
    font-weight: 600;
}

.vh-task-reopen__form {
    flex-shrink: 0;
}

.vh-task-reopen__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--vh-radius);
}

.vh-task-meta--past-due .vh-task-meta__value {
    color: #b91c1c;
    font-weight: 700;
}

.vh-task-meta--past-due {
    border-color: #fecaca;
    background: #fef2f2;
}

.vh-task-meta--due-today .vh-task-meta__value {
    color: #c2410c;
    font-weight: 700;
}

.vh-task-meta--due-today {
    border-color: #fed7aa;
    background: #fff7ed;
}

.vh-task-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (min-width: 992px) {
    .vh-task-meta-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 575.98px) {
    .vh-task-meta-grid {
        grid-template-columns: 1fr;
    }

    .vh-task-reopen__body {
        flex-direction: column;
        align-items: stretch;
    }

    .vh-task-reopen__btn {
        width: 100%;
        justify-content: center;
    }

    .vh-task-approvals__row {
        flex-direction: column;
        align-items: stretch;
    }

    .vh-task-approvals__finalize-form {
        margin-left: 0;
    }

    .vh-task-approvals__finalize-btn {
        width: 100%;
        justify-content: center;
    }
}

.vh-task-meta {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: var(--vh-bg);
    border: 1px solid var(--vh-border);
    border-radius: var(--vh-radius-sm);
}

.vh-task-meta__icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--vh-accent-muted);
    color: var(--vh-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.vh-task-meta__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.vh-task-meta__label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--vh-muted);
}

.vh-task-meta__value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--vh-black);
    line-height: 1.3;
    word-break: break-word;
}

.vh-task-meta__sub {
    font-size: 0.75rem;
    color: var(--vh-muted);
    font-weight: 400;
}

.vh-task-approvals {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--vh-border);
}

.vh-task-approvals__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
}

.vh-task-approvals__pills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.vh-task-approvals__finalize-form {
    flex-shrink: 0;
    margin-left: auto;
}

.vh-task-approvals__finalize-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border: none;
    border-radius: var(--vh-radius);
    background: #dc2626;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--vh-transition), box-shadow var(--vh-transition);
}

.vh-task-approvals__finalize-btn:hover {
    background: #b91c1c;
    color: #fff;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.28);
}

.vh-task-approval-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 100px;
    background: var(--vh-white);
    border: 1px solid var(--vh-border);
    color: var(--vh-muted);
}

.vh-task-approval-pill.is-done {
    background: var(--vh-accent-muted);
    border-color: transparent;
    color: var(--vh-accent);
}

.vh-task-description {
    padding: 1.25rem 1.5rem;
}

.vh-task-description__heading {
    margin: 0 0 0.85rem;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--vh-muted);
}

.vh-task-description__body {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--vh-text);
    margin: 0;
}

/* Panel gestión admin en tarea */
.vh-task-admin {
    padding: 1.35rem 1.5rem;
}

.vh-task-admin__header {
    margin-bottom: 1.25rem;
}

.vh-task-admin__title {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vh-task-admin__hint {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--vh-muted);
}

.vh-field-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--vh-muted);
    margin-bottom: 0.4rem;
}

.vh-field-box {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 0.85rem;
    background: var(--vh-bg);
    border: 1px solid var(--vh-border);
    border-radius: var(--vh-radius-sm);
}

.vh-field-box > i {
    color: var(--vh-accent);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.vh-field-box--textarea {
    align-items: flex-start;
    padding-top: 0.65rem;
}

.vh-field-box--textarea > i {
    margin-top: 0.35rem;
}

.vh-field-box .form-select,
.vh-field-box .form-control {
    background: transparent;
    padding-left: 0;
}

.vh-task-admin__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 1rem;
    padding: 0.7rem 1rem;
    border: none;
    border-radius: var(--vh-radius-sm);
    background: var(--vh-accent);
    color: var(--vh-white);
    font-weight: 600;
    font-family: var(--vh-font);
    cursor: pointer;
    transition: background var(--vh-transition);
}

.vh-task-admin__submit:hover {
    background: var(--vh-accent-hover);
}

.vh-task-admin__divider {
    height: 1px;
    background: var(--vh-border);
    margin: 1.25rem 0;
}

.vh-assignee-picker {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.vh-assignee-picker__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    min-height: 2rem;
    align-items: center;
}

.vh-assignee-picker__empty {
    font-size: 0.8125rem;
    color: var(--vh-muted);
}

.vh-assignee-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.55rem 0.3rem 0.75rem;
    border: none;
    border-radius: 999px;
    background: var(--vh-accent-muted);
    color: var(--vh-accent);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background var(--vh-transition), color var(--vh-transition);
}

.vh-assignee-chip:hover {
    background: var(--vh-accent);
    color: #fff;
}

.vh-assignee-chip i {
    font-size: 0.65rem;
    opacity: 0.85;
}

.vh-assignee-picker__search .form-control {
    font-size: 0.875rem;
}

.vh-assignee-picker__list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 220px;
    overflow-y: auto;
    padding: 0.35rem;
    border: 1px solid var(--vh-border);
    border-radius: var(--vh-radius-sm);
    background: var(--vh-white);
}

.vh-assignee-picker__option {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0;
    padding: 0.55rem 0.65rem;
    border-radius: var(--vh-radius-sm);
    cursor: pointer;
    transition: background var(--vh-transition);
    user-select: none;
}

.vh-assignee-picker__option:hover {
    background: var(--vh-bg);
}

.vh-assignee-picker__option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.vh-assignee-picker__box {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--vh-border);
    border-radius: 0.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: transparent;
    font-size: 0.85rem;
    transition: border-color var(--vh-transition), background var(--vh-transition), color var(--vh-transition);
}

.vh-assignee-picker__option input:checked + .vh-assignee-picker__box {
    background: var(--vh-accent);
    border-color: var(--vh-accent);
    color: #fff;
}

.vh-assignee-picker__option input:focus-visible + .vh-assignee-picker__box {
    outline: 2px solid var(--vh-accent);
    outline-offset: 2px;
}

.vh-assignee-picker__name {
    font-size: 0.9375rem;
    color: var(--vh-text);
}

.vh-assignee-picker__hint {
    margin: 0;
    font-size: 0.75rem;
    color: var(--vh-muted);
}

/* Feed de actividad */
.vh-activity-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.vh-activity-card__header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--vh-border);
}

.vh-activity-card__title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--vh-black);
}

.vh-activity-card__subtitle {
    font-size: 0.8125rem;
    color: var(--vh-muted);
}

/* Layout detalle tarea: columna derecha fija al scroll */
.vh-task-layout {
    align-items: flex-start;
}

.vh-task-layout__main {
    min-width: 0;
}

.vh-task-layout__aside {
    min-width: 0;
}

.vh-activity-sticky {
    position: sticky;
    top: 5.25rem;
    z-index: 10;
}

.vh-activity-sticky .vh-activity-card {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 6.5rem);
}

.vh-activity-sticky .vh-activity-card__body {
    flex: 1;
    min-height: 120px;
    overflow-y: auto;
}

@media (max-width: 991.98px) {
    .vh-activity-sticky {
        position: static;
        max-height: none;
        margin-bottom: 1rem;
    }

    .vh-activity-sticky .vh-activity-card {
        max-height: none;
    }

}

.vh-activity-card__body {
    padding: 0.75rem 1rem 0.5rem;
    max-height: 420px;
    overflow-y: auto;
}

.vh-activity-sticky .vh-activity-card__body {
    max-height: none;
}

.vh-activity-card__body--full {
    max-height: none;
    padding: 1rem 1.25rem 1.25rem;
}

.vh-activity-card__footer {
    padding: 0.75rem 1.25rem 1rem;
    border-top: 1px solid var(--vh-border);
}

.vh-activity-card__link {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--vh-accent);
    text-decoration: none;
}

.vh-activity-card__link:hover {
    color: var(--vh-accent-hover);
    text-decoration: underline;
}

.vh-activity-feed {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.vh-activity-item {
    display: flex;
    gap: 0.85rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--vh-border);
}

.vh-activity-item:last-child {
    border-bottom: none;
    padding-bottom: 0.25rem;
}

.vh-activity-item__icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--vh-accent-muted);
    color: var(--vh-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.vh-activity-item__body {
    flex: 1;
    min-width: 0;
}

.vh-activity-item__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.15rem;
}

.vh-activity-item__title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--vh-black);
}

.vh-activity-item__time {
    font-size: 0.6875rem;
    color: var(--vh-muted);
    white-space: nowrap;
}

.vh-activity-item__user {
    margin: 0 0 0.2rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--vh-muted);
}

.vh-activity-item__message {
    margin: 0 0 0.35rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--vh-text);
}

.vh-activity-item__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.15rem;
}

.vh-activity-item__chip,
.vh-activity-item__status {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.28rem 0.55rem;
    border-radius: 6px;
    background: var(--vh-bg);
    color: var(--vh-text);
    border: 1px solid var(--vh-border);
    line-height: 1.3;
}

.vh-activity-feed__empty {
    margin: 0;
    padding: 1rem 0;
    text-align: center;
    font-size: 0.875rem;
    color: var(--vh-muted);
}

/* Dashboard — bloque secundario (usuarios al final) */
.vh-card-secondary {
    opacity: 0.95;
}

.vh-card-secondary .card-header {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    font-size: 0.8125rem;
}

.vh-user-stat {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.vh-user-stat__value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--vh-black);
    letter-spacing: -0.02em;
}

.vh-user-stat__label {
    font-size: 0.75rem;
    color: var(--vh-muted);
    font-weight: 500;
}

/* Filter pills */
.vh-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
}

.vh-filter-pill {
    padding: 0.4rem 0.85rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 100px;
    border: 1px solid var(--vh-border);
    background: var(--vh-white);
    color: var(--vh-muted);
    text-decoration: none;
    transition: all var(--vh-transition);
}

.vh-filter-pill:hover {
    border-color: var(--vh-border-strong);
    color: var(--vh-black);
}

.vh-filter-pill.active {
    background: var(--vh-black);
    border-color: var(--vh-black);
    color: var(--vh-white);
}

.vh-filter-pill--priority.vh-filter-pill--baja.active {
    background: #525252;
    border-color: #525252;
}

.vh-filter-pill--priority.vh-filter-pill--media.active {
    background: #92400e;
    border-color: #92400e;
}

.vh-filter-pill--priority.vh-filter-pill--urgente.active {
    background: #b91c1c;
    border-color: #b91c1c;
}

.vh-task-list-toolbar {
    padding: 1.15rem 1.25rem;
}

.vh-task-list-toolbar__form .vh-field-box {
    padding: 0.45rem 0.75rem;
}

.vh-task-list-toolbar__form .vh-field-box .form-control {
    font-size: 0.875rem;
}

.vh-area-extra,
.vh-cm-fields {
    padding: 0.25rem 0 0.5rem;
    margin-bottom: 0.25rem;
    border-left: 3px solid var(--vh-accent, #3d4f3f);
    padding-left: 1rem;
}

.vh-attachment-list__item + .vh-attachment-list__item {
    margin-top: 0.5rem;
}

.vh-attachment-list__link {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--vh-border);
    border-radius: var(--vh-radius-sm);
    background: var(--vh-white);
    text-decoration: none;
    color: inherit;
    transition: border-color var(--vh-transition), box-shadow var(--vh-transition);
}

.vh-attachment-list__link:hover {
    border-color: var(--vh-accent);
    box-shadow: var(--vh-shadow-md);
    color: inherit;
}

.vh-attachment-list__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--vh-accent-muted);
    color: var(--vh-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vh-attachment-list__name {
    display: block;
    font-weight: 600;
    color: var(--vh-text);
    word-break: break-word;
}

.vh-attachment-list__meta {
    display: block;
    font-size: 0.8125rem;
    color: var(--vh-muted);
    margin-top: 0.15rem;
}

.vh-attachment-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.vh-attachment-card {
    position: relative;
    width: 132px;
    border: 1px solid var(--vh-border);
    border-radius: var(--vh-radius-sm);
    background: var(--vh-white);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.vh-attachment-card__delete-form {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    z-index: 2;
}

.vh-attachment-card__delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #b91c1c;
    box-shadow: var(--vh-shadow);
    cursor: pointer;
    font-size: 0.8rem;
    transition: background var(--vh-transition), color var(--vh-transition), transform var(--vh-transition);
}

.vh-attachment-card__delete:hover {
    background: #fef2f2;
    color: #991b1b;
    transform: scale(1.04);
}

.vh-attachment-card__thumb {
    display: block;
    width: 100%;
    height: 96px;
    padding: 0;
    margin: 0;
    border: none;
    background: #eef0ee;
    overflow: hidden;
    position: relative;
    cursor: zoom-in;
}

.vh-attachment-card__thumb img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 96px;
    object-fit: cover;
    display: block;
    transition: transform var(--vh-transition);
}

.vh-attachment-card__thumb:hover img {
    transform: scale(1.05);
}

.vh-attachment-card__zoom {
    position: absolute;
    right: 0.35rem;
    bottom: 0.35rem;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--vh-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    pointer-events: none;
}

.vh-attachment-card__file {
    width: 100%;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--vh-accent-muted);
    color: var(--vh-accent);
    font-size: 1.75rem;
    text-decoration: none;
    transition: background var(--vh-transition);
}

.vh-attachment-card__file:hover {
    background: var(--vh-accent);
    color: #fff;
}

.vh-attachment-card__file--locked {
    cursor: not-allowed;
    color: #9ca3af;
    background: #f3f4f6;
}

.vh-attachment-card__name:not(a):not(button) {
    display: block;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--vh-muted);
}

.vh-attachment-card__body {
    padding: 0.5rem 0.55rem 0.6rem;
}

.vh-attachment-card__name {
    display: block;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--vh-text);
    text-decoration: none;
    word-break: break-word;
    line-height: 1.3;
    text-align: left;
}

.vh-attachment-card__name--btn {
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}

.vh-attachment-card__name:hover,
.vh-attachment-card__name--btn:hover {
    color: var(--vh-accent);
}

.vh-attachment-card__meta {
    display: block;
    font-size: 0.6875rem;
    color: var(--vh-muted);
    margin-top: 0.25rem;
    line-height: 1.35;
}

.vh-attachment-modal__body {
    position: relative;
    padding: 0.75rem 3.25rem;
    background: #f3f4f2;
    text-align: center;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vh-attachment-modal__header {
    align-items: center;
    gap: 0.75rem;
}

.vh-attachment-modal__title-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    flex: 1 1 auto;
}

.vh-attachment-modal__counter {
    font-size: 0.75rem;
    color: var(--vh-muted);
    font-weight: 600;
}

.vh-attachment-modal__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--vh-accent);
    box-shadow: var(--vh-shadow-md);
    cursor: pointer;
    z-index: 2;
    transition: background var(--vh-transition), transform var(--vh-transition);
}

.vh-attachment-modal__nav:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.05);
}

.vh-attachment-modal__nav--prev {
    left: 0.75rem;
}

.vh-attachment-modal__nav--next {
    right: 0.75rem;
}

.vh-attachment-modal__img {
    max-width: 100%;
    max-height: min(70vh, 720px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--vh-radius-sm);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.vh-attachment-modal .modal-footer {
    justify-content: space-between;
}

/* Login */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--vh-bg);
    font-family: var(--vh-font);
    padding: 1.5rem;
}

.login-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 900px;
    width: 100%;
    min-height: 520px;
    background: var(--vh-white);
    border: 1px solid var(--vh-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--vh-shadow-md);
}

.login-brand-panel {
    background: var(--vh-sidebar);
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-brand-panel h1 {
    color: var(--vh-white);
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 0.75rem;
}

.login-brand-panel p {
    color: var(--vh-sidebar-text);
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.login-form-panel {
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-form-panel h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--vh-black);
}

.login-form-panel .btn-primary {
    width: 100%;
    padding: 0.65rem;
    background: var(--vh-accent);
    border-color: var(--vh-accent);
    font-weight: 600;
}

.login-form-panel .btn-primary:hover {
    background: var(--vh-accent-hover);
    border-color: var(--vh-accent-hover);
}

/* Mobile */
@media (max-width: 991.98px) {
    .vh-sidebar {
        transform: translateX(-100%);
    }

    .vh-sidebar.is-open {
        transform: translateX(0);
    }

    .vh-sidebar__brand {
        padding: 1rem 1rem 0.85rem;
    }

    .vh-brand {
        font-size: 0.95rem;
        line-height: 1.3;
    }

    .vh-sidebar__label {
        padding-top: 0.85rem;
    }

    .vh-sidebar__footer {
        padding: 0.65rem 0.75rem 0.85rem;
        padding-bottom: max(0.85rem, env(safe-area-inset-bottom, 0px));
    }

    .vh-user {
        padding: 0.4rem 0.75rem 0.45rem;
    }

    .vh-sidebar__logout--desktop {
        display: none !important;
    }

    .vh-profile-modal__logout-wrap {
        display: block;
    }

    .vh-main {
        margin-left: 0;
    }

    .vh-topbar__toggle {
        display: flex;
    }

    .login-layout {
        grid-template-columns: 1fr;
        max-width: 420px;
    }

    .login-brand-panel {
        padding: 2rem;
        min-height: auto;
    }

    .login-brand-panel p {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .vh-content {
        padding: 1rem;
    }

    .vh-topbar {
        padding: 0.85rem 1rem;
    }
}

/* @mentions */
.vh-nav-badge {
    margin-left: auto;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: #7c3aed;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1.25rem;
    text-align: center;
}

.vh-mention {
    display: inline;
    padding: 0.05rem 0.35rem;
    border-radius: 6px;
    background: #ede9fe;
    color: #5b21b6;
    font-weight: 600;
}

.vh-mention-editor {
    position: relative;
}

.vh-mention-editor__hint {
    margin-top: 0.45rem;
    font-size: 0.75rem;
    color: var(--vh-muted);
}

.vh-mention-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.35rem);
    z-index: 30;
    max-height: 14rem;
    overflow: auto;
    border: 1px solid var(--vh-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(15, 26, 23, 0.12);
}

.vh-mention-dropdown__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: none;
    border-bottom: 1px solid #f3f4f6;
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: background var(--vh-transition);
}

.vh-mention-dropdown__item:last-child {
    border-bottom: none;
}

.vh-mention-dropdown__item:hover,
.vh-mention-dropdown__item:focus {
    background: #f5f3ff;
    outline: none;
}

.vh-mention-dropdown__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 10px;
    background: #7c3aed;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    flex-shrink: 0;
}

.vh-mention-dropdown__body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.vh-mention-dropdown__name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--vh-black);
}

.vh-mention-dropdown__role {
    font-size: 0.75rem;
    color: var(--vh-muted);
}

.vh-mentions-panel {
    padding: 1.15rem 1.25rem;
    border: 1px solid #ddd6fe;
    background: linear-gradient(135deg, #faf5ff 0%, #ffffff 55%);
}

.vh-mentions-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.vh-mentions-panel__header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem 0.75rem;
}

.vh-mentions-panel__dismiss {
    border: none;
    background: transparent;
    color: var(--vh-accent);
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.25rem 0;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.vh-mentions-panel__dismiss:hover {
    color: var(--vh-accent-hover);
}

.vh-mentions-panel__title-wrap {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.vh-mentions-panel__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    background: #7c3aed;
    color: #fff;
    font-size: 1.15rem;
}

.vh-mentions-panel__title {
    margin: 0 0 0.15rem;
    font-size: 1rem;
    font-weight: 700;
}

.vh-mentions-panel__subtitle {
    font-size: 0.8125rem;
    color: var(--vh-muted);
}

.vh-mentions-panel__badge {
    min-width: 1.75rem;
    height: 1.75rem;
    padding: 0 0.5rem;
    border-radius: 999px;
    background: #7c3aed;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.75rem;
    text-align: center;
}

.vh-mentions-panel__empty {
    margin: 0;
    font-size: 0.875rem;
    color: var(--vh-muted);
}

.vh-mentions-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.vh-mentions-list__item {
    border-radius: 12px;
    border: 1px solid var(--vh-border);
    background: #fff;
    transition: border-color var(--vh-transition), box-shadow var(--vh-transition);
}

.vh-mentions-list__item.is-unread {
    border-color: #c4b5fd;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.08);
}

.vh-mentions-list__link {
    display: block;
    padding: 0.85rem 1rem;
    text-decoration: none;
    color: inherit;
}

.vh-mentions-list__link:hover {
    background: #faf5ff;
}

.vh-mentions-list__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8125rem;
    margin-bottom: 0.25rem;
}

.vh-mentions-list__new {
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: #ede9fe;
    color: #6d28d9;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
}

.vh-mentions-list__task {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--vh-black);
    margin-bottom: 0.2rem;
}

.vh-mentions-list__excerpt {
    display: block;
    font-size: 0.8125rem;
    color: var(--vh-muted);
    line-height: 1.45;
}

.comment-body .vh-mention {
    font-size: inherit;
}

/* Campana: alertas de entrega pendiente */
@keyframes vh-notify-ring {
    0%, 100% {
        transform: rotate(0deg);
    }
    8% {
        transform: rotate(12deg);
    }
    16% {
        transform: rotate(-10deg);
    }
    24% {
        transform: rotate(8deg);
    }
    32% {
        transform: rotate(0deg);
    }
}

.vh-notify {
    position: relative;
}

.vh-notify__trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--vh-border);
    border-radius: 12px;
    background: var(--vh-white);
    color: var(--vh-text);
    cursor: pointer;
    transition: background var(--vh-transition), border-color var(--vh-transition), box-shadow var(--vh-transition);
}

.vh-notify__trigger:hover {
    background: #fff7f7;
    border-color: #fecaca;
}

.vh-notify__trigger[aria-expanded="true"] {
    background: #fef2f2;
    border-color: #fca5a5;
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.12);
}

.vh-notify__trigger .bi-bell {
    font-size: 1.125rem;
}

.vh-notify:has(.vh-notify__badge) .vh-notify__trigger .bi-bell {
    animation: vh-notify-ring 4s ease-in-out infinite;
    transform-origin: top center;
}

.vh-notify__badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: linear-gradient(145deg, #ef4444, #dc2626);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
    border: 2px solid var(--vh-surface);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}

.vh-notify__panel {
    position: absolute;
    top: calc(100% + 0.65rem);
    right: 0;
    width: min(22rem, calc(100vw - 2rem));
    border-radius: 16px;
    border: 1px solid #f3d0d0;
    background: #fff;
    box-shadow:
        0 24px 48px rgba(15, 26, 23, 0.12),
        0 0 0 1px rgba(220, 38, 38, 0.04);
    overflow: hidden;
    z-index: 1200;
}

.vh-notify__panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1rem 0.85rem;
    background: linear-gradient(180deg, #fff5f5 0%, #ffffff 100%);
    border-bottom: 1px solid #fee2e2;
}

.vh-notify__panel-kicker {
    margin: 0 0 0.15rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #b91c1c;
}

.vh-notify__panel-title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--vh-black);
}

.vh-notify__mark-all {
    border: none;
    background: transparent;
    color: #b91c1c;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
}

.vh-notify__mark-all:hover {
    color: #991b1b;
}

.vh-notify__list {
    list-style: none;
    margin: 0;
    padding: 0.35rem;
    max-height: 22rem;
    overflow-y: auto;
}

.vh-notify__item {
    border-radius: 12px;
    margin-bottom: 0.25rem;
}

.vh-notify__item:last-child {
    margin-bottom: 0;
}

.vh-notify__link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 0.75rem;
    text-decoration: none;
    color: inherit;
    border-radius: 12px;
    transition: background var(--vh-transition);
}

.vh-notify__link:hover {
    background: #fff7f7;
}

.vh-notify__item.is-unread .vh-notify__link {
    background: #fffafa;
}

.vh-notify__item.is-unread .vh-notify__link:hover {
    background: #fff1f1;
}

.vh-notify__item-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 10px;
    font-size: 0.95rem;
}

.vh-notify__item.is-overdue .vh-notify__item-icon {
    background: #fee2e2;
    color: #b91c1c;
}

.vh-notify__item.is-today .vh-notify__item-icon {
    background: #ffedd5;
    color: #c2410c;
}

.vh-notify__item-body {
    flex: 1;
    min-width: 0;
}

.vh-notify__item-top {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.15rem;
}

.vh-notify__item-flag {
    font-size: 0.625rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #b45309;
}

.vh-notify__item.is-overdue .vh-notify__item-flag {
    color: #b91c1c;
}

.vh-notify__item-new {
    padding: 0.08rem 0.4rem;
    border-radius: 999px;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 0.5625rem;
    font-weight: 800;
    text-transform: uppercase;
}

.vh-notify__item-title {
    display: block;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--vh-black);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vh-notify__item-meta {
    display: block;
    font-size: 0.6875rem;
    color: var(--vh-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vh-notify__item-chevron {
    flex-shrink: 0;
    color: #d1d5db;
    font-size: 0.75rem;
}

.vh-notify__empty {
    padding: 1.5rem 1rem;
    text-align: center;
    color: var(--vh-muted);
    font-size: 0.8125rem;
}

.vh-notify__empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 0.5rem;
    border-radius: 999px;
    background: #ecfdf5;
    color: #059669;
    font-size: 1.25rem;
}

.vh-notify__footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--vh-border);
    background: #fafafa;
    text-align: center;
}

.vh-notify__footer-link {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--vh-accent);
    text-decoration: none;
}

.vh-notify__footer-link:hover {
    color: var(--vh-accent-hover);
    text-decoration: underline;
}
